Fix detection of "r_fs" and "r_gs" on FreeBSD.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
81ecdfbb 596GDB_NM_FILE
393fd4c3
YQ
597LTLIBBABELTRACE
598LIBBABELTRACE
599HAVE_LIBBABELTRACE
81ecdfbb
RW
600frags
601target_subdir
602CONFIG_UNINSTALL
603CONFIG_INSTALL
604CONFIG_CLEAN
605CONFIG_ALL
606CONFIG_SRCS
607CONFIG_DEPS
608CONFIG_OBS
609PROFILE_CFLAGS
610ENABLE_CFLAGS
611SIM_OBS
612SIM
613XMKMF
614GDBTK_SRC_DIR
615GDBTK_CFLAGS
616GDBTKLIBS
617X_LIBS
618X_LDFLAGS
619X_CFLAGS
620TK_XINCLUDES
621TK_DEPS
622TK_LIBRARY
623TK_INCLUDE
624TK_STUB_LIB_SPEC
625TK_STUB_LIB_FLAG
626TK_STUB_LIB_FILE
627TK_LIB_SPEC
628TK_LIB_FLAG
629TK_LIB_FILE
630TK_SRC_DIR
631TK_BIN_DIR
632TK_VERSION
633TCL_DEPS
634TCL_LIBRARY
635TCL_INCLUDE
636TCL_STUB_LIB_SPEC
637TCL_STUB_LIB_FLAG
638TCL_STUB_LIB_FILE
639TCL_LIB_SPEC
640TCL_LIB_FLAG
641TCL_LIB_FILE
642TCL_SRC_DIR
643TCL_BIN_DIR
644TCL_PATCH_LEVEL
645TCL_VERSION
646WIN32LDAPP
647GUI_CFLAGS_X
648LIBGUI
608e2dbb
TT
649LTLIBLZMA
650LIBLZMA
651HAVE_LIBLZMA
81ecdfbb
RW
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
58bfce93
MM
661LTLIBIPT
662LIBIPT
663HAVE_LIBIPT
4df42755
DE
664HAVE_GUILE_FALSE
665HAVE_GUILE_TRUE
ed3ef339
DE
666GUILE_LIBS
667GUILE_CPPFLAGS
e76c5d17
DE
668GUILD_TARGET_FLAG
669GUILD
ed3ef339 670pkg_config_prog_path
4df42755
DE
671HAVE_PYTHON_FALSE
672HAVE_PYTHON_TRUE
ac534cba
JB
673PYTHON_LIBS
674PYTHON_CPPFLAGS
81ecdfbb 675PYTHON_CFLAGS
ec685c5e 676python_prog_path
81ecdfbb
RW
677LTLIBEXPAT
678LIBEXPAT
679HAVE_LIBEXPAT
b8e0a31c 680JIT_READER_DIR
f997c383 681TARGET_PTR
39037522 682READLINE_TEXI_INCFLAG
81ecdfbb
RW
683READLINE_CFLAGS
684READLINE_DEPS
685READLINE
016a3251
DD
686LTLIBICONV
687LIBICONV
711a72d3
L
688zlibinc
689zlibdir
81ecdfbb
RW
690MIG
691WINDRES
692DLLTOOL
c971b7fa 693AR
81ecdfbb
RW
694YFLAGS
695YACC
c971b7fa 696RANLIB
81ecdfbb 697LN_S
c971b7fa
PA
698INSTALL_DATA
699INSTALL_SCRIPT
700INSTALL_PROGRAM
701AWK
81ecdfbb
RW
702REPORT_BUGS_TEXI
703REPORT_BUGS_TO
704PKGVERSION
b292c783 705HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
706TARGET_OBS
707subdirs
708GDB_DATADIR
709DEBUGDIR
5048e516
JK
710MAKEINFO_EXTRA_FLAGS
711MAKEINFOFLAGS
712MAKEINFO
81ecdfbb
RW
713PACKAGE
714GNULIB_STDINT_H
81ecdfbb
RW
715CATOBJEXT
716GENCAT
717INSTOBJEXT
718DATADIRNAME
719CATALOGS
720POSUB
721GMSGFMT
722XGETTEXT
723INCINTL
724LIBINTL_DEP
725LIBINTL
726USE_NLS
727SET_MAKE
728GMAKE_FALSE
729GMAKE_TRUE
730MAKE
731CCDEPMODE
732DEPDIR
733am__leading_dot
3bc3d82a 734COMPILER
4869db5e
RM
735INSTALL_STRIP_PROGRAM
736STRIP
737install_sh
81ecdfbb
RW
738target_os
739target_vendor
740target_cpu
741target
742host_os
743host_vendor
744host_cpu
745host
746build_os
747build_vendor
748build_cpu
749build
c971b7fa
PA
750EGREP
751GREP
752CPP
3bc3d82a
PA
753ac_ct_CXX
754CXXFLAGS
755CXX
81ecdfbb
RW
756OBJEXT
757EXEEXT
758ac_ct_CC
759CPPFLAGS
760LDFLAGS
761CFLAGS
762CC
763MAINT
764MAINTAINER_MODE_FALSE
765MAINTAINER_MODE_TRUE
766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
a4ce5b0d 804ac_subst_files='host_makefile_frag'
81ecdfbb
RW
805ac_user_opts='
806enable_option_checking
807enable_maintainer_mode
da2f07f1
JK
808enable_plugins
809enable_largefile
3bc3d82a 810enable_build_with_cxx
81ecdfbb
RW
811with_separate_debug_dir
812with_gdb_datadir
813with_relocated_sources
7349ff92 814with_auto_load_dir
bccbefd2 815with_auto_load_safe_path
81ecdfbb
RW
816enable_targets
817enable_64_bit_bfd
818enable_gdbcli
819enable_gdbmi
820enable_tui
821enable_gdbtk
05e7c244 822with_libunwind_ia64
81ecdfbb
RW
823with_curses
824enable_profiling
825with_pkgversion
826with_bugurl
711a72d3 827with_system_zlib
016a3251
DD
828with_gnu_ld
829enable_rpath
81ecdfbb 830with_libiconv_prefix
478aac75 831with_iconv_bin
81ecdfbb 832with_system_readline
b8e0a31c 833with_jit_reader_dir
81ecdfbb 834with_expat
81ecdfbb
RW
835with_libexpat_prefix
836with_python
ed3ef339 837with_guile
a8db4212 838enable_libmcheck
58bfce93
MM
839with_intel_pt
840with_libipt_prefix
81ecdfbb
RW
841with_included_regex
842with_sysroot
843with_system_gdbinit
844enable_werror
845enable_build_warnings
846enable_gdb_build_warnings
608e2dbb
TT
847with_lzma
848with_liblzma_prefix
81ecdfbb
RW
849with_tcl
850with_tk
851with_x
852enable_sim
853enable_multi_ice
496c0e1b 854enable_gdbserver
393fd4c3
YQ
855with_babeltrace
856with_libbabeltrace_prefix
81ecdfbb
RW
857'
858 ac_precious_vars='build_alias
859host_alias
860target_alias
861CC
862CFLAGS
863LDFLAGS
864LIBS
865CPPFLAGS
3bc3d82a
PA
866CXX
867CXXFLAGS
868CCC
81ecdfbb 869CPP
f06e05e0
JK
870MAKEINFO
871MAKEINFOFLAGS
81ecdfbb
RW
872YACC
873YFLAGS
874XMKMF'
5ae98d25 875ac_subdirs_all='testsuite
81ecdfbb
RW
876gdbtk
877multi-ice
878gdbserver'
c906108c
SS
879
880# Initialize some variables set by options.
bec39cab
AC
881ac_init_help=
882ac_init_version=false
81ecdfbb
RW
883ac_unrecognized_opts=
884ac_unrecognized_sep=
c906108c
SS
885# The variables have the same names as the options, with
886# dashes changed to underlines.
bec39cab 887cache_file=/dev/null
c906108c 888exec_prefix=NONE
c906108c 889no_create=
c906108c
SS
890no_recursion=
891prefix=NONE
892program_prefix=NONE
893program_suffix=NONE
894program_transform_name=s,x,x,
895silent=
896site=
897srcdir=
c906108c
SS
898verbose=
899x_includes=NONE
900x_libraries=NONE
bec39cab
AC
901
902# Installation directory options.
903# These are left unexpanded so users can "make install exec_prefix=/foo"
904# and all the variables that are supposed to be based on exec_prefix
905# by default will actually change.
906# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 907# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
908bindir='${exec_prefix}/bin'
909sbindir='${exec_prefix}/sbin'
910libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
911datarootdir='${prefix}/share'
912datadir='${datarootdir}'
c906108c
SS
913sysconfdir='${prefix}/etc'
914sharedstatedir='${prefix}/com'
915localstatedir='${prefix}/var'
c906108c
SS
916includedir='${prefix}/include'
917oldincludedir='/usr/include'
81ecdfbb
RW
918docdir='${datarootdir}/doc/${PACKAGE}'
919infodir='${datarootdir}/info'
920htmldir='${docdir}'
921dvidir='${docdir}'
922pdfdir='${docdir}'
923psdir='${docdir}'
924libdir='${exec_prefix}/lib'
925localedir='${datarootdir}/locale'
926mandir='${datarootdir}/man'
c906108c 927
c906108c 928ac_prev=
81ecdfbb 929ac_dashdash=
c906108c
SS
930for ac_option
931do
c906108c
SS
932 # If the previous option needs an argument, assign it.
933 if test -n "$ac_prev"; then
81ecdfbb 934 eval $ac_prev=\$ac_option
c906108c
SS
935 ac_prev=
936 continue
937 fi
938
81ecdfbb
RW
939 case $ac_option in
940 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
941 *) ac_optarg=yes ;;
942 esac
c906108c
SS
943
944 # Accept the important Cygnus configure options, so we can diagnose typos.
945
81ecdfbb
RW
946 case $ac_dashdash$ac_option in
947 --)
948 ac_dashdash=yes ;;
c906108c
SS
949
950 -bindir | --bindir | --bindi | --bind | --bin | --bi)
951 ac_prev=bindir ;;
952 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 953 bindir=$ac_optarg ;;
c906108c
SS
954
955 -build | --build | --buil | --bui | --bu)
bec39cab 956 ac_prev=build_alias ;;
c906108c 957 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 958 build_alias=$ac_optarg ;;
c906108c
SS
959
960 -cache-file | --cache-file | --cache-fil | --cache-fi \
961 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
962 ac_prev=cache_file ;;
963 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
964 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
965 cache_file=$ac_optarg ;;
966
967 --config-cache | -C)
968 cache_file=config.cache ;;
c906108c 969
81ecdfbb 970 -datadir | --datadir | --datadi | --datad)
c906108c 971 ac_prev=datadir ;;
81ecdfbb 972 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 973 datadir=$ac_optarg ;;
c906108c 974
81ecdfbb
RW
975 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
976 | --dataroo | --dataro | --datar)
977 ac_prev=datarootdir ;;
978 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
979 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
980 datarootdir=$ac_optarg ;;
981
c906108c 982 -disable-* | --disable-*)
81ecdfbb 983 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 984 # Reject names that are not valid shell variable names.
81ecdfbb
RW
985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
986 as_fn_error "invalid feature name: $ac_useropt"
987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=no ;;
997
998 -docdir | --docdir | --docdi | --doc | --do)
999 ac_prev=docdir ;;
1000 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1001 docdir=$ac_optarg ;;
1002
1003 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1004 ac_prev=dvidir ;;
1005 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1006 dvidir=$ac_optarg ;;
c906108c
SS
1007
1008 -enable-* | --enable-*)
81ecdfbb 1009 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1010 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1011 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1012 as_fn_error "invalid feature name: $ac_useropt"
1013 ac_useropt_orig=$ac_useropt
1014 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1015 case $ac_user_opts in
1016 *"
1017"enable_$ac_useropt"
1018"*) ;;
1019 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1020 ac_unrecognized_sep=', ';;
b4e70030 1021 esac
81ecdfbb 1022 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1023
1024 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1025 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1026 | --exec | --exe | --ex)
1027 ac_prev=exec_prefix ;;
1028 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1029 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1030 | --exec=* | --exe=* | --ex=*)
bec39cab 1031 exec_prefix=$ac_optarg ;;
c906108c
SS
1032
1033 -gas | --gas | --ga | --g)
1034 # Obsolete; use --with-gas.
1035 with_gas=yes ;;
1036
bec39cab
AC
1037 -help | --help | --hel | --he | -h)
1038 ac_init_help=long ;;
1039 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1040 ac_init_help=recursive ;;
1041 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1042 ac_init_help=short ;;
c906108c
SS
1043
1044 -host | --host | --hos | --ho)
bec39cab 1045 ac_prev=host_alias ;;
c906108c 1046 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1047 host_alias=$ac_optarg ;;
c906108c 1048
81ecdfbb
RW
1049 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1050 ac_prev=htmldir ;;
1051 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1052 | --ht=*)
1053 htmldir=$ac_optarg ;;
1054
c906108c
SS
1055 -includedir | --includedir | --includedi | --included | --include \
1056 | --includ | --inclu | --incl | --inc)
1057 ac_prev=includedir ;;
1058 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1059 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1060 includedir=$ac_optarg ;;
c906108c
SS
1061
1062 -infodir | --infodir | --infodi | --infod | --info | --inf)
1063 ac_prev=infodir ;;
1064 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1065 infodir=$ac_optarg ;;
c906108c
SS
1066
1067 -libdir | --libdir | --libdi | --libd)
1068 ac_prev=libdir ;;
1069 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1070 libdir=$ac_optarg ;;
c906108c
SS
1071
1072 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1073 | --libexe | --libex | --libe)
1074 ac_prev=libexecdir ;;
1075 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1076 | --libexe=* | --libex=* | --libe=*)
bec39cab 1077 libexecdir=$ac_optarg ;;
c906108c 1078
81ecdfbb
RW
1079 -localedir | --localedir | --localedi | --localed | --locale)
1080 ac_prev=localedir ;;
1081 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1082 localedir=$ac_optarg ;;
1083
c906108c 1084 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1085 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1086 ac_prev=localstatedir ;;
1087 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1088 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1089 localstatedir=$ac_optarg ;;
c906108c
SS
1090
1091 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1092 ac_prev=mandir ;;
1093 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1094 mandir=$ac_optarg ;;
c906108c
SS
1095
1096 -nfp | --nfp | --nf)
1097 # Obsolete; use --without-fp.
1098 with_fp=no ;;
1099
1100 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1101 | --no-cr | --no-c | -n)
c906108c
SS
1102 no_create=yes ;;
1103
1104 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1105 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1106 no_recursion=yes ;;
1107
1108 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1109 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1110 | --oldin | --oldi | --old | --ol | --o)
1111 ac_prev=oldincludedir ;;
1112 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1113 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1114 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1115 oldincludedir=$ac_optarg ;;
c906108c
SS
1116
1117 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1118 ac_prev=prefix ;;
1119 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1120 prefix=$ac_optarg ;;
c906108c
SS
1121
1122 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1123 | --program-pre | --program-pr | --program-p)
1124 ac_prev=program_prefix ;;
1125 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1126 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1127 program_prefix=$ac_optarg ;;
c906108c
SS
1128
1129 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1130 | --program-suf | --program-su | --program-s)
1131 ac_prev=program_suffix ;;
1132 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1133 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1134 program_suffix=$ac_optarg ;;
c906108c
SS
1135
1136 -program-transform-name | --program-transform-name \
1137 | --program-transform-nam | --program-transform-na \
1138 | --program-transform-n | --program-transform- \
1139 | --program-transform | --program-transfor \
1140 | --program-transfo | --program-transf \
1141 | --program-trans | --program-tran \
1142 | --progr-tra | --program-tr | --program-t)
1143 ac_prev=program_transform_name ;;
1144 -program-transform-name=* | --program-transform-name=* \
1145 | --program-transform-nam=* | --program-transform-na=* \
1146 | --program-transform-n=* | --program-transform-=* \
1147 | --program-transform=* | --program-transfor=* \
1148 | --program-transfo=* | --program-transf=* \
1149 | --program-trans=* | --program-tran=* \
1150 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1151 program_transform_name=$ac_optarg ;;
c906108c 1152
81ecdfbb
RW
1153 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1154 ac_prev=pdfdir ;;
1155 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1156 pdfdir=$ac_optarg ;;
1157
1158 -psdir | --psdir | --psdi | --psd | --ps)
1159 ac_prev=psdir ;;
1160 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1161 psdir=$ac_optarg ;;
1162
c906108c
SS
1163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1164 | -silent | --silent | --silen | --sile | --sil)
1165 silent=yes ;;
1166
1167 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1168 ac_prev=sbindir ;;
1169 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1170 | --sbi=* | --sb=*)
bec39cab 1171 sbindir=$ac_optarg ;;
c906108c
SS
1172
1173 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1174 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1175 | --sharedst | --shareds | --shared | --share | --shar \
1176 | --sha | --sh)
1177 ac_prev=sharedstatedir ;;
1178 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1179 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1180 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1181 | --sha=* | --sh=*)
bec39cab 1182 sharedstatedir=$ac_optarg ;;
c906108c
SS
1183
1184 -site | --site | --sit)
1185 ac_prev=site ;;
1186 -site=* | --site=* | --sit=*)
bec39cab 1187 site=$ac_optarg ;;
3ace7edb 1188
c906108c
SS
1189 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1190 ac_prev=srcdir ;;
1191 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1192 srcdir=$ac_optarg ;;
c906108c
SS
1193
1194 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1195 | --syscon | --sysco | --sysc | --sys | --sy)
1196 ac_prev=sysconfdir ;;
1197 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1198 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1199 sysconfdir=$ac_optarg ;;
c906108c
SS
1200
1201 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1202 ac_prev=target_alias ;;
c906108c 1203 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1204 target_alias=$ac_optarg ;;
c906108c
SS
1205
1206 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1207 verbose=yes ;;
1208
bec39cab
AC
1209 -version | --version | --versio | --versi | --vers | -V)
1210 ac_init_version=: ;;
c906108c
SS
1211
1212 -with-* | --with-*)
81ecdfbb 1213 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1214 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1216 as_fn_error "invalid package name: $ac_useropt"
1217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
b4e70030 1225 esac
81ecdfbb 1226 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1227
1228 -without-* | --without-*)
81ecdfbb 1229 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1230 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1231 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1232 as_fn_error "invalid package name: $ac_useropt"
1233 ac_useropt_orig=$ac_useropt
1234 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1235 case $ac_user_opts in
1236 *"
1237"with_$ac_useropt"
1238"*) ;;
1239 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1240 ac_unrecognized_sep=', ';;
1241 esac
1242 eval with_$ac_useropt=no ;;
c906108c
SS
1243
1244 --x)
1245 # Obsolete; use --with-x.
1246 with_x=yes ;;
1247
1248 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1249 | --x-incl | --x-inc | --x-in | --x-i)
1250 ac_prev=x_includes ;;
1251 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1252 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1253 x_includes=$ac_optarg ;;
c906108c
SS
1254
1255 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1256 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1257 ac_prev=x_libraries ;;
1258 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1259 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1260 x_libraries=$ac_optarg ;;
c906108c 1261
81ecdfbb
RW
1262 -*) as_fn_error "unrecognized option: \`$ac_option'
1263Try \`$0 --help' for more information."
c906108c
SS
1264 ;;
1265
bec39cab
AC
1266 *=*)
1267 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1268 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1269 case $ac_envvar in #(
1270 '' | [0-9]* | *[!_$as_cr_alnum]* )
1271 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1272 esac
1273 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1274 export $ac_envvar ;;
1275
c906108c 1276 *)
bec39cab 1277 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1278 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1279 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1280 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1281 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1282 ;;
1283
1284 esac
1285done
1286
1287if test -n "$ac_prev"; then
bec39cab 1288 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1289 as_fn_error "missing argument to $ac_option"
c906108c 1290fi
c906108c 1291
81ecdfbb
RW
1292if test -n "$ac_unrecognized_opts"; then
1293 case $enable_option_checking in
1294 no) ;;
1295 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1296 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1297 esac
81ecdfbb 1298fi
b4e70030 1299
81ecdfbb
RW
1300# Check all directory arguments for consistency.
1301for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1302 datadir sysconfdir sharedstatedir localstatedir includedir \
1303 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1304 libdir localedir mandir
b4e70030 1305do
81ecdfbb
RW
1306 eval ac_val=\$$ac_var
1307 # Remove trailing slashes.
1308 case $ac_val in
1309 */ )
1310 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1311 eval $ac_var=\$ac_val;;
1312 esac
1313 # Be sure to have absolute directory names.
b4e70030 1314 case $ac_val in
81ecdfbb
RW
1315 [\\/$]* | ?:[\\/]* ) continue;;
1316 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1317 esac
81ecdfbb 1318 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1319done
1320
bec39cab
AC
1321# There might be people who depend on the old broken behavior: `$host'
1322# used to hold the argument of --host etc.
1323# FIXME: To remove some day.
1324build=$build_alias
1325host=$host_alias
1326target=$target_alias
1327
1328# FIXME: To remove some day.
1329if test "x$host_alias" != x; then
1330 if test "x$build_alias" = x; then
1331 cross_compiling=maybe
81ecdfbb 1332 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1333 If a cross compiler is detected then cross compile mode will be used." >&2
1334 elif test "x$build_alias" != "x$host_alias"; then
1335 cross_compiling=yes
1336 fi
1337fi
c906108c 1338
bec39cab
AC
1339ac_tool_prefix=
1340test -n "$host_alias" && ac_tool_prefix=$host_alias-
1341
1342test "$silent" = yes && exec 6>/dev/null
c906108c 1343
c906108c 1344
81ecdfbb
RW
1345ac_pwd=`pwd` && test -n "$ac_pwd" &&
1346ac_ls_di=`ls -di .` &&
1347ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1348 as_fn_error "working directory cannot be determined"
1349test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1350 as_fn_error "pwd does not report name of working directory"
1351
1352
c906108c
SS
1353# Find the source files, if location was not specified.
1354if test -z "$srcdir"; then
1355 ac_srcdir_defaulted=yes
81ecdfbb
RW
1356 # Try the directory containing this script, then the parent directory.
1357 ac_confdir=`$as_dirname -- "$as_myself" ||
1358$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1359 X"$as_myself" : 'X\(//\)[^/]' \| \
1360 X"$as_myself" : 'X\(//\)$' \| \
1361 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1362$as_echo X"$as_myself" |
1363 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\/\)[^/].*/{
1368 s//\1/
1369 q
1370 }
1371 /^X\(\/\/\)$/{
1372 s//\1/
1373 q
1374 }
1375 /^X\(\/\).*/{
1376 s//\1/
1377 q
1378 }
1379 s/.*/./; q'`
c906108c 1380 srcdir=$ac_confdir
81ecdfbb 1381 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1382 srcdir=..
1383 fi
1384else
1385 ac_srcdir_defaulted=no
1386fi
81ecdfbb
RW
1387if test ! -r "$srcdir/$ac_unique_file"; then
1388 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1389 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1390fi
1391ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1392ac_abs_confdir=`(
1393 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1394 pwd)`
1395# When building in place, set srcdir=.
1396if test "$ac_abs_confdir" = "$ac_pwd"; then
1397 srcdir=.
1398fi
1399# Remove unnecessary trailing slashes from srcdir.
1400# Double slashes in file names in object file debugging info
1401# mess up M-x gdb in Emacs.
1402case $srcdir in
1403*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1404esac
1405for ac_var in $ac_precious_vars; do
1406 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1407 eval ac_env_${ac_var}_value=\$${ac_var}
1408 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1409 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1410done
c906108c 1411
bec39cab
AC
1412#
1413# Report the --help message.
1414#
1415if test "$ac_init_help" = "long"; then
1416 # Omit some internal or obsolete options to make the list less imposing.
1417 # This message is too long to be a string in the A/UX 3.1 sh.
1418 cat <<_ACEOF
1419\`configure' configures this package to adapt to many kinds of systems.
1420
1421Usage: $0 [OPTION]... [VAR=VALUE]...
1422
1423To assign environment variables (e.g., CC, CFLAGS...), specify them as
1424VAR=VALUE. See below for descriptions of some of the useful variables.
1425
1426Defaults for the options are specified in brackets.
1427
1428Configuration:
1429 -h, --help display this help and exit
1430 --help=short display options specific to this package
1431 --help=recursive display the short help of all the included packages
1432 -V, --version display version information and exit
1433 -q, --quiet, --silent do not print \`checking...' messages
1434 --cache-file=FILE cache test results in FILE [disabled]
1435 -C, --config-cache alias for \`--cache-file=config.cache'
1436 -n, --no-create do not create output files
1437 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1438
bec39cab
AC
1439Installation directories:
1440 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1441 [$ac_default_prefix]
bec39cab 1442 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1443 [PREFIX]
bec39cab
AC
1444
1445By default, \`make install' will install all the files in
1446\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1447an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1448for instance \`--prefix=\$HOME'.
1449
1450For better control, use the options below.
1451
1452Fine tuning of the installation directories:
81ecdfbb
RW
1453 --bindir=DIR user executables [EPREFIX/bin]
1454 --sbindir=DIR system admin executables [EPREFIX/sbin]
1455 --libexecdir=DIR program executables [EPREFIX/libexec]
1456 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1457 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1458 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1459 --libdir=DIR object code libraries [EPREFIX/lib]
1460 --includedir=DIR C header files [PREFIX/include]
1461 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1462 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1463 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1464 --infodir=DIR info documentation [DATAROOTDIR/info]
1465 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1466 --mandir=DIR man documentation [DATAROOTDIR/man]
1467 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1468 --htmldir=DIR html documentation [DOCDIR]
1469 --dvidir=DIR dvi documentation [DOCDIR]
1470 --pdfdir=DIR pdf documentation [DOCDIR]
1471 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1472_ACEOF
1473
1474 cat <<\_ACEOF
1475
9009e1ae
MR
1476Program names:
1477 --program-prefix=PREFIX prepend PREFIX to installed program names
1478 --program-suffix=SUFFIX append SUFFIX to installed program names
1479 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1480
bec39cab
AC
1481X features:
1482 --x-includes=DIR X include files are in DIR
1483 --x-libraries=DIR X library files are in DIR
1484
1485System types:
1486 --build=BUILD configure for building on BUILD [guessed]
1487 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1488 --target=TARGET configure for building compilers for TARGET [HOST]
1489_ACEOF
1490fi
1491
1492if test -n "$ac_init_help"; then
1493
1494 cat <<\_ACEOF
1495
1496Optional Features:
81ecdfbb 1497 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1498 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1499 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1500 --enable-maintainer-mode enable make rules and dependencies not useful
1501 (and sometimes confusing) to the casual installer
2974be62 1502 --enable-plugins Enable support for plugins
da2f07f1 1503 --disable-largefile omit support for large files
3bc3d82a 1504 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1505 --enable-targets=TARGETS
1506 alternative target configurations
c0993dbe 1507 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1508 --disable-gdbcli disable command-line interface (CLI)
1509 --disable-gdbmi disable machine-interface (MI)
1510 --enable-tui enable full-screen terminal user interface (TUI)
1511 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1512 --enable-profiling enable profiling of GDB
3841debe 1513 --disable-rpath do not hardcode runtime library paths
17ef446e 1514 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1515 --enable-werror treat compile warnings as errors
32c1c914 1516 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1517 --enable-gdb-build-warnings
32c1c914 1518 enable GDB specific build-time compiler warnings if
a1220294 1519 gcc is used
32c1c914 1520 --enable-sim link gdb with simulator
bec39cab 1521 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1522 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1523 is auto)
bec39cab
AC
1524
1525Optional Packages:
1526 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1527 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1528 --with-separate-debug-dir=PATH
32c1c914 1529 look for global separate debug info in this path
62e4f60c 1530 [LIBDIR/debug]
b14b1491
TT
1531 --with-gdb-datadir=PATH look for global separate data files in this path
1532 [DATADIR/gdb]
29b0e8a2 1533 --with-relocated-sources=PATH
32c1c914 1534 automatically relocate this path for source files
7349ff92 1535 --with-auto-load-dir=PATH
aff139ff 1536 directories from which to load auto-loaded scripts
1564a261 1537 [$debugdir:$datadir/auto-load]
bccbefd2 1538 --with-auto-load-safe-path=PATH
aff139ff 1539 directories safe to hold auto-loaded files
7349ff92 1540 [--with-auto-load-dir]
bccbefd2
JK
1541 --without-auto-load-safe-path
1542 do not restrict auto-loaded files locations
05e7c244 1543 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1544 --with-curses use the curses library instead of the termcap
1545 library
c16158bc
JM
1546 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1547 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1548 --with-system-zlib use installed libz
016a3251
DD
1549 --with-gnu-ld assume the C compiler uses GNU ld default=no
1550 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1551 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1552 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1553 --with-system-readline use installed readline library
b8e0a31c
SD
1554 --with-jit-reader-dir=PATH
1555 directory to load the JIT readers from
5c39566f 1556 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1557 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1558 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1559 --with-python[=PYTHON] include python support
1560 (auto/yes/no/<python-program>)
ed3ef339
DE
1561 --with-guile[=GUILE] include guile support
1562 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1563 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1564 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1565 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1566 --without-included-regex
1567 don't use included regex; this is the default on
1568 systems with version 2 of the GNU C library (use
1569 with caution on other system)
81ecdfbb 1570 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1571 --with-system-gdbinit=PATH
32c1c914 1572 automatically load a system-wide gdbinit file
608e2dbb
TT
1573 --with-lzma support lzma compression (auto/yes/no)
1574 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1575 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1576 --with-tcl directory containing tcl configuration (tclConfig.sh)
1577 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1578 --with-x use the X Window System
393fd4c3
YQ
1579 --with-babeltrace include babeltrace support (auto/yes/no)
1580 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1581 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1582
1583Some influential environment variables:
1584 CC C compiler command
1585 CFLAGS C compiler flags
1586 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1587 nonstandard directory <lib dir>
81ecdfbb
RW
1588 LIBS libraries to pass to the linker, e.g. -l<library>
1589 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1590 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1591 CXX C++ compiler command
1592 CXXFLAGS C++ compiler flags
bec39cab 1593 CPP C preprocessor
f06e05e0
JK
1594 MAKEINFO Parent configure detects if it is of sufficient version.
1595 MAKEINFOFLAGS
1596 Parameters for MAKEINFO.
81ecdfbb
RW
1597 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1598 the first program found out of: `bison -y', `byacc', `yacc'.
1599 YFLAGS The list of arguments that will be passed by default to $YACC.
1600 This script will default YFLAGS to the empty string to avoid a
1601 default value of `-d' given by some make applications.
1602 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1603
1604Use these variables to override the choices made by `configure' or to help
1605it to find libraries and programs with nonstandard names/locations.
1606
81ecdfbb 1607Report bugs to the package provider.
bec39cab 1608_ACEOF
81ecdfbb 1609ac_status=$?
bec39cab
AC
1610fi
1611
1612if test "$ac_init_help" = "recursive"; then
1613 # If there are subdirs, report their specific --help.
bec39cab 1614 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1615 test -d "$ac_dir" ||
1616 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1617 continue
bec39cab
AC
1618 ac_builddir=.
1619
81ecdfbb
RW
1620case "$ac_dir" in
1621.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1622*)
1623 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1624 # A ".." for each directory in $ac_dir_suffix.
1625 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1626 case $ac_top_builddir_sub in
1627 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1628 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1629 esac ;;
1630esac
1631ac_abs_top_builddir=$ac_pwd
1632ac_abs_builddir=$ac_pwd$ac_dir_suffix
1633# for backward compatibility:
1634ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1635
1636case $srcdir in
81ecdfbb 1637 .) # We are building in place.
bec39cab 1638 ac_srcdir=.
81ecdfbb
RW
1639 ac_top_srcdir=$ac_top_builddir_sub
1640 ac_abs_top_srcdir=$ac_pwd ;;
1641 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1642 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1643 ac_top_srcdir=$srcdir
1644 ac_abs_top_srcdir=$srcdir ;;
1645 *) # Relative name.
1646 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1647 ac_top_srcdir=$ac_top_build_prefix$srcdir
1648 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1649esac
81ecdfbb 1650ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1651
81ecdfbb
RW
1652 cd "$ac_dir" || { ac_status=$?; continue; }
1653 # Check for guested configure.
1654 if test -f "$ac_srcdir/configure.gnu"; then
1655 echo &&
1656 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1657 elif test -f "$ac_srcdir/configure"; then
1658 echo &&
1659 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1660 else
81ecdfbb
RW
1661 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1662 fi || ac_status=$?
1663 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1664 done
1665fi
1666
81ecdfbb 1667test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1668if $ac_init_version; then
1669 cat <<\_ACEOF
81ecdfbb
RW
1670configure
1671generated by GNU Autoconf 2.64
bec39cab 1672
81ecdfbb 1673Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1674This configure script is free software; the Free Software Foundation
1675gives unlimited permission to copy, distribute and modify it.
1676_ACEOF
81ecdfbb 1677 exit
bec39cab 1678fi
bec39cab 1679
81ecdfbb
RW
1680## ------------------------ ##
1681## Autoconf initialization. ##
1682## ------------------------ ##
bec39cab 1683
81ecdfbb
RW
1684# ac_fn_c_try_compile LINENO
1685# --------------------------
1686# Try to compile conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_compile ()
1688{
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 rm -f conftest.$ac_objext
1691 if { { ac_try="$ac_compile"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_compile") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } && {
1707 test -z "$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 } && test -s conftest.$ac_objext; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1714
81ecdfbb
RW
1715 ac_retval=1
1716fi
1717 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1718 return $ac_retval
1719
1720} # ac_fn_c_try_compile
1721
3bc3d82a
PA
1722# ac_fn_cxx_try_compile LINENO
1723# ----------------------------
1724# Try to compile conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_cxx_try_compile ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext
1729 if { { ac_try="$ac_compile"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_compile") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } && {
1745 test -z "$ac_cxx_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest.$ac_objext; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1756 return $ac_retval
1757
1758} # ac_fn_cxx_try_compile
1759
81ecdfbb
RW
1760# ac_fn_c_try_cpp LINENO
1761# ----------------------
1762# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_cpp ()
bec39cab 1764{
81ecdfbb
RW
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 if { { ac_try="$ac_cpp conftest.$ac_ext"
1767case "(($ac_try" in
1768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769 *) ac_try_echo=$ac_try;;
1770esac
1771eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772$as_echo "$ac_try_echo"; } >&5
1773 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1774 ac_status=$?
1775 if test -s conftest.err; then
1776 grep -v '^ *+' conftest.err >conftest.er1
1777 cat conftest.er1 >&5
1778 mv -f conftest.er1 conftest.err
1779 fi
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } >/dev/null && {
1782 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1783 test ! -s conftest.err
1784 }; then :
1785 ac_retval=0
1786else
1787 $as_echo "$as_me: failed program was:" >&5
1788sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1789
81ecdfbb
RW
1790 ac_retval=1
1791fi
1792 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1793 return $ac_retval
bec39cab 1794
81ecdfbb 1795} # ac_fn_c_try_cpp
bec39cab 1796
81ecdfbb
RW
1797# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1798# -------------------------------------------------------
1799# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1800# the include files in INCLUDES and setting the cache variable VAR
1801# accordingly.
1802ac_fn_c_check_header_mongrel ()
1803{
1804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1807$as_echo_n "checking for $2... " >&6; }
1808if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1809 $as_echo_n "(cached) " >&6
1810fi
1811eval ac_res=\$$3
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1813$as_echo "$ac_res" >&6; }
1814else
1815 # Is the header compilable?
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1817$as_echo_n "checking $2 usability... " >&6; }
1818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821#include <$2>
1822_ACEOF
1823if ac_fn_c_try_compile "$LINENO"; then :
1824 ac_header_compiler=yes
1825else
1826 ac_header_compiler=no
1827fi
1828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1830$as_echo "$ac_header_compiler" >&6; }
bec39cab 1831
81ecdfbb
RW
1832# Is the header present?
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1834$as_echo_n "checking $2 presence... " >&6; }
1835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837#include <$2>
1838_ACEOF
1839if ac_fn_c_try_cpp "$LINENO"; then :
1840 ac_header_preproc=yes
1841else
1842 ac_header_preproc=no
1843fi
1844rm -f conftest.err conftest.$ac_ext
1845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1846$as_echo "$ac_header_preproc" >&6; }
bec39cab 1847
81ecdfbb
RW
1848# So? What about this header?
1849case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1850 yes:no: )
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1852$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1855 ;;
1856 no:yes:* )
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1858$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1860$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1862$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1864$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1866$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1867 ;;
1868esac
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
1871if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1872 $as_echo_n "(cached) " >&6
1873else
1874 eval "$3=\$ac_header_compiler"
1875fi
1876eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
1879fi
1880 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1881
81ecdfbb 1882} # ac_fn_c_check_header_mongrel
bec39cab 1883
81ecdfbb
RW
1884# ac_fn_c_try_run LINENO
1885# ----------------------
1886# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1887# that executables *can* be run.
1888ac_fn_c_try_run ()
1889{
1890 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1891 if { { ac_try="$ac_link"
1892case "(($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_link") 2>&5
1899 ac_status=$?
1900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1902 { { case "(($ac_try" in
1903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1904 *) ac_try_echo=$ac_try;;
1905esac
1906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1907$as_echo "$ac_try_echo"; } >&5
1908 (eval "$ac_try") 2>&5
1909 ac_status=$?
1910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1911 test $ac_status = 0; }; }; then :
1912 ac_retval=0
1913else
1914 $as_echo "$as_me: program exited with status $ac_status" >&5
1915 $as_echo "$as_me: failed program was:" >&5
1916sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1917
81ecdfbb
RW
1918 ac_retval=$ac_status
1919fi
1920 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1921 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1922 return $ac_retval
bec39cab 1923
81ecdfbb 1924} # ac_fn_c_try_run
bec39cab 1925
81ecdfbb
RW
1926# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1927# -------------------------------------------------------
1928# Tests whether HEADER exists and can be compiled using the include files in
1929# INCLUDES, setting the cache variable VAR accordingly.
1930ac_fn_c_check_header_compile ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
1935if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1936 $as_echo_n "(cached) " >&6
1937else
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941#include <$2>
bec39cab 1942_ACEOF
81ecdfbb
RW
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 eval "$3=yes"
1945else
1946 eval "$3=no"
1947fi
1948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949fi
1950eval ac_res=\$$3
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952$as_echo "$ac_res" >&6; }
1953 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1954
81ecdfbb 1955} # ac_fn_c_check_header_compile
bec39cab 1956
2974be62
AM
1957# ac_fn_c_try_link LINENO
1958# -----------------------
1959# Try to link conftest.$ac_ext, and return whether this succeeded.
1960ac_fn_c_try_link ()
1961{
1962 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963 rm -f conftest.$ac_objext conftest$ac_exeext
1964 if { { ac_try="$ac_link"
1965case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_link") 2>conftest.err
1972 ac_status=$?
1973 if test -s conftest.err; then
1974 grep -v '^ *+' conftest.err >conftest.er1
1975 cat conftest.er1 >&5
1976 mv -f conftest.er1 conftest.err
1977 fi
1978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979 test $ac_status = 0; } && {
1980 test -z "$ac_c_werror_flag" ||
1981 test ! -s conftest.err
1982 } && test -s conftest$ac_exeext && {
1983 test "$cross_compiling" = yes ||
1984 $as_test_x conftest$ac_exeext
1985 }; then :
1986 ac_retval=0
1987else
1988 $as_echo "$as_me: failed program was:" >&5
1989sed 's/^/| /' conftest.$ac_ext >&5
1990
1991 ac_retval=1
1992fi
1993 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1994 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1995 # interfere with the next link command; also delete a directory that is
1996 # left behind by Apple's compiler. We do this before executing the actions.
1997 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1998 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1999 return $ac_retval
2000
2001} # ac_fn_c_try_link
2002
81ecdfbb
RW
2003# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2004# --------------------------------------------
2005# Tries to find the compile-time value of EXPR in a program that includes
2006# INCLUDES, setting VAR accordingly. Returns whether the value could be
2007# computed
2008ac_fn_c_compute_int ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if test "$cross_compiling" = yes; then
2012 # Depending upon the size, compute the lo and hi bounds.
2013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) >= 0)];
2020test_array [0] = 0
bec39cab 2021
81ecdfbb
RW
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_lo=0 ac_mid=0
2028 while :; do
2029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h. */
2031$4
2032int
2033main ()
2034{
2035static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2036test_array [0] = 0
bec39cab 2037
81ecdfbb
RW
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"; then :
2043 ac_hi=$ac_mid; break
2044else
2045 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2046 if test $ac_lo -le $ac_mid; then
2047 ac_lo= ac_hi=
2048 break
2049 fi
2050 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2051fi
81ecdfbb
RW
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053 done
c906108c 2054else
81ecdfbb
RW
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) < 0)];
2062test_array [0] = 0
bec39cab 2063
81ecdfbb
RW
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_hi=-1 ac_mid=-1
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2078test_array [0] = 0
bec39cab 2079
81ecdfbb
RW
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_lo=$ac_mid; break
2086else
2087 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2088 if test $ac_mid -le $ac_hi; then
2089 ac_lo= ac_hi=
2090 break
2091 fi
2092 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 done
2096else
2097 ac_lo= ac_hi=
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102# Binary search between lo and hi bounds.
2103while test "x$ac_lo" != "x$ac_hi"; do
2104 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2112test_array [0] = 0
bec39cab 2113
81ecdfbb
RW
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
bec39cab 2140
81ecdfbb
RW
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
bec39cab 2161
81ecdfbb
RW
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
bec39cab 2174
81ecdfbb
RW
2175 fi
2176 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2177 return $ac_retval
bec39cab 2178
81ecdfbb 2179} # ac_fn_c_compute_int
bec39cab 2180
55a8c076
YQ
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
81ecdfbb
RW
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
2189if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2190 $as_echo_n "(cached) " >&6
2191else
81ecdfbb
RW
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
55a8c076
YQ
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
2244 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2245
2246} # ac_fn_c_check_func
2247
07697489
PA
2248# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2249# -------------------------------------------
2250# Tests whether TYPE exists after having included INCLUDES, setting cache
2251# variable VAR accordingly.
2252ac_fn_c_check_type ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2256$as_echo_n "checking for $2... " >&6; }
2257if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2258 $as_echo_n "(cached) " >&6
2259else
2260 eval "$3=no"
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$4
2264int
2265main ()
2266{
2267if (sizeof ($2))
2268 return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$4
2277int
2278main ()
2279{
2280if (sizeof (($2)))
2281 return 0;
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
2287
2288else
2289 eval "$3=yes"
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295eval ac_res=\$$3
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
2298 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2299
2300} # ac_fn_c_check_type
2301
770d76d7
PA
2302# ac_fn_c_check_decl LINENO SYMBOL VAR
2303# ------------------------------------
2304# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2305ac_fn_c_check_decl ()
2306{
2307 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308 as_decl_name=`echo $2|sed 's/ *(.*//'`
2309 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2311$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2312if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2313 $as_echo_n "(cached) " >&6
2314else
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$4
2318int
2319main ()
2320{
2321#ifndef $as_decl_name
2322#ifdef __cplusplus
2323 (void) $as_decl_use;
2324#else
2325 (void) $as_decl_name;
2326#endif
2327#endif
2328
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$3=yes"
2335else
2336 eval "$3=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340eval ac_res=\$$3
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2342$as_echo "$ac_res" >&6; }
2343 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2344
2345} # ac_fn_c_check_decl
2346
55a8c076
YQ
2347# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2348# ----------------------------------------------------
2349# Tries to find if the field MEMBER exists in type AGGR, after including
2350# INCLUDES, setting cache variable VAR accordingly.
2351ac_fn_c_check_member ()
2352{
2353 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2355$as_echo_n "checking for $2.$3... " >&6; }
2356if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2357 $as_echo_n "(cached) " >&6
2358else
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h. */
2361$5
2362int
2363main ()
2364{
2365static $2 ac_aggr;
2366if (ac_aggr.$3)
2367return 0;
2368 ;
2369 return 0;
2370}
2371_ACEOF
2372if ac_fn_c_try_compile "$LINENO"; then :
2373 eval "$4=yes"
2374else
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$5
2378int
2379main ()
2380{
2381static $2 ac_aggr;
2382if (sizeof ac_aggr.$3)
2383return 0;
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$4=yes"
2390else
2391 eval "$4=no"
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396fi
2397eval ac_res=\$$4
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399$as_echo "$ac_res" >&6; }
2400 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2401
2402} # ac_fn_c_check_member
54019719
PA
2403
2404# ac_fn_cxx_check_decl LINENO SYMBOL VAR
2405# --------------------------------------
2406# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2407ac_fn_cxx_check_decl ()
2408{
2409 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410 as_decl_name=`echo $2|sed 's/ *(.*//'`
2411 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2413$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2414if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2415 $as_echo_n "(cached) " >&6
2416else
2417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418/* end confdefs.h. */
2419$4
2420int
2421main ()
2422{
2423#ifndef $as_decl_name
2424#ifdef __cplusplus
2425 (void) $as_decl_use;
2426#else
2427 (void) $as_decl_name;
2428#endif
2429#endif
2430
2431 ;
2432 return 0;
2433}
2434_ACEOF
2435if ac_fn_cxx_try_compile "$LINENO"; then :
2436 eval "$3=yes"
2437else
2438 eval "$3=no"
2439fi
2440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2441fi
2442eval ac_res=\$$3
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2444$as_echo "$ac_res" >&6; }
2445 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2446
2447} # ac_fn_cxx_check_decl
81ecdfbb
RW
2448cat >config.log <<_ACEOF
2449This file contains any messages produced by compilers while
2450running configure, to aid debugging if configure makes a mistake.
d5af19ba 2451
81ecdfbb
RW
2452It was created by $as_me, which was
2453generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2454
81ecdfbb 2455 $ $0 $@
413ccac7 2456
81ecdfbb
RW
2457_ACEOF
2458exec 5>>config.log
2459{
2460cat <<_ASUNAME
2461## --------- ##
2462## Platform. ##
2463## --------- ##
413ccac7 2464
81ecdfbb
RW
2465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2466uname -m = `(uname -m) 2>/dev/null || echo unknown`
2467uname -r = `(uname -r) 2>/dev/null || echo unknown`
2468uname -s = `(uname -s) 2>/dev/null || echo unknown`
2469uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2470
81ecdfbb
RW
2471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2473
81ecdfbb
RW
2474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2481
81ecdfbb 2482_ASUNAME
bec39cab 2483
bec39cab
AC
2484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2485for as_dir in $PATH
2486do
2487 IFS=$as_save_IFS
2488 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2489 $as_echo "PATH: $as_dir"
2490 done
2491IFS=$as_save_IFS
bec39cab 2492
81ecdfbb 2493} >&5
bec39cab 2494
81ecdfbb 2495cat >&5 <<_ACEOF
bec39cab 2496
bec39cab 2497
81ecdfbb
RW
2498## ----------- ##
2499## Core tests. ##
2500## ----------- ##
2501
2502_ACEOF
2503
2504
2505# Keep a trace of the command line.
2506# Strip out --no-create and --no-recursion so they do not pile up.
2507# Strip out --silent because we don't want to record it for future runs.
2508# Also quote any args containing shell meta-characters.
2509# Make two passes to allow for proper duplicate-argument suppression.
2510ac_configure_args=
2511ac_configure_args0=
2512ac_configure_args1=
2513ac_must_keep_next=false
2514for ac_pass in 1 2
2515do
2516 for ac_arg
2517 do
2518 case $ac_arg in
2519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2521 | -silent | --silent | --silen | --sile | --sil)
2522 continue ;;
2523 *\'*)
2524 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2525 esac
2526 case $ac_pass in
2527 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2528 2)
2529 as_fn_append ac_configure_args1 " '$ac_arg'"
2530 if test $ac_must_keep_next = true; then
2531 ac_must_keep_next=false # Got value, back to normal.
2532 else
2533 case $ac_arg in
2534 *=* | --config-cache | -C | -disable-* | --disable-* \
2535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2537 | -with-* | --with-* | -without-* | --without-* | --x)
2538 case "$ac_configure_args0 " in
2539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2540 esac
2541 ;;
2542 -* ) ac_must_keep_next=true ;;
2543 esac
2544 fi
2545 as_fn_append ac_configure_args " '$ac_arg'"
2546 ;;
2547 esac
2548 done
2549done
2550{ ac_configure_args0=; unset ac_configure_args0;}
2551{ ac_configure_args1=; unset ac_configure_args1;}
2552
2553# When interrupted or exit'd, cleanup temporary files, and complete
2554# config.log. We remove comments because anyway the quotes in there
2555# would cause problems or look ugly.
2556# WARNING: Use '\'' to represent an apostrophe within the trap.
2557# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2558trap 'exit_status=$?
2559 # Save into config.log some information that might help in debugging.
2560 {
2561 echo
2562
2563 cat <<\_ASBOX
2564## ---------------- ##
2565## Cache variables. ##
2566## ---------------- ##
2567_ASBOX
2568 echo
2569 # The following way of writing the cache mishandles newlines in values,
2570(
2571 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2572 eval ac_val=\$$ac_var
2573 case $ac_val in #(
2574 *${as_nl}*)
2575 case $ac_var in #(
2576 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2577$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2578 esac
2579 case $ac_var in #(
2580 _ | IFS | as_nl) ;; #(
2581 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2582 *) { eval $ac_var=; unset $ac_var;} ;;
2583 esac ;;
2584 esac
2585 done
2586 (set) 2>&1 |
2587 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2588 *${as_nl}ac_space=\ *)
2589 sed -n \
2590 "s/'\''/'\''\\\\'\'''\''/g;
2591 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2592 ;; #(
2593 *)
2594 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2595 ;;
2596 esac |
2597 sort
2598)
2599 echo
2600
2601 cat <<\_ASBOX
2602## ----------------- ##
2603## Output variables. ##
2604## ----------------- ##
2605_ASBOX
2606 echo
2607 for ac_var in $ac_subst_vars
2608 do
2609 eval ac_val=\$$ac_var
2610 case $ac_val in
2611 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2612 esac
2613 $as_echo "$ac_var='\''$ac_val'\''"
2614 done | sort
2615 echo
2616
2617 if test -n "$ac_subst_files"; then
2618 cat <<\_ASBOX
2619## ------------------- ##
2620## File substitutions. ##
2621## ------------------- ##
2622_ASBOX
2623 echo
2624 for ac_var in $ac_subst_files
2625 do
2626 eval ac_val=\$$ac_var
2627 case $ac_val in
2628 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2629 esac
2630 $as_echo "$ac_var='\''$ac_val'\''"
2631 done | sort
2632 echo
2633 fi
2634
2635 if test -s confdefs.h; then
2636 cat <<\_ASBOX
2637## ----------- ##
2638## confdefs.h. ##
2639## ----------- ##
2640_ASBOX
2641 echo
2642 cat confdefs.h
2643 echo
2644 fi
2645 test "$ac_signal" != 0 &&
2646 $as_echo "$as_me: caught signal $ac_signal"
2647 $as_echo "$as_me: exit $exit_status"
2648 } >&5
2649 rm -f core *.core core.conftest.* &&
2650 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2651 exit $exit_status
2652' 0
2653for ac_signal in 1 2 13 15; do
2654 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2655done
2656ac_signal=0
2657
2658# confdefs.h avoids OS command line length limits that DEFS can exceed.
2659rm -f -r conftest* confdefs.h
2660
2661$as_echo "/* confdefs.h */" > confdefs.h
2662
2663# Predefined preprocessor variables.
2664
2665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_NAME "$PACKAGE_NAME"
2667_ACEOF
2668
2669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2671_ACEOF
2672
2673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_VERSION "$PACKAGE_VERSION"
2675_ACEOF
2676
2677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_STRING "$PACKAGE_STRING"
2679_ACEOF
2680
2681cat >>confdefs.h <<_ACEOF
2682#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2683_ACEOF
2684
2685cat >>confdefs.h <<_ACEOF
2686#define PACKAGE_URL "$PACKAGE_URL"
2687_ACEOF
2688
2689
2690# Let the site file select an alternate cache file if it wants to.
2691# Prefer an explicitly selected file to automatically selected ones.
2692ac_site_file1=NONE
2693ac_site_file2=NONE
2694if test -n "$CONFIG_SITE"; then
2695 ac_site_file1=$CONFIG_SITE
2696elif test "x$prefix" != xNONE; then
2697 ac_site_file1=$prefix/share/config.site
2698 ac_site_file2=$prefix/etc/config.site
2699else
2700 ac_site_file1=$ac_default_prefix/share/config.site
2701 ac_site_file2=$ac_default_prefix/etc/config.site
2702fi
2703for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2704do
2705 test "x$ac_site_file" = xNONE && continue
2706 if test -r "$ac_site_file"; then
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2708$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2709 sed 's/^/| /' "$ac_site_file" >&5
2710 . "$ac_site_file"
2711 fi
2712done
2713
2714if test -r "$cache_file"; then
2715 # Some versions of bash will fail to source /dev/null (special
2716 # files actually), so we avoid doing that.
2717 if test -f "$cache_file"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2719$as_echo "$as_me: loading cache $cache_file" >&6;}
2720 case $cache_file in
2721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2722 *) . "./$cache_file";;
2723 esac
2724 fi
2725else
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2727$as_echo "$as_me: creating cache $cache_file" >&6;}
2728 >$cache_file
bec39cab
AC
2729fi
2730
81ecdfbb
RW
2731# Check that the precious variables saved in the cache have kept the same
2732# value.
2733ac_cache_corrupted=false
2734for ac_var in $ac_precious_vars; do
2735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2736 eval ac_new_set=\$ac_env_${ac_var}_set
2737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2738 eval ac_new_val=\$ac_env_${ac_var}_value
2739 case $ac_old_set,$ac_new_set in
2740 set,)
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2742$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2743 ac_cache_corrupted=: ;;
2744 ,set)
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2746$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2747 ac_cache_corrupted=: ;;
2748 ,);;
2749 *)
2750 if test "x$ac_old_val" != "x$ac_new_val"; then
2751 # differences in whitespace do not lead to failure.
2752 ac_old_val_w=`echo x $ac_old_val`
2753 ac_new_val_w=`echo x $ac_new_val`
2754 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2756$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2757 ac_cache_corrupted=:
2758 else
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2760$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2761 eval $ac_var=\$ac_old_val
2762 fi
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2764$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2766$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2767 fi;;
2768 esac
2769 # Pass precious variables to config.status.
2770 if test "$ac_new_set" = set; then
2771 case $ac_new_val in
2772 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2773 *) ac_arg=$ac_var=$ac_new_val ;;
2774 esac
2775 case " $ac_configure_args " in
2776 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2777 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2778 esac
2779 fi
2780done
2781if $ac_cache_corrupted; then
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2785$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2786 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2787fi
2788## -------------------- ##
2789## Main body of script. ##
2790## -------------------- ##
2791
2792ac_ext=c
2793ac_cpp='$CPP $CPPFLAGS'
2794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2796ac_compiler_gnu=$ac_cv_c_compiler_gnu
2797
2798
2799
2800
2801
2802ac_config_headers="$ac_config_headers config.h:config.in"
2803
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2806$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2807 # Check whether --enable-maintainer-mode was given.
2808if test "${enable_maintainer_mode+set}" = set; then :
2809 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2810else
2811 USE_MAINTAINER_MODE=no
2812fi
2813
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2815$as_echo "$USE_MAINTAINER_MODE" >&6; }
2816 if test $USE_MAINTAINER_MODE = yes; then
2817 MAINTAINER_MODE_TRUE=
2818 MAINTAINER_MODE_FALSE='#'
2819else
2820 MAINTAINER_MODE_TRUE='#'
2821 MAINTAINER_MODE_FALSE=
2822fi
2823
2824 MAINT=$MAINTAINER_MODE_TRUE
2825
2826
2827
17ef446e 2828# Set the 'development' global.
270c9937 2829. $srcdir/../bfd/development.sh
f5f1cdb6 2830
81ecdfbb
RW
2831ac_ext=c
2832ac_cpp='$CPP $CPPFLAGS'
2833ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2834ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2835ac_compiler_gnu=$ac_cv_c_compiler_gnu
2836if test -n "$ac_tool_prefix"; then
2837 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2838set dummy ${ac_tool_prefix}gcc; ac_word=$2
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2840$as_echo_n "checking for $ac_word... " >&6; }
2841if test "${ac_cv_prog_CC+set}" = set; then :
2842 $as_echo_n "(cached) " >&6
c906108c
SS
2843else
2844 if test -n "$CC"; then
2845 ac_cv_prog_CC="$CC" # Let the user override the test.
2846else
bec39cab
AC
2847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2848for as_dir in $PATH
2849do
2850 IFS=$as_save_IFS
2851 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2852 for ac_exec_ext in '' $ac_executable_extensions; do
2853 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2854 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2856 break 2
2857 fi
2858done
81ecdfbb
RW
2859 done
2860IFS=$as_save_IFS
bec39cab 2861
c906108c
SS
2862fi
2863fi
bec39cab 2864CC=$ac_cv_prog_CC
c906108c 2865if test -n "$CC"; then
81ecdfbb
RW
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2867$as_echo "$CC" >&6; }
c906108c 2868else
81ecdfbb
RW
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2870$as_echo "no" >&6; }
c906108c
SS
2871fi
2872
81ecdfbb 2873
b4e70030
JB
2874fi
2875if test -z "$ac_cv_prog_CC"; then
2876 ac_ct_CC=$CC
81ecdfbb
RW
2877 # Extract the first word of "gcc", so it can be a program name with args.
2878set dummy gcc; ac_word=$2
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2880$as_echo_n "checking for $ac_word... " >&6; }
2881if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2882 $as_echo_n "(cached) " >&6
b4e70030
JB
2883else
2884 if test -n "$ac_ct_CC"; then
2885 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2886else
2887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2888for as_dir in $PATH
2889do
2890 IFS=$as_save_IFS
2891 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2892 for ac_exec_ext in '' $ac_executable_extensions; do
2893 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2894 ac_cv_prog_ac_ct_CC="gcc"
2895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2896 break 2
4e8d927d 2897 fi
b4e70030 2898done
81ecdfbb
RW
2899 done
2900IFS=$as_save_IFS
b4e70030
JB
2901
2902fi
2903fi
2904ac_ct_CC=$ac_cv_prog_ac_ct_CC
2905if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2907$as_echo "$ac_ct_CC" >&6; }
b4e70030 2908else
81ecdfbb
RW
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2910$as_echo "no" >&6; }
b4e70030
JB
2911fi
2912
81ecdfbb
RW
2913 if test "x$ac_ct_CC" = x; then
2914 CC=""
2915 else
2916 case $cross_compiling:$ac_tool_warned in
2917yes:)
2918{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2919$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2920ac_tool_warned=yes ;;
2921esac
2922 CC=$ac_ct_CC
2923 fi
b4e70030
JB
2924else
2925 CC="$ac_cv_prog_CC"
2926fi
2927
c906108c 2928if test -z "$CC"; then
81ecdfbb
RW
2929 if test -n "$ac_tool_prefix"; then
2930 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2931set dummy ${ac_tool_prefix}cc; ac_word=$2
2932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2933$as_echo_n "checking for $ac_word... " >&6; }
2934if test "${ac_cv_prog_CC+set}" = set; then :
2935 $as_echo_n "(cached) " >&6
c906108c
SS
2936else
2937 if test -n "$CC"; then
2938 ac_cv_prog_CC="$CC" # Let the user override the test.
2939else
bec39cab
AC
2940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2941for as_dir in $PATH
2942do
2943 IFS=$as_save_IFS
2944 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2945 for ac_exec_ext in '' $ac_executable_extensions; do
2946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2947 ac_cv_prog_CC="${ac_tool_prefix}cc"
2948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2949 break 2
2950 fi
2951done
81ecdfbb
RW
2952 done
2953IFS=$as_save_IFS
2954
2955fi
2956fi
2957CC=$ac_cv_prog_CC
2958if test -n "$CC"; then
2959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2960$as_echo "$CC" >&6; }
2961else
2962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2963$as_echo "no" >&6; }
2964fi
2965
2966
2967 fi
2968fi
2969if test -z "$CC"; then
2970 # Extract the first word of "cc", so it can be a program name with args.
2971set dummy cc; ac_word=$2
2972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2973$as_echo_n "checking for $ac_word... " >&6; }
2974if test "${ac_cv_prog_CC+set}" = set; then :
2975 $as_echo_n "(cached) " >&6
2976else
2977 if test -n "$CC"; then
2978 ac_cv_prog_CC="$CC" # Let the user override the test.
2979else
2980 ac_prog_rejected=no
2981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2982for as_dir in $PATH
2983do
2984 IFS=$as_save_IFS
2985 test -z "$as_dir" && as_dir=.
2986 for ac_exec_ext in '' $ac_executable_extensions; do
2987 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2988 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2989 ac_prog_rejected=yes
2990 continue
2991 fi
2992 ac_cv_prog_CC="cc"
2993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2994 break 2
2995 fi
2996done
2997 done
2998IFS=$as_save_IFS
bec39cab 2999
c906108c
SS
3000if test $ac_prog_rejected = yes; then
3001 # We found a bogon in the path, so make sure we never use it.
3002 set dummy $ac_cv_prog_CC
3003 shift
bec39cab 3004 if test $# != 0; then
c906108c
SS
3005 # We chose a different compiler from the bogus one.
3006 # However, it has the same basename, so the bogon will be chosen
3007 # first if we set CC to just the basename; use the full file name.
3008 shift
bec39cab 3009 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3010 fi
3011fi
3012fi
3013fi
bec39cab 3014CC=$ac_cv_prog_CC
c906108c 3015if test -n "$CC"; then
81ecdfbb
RW
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017$as_echo "$CC" >&6; }
c906108c 3018else
81ecdfbb
RW
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020$as_echo "no" >&6; }
c906108c
SS
3021fi
3022
81ecdfbb 3023
bec39cab
AC
3024fi
3025if test -z "$CC"; then
3026 if test -n "$ac_tool_prefix"; then
81ecdfbb 3027 for ac_prog in cl.exe
bec39cab
AC
3028 do
3029 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3032$as_echo_n "checking for $ac_word... " >&6; }
3033if test "${ac_cv_prog_CC+set}" = set; then :
3034 $as_echo_n "(cached) " >&6
c906108c
SS
3035else
3036 if test -n "$CC"; then
3037 ac_cv_prog_CC="$CC" # Let the user override the test.
3038else
bec39cab
AC
3039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040for as_dir in $PATH
3041do
3042 IFS=$as_save_IFS
3043 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3044 for ac_exec_ext in '' $ac_executable_extensions; do
3045 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3046 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3048 break 2
3049 fi
3050done
81ecdfbb
RW
3051 done
3052IFS=$as_save_IFS
bec39cab 3053
c906108c
SS
3054fi
3055fi
bec39cab 3056CC=$ac_cv_prog_CC
c906108c 3057if test -n "$CC"; then
81ecdfbb
RW
3058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3059$as_echo "$CC" >&6; }
c906108c 3060else
81ecdfbb
RW
3061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
c906108c 3063fi
bec39cab 3064
81ecdfbb 3065
bec39cab
AC
3066 test -n "$CC" && break
3067 done
3068fi
3069if test -z "$CC"; then
3070 ac_ct_CC=$CC
81ecdfbb 3071 for ac_prog in cl.exe
bec39cab
AC
3072do
3073 # Extract the first word of "$ac_prog", so it can be a program name with args.
3074set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3076$as_echo_n "checking for $ac_word... " >&6; }
3077if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3078 $as_echo_n "(cached) " >&6
bec39cab
AC
3079else
3080 if test -n "$ac_ct_CC"; then
3081 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3082else
3083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3084for as_dir in $PATH
3085do
3086 IFS=$as_save_IFS
3087 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3088 for ac_exec_ext in '' $ac_executable_extensions; do
3089 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3090 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3092 break 2
c906108c 3093 fi
bec39cab 3094done
81ecdfbb
RW
3095 done
3096IFS=$as_save_IFS
bec39cab
AC
3097
3098fi
3099fi
3100ac_ct_CC=$ac_cv_prog_ac_ct_CC
3101if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3103$as_echo "$ac_ct_CC" >&6; }
bec39cab 3104else
81ecdfbb
RW
3105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
c906108c
SS
3107fi
3108
81ecdfbb 3109
bec39cab
AC
3110 test -n "$ac_ct_CC" && break
3111done
c906108c 3112
81ecdfbb
RW
3113 if test "x$ac_ct_CC" = x; then
3114 CC=""
3115 else
3116 case $cross_compiling:$ac_tool_warned in
3117yes:)
3118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3120ac_tool_warned=yes ;;
3121esac
3122 CC=$ac_ct_CC
3123 fi
bec39cab
AC
3124fi
3125
3126fi
3127
3128
81ecdfbb
RW
3129test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3131as_fn_error "no acceptable C compiler found in \$PATH
3132See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3133
3134# Provide some information about the compiler.
81ecdfbb
RW
3135$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3136set X $ac_compile
3137ac_compiler=$2
3138for ac_option in --version -v -V -qversion; do
3139 { { ac_try="$ac_compiler $ac_option >&5"
3140case "(($ac_try" in
3141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3142 *) ac_try_echo=$ac_try;;
3143esac
3144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3145$as_echo "$ac_try_echo"; } >&5
3146 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3147 ac_status=$?
81ecdfbb
RW
3148 if test -s conftest.err; then
3149 sed '10a\
3150... rest of stderr output deleted ...
3151 10q' conftest.err >conftest.er1
3152 cat conftest.er1 >&5
3153 rm -f conftest.er1 conftest.err
3154 fi
3155 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3156 test $ac_status = 0; }
3157done
bec39cab 3158
81ecdfbb 3159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3160/* end confdefs.h. */
3161
3162int
3163main ()
3164{
3165
3166 ;
3167 return 0;
3168}
3169_ACEOF
3170ac_clean_files_save=$ac_clean_files
81ecdfbb 3171ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3172# Try to create an executable without -o first, disregard a.out.
3173# It will help us diagnose broken compilers, and finding out an intuition
3174# of exeext.
81ecdfbb
RW
3175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3176$as_echo_n "checking for C compiler default output file name... " >&6; }
3177ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3178
3179# The possible output files:
3180ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3181
3182ac_rmfiles=
3183for ac_file in $ac_files
3184do
3185 case $ac_file in
3186 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3187 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3188 esac
3189done
3190rm -f $ac_rmfiles
3191
3192if { { ac_try="$ac_link_default"
3193case "(($ac_try" in
3194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3195 *) ac_try_echo=$ac_try;;
3196esac
3197eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3198$as_echo "$ac_try_echo"; } >&5
3199 (eval "$ac_link_default") 2>&5
3200 ac_status=$?
3201 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3202 test $ac_status = 0; }; then :
3203 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3204# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3205# in a Makefile. We should not override ac_cv_exeext if it was cached,
3206# so that the user can short-circuit this test for compilers unknown to
3207# Autoconf.
3208for ac_file in $ac_files ''
bec39cab
AC
3209do
3210 test -f "$ac_file" || continue
3211 case $ac_file in
81ecdfbb 3212 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3213 ;;
3214 [ab].out )
3215 # We found the default executable, but exeext='' is most
3216 # certainly right.
3217 break;;
3218 *.* )
81ecdfbb
RW
3219 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3220 then :; else
3221 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3222 fi
3223 # We set ac_cv_exeext here because the later test for it is not
3224 # safe: cross compilers may not add the suffix if given an `-o'
3225 # argument, so we may need to know it at that point already.
3226 # Even if this section looks crufty: it has the advantage of
3227 # actually working.
b4e70030
JB
3228 break;;
3229 * )
3230 break;;
bec39cab
AC
3231 esac
3232done
81ecdfbb
RW
3233test "$ac_cv_exeext" = no && ac_cv_exeext=
3234
bec39cab 3235else
81ecdfbb
RW
3236 ac_file=''
3237fi
3238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3239$as_echo "$ac_file" >&6; }
3240if test -z "$ac_file"; then :
3241 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3242sed 's/^/| /' conftest.$ac_ext >&5
3243
81ecdfbb
RW
3244{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3246{ as_fn_set_status 77
3247as_fn_error "C compiler cannot create executables
3248See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3249fi
b4e70030 3250ac_exeext=$ac_cv_exeext
b4e70030 3251
81ecdfbb 3252# Check that the compiler produces executables we can run. If not, either
bec39cab 3253# the compiler is broken, or we cross compile.
81ecdfbb
RW
3254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3255$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3256# If not cross compiling, check that we can run a simple program.
3257if test "$cross_compiling" != yes; then
3258 if { ac_try='./$ac_file'
81ecdfbb
RW
3259 { { case "(($ac_try" in
3260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3261 *) ac_try_echo=$ac_try;;
3262esac
3263eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3264$as_echo "$ac_try_echo"; } >&5
3265 (eval "$ac_try") 2>&5
bec39cab 3266 ac_status=$?
81ecdfbb
RW
3267 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3268 test $ac_status = 0; }; }; then
bec39cab 3269 cross_compiling=no
c906108c 3270 else
bec39cab
AC
3271 if test "$cross_compiling" = maybe; then
3272 cross_compiling=yes
3273 else
81ecdfbb
RW
3274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3276as_fn_error "cannot run C compiled programs.
bec39cab 3277If you meant to cross compile, use \`--host'.
81ecdfbb 3278See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3279 fi
c906108c 3280 fi
bec39cab 3281fi
81ecdfbb
RW
3282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3283$as_echo "yes" >&6; }
bec39cab 3284
81ecdfbb 3285rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3286ac_clean_files=$ac_clean_files_save
81ecdfbb 3287# Check that the compiler produces executables we can run. If not, either
b4e70030 3288# the compiler is broken, or we cross compile.
81ecdfbb
RW
3289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3290$as_echo_n "checking whether we are cross compiling... " >&6; }
3291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3292$as_echo "$cross_compiling" >&6; }
3293
3294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3295$as_echo_n "checking for suffix of executables... " >&6; }
3296if { { ac_try="$ac_link"
3297case "(($ac_try" in
3298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3299 *) ac_try_echo=$ac_try;;
3300esac
3301eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3302$as_echo "$ac_try_echo"; } >&5
3303 (eval "$ac_link") 2>&5
bec39cab 3304 ac_status=$?
81ecdfbb
RW
3305 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3306 test $ac_status = 0; }; then :
b4e70030
JB
3307 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3308# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3309# work properly (i.e., refer to `conftest.exe'), while it won't with
3310# `rm'.
3311for ac_file in conftest.exe conftest conftest.*; do
3312 test -f "$ac_file" || continue
3313 case $ac_file in
81ecdfbb 3314 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3315 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3316 break;;
3317 * ) break;;
3318 esac
3319done
c906108c 3320else
81ecdfbb
RW
3321 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3322$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3323as_fn_error "cannot compute suffix of executables: cannot compile and link
3324See \`config.log' for more details." "$LINENO" 5; }
c906108c 3325fi
b4e70030 3326rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3328$as_echo "$ac_cv_exeext" >&6; }
c906108c 3329
b4e70030 3330rm -f conftest.$ac_ext
bec39cab
AC
3331EXEEXT=$ac_cv_exeext
3332ac_exeext=$EXEEXT
81ecdfbb
RW
3333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3334$as_echo_n "checking for suffix of object files... " >&6; }
3335if test "${ac_cv_objext+set}" = set; then :
3336 $as_echo_n "(cached) " >&6
bec39cab 3337else
81ecdfbb 3338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3339/* end confdefs.h. */
3340
3341int
3342main ()
3343{
3344
3345 ;
3346 return 0;
3347}
3348_ACEOF
3349rm -f conftest.o conftest.obj
81ecdfbb
RW
3350if { { ac_try="$ac_compile"
3351case "(($ac_try" in
3352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3353 *) ac_try_echo=$ac_try;;
3354esac
3355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3356$as_echo "$ac_try_echo"; } >&5
3357 (eval "$ac_compile") 2>&5
3358 ac_status=$?
3359 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3360 test $ac_status = 0; }; then :
3361 for ac_file in conftest.o conftest.obj conftest.*; do
3362 test -f "$ac_file" || continue;
bec39cab 3363 case $ac_file in
81ecdfbb 3364 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3365 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3366 break;;
3367 esac
3368done
c906108c 3369else
81ecdfbb 3370 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3371sed 's/^/| /' conftest.$ac_ext >&5
3372
81ecdfbb
RW
3373{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3375as_fn_error "cannot compute suffix of object files: cannot compile
3376See \`config.log' for more details." "$LINENO" 5; }
c906108c 3377fi
b4e70030 3378rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3379fi
81ecdfbb
RW
3380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3381$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3382OBJEXT=$ac_cv_objext
3383ac_objext=$OBJEXT
81ecdfbb
RW
3384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3385$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3386if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3387 $as_echo_n "(cached) " >&6
c906108c 3388else
81ecdfbb 3389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3390/* end confdefs.h. */
3391
3392int
3393main ()
3394{
3395#ifndef __GNUC__
3396 choke me
3397#endif
3398
3399 ;
3400 return 0;
3401}
3402_ACEOF
81ecdfbb 3403if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3404 ac_compiler_gnu=yes
3405else
81ecdfbb 3406 ac_compiler_gnu=no
bec39cab 3407fi
81ecdfbb 3408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3409ac_cv_c_compiler_gnu=$ac_compiler_gnu
3410
3411fi
81ecdfbb
RW
3412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3413$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3414if test $ac_compiler_gnu = yes; then
3415 GCC=yes
3416else
3417 GCC=
3418fi
bec39cab
AC
3419ac_test_CFLAGS=${CFLAGS+set}
3420ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3422$as_echo_n "checking whether $CC accepts -g... " >&6; }
3423if test "${ac_cv_prog_cc_g+set}" = set; then :
3424 $as_echo_n "(cached) " >&6
bec39cab 3425else
81ecdfbb
RW
3426 ac_save_c_werror_flag=$ac_c_werror_flag
3427 ac_c_werror_flag=yes
3428 ac_cv_prog_cc_g=no
3429 CFLAGS="-g"
3430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3431/* end confdefs.h. */
3432
3433int
3434main ()
3435{
3436
3437 ;
3438 return 0;
3439}
3440_ACEOF
81ecdfbb 3441if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3442 ac_cv_prog_cc_g=yes
3443else
81ecdfbb
RW
3444 CFLAGS=""
3445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3446/* end confdefs.h. */
3447
3448int
3449main ()
3450{
3451
3452 ;
3453 return 0;
3454}
3455_ACEOF
3456if ac_fn_c_try_compile "$LINENO"; then :
3457
3458else
3459 ac_c_werror_flag=$ac_save_c_werror_flag
3460 CFLAGS="-g"
3461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3462/* end confdefs.h. */
3463
3464int
3465main ()
3466{
c906108c 3467
81ecdfbb
RW
3468 ;
3469 return 0;
3470}
3471_ACEOF
3472if ac_fn_c_try_compile "$LINENO"; then :
3473 ac_cv_prog_cc_g=yes
3474fi
3475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3476fi
3477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3478fi
81ecdfbb
RW
3479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3480 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3481fi
81ecdfbb
RW
3482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3483$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3484if test "$ac_test_CFLAGS" = set; then
bec39cab 3485 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3486elif test $ac_cv_prog_cc_g = yes; then
3487 if test "$GCC" = yes; then
3488 CFLAGS="-g -O2"
3489 else
3490 CFLAGS="-g"
3491 fi
3492else
3493 if test "$GCC" = yes; then
3494 CFLAGS="-O2"
3495 else
3496 CFLAGS=
3497 fi
3498fi
81ecdfbb
RW
3499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3500$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3501if test "${ac_cv_prog_cc_c89+set}" = set; then :
3502 $as_echo_n "(cached) " >&6
bec39cab 3503else
81ecdfbb 3504 ac_cv_prog_cc_c89=no
bec39cab 3505ac_save_CC=$CC
81ecdfbb 3506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3507/* end confdefs.h. */
c906108c
SS
3508#include <stdarg.h>
3509#include <stdio.h>
3510#include <sys/types.h>
3511#include <sys/stat.h>
3512/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3513struct buf { int x; };
3514FILE * (*rcsopen) (struct buf *, struct stat *, int);
3515static char *e (p, i)
3516 char **p;
3517 int i;
3518{
3519 return p[i];
3520}
3521static char *f (char * (*g) (char **, int), char **p, ...)
3522{
3523 char *s;
3524 va_list v;
3525 va_start (v,p);
3526 s = g (p, va_arg (v,int));
3527 va_end (v);
3528 return s;
3529}
bec39cab
AC
3530
3531/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3532 function prototypes and stuff, but not '\xHH' hex character constants.
3533 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3534 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3535 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3536 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3537 that's true only with -std. */
bec39cab
AC
3538int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3539
81ecdfbb
RW
3540/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3541 inside strings and character constants. */
3542#define FOO(x) 'x'
3543int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3544
c906108c
SS
3545int test (int i, double x);
3546struct s1 {int (*f) (int a);};
3547struct s2 {int (*f) (double a);};
3548int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3549int argc;
3550char **argv;
bec39cab
AC
3551int
3552main ()
3553{
c906108c 3554return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3555 ;
3556 return 0;
3557}
3558_ACEOF
81ecdfbb
RW
3559for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3560 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3561do
3562 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3563 if ac_fn_c_try_compile "$LINENO"; then :
3564 ac_cv_prog_cc_c89=$ac_arg
c906108c 3565fi
81ecdfbb
RW
3566rm -f core conftest.err conftest.$ac_objext
3567 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3568done
81ecdfbb 3569rm -f conftest.$ac_ext
bec39cab 3570CC=$ac_save_CC
c906108c
SS
3571
3572fi
81ecdfbb
RW
3573# AC_CACHE_VAL
3574case "x$ac_cv_prog_cc_c89" in
3575 x)
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3577$as_echo "none needed" >&6; } ;;
3578 xno)
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3580$as_echo "unsupported" >&6; } ;;
bec39cab 3581 *)
81ecdfbb
RW
3582 CC="$CC $ac_cv_prog_cc_c89"
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3584$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3585esac
81ecdfbb 3586if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3587
b4e70030
JB
3588fi
3589
bec39cab
AC
3590ac_ext=c
3591ac_cpp='$CPP $CPPFLAGS'
3592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3595
3bc3d82a
PA
3596ac_ext=cpp
3597ac_cpp='$CXXCPP $CPPFLAGS'
3598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3601if test -z "$CXX"; then
3602 if test -n "$CCC"; then
3603 CXX=$CCC
3604 else
3605 if test -n "$ac_tool_prefix"; then
3606 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3607 do
3608 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3609set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3611$as_echo_n "checking for $ac_word... " >&6; }
3612if test "${ac_cv_prog_CXX+set}" = set; then :
3613 $as_echo_n "(cached) " >&6
3614else
3615 if test -n "$CXX"; then
3616 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3617else
3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619for as_dir in $PATH
3620do
3621 IFS=$as_save_IFS
3622 test -z "$as_dir" && as_dir=.
3623 for ac_exec_ext in '' $ac_executable_extensions; do
3624 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3625 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3627 break 2
3628 fi
3629done
3630 done
3631IFS=$as_save_IFS
3632
3633fi
3634fi
3635CXX=$ac_cv_prog_CXX
3636if test -n "$CXX"; then
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3638$as_echo "$CXX" >&6; }
3639else
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3641$as_echo "no" >&6; }
3642fi
3643
3644
3645 test -n "$CXX" && break
3646 done
3647fi
3648if test -z "$CXX"; then
3649 ac_ct_CXX=$CXX
3650 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3651do
3652 # Extract the first word of "$ac_prog", so it can be a program name with args.
3653set dummy $ac_prog; ac_word=$2
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3655$as_echo_n "checking for $ac_word... " >&6; }
3656if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3657 $as_echo_n "(cached) " >&6
3658else
3659 if test -n "$ac_ct_CXX"; then
3660 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3661else
3662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3663for as_dir in $PATH
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
3667 for ac_exec_ext in '' $ac_executable_extensions; do
3668 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3669 ac_cv_prog_ac_ct_CXX="$ac_prog"
3670 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3671 break 2
3672 fi
3673done
3674 done
3675IFS=$as_save_IFS
3676
3677fi
3678fi
3679ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3680if test -n "$ac_ct_CXX"; then
3681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3682$as_echo "$ac_ct_CXX" >&6; }
3683else
3684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3685$as_echo "no" >&6; }
3686fi
3687
3688
3689 test -n "$ac_ct_CXX" && break
3690done
3691
3692 if test "x$ac_ct_CXX" = x; then
3693 CXX="g++"
3694 else
3695 case $cross_compiling:$ac_tool_warned in
3696yes:)
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3699ac_tool_warned=yes ;;
3700esac
3701 CXX=$ac_ct_CXX
3702 fi
3703fi
3704
3705 fi
3706fi
3707# Provide some information about the compiler.
3708$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3709set X $ac_compile
3710ac_compiler=$2
3711for ac_option in --version -v -V -qversion; do
3712 { { ac_try="$ac_compiler $ac_option >&5"
3713case "(($ac_try" in
3714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3715 *) ac_try_echo=$ac_try;;
3716esac
3717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3718$as_echo "$ac_try_echo"; } >&5
3719 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3720 ac_status=$?
3721 if test -s conftest.err; then
3722 sed '10a\
3723... rest of stderr output deleted ...
3724 10q' conftest.err >conftest.er1
3725 cat conftest.er1 >&5
3726 rm -f conftest.er1 conftest.err
3727 fi
3728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3729 test $ac_status = 0; }
3730done
3731
3732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3733$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3734if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3735 $as_echo_n "(cached) " >&6
3736else
3737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3738/* end confdefs.h. */
3739
3740int
3741main ()
3742{
3743#ifndef __GNUC__
3744 choke me
3745#endif
3746
3747 ;
3748 return 0;
3749}
3750_ACEOF
3751if ac_fn_cxx_try_compile "$LINENO"; then :
3752 ac_compiler_gnu=yes
3753else
3754 ac_compiler_gnu=no
3755fi
3756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3757ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3758
3759fi
3760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3761$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3762if test $ac_compiler_gnu = yes; then
3763 GXX=yes
3764else
3765 GXX=
3766fi
3767ac_test_CXXFLAGS=${CXXFLAGS+set}
3768ac_save_CXXFLAGS=$CXXFLAGS
3769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3770$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3771if test "${ac_cv_prog_cxx_g+set}" = set; then :
3772 $as_echo_n "(cached) " >&6
3773else
3774 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3775 ac_cxx_werror_flag=yes
3776 ac_cv_prog_cxx_g=no
3777 CXXFLAGS="-g"
3778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3779/* end confdefs.h. */
3780
3781int
3782main ()
3783{
3784
3785 ;
3786 return 0;
3787}
3788_ACEOF
3789if ac_fn_cxx_try_compile "$LINENO"; then :
3790 ac_cv_prog_cxx_g=yes
3791else
3792 CXXFLAGS=""
3793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3794/* end confdefs.h. */
3795
3796int
3797main ()
3798{
3799
3800 ;
3801 return 0;
3802}
3803_ACEOF
3804if ac_fn_cxx_try_compile "$LINENO"; then :
3805
3806else
3807 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3808 CXXFLAGS="-g"
3809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3810/* end confdefs.h. */
3811
3812int
3813main ()
3814{
3815
3816 ;
3817 return 0;
3818}
3819_ACEOF
3820if ac_fn_cxx_try_compile "$LINENO"; then :
3821 ac_cv_prog_cxx_g=yes
3822fi
3823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3824fi
3825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3826fi
3827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3828 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3829fi
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3831$as_echo "$ac_cv_prog_cxx_g" >&6; }
3832if test "$ac_test_CXXFLAGS" = set; then
3833 CXXFLAGS=$ac_save_CXXFLAGS
3834elif test $ac_cv_prog_cxx_g = yes; then
3835 if test "$GXX" = yes; then
3836 CXXFLAGS="-g -O2"
3837 else
3838 CXXFLAGS="-g"
3839 fi
3840else
3841 if test "$GXX" = yes; then
3842 CXXFLAGS="-O2"
3843 else
3844 CXXFLAGS=
3845 fi
3846fi
3847ac_ext=c
3848ac_cpp='$CPP $CPPFLAGS'
3849ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3850ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3851ac_compiler_gnu=$ac_cv_c_compiler_gnu
3852
3853
60ca704f 3854
bec39cab
AC
3855ac_ext=c
3856ac_cpp='$CPP $CPPFLAGS'
3857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3859ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3861$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3862# On Suns, sometimes $CPP names a directory.
3863if test -n "$CPP" && test -d "$CPP"; then
3864 CPP=
8bb2c122 3865fi
bec39cab 3866if test -z "$CPP"; then
81ecdfbb
RW
3867 if test "${ac_cv_prog_CPP+set}" = set; then :
3868 $as_echo_n "(cached) " >&6
bec39cab
AC
3869else
3870 # Double quotes because CPP needs to be expanded
3871 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3872 do
3873 ac_preproc_ok=false
3874for ac_c_preproc_warn_flag in '' yes
3875do
3876 # Use a header file that comes with gcc, so configuring glibc
3877 # with a fresh cross-compiler works.
3878 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3879 # <limits.h> exists even on freestanding compilers.
3880 # On the NeXT, cc -E runs the code through the compiler's parser,
3881 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3883/* end confdefs.h. */
3884#ifdef __STDC__
3885# include <limits.h>
3886#else
3887# include <assert.h>
3888#endif
3889 Syntax error
3890_ACEOF
81ecdfbb 3891if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3892
81ecdfbb 3893else
bec39cab
AC
3894 # Broken: fails on valid input.
3895continue
3896fi
3897rm -f conftest.err conftest.$ac_ext
3898
81ecdfbb 3899 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3900 # can be detected and how.
81ecdfbb 3901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3902/* end confdefs.h. */
3903#include <ac_nonexistent.h>
3904_ACEOF
81ecdfbb 3905if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3906 # Broken: success on invalid input.
3907continue
8bb2c122 3908else
bec39cab
AC
3909 # Passes both tests.
3910ac_preproc_ok=:
3911break
8bb2c122 3912fi
bec39cab 3913rm -f conftest.err conftest.$ac_ext
8bb2c122 3914
bec39cab
AC
3915done
3916# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3917rm -f conftest.err conftest.$ac_ext
81ecdfbb 3918if $ac_preproc_ok; then :
bec39cab
AC
3919 break
3920fi
8bb2c122 3921
bec39cab
AC
3922 done
3923 ac_cv_prog_CPP=$CPP
ddc9cd0f 3924
c906108c 3925fi
bec39cab
AC
3926 CPP=$ac_cv_prog_CPP
3927else
3928 ac_cv_prog_CPP=$CPP
c906108c 3929fi
81ecdfbb
RW
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3931$as_echo "$CPP" >&6; }
bec39cab
AC
3932ac_preproc_ok=false
3933for ac_c_preproc_warn_flag in '' yes
3934do
3935 # Use a header file that comes with gcc, so configuring glibc
3936 # with a fresh cross-compiler works.
3937 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3938 # <limits.h> exists even on freestanding compilers.
3939 # On the NeXT, cc -E runs the code through the compiler's parser,
3940 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3942/* end confdefs.h. */
3943#ifdef __STDC__
3944# include <limits.h>
3945#else
3946# include <assert.h>
3947#endif
3948 Syntax error
3949_ACEOF
81ecdfbb 3950if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3951
81ecdfbb 3952else
bec39cab
AC
3953 # Broken: fails on valid input.
3954continue
3955fi
3956rm -f conftest.err conftest.$ac_ext
3957
81ecdfbb 3958 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3959 # can be detected and how.
81ecdfbb 3960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3961/* end confdefs.h. */
3962#include <ac_nonexistent.h>
3963_ACEOF
81ecdfbb 3964if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3965 # Broken: success on invalid input.
3966continue
c906108c 3967else
bec39cab
AC
3968 # Passes both tests.
3969ac_preproc_ok=:
3970break
c906108c 3971fi
bec39cab 3972rm -f conftest.err conftest.$ac_ext
c906108c 3973
bec39cab
AC
3974done
3975# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3976rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3977if $ac_preproc_ok; then :
3978
c906108c 3979else
81ecdfbb
RW
3980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3982as_fn_error "C preprocessor \"$CPP\" fails sanity check
3983See \`config.log' for more details." "$LINENO" 5; }
c906108c 3984fi
c906108c 3985
bec39cab
AC
3986ac_ext=c
3987ac_cpp='$CPP $CPPFLAGS'
3988ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3989ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3990ac_compiler_gnu=$ac_cv_c_compiler_gnu
3991
3992
81ecdfbb
RW
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3994$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3995if test "${ac_cv_path_GREP+set}" = set; then :
3996 $as_echo_n "(cached) " >&6
4e8d927d 3997else
81ecdfbb
RW
3998 if test -z "$GREP"; then
3999 ac_path_GREP_found=false
4000 # Loop through the user's path and test for each of PROGNAME-LIST
4001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4002for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4003do
4004 IFS=$as_save_IFS
4005 test -z "$as_dir" && as_dir=.
4006 for ac_prog in grep ggrep; do
4007 for ac_exec_ext in '' $ac_executable_extensions; do
4008 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4009 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4010# Check for GNU ac_path_GREP and select it if it is found.
4011 # Check for GNU $ac_path_GREP
4012case `"$ac_path_GREP" --version 2>&1` in
4013*GNU*)
4014 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4015*)
4016 ac_count=0
4017 $as_echo_n 0123456789 >"conftest.in"
4018 while :
4019 do
4020 cat "conftest.in" "conftest.in" >"conftest.tmp"
4021 mv "conftest.tmp" "conftest.in"
4022 cp "conftest.in" "conftest.nl"
4023 $as_echo 'GREP' >> "conftest.nl"
4024 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4025 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4026 as_fn_arith $ac_count + 1 && ac_count=$as_val
4027 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4028 # Best one so far, save it but keep looking for a better one
4029 ac_cv_path_GREP="$ac_path_GREP"
4030 ac_path_GREP_max=$ac_count
bec39cab 4031 fi
81ecdfbb
RW
4032 # 10*(2^10) chars as input seems more than enough
4033 test $ac_count -gt 10 && break
4034 done
4035 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4036esac
bec39cab 4037
81ecdfbb
RW
4038 $ac_path_GREP_found && break 3
4039 done
4040 done
4041 done
4042IFS=$as_save_IFS
4043 if test -z "$ac_cv_path_GREP"; then
4044 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4045 fi
c906108c 4046else
81ecdfbb 4047 ac_cv_path_GREP=$GREP
c906108c 4048fi
c906108c 4049
81ecdfbb
RW
4050fi
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4052$as_echo "$ac_cv_path_GREP" >&6; }
4053 GREP="$ac_cv_path_GREP"
c906108c 4054
c906108c 4055
81ecdfbb
RW
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4057$as_echo_n "checking for egrep... " >&6; }
4058if test "${ac_cv_path_EGREP+set}" = set; then :
4059 $as_echo_n "(cached) " >&6
783e057b 4060else
81ecdfbb
RW
4061 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4062 then ac_cv_path_EGREP="$GREP -E"
4063 else
4064 if test -z "$EGREP"; then
4065 ac_path_EGREP_found=false
4066 # Loop through the user's path and test for each of PROGNAME-LIST
4067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4069do
4070 IFS=$as_save_IFS
4071 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4072 for ac_prog in egrep; do
4073 for ac_exec_ext in '' $ac_executable_extensions; do
4074 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4075 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4076# Check for GNU ac_path_EGREP and select it if it is found.
4077 # Check for GNU $ac_path_EGREP
4078case `"$ac_path_EGREP" --version 2>&1` in
4079*GNU*)
4080 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4081*)
4082 ac_count=0
4083 $as_echo_n 0123456789 >"conftest.in"
4084 while :
4085 do
4086 cat "conftest.in" "conftest.in" >"conftest.tmp"
4087 mv "conftest.tmp" "conftest.in"
4088 cp "conftest.in" "conftest.nl"
4089 $as_echo 'EGREP' >> "conftest.nl"
4090 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4091 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4092 as_fn_arith $ac_count + 1 && ac_count=$as_val
4093 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4094 # Best one so far, save it but keep looking for a better one
4095 ac_cv_path_EGREP="$ac_path_EGREP"
4096 ac_path_EGREP_max=$ac_count
4097 fi
4098 # 10*(2^10) chars as input seems more than enough
4099 test $ac_count -gt 10 && break
4100 done
4101 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4102esac
bec39cab 4103
81ecdfbb
RW
4104 $ac_path_EGREP_found && break 3
4105 done
4106 done
4107 done
4108IFS=$as_save_IFS
4109 if test -z "$ac_cv_path_EGREP"; then
4110 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4111 fi
783e057b 4112else
81ecdfbb 4113 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4114fi
4115
81ecdfbb 4116 fi
783e057b 4117fi
81ecdfbb
RW
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4119$as_echo "$ac_cv_path_EGREP" >&6; }
4120 EGREP="$ac_cv_path_EGREP"
4121
783e057b 4122
81ecdfbb
RW
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4124$as_echo_n "checking for ANSI C header files... " >&6; }
4125if test "${ac_cv_header_stdc+set}" = set; then :
4126 $as_echo_n "(cached) " >&6
783e057b 4127else
81ecdfbb 4128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4129/* end confdefs.h. */
783e057b 4130#include <stdlib.h>
bec39cab 4131#include <stdarg.h>
783e057b
DJ
4132#include <string.h>
4133#include <float.h>
c906108c 4134
bec39cab
AC
4135int
4136main ()
4137{
c906108c 4138
bec39cab
AC
4139 ;
4140 return 0;
4141}
4142_ACEOF
81ecdfbb 4143if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4144 ac_cv_header_stdc=yes
c906108c 4145else
81ecdfbb 4146 ac_cv_header_stdc=no
c906108c 4147fi
81ecdfbb 4148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4149
783e057b
DJ
4150if test $ac_cv_header_stdc = yes; then
4151 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4153/* end confdefs.h. */
4154#include <string.h>
c906108c 4155
783e057b
DJ
4156_ACEOF
4157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4158 $EGREP "memchr" >/dev/null 2>&1; then :
4159
c906108c 4160else
783e057b 4161 ac_cv_header_stdc=no
c906108c 4162fi
783e057b 4163rm -f conftest*
c906108c
SS
4164
4165fi
4166
783e057b
DJ
4167if test $ac_cv_header_stdc = yes; then
4168 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4170/* end confdefs.h. */
4171#include <stdlib.h>
bec39cab 4172
783e057b
DJ
4173_ACEOF
4174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4175 $EGREP "free" >/dev/null 2>&1; then :
4176
bec39cab 4177else
783e057b 4178 ac_cv_header_stdc=no
bec39cab 4179fi
783e057b 4180rm -f conftest*
bec39cab
AC
4181
4182fi
bec39cab 4183
783e057b
DJ
4184if test $ac_cv_header_stdc = yes; then
4185 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4186 if test "$cross_compiling" = yes; then :
783e057b 4187 :
bec39cab 4188else
81ecdfbb 4189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4190/* end confdefs.h. */
4191#include <ctype.h>
81ecdfbb 4192#include <stdlib.h>
783e057b
DJ
4193#if ((' ' & 0x0FF) == 0x020)
4194# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4195# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4196#else
4197# define ISLOWER(c) \
4198 (('a' <= (c) && (c) <= 'i') \
4199 || ('j' <= (c) && (c) <= 'r') \
4200 || ('s' <= (c) && (c) <= 'z'))
4201# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4202#endif
4203
4204#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4205int
4206main ()
4207{
4208 int i;
4209 for (i = 0; i < 256; i++)
4210 if (XOR (islower (i), ISLOWER (i))
4211 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4212 return 2;
4213 return 0;
783e057b
DJ
4214}
4215_ACEOF
81ecdfbb 4216if ac_fn_c_try_run "$LINENO"; then :
783e057b 4217
81ecdfbb
RW
4218else
4219 ac_cv_header_stdc=no
783e057b 4220fi
81ecdfbb
RW
4221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4222 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4223fi
81ecdfbb 4224
783e057b
DJ
4225fi
4226fi
81ecdfbb
RW
4227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4228$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4229if test $ac_cv_header_stdc = yes; then
4230
81ecdfbb 4231$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4232
4233fi
4234
4235# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4236for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4237 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4238do :
4239 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4240ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4241"
4242eval as_val=\$$as_ac_Header
4243 if test "x$as_val" = x""yes; then :
783e057b 4244 cat >>confdefs.h <<_ACEOF
81ecdfbb 4245#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4246_ACEOF
4247
4248fi
4249
4250done
4251
4252
4253
81ecdfbb
RW
4254 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4255if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4256 MINIX=yes
4257else
4258 MINIX=
4259fi
4260
4261
4262 if test "$MINIX" = yes; then
4263
81ecdfbb 4264$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4265
4266
81ecdfbb 4267$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4268
4269
81ecdfbb 4270$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4271
4272 fi
4273
4274
81ecdfbb
RW
4275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4276$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4277if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4278 $as_echo_n "(cached) " >&6
783e057b 4279else
81ecdfbb 4280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4281/* end confdefs.h. */
4282
c971b7fa
PA
4283# define __EXTENSIONS__ 1
4284 $ac_includes_default
783e057b
DJ
4285int
4286main ()
4287{
4288
4289 ;
4290 return 0;
4291}
4292_ACEOF
81ecdfbb 4293if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4294 ac_cv_safe_to_define___extensions__=yes
4295else
81ecdfbb 4296 ac_cv_safe_to_define___extensions__=no
783e057b 4297fi
81ecdfbb 4298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4299fi
81ecdfbb
RW
4300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4301$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4302 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4303 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4304
81ecdfbb 4305 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4306
81ecdfbb 4307 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4308
81ecdfbb 4309 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4310
81ecdfbb 4311 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4312
4313
c971b7fa
PA
4314ac_aux_dir=
4315for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4316 for ac_t in install-sh install.sh shtool; do
4317 if test -f "$ac_dir/$ac_t"; then
4318 ac_aux_dir=$ac_dir
4319 ac_install_sh="$ac_aux_dir/$ac_t -c"
4320 break 2
4321 fi
4322 done
4323done
4324if test -z "$ac_aux_dir"; then
4325 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4326fi
770d76d7 4327
c971b7fa
PA
4328# These three variables are undocumented and unsupported,
4329# and are intended to be withdrawn in a future Autoconf release.
4330# They can cause serious problems if a builder's source tree is in a directory
4331# whose full name contains unusual characters.
4332ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4333ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4334ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4335
770d76d7 4336
c971b7fa
PA
4337# Make sure we can run config.sub.
4338$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4339 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4340
c971b7fa
PA
4341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4342$as_echo_n "checking build system type... " >&6; }
4343if test "${ac_cv_build+set}" = set; then :
4344 $as_echo_n "(cached) " >&6
770d76d7 4345else
c971b7fa
PA
4346 ac_build_alias=$build_alias
4347test "x$ac_build_alias" = x &&
4348 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4349test "x$ac_build_alias" = x &&
4350 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4351ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4352 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4353
770d76d7 4354fi
c971b7fa
PA
4355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4356$as_echo "$ac_cv_build" >&6; }
4357case $ac_cv_build in
4358*-*-*) ;;
4359*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4360esac
c971b7fa
PA
4361build=$ac_cv_build
4362ac_save_IFS=$IFS; IFS='-'
4363set x $ac_cv_build
4364shift
4365build_cpu=$1
4366build_vendor=$2
4367shift; shift
4368# Remember, the first character of IFS is used to create $*,
4369# except with old shells:
4370build_os=$*
4371IFS=$ac_save_IFS
4372case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4373
4374
c971b7fa
PA
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4376$as_echo_n "checking host system type... " >&6; }
4377if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4378 $as_echo_n "(cached) " >&6
4379else
c971b7fa
PA
4380 if test "x$host_alias" = x; then
4381 ac_cv_host=$ac_cv_build
81ecdfbb 4382else
c971b7fa
PA
4383 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4384 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4385fi
81ecdfbb
RW
4386
4387fi
c971b7fa
PA
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4389$as_echo "$ac_cv_host" >&6; }
4390case $ac_cv_host in
4391*-*-*) ;;
4392*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4393esac
c971b7fa
PA
4394host=$ac_cv_host
4395ac_save_IFS=$IFS; IFS='-'
4396set x $ac_cv_host
4397shift
4398host_cpu=$1
4399host_vendor=$2
4400shift; shift
4401# Remember, the first character of IFS is used to create $*,
4402# except with old shells:
4403host_os=$*
4404IFS=$ac_save_IFS
4405case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4406
4407
4408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4409$as_echo_n "checking target system type... " >&6; }
4410if test "${ac_cv_target+set}" = set; then :
4411 $as_echo_n "(cached) " >&6
4412else
4413 if test "x$target_alias" = x; then
4414 ac_cv_target=$ac_cv_host
4415else
4416 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4417 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4418fi
4419
4420fi
4421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4422$as_echo "$ac_cv_target" >&6; }
4423case $ac_cv_target in
4424*-*-*) ;;
4425*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4426esac
4427target=$ac_cv_target
4428ac_save_IFS=$IFS; IFS='-'
4429set x $ac_cv_target
4430shift
4431target_cpu=$1
4432target_vendor=$2
4433shift; shift
4434# Remember, the first character of IFS is used to create $*,
4435# except with old shells:
4436target_os=$*
4437IFS=$ac_save_IFS
4438case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4439
4440
4441# The aliases save the names the user supplied, while $host etc.
4442# will get canonicalized.
4443test -n "$target_alias" &&
4444 test "$program_prefix$program_suffix$program_transform_name" = \
4445 NONENONEs,x,x, &&
4446 program_prefix=${target_alias}-
4447
4448# The tests for host and target for $enable_largefile require
4449# canonical names.
4450
4451
81ecdfbb 4452
da2f07f1
JK
4453# As the $enable_largefile decision depends on --enable-plugins we must set it
4454# even in directories otherwise not depending on the $plugins option.
4455
4456
2974be62
AM
4457 maybe_plugins=no
4458 for ac_header in dlfcn.h
4459do :
4460 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4461"
4462if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4463 cat >>confdefs.h <<_ACEOF
4464#define HAVE_DLFCN_H 1
4465_ACEOF
4466 maybe_plugins=yes
4467fi
4468
4469done
4470
4471 for ac_header in windows.h
4472do :
4473 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4474"
4475if test "x$ac_cv_header_windows_h" = x""yes; then :
4476 cat >>confdefs.h <<_ACEOF
4477#define HAVE_WINDOWS_H 1
4478_ACEOF
4479 maybe_plugins=yes
4480fi
4481
4482done
4483
4484
4485 # Check whether --enable-plugins was given.
da2f07f1
JK
4486if test "${enable_plugins+set}" = set; then :
4487 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4488 no) plugins=no ;;
4489 *) plugins=yes
4490 if test "$maybe_plugins" != "yes" ; then
4491 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4492 fi ;;
4493 esac
da2f07f1 4494else
2974be62
AM
4495 plugins=$maybe_plugins
4496
da2f07f1
JK
4497fi
4498
2974be62
AM
4499 if test "$plugins" = "yes"; then
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4501$as_echo_n "checking for library containing dlopen... " >&6; }
4502if test "${ac_cv_search_dlopen+set}" = set; then :
4503 $as_echo_n "(cached) " >&6
4504else
4505 ac_func_search_save_LIBS=$LIBS
4506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4507/* end confdefs.h. */
4508
4509/* Override any GCC internal prototype to avoid an error.
4510 Use char because int might match the return type of a GCC
4511 builtin and then its argument prototype would still apply. */
4512#ifdef __cplusplus
4513extern "C"
4514#endif
4515char dlopen ();
4516int
4517main ()
4518{
4519return dlopen ();
4520 ;
4521 return 0;
4522}
4523_ACEOF
4524for ac_lib in '' dl; do
4525 if test -z "$ac_lib"; then
4526 ac_res="none required"
4527 else
4528 ac_res=-l$ac_lib
4529 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4530 fi
4531 if ac_fn_c_try_link "$LINENO"; then :
4532 ac_cv_search_dlopen=$ac_res
4533fi
4534rm -f core conftest.err conftest.$ac_objext \
4535 conftest$ac_exeext
4536 if test "${ac_cv_search_dlopen+set}" = set; then :
4537 break
4538fi
4539done
4540if test "${ac_cv_search_dlopen+set}" = set; then :
4541
4542else
4543 ac_cv_search_dlopen=no
4544fi
4545rm conftest.$ac_ext
4546LIBS=$ac_func_search_save_LIBS
4547fi
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4549$as_echo "$ac_cv_search_dlopen" >&6; }
4550ac_res=$ac_cv_search_dlopen
4551if test "$ac_res" != no; then :
4552 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4553
4554fi
4555
4556 fi
da2f07f1
JK
4557
4558
4559case "${host}" in
4560 sparc-*-solaris*|i[3-7]86-*-solaris*)
4561 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4562 # are mutually exclusive; and without procfs support, the bfd/ elf module
4563 # cannot provide certain routines such as elfcore_write_prpsinfo
4564 # or elfcore_write_prstatus. So unless the user explicitly requested
4565 # large-file support through the --enable-largefile switch, disable
4566 # large-file support in favor of procfs support.
4567 test "${target}" = "${host}" -a "x$plugins" = xno \
4568 && : ${enable_largefile="no"}
4569 ;;
4570esac
4571
4572# Check whether --enable-largefile was given.
4573if test "${enable_largefile+set}" = set; then :
4574 enableval=$enable_largefile;
4575fi
4576
4577if test "$enable_largefile" != no; then
4578
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4580$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4581if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4582 $as_echo_n "(cached) " >&6
4583else
4584 ac_cv_sys_largefile_CC=no
4585 if test "$GCC" != yes; then
4586 ac_save_CC=$CC
4587 while :; do
4588 # IRIX 6.2 and later do not support large files by default,
4589 # so use the C compiler's -n32 option if that helps.
4590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4591/* end confdefs.h. */
4592#include <sys/types.h>
4593 /* Check that off_t can represent 2**63 - 1 correctly.
4594 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4595 since some C++ compilers masquerading as C compilers
4596 incorrectly reject 9223372036854775807. */
4597#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4598 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4599 && LARGE_OFF_T % 2147483647 == 1)
4600 ? 1 : -1];
4601int
4602main ()
4603{
4604
4605 ;
4606 return 0;
4607}
4608_ACEOF
4609 if ac_fn_c_try_compile "$LINENO"; then :
4610 break
4611fi
4612rm -f core conftest.err conftest.$ac_objext
4613 CC="$CC -n32"
4614 if ac_fn_c_try_compile "$LINENO"; then :
4615 ac_cv_sys_largefile_CC=' -n32'; break
4616fi
4617rm -f core conftest.err conftest.$ac_objext
4618 break
4619 done
4620 CC=$ac_save_CC
4621 rm -f conftest.$ac_ext
4622 fi
4623fi
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4625$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4626 if test "$ac_cv_sys_largefile_CC" != no; then
4627 CC=$CC$ac_cv_sys_largefile_CC
4628 fi
4629
4630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4631$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4632if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 while :; do
4636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4637/* end confdefs.h. */
4638#include <sys/types.h>
4639 /* Check that off_t can represent 2**63 - 1 correctly.
4640 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4641 since some C++ compilers masquerading as C compilers
4642 incorrectly reject 9223372036854775807. */
4643#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4644 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4645 && LARGE_OFF_T % 2147483647 == 1)
4646 ? 1 : -1];
4647int
4648main ()
4649{
4650
4651 ;
4652 return 0;
4653}
4654_ACEOF
4655if ac_fn_c_try_compile "$LINENO"; then :
4656 ac_cv_sys_file_offset_bits=no; break
4657fi
4658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4660/* end confdefs.h. */
4661#define _FILE_OFFSET_BITS 64
4662#include <sys/types.h>
4663 /* Check that off_t can represent 2**63 - 1 correctly.
4664 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4665 since some C++ compilers masquerading as C compilers
4666 incorrectly reject 9223372036854775807. */
4667#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4668 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4669 && LARGE_OFF_T % 2147483647 == 1)
4670 ? 1 : -1];
4671int
4672main ()
4673{
4674
4675 ;
4676 return 0;
4677}
4678_ACEOF
4679if ac_fn_c_try_compile "$LINENO"; then :
4680 ac_cv_sys_file_offset_bits=64; break
4681fi
4682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4683 ac_cv_sys_file_offset_bits=unknown
4684 break
4685done
4686fi
4687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4688$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4689case $ac_cv_sys_file_offset_bits in #(
4690 no | unknown) ;;
4691 *)
4692cat >>confdefs.h <<_ACEOF
4693#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4694_ACEOF
4695;;
4696esac
4697rm -rf conftest*
4698 if test $ac_cv_sys_file_offset_bits = unknown; then
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4700$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4701if test "${ac_cv_sys_large_files+set}" = set; then :
4702 $as_echo_n "(cached) " >&6
4703else
4704 while :; do
4705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4706/* end confdefs.h. */
4707#include <sys/types.h>
4708 /* Check that off_t can represent 2**63 - 1 correctly.
4709 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4710 since some C++ compilers masquerading as C compilers
4711 incorrectly reject 9223372036854775807. */
4712#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4713 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4714 && LARGE_OFF_T % 2147483647 == 1)
4715 ? 1 : -1];
4716int
4717main ()
4718{
4719
4720 ;
4721 return 0;
4722}
4723_ACEOF
4724if ac_fn_c_try_compile "$LINENO"; then :
4725 ac_cv_sys_large_files=no; break
4726fi
4727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4729/* end confdefs.h. */
4730#define _LARGE_FILES 1
4731#include <sys/types.h>
4732 /* Check that off_t can represent 2**63 - 1 correctly.
4733 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4734 since some C++ compilers masquerading as C compilers
4735 incorrectly reject 9223372036854775807. */
4736#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4737 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4738 && LARGE_OFF_T % 2147483647 == 1)
4739 ? 1 : -1];
4740int
4741main ()
4742{
4743
4744 ;
4745 return 0;
4746}
4747_ACEOF
4748if ac_fn_c_try_compile "$LINENO"; then :
4749 ac_cv_sys_large_files=1; break
4750fi
4751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4752 ac_cv_sys_large_files=unknown
4753 break
4754done
4755fi
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4757$as_echo "$ac_cv_sys_large_files" >&6; }
4758case $ac_cv_sys_large_files in #(
4759 no | unknown) ;;
4760 *)
4761cat >>confdefs.h <<_ACEOF
4762#define _LARGE_FILES $ac_cv_sys_large_files
4763_ACEOF
4764;;
4765esac
4766rm -rf conftest*
4767 fi
4768fi
4769
4770
4771
81ecdfbb
RW
4772
4773
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4775$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4776if test "${am_cv_prog_cc_stdc+set}" = set; then :
4777 $as_echo_n "(cached) " >&6
4778else
4779 am_cv_prog_cc_stdc=no
4780ac_save_CC="$CC"
4781# Don't try gcc -ansi; that turns off useful extensions and
4782# breaks some systems' header files.
4783# AIX -qlanglvl=ansi
4784# Ultrix and OSF/1 -std1
4785# HP-UX 10.20 and later -Ae
4786# HP-UX older versions -Aa -D_HPUX_SOURCE
4787# SVR4 -Xc -D__EXTENSIONS__
4788for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4789do
783e057b 4790 CC="$ac_save_CC $ac_arg"
81ecdfbb 4791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4792/* end confdefs.h. */
4793#include <stdarg.h>
4794#include <stdio.h>
4795#include <sys/types.h>
4796#include <sys/stat.h>
4797/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4798struct buf { int x; };
4799FILE * (*rcsopen) (struct buf *, struct stat *, int);
4800static char *e (p, i)
4801 char **p;
4802 int i;
4803{
4804 return p[i];
4805}
4806static char *f (char * (*g) (char **, int), char **p, ...)
4807{
4808 char *s;
4809 va_list v;
4810 va_start (v,p);
4811 s = g (p, va_arg (v,int));
4812 va_end (v);
4813 return s;
4814}
4815int test (int i, double x);
4816struct s1 {int (*f) (int a);};
4817struct s2 {int (*f) (double a);};
4818int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4819int argc;
4820char **argv;
4821
4822int
4823main ()
4824{
4825
4826return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4827
4828 ;
4829 return 0;
4830}
4831_ACEOF
81ecdfbb 4832if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4833 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4834fi
81ecdfbb 4835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4836done
4837CC="$ac_save_CC"
4838
4839fi
4840
4841if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4843$as_echo "none needed" >&6; }
783e057b 4844else
81ecdfbb
RW
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4846$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4847fi
4848case "x$am_cv_prog_cc_stdc" in
4849 x|xno) ;;
4850 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4851esac
4852
4869db5e
RM
4853# expand $ac_aux_dir to an absolute path
4854am_aux_dir=`cd $ac_aux_dir && pwd`
4855
4856if test x"${install_sh}" != xset; then
4857 case $am_aux_dir in
4858 *\ * | *\ *)
4859 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4860 *)
4861 install_sh="\${SHELL} $am_aux_dir/install-sh"
4862 esac
4863fi
4864
4865# Installed binaries are usually stripped using `strip' when the user
4866# run `make install-strip'. However `strip' might not be the right
4867# tool to use in cross-compilation environments, therefore Automake
4868# will honor the `STRIP' environment variable to overrule this program.
4869if test "$cross_compiling" != no; then
4870 if test -n "$ac_tool_prefix"; then
4871 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4872set dummy ${ac_tool_prefix}strip; ac_word=$2
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
4875if test "${ac_cv_prog_STRIP+set}" = set; then :
4876 $as_echo_n "(cached) " >&6
4877else
4878 if test -n "$STRIP"; then
4879 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4880else
4881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4882for as_dir in $PATH
4883do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
4886 for ac_exec_ext in '' $ac_executable_extensions; do
4887 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4888 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4890 break 2
4891 fi
4892done
4893 done
4894IFS=$as_save_IFS
4895
4896fi
4897fi
4898STRIP=$ac_cv_prog_STRIP
4899if test -n "$STRIP"; then
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4901$as_echo "$STRIP" >&6; }
4902else
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904$as_echo "no" >&6; }
4905fi
4906
4907
4908fi
4909if test -z "$ac_cv_prog_STRIP"; then
4910 ac_ct_STRIP=$STRIP
4911 # Extract the first word of "strip", so it can be a program name with args.
4912set dummy strip; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
4915if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4916 $as_echo_n "(cached) " >&6
4917else
4918 if test -n "$ac_ct_STRIP"; then
4919 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4920else
4921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922for as_dir in $PATH
4923do
4924 IFS=$as_save_IFS
4925 test -z "$as_dir" && as_dir=.
4926 for ac_exec_ext in '' $ac_executable_extensions; do
4927 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4928 ac_cv_prog_ac_ct_STRIP="strip"
4929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4930 break 2
4931 fi
4932done
4933 done
4934IFS=$as_save_IFS
4935
4936fi
4937fi
4938ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4939if test -n "$ac_ct_STRIP"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4941$as_echo "$ac_ct_STRIP" >&6; }
4942else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947 if test "x$ac_ct_STRIP" = x; then
4948 STRIP=":"
4949 else
4950 case $cross_compiling:$ac_tool_warned in
4951yes:)
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4954ac_tool_warned=yes ;;
4955esac
4956 STRIP=$ac_ct_STRIP
4957 fi
4958else
4959 STRIP="$ac_cv_prog_STRIP"
4960fi
4961
4962fi
4963INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4964
783e057b
DJ
4965
4966ac_aux_dir=
81ecdfbb
RW
4967for ac_dir in .. "$srcdir"/..; do
4968 for ac_t in install-sh install.sh shtool; do
4969 if test -f "$ac_dir/$ac_t"; then
4970 ac_aux_dir=$ac_dir
4971 ac_install_sh="$ac_aux_dir/$ac_t -c"
4972 break 2
4973 fi
4974 done
783e057b
DJ
4975done
4976if test -z "$ac_aux_dir"; then
81ecdfbb 4977 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4978fi
81ecdfbb
RW
4979
4980# These three variables are undocumented and unsupported,
4981# and are intended to be withdrawn in a future Autoconf release.
4982# They can cause serious problems if a builder's source tree is in a directory
4983# whose full name contains unusual characters.
4984ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4985ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4986ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4987
783e057b 4988
783e057b 4989
9009e1ae
MR
4990test "$program_prefix" != NONE &&
4991 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4992# Use a double $ so make ignores it.
4993test "$program_suffix" != NONE &&
4994 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4995# Double any \ or $.
4996# By default was `s,x,x', remove it if useless.
4997ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4998program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4999
81ecdfbb 5000
3bc3d82a
PA
5001# See if we are building with C++, and substitute COMPILER.
5002
5003 # Check whether --enable-build-with-cxx was given.
5004if test "${enable_build_with_cxx+set}" = set; then :
5005 enableval=$enable_build_with_cxx; case $enableval in
5006 yes | no)
5007 ;;
5008 *)
5009 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
5010 esac
5011else
5012 enable_build_with_cxx=no
5013fi
5014
5015
5016 if test "$enable_build_with_cxx" = "yes"; then
dad44a1f 5017 COMPILER='$(CXX)'
3bc3d82a
PA
5018 else
5019 COMPILER='$(CC)'
5020 fi
5021
5022
5023
a417dc56
RW
5024# Dependency checking.
5025rm -rf .tst 2>/dev/null
5026mkdir .tst 2>/dev/null
5027if test -d .tst; then
5028 am__leading_dot=.
5029else
5030 am__leading_dot=_
5031fi
5032rmdir .tst 2>/dev/null
5033
5034DEPDIR="${am__leading_dot}deps"
5035
81ecdfbb 5036ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5037
5038
5039depcc="$CC" am_compiler_list=
5040
5041am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5043$as_echo_n "checking dependency style of $depcc... " >&6; }
5044if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5045 $as_echo_n "(cached) " >&6
a417dc56
RW
5046else
5047 if test -f "$am_depcomp"; then
5048 # We make a subdir and do the tests there. Otherwise we can end up
5049 # making bogus files that we don't know about and never remove. For
5050 # instance it was reported that on HP-UX the gcc test will end up
5051 # making a dummy file named `D' -- because `-MD' means `put the output
5052 # in D'.
5053 mkdir conftest.dir
5054 # Copy depcomp to subdir because otherwise we won't find it if we're
5055 # using a relative directory.
5056 cp "$am_depcomp" conftest.dir
5057 cd conftest.dir
5058 # We will build objects and dependencies in a subdirectory because
5059 # it helps to detect inapplicable dependency modes. For instance
5060 # both Tru64's cc and ICC support -MD to output dependencies as a
5061 # side effect of compilation, but ICC will put the dependencies in
5062 # the current directory while Tru64 will put them in the object
5063 # directory.
5064 mkdir sub
5065
5066 am_cv_CC_dependencies_compiler_type=none
5067 if test "$am_compiler_list" = ""; then
5068 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5069 fi
5070 for depmode in $am_compiler_list; do
5071 if test $depmode = none; then break; fi
5072
81ecdfbb 5073 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5074 # Setup a source with many dependencies, because some compilers
5075 # like to wrap large dependency lists on column 80 (with \), and
5076 # we should not choose a depcomp mode which is confused by this.
5077 #
5078 # We need to recreate these files for each test, as the compiler may
5079 # overwrite some of them when testing with obscure command lines.
5080 # This happens at least with the AIX C compiler.
5081 : > sub/conftest.c
5082 for i in 1 2 3 4 5 6; do
5083 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5084 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5085 # Solaris 8's {/usr,}/bin/sh.
5086 touch sub/conftst$i.h
5087 done
5088 echo "include sub/conftest.Po" > confmf
5089
5090 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5091 # mode. It turns out that the SunPro C++ compiler does not properly
5092 # handle `-M -o', and we need to detect this.
5093 depcmd="depmode=$depmode \
5094 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5095 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5096 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5097 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5098 if env $depcmd > conftest.err 2>&1 &&
5099 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5100 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5101 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5102 # icc doesn't choke on unknown options, it will just issue warnings
5103 # or remarks (even with -Werror). So we grep stderr for any message
5104 # that says an option was ignored or not supported.
5105 # When given -MP, icc 7.0 and 7.1 complain thusly:
5106 # icc: Command line warning: ignoring option '-M'; no argument required
5107 # The diagnosis changed in icc 8.0:
5108 # icc: Command line remark: option '-MP' not supported
5109 if (grep 'ignoring option' conftest.err ||
5110 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5111 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5112 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5113 break
5114 fi
5115 fi
81ecdfbb 5116 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5117 sed -e 's/^/| /' < conftest.err >&5
5118 done
5119
5120 cd ..
5121 rm -rf conftest.dir
5122else
5123 am_cv_CC_dependencies_compiler_type=none
5124fi
5125
5126fi
81ecdfbb
RW
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5128$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5129if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5130then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5131else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5132
5133fi
5134
5135
5136# Check for the 'make' the user wants to use.
5137for ac_prog in make
5138do
5139 # Extract the first word of "$ac_prog", so it can be a program name with args.
5140set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142$as_echo_n "checking for $ac_word... " >&6; }
5143if test "${ac_cv_prog_MAKE+set}" = set; then :
5144 $as_echo_n "(cached) " >&6
a417dc56
RW
5145else
5146 if test -n "$MAKE"; then
5147 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5148else
5149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152 IFS=$as_save_IFS
5153 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5154 for ac_exec_ext in '' $ac_executable_extensions; do
5155 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5156 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5158 break 2
5159 fi
5160done
81ecdfbb
RW
5161 done
5162IFS=$as_save_IFS
a417dc56
RW
5163
5164fi
5165fi
5166MAKE=$ac_cv_prog_MAKE
5167if test -n "$MAKE"; then
81ecdfbb
RW
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5169$as_echo "$MAKE" >&6; }
a417dc56 5170else
81ecdfbb
RW
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5172$as_echo "no" >&6; }
a417dc56
RW
5173fi
5174
81ecdfbb 5175
a417dc56
RW
5176 test -n "$MAKE" && break
5177done
5178
5179MAKE_IS_GNU=
5180case "`$MAKE --version 2>&1 | sed 1q`" in
5181 *GNU*)
5182 MAKE_IS_GNU=yes
5183 ;;
5184esac
81ecdfbb 5185 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5186 GMAKE_TRUE=
5187 GMAKE_FALSE='#'
5188else
5189 GMAKE_TRUE='#'
5190 GMAKE_FALSE=
5191fi
5192
81ecdfbb
RW
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5194$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5195set x ${MAKE-make}
5196ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5197if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5198 $as_echo_n "(cached) " >&6
a417dc56
RW
5199else
5200 cat >conftest.make <<\_ACEOF
81ecdfbb 5201SHELL = /bin/sh
a417dc56 5202all:
81ecdfbb 5203 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5204_ACEOF
5205# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5206case `${MAKE-make} -f conftest.make 2>/dev/null` in
5207 *@@@%%%=?*=@@@%%%*)
5208 eval ac_cv_prog_make_${ac_make}_set=yes;;
5209 *)
5210 eval ac_cv_prog_make_${ac_make}_set=no;;
5211esac
a417dc56
RW
5212rm -f conftest.make
5213fi
81ecdfbb
RW
5214if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5216$as_echo "yes" >&6; }
a417dc56
RW
5217 SET_MAKE=
5218else
81ecdfbb
RW
5219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5220$as_echo "no" >&6; }
a417dc56
RW
5221 SET_MAKE="MAKE=${MAKE-make}"
5222fi
5223
5224
648d586d
JB
5225gnulib_extra_configure_args=
5226# If large-file support is disabled, make sure gnulib does the same.
5227if test "$enable_largefile" = no; then
5228gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5229fi
5230
c971b7fa
PA
5231# Configure gnulib. We need to build gnulib under some other
5232# directory not "gnulib", to avoid the problem of both GDB and
5233# GDBserver wanting to build it in the same directory, when building
5234# in the source dir.
783e057b 5235
c971b7fa
PA
5236 in_src="gnulib"
5237 in_build="build-gnulib"
648d586d 5238 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5239
5240 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5241 # so they do not pile up.
5242 ac_sub_configure_args=
5243 ac_prev=
5244 eval "set x $ac_configure_args"
5245 shift
5246 for ac_arg
5247 do
5248 if test -n "$ac_prev"; then
5249 ac_prev=
5250 continue
5251 fi
5252 case $ac_arg in
5253 -cache-file | --cache-file | --cache-fil | --cache-fi \
5254 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5255 ac_prev=cache_file ;;
5256 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5257 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5258 | --c=*)
5259 ;;
5260 --config-cache | -C)
5261 ;;
5262 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5263 ac_prev=srcdir ;;
5264 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5265 ;;
5266 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5267 ac_prev=prefix ;;
5268 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5269 ;;
5270 --disable-option-checking)
5271 ;;
5272 *)
5273 case $ac_arg in
5274 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5275 esac
5276 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5277 esac
5278 done
5279
5280 # Always prepend --prefix to ensure using the same prefix
5281 # in subdir configurations.
5282 ac_arg="--prefix=$prefix"
5283 case $ac_arg in
5284 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5285 esac
5286 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5287
5288 # Pass --silent
5289 if test "$silent" = yes; then
5290 ac_sub_configure_args="--silent $ac_sub_configure_args"
5291 fi
5292
5293 # Always prepend --disable-option-checking to silence warnings, since
5294 # different subdirs can have different --enable and --with options.
5295 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5296
5297 ac_popdir=`pwd`
5298 ac_dir=$in_build
5299
5300 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5301 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5302 $as_echo "$ac_msg" >&6
5303 as_dir="$ac_dir"; as_fn_mkdir_p
5304
38ea300a
PA
5305 case $srcdir in
5306 [\\/]* | ?:[\\/]* )
5307 ac_srcdir=$srcdir/$in_src ;;
5308 *) # Relative name.
5309 ac_srcdir=../$srcdir/$in_src ;;
5310 esac
c971b7fa
PA
5311
5312 cd "$ac_dir"
5313
5314 ac_sub_configure=$ac_srcdir/configure
5315
5316 # Make the cache file name correct relative to the subdirectory.
5317 case $cache_file in
5318 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5319 *) # Relative name.
5320 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5321 esac
5322
648d586d
JB
5323 if test -n "$in_extra_args"; then
5324 # Add the extra args at the end.
5325 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5326 fi
5327
c971b7fa
PA
5328 { $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
5329$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5330 # The eval makes quoting arguments work.
5331 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5332 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5333 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5334
5335 cd "$ac_popdir"
783e057b 5336
c971b7fa
PA
5337
5338
5339CONFIG_OBS=
5340CONFIG_DEPS=
5341CONFIG_SRCS=
5342ENABLE_CFLAGS=
5343
5344CONFIG_ALL=
5345CONFIG_CLEAN=
5346CONFIG_INSTALL=
5347CONFIG_UNINSTALL=
5348
5349# If we haven't got the data from the intl directory,
5350# assume NLS is disabled.
5351USE_NLS=no
5352LIBINTL=
5353LIBINTL_DEP=
5354INCINTL=
5355XGETTEXT=
5356GMSGFMT=
5357POSUB=
783e057b
DJ
5358
5359if test -f ../intl/config.intl; then
5360 . ../intl/config.intl
5361fi
81ecdfbb
RW
5362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5363$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5364if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
783e057b 5367else
81ecdfbb
RW
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5369$as_echo "yes" >&6; }
783e057b 5370
81ecdfbb 5371$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5372
5373
81ecdfbb
RW
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5375$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5376 # Look for .po and .gmo files in the source directory.
5377 CATALOGS=
5378 XLINGUAS=
5379 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5380 # If there aren't any .gmo files the shell will give us the
5381 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5382 # weeded out.
5383 case "$cat" in *\**)
5384 continue;;
5385 esac
5386 # The quadruple backslash is collapsed to a double backslash
5387 # by the backticks, then collapsed again by the double quotes,
5388 # leaving us with one backslash in the sed expression (right
5389 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5390 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5391 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5392 # The user is allowed to set LINGUAS to a list of languages to
5393 # install catalogs for. If it's empty that means "all of them."
5394 if test "x$LINGUAS" = x; then
5395 CATALOGS="$CATALOGS $cat"
5396 XLINGUAS="$XLINGUAS $lang"
5397 else
5398 case "$LINGUAS" in *$lang*)
5399 CATALOGS="$CATALOGS $cat"
5400 XLINGUAS="$XLINGUAS $lang"
5401 ;;
5402 esac
e28b3332
DJ
5403 fi
5404 done
c971b7fa
PA
5405 LINGUAS="$XLINGUAS"
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5407$as_echo "$LINGUAS" >&6; }
5408
5409
5410 DATADIRNAME=share
5411
5412 INSTOBJEXT=.mo
5413
5414 GENCAT=gencat
5415
5416 CATOBJEXT=.gmo
e28b3332 5417
e28b3332
DJ
5418fi
5419
c971b7fa
PA
5420localedir='${datadir}/locale'
5421
5422
5423if test x"$USE_NLS" = xyes; then
5424 CONFIG_ALL="$CONFIG_ALL all-po"
5425 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5426 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5427 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5428fi
e28b3332 5429
c971b7fa
PA
5430GNULIB=build-gnulib/import
5431
5432# For Makefile dependencies.
5433GNULIB_STDINT_H=
5434if test x"$STDINT_H" != x; then
5435 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5436fi
5437
5438
c971b7fa
PA
5439PACKAGE=gdb
5440
5441cat >>confdefs.h <<_ACEOF
5442#define PACKAGE "$PACKAGE"
5443_ACEOF
5444
5445
5446
5447# We never need to detect it in this sub-configure.
5448# But preserve it for config.status --recheck.
5449
5450
5451
5452MAKEINFO_EXTRA_FLAGS=""
5453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5454$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5455if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5456 $as_echo_n "(cached) " >&6
5457else
5458 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5459 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5460 gdb_cv_have_makeinfo_click=yes
5461 else
5462 gdb_cv_have_makeinfo_click=no
5463 fi
5464fi
5465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5466$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5467if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5468 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5469fi
e28b3332
DJ
5470
5471
bec39cab
AC
5472
5473
81ecdfbb
RW
5474# Check whether --with-separate-debug-dir was given.
5475if test "${with_separate_debug_dir+set}" = set; then :
5476 withval=$with_separate_debug_dir;
b14b1491
TT
5477 DEBUGDIR=$withval
5478else
5479 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5480fi
5481
20e95c23 5482
783e057b
DJ
5483 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5484 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5485 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5486 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5487
783e057b
DJ
5488cat >>confdefs.h <<_ACEOF
5489#define DEBUGDIR "$ac_define_dir"
20e95c23 5490_ACEOF
20e95c23 5491
20e95c23 5492
20e95c23 5493
0c4a4063 5494
b14b1491
TT
5495 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5496 if test "x$prefix" = xNONE; then
5497 test_prefix=/usr/local
5498 else
5499 test_prefix=$prefix
5500 fi
783e057b 5501 else
b14b1491 5502 test_prefix=$exec_prefix
783e057b 5503 fi
b14b1491
TT
5504 value=0
5505 case ${ac_define_dir} in
5506 "${test_prefix}"|"${test_prefix}/"*|\
5507 '${exec_prefix}'|'${exec_prefix}/'*)
5508 value=1
5509 ;;
5510 esac
5511
5512cat >>confdefs.h <<_ACEOF
5513#define DEBUGDIR_RELOCATABLE $value
5514_ACEOF
5515
5516
5517
0c4a4063 5518
f83d8a90
DE
5519# We can't pass paths as command line arguments.
5520# Mingw32 tries to be clever and will convert the paths for us.
5521# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5522# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5523# This breaks GDB's relocatable path conversions since paths passed in
5524# config.h would not get so translated, the path prefixes no longer match.
5525
5526 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5527 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5528 ac_define_dir=`eval echo $bindir`
5529 ac_define_dir=`eval echo $ac_define_dir`
5530
5531cat >>confdefs.h <<_ACEOF
5532#define BINDIR "$ac_define_dir"
5533_ACEOF
5534
5535
5536
b14b1491
TT
5537# GDB's datadir relocation
5538
5539
5540
81ecdfbb
RW
5541# Check whether --with-gdb-datadir was given.
5542if test "${with_gdb_datadir+set}" = set; then :
5543 withval=$with_gdb_datadir;
b14b1491 5544 GDB_DATADIR=$withval
20e95c23 5545else
b14b1491 5546 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5547fi
5548
20e95c23 5549
b14b1491
TT
5550 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5551 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5552 ac_define_dir=`eval echo $GDB_DATADIR`
5553 ac_define_dir=`eval echo $ac_define_dir`
5554
5555cat >>confdefs.h <<_ACEOF
5556#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5557_ACEOF
5558
b14b1491
TT
5559
5560
0c4a4063 5561
b14b1491
TT
5562 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5563 if test "x$prefix" = xNONE; then
5564 test_prefix=/usr/local
5565 else
5566 test_prefix=$prefix
5567 fi
5568 else
5569 test_prefix=$exec_prefix
5570 fi
5571 value=0
5572 case ${ac_define_dir} in
5573 "${test_prefix}"|"${test_prefix}/"*|\
5574 '${exec_prefix}'|'${exec_prefix}/'*)
5575 value=1
5576 ;;
5577 esac
5578
5579cat >>confdefs.h <<_ACEOF
5580#define GDB_DATADIR_RELOCATABLE $value
5581_ACEOF
5582
5583
783e057b 5584
20e95c23 5585
0c4a4063 5586
81ecdfbb
RW
5587# Check whether --with-relocated-sources was given.
5588if test "${with_relocated_sources+set}" = set; then :
5589 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5590
5591 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5592 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5593 ac_define_dir=`eval echo $reloc_srcdir`
5594 ac_define_dir=`eval echo $ac_define_dir`
5595
5596cat >>confdefs.h <<_ACEOF
5597#define RELOC_SRCDIR "$ac_define_dir"
5598_ACEOF
5599
5600
5601
81ecdfbb
RW
5602fi
5603
29b0e8a2 5604
7349ff92
JK
5605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5606$as_echo_n "checking for default auto-load directory... " >&6; }
5607
5608# Check whether --with-auto-load-dir was given.
5609if test "${with_auto_load_dir+set}" = set; then :
5610 withval=$with_auto_load_dir;
5611else
1564a261 5612 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5613fi
5614
1564a261 5615escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5616
5617 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5618 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5619 ac_define_dir=`eval echo $escape_dir`
5620 ac_define_dir=`eval echo $ac_define_dir`
5621
5622cat >>confdefs.h <<_ACEOF
5623#define AUTO_LOAD_DIR "$ac_define_dir"
5624_ACEOF
5625
5626
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5628$as_echo "$with_auto_load_dir" >&6; }
5629
bccbefd2
JK
5630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5631$as_echo_n "checking for default auto-load safe-path... " >&6; }
5632
5633# Check whether --with-auto-load-safe-path was given.
5634if test "${with_auto_load_safe_path+set}" = set; then :
5635 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5636 with_auto_load_safe_path="/"
5637 fi
bccbefd2 5638else
7349ff92 5639 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5640fi
5641
1564a261 5642escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5643
5644 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5645 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5646 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5647 ac_define_dir=`eval echo $ac_define_dir`
5648
5649cat >>confdefs.h <<_ACEOF
6dea1fbd 5650#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5651_ACEOF
5652
5653
5654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5655$as_echo "$with_auto_load_safe_path" >&6; }
5656
29b0e8a2 5657
20e95c23 5658
5ae98d25 5659subdirs="$subdirs testsuite"
20e95c23
DJ
5660
5661
783e057b 5662# Check whether to support alternative target configurations
81ecdfbb
RW
5663# Check whether --enable-targets was given.
5664if test "${enable_targets+set}" = set; then :
5665 enableval=$enable_targets; case "${enableval}" in
5666 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5667 ;;
5668 no) enable_targets= ;;
5669 *) enable_targets=$enableval ;;
5670esac
81ecdfbb
RW
5671fi
5672
20e95c23 5673
783e057b 5674# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5675# Check whether --enable-64-bit-bfd was given.
5676if test "${enable_64_bit_bfd+set}" = set; then :
5677 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5678 yes) want64=true ;;
5679 no) want64=false ;;
81ecdfbb 5680 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5681esac
5682else
5683 want64=false
81ecdfbb
RW
5684fi
5685
783e057b
DJ
5686# Provide defaults for some variables set by the per-host and per-target
5687# configuration.
5688gdb_host_obs=posix-hdep.o
20e95c23 5689
783e057b
DJ
5690if test "${target}" = "${host}"; then
5691 gdb_native=yes
5692else
5693 gdb_native=no
5694fi
20e95c23 5695
783e057b 5696. $srcdir/configure.host
20e95c23 5697
fb23d554
SDJ
5698# Add in the common host objects.
5699. $srcdir/common/common.host
5700gdb_host_obs="$gdb_host_obs $common_host_obs"
5701
783e057b 5702# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5703
783e057b
DJ
5704TARGET_OBS=
5705all_targets=
b292c783 5706HAVE_NATIVE_GCORE_TARGET=
20e95c23 5707
783e057b 5708for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5709do
783e057b
DJ
5710 if test "$targ_alias" = "all"; then
5711 all_targets=true
5712 else
5713 # Canonicalize the secondary target names.
5714 result=`$ac_config_sub $targ_alias 2>/dev/null`
5715 if test -n "$result"; then
5716 targ=$result
5717 else
5718 targ=$targ_alias
5719 fi
20e95c23 5720
783e057b 5721 . ${srcdir}/configure.tgt
20e95c23 5722
bf307134
JB
5723 if test -z "${gdb_target_obs}"; then :
5724 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5725fi
5726
783e057b
DJ
5727 # Target-specific object files
5728 for i in ${gdb_target_obs}; do
5729 case " $TARGET_OBS " in
5730 *" ${i} "*) ;;
5731 *)
5732 TARGET_OBS="$TARGET_OBS ${i}"
5733 ;;
5734 esac
5735 done
20e95c23 5736
783e057b
DJ
5737 # Check whether this target needs 64-bit CORE_ADDR
5738 if test x${want64} = xfalse; then
5739 . ${srcdir}/../bfd/config.bfd
5740 fi
b292c783
JK
5741
5742 # Check whether this target is native and supports gcore.
5743 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5744 && $gdb_have_gcore; then
5745 HAVE_NATIVE_GCORE_TARGET=1
5746 fi
783e057b 5747 fi
20e95c23
DJ
5748done
5749
783e057b
DJ
5750if test x${all_targets} = xtrue; then
5751
5752 # We want all 64-bit targets if we either:
5753 # - run on a 64-bit host or
5754 # - already require 64-bit support for some other target or
5755 # - the --enable-64-bit-bfd option was supplied
5756 # Otherwise we only support all 32-bit targets.
5757 #
5758 # NOTE: This test must be in sync with the corresponding
5759 # tests in BFD!
20e95c23 5760
783e057b 5761 if test x${want64} = xfalse; then
81ecdfbb
RW
5762 # The cast to long int works around a bug in the HP C Compiler
5763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5765# This bug is HP SR number 8606223364.
5766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5767$as_echo_n "checking size of long... " >&6; }
5768if test "${ac_cv_sizeof_long+set}" = set; then :
5769 $as_echo_n "(cached) " >&6
c0993dbe 5770else
81ecdfbb 5771 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5772
81ecdfbb
RW
5773else
5774 if test "$ac_cv_type_long" = yes; then
5775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5777{ as_fn_set_status 77
5778as_fn_error "cannot compute sizeof (long)
5779See \`config.log' for more details." "$LINENO" 5; }; }
5780 else
5781 ac_cv_sizeof_long=0
5782 fi
c0993dbe 5783fi
81ecdfbb 5784
c0993dbe 5785fi
81ecdfbb
RW
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5787$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5788
c0993dbe 5789
c0993dbe 5790
c0993dbe
UW
5791cat >>confdefs.h <<_ACEOF
5792#define SIZEOF_LONG $ac_cv_sizeof_long
5793_ACEOF
5794
5795
5796 if test "x${ac_cv_sizeof_long}" = "x8"; then
5797 want64=true
5798 fi
5799 fi
5800 if test x${want64} = xtrue; then
5801 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5802 else
5803 TARGET_OBS='$(ALL_TARGET_OBS)'
5804 fi
5805fi
5806
5807
5808
b292c783 5809
c0993dbe
UW
5810# For other settings, only the main target counts.
5811gdb_sim=
5812gdb_osabi=
5813build_gdbserver=
5814targ=$target; . ${srcdir}/configure.tgt
5815
5816# Fetch the default architecture and default target vector from BFD.
5817targ=$target; . $srcdir/../bfd/config.bfd
5818
5819# We only want the first architecture, so strip off the others if
5820# there is more than one.
5821targ_archs=`echo $targ_archs | sed 's/ .*//'`
5822
5823if test "x$targ_archs" != x; then
5824
5825cat >>confdefs.h <<_ACEOF
5826#define DEFAULT_BFD_ARCH $targ_archs
5827_ACEOF
5828
5829fi
5830if test "x$targ_defvec" != x; then
5831
5832cat >>confdefs.h <<_ACEOF
5833#define DEFAULT_BFD_VEC $targ_defvec
5834_ACEOF
5835
5836fi
5837
c0993dbe
UW
5838# The CLI cannot be disabled yet, but may be in the future.
5839
5840# Enable CLI.
81ecdfbb
RW
5841# Check whether --enable-gdbcli was given.
5842if test "${enable_gdbcli+set}" = set; then :
5843 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5844 yes)
5845 ;;
5846 no)
81ecdfbb 5847 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5848 *)
81ecdfbb 5849 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5850 esac
5851else
5852 enable_gdbcli=yes
81ecdfbb
RW
5853fi
5854
c0993dbe
UW
5855if test x"$enable_gdbcli" = xyes; then
5856 if test -d $srcdir/cli; then
5857 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5858 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5859 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5860 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5861 fi
5862fi
5863
5864# Enable MI.
81ecdfbb
RW
5865# Check whether --enable-gdbmi was given.
5866if test "${enable_gdbmi+set}" = set; then :
5867 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5868 yes | no)
5869 ;;
5870 *)
81ecdfbb 5871 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5872 esac
5873else
5874 enable_gdbmi=yes
81ecdfbb
RW
5875fi
5876
c0993dbe
UW
5877if test x"$enable_gdbmi" = xyes; then
5878 if test -d $srcdir/mi; then
5879 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5880 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5881 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5882 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5883 fi
5884fi
5885
5886# Enable TUI.
81ecdfbb
RW
5887# Check whether --enable-tui was given.
5888if test "${enable_tui+set}" = set; then :
5889 enableval=$enable_tui; case $enableval in
3ca64bd3 5890 yes | no | auto)
c0993dbe
UW
5891 ;;
5892 *)
81ecdfbb 5893 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5894 esac
5895else
3ca64bd3 5896 enable_tui=auto
81ecdfbb
RW
5897fi
5898
c0993dbe
UW
5899
5900# Enable gdbtk.
81ecdfbb
RW
5901# Check whether --enable-gdbtk was given.
5902if test "${enable_gdbtk+set}" = set; then :
5903 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5904 yes | no)
5905 ;;
5906 *)
81ecdfbb 5907 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5908 esac
5909else
5062cc19 5910 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5911 enable_gdbtk=yes
5912 else
5913 enable_gdbtk=no
5914 fi
81ecdfbb
RW
5915fi
5916
c0993dbe
UW
5917# We unconditionally disable gdbtk tests on selected platforms.
5918case $host_os in
5919 go32* | windows*)
81ecdfbb
RW
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5921$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5922 enable_gdbtk=no ;;
5923esac
5924
05e7c244 5925# Libunwind support for ia64.
bec39cab 5926
05e7c244
JK
5927
5928# Check whether --with-libunwind-ia64 was given.
5929if test "${with_libunwind_ia64+set}" = set; then :
5930 withval=$with_libunwind_ia64;
bec39cab 5931else
05e7c244
JK
5932 with_libunwind_ia64=auto
5933fi
bec39cab 5934
05e7c244
JK
5935
5936# Backward compatibility option.
5937if test "${with_libunwind+set}" = set; then
5938 if test x"$with_libunwind_ia64" != xauto; then
5939 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5940 fi
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5942$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5943 with_libunwind_ia64="$with_libunwind"
5944fi
5945
5946case "$with_libunwind_ia64" in
5947 yes | no)
5948 ;;
5949 auto)
5950 for ac_header in libunwind-ia64.h
81ecdfbb 5951do :
b54a8fd7
PA
5952 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5953if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5954 cat >>confdefs.h <<_ACEOF
b54a8fd7 5955#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5956_ACEOF
5957
5958fi
5959
5960done
5961
05e7c244
JK
5962 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5963 ;;
5964 *)
5965 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5966 ;;
5967esac
bec39cab 5968
05e7c244 5969if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5970 for ac_header in libunwind-ia64.h
81ecdfbb 5971do :
b54a8fd7
PA
5972 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5973if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5974 cat >>confdefs.h <<_ACEOF
b54a8fd7 5975#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5976_ACEOF
5977
5978fi
5979
5980done
5981
05e7c244
JK
5982 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5983 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5984 fi
5985 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5986 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5987 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5988fi
5989
cb01cfba
JB
5990opt_curses=no
5991
81ecdfbb
RW
5992# Check whether --with-curses was given.
5993if test "${with_curses+set}" = set; then :
5994 withval=$with_curses; opt_curses=$withval
5995fi
5996
cb01cfba 5997
76a39ba7 5998prefer_curses=no
cb01cfba 5999if test "$opt_curses" = "yes"; then
76a39ba7 6000 prefer_curses=yes
cb01cfba
JB
6001fi
6002
a9322a30 6003# Profiling support.
81ecdfbb
RW
6004# Check whether --enable-profiling was given.
6005if test "${enable_profiling+set}" = set; then :
6006 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6007 yes | no)
6008 ;;
6009 *)
81ecdfbb 6010 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6011 esac
6012else
6013 enable_profiling=no
81ecdfbb 6014fi
bec39cab 6015
a9322a30
TT
6016
6017for ac_func in monstartup _mcleanup
81ecdfbb
RW
6018do :
6019 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6020ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6021eval as_val=\$$as_ac_var
6022 if test "x$as_val" = x""yes; then :
6023 cat >>confdefs.h <<_ACEOF
6024#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6025_ACEOF
a9322a30 6026
81ecdfbb
RW
6027fi
6028done
a9322a30 6029
81ecdfbb
RW
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6031$as_echo_n "checking for _etext... " >&6; }
6032if test "${ac_cv_var__etext+set}" = set; then :
6033 $as_echo_n "(cached) " >&6
6034else
6035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6036/* end confdefs.h. */
6037#include <stdlib.h>
6038extern char _etext;
a9322a30
TT
6039
6040int
6041main ()
6042{
6043free (&_etext);
6044 ;
6045 return 0;
6046}
bec39cab 6047_ACEOF
81ecdfbb 6048if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6049 ac_cv_var__etext=yes
bec39cab 6050else
81ecdfbb 6051 ac_cv_var__etext=no
bec39cab 6052fi
81ecdfbb
RW
6053rm -f core conftest.err conftest.$ac_objext \
6054 conftest$ac_exeext conftest.$ac_ext
bec39cab 6055fi
81ecdfbb
RW
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6057$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6058if test $ac_cv_var__etext = yes; then
60ca704f 6059
81ecdfbb 6060$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6061
bec39cab 6062fi
81ecdfbb
RW
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6064$as_echo_n "checking for etext... " >&6; }
6065if test "${ac_cv_var_etext+set}" = set; then :
6066 $as_echo_n "(cached) " >&6
bec39cab 6067else
81ecdfbb 6068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6069/* end confdefs.h. */
a9322a30
TT
6070#include <stdlib.h>
6071extern char etext;
bec39cab
AC
6072
6073int
6074main ()
6075{
a9322a30 6076free (&etext);
bec39cab
AC
6077 ;
6078 return 0;
6079}
6080_ACEOF
81ecdfbb 6081if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6082 ac_cv_var_etext=yes
bec39cab 6083else
81ecdfbb 6084 ac_cv_var_etext=no
bec39cab 6085fi
81ecdfbb
RW
6086rm -f core conftest.err conftest.$ac_objext \
6087 conftest$ac_exeext conftest.$ac_ext
bec39cab 6088fi
81ecdfbb
RW
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6090$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6091if test $ac_cv_var_etext = yes; then
6092
81ecdfbb 6093$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6094
6095fi
a9322a30
TT
6096if test "$enable_profiling" = yes ; then
6097 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6098 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6099 fi
6100 PROFILE_CFLAGS=-pg
6101 OLD_CFLAGS="$CFLAGS"
6102 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6103
81ecdfbb
RW
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6105$as_echo_n "checking whether $CC supports -pg... " >&6; }
6106if test "${ac_cv_cc_supports_pg+set}" = set; then :
6107 $as_echo_n "(cached) " >&6
bec39cab 6108else
81ecdfbb 6109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6110/* end confdefs.h. */
bec39cab
AC
6111
6112int
6113main ()
6114{
a9322a30 6115int x;
bec39cab
AC
6116 ;
6117 return 0;
6118}
6119_ACEOF
81ecdfbb 6120if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6121 ac_cv_cc_supports_pg=yes
bec39cab 6122else
81ecdfbb 6123 ac_cv_cc_supports_pg=no
bec39cab 6124fi
81ecdfbb 6125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6126fi
81ecdfbb
RW
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6128$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6129
a9322a30 6130 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6131 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6132 fi
bec39cab 6133
a9322a30 6134 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6135fi
6136
c16158bc
JM
6137
6138
81ecdfbb
RW
6139# Check whether --with-pkgversion was given.
6140if test "${with_pkgversion+set}" = set; then :
6141 withval=$with_pkgversion; case "$withval" in
6142 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6143 no) PKGVERSION= ;;
6144 *) PKGVERSION="($withval) " ;;
6145 esac
6146else
6147 PKGVERSION="(GDB) "
6148
81ecdfbb 6149fi
c16158bc
JM
6150
6151
6152
6153
81ecdfbb
RW
6154
6155# Check whether --with-bugurl was given.
6156if test "${with_bugurl+set}" = set; then :
6157 withval=$with_bugurl; case "$withval" in
6158 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6159 no) BUGURL=
6160 ;;
6161 *) BUGURL="$withval"
6162 ;;
6163 esac
6164else
6165 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6166
81ecdfbb
RW
6167fi
6168
c16158bc
JM
6169 case ${BUGURL} in
6170 "")
6171 REPORT_BUGS_TO=
6172 REPORT_BUGS_TEXI=
6173 ;;
6174 *)
6175 REPORT_BUGS_TO="<$BUGURL>"
6176 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6177 ;;
6178 esac;
6179
6180
6181
6182
6183cat >>confdefs.h <<_ACEOF
6184#define PKGVERSION "$PKGVERSION"
6185_ACEOF
6186
6187
6188cat >>confdefs.h <<_ACEOF
6189#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6190_ACEOF
6191
6192
bec39cab
AC
6193# --------------------- #
6194# Checks for programs. #
6195# --------------------- #
6196
6197for ac_prog in gawk mawk nawk awk
6198do
6199 # Extract the first word of "$ac_prog", so it can be a program name with args.
6200set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6202$as_echo_n "checking for $ac_word... " >&6; }
6203if test "${ac_cv_prog_AWK+set}" = set; then :
6204 $as_echo_n "(cached) " >&6
bec39cab
AC
6205else
6206 if test -n "$AWK"; then
6207 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6208else
6209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210for as_dir in $PATH
6211do
6212 IFS=$as_save_IFS
6213 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6214 for ac_exec_ext in '' $ac_executable_extensions; do
6215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6216 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6218 break 2
6219 fi
6220done
81ecdfbb
RW
6221 done
6222IFS=$as_save_IFS
bec39cab
AC
6223
6224fi
6225fi
6226AWK=$ac_cv_prog_AWK
6227if test -n "$AWK"; then
81ecdfbb
RW
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6229$as_echo "$AWK" >&6; }
bec39cab 6230else
81ecdfbb
RW
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6232$as_echo "no" >&6; }
bec39cab
AC
6233fi
6234
bec39cab 6235
81ecdfbb 6236 test -n "$AWK" && break
bec39cab
AC
6237done
6238
c971b7fa
PA
6239# Find a good install program. We prefer a C program (faster),
6240# so one script is as good as another. But avoid the broken or
6241# incompatible versions:
6242# SysV /etc/install, /usr/sbin/install
6243# SunOS /usr/etc/install
6244# IRIX /sbin/install
6245# AIX /bin/install
6246# AmigaOS /C/install, which installs bootblocks on floppy discs
6247# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6248# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6249# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6250# OS/2's system install, which has a completely different semantic
6251# ./install, which can be erroneously created by make from ./install.sh.
6252# Reject install programs that cannot install multiple files.
6253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6254$as_echo_n "checking for a BSD-compatible install... " >&6; }
6255if test -z "$INSTALL"; then
6256if test "${ac_cv_path_install+set}" = set; then :
6257 $as_echo_n "(cached) " >&6
6258else
6259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260for as_dir in $PATH
6261do
6262 IFS=$as_save_IFS
6263 test -z "$as_dir" && as_dir=.
6264 # Account for people who put trailing slashes in PATH elements.
6265case $as_dir/ in #((
6266 ./ | .// | /[cC]/* | \
6267 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6268 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6269 /usr/ucb/* ) ;;
6270 *)
6271 # OSF1 and SCO ODT 3.0 have their own names for install.
6272 # Don't use installbsd from OSF since it installs stuff as root
6273 # by default.
6274 for ac_prog in ginstall scoinst install; do
6275 for ac_exec_ext in '' $ac_executable_extensions; do
6276 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6277 if test $ac_prog = install &&
6278 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6279 # AIX install. It has an incompatible calling convention.
6280 :
6281 elif test $ac_prog = install &&
6282 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6283 # program-specific install script used by HP pwplus--don't use.
6284 :
6285 else
6286 rm -rf conftest.one conftest.two conftest.dir
6287 echo one > conftest.one
6288 echo two > conftest.two
6289 mkdir conftest.dir
6290 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6291 test -s conftest.one && test -s conftest.two &&
6292 test -s conftest.dir/conftest.one &&
6293 test -s conftest.dir/conftest.two
6294 then
6295 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6296 break 3
6297 fi
6298 fi
6299 fi
6300 done
6301 done
6302 ;;
6303esac
6304
6305 done
6306IFS=$as_save_IFS
6307
6308rm -rf conftest.one conftest.two conftest.dir
6309
6310fi
6311 if test "${ac_cv_path_install+set}" = set; then
6312 INSTALL=$ac_cv_path_install
6313 else
6314 # As a last resort, use the slow shell script. Don't cache a
6315 # value for INSTALL within a source directory, because that will
6316 # break other packages using the cache if that directory is
6317 # removed, or if the value is a relative name.
6318 INSTALL=$ac_install_sh
6319 fi
6320fi
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6322$as_echo "$INSTALL" >&6; }
6323
6324# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6325# It thinks the first close brace ends the variable substitution.
6326test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6327
6328test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6329
6330test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6331
81ecdfbb
RW
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6333$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6334LN_S=$as_ln_s
6335if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6337$as_echo "yes" >&6; }
bec39cab 6338else
81ecdfbb
RW
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6340$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6341fi
6342
6343if test -n "$ac_tool_prefix"; then
6344 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6345set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6347$as_echo_n "checking for $ac_word... " >&6; }
6348if test "${ac_cv_prog_RANLIB+set}" = set; then :
6349 $as_echo_n "(cached) " >&6
bec39cab
AC
6350else
6351 if test -n "$RANLIB"; then
6352 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6353else
6354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355for as_dir in $PATH
6356do
6357 IFS=$as_save_IFS
6358 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6359 for ac_exec_ext in '' $ac_executable_extensions; do
6360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6361 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6363 break 2
6364 fi
6365done
81ecdfbb
RW
6366 done
6367IFS=$as_save_IFS
bec39cab
AC
6368
6369fi
6370fi
6371RANLIB=$ac_cv_prog_RANLIB
6372if test -n "$RANLIB"; then
81ecdfbb
RW
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6374$as_echo "$RANLIB" >&6; }
bec39cab 6375else
81ecdfbb
RW
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377$as_echo "no" >&6; }
bec39cab
AC
6378fi
6379
81ecdfbb 6380
bec39cab
AC
6381fi
6382if test -z "$ac_cv_prog_RANLIB"; then
6383 ac_ct_RANLIB=$RANLIB
6384 # Extract the first word of "ranlib", so it can be a program name with args.
6385set dummy ranlib; ac_word=$2
81ecdfbb
RW
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6387$as_echo_n "checking for $ac_word... " >&6; }
6388if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6389 $as_echo_n "(cached) " >&6
bec39cab
AC
6390else
6391 if test -n "$ac_ct_RANLIB"; then
6392 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6393else
6394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397 IFS=$as_save_IFS
6398 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6399 for ac_exec_ext in '' $ac_executable_extensions; do
6400 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6401 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6403 break 2
6404 fi
6405done
81ecdfbb
RW
6406 done
6407IFS=$as_save_IFS
bec39cab 6408
bec39cab
AC
6409fi
6410fi
6411ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6412if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6414$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6415else
81ecdfbb
RW
6416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
bec39cab
AC
6418fi
6419
81ecdfbb
RW
6420 if test "x$ac_ct_RANLIB" = x; then
6421 RANLIB=":"
6422 else
6423 case $cross_compiling:$ac_tool_warned in
6424yes:)
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6426$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6427ac_tool_warned=yes ;;
6428esac
6429 RANLIB=$ac_ct_RANLIB
6430 fi
bec39cab
AC
6431else
6432 RANLIB="$ac_cv_prog_RANLIB"
6433fi
6434
6435for ac_prog in 'bison -y' byacc
6436do
6437 # Extract the first word of "$ac_prog", so it can be a program name with args.
6438set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6440$as_echo_n "checking for $ac_word... " >&6; }
6441if test "${ac_cv_prog_YACC+set}" = set; then :
6442 $as_echo_n "(cached) " >&6
bec39cab
AC
6443else
6444 if test -n "$YACC"; then
6445 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6446else
6447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6448for as_dir in $PATH
6449do
6450 IFS=$as_save_IFS
6451 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6452 for ac_exec_ext in '' $ac_executable_extensions; do
6453 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6454 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6455 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6456 break 2
6457 fi
6458done
81ecdfbb
RW
6459 done
6460IFS=$as_save_IFS
bec39cab
AC
6461
6462fi
6463fi
6464YACC=$ac_cv_prog_YACC
6465if test -n "$YACC"; then
81ecdfbb
RW
6466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6467$as_echo "$YACC" >&6; }
bec39cab 6468else
81ecdfbb
RW
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; }
bec39cab
AC
6471fi
6472
81ecdfbb 6473
bec39cab
AC
6474 test -n "$YACC" && break
6475done
6476test -n "$YACC" || YACC="yacc"
6477
6478
6479if test -n "$ac_tool_prefix"; then
6480 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6481set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6483$as_echo_n "checking for $ac_word... " >&6; }
6484if test "${ac_cv_prog_AR+set}" = set; then :
6485 $as_echo_n "(cached) " >&6
bec39cab
AC
6486else
6487 if test -n "$AR"; then
6488 ac_cv_prog_AR="$AR" # Let the user override the test.
6489else
6490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491for as_dir in $PATH
6492do
6493 IFS=$as_save_IFS
6494 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6495 for ac_exec_ext in '' $ac_executable_extensions; do
6496 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6497 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6499 break 2
6500 fi
6501done
81ecdfbb
RW
6502 done
6503IFS=$as_save_IFS
bec39cab
AC
6504
6505fi
6506fi
6507AR=$ac_cv_prog_AR
6508if test -n "$AR"; then
81ecdfbb
RW
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6510$as_echo "$AR" >&6; }
bec39cab 6511else
81ecdfbb
RW
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; }
bec39cab
AC
6514fi
6515
81ecdfbb 6516
bec39cab
AC
6517fi
6518if test -z "$ac_cv_prog_AR"; then
6519 ac_ct_AR=$AR
6520 # Extract the first word of "ar", so it can be a program name with args.
6521set dummy ar; ac_word=$2
81ecdfbb
RW
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6523$as_echo_n "checking for $ac_word... " >&6; }
6524if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6525 $as_echo_n "(cached) " >&6
bec39cab
AC
6526else
6527 if test -n "$ac_ct_AR"; then
6528 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6529else
6530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6531for as_dir in $PATH
6532do
6533 IFS=$as_save_IFS
6534 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6535 for ac_exec_ext in '' $ac_executable_extensions; do
6536 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6537 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6538 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6539 break 2
6540 fi
6541done
81ecdfbb
RW
6542 done
6543IFS=$as_save_IFS
bec39cab
AC
6544
6545fi
6546fi
6547ac_ct_AR=$ac_cv_prog_ac_ct_AR
6548if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6550$as_echo "$ac_ct_AR" >&6; }
bec39cab 6551else
81ecdfbb
RW
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6553$as_echo "no" >&6; }
bec39cab
AC
6554fi
6555
81ecdfbb
RW
6556 if test "x$ac_ct_AR" = x; then
6557 AR=""
6558 else
6559 case $cross_compiling:$ac_tool_warned in
6560yes:)
6561{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6562$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6563ac_tool_warned=yes ;;
6564esac
6565 AR=$ac_ct_AR
6566 fi
bec39cab
AC
6567else
6568 AR="$ac_cv_prog_AR"
6569fi
6570
6571if test -n "$ac_tool_prefix"; then
6572 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6573set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6575$as_echo_n "checking for $ac_word... " >&6; }
6576if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6577 $as_echo_n "(cached) " >&6
bec39cab
AC
6578else
6579 if test -n "$DLLTOOL"; then
6580 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6581else
6582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6583for as_dir in $PATH
6584do
6585 IFS=$as_save_IFS
6586 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6587 for ac_exec_ext in '' $ac_executable_extensions; do
6588 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6589 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6591 break 2
6592 fi
6593done
81ecdfbb
RW
6594 done
6595IFS=$as_save_IFS
bec39cab
AC
6596
6597fi
6598fi
6599DLLTOOL=$ac_cv_prog_DLLTOOL
6600if test -n "$DLLTOOL"; then
81ecdfbb
RW
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6602$as_echo "$DLLTOOL" >&6; }
bec39cab 6603else
81ecdfbb
RW
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; }
bec39cab
AC
6606fi
6607
81ecdfbb 6608
bec39cab
AC
6609fi
6610if test -z "$ac_cv_prog_DLLTOOL"; then
6611 ac_ct_DLLTOOL=$DLLTOOL
6612 # Extract the first word of "dlltool", so it can be a program name with args.
6613set dummy dlltool; ac_word=$2
81ecdfbb
RW
6614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6615$as_echo_n "checking for $ac_word... " >&6; }
6616if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6617 $as_echo_n "(cached) " >&6
bec39cab
AC
6618else
6619 if test -n "$ac_ct_DLLTOOL"; then
6620 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6621else
6622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6623for as_dir in $PATH
6624do
6625 IFS=$as_save_IFS
6626 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6627 for ac_exec_ext in '' $ac_executable_extensions; do
6628 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6629 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6631 break 2
6632 fi
6633done
81ecdfbb
RW
6634 done
6635IFS=$as_save_IFS
bec39cab
AC
6636
6637fi
6638fi
6639ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6640if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6642$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6643else
81ecdfbb
RW
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645$as_echo "no" >&6; }
bec39cab
AC
6646fi
6647
81ecdfbb
RW
6648 if test "x$ac_ct_DLLTOOL" = x; then
6649 DLLTOOL=""
6650 else
6651 case $cross_compiling:$ac_tool_warned in
6652yes:)
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6655ac_tool_warned=yes ;;
6656esac
6657 DLLTOOL=$ac_ct_DLLTOOL
6658 fi
bec39cab
AC
6659else
6660 DLLTOOL="$ac_cv_prog_DLLTOOL"
6661fi
6662
6663if test -n "$ac_tool_prefix"; then
6664 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6665set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6667$as_echo_n "checking for $ac_word... " >&6; }
6668if test "${ac_cv_prog_WINDRES+set}" = set; then :
6669 $as_echo_n "(cached) " >&6
bec39cab
AC
6670else
6671 if test -n "$WINDRES"; then
6672 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6673else
6674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6675for as_dir in $PATH
6676do
6677 IFS=$as_save_IFS
6678 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6679 for ac_exec_ext in '' $ac_executable_extensions; do
6680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6681 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6683 break 2
6684 fi
6685done
81ecdfbb
RW
6686 done
6687IFS=$as_save_IFS
bec39cab
AC
6688
6689fi
6690fi
6691WINDRES=$ac_cv_prog_WINDRES
6692if test -n "$WINDRES"; then
81ecdfbb
RW
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6694$as_echo "$WINDRES" >&6; }
bec39cab 6695else
81ecdfbb
RW
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697$as_echo "no" >&6; }
bec39cab
AC
6698fi
6699
81ecdfbb 6700
bec39cab
AC
6701fi
6702if test -z "$ac_cv_prog_WINDRES"; then
6703 ac_ct_WINDRES=$WINDRES
6704 # Extract the first word of "windres", so it can be a program name with args.
6705set dummy windres; ac_word=$2
81ecdfbb
RW
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6709 $as_echo_n "(cached) " >&6
bec39cab
AC
6710else
6711 if test -n "$ac_ct_WINDRES"; then
6712 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6713else
6714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6715for as_dir in $PATH
6716do
6717 IFS=$as_save_IFS
6718 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6719 for ac_exec_ext in '' $ac_executable_extensions; do
6720 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6721 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6723 break 2
6724 fi
6725done
81ecdfbb
RW
6726 done
6727IFS=$as_save_IFS
bec39cab
AC
6728
6729fi
6730fi
6731ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6732if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6734$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6735else
81ecdfbb
RW
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6737$as_echo "no" >&6; }
c906108c 6738fi
bec39cab 6739
81ecdfbb
RW
6740 if test "x$ac_ct_WINDRES" = x; then
6741 WINDRES=""
6742 else
6743 case $cross_compiling:$ac_tool_warned in
6744yes:)
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6747ac_tool_warned=yes ;;
6748esac
6749 WINDRES=$ac_ct_WINDRES
6750 fi
c906108c 6751else
bec39cab 6752 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6753fi
6754
bec39cab 6755
036c3acb
TS
6756case $host_os in
6757 gnu*)
6758 # Needed for GNU Hurd hosts.
6759 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6760 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6761set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6763$as_echo_n "checking for $ac_word... " >&6; }
6764if test "${ac_cv_prog_MIG+set}" = set; then :
6765 $as_echo_n "(cached) " >&6
c906108c 6766else
bec39cab
AC
6767 if test -n "$MIG"; then
6768 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6769else
6770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6771for as_dir in $PATH
6772do
6773 IFS=$as_save_IFS
6774 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6775 for ac_exec_ext in '' $ac_executable_extensions; do
6776 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6777 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6779 break 2
6780 fi
6781done
81ecdfbb
RW
6782 done
6783IFS=$as_save_IFS
bec39cab 6784
c906108c 6785fi
bec39cab
AC
6786fi
6787MIG=$ac_cv_prog_MIG
6788if test -n "$MIG"; then
81ecdfbb
RW
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6790$as_echo "$MIG" >&6; }
c906108c 6791else
81ecdfbb
RW
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6793$as_echo "no" >&6; }
c906108c
SS
6794fi
6795
81ecdfbb 6796
bec39cab
AC
6797fi
6798if test -z "$ac_cv_prog_MIG"; then
6799 ac_ct_MIG=$MIG
6800 # Extract the first word of "mig", so it can be a program name with args.
6801set dummy mig; ac_word=$2
81ecdfbb
RW
6802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6803$as_echo_n "checking for $ac_word... " >&6; }
6804if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6805 $as_echo_n "(cached) " >&6
bec39cab
AC
6806else
6807 if test -n "$ac_ct_MIG"; then
6808 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6809else
6810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6811for as_dir in $PATH
6812do
6813 IFS=$as_save_IFS
6814 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6815 for ac_exec_ext in '' $ac_executable_extensions; do
6816 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6817 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6819 break 2
6820 fi
6821done
81ecdfbb
RW
6822 done
6823IFS=$as_save_IFS
c906108c 6824
bec39cab
AC
6825fi
6826fi
6827ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6828if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6830$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6831else
81ecdfbb
RW
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
bec39cab 6834fi
c906108c 6835
81ecdfbb
RW
6836 if test "x$ac_ct_MIG" = x; then
6837 MIG=""
6838 else
6839 case $cross_compiling:$ac_tool_warned in
6840yes:)
6841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6843ac_tool_warned=yes ;;
6844esac
6845 MIG=$ac_ct_MIG
6846 fi
bec39cab
AC
6847else
6848 MIG="$ac_cv_prog_MIG"
6849fi
c906108c 6850
036c3acb
TS
6851 if test x"$MIG" = x; then
6852 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6853 fi
6854 ;;
6855esac
c906108c 6856
bec39cab
AC
6857# ---------------------- #
6858# Checks for libraries. #
6859# ---------------------- #
c906108c 6860
bec39cab 6861# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6863$as_echo_n "checking for main in -lm... " >&6; }
6864if test "${ac_cv_lib_m_main+set}" = set; then :
6865 $as_echo_n "(cached) " >&6
bec39cab
AC
6866else
6867 ac_check_lib_save_LIBS=$LIBS
6868LIBS="-lm $LIBS"
81ecdfbb 6869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6870/* end confdefs.h. */
c906108c 6871
c906108c 6872
bec39cab
AC
6873int
6874main ()
6875{
81ecdfbb 6876return main ();
bec39cab
AC
6877 ;
6878 return 0;
6879}
6880_ACEOF
81ecdfbb 6881if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6882 ac_cv_lib_m_main=yes
6883else
81ecdfbb 6884 ac_cv_lib_m_main=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_m_main" >&5
6891$as_echo "$ac_cv_lib_m_main" >&6; }
6892if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6893 cat >>confdefs.h <<_ACEOF
6894#define HAVE_LIBM 1
6895_ACEOF
6896
6897 LIBS="-lm $LIBS"
c906108c 6898
c906108c 6899fi
bec39cab
AC
6900
6901
6902# We need to link with -lw to get `wctype' on Solaris before Solaris
6903# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6904# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6905# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6906ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6907if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6908
c906108c 6909else
81ecdfbb
RW
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6911$as_echo_n "checking for wctype in -lw... " >&6; }
6912if test "${ac_cv_lib_w_wctype+set}" = set; then :
6913 $as_echo_n "(cached) " >&6
bec39cab
AC
6914else
6915 ac_check_lib_save_LIBS=$LIBS
6916LIBS="-lw $LIBS"
81ecdfbb 6917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6918/* end confdefs.h. */
c906108c 6919
81ecdfbb
RW
6920/* Override any GCC internal prototype to avoid an error.
6921 Use char because int might match the return type of a GCC
6922 builtin and then its argument prototype would still apply. */
bec39cab
AC
6923#ifdef __cplusplus
6924extern "C"
6925#endif
bec39cab
AC
6926char wctype ();
6927int
6928main ()
6929{
81ecdfbb 6930return wctype ();
bec39cab
AC
6931 ;
6932 return 0;
6933}
6934_ACEOF
81ecdfbb 6935if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6936 ac_cv_lib_w_wctype=yes
6937else
81ecdfbb 6938 ac_cv_lib_w_wctype=no
bec39cab 6939fi
81ecdfbb
RW
6940rm -f core conftest.err conftest.$ac_objext \
6941 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6942LIBS=$ac_check_lib_save_LIBS
6943fi
81ecdfbb
RW
6944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6945$as_echo "$ac_cv_lib_w_wctype" >&6; }
6946if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6947 cat >>confdefs.h <<_ACEOF
6948#define HAVE_LIBW 1
6949_ACEOF
c906108c 6950
bec39cab 6951 LIBS="-lw $LIBS"
c906108c 6952
bec39cab 6953fi
c906108c 6954
bec39cab 6955fi
c906108c 6956
ddc9cd0f 6957
bec39cab 6958# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6960$as_echo_n "checking for library containing gethostbyname... " >&6; }
6961if test "${ac_cv_search_gethostbyname+set}" = set; then :
6962 $as_echo_n "(cached) " >&6
bec39cab
AC
6963else
6964 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6966/* end confdefs.h. */
ddc9cd0f 6967
81ecdfbb
RW
6968/* Override any GCC internal prototype to avoid an error.
6969 Use char because int might match the return type of a GCC
6970 builtin and then its argument prototype would still apply. */
bec39cab
AC
6971#ifdef __cplusplus
6972extern "C"
6973#endif
bec39cab
AC
6974char gethostbyname ();
6975int
6976main ()
6977{
81ecdfbb 6978return gethostbyname ();
bec39cab
AC
6979 ;
6980 return 0;
6981}
6982_ACEOF
81ecdfbb
RW
6983for ac_lib in '' nsl; do
6984 if test -z "$ac_lib"; then
6985 ac_res="none required"
6986 else
6987 ac_res=-l$ac_lib
b4e70030 6988 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6989 fi
6990 if ac_fn_c_try_link "$LINENO"; then :
6991 ac_cv_search_gethostbyname=$ac_res
6992fi
6993rm -f core conftest.err conftest.$ac_objext \
6994 conftest$ac_exeext
6995 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6996 break
6997fi
6998done
6999if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7000
bec39cab 7001else
81ecdfbb 7002 ac_cv_search_gethostbyname=no
bec39cab 7003fi
81ecdfbb 7004rm conftest.$ac_ext
bec39cab
AC
7005LIBS=$ac_func_search_save_LIBS
7006fi
81ecdfbb
RW
7007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7008$as_echo "$ac_cv_search_gethostbyname" >&6; }
7009ac_res=$ac_cv_search_gethostbyname
7010if test "$ac_res" != no; then :
7011 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7012
bec39cab 7013fi
96baa820 7014
c906108c 7015
b4e70030 7016# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7018$as_echo_n "checking for library containing socketpair... " >&6; }
7019if test "${ac_cv_search_socketpair+set}" = set; then :
7020 $as_echo_n "(cached) " >&6
b4e70030
JB
7021else
7022 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7024/* end confdefs.h. */
7025
81ecdfbb
RW
7026/* Override any GCC internal prototype to avoid an error.
7027 Use char because int might match the return type of a GCC
7028 builtin and then its argument prototype would still apply. */
b4e70030
JB
7029#ifdef __cplusplus
7030extern "C"
7031#endif
b4e70030
JB
7032char socketpair ();
7033int
7034main ()
7035{
81ecdfbb 7036return socketpair ();
b4e70030
JB
7037 ;
7038 return 0;
7039}
7040_ACEOF
81ecdfbb
RW
7041for ac_lib in '' socket; do
7042 if test -z "$ac_lib"; then
7043 ac_res="none required"
7044 else
7045 ac_res=-l$ac_lib
b4e70030 7046 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7047 fi
7048 if ac_fn_c_try_link "$LINENO"; then :
7049 ac_cv_search_socketpair=$ac_res
7050fi
7051rm -f core conftest.err conftest.$ac_objext \
7052 conftest$ac_exeext
7053 if test "${ac_cv_search_socketpair+set}" = set; then :
7054 break
7055fi
7056done
7057if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7058
b4e70030 7059else
81ecdfbb 7060 ac_cv_search_socketpair=no
b4e70030 7061fi
81ecdfbb 7062rm conftest.$ac_ext
b4e70030
JB
7063LIBS=$ac_func_search_save_LIBS
7064fi
81ecdfbb
RW
7065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7066$as_echo "$ac_cv_search_socketpair" >&6; }
7067ac_res=$ac_cv_search_socketpair
7068if test "$ac_res" != no; then :
7069 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7070
7071fi
7072
7073
233a11ab 7074# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7075
711a72d3 7076 # Use the system's zlib library.
39f3de7c
L
7077 zlibdir="-L\$(top_builddir)/../zlib"
7078 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7079
711a72d3
L
7080# Check whether --with-system-zlib was given.
7081if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7082 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7083 zlibdir=
7084 zlibinc=
7085 fi
b040ad30 7086
233a11ab 7087fi
233a11ab 7088
233a11ab 7089
233a11ab 7090
b040ad30 7091
233a11ab 7092
25268153
JB
7093# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7095$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7096if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7097 $as_echo_n "(cached) " >&6
7098else
7099 ac_func_search_save_LIBS=$LIBS
7100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7101/* end confdefs.h. */
7102
7103/* Override any GCC internal prototype to avoid an error.
7104 Use char because int might match the return type of a GCC
7105 builtin and then its argument prototype would still apply. */
7106#ifdef __cplusplus
7107extern "C"
7108#endif
7109char kinfo_getvmmap ();
7110int
7111main ()
7112{
7113return kinfo_getvmmap ();
7114 ;
7115 return 0;
7116}
7117_ACEOF
7118for ac_lib in '' util; do
7119 if test -z "$ac_lib"; then
7120 ac_res="none required"
7121 else
7122 ac_res=-l$ac_lib
7123 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7124 fi
7125 if ac_fn_c_try_link "$LINENO"; then :
7126 ac_cv_search_kinfo_getvmmap=$ac_res
7127fi
7128rm -f core conftest.err conftest.$ac_objext \
7129 conftest$ac_exeext
7130 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7131 break
7132fi
7133done
7134if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7135
7136else
7137 ac_cv_search_kinfo_getvmmap=no
7138fi
7139rm conftest.$ac_ext
7140LIBS=$ac_func_search_save_LIBS
7141fi
7142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7143$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7144ac_res=$ac_cv_search_kinfo_getvmmap
7145if test "$ac_res" != no; then :
7146 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7147
7148$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7149
7150fi
7151
7152
77f120bf 7153
016a3251
DD
7154 if test "X$prefix" = "XNONE"; then
7155 acl_final_prefix="$ac_default_prefix"
7156 else
7157 acl_final_prefix="$prefix"
7158 fi
7159 if test "X$exec_prefix" = "XNONE"; then
7160 acl_final_exec_prefix='${prefix}'
7161 else
7162 acl_final_exec_prefix="$exec_prefix"
7163 fi
7164 acl_save_prefix="$prefix"
7165 prefix="$acl_final_prefix"
7166 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7167 prefix="$acl_save_prefix"
7168
7169
7170# Check whether --with-gnu-ld was given.
7171if test "${with_gnu_ld+set}" = set; then :
7172 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7173else
7174 with_gnu_ld=no
7175fi
7176
7177# Prepare PATH_SEPARATOR.
7178# The user is always right.
7179if test "${PATH_SEPARATOR+set}" != set; then
7180 echo "#! /bin/sh" >conf$$.sh
7181 echo "exit 0" >>conf$$.sh
7182 chmod +x conf$$.sh
7183 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7184 PATH_SEPARATOR=';'
7185 else
7186 PATH_SEPARATOR=:
7187 fi
7188 rm -f conf$$.sh
7189fi
7190ac_prog=ld
7191if test "$GCC" = yes; then
7192 # Check if gcc -print-prog-name=ld gives a path.
7193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7194$as_echo_n "checking for ld used by GCC... " >&6; }
7195 case $host in
7196 *-*-mingw*)
7197 # gcc leaves a trailing carriage return which upsets mingw
7198 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7199 *)
7200 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7201 esac
7202 case $ac_prog in
7203 # Accept absolute paths.
7204 [\\/]* | [A-Za-z]:[\\/]*)
7205 re_direlt='/[^/][^/]*/\.\./'
7206 # Canonicalize the path of ld
7207 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7208 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7209 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7210 done
7211 test -z "$LD" && LD="$ac_prog"
7212 ;;
7213 "")
7214 # If it fails, then pretend we aren't using GCC.
7215 ac_prog=ld
7216 ;;
7217 *)
7218 # If it is relative, then search for the first ld in PATH.
7219 with_gnu_ld=unknown
7220 ;;
7221 esac
7222elif test "$with_gnu_ld" = yes; then
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7224$as_echo_n "checking for GNU ld... " >&6; }
7225else
7226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7227$as_echo_n "checking for non-GNU ld... " >&6; }
7228fi
7229if test "${acl_cv_path_LD+set}" = set; then :
7230 $as_echo_n "(cached) " >&6
7231else
7232 if test -z "$LD"; then
7233 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7234 for ac_dir in $PATH; do
7235 test -z "$ac_dir" && ac_dir=.
7236 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7237 acl_cv_path_LD="$ac_dir/$ac_prog"
7238 # Check to see if the program is GNU ld. I'd rather use --version,
7239 # but apparently some GNU ld's only accept -v.
7240 # Break only if it was the GNU/non-GNU ld that we prefer.
7241 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7242 test "$with_gnu_ld" != no && break
7243 else
7244 test "$with_gnu_ld" != yes && break
7245 fi
7246 fi
7247 done
7248 IFS="$ac_save_ifs"
7249else
7250 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7251fi
7252fi
7253
7254LD="$acl_cv_path_LD"
7255if test -n "$LD"; then
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7257$as_echo "$LD" >&6; }
7258else
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7260$as_echo "no" >&6; }
7261fi
7262test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7264$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7265if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7266 $as_echo_n "(cached) " >&6
7267else
7268 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7269if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7270 acl_cv_prog_gnu_ld=yes
7271else
7272 acl_cv_prog_gnu_ld=no
7273fi
7274fi
7275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7276$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7277with_gnu_ld=$acl_cv_prog_gnu_ld
7278
7279
7280
7281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7282$as_echo_n "checking for shared library run path origin... " >&6; }
7283if test "${acl_cv_rpath+set}" = set; then :
7284 $as_echo_n "(cached) " >&6
7285else
7286
7287 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7288 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7289 . ./conftest.sh
7290 rm -f ./conftest.sh
7291 acl_cv_rpath=done
7292
7293fi
7294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7295$as_echo "$acl_cv_rpath" >&6; }
7296 wl="$acl_cv_wl"
7297 libext="$acl_cv_libext"
7298 shlibext="$acl_cv_shlibext"
7299 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7300 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7301 hardcode_direct="$acl_cv_hardcode_direct"
7302 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7303 # Check whether --enable-rpath was given.
7304if test "${enable_rpath+set}" = set; then :
7305 enableval=$enable_rpath; :
7306else
7307 enable_rpath=yes
7308fi
7309
7310
7311
7312
7313
7314
7315
7316
7317 use_additional=yes
7318
7319 acl_save_prefix="$prefix"
7320 prefix="$acl_final_prefix"
7321 acl_save_exec_prefix="$exec_prefix"
7322 exec_prefix="$acl_final_exec_prefix"
7323
7324 eval additional_includedir=\"$includedir\"
7325 eval additional_libdir=\"$libdir\"
7326
7327 exec_prefix="$acl_save_exec_prefix"
7328 prefix="$acl_save_prefix"
77f120bf 7329
6c7a06a3 7330
81ecdfbb
RW
7331# Check whether --with-libiconv-prefix was given.
7332if test "${with_libiconv_prefix+set}" = set; then :
7333 withval=$with_libiconv_prefix;
016a3251
DD
7334 if test "X$withval" = "Xno"; then
7335 use_additional=no
7336 else
7337 if test "X$withval" = "X"; then
7338
7339 acl_save_prefix="$prefix"
7340 prefix="$acl_final_prefix"
7341 acl_save_exec_prefix="$exec_prefix"
7342 exec_prefix="$acl_final_exec_prefix"
7343
7344 eval additional_includedir=\"$includedir\"
7345 eval additional_libdir=\"$libdir\"
7346
7347 exec_prefix="$acl_save_exec_prefix"
7348 prefix="$acl_save_prefix"
7349
7350 else
7351 additional_includedir="$withval/include"
7352 additional_libdir="$withval/lib"
7353 fi
7354 fi
6c7a06a3 7355
81ecdfbb
RW
7356fi
7357
016a3251
DD
7358 LIBICONV=
7359 LTLIBICONV=
7360 INCICONV=
7361 rpathdirs=
7362 ltrpathdirs=
7363 names_already_handled=
7364 names_next_round='iconv '
7365 while test -n "$names_next_round"; do
7366 names_this_round="$names_next_round"
7367 names_next_round=
7368 for name in $names_this_round; do
7369 already_handled=
7370 for n in $names_already_handled; do
7371 if test "$n" = "$name"; then
7372 already_handled=yes
7373 break
7374 fi
7375 done
7376 if test -z "$already_handled"; then
7377 names_already_handled="$names_already_handled $name"
7378 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7379 eval value=\"\$HAVE_LIB$uppername\"
7380 if test -n "$value"; then
7381 if test "$value" = yes; then
7382 eval value=\"\$LIB$uppername\"
7383 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7384 eval value=\"\$LTLIB$uppername\"
7385 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7386 else
7387 :
7388 fi
7389 else
7390 found_dir=
7391 found_la=
7392 found_so=
7393 found_a=
7394 if test $use_additional = yes; then
7395 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7396 found_dir="$additional_libdir"
7397 found_so="$additional_libdir/lib$name.$shlibext"
7398 if test -f "$additional_libdir/lib$name.la"; then
7399 found_la="$additional_libdir/lib$name.la"
7400 fi
7401 else
7402 if test -f "$additional_libdir/lib$name.$libext"; then
7403 found_dir="$additional_libdir"
7404 found_a="$additional_libdir/lib$name.$libext"
7405 if test -f "$additional_libdir/lib$name.la"; then
7406 found_la="$additional_libdir/lib$name.la"
7407 fi
7408 fi
7409 fi
7410 fi
7411 if test "X$found_dir" = "X"; then
7412 for x in $LDFLAGS $LTLIBICONV; do
7413
7414 acl_save_prefix="$prefix"
7415 prefix="$acl_final_prefix"
7416 acl_save_exec_prefix="$exec_prefix"
7417 exec_prefix="$acl_final_exec_prefix"
7418 eval x=\"$x\"
7419 exec_prefix="$acl_save_exec_prefix"
7420 prefix="$acl_save_prefix"
7421
7422 case "$x" in
7423 -L*)
7424 dir=`echo "X$x" | sed -e 's/^X-L//'`
7425 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7426 found_dir="$dir"
7427 found_so="$dir/lib$name.$shlibext"
7428 if test -f "$dir/lib$name.la"; then
7429 found_la="$dir/lib$name.la"
7430 fi
7431 else
7432 if test -f "$dir/lib$name.$libext"; then
7433 found_dir="$dir"
7434 found_a="$dir/lib$name.$libext"
7435 if test -f "$dir/lib$name.la"; then
7436 found_la="$dir/lib$name.la"
7437 fi
7438 fi
7439 fi
7440 ;;
7441 esac
7442 if test "X$found_dir" != "X"; then
7443 break
7444 fi
7445 done
7446 fi
7447 if test "X$found_dir" != "X"; then
7448 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7449 if test "X$found_so" != "X"; then
7450 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7451 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7452 else
7453 haveit=
7454 for x in $ltrpathdirs; do
7455 if test "X$x" = "X$found_dir"; then
7456 haveit=yes
7457 break
7458 fi
7459 done
7460 if test -z "$haveit"; then
7461 ltrpathdirs="$ltrpathdirs $found_dir"
7462 fi
7463 if test "$hardcode_direct" = yes; then
7464 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7465 else
7466 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7467 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7468 haveit=
7469 for x in $rpathdirs; do
7470 if test "X$x" = "X$found_dir"; then
7471 haveit=yes
7472 break
7473 fi
7474 done
7475 if test -z "$haveit"; then
7476 rpathdirs="$rpathdirs $found_dir"
7477 fi
7478 else
7479 haveit=
7480 for x in $LDFLAGS $LIBICONV; do
7481
7482 acl_save_prefix="$prefix"
7483 prefix="$acl_final_prefix"
7484 acl_save_exec_prefix="$exec_prefix"
7485 exec_prefix="$acl_final_exec_prefix"
7486 eval x=\"$x\"
7487 exec_prefix="$acl_save_exec_prefix"
7488 prefix="$acl_save_prefix"
7489
7490 if test "X$x" = "X-L$found_dir"; then
7491 haveit=yes
7492 break
7493 fi
7494 done
7495 if test -z "$haveit"; then
7496 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7497 fi
7498 if test "$hardcode_minus_L" != no; then
7499 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7500 else
7501 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7502 fi
7503 fi
7504 fi
7505 fi
7506 else
7507 if test "X$found_a" != "X"; then
7508 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7509 else
7510 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7511 fi
7512 fi
7513 additional_includedir=
7514 case "$found_dir" in
7515 */lib | */lib/)
7516 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7517 additional_includedir="$basedir/include"
7518 ;;
7519 esac
7520 if test "X$additional_includedir" != "X"; then
7521 if test "X$additional_includedir" != "X/usr/include"; then
7522 haveit=
7523 if test "X$additional_includedir" = "X/usr/local/include"; then
7524 if test -n "$GCC"; then
7525 case $host_os in
7526 linux*) haveit=yes;;
7527 esac
7528 fi
7529 fi
7530 if test -z "$haveit"; then
7531 for x in $CPPFLAGS $INCICONV; do
7532
7533 acl_save_prefix="$prefix"
7534 prefix="$acl_final_prefix"
7535 acl_save_exec_prefix="$exec_prefix"
7536 exec_prefix="$acl_final_exec_prefix"
7537 eval x=\"$x\"
7538 exec_prefix="$acl_save_exec_prefix"
7539 prefix="$acl_save_prefix"
7540
7541 if test "X$x" = "X-I$additional_includedir"; then
7542 haveit=yes
7543 break
7544 fi
7545 done
7546 if test -z "$haveit"; then
7547 if test -d "$additional_includedir"; then
7548 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7549 fi
7550 fi
7551 fi
7552 fi
7553 fi
7554 if test -n "$found_la"; then
7555 save_libdir="$libdir"
7556 case "$found_la" in
7557 */* | *\\*) . "$found_la" ;;
7558 *) . "./$found_la" ;;
7559 esac
7560 libdir="$save_libdir"
7561 for dep in $dependency_libs; do
7562 case "$dep" in
7563 -L*)
7564 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7565 if test "X$additional_libdir" != "X/usr/lib"; then
7566 haveit=
7567 if test "X$additional_libdir" = "X/usr/local/lib"; then
7568 if test -n "$GCC"; then
7569 case $host_os in
7570 linux*) haveit=yes;;
7571 esac
7572 fi
7573 fi
7574 if test -z "$haveit"; then
7575 haveit=
7576 for x in $LDFLAGS $LIBICONV; do
7577
7578 acl_save_prefix="$prefix"
7579 prefix="$acl_final_prefix"
7580 acl_save_exec_prefix="$exec_prefix"
7581 exec_prefix="$acl_final_exec_prefix"
7582 eval x=\"$x\"
7583 exec_prefix="$acl_save_exec_prefix"
7584 prefix="$acl_save_prefix"
7585
7586 if test "X$x" = "X-L$additional_libdir"; then
7587 haveit=yes
7588 break
7589 fi
7590 done
7591 if test -z "$haveit"; then
7592 if test -d "$additional_libdir"; then
7593 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7594 fi
7595 fi
7596 haveit=
7597 for x in $LDFLAGS $LTLIBICONV; do
7598
7599 acl_save_prefix="$prefix"
7600 prefix="$acl_final_prefix"
7601 acl_save_exec_prefix="$exec_prefix"
7602 exec_prefix="$acl_final_exec_prefix"
7603 eval x=\"$x\"
7604 exec_prefix="$acl_save_exec_prefix"
7605 prefix="$acl_save_prefix"
7606
7607 if test "X$x" = "X-L$additional_libdir"; then
7608 haveit=yes
7609 break
7610 fi
7611 done
7612 if test -z "$haveit"; then
7613 if test -d "$additional_libdir"; then
7614 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7615 fi
7616 fi
7617 fi
7618 fi
7619 ;;
7620 -R*)
7621 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7622 if test "$enable_rpath" != no; then
7623 haveit=
7624 for x in $rpathdirs; do
7625 if test "X$x" = "X$dir"; then
7626 haveit=yes
7627 break
7628 fi
7629 done
7630 if test -z "$haveit"; then
7631 rpathdirs="$rpathdirs $dir"
7632 fi
7633 haveit=
7634 for x in $ltrpathdirs; do
7635 if test "X$x" = "X$dir"; then
7636 haveit=yes
7637 break
7638 fi
7639 done
7640 if test -z "$haveit"; then
7641 ltrpathdirs="$ltrpathdirs $dir"
7642 fi
7643 fi
7644 ;;
7645 -l*)
7646 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7647 ;;
7648 *.la)
7649 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7650 ;;
7651 *)
7652 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7653 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7654 ;;
7655 esac
7656 done
7657 fi
7658 else
7659 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7660 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7661 fi
7662 fi
7663 fi
7664 done
7665 done
7666 if test "X$rpathdirs" != "X"; then
7667 if test -n "$hardcode_libdir_separator"; then
7668 alldirs=
7669 for found_dir in $rpathdirs; do
7670 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7671 done
7672 acl_save_libdir="$libdir"
7673 libdir="$alldirs"
7674 eval flag=\"$hardcode_libdir_flag_spec\"
7675 libdir="$acl_save_libdir"
7676 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7677 else
7678 for found_dir in $rpathdirs; do
7679 acl_save_libdir="$libdir"
7680 libdir="$found_dir"
7681 eval flag=\"$hardcode_libdir_flag_spec\"
7682 libdir="$acl_save_libdir"
7683 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7684 done
7685 fi
7686 fi
7687 if test "X$ltrpathdirs" != "X"; then
7688 for found_dir in $ltrpathdirs; do
7689 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7690 done
7691 fi
7692
7693
7694
7695
7696
6c7a06a3 7697
6c7a06a3 7698
81ecdfbb
RW
7699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7700$as_echo_n "checking for iconv... " >&6; }
7701if test "${am_cv_func_iconv+set}" = set; then :
7702 $as_echo_n "(cached) " >&6
d542061a 7703else
6c7a06a3
TT
7704
7705 am_cv_func_iconv="no, consider installing GNU libiconv"
7706 am_cv_lib_iconv=no
016a3251
DD
7707 am_save_CPPFLAGS="$CPPFLAGS"
7708 CPPFLAGS="$CPPFLAGS $INCICONV"
7709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7710/* end confdefs.h. */
6c7a06a3
TT
7711#include <stdlib.h>
7712#include <iconv.h>
d542061a
UW
7713int
7714main ()
7715{
6c7a06a3 7716iconv_t cd = iconv_open("","");
016a3251
DD
7717 iconv(cd,NULL,NULL,NULL,NULL);
7718 iconv_close(cd);
d542061a
UW
7719 ;
7720 return 0;
7721}
7722_ACEOF
81ecdfbb 7723if ac_fn_c_try_link "$LINENO"; then :
016a3251 7724 am_cv_func_iconv=yes
d542061a 7725fi
81ecdfbb
RW
7726rm -f core conftest.err conftest.$ac_objext \
7727 conftest$ac_exeext conftest.$ac_ext
016a3251 7728 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7729
016a3251
DD
7730 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7731 for _libs in .libs _libs; do
7732 am_save_CPPFLAGS="$CPPFLAGS"
7733 am_save_LIBS="$LIBS"
7734 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7735 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7737/* end confdefs.h. */
6c7a06a3
TT
7738#include <stdlib.h>
7739#include <iconv.h>
d542061a
UW
7740int
7741main ()
7742{
6c7a06a3 7743iconv_t cd = iconv_open("","");
016a3251
DD
7744 iconv(cd,NULL,NULL,NULL,NULL);
7745 iconv_close(cd);
d542061a
UW
7746 ;
7747 return 0;
7748}
7749_ACEOF
81ecdfbb 7750if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7751 INCICONV="-I../libiconv/include"
7752 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7753 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7754 am_cv_lib_iconv=yes
7755 am_cv_func_iconv=yes
d542061a 7756fi
81ecdfbb
RW
7757rm -f core conftest.err conftest.$ac_objext \
7758 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7759 CPPFLAGS="$am_save_CPPFLAGS"
7760 LIBS="$am_save_LIBS"
7761 if test "$am_cv_func_iconv" = "yes"; then
7762 break
7763 fi
7764 done
77f120bf 7765 fi
94ae1714 7766
4edb1e84 7767 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7768 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7769 am_save_LIBS="$LIBS"
016a3251
DD
7770 CPPFLAGS="$LIBS $INCICONV"
7771 LIBS="$LIBS $LIBICONV"
81ecdfbb 7772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7773/* end confdefs.h. */
6c7a06a3
TT
7774#include <stdlib.h>
7775#include <iconv.h>
bec39cab
AC
7776int
7777main ()
7778{
6c7a06a3
TT
7779iconv_t cd = iconv_open("","");
7780 iconv(cd,NULL,NULL,NULL,NULL);
7781 iconv_close(cd);
bec39cab
AC
7782 ;
7783 return 0;
7784}
7785_ACEOF
81ecdfbb 7786if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7787 am_cv_lib_iconv=yes
6c7a06a3 7788 am_cv_func_iconv=yes
627af7ea 7789fi
81ecdfbb
RW
7790rm -f core conftest.err conftest.$ac_objext \
7791 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7792 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7793 LIBS="$am_save_LIBS"
6c7a06a3
TT
7794 fi
7795
7796fi
81ecdfbb
RW
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7798$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7799 if test "$am_cv_func_iconv" = yes; then
7800
7801$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7802
016a3251 7803 fi
fc3b640d 7804 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7805
7806 for element in $INCICONV; do
7807 haveit=
7808 for x in $CPPFLAGS; do
7809
7810 acl_save_prefix="$prefix"
7811 prefix="$acl_final_prefix"
7812 acl_save_exec_prefix="$exec_prefix"
7813 exec_prefix="$acl_final_exec_prefix"
7814 eval x=\"$x\"
7815 exec_prefix="$acl_save_exec_prefix"
7816 prefix="$acl_save_prefix"
7817
7818 if test "X$x" = "X$element"; then
7819 haveit=yes
7820 break
7821 fi
7822 done
7823 if test -z "$haveit"; then
7824 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7825 fi
7826 done
7827
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7829$as_echo_n "checking how to link with libiconv... " >&6; }
7830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7831$as_echo "$LIBICONV" >&6; }
94ae1714 7832 else
016a3251
DD
7833 LIBICONV=
7834 LTLIBICONV=
fc3b640d 7835 fi
94ae1714 7836
6c7a06a3 7837
6c7a06a3 7838
016a3251 7839 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7841$as_echo_n "checking for iconv declaration... " >&6; }
7842 if test "${am_cv_proto_iconv+set}" = set; then :
7843 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7844else
7845
81ecdfbb 7846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7847/* end confdefs.h. */
7848
6c7a06a3
TT
7849#include <stdlib.h>
7850#include <iconv.h>
7851extern
b4e70030 7852#ifdef __cplusplus
6c7a06a3 7853"C"
b4e70030 7854#endif
6c7a06a3
TT
7855#if defined(__STDC__) || defined(__cplusplus)
7856size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7857#else
7858size_t iconv();
7859#endif
7860
b4e70030
JB
7861int
7862main ()
7863{
6c7a06a3 7864
b4e70030
JB
7865 ;
7866 return 0;
7867}
7868_ACEOF
81ecdfbb 7869if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7870 am_cv_proto_iconv_arg1=""
4e8d927d 7871else
81ecdfbb 7872 am_cv_proto_iconv_arg1="const"
b4e70030 7873fi
81ecdfbb 7874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7875 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);"
7876fi
7877
7878 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7880 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7881$as_echo "${ac_t:-
7882 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7883
7884cat >>confdefs.h <<_ACEOF
7885#define ICONV_CONST $am_cv_proto_iconv_arg1
7886_ACEOF
7887
7888 fi
6c7a06a3
TT
7889
7890
478aac75
DE
7891# GDB may fork/exec the iconv program to get the list of supported character
7892# sets. Allow the user to specify where to find it.
7893# There are several factors affecting the choice of option name:
7894# - There is already --with-libiconv-prefix but we can't use it, it specifies
7895# the build-time location of libiconv files.
7896# - The program we need to find is iconv, which comes with glibc. The user
7897# doesn't necessarily have libiconv installed. Therefore naming this
7898# --with-libiconv-foo feels wrong.
7899# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7900# defined to work on directories not files (though it really doesn't know
7901# the difference).
7902# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7903# with --with-libiconv-prefix.
7904# Putting these together is why the option name is --with-iconv-bin.
7905
7906
7907# Check whether --with-iconv-bin was given.
7908if test "${with_iconv_bin+set}" = set; then :
7909 withval=$with_iconv_bin; iconv_bin="${withval}"
7910
7911cat >>confdefs.h <<_ACEOF
7912#define ICONV_BIN "${iconv_bin}"
7913_ACEOF
7914
7915
7916 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7917 if test "x$prefix" = xNONE; then
7918 test_prefix=/usr/local
7919 else
7920 test_prefix=$prefix
7921 fi
7922 else
7923 test_prefix=$exec_prefix
7924 fi
7925 value=0
7926 case ${iconv_bin} in
7927 "${test_prefix}"|"${test_prefix}/"*|\
7928 '${exec_prefix}'|'${exec_prefix}/'*)
7929 value=1
7930 ;;
7931 esac
7932
7933cat >>confdefs.h <<_ACEOF
7934#define ICONV_BIN_RELOCATABLE $value
7935_ACEOF
7936
7937
7938
7939fi
7940
7941
cb01cfba 7942# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7943if test x"$enable_tui" != xno; then
cb01cfba
JB
7944 prefer_curses=yes
7945fi
7946
7947curses_found=no
7948if test x"$prefer_curses" = xyes; then
7949 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7950 # curses library because the latter might not provide all the
7951 # functionality we need. However, this leads to problems on systems
7952 # where the linker searches /usr/local/lib, but the compiler doesn't
7953 # search /usr/local/include, if ncurses is installed in /usr/local. A
7954 # default installation of ncurses on alpha*-dec-osf* will lead to such
7955 # a situation.
81ecdfbb
RW
7956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7957$as_echo_n "checking for library containing waddstr... " >&6; }
7958if test "${ac_cv_search_waddstr+set}" = set; then :
7959 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7960else
7961 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7963/* end confdefs.h. */
7964
81ecdfbb
RW
7965/* Override any GCC internal prototype to avoid an error.
7966 Use char because int might match the return type of a GCC
7967 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7968#ifdef __cplusplus
7969extern "C"
7970#endif
6c7a06a3
TT
7971char waddstr ();
7972int
7973main ()
7974{
81ecdfbb 7975return waddstr ();
6c7a06a3
TT
7976 ;
7977 return 0;
7978}
7979_ACEOF
81ecdfbb
RW
7980for ac_lib in '' ncurses cursesX curses; do
7981 if test -z "$ac_lib"; then
7982 ac_res="none required"
7983 else
7984 ac_res=-l$ac_lib
7985 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7986 fi
7987 if ac_fn_c_try_link "$LINENO"; then :
7988 ac_cv_search_waddstr=$ac_res
7989fi
7990rm -f core conftest.err conftest.$ac_objext \
7991 conftest$ac_exeext
7992 if test "${ac_cv_search_waddstr+set}" = set; then :
7993 break
7994fi
7995done
7996if test "${ac_cv_search_waddstr+set}" = set; then :
7997
6c7a06a3 7998else
81ecdfbb
RW
7999 ac_cv_search_waddstr=no
8000fi
8001rm conftest.$ac_ext
8002LIBS=$ac_func_search_save_LIBS
8003fi
8004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8005$as_echo "$ac_cv_search_waddstr" >&6; }
8006ac_res=$ac_cv_search_waddstr
8007if test "$ac_res" != no; then :
8008 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8009
8010fi
8011
8012
cb01cfba
JB
8013 if test "$ac_cv_search_waddstr" != no; then
8014 curses_found=yes
8015 fi
8016fi
8017
8018# Check whether we should enable the TUI, but only do so if we really
8019# can.
8020if test x"$enable_tui" != xno; then
8021 if test -d $srcdir/tui; then
8022 if test "$curses_found" != no; then
6c7a06a3
TT
8023 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8024 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8025 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8026 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8027 else
8028 if test x"$enable_tui" = xyes; then
81ecdfbb 8029 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8030 else
81ecdfbb
RW
8031 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8032$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8033 fi
8034 fi
8035 fi
8036fi
8037
8038# Since GDB uses Readline, we need termcap functionality. In many
8039# cases this will be provided by the curses library, but some systems
8040# have a seperate termcap library, or no curses library at all.
8041
8042case $host_os in
8043 cygwin*)
8044 if test -d $srcdir/libtermcap; then
8045 LIBS="../libtermcap/libtermcap.a $LIBS"
8046 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8047 fi ;;
8048 go32* | *djgpp*)
8049 ac_cv_search_tgetent="none required"
8050 ;;
6c7a06a3
TT
8051esac
8052
8053# These are the libraries checked by Readline.
81ecdfbb
RW
8054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8055$as_echo_n "checking for library containing tgetent... " >&6; }
8056if test "${ac_cv_search_tgetent+set}" = set; then :
8057 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8058else
8059 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8061/* end confdefs.h. */
8062
81ecdfbb
RW
8063/* Override any GCC internal prototype to avoid an error.
8064 Use char because int might match the return type of a GCC
8065 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8066#ifdef __cplusplus
8067extern "C"
8068#endif
6c7a06a3
TT
8069char tgetent ();
8070int
8071main ()
8072{
81ecdfbb 8073return tgetent ();
6c7a06a3
TT
8074 ;
8075 return 0;
8076}
8077_ACEOF
81ecdfbb
RW
8078for ac_lib in '' termcap tinfo curses ncurses; do
8079 if test -z "$ac_lib"; then
8080 ac_res="none required"
8081 else
8082 ac_res=-l$ac_lib
6c7a06a3 8083 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8084 fi
8085 if ac_fn_c_try_link "$LINENO"; then :
8086 ac_cv_search_tgetent=$ac_res
8087fi
8088rm -f core conftest.err conftest.$ac_objext \
8089 conftest$ac_exeext
8090 if test "${ac_cv_search_tgetent+set}" = set; then :
8091 break
8092fi
8093done
8094if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8095
6c7a06a3 8096else
81ecdfbb 8097 ac_cv_search_tgetent=no
6c7a06a3 8098fi
81ecdfbb 8099rm conftest.$ac_ext
6c7a06a3
TT
8100LIBS=$ac_func_search_save_LIBS
8101fi
81ecdfbb
RW
8102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8103$as_echo "$ac_cv_search_tgetent" >&6; }
8104ac_res=$ac_cv_search_tgetent
8105if test "$ac_res" != no; then :
8106 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8107
06825bd1
MK
8108fi
8109
06825bd1 8110
bec39cab 8111if test "$ac_cv_search_tgetent" = no; then
7a85168d 8112 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8113fi
8114
3841debe 8115
81ecdfbb
RW
8116# Check whether --with-system-readline was given.
8117if test "${with_system_readline+set}" = set; then :
8118 withval=$with_system_readline;
8119fi
6a30b0a5 8120
6a30b0a5
AS
8121
8122if test "$with_system_readline" = yes; then
8123 READLINE=-lreadline
8124 READLINE_DEPS=
8125 READLINE_CFLAGS=
39037522 8126 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8127else
8128 READLINE='$(READLINE_DIR)/libreadline.a'
8129 READLINE_DEPS='$(READLINE)'
8130 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8131 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8132fi
8133
8134
8135
8136
8137
f997c383
SD
8138# Generate jit-reader.h
8139
8140# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8141TARGET_PTR=
8142
8143# The cast to long int works around a bug in the HP C Compiler
8144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8146# This bug is HP SR number 8606223364.
8147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8148$as_echo_n "checking size of unsigned long long... " >&6; }
8149if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8150 $as_echo_n "(cached) " >&6
8151else
8152 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8153
8154else
8155 if test "$ac_cv_type_unsigned_long_long" = yes; then
8156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8158{ as_fn_set_status 77
8159as_fn_error "cannot compute sizeof (unsigned long long)
8160See \`config.log' for more details." "$LINENO" 5; }; }
8161 else
8162 ac_cv_sizeof_unsigned_long_long=0
8163 fi
8164fi
8165
8166fi
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8168$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8169
8170
8171
8172cat >>confdefs.h <<_ACEOF
8173#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8174_ACEOF
8175
8176
8177# The cast to long int works around a bug in the HP C Compiler
8178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8180# This bug is HP SR number 8606223364.
8181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8182$as_echo_n "checking size of unsigned long... " >&6; }
8183if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8184 $as_echo_n "(cached) " >&6
8185else
8186 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8187
8188else
8189 if test "$ac_cv_type_unsigned_long" = yes; then
8190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8192{ as_fn_set_status 77
8193as_fn_error "cannot compute sizeof (unsigned long)
8194See \`config.log' for more details." "$LINENO" 5; }; }
8195 else
8196 ac_cv_sizeof_unsigned_long=0
8197 fi
8198fi
8199
8200fi
8201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8202$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8203
8204
8205
8206cat >>confdefs.h <<_ACEOF
8207#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8208_ACEOF
8209
8210
8211# The cast to long int works around a bug in the HP C Compiler
8212# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8213# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8214# This bug is HP SR number 8606223364.
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8216$as_echo_n "checking size of unsigned __int128... " >&6; }
8217if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8218 $as_echo_n "(cached) " >&6
8219else
8220 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8221
8222else
8223 if test "$ac_cv_type_unsigned___int128" = yes; then
8224 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8226{ as_fn_set_status 77
8227as_fn_error "cannot compute sizeof (unsigned __int128)
8228See \`config.log' for more details." "$LINENO" 5; }; }
8229 else
8230 ac_cv_sizeof_unsigned___int128=0
8231 fi
8232fi
8233
8234fi
8235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8236$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8237
8238
8239
8240cat >>confdefs.h <<_ACEOF
8241#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8242_ACEOF
8243
8244
8245
8246if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8247 TARGET_PTR="unsigned long"
8248elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8249 TARGET_PTR="unsigned long long"
8250elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8251 TARGET_PTR="unsigned __int128"
8252else
8253 TARGET_PTR="unsigned long"
8254fi
8255
8256
8257ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8258
8259
a2d08b9e
SD
8260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8261$as_echo_n "checking for library containing dlopen... " >&6; }
8262if test "${ac_cv_search_dlopen+set}" = set; then :
8263 $as_echo_n "(cached) " >&6
8264else
8265 ac_func_search_save_LIBS=$LIBS
8266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8267/* end confdefs.h. */
8268
8269/* Override any GCC internal prototype to avoid an error.
8270 Use char because int might match the return type of a GCC
8271 builtin and then its argument prototype would still apply. */
8272#ifdef __cplusplus
8273extern "C"
8274#endif
8275char dlopen ();
8276int
8277main ()
8278{
8279return dlopen ();
8280 ;
8281 return 0;
8282}
8283_ACEOF
8284for ac_lib in '' dl; do
8285 if test -z "$ac_lib"; then
8286 ac_res="none required"
8287 else
8288 ac_res=-l$ac_lib
8289 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8290 fi
8291 if ac_fn_c_try_link "$LINENO"; then :
8292 ac_cv_search_dlopen=$ac_res
8293fi
8294rm -f core conftest.err conftest.$ac_objext \
8295 conftest$ac_exeext
8296 if test "${ac_cv_search_dlopen+set}" = set; then :
8297 break
8298fi
8299done
8300if test "${ac_cv_search_dlopen+set}" = set; then :
8301
8302else
8303 ac_cv_search_dlopen=no
8304fi
8305rm conftest.$ac_ext
8306LIBS=$ac_func_search_save_LIBS
8307fi
8308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8309$as_echo "$ac_cv_search_dlopen" >&6; }
8310ac_res=$ac_cv_search_dlopen
8311if test "$ac_res" != no; then :
8312 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8313
8314fi
8315
8316
39037522 8317
b8e0a31c
SD
8318
8319# Check whether --with-jit-reader-dir was given.
8320if test "${with_jit_reader_dir+set}" = set; then :
8321 withval=$with_jit_reader_dir;
8322 JIT_READER_DIR=$withval
8323else
8324 JIT_READER_DIR=${libdir}/gdb
8325fi
8326
8327
8328 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8329 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8330 ac_define_dir=`eval echo $JIT_READER_DIR`
8331 ac_define_dir=`eval echo $ac_define_dir`
8332
8333cat >>confdefs.h <<_ACEOF
8334#define JIT_READER_DIR "$ac_define_dir"
8335_ACEOF
8336
8337
8338
8339
8340 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8341 if test "x$prefix" = xNONE; then
8342 test_prefix=/usr/local
8343 else
8344 test_prefix=$prefix
8345 fi
8346 else
8347 test_prefix=$exec_prefix
8348 fi
8349 value=0
8350 case ${ac_define_dir} in
8351 "${test_prefix}"|"${test_prefix}/"*|\
8352 '${exec_prefix}'|'${exec_prefix}/'*)
8353 value=1
8354 ;;
8355 esac
8356
8357cat >>confdefs.h <<_ACEOF
8358#define JIT_READER_DIR_RELOCATABLE $value
8359_ACEOF
8360
8361
8362
8363
8364
81ecdfbb
RW
8365# Check whether --with-expat was given.
8366if test "${with_expat+set}" = set; then :
8367 withval=$with_expat;
5c39566f
DJ
8368else
8369 with_expat=auto
81ecdfbb
RW
8370fi
8371
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8373$as_echo_n "checking whether to use expat... " >&6; }
8374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8375$as_echo "$with_expat" >&6; }
5c39566f
DJ
8376
8377if test "${with_expat}" = no; then
81ecdfbb
RW
8378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8379$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8380 HAVE_LIBEXPAT=no
8381else
8382
3841debe
DJ
8383
8384
8385
8386
8387
8388
8389
8390 use_additional=yes
8391
8392 acl_save_prefix="$prefix"
8393 prefix="$acl_final_prefix"
8394 acl_save_exec_prefix="$exec_prefix"
8395 exec_prefix="$acl_final_exec_prefix"
8396
8397 eval additional_includedir=\"$includedir\"
8398 eval additional_libdir=\"$libdir\"
8399
8400 exec_prefix="$acl_save_exec_prefix"
8401 prefix="$acl_save_prefix"
8402
8403
81ecdfbb
RW
8404# Check whether --with-libexpat-prefix was given.
8405if test "${with_libexpat_prefix+set}" = set; then :
8406 withval=$with_libexpat_prefix;
3841debe
DJ
8407 if test "X$withval" = "Xno"; then
8408 use_additional=no
8409 else
8410 if test "X$withval" = "X"; then
8411
8412 acl_save_prefix="$prefix"
8413 prefix="$acl_final_prefix"
8414 acl_save_exec_prefix="$exec_prefix"
8415 exec_prefix="$acl_final_exec_prefix"
8416
8417 eval additional_includedir=\"$includedir\"
8418 eval additional_libdir=\"$libdir\"
8419
8420 exec_prefix="$acl_save_exec_prefix"
8421 prefix="$acl_save_prefix"
8422
8423 else
8424 additional_includedir="$withval/include"
8425 additional_libdir="$withval/lib"
8426 fi
8427 fi
8428
81ecdfbb
RW
8429fi
8430
3841debe
DJ
8431 LIBEXPAT=
8432 LTLIBEXPAT=
8433 INCEXPAT=
8434 rpathdirs=
8435 ltrpathdirs=
8436 names_already_handled=
8437 names_next_round='expat '
8438 while test -n "$names_next_round"; do
8439 names_this_round="$names_next_round"
8440 names_next_round=
8441 for name in $names_this_round; do
8442 already_handled=
8443 for n in $names_already_handled; do
8444 if test "$n" = "$name"; then
8445 already_handled=yes
8446 break
8447 fi
8448 done
8449 if test -z "$already_handled"; then
8450 names_already_handled="$names_already_handled $name"
8451 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8452 eval value=\"\$HAVE_LIB$uppername\"
8453 if test -n "$value"; then
8454 if test "$value" = yes; then
8455 eval value=\"\$LIB$uppername\"
8456 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8457 eval value=\"\$LTLIB$uppername\"
8458 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8459 else
8460 :
8461 fi
8462 else
8463 found_dir=
8464 found_la=
8465 found_so=
8466 found_a=
8467 if test $use_additional = yes; then
8468 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8469 found_dir="$additional_libdir"
8470 found_so="$additional_libdir/lib$name.$shlibext"
8471 if test -f "$additional_libdir/lib$name.la"; then
8472 found_la="$additional_libdir/lib$name.la"
8473 fi
8474 else
8475 if test -f "$additional_libdir/lib$name.$libext"; then
8476 found_dir="$additional_libdir"
8477 found_a="$additional_libdir/lib$name.$libext"
8478 if test -f "$additional_libdir/lib$name.la"; then
8479 found_la="$additional_libdir/lib$name.la"
8480 fi
8481 fi
8482 fi
8483 fi
8484 if test "X$found_dir" = "X"; then
8485 for x in $LDFLAGS $LTLIBEXPAT; do
8486
8487 acl_save_prefix="$prefix"
8488 prefix="$acl_final_prefix"
8489 acl_save_exec_prefix="$exec_prefix"
8490 exec_prefix="$acl_final_exec_prefix"
8491 eval x=\"$x\"
8492 exec_prefix="$acl_save_exec_prefix"
8493 prefix="$acl_save_prefix"
8494
8495 case "$x" in
8496 -L*)
8497 dir=`echo "X$x" | sed -e 's/^X-L//'`
8498 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8499 found_dir="$dir"
8500 found_so="$dir/lib$name.$shlibext"
8501 if test -f "$dir/lib$name.la"; then
8502 found_la="$dir/lib$name.la"
8503 fi
8504 else
8505 if test -f "$dir/lib$name.$libext"; then
8506 found_dir="$dir"
8507 found_a="$dir/lib$name.$libext"
8508 if test -f "$dir/lib$name.la"; then
8509 found_la="$dir/lib$name.la"
8510 fi
8511 fi
8512 fi
8513 ;;
8514 esac
8515 if test "X$found_dir" != "X"; then
8516 break
8517 fi
8518 done
8519 fi
8520 if test "X$found_dir" != "X"; then
8521 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8522 if test "X$found_so" != "X"; then
8523 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8524 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8525 else
8526 haveit=
8527 for x in $ltrpathdirs; do
8528 if test "X$x" = "X$found_dir"; then
8529 haveit=yes
8530 break
8531 fi
8532 done
8533 if test -z "$haveit"; then
8534 ltrpathdirs="$ltrpathdirs $found_dir"
8535 fi
8536 if test "$hardcode_direct" = yes; then
8537 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8538 else
8539 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8540 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8541 haveit=
8542 for x in $rpathdirs; do
8543 if test "X$x" = "X$found_dir"; then
8544 haveit=yes
8545 break
8546 fi
8547 done
8548 if test -z "$haveit"; then
8549 rpathdirs="$rpathdirs $found_dir"
8550 fi
8551 else
8552 haveit=
8553 for x in $LDFLAGS $LIBEXPAT; do
8554
8555 acl_save_prefix="$prefix"
8556 prefix="$acl_final_prefix"
8557 acl_save_exec_prefix="$exec_prefix"
8558 exec_prefix="$acl_final_exec_prefix"
8559 eval x=\"$x\"
8560 exec_prefix="$acl_save_exec_prefix"
8561 prefix="$acl_save_prefix"
8562
8563 if test "X$x" = "X-L$found_dir"; then
8564 haveit=yes
8565 break
8566 fi
8567 done
8568 if test -z "$haveit"; then
8569 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8570 fi
8571 if test "$hardcode_minus_L" != no; then
8572 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8573 else
8574 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8575 fi
8576 fi
8577 fi
8578 fi
8579 else
8580 if test "X$found_a" != "X"; then
8581 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8582 else
8583 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8584 fi
8585 fi
8586 additional_includedir=
8587 case "$found_dir" in
8588 */lib | */lib/)
8589 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8590 additional_includedir="$basedir/include"
8591 ;;
8592 esac
8593 if test "X$additional_includedir" != "X"; then
8594 if test "X$additional_includedir" != "X/usr/include"; then
8595 haveit=
8596 if test "X$additional_includedir" = "X/usr/local/include"; then
8597 if test -n "$GCC"; then
8598 case $host_os in
8599 linux*) haveit=yes;;
8600 esac
8601 fi
8602 fi
8603 if test -z "$haveit"; then
8604 for x in $CPPFLAGS $INCEXPAT; do
8605
8606 acl_save_prefix="$prefix"
8607 prefix="$acl_final_prefix"
8608 acl_save_exec_prefix="$exec_prefix"
8609 exec_prefix="$acl_final_exec_prefix"
8610 eval x=\"$x\"
8611 exec_prefix="$acl_save_exec_prefix"
8612 prefix="$acl_save_prefix"
8613
8614 if test "X$x" = "X-I$additional_includedir"; then
8615 haveit=yes
8616 break
8617 fi
8618 done
8619 if test -z "$haveit"; then
8620 if test -d "$additional_includedir"; then
8621 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8622 fi
8623 fi
8624 fi
8625 fi
8626 fi
8627 if test -n "$found_la"; then
8628 save_libdir="$libdir"
8629 case "$found_la" in
8630 */* | *\\*) . "$found_la" ;;
8631 *) . "./$found_la" ;;
8632 esac
8633 libdir="$save_libdir"
8634 for dep in $dependency_libs; do
8635 case "$dep" in
8636 -L*)
8637 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8638 if test "X$additional_libdir" != "X/usr/lib"; then
8639 haveit=
8640 if test "X$additional_libdir" = "X/usr/local/lib"; then
8641 if test -n "$GCC"; then
8642 case $host_os in
8643 linux*) haveit=yes;;
8644 esac
8645 fi
8646 fi
8647 if test -z "$haveit"; then
8648 haveit=
8649 for x in $LDFLAGS $LIBEXPAT; do
8650
8651 acl_save_prefix="$prefix"
8652 prefix="$acl_final_prefix"
8653 acl_save_exec_prefix="$exec_prefix"
8654 exec_prefix="$acl_final_exec_prefix"
8655 eval x=\"$x\"
8656 exec_prefix="$acl_save_exec_prefix"
8657 prefix="$acl_save_prefix"
8658
8659 if test "X$x" = "X-L$additional_libdir"; then
8660 haveit=yes
8661 break
8662 fi
8663 done
8664 if test -z "$haveit"; then
8665 if test -d "$additional_libdir"; then
8666 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8667 fi
8668 fi
8669 haveit=
8670 for x in $LDFLAGS $LTLIBEXPAT; do
8671
8672 acl_save_prefix="$prefix"
8673 prefix="$acl_final_prefix"
8674 acl_save_exec_prefix="$exec_prefix"
8675 exec_prefix="$acl_final_exec_prefix"
8676 eval x=\"$x\"
8677 exec_prefix="$acl_save_exec_prefix"
8678 prefix="$acl_save_prefix"
8679
8680 if test "X$x" = "X-L$additional_libdir"; then
8681 haveit=yes
8682 break
8683 fi
8684 done
8685 if test -z "$haveit"; then
8686 if test -d "$additional_libdir"; then
8687 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8688 fi
8689 fi
8690 fi
8691 fi
8692 ;;
8693 -R*)
8694 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8695 if test "$enable_rpath" != no; then
8696 haveit=
8697 for x in $rpathdirs; do
8698 if test "X$x" = "X$dir"; then
8699 haveit=yes
8700 break
8701 fi
8702 done
8703 if test -z "$haveit"; then
8704 rpathdirs="$rpathdirs $dir"
8705 fi
8706 haveit=
8707 for x in $ltrpathdirs; do
8708 if test "X$x" = "X$dir"; then
8709 haveit=yes
8710 break
8711 fi
8712 done
8713 if test -z "$haveit"; then
8714 ltrpathdirs="$ltrpathdirs $dir"
8715 fi
8716 fi
8717 ;;
8718 -l*)
8719 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8720 ;;
8721 *.la)
8722 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8723 ;;
8724 *)
8725 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8726 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8727 ;;
81ecdfbb
RW
8728 esac
8729 done
8730 fi
8731 else
8732 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8733 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8734 fi
8735 fi
8736 fi
8737 done
8738 done
8739 if test "X$rpathdirs" != "X"; then
8740 if test -n "$hardcode_libdir_separator"; then
8741 alldirs=
8742 for found_dir in $rpathdirs; do
8743 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8744 done
8745 acl_save_libdir="$libdir"
8746 libdir="$alldirs"
8747 eval flag=\"$hardcode_libdir_flag_spec\"
8748 libdir="$acl_save_libdir"
8749 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8750 else
8751 for found_dir in $rpathdirs; do
8752 acl_save_libdir="$libdir"
8753 libdir="$found_dir"
8754 eval flag=\"$hardcode_libdir_flag_spec\"
8755 libdir="$acl_save_libdir"
8756 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8757 done
8758 fi
8759 fi
8760 if test "X$ltrpathdirs" != "X"; then
8761 for found_dir in $ltrpathdirs; do
8762 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8763 done
8764 fi
a9322a30
TT
8765
8766
81ecdfbb 8767 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8768
81ecdfbb
RW
8769 for element in $INCEXPAT; do
8770 haveit=
8771 for x in $CPPFLAGS; do
a9322a30 8772
81ecdfbb
RW
8773 acl_save_prefix="$prefix"
8774 prefix="$acl_final_prefix"
8775 acl_save_exec_prefix="$exec_prefix"
8776 exec_prefix="$acl_final_exec_prefix"
8777 eval x=\"$x\"
8778 exec_prefix="$acl_save_exec_prefix"
8779 prefix="$acl_save_prefix"
a8111142 8780
81ecdfbb
RW
8781 if test "X$x" = "X$element"; then
8782 haveit=yes
8783 break
8784 fi
8785 done
8786 if test -z "$haveit"; then
8787 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8788 fi
8789 done
a9322a30
TT
8790
8791
81ecdfbb
RW
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8793$as_echo_n "checking for libexpat... " >&6; }
8794if test "${ac_cv_libexpat+set}" = set; then :
8795 $as_echo_n "(cached) " >&6
bec39cab 8796else
bec39cab 8797
81ecdfbb
RW
8798 ac_save_LIBS="$LIBS"
8799 LIBS="$LIBS $LIBEXPAT"
8800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8801/* end confdefs.h. */
81ecdfbb
RW
8802#include "expat.h"
8803int
8804main ()
8805{
8806XML_Parser p = XML_ParserCreate (0);
8807 ;
8808 return 0;
8809}
bec39cab 8810_ACEOF
81ecdfbb
RW
8811if ac_fn_c_try_link "$LINENO"; then :
8812 ac_cv_libexpat=yes
c906108c 8813else
81ecdfbb 8814 ac_cv_libexpat=no
bec39cab 8815fi
81ecdfbb
RW
8816rm -f core conftest.err conftest.$ac_objext \
8817 conftest$ac_exeext conftest.$ac_ext
8818 LIBS="$ac_save_LIBS"
c906108c 8819
95ca63c4 8820fi
81ecdfbb
RW
8821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8822$as_echo "$ac_cv_libexpat" >&6; }
8823 if test "$ac_cv_libexpat" = yes; then
8824 HAVE_LIBEXPAT=yes
bec39cab 8825
81ecdfbb 8826$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8827
81ecdfbb
RW
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8829$as_echo_n "checking how to link with libexpat... " >&6; }
8830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8831$as_echo "$LIBEXPAT" >&6; }
8832 else
8833 HAVE_LIBEXPAT=no
8834 CPPFLAGS="$ac_save_CPPFLAGS"
8835 LIBEXPAT=
8836 LTLIBEXPAT=
8837 fi
95ca63c4
CF
8838
8839
8840
7cb9022a
MK
8841
8842
bec39cab 8843
81ecdfbb
RW
8844 if test "$HAVE_LIBEXPAT" != yes; then
8845 if test "$with_expat" = yes; then
8846 as_fn_error "expat is missing or unusable" "$LINENO" 5
8847 else
8848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8849$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8850 fi
8851 else
8852 save_LIBS=$LIBS
8853 LIBS="$LIBS $LIBEXPAT"
8854 for ac_func in XML_StopParser
8855do :
8856 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8857if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8858 cat >>confdefs.h <<_ACEOF
81ecdfbb 8859#define HAVE_XML_STOPPARSER 1
bec39cab 8860_ACEOF
95ca63c4 8861
bec39cab 8862fi
bec39cab 8863done
95ca63c4 8864
81ecdfbb
RW
8865 LIBS=$save_LIBS
8866 fi
a9322a30
TT
8867fi
8868
d344e670
DE
8869# --------------------- #
8870# Check for libpython. #
8871# --------------------- #
8872
a9322a30 8873
a9322a30
TT
8874
8875
ec685c5e 8876
0c4a4063 8877
81ecdfbb
RW
8878# Check whether --with-python was given.
8879if test "${with_python+set}" = set; then :
8880 withval=$with_python;
bec39cab 8881else
81ecdfbb 8882 with_python=auto
bec39cab 8883fi
bec39cab 8884
81ecdfbb
RW
8885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8886$as_echo_n "checking whether to use python... " >&6; }
8887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8888$as_echo "$with_python" >&6; }
9a156167 8889
81ecdfbb
RW
8890if test "${with_python}" = no; then
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8892$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8893 have_libpython=no
bec39cab 8894else
81ecdfbb 8895 case "${with_python}" in
8c85a4e2 8896 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8897 if test -d ${with_python}; then
8898 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8899 python_prog="${with_python}/bin/python"
0c4a4063 8900 python_prefix=
9c4ea6c5
JB
8901 # If python does not exit ${with_python}/bin, then try in
8902 # ${with_python}. On Windows/MinGW, this is where the Python
8903 # executable is.
8904 if test ! -x "${python_prog}"; then
8905 python_prog="${with_python}/python"
8906 python_prefix=
8907 fi
e7a30f46 8908 if test ! -x "${python_prog}"; then
ec685c5e
DE
8909 # Fall back to gdb 7.0/7.1 behaviour.
8910 python_prog=missing
0c4a4063 8911 python_prefix=${with_python}
ec685c5e 8912 fi
e7a30f46 8913 elif test -x "${with_python}"; then
ec685c5e
DE
8914 # While we can't run python compiled for $host (unless host == build),
8915 # the user could write a script that provides the needed information,
8916 # so we support that.
ec685c5e 8917 python_prog=${with_python}
0c4a4063 8918 python_prefix=
ec685c5e
DE
8919 else
8920 as_fn_error "invalid value for --with-python" "$LINENO" 5
8921 fi
81ecdfbb 8922 ;;
ec685c5e
DE
8923 */*)
8924 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8925 as_fn_error "invalid value for --with-python" "$LINENO" 5
8926 ;;
ec685c5e
DE
8927 *)
8928 # The user has either specified auto, yes, or the name of the python
8929 # program assumed to be in $PATH.
8930 python_prefix=
8931 case "${with_python}" in
8932 yes | auto)
8933 if test ${build} = ${host}; then
8934 # Extract the first word of "python", so it can be a program name with args.
8935set dummy python; ac_word=$2
8936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8937$as_echo_n "checking for $ac_word... " >&6; }
8938if test "${ac_cv_path_python_prog_path+set}" = set; then :
8939 $as_echo_n "(cached) " >&6
8940else
8941 case $python_prog_path in
8942 [\\/]* | ?:[\\/]*)
8943 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8944 ;;
8945 *)
8946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8947for as_dir in $PATH
8948do
8949 IFS=$as_save_IFS
8950 test -z "$as_dir" && as_dir=.
8951 for ac_exec_ext in '' $ac_executable_extensions; do
8952 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8953 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8955 break 2
8956 fi
8957done
8958 done
8959IFS=$as_save_IFS
8960
8961 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8962 ;;
8963esac
8964fi
8965python_prog_path=$ac_cv_path_python_prog_path
8966if test -n "$python_prog_path"; then
8967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8968$as_echo "$python_prog_path" >&6; }
8969else
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8971$as_echo "no" >&6; }
8972fi
8973
8974
8975 if test "${python_prog_path}" = missing; then
8976 python_prog=missing
8977 else
8978 python_prog=${python_prog_path}
8979 fi
8980 else
8981 # Not much we can do except assume the cross-compiler will find the
8982 # right files.
8983 python_prog=missing
8984 fi
8985 ;;
8986 *)
8987 # While we can't run python compiled for $host (unless host == build),
8988 # the user could write a script that provides the needed information,
8989 # so we support that.
8990 python_prog="${with_python}"
8991 # Extract the first word of "${python_prog}", so it can be a program name with args.
8992set dummy ${python_prog}; ac_word=$2
8993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8994$as_echo_n "checking for $ac_word... " >&6; }
8995if test "${ac_cv_path_python_prog_path+set}" = set; then :
8996 $as_echo_n "(cached) " >&6
8997else
8998 case $python_prog_path in
8999 [\\/]* | ?:[\\/]*)
9000 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9001 ;;
9002 *)
9003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9004for as_dir in $PATH
9005do
9006 IFS=$as_save_IFS
9007 test -z "$as_dir" && as_dir=.
9008 for ac_exec_ext in '' $ac_executable_extensions; do
9009 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9010 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9012 break 2
9013 fi
9014done
9015 done
9016IFS=$as_save_IFS
9017
9018 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9019 ;;
9020esac
9021fi
9022python_prog_path=$ac_cv_path_python_prog_path
9023if test -n "$python_prog_path"; then
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9025$as_echo "$python_prog_path" >&6; }
9026else
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9028$as_echo "no" >&6; }
9029fi
9030
9031
9032 if test "${python_prog_path}" = missing; then
9033 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9034 fi
9035 ;;
9036 esac
81ecdfbb
RW
9037 esac
9038
ec685c5e 9039 if test "${python_prog}" != missing; then
e7a30f46
DE
9040 # We have a python program to use, but it may be too old.
9041 # Don't flag an error for --with-python=auto (the default).
9042 have_python_config=yes
ec685c5e
DE
9043 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9044 if test $? != 0; then
e7a30f46
DE
9045 have_python_config=failed
9046 if test "${with_python}" != auto; then
9047 as_fn_error "failure running python-config --includes" "$LINENO" 5
9048 fi
ec685c5e
DE
9049 fi
9050 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9051 if test $? != 0; then
e7a30f46
DE
9052 have_python_config=failed
9053 if test "${with_python}" != auto; then
9054 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9055 fi
ec685c5e 9056 fi
0c4a4063
DE
9057 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9058 if test $? != 0; then
e7a30f46
DE
9059 have_python_config=failed
9060 if test "${with_python}" != auto; then
9061 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9062 fi
0c4a4063 9063 fi
ec685c5e 9064 else
ac534cba
JB
9065 # We do not have a python executable we can use to determine where
9066 # to find the Python headers and libs. We cannot guess the include
9067 # path from the python_prefix either, because that include path
9068 # depends on the Python version. So, there is nothing much we can
9069 # do except assume that the compiler will be able to find those files.
9070 python_includes=
9071 python_libs=
0c4a4063 9072 have_python_config=no
ec685c5e 9073 fi
bec39cab 9074
ec685c5e
DE
9075 # If we have python-config, only try the configuration it provides.
9076 # Otherwise fallback on the old way of trying different versions of
9077 # python in turn.
81ecdfbb 9078
ec685c5e
DE
9079 have_libpython=no
9080 if test "${have_python_config}" = yes; then
c1039e3c
JB
9081 # Determine the Python version by extracting "-lpython<version>"
9082 # part of the python_libs. <version> is usually X.Y with X and Y
9083 # being decimal numbers, but can also be XY (seen on Windows).
9084 #
9085 # The extraction is performed using sed with a regular expression.
9086 # Initially, the regexp used was using the '?' quantifier to make
9087 # the dot in the version number optional. Unfortunately, this
9088 # does not work with non-GNU versions of sed because, because of
9089 # what looks like a limitation (the '?' quantifier does not work
9090 # with back-references). We work around this limitation by using
9091 # the '*' quantifier instead. It means that, in theory, we might
9092 # match unexpected version strings such as "-lpython2..7", but
9093 # this seems unlikely in practice. And even if that happens,
9094 # an error will be triggered later on, when checking that version
9095 # number.
ec685c5e 9096 python_version=`echo " ${python_libs} " \
c1039e3c 9097 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9098 case "${python_version}" in
9099 python*)
ec685c5e
DE
9100
9101 version=${python_version}
9102
9103 new_CPPFLAGS=${python_includes}
9104 new_LIBS=${python_libs}
81ecdfbb
RW
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9106$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9107 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9108 save_LIBS=$LIBS
ec685c5e
DE
9109 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9110 LIBS="$LIBS $new_LIBS"
9111 found_usable_python=no
81ecdfbb 9112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9113/* end confdefs.h. */
ac534cba 9114#include "Python.h"
81ecdfbb
RW
9115int
9116main ()
9117{
9118Py_Initialize ();
9119 ;
9120 return 0;
9121}
bec39cab 9122_ACEOF
81ecdfbb 9123if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9124 have_libpython=${version}
9125 found_usable_python=yes
ac534cba
JB
9126 PYTHON_CPPFLAGS=$new_CPPFLAGS
9127 PYTHON_LIBS=$new_LIBS
9a156167 9128fi
81ecdfbb
RW
9129rm -f core conftest.err conftest.$ac_objext \
9130 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9131 CPPFLAGS=$save_CPPFLAGS
9132 LIBS=$save_LIBS
ec685c5e
DE
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9134$as_echo "${found_usable_python}" >&6; }
9a156167 9135
0c4a4063
DE
9136 ;;
9137 *)
ec685c5e 9138 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9139 ;;
9140 esac
e7a30f46 9141 elif test "${have_python_config}" != failed; then
ec685c5e 9142 if test "${have_libpython}" = no; then
9a156167 9143
420697bb
TT
9144 version=python2.7
9145
9146 new_CPPFLAGS=${python_includes}
9147 new_LIBS="${python_libs} -lpython2.7"
9148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9149$as_echo_n "checking for ${version}... " >&6; }
9150 save_CPPFLAGS=$CPPFLAGS
9151 save_LIBS=$LIBS
9152 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9153 LIBS="$LIBS $new_LIBS"
9154 found_usable_python=no
9155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9156/* end confdefs.h. */
ac534cba 9157#include "Python.h"
420697bb
TT
9158int
9159main ()
9160{
9161Py_Initialize ();
9162 ;
9163 return 0;
9164}
9165_ACEOF
9166if ac_fn_c_try_link "$LINENO"; then :
9167 have_libpython=${version}
9168 found_usable_python=yes
ac534cba
JB
9169 PYTHON_CPPFLAGS=$new_CPPFLAGS
9170 PYTHON_LIBS=$new_LIBS
420697bb
TT
9171fi
9172rm -f core conftest.err conftest.$ac_objext \
9173 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9174 CPPFLAGS=$save_CPPFLAGS
9175 LIBS=$save_LIBS
420697bb
TT
9176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9177$as_echo "${found_usable_python}" >&6; }
9178
9179 fi
9180 if test "${have_libpython}" = no; then
9181
ec685c5e
DE
9182 version=python2.6
9183
9184 new_CPPFLAGS=${python_includes}
9185 new_LIBS="${python_libs} -lpython2.6"
9186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9187$as_echo_n "checking for ${version}... " >&6; }
9188 save_CPPFLAGS=$CPPFLAGS
9189 save_LIBS=$LIBS
9190 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9191 LIBS="$LIBS $new_LIBS"
9192 found_usable_python=no
9193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9194/* end confdefs.h. */
ac534cba 9195#include "Python.h"
ec685c5e
DE
9196int
9197main ()
9198{
9199Py_Initialize ();
9200 ;
9201 return 0;
9202}
9203_ACEOF
9204if ac_fn_c_try_link "$LINENO"; then :
9205 have_libpython=${version}
9206 found_usable_python=yes
ac534cba
JB
9207 PYTHON_CPPFLAGS=$new_CPPFLAGS
9208 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9209fi
9210rm -f core conftest.err conftest.$ac_objext \
9211 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9212 CPPFLAGS=$save_CPPFLAGS
9213 LIBS=$save_LIBS
ec685c5e
DE
9214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9215$as_echo "${found_usable_python}" >&6; }
9a156167 9216
81ecdfbb 9217 fi
ec685c5e 9218 if test ${have_libpython} = no; then
9a156167 9219
81ecdfbb 9220 version=python2.5
9a156167 9221
ec685c5e
DE
9222 new_CPPFLAGS=${python_includes}
9223 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9225$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9226 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9227 save_LIBS=$LIBS
ec685c5e
DE
9228 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9229 LIBS="$LIBS $new_LIBS"
9230 found_usable_python=no
81ecdfbb 9231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9232/* end confdefs.h. */
ac534cba 9233#include "Python.h"
81ecdfbb
RW
9234int
9235main ()
9236{
9237Py_Initialize ();
9238 ;
9239 return 0;
9240}
436868fb 9241_ACEOF
81ecdfbb 9242if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9243 have_libpython=${version}
9244 found_usable_python=yes
ac534cba
JB
9245 PYTHON_CPPFLAGS=$new_CPPFLAGS
9246 PYTHON_LIBS=$new_LIBS
436868fb 9247fi
81ecdfbb
RW
9248rm -f core conftest.err conftest.$ac_objext \
9249 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9250 CPPFLAGS=$save_CPPFLAGS
9251 LIBS=$save_LIBS
ec685c5e
DE
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9253$as_echo "${found_usable_python}" >&6; }
a9322a30 9254
81ecdfbb 9255 fi
ec685c5e 9256 if test ${have_libpython} = no; then
a9322a30 9257
81ecdfbb 9258 version=python2.4
a9322a30 9259
ec685c5e
DE
9260 new_CPPFLAGS=${python_includes}
9261 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9263$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9264 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9265 save_LIBS=$LIBS
ec685c5e
DE
9266 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9267 LIBS="$LIBS $new_LIBS"
9268 found_usable_python=no
81ecdfbb 9269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9270/* end confdefs.h. */
ac534cba 9271#include "Python.h"
a9322a30
TT
9272int
9273main ()
9274{
81ecdfbb 9275Py_Initialize ();
a9322a30
TT
9276 ;
9277 return 0;
9278}
436868fb 9279_ACEOF
81ecdfbb 9280if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9281 have_libpython=${version}
9282 found_usable_python=yes
ac534cba
JB
9283 PYTHON_CPPFLAGS=$new_CPPFLAGS
9284 PYTHON_LIBS=$new_LIBS
436868fb 9285fi
81ecdfbb
RW
9286rm -f core conftest.err conftest.$ac_objext \
9287 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9288 CPPFLAGS=$save_CPPFLAGS
9289 LIBS=$save_LIBS
ec685c5e
DE
9290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9291$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9292
ec685c5e
DE
9293 fi
9294 fi
9c4ea6c5 9295 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9296
9297$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9298
9c4ea6c5 9299 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9300
9301$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9302
9c4ea6c5 9303 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9304
9305$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9306
9c4ea6c5 9307 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9308
9309$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9310
81ecdfbb 9311 fi
ec685c5e
DE
9312
9313 if test "${have_libpython}" = no; then
81ecdfbb
RW
9314 case "${with_python}" in
9315 yes)
9316 as_fn_error "python is missing or unusable" "$LINENO" 5
9317 ;;
9318 auto)
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9320$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9321 ;;
9322 *)
9323 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9324 ;;
9325 esac
0c4a4063
DE
9326 else
9327 if test -n "${python_prefix}"; then
9328
9329cat >>confdefs.h <<_ACEOF
9330#define WITH_PYTHON_PATH "${python_prefix}"
9331_ACEOF
9332
9333
9334 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9335 if test "x$prefix" = xNONE; then
9336 test_prefix=/usr/local
9337 else
9338 test_prefix=$prefix
9339 fi
9340 else
9341 test_prefix=$exec_prefix
9342 fi
9343 value=0
9344 case ${python_prefix} in
9345 "${test_prefix}"|"${test_prefix}/"*|\
9346 '${exec_prefix}'|'${exec_prefix}/'*)
9347 value=1
9348 ;;
9349 esac
9350
9351cat >>confdefs.h <<_ACEOF
9352#define PYTHON_PATH_RELOCATABLE $value
9353_ACEOF
9354
9355
9356 fi
81ecdfbb 9357 fi
436868fb 9358fi
436868fb 9359
ec685c5e 9360if test "${have_libpython}" != no; then
436868fb 9361
81ecdfbb 9362$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9363
81ecdfbb
RW
9364 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9365 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9366 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9367 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9368 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9369
81ecdfbb
RW
9370 # Flags needed to compile Python code (taken from python-config --cflags).
9371 # We cannot call python-config directly because it will output whatever was
9372 # used when compiling the Python interpreter itself, including flags which
9373 # would make the python-related objects be compiled differently from the
9374 # rest of GDB (e.g., -O2 and -fPIC).
9375 if test "${GCC}" = yes; then
9376 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9377 fi
436868fb 9378
81ecdfbb
RW
9379 if test "x${tentative_python_cflags}" != x; then
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9381$as_echo_n "checking compiler flags for python code... " >&6; }
9382 for flag in ${tentative_python_cflags}; do
9383 # Check that the compiler accepts it
9384 saved_CFLAGS="$CFLAGS"
9385 CFLAGS="$CFLAGS $flag"
9386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9387/* end confdefs.h. */
81ecdfbb 9388
a9322a30
TT
9389int
9390main ()
9391{
a9322a30
TT
9392
9393 ;
9394 return 0;
9395}
bec39cab 9396_ACEOF
81ecdfbb
RW
9397if ac_fn_c_try_compile "$LINENO"; then :
9398 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9399fi
81ecdfbb
RW
9400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9401 CFLAGS="$saved_CFLAGS"
9402 done
9403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9404$as_echo "${PYTHON_CFLAGS}" >&6; }
9405 fi
043b6510 9406
c83393b9
JB
9407 # On x64 Windows, Python's include headers, and pyconfig.h in
9408 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9409 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9410 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9411 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9412 # The issue was reported to the Python community, but still isn't
9413 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9414
043b6510 9415 case "$gdb_host" in
c83393b9
JB
9416 mingw64)
9417 if test "${GCC}" = yes; then
9418 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9419 fi
9420 ;;
043b6510 9421 esac
a8db4212
YPK
9422
9423 # Note that "python -m threading" cannot be used to check for
9424 # threading support due to a bug in Python 2.7.3
9425 # (http://bugs.python.org/issue15567).
9426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9427$as_echo_n "checking whether python supports threads... " >&6; }
9428 saved_CPPFLAGS="${CPPFLAGS}"
9429 CPPFLAGS="${PYTHON_CPPFLAGS}"
9430 # Note that the test is reversed so that python_has_threads=yes on
9431 # unexpected failures.
9432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9433/* end confdefs.h. */
9434
9435#include <Python.h>
9436#ifdef WITH_THREAD
9437# error
9438#endif
9439
9440_ACEOF
9441if ac_fn_c_try_cpp "$LINENO"; then :
9442 python_has_threads=no
9443else
9444 python_has_threads=yes
9445fi
9446rm -f conftest.err conftest.$ac_ext
9447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9448$as_echo "${python_has_threads}" >&6; }
9449 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9450else
6dddc817
DE
9451 # Even if Python support is not compiled in, we need to have this file
9452 # included so that the "python" command, et.al., still exists.
9453 CONFIG_OBS="$CONFIG_OBS python.o"
9454 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9455fi
9a156167 9456
ed3ef339
DE
9457
9458
4df42755
DE
9459 if test "${have_libpython}" != no; then
9460 HAVE_PYTHON_TRUE=
9461 HAVE_PYTHON_FALSE='#'
9462else
9463 HAVE_PYTHON_TRUE='#'
9464 HAVE_PYTHON_FALSE=
9465fi
9466
ed3ef339
DE
9467
9468# -------------------- #
9469# Check for libguile. #
9470# -------------------- #
9471
9472
e1402065
DE
9473
9474
9475
9476
9477# Check whether --with-guile was given.
9478if test "${with_guile+set}" = set; then :
9479 withval=$with_guile;
9480else
9481 with_guile=auto
9482fi
9483
9484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9485$as_echo_n "checking whether to use guile... " >&6; }
9486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9487$as_echo "$with_guile" >&6; }
9488
ed3ef339
DE
9489# Extract the first word of "pkg-config", so it can be a program name with args.
9490set dummy pkg-config; ac_word=$2
9491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9492$as_echo_n "checking for $ac_word... " >&6; }
9493if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9494 $as_echo_n "(cached) " >&6
9495else
9496 case $pkg_config_prog_path in
9497 [\\/]* | ?:[\\/]*)
9498 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9499 ;;
9500 *)
9501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9502for as_dir in $PATH
9503do
9504 IFS=$as_save_IFS
9505 test -z "$as_dir" && as_dir=.
9506 for ac_exec_ext in '' $ac_executable_extensions; do
9507 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9508 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9510 break 2
9511 fi
9512done
9513 done
9514IFS=$as_save_IFS
9515
9516 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9517 ;;
9518esac
9519fi
9520pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9521if test -n "$pkg_config_prog_path"; then
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9523$as_echo "$pkg_config_prog_path" >&6; }
9524else
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9526$as_echo "no" >&6; }
9527fi
9528
9529
9530
214ab2da 9531try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9532have_libguile=no
9533case "${with_guile}" in
9534no)
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9536$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9537 ;;
9538auto)
e1402065
DE
9539 if test "${pkg_config_prog_path}" = "missing"; then
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9541$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9542 else
ed3ef339
DE
9543
9544 pkg_config=${pkg_config_prog_path}
9545 guile_version_list=${try_guile_versions}
9546 flag_errors=no
9547
ed3ef339
DE
9548 found_usable_guile=checking
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9550$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9551 for guile_version in ${guile_version_list}; do
9552 ${pkg_config} --exists ${guile_version} 2>/dev/null
9553 if test $? != 0; then
9554 continue
9555 fi
9556 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9557 if test $? != 0; then
9558 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9559 fi
9560 new_LIBS=`${pkg_config} --libs ${guile_version}`
9561 if test $? != 0; then
9562 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9563 fi
9564 found_usable_guile=${guile_version}
9565 break
9566 done
9567 if test "${found_usable_guile}" = "checking"; then
9568 if test "${flag_errors}" = "yes"; then
9569 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9570 else
9571 found_usable_guile=no
9572 fi
9573 fi
9574 if test "${found_usable_guile}" != no; then
9575 save_CPPFLAGS=$CPPFLAGS
9576 save_LIBS=$LIBS
9577 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9578 LIBS="$LIBS $new_LIBS"
9579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9580/* end confdefs.h. */
9581#include "libguile.h"
9582int
9583main ()
9584{
9585scm_init_guile ();
9586 ;
9587 return 0;
9588}
9589_ACEOF
9590if ac_fn_c_try_link "$LINENO"; then :
9591 have_libguile=yes
9592 GUILE_CPPFLAGS=$new_CPPFLAGS
9593 GUILE_LIBS=$new_LIBS
9594else
9595 found_usable_guile=no
9596fi
9597rm -f core conftest.err conftest.$ac_objext \
9598 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9599 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9600if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9601
9602$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9603
9604
9605fi
9606
ed3ef339
DE
9607 CPPFLAGS=$save_CPPFLAGS
9608 LIBS=$save_LIBS
9609 if test "${found_usable_guile}" = no; then
9610 if test "${flag_errors}" = yes; then
9611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9613as_fn_error "linking guile version ${guile_version} test program failed
9614See \`config.log' for more details." "$LINENO" 5; }
9615 fi
9616 fi
9617 fi
9618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9619$as_echo "${found_usable_guile}" >&6; }
9620
e1402065 9621 fi
ed3ef339
DE
9622 ;;
9623yes)
e1402065
DE
9624 if test "${pkg_config_prog_path}" = "missing"; then
9625 as_fn_error "pkg-config not found" "$LINENO" 5
9626 fi
ed3ef339
DE
9627
9628 pkg_config=${pkg_config_prog_path}
9629 guile_version_list=${try_guile_versions}
9630 flag_errors=yes
9631
ed3ef339
DE
9632 found_usable_guile=checking
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9634$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9635 for guile_version in ${guile_version_list}; do
9636 ${pkg_config} --exists ${guile_version} 2>/dev/null
9637 if test $? != 0; then
9638 continue
9639 fi
9640 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9641 if test $? != 0; then
9642 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9643 fi
9644 new_LIBS=`${pkg_config} --libs ${guile_version}`
9645 if test $? != 0; then
9646 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9647 fi
9648 found_usable_guile=${guile_version}
9649 break
9650 done
9651 if test "${found_usable_guile}" = "checking"; then
9652 if test "${flag_errors}" = "yes"; then
9653 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9654 else
9655 found_usable_guile=no
9656 fi
9657 fi
9658 if test "${found_usable_guile}" != no; then
9659 save_CPPFLAGS=$CPPFLAGS
9660 save_LIBS=$LIBS
9661 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9662 LIBS="$LIBS $new_LIBS"
9663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9664/* end confdefs.h. */
9665#include "libguile.h"
9666int
9667main ()
9668{
9669scm_init_guile ();
9670 ;
9671 return 0;
9672}
9673_ACEOF
9674if ac_fn_c_try_link "$LINENO"; then :
9675 have_libguile=yes
9676 GUILE_CPPFLAGS=$new_CPPFLAGS
9677 GUILE_LIBS=$new_LIBS
9678else
9679 found_usable_guile=no
9680fi
9681rm -f core conftest.err conftest.$ac_objext \
9682 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9683 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9684if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9685
9686$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9687
9688
9689fi
9690
ed3ef339
DE
9691 CPPFLAGS=$save_CPPFLAGS
9692 LIBS=$save_LIBS
9693 if test "${found_usable_guile}" = no; then
9694 if test "${flag_errors}" = yes; then
9695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9697as_fn_error "linking guile version ${guile_version} test program failed
9698See \`config.log' for more details." "$LINENO" 5; }
9699 fi
9700 fi
9701 fi
9702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9703$as_echo "${found_usable_guile}" >&6; }
9704
9705 ;;
9706[\\/]* | ?:[\\/]*)
e1402065 9707 if test -x "${with_guile}"; then
ed3ef339
DE
9708
9709 pkg_config=${with_guile}
9710 guile_version_list=${try_guile_versions}
9711 flag_errors=yes
9712
ed3ef339
DE
9713 found_usable_guile=checking
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9715$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9716 for guile_version in ${guile_version_list}; do
9717 ${pkg_config} --exists ${guile_version} 2>/dev/null
9718 if test $? != 0; then
9719 continue
9720 fi
9721 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9722 if test $? != 0; then
9723 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9724 fi
9725 new_LIBS=`${pkg_config} --libs ${guile_version}`
9726 if test $? != 0; then
9727 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9728 fi
9729 found_usable_guile=${guile_version}
9730 break
9731 done
9732 if test "${found_usable_guile}" = "checking"; then
9733 if test "${flag_errors}" = "yes"; then
9734 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9735 else
9736 found_usable_guile=no
9737 fi
9738 fi
9739 if test "${found_usable_guile}" != no; then
9740 save_CPPFLAGS=$CPPFLAGS
9741 save_LIBS=$LIBS
9742 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9743 LIBS="$LIBS $new_LIBS"
9744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9745/* end confdefs.h. */
9746#include "libguile.h"
9747int
9748main ()
9749{
9750scm_init_guile ();
9751 ;
9752 return 0;
9753}
9754_ACEOF
9755if ac_fn_c_try_link "$LINENO"; then :
9756 have_libguile=yes
9757 GUILE_CPPFLAGS=$new_CPPFLAGS
9758 GUILE_LIBS=$new_LIBS
9759else
9760 found_usable_guile=no
9761fi
9762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9764 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9765if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9766
9767$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9768
9769
9770fi
9771
ed3ef339
DE
9772 CPPFLAGS=$save_CPPFLAGS
9773 LIBS=$save_LIBS
9774 if test "${found_usable_guile}" = no; then
9775 if test "${flag_errors}" = yes; then
9776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9778as_fn_error "linking guile version ${guile_version} test program failed
9779See \`config.log' for more details." "$LINENO" 5; }
9780 fi
9781 fi
9782 fi
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9784$as_echo "${found_usable_guile}" >&6; }
9785
e1402065
DE
9786 else
9787 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9788 fi
ed3ef339
DE
9789 ;;
9790"" | */*)
9791 # Disallow --with=guile="" and --with-guile=foo/bar.
9792 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9793 ;;
9794*)
9795 # A space separate list of guile versions to try, in order.
e1402065
DE
9796 if test "${pkg_config_prog_path}" = "missing"; then
9797 as_fn_error "pkg-config not found" "$LINENO" 5
9798 fi
ed3ef339
DE
9799
9800 pkg_config=${pkg_config_prog_path}
9801 guile_version_list=${with_guile}
9802 flag_errors=yes
9803
ed3ef339
DE
9804 found_usable_guile=checking
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9806$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9807 for guile_version in ${guile_version_list}; do
9808 ${pkg_config} --exists ${guile_version} 2>/dev/null
9809 if test $? != 0; then
9810 continue
9811 fi
9812 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9813 if test $? != 0; then
9814 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9815 fi
9816 new_LIBS=`${pkg_config} --libs ${guile_version}`
9817 if test $? != 0; then
9818 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9819 fi
9820 found_usable_guile=${guile_version}
9821 break
9822 done
9823 if test "${found_usable_guile}" = "checking"; then
9824 if test "${flag_errors}" = "yes"; then
9825 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9826 else
9827 found_usable_guile=no
9828 fi
9829 fi
9830 if test "${found_usable_guile}" != no; then
9831 save_CPPFLAGS=$CPPFLAGS
9832 save_LIBS=$LIBS
9833 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9834 LIBS="$LIBS $new_LIBS"
9835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9836/* end confdefs.h. */
9837#include "libguile.h"
9838int
9839main ()
9840{
9841scm_init_guile ();
9842 ;
9843 return 0;
9844}
9845_ACEOF
9846if ac_fn_c_try_link "$LINENO"; then :
9847 have_libguile=yes
9848 GUILE_CPPFLAGS=$new_CPPFLAGS
9849 GUILE_LIBS=$new_LIBS
9850else
9851 found_usable_guile=no
9852fi
9853rm -f core conftest.err conftest.$ac_objext \
9854 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9855 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9856if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9857
9858$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9859
9860
9861fi
9862
ed3ef339
DE
9863 CPPFLAGS=$save_CPPFLAGS
9864 LIBS=$save_LIBS
9865 if test "${found_usable_guile}" = no; then
9866 if test "${flag_errors}" = yes; then
9867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9869as_fn_error "linking guile version ${guile_version} test program failed
9870See \`config.log' for more details." "$LINENO" 5; }
9871 fi
9872 fi
9873 fi
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9875$as_echo "${found_usable_guile}" >&6; }
9876
9877 ;;
9878esac
9879
e76c5d17 9880if test "${have_libguile}" != no; then
d342a0da
DE
9881 case "${with_guile}" in
9882 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9883
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9885$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9886if test "${ac_cv_guild_program_name+set}" = set; then :
9887 $as_echo_n "(cached) " >&6
9888else
d342a0da 9889 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9890
9891 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9892 # the 'guild' and 'bindir' variables. In that case, try to guess
9893 # what the program name is, at the risk of getting it wrong if
9894 # Guile was configured with '--program-suffix' or similar.
9895 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9896 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9897 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9898 fi
9899
9900fi
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9902$as_echo "$ac_cv_guild_program_name" >&6; }
9903
9904 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9905 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9906 fi
9907
9908 GUILD="$ac_cv_guild_program_name"
9909
9910
d342a0da
DE
9911 ;;
9912 *)
9913
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9915$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9916if test "${ac_cv_guild_program_name+set}" = set; then :
9917 $as_echo_n "(cached) " >&6
9918else
9919 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9920
9921 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9922 # the 'guild' and 'bindir' variables. In that case, try to guess
9923 # what the program name is, at the risk of getting it wrong if
9924 # Guile was configured with '--program-suffix' or similar.
9925 if test "x$ac_cv_guild_program_name" = "x"; then
9926 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9927 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9928 fi
9929
9930fi
9931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9932$as_echo "$ac_cv_guild_program_name" >&6; }
9933
9934 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9935 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9936 fi
9937
9938 GUILD="$ac_cv_guild_program_name"
9939
9940
9941 ;;
9942 esac
e76c5d17
DE
9943
9944
9945 if test "$cross_compiling" = no; then
9946 GUILD_TARGET_FLAG=
9947 else
9948 GUILD_TARGET_FLAG="--target=$host"
9949 fi
9950
9951
9952
9953
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9955$as_echo_n "checking whether guild supports this host... " >&6; }
9956if test "${ac_cv_guild_ok+set}" = set; then :
9957 $as_echo_n "(cached) " >&6
9958else
9959 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9960 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9961 ac_cv_guild_ok=yes
9962 else
9963 ac_cv_guild_ok=no
9964 fi
9965fi
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9967$as_echo "$ac_cv_guild_ok" >&6; }
9968
9969 if test "$ac_cv_guild_ok" = no; then
9970 have_libguile=no
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9972$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9973 fi
9974fi
9975
ed3ef339
DE
9976if test "${have_libguile}" != no; then
9977
9978$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9979
9980 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9981 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9982 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9983 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9984 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9985
9986 save_LIBS="$LIBS"
9987 save_CPPFLAGS="$CPPFLAGS"
9988 LIBS="$GUILE_LIBS"
9989 CPPFLAGS="$GUILE_CPPFLAGS"
9990 for ac_func in scm_new_smob
9991do :
9992 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9993if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9994 cat >>confdefs.h <<_ACEOF
9995#define HAVE_SCM_NEW_SMOB 1
9996_ACEOF
9997
9998fi
9999done
10000
10001 LIBS="$save_LIBS"
10002 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10003else
10004 # Even if Guile support is not compiled in, we need to have these files
10005 # included.
10006 CONFIG_OBS="$CONFIG_OBS guile.o"
10007 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10008fi
9a156167 10009
ac534cba 10010
4df42755
DE
10011 if test "${have_libguile}" != no; then
10012 HAVE_GUILE_TRUE=
10013 HAVE_GUILE_FALSE='#'
10014else
10015 HAVE_GUILE_TRUE='#'
10016 HAVE_GUILE_FALSE=
10017fi
10018
ac534cba 10019
d344e670
DE
10020# --------------------- #
10021# Check for libmcheck. #
10022# --------------------- #
10023
a8db4212
YPK
10024# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10025# but turn it off if Python is enabled with threads, since -lmcheck is
10026# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10027# and for releases.
17ef446e
PA
10028if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10029 && $development; then
10030 libmcheck_default=yes
10031else
10032 libmcheck_default=no
a8db4212
YPK
10033fi
10034
17ef446e
PA
10035 # Check whether --enable-libmcheck was given.
10036if test "${enable_libmcheck+set}" = set; then :
10037 enableval=$enable_libmcheck; case "${enableval}" in
10038 yes | y) ENABLE_LIBMCHECK="yes" ;;
10039 no | n) ENABLE_LIBMCHECK="no" ;;
10040 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10041 esac
10042fi
10043
10044
10045 if test -z "${ENABLE_LIBMCHECK}"; then
10046 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10047 fi
17ef446e
PA
10048
10049 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10051$as_echo_n "checking for main in -lmcheck... " >&6; }
10052if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10053 $as_echo_n "(cached) " >&6
10054else
10055 ac_check_lib_save_LIBS=$LIBS
10056LIBS="-lmcheck $LIBS"
10057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10058/* end confdefs.h. */
10059
10060
10061int
10062main ()
10063{
10064return main ();
10065 ;
10066 return 0;
10067}
10068_ACEOF
10069if ac_fn_c_try_link "$LINENO"; then :
10070 ac_cv_lib_mcheck_main=yes
10071else
10072 ac_cv_lib_mcheck_main=no
10073fi
10074rm -f core conftest.err conftest.$ac_objext \
10075 conftest$ac_exeext conftest.$ac_ext
10076LIBS=$ac_check_lib_save_LIBS
10077fi
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10079$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10080if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10081 cat >>confdefs.h <<_ACEOF
10082#define HAVE_LIBMCHECK 1
10083_ACEOF
10084
10085 LIBS="-lmcheck $LIBS"
10086
10087fi
10088
17ef446e
PA
10089 fi
10090
10091
10092if test "$ENABLE_LIBMCHECK" = "yes" \
10093 -a "${have_libpython}" != "no" \
10094 -a "${python_has_threads}" = "yes" ; then
10095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10096$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10097fi
10098
58bfce93
MM
10099
10100# Check whether --with-intel_pt was given.
10101if test "${with_intel_pt+set}" = set; then :
10102 withval=$with_intel_pt;
10103else
10104 with_intel_pt=auto
10105fi
10106
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10108$as_echo_n "checking whether to use intel pt... " >&6; }
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10110$as_echo "$with_intel_pt" >&6; }
10111
10112if test "${with_intel_pt}" = no; then
bc504a31
PA
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10114$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10115 HAVE_LIBIPT=no
10116else
5599c404
MM
10117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10118/* end confdefs.h. */
10119
10120#include <linux/perf_event.h>
10121#ifndef PERF_ATTR_SIZE_VER5
10122# error
10123#endif
10124
10125_ACEOF
10126if ac_fn_c_try_cpp "$LINENO"; then :
10127 perf_event=yes
10128else
10129 perf_event=no
10130fi
10131rm -f conftest.err conftest.$ac_ext
10132 if test "$perf_event" != yes; then
10133 if test "$with_intel_pt" = yes; then
10134 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10135 else
10136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10137$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10138 fi
10139 fi
10140
58bfce93
MM
10141
10142
10143
10144
10145
10146
10147
10148
10149 use_additional=yes
10150
10151 acl_save_prefix="$prefix"
10152 prefix="$acl_final_prefix"
10153 acl_save_exec_prefix="$exec_prefix"
10154 exec_prefix="$acl_final_exec_prefix"
10155
10156 eval additional_includedir=\"$includedir\"
10157 eval additional_libdir=\"$libdir\"
10158
10159 exec_prefix="$acl_save_exec_prefix"
10160 prefix="$acl_save_prefix"
10161
10162
10163# Check whether --with-libipt-prefix was given.
10164if test "${with_libipt_prefix+set}" = set; then :
10165 withval=$with_libipt_prefix;
10166 if test "X$withval" = "Xno"; then
10167 use_additional=no
10168 else
10169 if test "X$withval" = "X"; then
10170
10171 acl_save_prefix="$prefix"
10172 prefix="$acl_final_prefix"
10173 acl_save_exec_prefix="$exec_prefix"
10174 exec_prefix="$acl_final_exec_prefix"
10175
10176 eval additional_includedir=\"$includedir\"
10177 eval additional_libdir=\"$libdir\"
10178
10179 exec_prefix="$acl_save_exec_prefix"
10180 prefix="$acl_save_prefix"
10181
10182 else
10183 additional_includedir="$withval/include"
10184 additional_libdir="$withval/lib"
10185 fi
10186 fi
10187
10188fi
10189
10190 LIBIPT=
10191 LTLIBIPT=
10192 INCIPT=
10193 rpathdirs=
10194 ltrpathdirs=
10195 names_already_handled=
10196 names_next_round='ipt '
10197 while test -n "$names_next_round"; do
10198 names_this_round="$names_next_round"
10199 names_next_round=
10200 for name in $names_this_round; do
10201 already_handled=
10202 for n in $names_already_handled; do
10203 if test "$n" = "$name"; then
10204 already_handled=yes
10205 break
10206 fi
10207 done
10208 if test -z "$already_handled"; then
10209 names_already_handled="$names_already_handled $name"
10210 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10211 eval value=\"\$HAVE_LIB$uppername\"
10212 if test -n "$value"; then
10213 if test "$value" = yes; then
10214 eval value=\"\$LIB$uppername\"
10215 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10216 eval value=\"\$LTLIB$uppername\"
10217 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10218 else
10219 :
10220 fi
10221 else
10222 found_dir=
10223 found_la=
10224 found_so=
10225 found_a=
10226 if test $use_additional = yes; then
10227 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10228 found_dir="$additional_libdir"
10229 found_so="$additional_libdir/lib$name.$shlibext"
10230 if test -f "$additional_libdir/lib$name.la"; then
10231 found_la="$additional_libdir/lib$name.la"
10232 fi
10233 else
10234 if test -f "$additional_libdir/lib$name.$libext"; then
10235 found_dir="$additional_libdir"
10236 found_a="$additional_libdir/lib$name.$libext"
10237 if test -f "$additional_libdir/lib$name.la"; then
10238 found_la="$additional_libdir/lib$name.la"
10239 fi
10240 fi
10241 fi
10242 fi
10243 if test "X$found_dir" = "X"; then
10244 for x in $LDFLAGS $LTLIBIPT; do
10245
10246 acl_save_prefix="$prefix"
10247 prefix="$acl_final_prefix"
10248 acl_save_exec_prefix="$exec_prefix"
10249 exec_prefix="$acl_final_exec_prefix"
10250 eval x=\"$x\"
10251 exec_prefix="$acl_save_exec_prefix"
10252 prefix="$acl_save_prefix"
10253
10254 case "$x" in
10255 -L*)
10256 dir=`echo "X$x" | sed -e 's/^X-L//'`
10257 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10258 found_dir="$dir"
10259 found_so="$dir/lib$name.$shlibext"
10260 if test -f "$dir/lib$name.la"; then
10261 found_la="$dir/lib$name.la"
10262 fi
10263 else
10264 if test -f "$dir/lib$name.$libext"; then
10265 found_dir="$dir"
10266 found_a="$dir/lib$name.$libext"
10267 if test -f "$dir/lib$name.la"; then
10268 found_la="$dir/lib$name.la"
10269 fi
10270 fi
10271 fi
10272 ;;
10273 esac
10274 if test "X$found_dir" != "X"; then
10275 break
10276 fi
10277 done
10278 fi
10279 if test "X$found_dir" != "X"; then
10280 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10281 if test "X$found_so" != "X"; then
10282 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10283 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10284 else
10285 haveit=
10286 for x in $ltrpathdirs; do
10287 if test "X$x" = "X$found_dir"; then
10288 haveit=yes
10289 break
10290 fi
10291 done
10292 if test -z "$haveit"; then
10293 ltrpathdirs="$ltrpathdirs $found_dir"
10294 fi
10295 if test "$hardcode_direct" = yes; then
10296 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10297 else
10298 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10299 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10300 haveit=
10301 for x in $rpathdirs; do
10302 if test "X$x" = "X$found_dir"; then
10303 haveit=yes
10304 break
10305 fi
10306 done
10307 if test -z "$haveit"; then
10308 rpathdirs="$rpathdirs $found_dir"
10309 fi
10310 else
10311 haveit=
10312 for x in $LDFLAGS $LIBIPT; do
10313
10314 acl_save_prefix="$prefix"
10315 prefix="$acl_final_prefix"
10316 acl_save_exec_prefix="$exec_prefix"
10317 exec_prefix="$acl_final_exec_prefix"
10318 eval x=\"$x\"
10319 exec_prefix="$acl_save_exec_prefix"
10320 prefix="$acl_save_prefix"
10321
10322 if test "X$x" = "X-L$found_dir"; then
10323 haveit=yes
10324 break
10325 fi
10326 done
10327 if test -z "$haveit"; then
10328 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10329 fi
10330 if test "$hardcode_minus_L" != no; then
10331 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10332 else
10333 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10334 fi
10335 fi
10336 fi
10337 fi
10338 else
10339 if test "X$found_a" != "X"; then
10340 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10341 else
10342 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10343 fi
10344 fi
10345 additional_includedir=
10346 case "$found_dir" in
10347 */lib | */lib/)
10348 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10349 additional_includedir="$basedir/include"
10350 ;;
10351 esac
10352 if test "X$additional_includedir" != "X"; then
10353 if test "X$additional_includedir" != "X/usr/include"; then
10354 haveit=
10355 if test "X$additional_includedir" = "X/usr/local/include"; then
10356 if test -n "$GCC"; then
10357 case $host_os in
10358 linux*) haveit=yes;;
10359 esac
10360 fi
10361 fi
10362 if test -z "$haveit"; then
10363 for x in $CPPFLAGS $INCIPT; do
10364
10365 acl_save_prefix="$prefix"
10366 prefix="$acl_final_prefix"
10367 acl_save_exec_prefix="$exec_prefix"
10368 exec_prefix="$acl_final_exec_prefix"
10369 eval x=\"$x\"
10370 exec_prefix="$acl_save_exec_prefix"
10371 prefix="$acl_save_prefix"
10372
10373 if test "X$x" = "X-I$additional_includedir"; then
10374 haveit=yes
10375 break
10376 fi
10377 done
10378 if test -z "$haveit"; then
10379 if test -d "$additional_includedir"; then
10380 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10381 fi
10382 fi
10383 fi
10384 fi
10385 fi
10386 if test -n "$found_la"; then
10387 save_libdir="$libdir"
10388 case "$found_la" in
10389 */* | *\\*) . "$found_la" ;;
10390 *) . "./$found_la" ;;
10391 esac
10392 libdir="$save_libdir"
10393 for dep in $dependency_libs; do
10394 case "$dep" in
10395 -L*)
10396 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10397 if test "X$additional_libdir" != "X/usr/lib"; then
10398 haveit=
10399 if test "X$additional_libdir" = "X/usr/local/lib"; then
10400 if test -n "$GCC"; then
10401 case $host_os in
10402 linux*) haveit=yes;;
10403 esac
10404 fi
10405 fi
10406 if test -z "$haveit"; then
10407 haveit=
10408 for x in $LDFLAGS $LIBIPT; do
10409
10410 acl_save_prefix="$prefix"
10411 prefix="$acl_final_prefix"
10412 acl_save_exec_prefix="$exec_prefix"
10413 exec_prefix="$acl_final_exec_prefix"
10414 eval x=\"$x\"
10415 exec_prefix="$acl_save_exec_prefix"
10416 prefix="$acl_save_prefix"
10417
10418 if test "X$x" = "X-L$additional_libdir"; then
10419 haveit=yes
10420 break
10421 fi
10422 done
10423 if test -z "$haveit"; then
10424 if test -d "$additional_libdir"; then
10425 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10426 fi
10427 fi
10428 haveit=
10429 for x in $LDFLAGS $LTLIBIPT; do
10430
10431 acl_save_prefix="$prefix"
10432 prefix="$acl_final_prefix"
10433 acl_save_exec_prefix="$exec_prefix"
10434 exec_prefix="$acl_final_exec_prefix"
10435 eval x=\"$x\"
10436 exec_prefix="$acl_save_exec_prefix"
10437 prefix="$acl_save_prefix"
10438
10439 if test "X$x" = "X-L$additional_libdir"; then
10440 haveit=yes
10441 break
10442 fi
10443 done
10444 if test -z "$haveit"; then
10445 if test -d "$additional_libdir"; then
10446 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10447 fi
10448 fi
10449 fi
10450 fi
10451 ;;
10452 -R*)
10453 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10454 if test "$enable_rpath" != no; then
10455 haveit=
10456 for x in $rpathdirs; do
10457 if test "X$x" = "X$dir"; then
10458 haveit=yes
10459 break
10460 fi
10461 done
10462 if test -z "$haveit"; then
10463 rpathdirs="$rpathdirs $dir"
10464 fi
10465 haveit=
10466 for x in $ltrpathdirs; do
10467 if test "X$x" = "X$dir"; then
10468 haveit=yes
10469 break
10470 fi
10471 done
10472 if test -z "$haveit"; then
10473 ltrpathdirs="$ltrpathdirs $dir"
10474 fi
10475 fi
10476 ;;
10477 -l*)
10478 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10479 ;;
10480 *.la)
10481 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10482 ;;
10483 *)
10484 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10485 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10486 ;;
10487 esac
10488 done
10489 fi
10490 else
10491 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10492 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10493 fi
10494 fi
10495 fi
10496 done
10497 done
10498 if test "X$rpathdirs" != "X"; then
10499 if test -n "$hardcode_libdir_separator"; then
10500 alldirs=
10501 for found_dir in $rpathdirs; do
10502 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10503 done
10504 acl_save_libdir="$libdir"
10505 libdir="$alldirs"
10506 eval flag=\"$hardcode_libdir_flag_spec\"
10507 libdir="$acl_save_libdir"
10508 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10509 else
10510 for found_dir in $rpathdirs; do
10511 acl_save_libdir="$libdir"
10512 libdir="$found_dir"
10513 eval flag=\"$hardcode_libdir_flag_spec\"
10514 libdir="$acl_save_libdir"
10515 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10516 done
10517 fi
10518 fi
10519 if test "X$ltrpathdirs" != "X"; then
10520 for found_dir in $ltrpathdirs; do
10521 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10522 done
10523 fi
10524
10525
10526 ac_save_CPPFLAGS="$CPPFLAGS"
10527
10528 for element in $INCIPT; do
10529 haveit=
10530 for x in $CPPFLAGS; do
10531
10532 acl_save_prefix="$prefix"
10533 prefix="$acl_final_prefix"
10534 acl_save_exec_prefix="$exec_prefix"
10535 exec_prefix="$acl_final_exec_prefix"
10536 eval x=\"$x\"
10537 exec_prefix="$acl_save_exec_prefix"
10538 prefix="$acl_save_prefix"
10539
10540 if test "X$x" = "X$element"; then
10541 haveit=yes
10542 break
10543 fi
10544 done
10545 if test -z "$haveit"; then
10546 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10547 fi
10548 done
10549
10550
10551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10552$as_echo_n "checking for libipt... " >&6; }
10553if test "${ac_cv_libipt+set}" = set; then :
10554 $as_echo_n "(cached) " >&6
10555else
10556
10557 ac_save_LIBS="$LIBS"
10558 LIBS="$LIBS $LIBIPT"
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560/* end confdefs.h. */
10561#include "intel-pt.h"
10562int
10563main ()
10564{
10565pt_insn_alloc_decoder (0);
10566 ;
10567 return 0;
10568}
10569_ACEOF
10570if ac_fn_c_try_link "$LINENO"; then :
10571 ac_cv_libipt=yes
10572else
10573 ac_cv_libipt=no
10574fi
10575rm -f core conftest.err conftest.$ac_objext \
10576 conftest$ac_exeext conftest.$ac_ext
10577 LIBS="$ac_save_LIBS"
10578
10579fi
10580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10581$as_echo "$ac_cv_libipt" >&6; }
10582 if test "$ac_cv_libipt" = yes; then
10583 HAVE_LIBIPT=yes
10584
10585$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10586
10587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10588$as_echo_n "checking how to link with libipt... " >&6; }
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10590$as_echo "$LIBIPT" >&6; }
10591 else
10592 HAVE_LIBIPT=no
10593 CPPFLAGS="$ac_save_CPPFLAGS"
10594 LIBIPT=
10595 LTLIBIPT=
10596 fi
10597
10598
10599
10600
10601
10602
10603 if test "$HAVE_LIBIPT" != yes; then
10604 if test "$with_intel_pt" = yes; then
10605 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10606 else
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10608$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10609 fi
10610 fi
10611fi
10612
81ecdfbb
RW
10613# ------------------------- #
10614# Checks for header files. #
10615# ------------------------- #
c890192f 10616
81ecdfbb
RW
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10618$as_echo_n "checking for ANSI C header files... " >&6; }
10619if test "${ac_cv_header_stdc+set}" = set; then :
10620 $as_echo_n "(cached) " >&6
bec39cab 10621else
81ecdfbb 10622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10623/* end confdefs.h. */
81ecdfbb
RW
10624#include <stdlib.h>
10625#include <stdarg.h>
10626#include <string.h>
10627#include <float.h>
10628
a9322a30
TT
10629int
10630main ()
10631{
a9322a30
TT
10632
10633 ;
10634 return 0;
10635}
bec39cab 10636_ACEOF
81ecdfbb
RW
10637if ac_fn_c_try_compile "$LINENO"; then :
10638 ac_cv_header_stdc=yes
bec39cab 10639else
81ecdfbb 10640 ac_cv_header_stdc=no
a9322a30 10641fi
81ecdfbb 10642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10643
81ecdfbb
RW
10644if test $ac_cv_header_stdc = yes; then
10645 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10647/* end confdefs.h. */
10648#include <string.h>
bec39cab 10649
81ecdfbb
RW
10650_ACEOF
10651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10652 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10653
bec39cab 10654else
81ecdfbb
RW
10655 ac_cv_header_stdc=no
10656fi
10657rm -f conftest*
10658
10659fi
10660
10661if test $ac_cv_header_stdc = yes; then
10662 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10664/* end confdefs.h. */
10665#include <stdlib.h>
10666
bec39cab 10667_ACEOF
81ecdfbb
RW
10668if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10669 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10670
81ecdfbb
RW
10671else
10672 ac_cv_header_stdc=no
10673fi
10674rm -f conftest*
bec39cab 10675
bec39cab 10676fi
81ecdfbb
RW
10677
10678if test $ac_cv_header_stdc = yes; then
10679 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10680 if test "$cross_compiling" = yes; then :
10681 :
bec39cab 10682else
81ecdfbb 10683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10684/* end confdefs.h. */
81ecdfbb
RW
10685#include <ctype.h>
10686#include <stdlib.h>
10687#if ((' ' & 0x0FF) == 0x020)
10688# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10689# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10690#else
10691# define ISLOWER(c) \
10692 (('a' <= (c) && (c) <= 'i') \
10693 || ('j' <= (c) && (c) <= 'r') \
10694 || ('s' <= (c) && (c) <= 'z'))
10695# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10696#endif
10697
10698#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10699int
10700main ()
10701{
81ecdfbb
RW
10702 int i;
10703 for (i = 0; i < 256; i++)
10704 if (XOR (islower (i), ISLOWER (i))
10705 || toupper (i) != TOUPPER (i))
10706 return 2;
a9322a30
TT
10707 return 0;
10708}
bec39cab 10709_ACEOF
81ecdfbb
RW
10710if ac_fn_c_try_run "$LINENO"; then :
10711
bec39cab 10712else
81ecdfbb
RW
10713 ac_cv_header_stdc=no
10714fi
10715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10716 conftest.$ac_objext conftest.beam conftest.$ac_ext
10717fi
bec39cab 10718
bec39cab 10719fi
a9322a30 10720fi
81ecdfbb
RW
10721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10722$as_echo "$ac_cv_header_stdc" >&6; }
10723if test $ac_cv_header_stdc = yes; then
bec39cab 10724
81ecdfbb 10725$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10726
81ecdfbb 10727fi
bec39cab 10728
81ecdfbb 10729# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10730for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10731 thread_db.h \
0080a2f6 10732 sys/fault.h \
81ecdfbb
RW
10733 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10734 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10735 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10736 termios.h termio.h \
3447c057 10737 sgtty.h elf_hp.h \
9467110b 10738 dlfcn.h
81ecdfbb
RW
10739do :
10740 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10741ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10742eval as_val=\$$as_ac_Header
10743 if test "x$as_val" = x""yes; then :
bec39cab 10744 cat >>confdefs.h <<_ACEOF
81ecdfbb 10745#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10746_ACEOF
c906108c 10747
bec39cab 10748fi
81ecdfbb
RW
10749
10750done
10751
81ecdfbb
RW
10752for ac_header in sys/proc.h
10753do :
10754 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10755# include <sys/param.h>
10756#endif
c906108c 10757
81ecdfbb
RW
10758"
10759if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10760 cat >>confdefs.h <<_ACEOF
81ecdfbb 10761#define HAVE_SYS_PROC_H 1
bec39cab 10762_ACEOF
5ee754fc 10763
bec39cab 10764fi
81ecdfbb
RW
10765
10766done
10767
10768for ac_header in sys/user.h
10769do :
10770 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10771# include <sys/param.h>
a9322a30
TT
10772#endif
10773
81ecdfbb
RW
10774"
10775if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10776 cat >>confdefs.h <<_ACEOF
10777#define HAVE_SYS_USER_H 1
bec39cab 10778_ACEOF
bec39cab 10779
a9322a30 10780fi
bec39cab 10781
81ecdfbb 10782done
5ee754fc 10783
5ee754fc 10784
81ecdfbb
RW
10785# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10786# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10787# think that we don't have <curses.h> if we're using GCC.
10788case $host_os in
10789 solaris2.[789])
10790 if test "$GCC" = yes; then
10791
10792$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10793
10794 fi ;;
10795esac
10796for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10797do :
10798 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10799ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10800eval as_val=\$$as_ac_Header
10801 if test "x$as_val" = x""yes; then :
bec39cab 10802 cat >>confdefs.h <<_ACEOF
81ecdfbb 10803#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10804_ACEOF
5ee754fc
MK
10805
10806fi
10807
81ecdfbb 10808done
bec39cab 10809
81ecdfbb
RW
10810for ac_header in term.h
10811do :
10812 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10813# include <curses.h>
10814#endif
bec39cab 10815
81ecdfbb
RW
10816"
10817if test "x$ac_cv_header_term_h" = x""yes; then :
10818 cat >>confdefs.h <<_ACEOF
10819#define HAVE_TERM_H 1
a8111142 10820_ACEOF
a8111142 10821
a8111142 10822fi
a8111142 10823
81ecdfbb 10824done
a8111142
TT
10825
10826
81ecdfbb
RW
10827# ------------------------- #
10828# Checks for declarations. #
10829# ------------------------- #
a9322a30 10830
07697489
PA
10831
10832 # Check for presence and size of long long.
10833 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10834if test "x$ac_cv_type_long_long" = x""yes; then :
10835
10836cat >>confdefs.h <<_ACEOF
10837#define HAVE_LONG_LONG 1
10838_ACEOF
10839
10840# The cast to long int works around a bug in the HP C Compiler
10841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10843# This bug is HP SR number 8606223364.
10844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10845$as_echo_n "checking size of long long... " >&6; }
10846if test "${ac_cv_sizeof_long_long+set}" = set; then :
10847 $as_echo_n "(cached) " >&6
10848else
10849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10850
10851else
10852 if test "$ac_cv_type_long_long" = yes; then
10853 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10854$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10855{ as_fn_set_status 77
10856as_fn_error "cannot compute sizeof (long long)
10857See \`config.log' for more details." "$LINENO" 5; }; }
10858 else
10859 ac_cv_sizeof_long_long=0
10860 fi
10861fi
10862
10863fi
10864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10865$as_echo "$ac_cv_sizeof_long_long" >&6; }
10866
10867
10868
10869cat >>confdefs.h <<_ACEOF
10870#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10871_ACEOF
10872
10873
10874fi
10875
10876
10877 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10878if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10879 ac_have_decl=1
10880else
10881 ac_have_decl=0
10882fi
10883
10884cat >>confdefs.h <<_ACEOF
10885#define HAVE_DECL_BASENAME $ac_have_decl
10886_ACEOF
10887ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10888if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10889 ac_have_decl=1
10890else
10891 ac_have_decl=0
10892fi
10893
10894cat >>confdefs.h <<_ACEOF
10895#define HAVE_DECL_FFS $ac_have_decl
10896_ACEOF
10897ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10898if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10899 ac_have_decl=1
10900else
10901 ac_have_decl=0
10902fi
10903
10904cat >>confdefs.h <<_ACEOF
10905#define HAVE_DECL_ASPRINTF $ac_have_decl
10906_ACEOF
10907ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10908if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10909 ac_have_decl=1
10910else
10911 ac_have_decl=0
10912fi
10913
10914cat >>confdefs.h <<_ACEOF
10915#define HAVE_DECL_VASPRINTF $ac_have_decl
10916_ACEOF
10917ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10918if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10919 ac_have_decl=1
10920else
10921 ac_have_decl=0
10922fi
10923
10924cat >>confdefs.h <<_ACEOF
10925#define HAVE_DECL_SNPRINTF $ac_have_decl
10926_ACEOF
10927ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10928if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10929 ac_have_decl=1
10930else
10931 ac_have_decl=0
10932fi
10933
10934cat >>confdefs.h <<_ACEOF
10935#define HAVE_DECL_VSNPRINTF $ac_have_decl
10936_ACEOF
10937
10938 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10939if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10940 ac_have_decl=1
10941else
10942 ac_have_decl=0
10943fi
10944
10945cat >>confdefs.h <<_ACEOF
10946#define HAVE_DECL_STRTOL $ac_have_decl
10947_ACEOF
10948ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10949if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10950 ac_have_decl=1
10951else
10952 ac_have_decl=0
10953fi
10954
10955cat >>confdefs.h <<_ACEOF
10956#define HAVE_DECL_STRTOUL $ac_have_decl
10957_ACEOF
10958ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10959if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10960 ac_have_decl=1
10961else
10962 ac_have_decl=0
10963fi
10964
10965cat >>confdefs.h <<_ACEOF
10966#define HAVE_DECL_STRTOLL $ac_have_decl
10967_ACEOF
10968ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10969if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10970 ac_have_decl=1
10971else
10972 ac_have_decl=0
10973fi
10974
10975cat >>confdefs.h <<_ACEOF
10976#define HAVE_DECL_STRTOULL $ac_have_decl
10977_ACEOF
10978
10979 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10980if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10981 ac_have_decl=1
10982else
10983 ac_have_decl=0
10984fi
10985
10986cat >>confdefs.h <<_ACEOF
10987#define HAVE_DECL_STRVERSCMP $ac_have_decl
10988_ACEOF
10989
10990
10991
81ecdfbb
RW
10992ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10993if test "x$ac_cv_have_decl_free" = x""yes; then :
10994 ac_have_decl=1
bec39cab 10995else
81ecdfbb
RW
10996 ac_have_decl=0
10997fi
10998
10999cat >>confdefs.h <<_ACEOF
11000#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11001_ACEOF
81ecdfbb
RW
11002ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11003if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11004 ac_have_decl=1
11005else
11006 ac_have_decl=0
11007fi
11008
11009cat >>confdefs.h <<_ACEOF
11010#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11011_ACEOF
81ecdfbb
RW
11012ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11013if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11014 ac_have_decl=1
bec39cab 11015else
81ecdfbb
RW
11016 ac_have_decl=0
11017fi
bec39cab 11018
81ecdfbb
RW
11019cat >>confdefs.h <<_ACEOF
11020#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11021_ACEOF
81ecdfbb
RW
11022ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11023if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11024 ac_have_decl=1
11025else
11026 ac_have_decl=0
5ee754fc 11027fi
81ecdfbb
RW
11028
11029cat >>confdefs.h <<_ACEOF
11030#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11031_ACEOF
5ee754fc 11032
5ee754fc 11033
81ecdfbb
RW
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11035$as_echo_n "checking for LC_MESSAGES... " >&6; }
11036if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11037 $as_echo_n "(cached) " >&6
bec39cab 11038else
81ecdfbb 11039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11040/* end confdefs.h. */
81ecdfbb 11041#include <locale.h>
a9322a30
TT
11042int
11043main ()
11044{
81ecdfbb 11045return LC_MESSAGES
a9322a30
TT
11046 ;
11047 return 0;
11048}
bec39cab 11049_ACEOF
81ecdfbb
RW
11050if ac_fn_c_try_link "$LINENO"; then :
11051 am_cv_val_LC_MESSAGES=yes
bec39cab 11052else
81ecdfbb
RW
11053 am_cv_val_LC_MESSAGES=no
11054fi
11055rm -f core conftest.err conftest.$ac_objext \
11056 conftest$ac_exeext conftest.$ac_ext
11057fi
11058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11059$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11060 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11061
81ecdfbb
RW
11062$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11063
11064 fi
11065
11066
11067# ----------------------- #
11068# Checks for structures. #
11069# ----------------------- #
11070
11071ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11072if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11073
11074cat >>confdefs.h <<_ACEOF
11075#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11076_ACEOF
7eb368b3 11077
81ecdfbb 11078
7eb368b3 11079fi
81ecdfbb
RW
11080ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11081if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11082
a9322a30
TT
11083cat >>confdefs.h <<_ACEOF
11084#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11085_ACEOF
11086
a9322a30 11087
7eb368b3
NR
11088fi
11089
7eb368b3 11090
a9322a30
TT
11091# ------------------ #
11092# Checks for types. #
11093# ------------------ #
7eb368b3 11094
81ecdfbb 11095ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11096#include <sys/socket.h>
11097
81ecdfbb
RW
11098"
11099if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11100
a9322a30
TT
11101cat >>confdefs.h <<_ACEOF
11102#define HAVE_SOCKLEN_T 1
11103_ACEOF
11104
11105
11106fi
11107
11108
11109# ------------------------------------- #
11110# Checks for compiler characteristics. #
11111# ------------------------------------- #
11112
81ecdfbb
RW
11113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11114$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11115if test "${ac_cv_c_const+set}" = set; then :
11116 $as_echo_n "(cached) " >&6
a9322a30 11117else
81ecdfbb 11118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11119/* end confdefs.h. */
a9322a30
TT
11120
11121int
11122main ()
11123{
11124/* FIXME: Include the comments suggested by Paul. */
11125#ifndef __cplusplus
11126 /* Ultrix mips cc rejects this. */
11127 typedef int charset[2];
81ecdfbb 11128 const charset cs;
a9322a30 11129 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11130 char const *const *pcpcc;
11131 char **ppc;
a9322a30
TT
11132 /* NEC SVR4.0.2 mips cc rejects this. */
11133 struct point {int x, y;};
11134 static struct point const zero = {0,0};
11135 /* AIX XL C 1.02.0.0 rejects this.
11136 It does not let you subtract one const X* pointer from another in
11137 an arm of an if-expression whose if-part is not a constant
11138 expression */
11139 const char *g = "string";
81ecdfbb 11140 pcpcc = &g + (g ? g-g : 0);
a9322a30 11141 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11142 ++pcpcc;
11143 ppc = (char**) pcpcc;
11144 pcpcc = (char const *const *) ppc;
a9322a30
TT
11145 { /* SCO 3.2v4 cc rejects this. */
11146 char *t;
11147 char const *s = 0 ? (char *) 0 : (char const *) 0;
11148
11149 *t++ = 0;
81ecdfbb 11150 if (s) return 0;
a9322a30
TT
11151 }
11152 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11153 int x[] = {25, 17};
11154 const int *foo = &x[0];
11155 ++foo;
11156 }
11157 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11158 typedef const int *iptr;
11159 iptr p = 0;
11160 ++p;
11161 }
11162 { /* AIX XL C 1.02.0.0 rejects this saying
11163 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11164 struct s { int j; const int *ap[3]; };
11165 struct s *b; b->j = 5;
11166 }
11167 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11168 const int foo = 10;
81ecdfbb 11169 if (!foo) return 0;
a9322a30 11170 }
81ecdfbb 11171 return !cs[0] && !zero.x;
a9322a30
TT
11172#endif
11173
11174 ;
11175 return 0;
11176}
bec39cab 11177_ACEOF
81ecdfbb 11178if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11179 ac_cv_c_const=yes
5ee754fc 11180else
81ecdfbb 11181 ac_cv_c_const=no
5ee754fc 11182fi
81ecdfbb 11183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11184fi
81ecdfbb
RW
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11186$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11187if test $ac_cv_c_const = no; then
bec39cab 11188
81ecdfbb 11189$as_echo "#define const /**/" >>confdefs.h
bec39cab 11190
5ee754fc 11191fi
bec39cab 11192
81ecdfbb
RW
11193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11194$as_echo_n "checking for inline... " >&6; }
11195if test "${ac_cv_c_inline+set}" = set; then :
11196 $as_echo_n "(cached) " >&6
bec39cab 11197else
a9322a30
TT
11198 ac_cv_c_inline=no
11199for ac_kw in inline __inline__ __inline; do
81ecdfbb 11200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11201/* end confdefs.h. */
a9322a30
TT
11202#ifndef __cplusplus
11203typedef int foo_t;
11204static $ac_kw foo_t static_foo () {return 0; }
11205$ac_kw foo_t foo () {return 0; }
11206#endif
11207
bec39cab 11208_ACEOF
81ecdfbb
RW
11209if ac_fn_c_try_compile "$LINENO"; then :
11210 ac_cv_c_inline=$ac_kw
bec39cab 11211fi
81ecdfbb
RW
11212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11213 test "$ac_cv_c_inline" != no && break
a9322a30 11214done
bec39cab 11215
5ee754fc 11216fi
81ecdfbb
RW
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11218$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11219
a9322a30
TT
11220case $ac_cv_c_inline in
11221 inline | yes) ;;
11222 *)
11223 case $ac_cv_c_inline in
11224 no) ac_val=;;
11225 *) ac_val=$ac_cv_c_inline;;
11226 esac
11227 cat >>confdefs.h <<_ACEOF
11228#ifndef __cplusplus
11229#define inline $ac_val
11230#endif
11231_ACEOF
bec39cab
AC
11232 ;;
11233esac
bec39cab 11234
81ecdfbb
RW
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11236$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11237if test "${ac_cv_c_bigendian+set}" = set; then :
11238 $as_echo_n "(cached) " >&6
bec39cab 11239else
81ecdfbb
RW
11240 ac_cv_c_bigendian=unknown
11241 # See if we're dealing with a universal compiler.
11242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11243/* end confdefs.h. */
11244#ifndef __APPLE_CC__
11245 not a universal capable compiler
11246 #endif
11247 typedef int dummy;
11248
11249_ACEOF
11250if ac_fn_c_try_compile "$LINENO"; then :
11251
11252 # Check for potential -arch flags. It is not universal unless
11253 # there are at least two -arch flags with different values.
11254 ac_arch=
11255 ac_prev=
11256 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11257 if test -n "$ac_prev"; then
11258 case $ac_word in
11259 i?86 | x86_64 | ppc | ppc64)
11260 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11261 ac_arch=$ac_word
11262 else
11263 ac_cv_c_bigendian=universal
11264 break
11265 fi
11266 ;;
11267 esac
11268 ac_prev=
11269 elif test "x$ac_word" = "x-arch"; then
11270 ac_prev=arch
11271 fi
11272 done
11273fi
11274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11275 if test $ac_cv_c_bigendian = unknown; then
11276 # See if sys/param.h defines the BYTE_ORDER macro.
11277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11278/* end confdefs.h. */
a9322a30 11279#include <sys/types.h>
81ecdfbb 11280 #include <sys/param.h>
a9322a30
TT
11281
11282int
11283main ()
11284{
81ecdfbb
RW
11285#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11286 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11287 && LITTLE_ENDIAN)
11288 bogus endian macros
11289 #endif
a9322a30
TT
11290
11291 ;
11292 return 0;
11293}
bec39cab 11294_ACEOF
81ecdfbb 11295if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11296 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11298/* end confdefs.h. */
a9322a30 11299#include <sys/types.h>
81ecdfbb 11300 #include <sys/param.h>
a9322a30
TT
11301
11302int
11303main ()
11304{
11305#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11306 not big endian
11307 #endif
a9322a30
TT
11308
11309 ;
11310 return 0;
11311}
bec39cab 11312_ACEOF
81ecdfbb 11313if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11314 ac_cv_c_bigendian=yes
5ee754fc 11315else
81ecdfbb 11316 ac_cv_c_bigendian=no
5ee754fc 11317fi
81ecdfbb
RW
11318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11319fi
11320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11321 fi
11322 if test $ac_cv_c_bigendian = unknown; then
11323 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325/* end confdefs.h. */
11326#include <limits.h>
bec39cab 11327
81ecdfbb
RW
11328int
11329main ()
11330{
11331#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11332 bogus endian macros
11333 #endif
11334
11335 ;
11336 return 0;
11337}
7eb368b3 11338_ACEOF
81ecdfbb
RW
11339if ac_fn_c_try_compile "$LINENO"; then :
11340 # It does; now see whether it defined to _BIG_ENDIAN or not.
11341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11342/* end confdefs.h. */
81ecdfbb
RW
11343#include <limits.h>
11344
7eb368b3
NR
11345int
11346main ()
11347{
81ecdfbb
RW
11348#ifndef _BIG_ENDIAN
11349 not big endian
11350 #endif
11351
7eb368b3
NR
11352 ;
11353 return 0;
11354}
11355_ACEOF
81ecdfbb 11356if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11357 ac_cv_c_bigendian=yes
81ecdfbb
RW
11358else
11359 ac_cv_c_bigendian=no
a9322a30 11360fi
81ecdfbb 11361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11362fi
81ecdfbb
RW
11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11364 fi
11365 if test $ac_cv_c_bigendian = unknown; then
11366 # Compile a test program.
11367 if test "$cross_compiling" = yes; then :
11368 # Try to guess by grepping values from an object file.
11369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11370/* end confdefs.h. */
11371short int ascii_mm[] =
11372 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11373 short int ascii_ii[] =
11374 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11375 int use_ascii (int i) {
11376 return ascii_mm[i] + ascii_ii[i];
11377 }
11378 short int ebcdic_ii[] =
11379 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11380 short int ebcdic_mm[] =
11381 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11382 int use_ebcdic (int i) {
11383 return ebcdic_mm[i] + ebcdic_ii[i];
11384 }
11385 extern int foo;
7eb368b3 11386
81ecdfbb
RW
11387int
11388main ()
11389{
11390return use_ascii (foo) == use_ebcdic (foo);
11391 ;
11392 return 0;
11393}
11394_ACEOF
11395if ac_fn_c_try_compile "$LINENO"; then :
11396 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11397 ac_cv_c_bigendian=yes
11398 fi
11399 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11400 if test "$ac_cv_c_bigendian" = unknown; then
11401 ac_cv_c_bigendian=no
11402 else
11403 # finding both strings is unlikely to happen, but who knows?
11404 ac_cv_c_bigendian=unknown
11405 fi
11406 fi
7eb368b3 11407fi
81ecdfbb 11408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11409else
81ecdfbb 11410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11411/* end confdefs.h. */
81ecdfbb 11412$ac_includes_default
d3ea6809
MM
11413int
11414main ()
11415{
81ecdfbb
RW
11416
11417 /* Are we little or big endian? From Harbison&Steele. */
11418 union
11419 {
11420 long int l;
11421 char c[sizeof (long int)];
11422 } u;
11423 u.l = 1;
11424 return u.c[sizeof (long int) - 1] == 1;
11425
11426 ;
11427 return 0;
d3ea6809
MM
11428}
11429_ACEOF
81ecdfbb 11430if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11431 ac_cv_c_bigendian=no
d3ea6809 11432else
81ecdfbb 11433 ac_cv_c_bigendian=yes
d3ea6809 11434fi
81ecdfbb
RW
11435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11436 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11437fi
a9322a30 11438
81ecdfbb
RW
11439 fi
11440fi
11441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11442$as_echo "$ac_cv_c_bigendian" >&6; }
11443 case $ac_cv_c_bigendian in #(
11444 yes)
11445 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11446;; #(
11447 no)
11448 ;; #(
11449 universal)
11450
11451$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11452
11453 ;; #(
11454 *)
11455 as_fn_error "unknown endianness
11456 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11457 esac
d3ea6809
MM
11458
11459
a9322a30
TT
11460# ------------------------------ #
11461# Checks for library functions. #
11462# ------------------------------ #
d3ea6809 11463
a9322a30 11464for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11465do :
11466 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11467ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11468eval as_val=\$$as_ac_Header
11469 if test "x$as_val" = x""yes; then :
bec39cab 11470 cat >>confdefs.h <<_ACEOF
81ecdfbb 11471#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11472_ACEOF
b757528f 11473
b757528f 11474fi
bec39cab 11475
a9322a30 11476done
a3828db0 11477
a9322a30 11478for ac_func in getpagesize
81ecdfbb
RW
11479do :
11480 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11481if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11482 cat >>confdefs.h <<_ACEOF
81ecdfbb 11483#define HAVE_GETPAGESIZE 1
bec39cab 11484_ACEOF
bcb3dc3d 11485
bcb3dc3d
MK
11486fi
11487done
11488
81ecdfbb
RW
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11490$as_echo_n "checking for working mmap... " >&6; }
11491if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11492 $as_echo_n "(cached) " >&6
a9322a30 11493else
81ecdfbb 11494 if test "$cross_compiling" = yes; then :
a9322a30 11495 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11496else
81ecdfbb 11497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11498/* end confdefs.h. */
a9322a30
TT
11499$ac_includes_default
11500/* malloc might have been renamed as rpl_malloc. */
11501#undef malloc
bec39cab 11502
a9322a30
TT
11503/* Thanks to Mike Haertel and Jim Avera for this test.
11504 Here is a matrix of mmap possibilities:
11505 mmap private not fixed
11506 mmap private fixed at somewhere currently unmapped
11507 mmap private fixed at somewhere already mapped
11508 mmap shared not fixed
11509 mmap shared fixed at somewhere currently unmapped
11510 mmap shared fixed at somewhere already mapped
11511 For private mappings, we should verify that changes cannot be read()
11512 back from the file, nor mmap's back from the file at a different
11513 address. (There have been systems where private was not correctly
11514 implemented like the infamous i386 svr4.0, and systems where the
11515 VM page cache was not coherent with the file system buffer cache
11516 like early versions of FreeBSD and possibly contemporary NetBSD.)
11517 For shared mappings, we should conversely verify that changes get
11518 propagated back to all the places they're supposed to be.
bec39cab 11519
a9322a30
TT
11520 Grep wants private fixed already mapped.
11521 The main things grep needs to know about mmap are:
11522 * does it exist and is it safe to write into the mmap'd area
11523 * how to use it (BSD variants) */
8b9cf735 11524
a9322a30
TT
11525#include <fcntl.h>
11526#include <sys/mman.h>
8b9cf735 11527
81ecdfbb 11528#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11529char *malloc ();
a3828db0
MK
11530#endif
11531
a9322a30 11532/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11533#ifndef HAVE_GETPAGESIZE
a9322a30 11534/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11535# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11536# define HAVE_SYS_PARAM_H 1
11537# endif
11538
11539# ifdef _SC_PAGESIZE
11540# define getpagesize() sysconf(_SC_PAGESIZE)
11541# else /* no _SC_PAGESIZE */
81ecdfbb 11542# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11543# include <sys/param.h>
11544# ifdef EXEC_PAGESIZE
11545# define getpagesize() EXEC_PAGESIZE
11546# else /* no EXEC_PAGESIZE */
11547# ifdef NBPG
11548# define getpagesize() NBPG * CLSIZE
11549# ifndef CLSIZE
11550# define CLSIZE 1
11551# endif /* no CLSIZE */
11552# else /* no NBPG */
11553# ifdef NBPC
11554# define getpagesize() NBPC
11555# else /* no NBPC */
11556# ifdef PAGESIZE
11557# define getpagesize() PAGESIZE
11558# endif /* PAGESIZE */
11559# endif /* no NBPC */
11560# endif /* no NBPG */
11561# endif /* no EXEC_PAGESIZE */
11562# else /* no HAVE_SYS_PARAM_H */
11563# define getpagesize() 8192 /* punt totally */
11564# endif /* no HAVE_SYS_PARAM_H */
11565# endif /* no _SC_PAGESIZE */
11566
11567#endif /* no HAVE_GETPAGESIZE */
11568
bec39cab
AC
11569int
11570main ()
11571{
a9322a30
TT
11572 char *data, *data2, *data3;
11573 int i, pagesize;
11574 int fd;
11575
11576 pagesize = getpagesize ();
11577
11578 /* First, make a file with some known garbage in it. */
11579 data = (char *) malloc (pagesize);
11580 if (!data)
81ecdfbb 11581 return 1;
a9322a30
TT
11582 for (i = 0; i < pagesize; ++i)
11583 *(data + i) = rand ();
11584 umask (0);
11585 fd = creat ("conftest.mmap", 0600);
11586 if (fd < 0)
81ecdfbb 11587 return 1;
a9322a30 11588 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11589 return 1;
a9322a30
TT
11590 close (fd);
11591
11592 /* Next, try to mmap the file at a fixed address which already has
11593 something else allocated at it. If we can, also make sure that
11594 we see the same garbage. */
11595 fd = open ("conftest.mmap", O_RDWR);
11596 if (fd < 0)
81ecdfbb 11597 return 1;
a9322a30
TT
11598 data2 = (char *) malloc (2 * pagesize);
11599 if (!data2)
81ecdfbb
RW
11600 return 1;
11601 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11602 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11603 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11604 return 1;
a9322a30
TT
11605 for (i = 0; i < pagesize; ++i)
11606 if (*(data + i) != *(data2 + i))
81ecdfbb 11607 return 1;
a9322a30
TT
11608
11609 /* Finally, make sure that changes to the mapped area do not
11610 percolate back to the file as seen by read(). (This is a bug on
11611 some variants of i386 svr4.0.) */
11612 for (i = 0; i < pagesize; ++i)
11613 *(data2 + i) = *(data2 + i) + 1;
11614 data3 = (char *) malloc (pagesize);
11615 if (!data3)
81ecdfbb 11616 return 1;
a9322a30 11617 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11618 return 1;
a9322a30
TT
11619 for (i = 0; i < pagesize; ++i)
11620 if (*(data + i) != *(data3 + i))
81ecdfbb 11621 return 1;
a9322a30 11622 close (fd);
81ecdfbb 11623 return 0;
bec39cab
AC
11624}
11625_ACEOF
81ecdfbb 11626if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11627 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11628else
81ecdfbb 11629 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11630fi
81ecdfbb
RW
11631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11632 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11633fi
81ecdfbb 11634
a9322a30 11635fi
81ecdfbb
RW
11636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11637$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11638if test $ac_cv_func_mmap_fixed_mapped = yes; then
11639
81ecdfbb 11640$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11641
086ec9eb 11642fi
a9322a30 11643rm -f conftest.mmap
a3828db0 11644
81ecdfbb
RW
11645ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11646if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11647
a9322a30
TT
11648else
11649
11650cat >>confdefs.h <<_ACEOF
11651#define pid_t int
bec39cab 11652_ACEOF
086ec9eb
MK
11653
11654fi
11655
81ecdfbb
RW
11656for ac_header in vfork.h
11657do :
11658 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11659if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11660 cat >>confdefs.h <<_ACEOF
81ecdfbb 11661#define HAVE_VFORK_H 1
bec39cab 11662_ACEOF
c906108c
SS
11663
11664fi
a9322a30 11665
a3828db0 11666done
c906108c 11667
a9322a30 11668for ac_func in fork vfork
81ecdfbb
RW
11669do :
11670 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11671ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11672eval as_val=\$$as_ac_var
11673 if test "x$as_val" = x""yes; then :
a3828db0 11674 cat >>confdefs.h <<_ACEOF
81ecdfbb 11675#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11676_ACEOF
b83266a0 11677
97bf5e38 11678fi
a3828db0 11679done
b83266a0 11680
a9322a30 11681if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11683$as_echo_n "checking for working fork... " >&6; }
11684if test "${ac_cv_func_fork_works+set}" = set; then :
11685 $as_echo_n "(cached) " >&6
a9322a30 11686else
81ecdfbb 11687 if test "$cross_compiling" = yes; then :
a9322a30
TT
11688 ac_cv_func_fork_works=cross
11689else
81ecdfbb
RW
11690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11691/* end confdefs.h. */
11692$ac_includes_default
11693int
11694main ()
11695{
11696
11697 /* By Ruediger Kuhlmann. */
11698 return fork () < 0;
11699
11700 ;
11701 return 0;
11702}
a9322a30 11703_ACEOF
81ecdfbb 11704if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11705 ac_cv_func_fork_works=yes
11706else
81ecdfbb 11707 ac_cv_func_fork_works=no
a9322a30 11708fi
81ecdfbb
RW
11709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11710 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11711fi
81ecdfbb 11712
a9322a30 11713fi
81ecdfbb
RW
11714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11715$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11716
11717else
11718 ac_cv_func_fork_works=$ac_cv_func_fork
11719fi
11720if test "x$ac_cv_func_fork_works" = xcross; then
11721 case $host in
11722 *-*-amigaos* | *-*-msdosdjgpp*)
11723 # Override, as these systems have only a dummy fork() stub
11724 ac_cv_func_fork_works=no
11725 ;;
11726 *)
11727 ac_cv_func_fork_works=yes
11728 ;;
11729 esac
81ecdfbb
RW
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11731$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11732fi
11733ac_cv_func_vfork_works=$ac_cv_func_vfork
11734if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11736$as_echo_n "checking for working vfork... " >&6; }
11737if test "${ac_cv_func_vfork_works+set}" = set; then :
11738 $as_echo_n "(cached) " >&6
a9322a30 11739else
81ecdfbb 11740 if test "$cross_compiling" = yes; then :
a9322a30
TT
11741 ac_cv_func_vfork_works=cross
11742else
81ecdfbb 11743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11744/* end confdefs.h. */
11745/* Thanks to Paul Eggert for this test. */
81ecdfbb 11746$ac_includes_default
a9322a30 11747#include <sys/wait.h>
81ecdfbb 11748#ifdef HAVE_VFORK_H
a9322a30
TT
11749# include <vfork.h>
11750#endif
11751/* On some sparc systems, changes by the child to local and incoming
11752 argument registers are propagated back to the parent. The compiler
11753 is told about this with #include <vfork.h>, but some compilers
11754 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11755 static variable whose address is put into a register that is
11756 clobbered by the vfork. */
11757static void
11758#ifdef __cplusplus
11759sparc_address_test (int arg)
11760# else
11761sparc_address_test (arg) int arg;
11762#endif
11763{
11764 static pid_t child;
11765 if (!child) {
11766 child = vfork ();
11767 if (child < 0) {
11768 perror ("vfork");
11769 _exit(2);
11770 }
11771 if (!child) {
11772 arg = getpid();
11773 write(-1, "", 0);
11774 _exit (arg);
11775 }
11776 }
11777}
11778
11779int
11780main ()
11781{
11782 pid_t parent = getpid ();
11783 pid_t child;
11784
11785 sparc_address_test (0);
11786
11787 child = vfork ();
11788
11789 if (child == 0) {
11790 /* Here is another test for sparc vfork register problems. This
11791 test uses lots of local variables, at least as many local
11792 variables as main has allocated so far including compiler
11793 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11794 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11795 reuse the register of parent for one of the local variables,
11796 since it will think that parent can't possibly be used any more
11797 in this routine. Assigning to the local variable will thus
11798 munge parent in the parent process. */
11799 pid_t
11800 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11801 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11802 /* Convince the compiler that p..p7 are live; otherwise, it might
11803 use the same hardware register for all 8 local variables. */
11804 if (p != p1 || p != p2 || p != p3 || p != p4
11805 || p != p5 || p != p6 || p != p7)
11806 _exit(1);
11807
11808 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11809 from child file descriptors. If the child closes a descriptor
11810 before it execs or exits, this munges the parent's descriptor
11811 as well. Test for this by closing stdout in the child. */
11812 _exit(close(fileno(stdout)) != 0);
11813 } else {
11814 int status;
11815 struct stat st;
11816
11817 while (wait(&status) != child)
11818 ;
81ecdfbb 11819 return (
a9322a30
TT
11820 /* Was there some problem with vforking? */
11821 child < 0
11822
11823 /* Did the child fail? (This shouldn't happen.) */
11824 || status
11825
11826 /* Did the vfork/compiler bug occur? */
11827 || parent != getpid()
11828
11829 /* Did the file descriptor bug occur? */
11830 || fstat(fileno(stdout), &st) != 0
11831 );
11832 }
11833}
11834_ACEOF
81ecdfbb 11835if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11836 ac_cv_func_vfork_works=yes
11837else
81ecdfbb 11838 ac_cv_func_vfork_works=no
a9322a30 11839fi
81ecdfbb
RW
11840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11841 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11842fi
81ecdfbb 11843
a9322a30 11844fi
81ecdfbb
RW
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11846$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11847
11848fi;
11849if test "x$ac_cv_func_fork_works" = xcross; then
11850 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11852$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11853fi
11854
11855if test "x$ac_cv_func_vfork_works" = xyes; then
11856
81ecdfbb 11857$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11858
11859else
11860
81ecdfbb 11861$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11862
11863fi
11864if test "x$ac_cv_func_fork_works" = xyes; then
11865
81ecdfbb 11866$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11867
11868fi
11869
cdf43629 11870for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11871 pipe poll pread pread64 pwrite resize_term \
7313baad 11872 sbrk setpgid setpgrp setsid \
9467110b 11873 sigaction sigprocmask sigsetmask socketpair \
110ed339 11874 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11875 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11876 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11877do :
11878 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11880eval as_val=\$$as_ac_var
11881 if test "x$as_val" = x""yes; then :
6c7a06a3 11882 cat >>confdefs.h <<_ACEOF
81ecdfbb 11883#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11884_ACEOF
11885
11886fi
11887done
11888
11889
81ecdfbb
RW
11890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11891$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11892if test "${am_cv_langinfo_codeset+set}" = set; then :
11893 $as_echo_n "(cached) " >&6
6c7a06a3 11894else
81ecdfbb 11895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11896/* end confdefs.h. */
11897#include <langinfo.h>
11898int
11899main ()
11900{
11901char* cs = nl_langinfo(CODESET);
bec39cab
AC
11902 ;
11903 return 0;
11904}
11905_ACEOF
81ecdfbb 11906if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11907 am_cv_langinfo_codeset=yes
a4db0f07 11908else
81ecdfbb 11909 am_cv_langinfo_codeset=no
a4db0f07 11910fi
81ecdfbb
RW
11911rm -f core conftest.err conftest.$ac_objext \
11912 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11913
a4db0f07 11914fi
81ecdfbb
RW
11915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11916$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11917 if test $am_cv_langinfo_codeset = yes; then
11918
81ecdfbb 11919$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11920
6c7a06a3 11921 fi
c906108c 11922
06825bd1 11923
3266f10b
TT
11924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11925$as_echo_n "checking for ANSI C header files... " >&6; }
11926if test "${ac_cv_header_stdc+set}" = set; then :
11927 $as_echo_n "(cached) " >&6
11928else
11929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11930/* end confdefs.h. */
11931#include <stdlib.h>
11932#include <stdarg.h>
11933#include <string.h>
11934#include <float.h>
11935
11936int
11937main ()
11938{
11939
11940 ;
11941 return 0;
11942}
11943_ACEOF
11944if ac_fn_c_try_compile "$LINENO"; then :
11945 ac_cv_header_stdc=yes
11946else
11947 ac_cv_header_stdc=no
11948fi
11949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11950
11951if test $ac_cv_header_stdc = yes; then
11952 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11954/* end confdefs.h. */
11955#include <string.h>
11956
11957_ACEOF
11958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11959 $EGREP "memchr" >/dev/null 2>&1; then :
11960
11961else
11962 ac_cv_header_stdc=no
11963fi
11964rm -f conftest*
11965
11966fi
11967
11968if test $ac_cv_header_stdc = yes; then
11969 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11971/* end confdefs.h. */
11972#include <stdlib.h>
11973
11974_ACEOF
11975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11976 $EGREP "free" >/dev/null 2>&1; then :
11977
11978else
11979 ac_cv_header_stdc=no
11980fi
11981rm -f conftest*
11982
11983fi
11984
11985if test $ac_cv_header_stdc = yes; then
11986 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11987 if test "$cross_compiling" = yes; then :
11988 :
11989else
11990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991/* end confdefs.h. */
11992#include <ctype.h>
11993#include <stdlib.h>
11994#if ((' ' & 0x0FF) == 0x020)
11995# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11996# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11997#else
11998# define ISLOWER(c) \
11999 (('a' <= (c) && (c) <= 'i') \
12000 || ('j' <= (c) && (c) <= 'r') \
12001 || ('s' <= (c) && (c) <= 'z'))
12002# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12003#endif
12004
12005#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12006int
12007main ()
12008{
12009 int i;
12010 for (i = 0; i < 256; i++)
12011 if (XOR (islower (i), ISLOWER (i))
12012 || toupper (i) != TOUPPER (i))
12013 return 2;
12014 return 0;
12015}
12016_ACEOF
12017if ac_fn_c_try_run "$LINENO"; then :
12018
12019else
12020 ac_cv_header_stdc=no
12021fi
12022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12023 conftest.$ac_objext conftest.beam conftest.$ac_ext
12024fi
12025
12026fi
12027fi
12028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12029$as_echo "$ac_cv_header_stdc" >&6; }
12030if test $ac_cv_header_stdc = yes; then
12031
12032$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12033
3266f10b
TT
12034fi
12035
12036 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12037# for constant arguments. Useless!
12038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12039$as_echo_n "checking for working alloca.h... " >&6; }
12040if test "${ac_cv_working_alloca_h+set}" = set; then :
12041 $as_echo_n "(cached) " >&6
12042else
12043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12044/* end confdefs.h. */
12045#include <alloca.h>
12046int
12047main ()
12048{
12049char *p = (char *) alloca (2 * sizeof (int));
12050 if (p) return 0;
12051 ;
12052 return 0;
12053}
12054_ACEOF
12055if ac_fn_c_try_link "$LINENO"; then :
12056 ac_cv_working_alloca_h=yes
12057else
12058 ac_cv_working_alloca_h=no
12059fi
12060rm -f core conftest.err conftest.$ac_objext \
12061 conftest$ac_exeext conftest.$ac_ext
12062fi
12063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12064$as_echo "$ac_cv_working_alloca_h" >&6; }
12065if test $ac_cv_working_alloca_h = yes; then
12066
12067$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12068
12069fi
12070
12071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12072$as_echo_n "checking for alloca... " >&6; }
12073if test "${ac_cv_func_alloca_works+set}" = set; then :
12074 $as_echo_n "(cached) " >&6
12075else
12076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077/* end confdefs.h. */
12078#ifdef __GNUC__
12079# define alloca __builtin_alloca
12080#else
12081# ifdef _MSC_VER
12082# include <malloc.h>
12083# define alloca _alloca
12084# else
12085# ifdef HAVE_ALLOCA_H
12086# include <alloca.h>
12087# else
12088# ifdef _AIX
12089 #pragma alloca
12090# else
12091# ifndef alloca /* predefined by HP cc +Olibcalls */
12092char *alloca ();
12093# endif
12094# endif
12095# endif
12096# endif
12097#endif
12098
12099int
12100main ()
12101{
12102char *p = (char *) alloca (1);
12103 if (p) return 0;
12104 ;
12105 return 0;
12106}
12107_ACEOF
12108if ac_fn_c_try_link "$LINENO"; then :
12109 ac_cv_func_alloca_works=yes
12110else
12111 ac_cv_func_alloca_works=no
12112fi
12113rm -f core conftest.err conftest.$ac_objext \
12114 conftest$ac_exeext conftest.$ac_ext
12115fi
12116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12117$as_echo "$ac_cv_func_alloca_works" >&6; }
12118
12119if test $ac_cv_func_alloca_works = yes; then
12120
12121$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12122
12123else
12124 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12125# that cause trouble. Some versions do not even contain alloca or
12126# contain a buggy version. If you still want to use their alloca,
12127# use ar to extract alloca.o from them instead of compiling alloca.c.
12128
12129ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12130
12131$as_echo "#define C_ALLOCA 1" >>confdefs.h
12132
12133
12134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12135$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12136if test "${ac_cv_os_cray+set}" = set; then :
12137 $as_echo_n "(cached) " >&6
12138else
12139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12140/* end confdefs.h. */
12141#if defined CRAY && ! defined CRAY2
12142webecray
12143#else
12144wenotbecray
12145#endif
12146
12147_ACEOF
12148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12149 $EGREP "webecray" >/dev/null 2>&1; then :
12150 ac_cv_os_cray=yes
12151else
12152 ac_cv_os_cray=no
12153fi
12154rm -f conftest*
12155
12156fi
12157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12158$as_echo "$ac_cv_os_cray" >&6; }
12159if test $ac_cv_os_cray = yes; then
12160 for ac_func in _getb67 GETB67 getb67; do
12161 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12162ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12163eval as_val=\$$as_ac_var
12164 if test "x$as_val" = x""yes; then :
12165
12166cat >>confdefs.h <<_ACEOF
12167#define CRAY_STACKSEG_END $ac_func
12168_ACEOF
12169
12170 break
12171fi
12172
12173 done
12174fi
12175
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12177$as_echo_n "checking stack direction for C alloca... " >&6; }
12178if test "${ac_cv_c_stack_direction+set}" = set; then :
12179 $as_echo_n "(cached) " >&6
12180else
12181 if test "$cross_compiling" = yes; then :
12182 ac_cv_c_stack_direction=0
12183else
12184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12185/* end confdefs.h. */
12186$ac_includes_default
12187int
12188find_stack_direction ()
12189{
12190 static char *addr = 0;
12191 auto char dummy;
12192 if (addr == 0)
12193 {
12194 addr = &dummy;
12195 return find_stack_direction ();
12196 }
12197 else
12198 return (&dummy > addr) ? 1 : -1;
12199}
12200
12201int
12202main ()
12203{
12204 return find_stack_direction () < 0;
12205}
12206_ACEOF
12207if ac_fn_c_try_run "$LINENO"; then :
12208 ac_cv_c_stack_direction=1
12209else
12210 ac_cv_c_stack_direction=-1
12211fi
12212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12213 conftest.$ac_objext conftest.beam conftest.$ac_ext
12214fi
12215
12216fi
12217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12218$as_echo "$ac_cv_c_stack_direction" >&6; }
12219cat >>confdefs.h <<_ACEOF
12220#define STACK_DIRECTION $ac_cv_c_stack_direction
12221_ACEOF
12222
12223
12224fi
12225
12226
12227
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12229$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12230if test "${am_cv_langinfo_codeset+set}" = set; then :
12231 $as_echo_n "(cached) " >&6
12232else
12233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12234/* end confdefs.h. */
12235#include <langinfo.h>
12236int
12237main ()
12238{
12239char* cs = nl_langinfo(CODESET);
12240 ;
12241 return 0;
12242}
12243_ACEOF
12244if ac_fn_c_try_link "$LINENO"; then :
12245 am_cv_langinfo_codeset=yes
12246else
12247 am_cv_langinfo_codeset=no
12248fi
12249rm -f core conftest.err conftest.$ac_objext \
12250 conftest$ac_exeext conftest.$ac_ext
12251
12252fi
12253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12254$as_echo "$am_cv_langinfo_codeset" >&6; }
12255 if test $am_cv_langinfo_codeset = yes; then
12256
12257$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12258
12259 fi
12260
12261
a3d08894 12262 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
12263do :
12264 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12265ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12266eval as_val=\$$as_ac_Header
12267 if test "x$as_val" = x""yes; then :
12268 cat >>confdefs.h <<_ACEOF
12269#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12270_ACEOF
12271
12272fi
12273
12274done
12275
12276
12277 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12278do :
12279 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12280ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12281eval as_val=\$$as_ac_var
12282 if test "x$as_val" = x""yes; then :
12283 cat >>confdefs.h <<_ACEOF
12284#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12285_ACEOF
12286
12287fi
12288done
12289
12290
12291 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12292if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12293 ac_have_decl=1
12294else
12295 ac_have_decl=0
12296fi
12297
12298cat >>confdefs.h <<_ACEOF
12299#define HAVE_DECL_STRERROR $ac_have_decl
12300_ACEOF
12301ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12302if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12303 ac_have_decl=1
12304else
12305 ac_have_decl=0
12306fi
12307
12308cat >>confdefs.h <<_ACEOF
12309#define HAVE_DECL_STRSTR $ac_have_decl
12310_ACEOF
12311
12312
e9bcb658
GB
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12314$as_echo_n "checking for sigsetjmp... " >&6; }
12315if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12316 $as_echo_n "(cached) " >&6
12317else
12318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12319/* end confdefs.h. */
12320
12321#include <setjmp.h>
12322
12323int
12324main ()
12325{
12326sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12327 ;
12328 return 0;
12329}
12330_ACEOF
12331if ac_fn_c_try_compile "$LINENO"; then :
12332 gdb_cv_func_sigsetjmp=yes
12333else
12334 gdb_cv_func_sigsetjmp=no
12335fi
12336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12337fi
12338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12339$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12340if test $gdb_cv_func_sigsetjmp = yes; then
12341
12342$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12343
12344fi
12345
3266f10b 12346
54019719
PA
12347# Check the return and argument types of ptrace.
12348
12349
12350
12351for ac_header in sys/ptrace.h ptrace.h
12352do :
12353 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12354ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12355eval as_val=\$$as_ac_Header
12356 if test "x$as_val" = x""yes; then :
12357 cat >>confdefs.h <<_ACEOF
12358#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12359_ACEOF
12360
12361fi
12362
12363done
12364
12365
12366# Needs to be tested in C++ mode, to detect whether we need to cast
12367# the first argument to enum __ptrace_request.
12368if test "$enable_build_with_cxx" = "yes"; then
12369 ac_ext=cpp
12370ac_cpp='$CXXCPP $CPPFLAGS'
12371ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12372ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12373ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12374
12375fi
12376
a3828db0 12377gdb_ptrace_headers='
4ff70b84 12378#include <sys/types.h>
a3828db0
MK
12379#if HAVE_SYS_PTRACE_H
12380# include <sys/ptrace.h>
12381#endif
12382#if HAVE_UNISTD_H
12383# include <unistd.h>
12384#endif
12385'
12386# There is no point in checking if we don't have a prototype.
54019719 12387ac_fn_cxx_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12388"
12389if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12390 ac_have_decl=1
06825bd1 12391else
81ecdfbb 12392 ac_have_decl=0
06825bd1 12393fi
06825bd1 12394
a3828db0 12395cat >>confdefs.h <<_ACEOF
81ecdfbb 12396#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12397_ACEOF
81ecdfbb 12398if test $ac_have_decl = 1; then :
bec39cab 12399
a3828db0 12400else
a3828db0
MK
12401
12402 : ${gdb_cv_func_ptrace_ret='int'}
12403 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12404
06825bd1
MK
12405fi
12406
064ef605
DJ
12407# Check return type. Varargs (used on GNU/Linux) conflict with the
12408# empty argument list, so check for that explicitly.
81ecdfbb
RW
12409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12410$as_echo_n "checking return type of ptrace... " >&6; }
12411if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12412 $as_echo_n "(cached) " >&6
bec39cab 12413else
81ecdfbb 12414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12415/* end confdefs.h. */
a3828db0 12416$gdb_ptrace_headers
bec39cab
AC
12417int
12418main ()
12419{
064ef605
DJ
12420extern long ptrace (enum __ptrace_request, ...);
12421 ;
12422 return 0;
12423}
12424_ACEOF
54019719 12425if ac_fn_cxx_try_compile "$LINENO"; then :
064ef605
DJ
12426 gdb_cv_func_ptrace_ret='long'
12427else
81ecdfbb 12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12429/* end confdefs.h. */
12430$gdb_ptrace_headers
12431int
12432main ()
12433{
a3828db0 12434extern int ptrace ();
bec39cab
AC
12435 ;
12436 return 0;
12437}
12438_ACEOF
54019719 12439if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0 12440 gdb_cv_func_ptrace_ret='int'
70f9f479 12441else
81ecdfbb 12442 gdb_cv_func_ptrace_ret='long'
70f9f479 12443fi
81ecdfbb 12444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12445fi
81ecdfbb 12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12447fi
81ecdfbb
RW
12448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12449$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12450
a3828db0
MK
12451cat >>confdefs.h <<_ACEOF
12452#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12453_ACEOF
70f9f479 12454
a3828db0 12455# Check argument types.
81ecdfbb
RW
12456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12457$as_echo_n "checking types of arguments for ptrace... " >&6; }
12458if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12459 $as_echo_n "(cached) " >&6
bec39cab 12460else
a3828db0 12461
81ecdfbb 12462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12463/* end confdefs.h. */
12464$gdb_ptrace_headers
12465int
12466main ()
12467{
12468extern long ptrace (enum __ptrace_request, ...);
12469 ;
12470 return 0;
12471}
12472_ACEOF
54019719
PA
12473if ac_fn_cxx_try_compile "$LINENO"; then :
12474 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12475else
064ef605 12476
a3828db0
MK
12477for gdb_arg1 in 'int' 'long'; do
12478 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12479 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12480 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12482/* end confdefs.h. */
a3828db0 12483$gdb_ptrace_headers
bec39cab
AC
12484int
12485main ()
12486{
a3828db0
MK
12487
12488extern $gdb_cv_func_ptrace_ret
12489 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12490
bec39cab
AC
12491 ;
12492 return 0;
12493}
12494_ACEOF
54019719 12495if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12496 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12497 break 4;
5c7f2947 12498fi
81ecdfbb 12499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12500 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12502/* end confdefs.h. */
a3828db0 12503$gdb_ptrace_headers
bec39cab
AC
12504int
12505main ()
12506{
a3828db0
MK
12507
12508extern $gdb_cv_func_ptrace_ret
12509 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12510
bec39cab
AC
12511 ;
12512 return 0;
12513}
12514_ACEOF
54019719 12515if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12516
12517gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12518 break 5;
78434e59 12519fi
81ecdfbb 12520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12521 done
12522 done
12523 done
12524 done
12525done
12526# Provide a safe default value.
12527: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12528
064ef605 12529fi
81ecdfbb 12530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12531fi
81ecdfbb
RW
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12533$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12534ac_save_IFS=$IFS; IFS=','
12535set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12536IFS=$ac_save_IFS
12537shift
bec39cab 12538
54019719
PA
12539cat >>confdefs.h <<_ACEOF
12540#define PTRACE_TYPE_ARG1 $1
12541_ACEOF
12542
12543
a3828db0
MK
12544cat >>confdefs.h <<_ACEOF
12545#define PTRACE_TYPE_ARG3 $3
12546_ACEOF
12547
96d7229d
LM
12548
12549cat >>confdefs.h <<_ACEOF
12550#define PTRACE_TYPE_ARG4 $4
12551_ACEOF
12552
a3828db0
MK
12553if test -n "$5"; then
12554
12555cat >>confdefs.h <<_ACEOF
12556#define PTRACE_TYPE_ARG5 $5
bec39cab 12557_ACEOF
78434e59
MK
12558
12559fi
12560
54019719
PA
12561if test "$enable_build_with_cxx" = "yes"; then
12562 ac_ext=c
12563ac_cpp='$CPP $CPPFLAGS'
12564ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12565ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12566ac_compiler_gnu=$ac_cv_c_compiler_gnu
12567
12568fi
12569
12570
a3828db0 12571if test "$cross_compiling" = no; then
81ecdfbb
RW
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12573$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12574if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12575 $as_echo_n "(cached) " >&6
a3828db0 12576else
81ecdfbb
RW
12577 if test "$cross_compiling" = yes; then :
12578 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12579else
81ecdfbb 12580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12581/* end confdefs.h. */
81ecdfbb 12582$ac_includes_default
bec39cab
AC
12583int
12584main ()
12585{
a3828db0
MK
12586/* If this system has a BSD-style setpgrp which takes arguments,
12587 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12588 exit successfully. */
81ecdfbb 12589 return setpgrp (1,1) != -1;
bec39cab
AC
12590 ;
12591 return 0;
12592}
12593_ACEOF
81ecdfbb 12594if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12595 ac_cv_func_setpgrp_void=no
c906108c 12596else
81ecdfbb 12597 ac_cv_func_setpgrp_void=yes
c906108c 12598fi
81ecdfbb
RW
12599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12600 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12601fi
81ecdfbb 12602
a3828db0 12603fi
81ecdfbb
RW
12604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12605$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12606if test $ac_cv_func_setpgrp_void = yes; then
12607
81ecdfbb 12608$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12609
12610fi
a3828db0
MK
12611
12612else
81ecdfbb
RW
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12614$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12615if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12616 $as_echo_n "(cached) " >&6
97bf5e38 12617else
81ecdfbb 12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12619/* end confdefs.h. */
a3828db0
MK
12620
12621#include <unistd.h>
12622
bec39cab
AC
12623int
12624main ()
12625{
a3828db0
MK
12626
12627 if (setpgrp(1,1) == -1)
12628 exit (0);
12629 else
12630 exit (1);
12631
bec39cab
AC
12632 ;
12633 return 0;
12634}
12635_ACEOF
81ecdfbb 12636if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12637 ac_cv_func_setpgrp_void=no
c906108c 12638else
81ecdfbb 12639 ac_cv_func_setpgrp_void=yes
c906108c 12640fi
81ecdfbb 12641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12642fi
81ecdfbb
RW
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12644$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12645if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12646 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12647
a3828db0 12648fi
c906108c
SS
12649fi
12650
db1ff28b
JK
12651# Assume we'll default to using the included libiberty regex.
12652gdb_use_included_regex=yes
12653
12654# However, if the system regex is GNU regex, then default to *not*
12655# using the included regex.
12656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12657$as_echo_n "checking for GNU regex... " >&6; }
12658if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12659 $as_echo_n "(cached) " >&6
12660else
12661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12662/* end confdefs.h. */
12663#include <gnu-versions.h>
12664int
12665main ()
12666{
12667#define REGEX_INTERFACE_VERSION 1
12668#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12669# error "Version mismatch"
12670#endif
12671 ;
12672 return 0;
12673}
12674_ACEOF
12675if ac_fn_c_try_compile "$LINENO"; then :
12676 gdb_cv_have_gnu_regex=yes
12677else
12678 gdb_cv_have_gnu_regex=no
12679fi
12680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12681fi
12682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12683$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12684if test $gdb_cv_have_gnu_regex = yes; then
12685 gdb_use_included_regex=no
12686fi
12687
12688
12689# Check whether --with-included-regex was given.
12690if test "${with_included_regex+set}" = set; then :
12691 withval=$with_included_regex; gdb_with_regex=$withval
12692else
12693 gdb_with_regex=$gdb_use_included_regex
12694fi
12695
12696if test "$gdb_with_regex" = yes; then
12697
12698$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12699
12700fi
12701
81ecdfbb
RW
12702# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12703ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12704#include <sys/proc.h>
12705
12706"
12707if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12708
5c45e068 12709cat >>confdefs.h <<_ACEOF
a3828db0 12710#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12711_ACEOF
c906108c 12712
5c45e068 12713
97bf5e38 12714fi
c906108c 12715
5c45e068 12716
a3828db0 12717# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12719$as_echo_n "checking for struct lwp... " >&6; }
12720if test "${gdb_cv_struct_lwp+set}" = set; then :
12721 $as_echo_n "(cached) " >&6
bec39cab 12722else
81ecdfbb 12723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12724/* end confdefs.h. */
a3828db0
MK
12725#include <sys/param.h>
12726#include <sys/lwp.h>
bec39cab
AC
12727int
12728main ()
12729{
a3828db0 12730struct lwp l;
bec39cab
AC
12731 ;
12732 return 0;
12733}
12734_ACEOF
81ecdfbb 12735if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12736 gdb_cv_struct_lwp=yes
c906108c 12737else
81ecdfbb 12738 gdb_cv_struct_lwp=no
c906108c 12739fi
81ecdfbb 12740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12741fi
81ecdfbb
RW
12742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12743$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12744if test $gdb_cv_struct_lwp = yes; then
c906108c 12745
81ecdfbb 12746$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12747
97bf5e38 12748fi
c906108c 12749
a3828db0 12750# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12752$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12753if test "${gdb_cv_struct_reg+set}" = set; then :
12754 $as_echo_n "(cached) " >&6
bec39cab 12755else
81ecdfbb 12756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12757/* end confdefs.h. */
a3828db0
MK
12758#include <sys/types.h>
12759#include <machine/reg.h>
bec39cab
AC
12760int
12761main ()
12762{
a3828db0 12763struct reg r;
bec39cab
AC
12764 ;
12765 return 0;
12766}
12767_ACEOF
81ecdfbb 12768if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12769 gdb_cv_struct_reg=yes
27ca5dad 12770else
81ecdfbb 12771 gdb_cv_struct_reg=no
27ca5dad 12772fi
81ecdfbb 12773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12774fi
81ecdfbb
RW
12775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12776$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12777if test $gdb_cv_struct_reg = yes; then
bec39cab 12778
81ecdfbb 12779$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12780
12781fi
97bf5e38 12782
a3828db0
MK
12783# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12784# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
12785ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
12786#include <machine/reg.h>
81ecdfbb
RW
12787"
12788if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12789
12790cat >>confdefs.h <<_ACEOF
a3828db0 12791#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12792_ACEOF
3862412b 12793
5c45e068 12794
97bf5e38 12795fi
a6e69c1f
JB
12796ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
12797#include <machine/reg.h>
81ecdfbb
RW
12798"
12799if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12800
12801cat >>confdefs.h <<_ACEOF
a3828db0 12802#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12803_ACEOF
3862412b 12804
5c45e068 12805
97bf5e38 12806fi
3862412b 12807
5c45e068 12808
6fea9e18
L
12809# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12810# Older amd64 Linux's don't have the fs_base and gs_base members of
12811# `struct user_regs_struct'.
12812ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12813"
12814if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12815
12816cat >>confdefs.h <<_ACEOF
12817#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12818_ACEOF
12819
12820
12821fi
12822ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12823"
12824if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12825
12826cat >>confdefs.h <<_ACEOF
12827#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12828_ACEOF
12829
12830
12831fi
12832
12833
a3828db0 12834# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12836$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12837if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12838 $as_echo_n "(cached) " >&6
451928c5 12839else
81ecdfbb 12840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12841/* end confdefs.h. */
a3828db0 12842#include <sys/ptrace.h>
bec39cab
AC
12843int
12844main ()
12845{
a3828db0 12846PTRACE_GETREGS;
bec39cab
AC
12847 ;
12848 return 0;
12849}
12850_ACEOF
81ecdfbb 12851if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12852 gdb_cv_have_ptrace_getregs=yes
451928c5 12853else
81ecdfbb 12854 gdb_cv_have_ptrace_getregs=no
451928c5 12855fi
81ecdfbb 12856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12857fi
12858
81ecdfbb
RW
12859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12860$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12861if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12862
81ecdfbb 12863$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12864
97bf5e38 12865fi
451928c5 12866
a3828db0 12867# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12869$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12870if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12871 $as_echo_n "(cached) " >&6
451928c5 12872else
81ecdfbb 12873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12874/* end confdefs.h. */
a3828db0 12875#include <sys/ptrace.h>
bec39cab
AC
12876int
12877main ()
12878{
a3828db0 12879PTRACE_GETFPXREGS;
bec39cab
AC
12880 ;
12881 return 0;
12882}
12883_ACEOF
81ecdfbb 12884if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12885 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12886else
81ecdfbb 12887 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12888fi
81ecdfbb 12889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12890fi
12891
81ecdfbb
RW
12892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12893$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12894if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12895
81ecdfbb 12896$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12897
97bf5e38 12898fi
451928c5 12899
a3828db0 12900# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12902$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12903if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12904 $as_echo_n "(cached) " >&6
3862412b 12905else
81ecdfbb 12906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12907/* end confdefs.h. */
a3828db0
MK
12908#include <sys/types.h>
12909#include <sys/ptrace.h>
bec39cab
AC
12910int
12911main ()
12912{
a3828db0 12913PT_GETDBREGS;
bec39cab
AC
12914 ;
12915 return 0;
12916}
12917_ACEOF
81ecdfbb 12918if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12919 gdb_cv_have_pt_getdbregs=yes
3862412b 12920else
81ecdfbb 12921 gdb_cv_have_pt_getdbregs=no
3862412b 12922fi
81ecdfbb 12923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12924fi
12925
81ecdfbb
RW
12926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12927$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12928if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12929
81ecdfbb 12930$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12931
97bf5e38 12932fi
3862412b 12933
a3828db0 12934# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12936$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12937if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12938 $as_echo_n "(cached) " >&6
3862412b 12939else
81ecdfbb 12940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12941/* end confdefs.h. */
a3828db0
MK
12942#include <sys/types.h>
12943#include <sys/ptrace.h>
bec39cab
AC
12944int
12945main ()
12946{
a3828db0 12947PT_GETXMMREGS;
bec39cab
AC
12948 ;
12949 return 0;
12950}
12951_ACEOF
81ecdfbb 12952if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12953 gdb_cv_have_pt_getxmmregs=yes
3862412b 12954else
81ecdfbb 12955 gdb_cv_have_pt_getxmmregs=no
3862412b 12956fi
81ecdfbb 12957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12958fi
12959
81ecdfbb
RW
12960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12961$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12962if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12963
81ecdfbb 12964$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12965
97bf5e38 12966fi
3862412b 12967
05b4bd79 12968# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12969
12970if test "${target}" = "${host}"; then
12971 case "${host}" in
7b00db47 12972 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12973
81ecdfbb 12974$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12975
12976 ;;
c162e8c9 12977 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12978
81ecdfbb 12979$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12980
12981 ;;
12982 mips-sgi-irix5*)
12983 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12984
81ecdfbb 12985$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12986
12987 ;;
12988 esac
12989fi
12990
12991if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12993$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12994 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12995 $as_echo_n "(cached) " >&6
596c9d4b 12996else
81ecdfbb 12997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12998/* end confdefs.h. */
596c9d4b
KB
12999
13000#define _SYSCALL32
d30c5336
JK
13001/* Needed for new procfs interface on sparc-solaris. */
13002#define _STRUCTURED_PROC 1
596c9d4b 13003#include <sys/procfs.h>
bec39cab
AC
13004int
13005main ()
13006{
97bf5e38 13007gregset_t avar
bec39cab
AC
13008 ;
13009 return 0;
13010}
13011_ACEOF
81ecdfbb 13012if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13013 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13014else
81ecdfbb 13015 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13016
596c9d4b 13017fi
81ecdfbb 13018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13019fi
13020
97bf5e38 13021 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13022
81ecdfbb 13023$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13024
13025 fi
81ecdfbb
RW
13026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13027$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13028
81ecdfbb
RW
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13030$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13031 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13032 $as_echo_n "(cached) " >&6
d84dd0c5 13033else
81ecdfbb 13034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13035/* end confdefs.h. */
97bf5e38
MK
13036
13037#define _SYSCALL32
d30c5336
JK
13038/* Needed for new procfs interface on sparc-solaris. */
13039#define _STRUCTURED_PROC 1
d84dd0c5 13040#include <sys/procfs.h>
bec39cab
AC
13041int
13042main ()
13043{
97bf5e38 13044fpregset_t avar
bec39cab
AC
13045 ;
13046 return 0;
13047}
13048_ACEOF
81ecdfbb 13049if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13050 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13051else
81ecdfbb 13052 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13053
d84dd0c5 13054fi
81ecdfbb 13055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13056fi
13057
97bf5e38 13058 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13059
81ecdfbb 13060$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13061
97bf5e38 13062 fi
81ecdfbb
RW
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13064$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13065
81ecdfbb
RW
13066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13067$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13068 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13069 $as_echo_n "(cached) " >&6
c906108c 13070else
81ecdfbb 13071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13072/* end confdefs.h. */
c906108c 13073
97bf5e38 13074#define _SYSCALL32
d30c5336
JK
13075/* Needed for new procfs interface on sparc-solaris. */
13076#define _STRUCTURED_PROC 1
97bf5e38 13077#include <sys/procfs.h>
bec39cab
AC
13078int
13079main ()
13080{
97bf5e38 13081prgregset_t avar
bec39cab
AC
13082 ;
13083 return 0;
13084}
13085_ACEOF
81ecdfbb 13086if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13087 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13088else
81ecdfbb 13089 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13090
c906108c 13091fi
81ecdfbb 13092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13093fi
13094
97bf5e38 13095 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13096
81ecdfbb 13097$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13098
97bf5e38 13099 fi
81ecdfbb
RW
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13101$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13102
81ecdfbb
RW
13103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13104$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13105 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13106 $as_echo_n "(cached) " >&6
d45fe813 13107else
81ecdfbb 13108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13109/* end confdefs.h. */
97bf5e38
MK
13110
13111#define _SYSCALL32
d30c5336
JK
13112/* Needed for new procfs interface on sparc-solaris. */
13113#define _STRUCTURED_PROC 1
97bf5e38 13114#include <sys/procfs.h>
bec39cab
AC
13115int
13116main ()
13117{
97bf5e38 13118prfpregset_t avar
bec39cab
AC
13119 ;
13120 return 0;
13121}
13122_ACEOF
81ecdfbb 13123if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13124 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13125else
81ecdfbb 13126 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13127
d45fe813 13128fi
81ecdfbb 13129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13130fi
13131
97bf5e38 13132 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13133
81ecdfbb 13134$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13135
97bf5e38 13136 fi
81ecdfbb
RW
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13138$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13139
81ecdfbb
RW
13140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13141$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13142 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13143 $as_echo_n "(cached) " >&6
d45fe813 13144else
81ecdfbb 13145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13146/* end confdefs.h. */
97bf5e38
MK
13147
13148#define _SYSCALL32
d30c5336
JK
13149/* Needed for new procfs interface on sparc-solaris. */
13150#define _STRUCTURED_PROC 1
97bf5e38 13151#include <sys/procfs.h>
bec39cab
AC
13152int
13153main ()
13154{
97bf5e38 13155prgregset32_t avar
bec39cab
AC
13156 ;
13157 return 0;
13158}
13159_ACEOF
81ecdfbb 13160if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13161 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13162else
81ecdfbb 13163 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13164
d45fe813 13165fi
81ecdfbb 13166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13167fi
13168
97bf5e38 13169 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13170
81ecdfbb 13171$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13172
97bf5e38 13173 fi
81ecdfbb
RW
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13175$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13176
81ecdfbb
RW
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13178$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13179 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13180 $as_echo_n "(cached) " >&6
d45fe813 13181else
81ecdfbb 13182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13183/* end confdefs.h. */
97bf5e38 13184
d45fe813 13185#define _SYSCALL32
d30c5336
JK
13186/* Needed for new procfs interface on sparc-solaris. */
13187#define _STRUCTURED_PROC 1
97bf5e38 13188#include <sys/procfs.h>
bec39cab
AC
13189int
13190main ()
13191{
97bf5e38 13192lwpid_t avar
bec39cab
AC
13193 ;
13194 return 0;
13195}
13196_ACEOF
81ecdfbb 13197if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13198 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13199else
81ecdfbb 13200 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13201
d45fe813 13202fi
81ecdfbb 13203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13204fi
13205
97bf5e38 13206 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13207
81ecdfbb 13208$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13209
97bf5e38 13210 fi
81ecdfbb
RW
13211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13212$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13213
81ecdfbb
RW
13214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13215$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13216 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13217 $as_echo_n "(cached) " >&6
c906108c 13218else
81ecdfbb 13219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13220/* end confdefs.h. */
c906108c 13221
97bf5e38 13222#define _SYSCALL32
d30c5336
JK
13223/* Needed for new procfs interface on sparc-solaris. */
13224#define _STRUCTURED_PROC 1
97bf5e38 13225#include <sys/procfs.h>
bec39cab
AC
13226int
13227main ()
13228{
97bf5e38 13229psaddr_t avar
bec39cab
AC
13230 ;
13231 return 0;
13232}
13233_ACEOF
81ecdfbb 13234if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13235 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13236else
81ecdfbb 13237 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13238
c906108c 13239fi
81ecdfbb 13240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13241fi
13242
97bf5e38 13243 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13244
81ecdfbb 13245$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13246
97bf5e38 13247 fi
81ecdfbb
RW
13248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13249$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13250
81ecdfbb
RW
13251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13252$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13253 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13254 $as_echo_n "(cached) " >&6
c906108c 13255else
81ecdfbb 13256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13257/* end confdefs.h. */
c906108c 13258
97bf5e38 13259#define _SYSCALL32
d30c5336
JK
13260/* Needed for new procfs interface on sparc-solaris. */
13261#define _STRUCTURED_PROC 1
97bf5e38 13262#include <sys/procfs.h>
bec39cab
AC
13263int
13264main ()
13265{
97bf5e38 13266prsysent_t avar
bec39cab
AC
13267 ;
13268 return 0;
13269}
13270_ACEOF
81ecdfbb 13271if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13272 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13273else
81ecdfbb 13274 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13275
c906108c 13276fi
81ecdfbb 13277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13278fi
13279
97bf5e38 13280 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13281
81ecdfbb 13282$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13283
97bf5e38 13284 fi
81ecdfbb
RW
13285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13286$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13287
81ecdfbb
RW
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13289$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13290 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13291 $as_echo_n "(cached) " >&6
c906108c 13292else
81ecdfbb 13293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13294/* end confdefs.h. */
c906108c 13295
97bf5e38 13296#define _SYSCALL32
d30c5336
JK
13297/* Needed for new procfs interface on sparc-solaris. */
13298#define _STRUCTURED_PROC 1
97bf5e38 13299#include <sys/procfs.h>
bec39cab
AC
13300int
13301main ()
13302{
97bf5e38 13303pr_sigset_t avar
bec39cab
AC
13304 ;
13305 return 0;
13306}
13307_ACEOF
81ecdfbb 13308if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13309 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13310else
81ecdfbb 13311 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13312
c906108c 13313fi
81ecdfbb 13314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13315fi
13316
97bf5e38 13317 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13318
81ecdfbb 13319$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13320
97bf5e38 13321 fi
81ecdfbb
RW
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13323$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13324
81ecdfbb
RW
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13326$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13327 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13328 $as_echo_n "(cached) " >&6
c906108c 13329else
81ecdfbb 13330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13331/* end confdefs.h. */
c906108c 13332
97bf5e38 13333#define _SYSCALL32
d30c5336
JK
13334/* Needed for new procfs interface on sparc-solaris. */
13335#define _STRUCTURED_PROC 1
97bf5e38 13336#include <sys/procfs.h>
bec39cab
AC
13337int
13338main ()
13339{
97bf5e38 13340pr_sigaction64_t avar
bec39cab
AC
13341 ;
13342 return 0;
13343}
13344_ACEOF
81ecdfbb 13345if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13346 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13347else
81ecdfbb 13348 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13349
c906108c 13350fi
81ecdfbb 13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13352fi
13353
97bf5e38 13354 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13355
81ecdfbb 13356$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13357
97bf5e38 13358 fi
81ecdfbb
RW
13359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13360$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13361
81ecdfbb
RW
13362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13363$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13364 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13365 $as_echo_n "(cached) " >&6
97bf5e38 13366else
81ecdfbb 13367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13368/* end confdefs.h. */
97bf5e38
MK
13369
13370#define _SYSCALL32
d30c5336
JK
13371/* Needed for new procfs interface on sparc-solaris. */
13372#define _STRUCTURED_PROC 1
97bf5e38 13373#include <sys/procfs.h>
bec39cab
AC
13374int
13375main ()
13376{
97bf5e38 13377pr_siginfo64_t avar
bec39cab
AC
13378 ;
13379 return 0;
13380}
13381_ACEOF
81ecdfbb 13382if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13383 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13384else
81ecdfbb 13385 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13386
97bf5e38 13387fi
81ecdfbb 13388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13389fi
c906108c 13390
97bf5e38 13391 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13392
81ecdfbb 13393$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13394
97bf5e38 13395 fi
81ecdfbb
RW
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13397$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13398
13399
97bf5e38
MK
13400
13401
13402
97bf5e38 13403 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13405$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13406 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13407 $as_echo_n "(cached) " >&6
c906108c 13408else
81ecdfbb 13409 if test "$cross_compiling" = yes; then :
97bf5e38 13410 gdb_cv_prfpregset_t_broken=yes
c906108c 13411else
81ecdfbb 13412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13413/* end confdefs.h. */
97bf5e38
MK
13414#include <sys/procfs.h>
13415 int main ()
13416 {
13417 if (sizeof (prfpregset_t) == sizeof (void *))
13418 return 1;
13419 return 0;
13420 }
bec39cab 13421_ACEOF
81ecdfbb 13422if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13423 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13424else
13425 gdb_cv_prfpregset_t_broken=yes
c906108c 13426fi
81ecdfbb
RW
13427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13428 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13429fi
81ecdfbb 13430
c906108c
SS
13431fi
13432
81ecdfbb
RW
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13434$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13435 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13436
81ecdfbb 13437$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13438
97bf5e38
MK
13439 fi
13440 fi
c906108c 13441fi
c906108c 13442
bc8bcb4b 13443# Check if the compiler supports the `long long' type.
c906108c 13444
81ecdfbb
RW
13445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13446$as_echo_n "checking for long long support in compiler... " >&6; }
13447if test "${gdb_cv_c_long_long+set}" = set; then :
13448 $as_echo_n "(cached) " >&6
97bf5e38 13449else
81ecdfbb 13450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13451/* end confdefs.h. */
bc8bcb4b 13452extern long long foo;
bec39cab
AC
13453int
13454main ()
13455{
bc8bcb4b 13456switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13457 ;
13458 return 0;
13459}
13460_ACEOF
81ecdfbb 13461if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13462 gdb_cv_c_long_long=yes
13463else
81ecdfbb 13464 gdb_cv_c_long_long=no
97bf5e38 13465fi
81ecdfbb 13466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13467fi
81ecdfbb
RW
13468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13469$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13470if test $gdb_cv_c_long_long != yes; then
13471 # libdecnumber requires long long.
13472 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13473fi
13474
bc8bcb4b 13475# Check if the compiler and runtime support printing long longs.
97bf5e38 13476
81ecdfbb
RW
13477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13478$as_echo_n "checking for long long support in printf... " >&6; }
13479if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13480 $as_echo_n "(cached) " >&6
97bf5e38 13481else
81ecdfbb 13482 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13483 gdb_cv_printf_has_long_long=no
13484else
81ecdfbb 13485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13486/* end confdefs.h. */
bc8bcb4b
MK
13487$ac_includes_default
13488int
13489main ()
13490{
13491char buf[32];
97bf5e38
MK
13492 long long l = 0;
13493 l = (l << 16) + 0x0123;
13494 l = (l << 16) + 0x4567;
13495 l = (l << 16) + 0x89ab;
13496 l = (l << 16) + 0xcdef;
13497 sprintf (buf, "0x%016llx", l);
13498 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13499 ;
13500 return 0;
c906108c 13501}
bec39cab 13502_ACEOF
81ecdfbb 13503if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13504 gdb_cv_printf_has_long_long=yes
13505else
81ecdfbb 13506 gdb_cv_printf_has_long_long=no
97bf5e38 13507fi
81ecdfbb
RW
13508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13509 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13510fi
81ecdfbb 13511
97bf5e38 13512fi
81ecdfbb
RW
13513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13514$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13515if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13516
81ecdfbb 13517$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13518
13519fi
97bf5e38 13520
1a619819
LM
13521# Check if the compiler and runtime support printing decfloats.
13522
81ecdfbb
RW
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13524$as_echo_n "checking for decfloat support in printf... " >&6; }
13525if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13526 $as_echo_n "(cached) " >&6
1a619819 13527else
81ecdfbb 13528 if test "$cross_compiling" = yes; then :
1a619819
LM
13529 gdb_cv_printf_has_decfloat=no
13530else
81ecdfbb 13531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13532/* end confdefs.h. */
13533$ac_includes_default
13534int
13535main ()
13536{
13537char buf[64];
13538 _Decimal32 d32 = 1.2345df;
13539 _Decimal64 d64 = 1.2345dd;
13540 _Decimal128 d128 = 1.2345dl;
13541 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13542 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13543 ;
13544 return 0;
13545}
13546_ACEOF
81ecdfbb 13547if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13548 gdb_cv_printf_has_decfloat=yes
13549else
81ecdfbb 13550 gdb_cv_printf_has_decfloat=no
1a619819 13551fi
81ecdfbb
RW
13552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13553 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13554fi
81ecdfbb 13555
1a619819 13556fi
81ecdfbb
RW
13557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13558$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13559if test $gdb_cv_printf_has_decfloat = yes; then
13560
81ecdfbb 13561$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13562
13563fi
13564
bc8bcb4b
MK
13565# Check if the compiler supports the `long double' type. We can't use
13566# AC_C_LONG_DOUBLE because that one does additional checks on the
13567# constants defined in <float.h> that fail on some systems,
13568# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13569
81ecdfbb
RW
13570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13571$as_echo_n "checking for long double support in compiler... " >&6; }
13572if test "${gdb_cv_c_long_double+set}" = set; then :
13573 $as_echo_n "(cached) " >&6
97bf5e38 13574else
81ecdfbb 13575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13576/* end confdefs.h. */
97bf5e38 13577long double foo;
bec39cab 13578_ACEOF
81ecdfbb 13579if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13580 gdb_cv_c_long_double=yes
97bf5e38 13581else
81ecdfbb 13582 gdb_cv_c_long_double=no
97bf5e38 13583fi
81ecdfbb 13584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13585fi
81ecdfbb
RW
13586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13587$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13588if test $gdb_cv_c_long_double = yes; then
c906108c 13589
81ecdfbb 13590$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13591
13592fi
13593
bc8bcb4b 13594# Check if the compiler and runtime support printing long doubles.
97bf5e38 13595
81ecdfbb
RW
13596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13597$as_echo_n "checking for long double support in printf... " >&6; }
13598if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13599 $as_echo_n "(cached) " >&6
97bf5e38 13600else
81ecdfbb 13601 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13602 gdb_cv_printf_has_long_double=no
13603else
81ecdfbb 13604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13605/* end confdefs.h. */
bc8bcb4b
MK
13606$ac_includes_default
13607int
13608main ()
13609{
13610char buf[16];
97bf5e38
MK
13611 long double f = 3.141592653;
13612 sprintf (buf, "%Lg", f);
13613 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13614 ;
13615 return 0;
97bf5e38 13616}
bec39cab 13617_ACEOF
81ecdfbb 13618if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13619 gdb_cv_printf_has_long_double=yes
c906108c 13620else
81ecdfbb 13621 gdb_cv_printf_has_long_double=no
c906108c 13622fi
81ecdfbb
RW
13623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13624 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13625fi
81ecdfbb 13626
c906108c 13627fi
81ecdfbb
RW
13628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13629$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13630if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13631
81ecdfbb 13632$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13633
13634fi
97bf5e38 13635
bc8bcb4b 13636# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13637
81ecdfbb
RW
13638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13639$as_echo_n "checking for long double support in scanf... " >&6; }
13640if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13641 $as_echo_n "(cached) " >&6
97bf5e38 13642else
81ecdfbb 13643 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13644 gdb_cv_scanf_has_long_double=no
13645else
81ecdfbb 13646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13647/* end confdefs.h. */
bc8bcb4b
MK
13648#include <stdio.h>
13649int
13650main ()
13651{
13652char *buf = "3.141592653";
97bf5e38
MK
13653 long double f = 0;
13654 sscanf (buf, "%Lg", &f);
13655 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13656 ;
13657 return 0;
97bf5e38 13658}
bec39cab 13659_ACEOF
81ecdfbb 13660if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13661 gdb_cv_scanf_has_long_double=yes
13662else
81ecdfbb 13663 gdb_cv_scanf_has_long_double=no
97bf5e38 13664fi
81ecdfbb
RW
13665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13666 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13667fi
81ecdfbb 13668
c906108c 13669fi
81ecdfbb
RW
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13671$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13672if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13673
81ecdfbb 13674$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13675
13676fi
c906108c 13677
438013df
AO
13678case ${host_os} in
13679aix*)
81ecdfbb
RW
13680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13681$as_echo_n "checking for -bbigtoc option... " >&6; }
13682if test "${gdb_cv_bigtoc+set}" = set; then :
13683 $as_echo_n "(cached) " >&6
438013df 13684else
bec39cab 13685
438013df
AO
13686 SAVE_LDFLAGS=$LDFLAGS
13687
13688 case $GCC in
13689 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13690 *) gdb_cv_bigtoc=-bbigtoc ;;
13691 esac
13692
13693 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13695/* end confdefs.h. */
438013df 13696
bec39cab
AC
13697int
13698main ()
13699{
438013df 13700int i;
bec39cab
AC
13701 ;
13702 return 0;
13703}
13704_ACEOF
81ecdfbb 13705if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13706
81ecdfbb
RW
13707else
13708 gdb_cv_bigtoc=
438013df 13709fi
81ecdfbb
RW
13710rm -f core conftest.err conftest.$ac_objext \
13711 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13712 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13713
bec39cab 13714fi
81ecdfbb
RW
13715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13716$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13717 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13718 ;;
13719esac
13720
38f6b338 13721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13722$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13723dynamic_list=false
13724if test "${gdb_native}" = yes; then
13725 # The dynamically loaded libthread_db needs access to symbols in the gdb
13726 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13727 # may not be supported there.
13728 old_LDFLAGS="$LDFLAGS"
13729 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13730 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13731 LDFLAGS="$LDFLAGS $RDYNAMIC"
13732 if test "${have_libpython}" = no; then
13733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13734/* end confdefs.h. */
13735
13736int
13737main ()
13738{
13739
13740 ;
13741 return 0;
13742}
13743_ACEOF
13744if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13745 dynamic_list=true
13746fi
13747rm -f core conftest.err conftest.$ac_objext \
13748 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13749 else
13750 # Workaround http://bugs.python.org/issue4434 where static
13751 # libpythonX.Y.a would get its symbols required for
13752 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13753 # Problem does not happen for the recommended libpythonX.Y.so linkage.
13754 old_CFLAGS="$CFLAGS"
13755 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13756 old_LIBS="$LIBS"
13757 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 13758 if test "$cross_compiling" = yes; then :
3bebe2f2 13759 true
f6528abd 13760else
3bebe2f2
JK
13761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13762/* end confdefs.h. */
13763#include "${have_libpython}/Python.h"
13764int
13765main ()
13766{
13767int err;
38f6b338
JK
13768 Py_Initialize ();
13769 err = PyRun_SimpleString ("import itertools\n");
13770 Py_Finalize ();
13771 return err == 0 ? 0 : 1;
3bebe2f2
JK
13772 ;
13773 return 0;
13774}
13775_ACEOF
13776if ac_fn_c_try_run "$LINENO"; then :
13777 dynamic_list=true
13778fi
13779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13780 conftest.$ac_objext conftest.beam conftest.$ac_ext
13781fi
13782
8c1fb155 13783 LIBS="$old_LIBS"
38f6b338
JK
13784 CFLAGS="$old_CFLAGS"
13785 fi
13786 LDFLAGS="$old_LDFLAGS"
13787fi
13788if $dynamic_list; then
13789 found="-Wl,--dynamic-list"
13790 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13791else
38f6b338
JK
13792 found="-rdynamic"
13793 RDYNAMIC="-rdynamic"
f6528abd 13794fi
f6528abd 13795
38f6b338 13796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13797$as_echo "$found" >&6; }
0407b3f1 13798
f6528abd 13799
0407b3f1 13800if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13801 case ${host_os} in
c906108c 13802 solaris*)
d92419e5
JB
13803 # See if thread_db library is around for Solaris thread debugging.
13804 # Note that we must explicitly test for version 1 of the library
13805 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13806 # the same API.
81ecdfbb
RW
13807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13808$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13809 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13811$as_echo "yes" >&6; }
60ca704f 13812
81ecdfbb 13813$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13814
3483b318 13815 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13816 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13818$as_echo_n "checking for dlopen in -ldl... " >&6; }
13819if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13820 $as_echo_n "(cached) " >&6
c906108c 13821else
bec39cab 13822 ac_check_lib_save_LIBS=$LIBS
c906108c 13823LIBS="-ldl $LIBS"
81ecdfbb 13824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13825/* end confdefs.h. */
13826
81ecdfbb
RW
13827/* Override any GCC internal prototype to avoid an error.
13828 Use char because int might match the return type of a GCC
13829 builtin and then its argument prototype would still apply. */
bec39cab
AC
13830#ifdef __cplusplus
13831extern "C"
13832#endif
bec39cab
AC
13833char dlopen ();
13834int
13835main ()
13836{
81ecdfbb 13837return dlopen ();
bec39cab
AC
13838 ;
13839 return 0;
13840}
13841_ACEOF
81ecdfbb 13842if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13843 ac_cv_lib_dl_dlopen=yes
13844else
81ecdfbb 13845 ac_cv_lib_dl_dlopen=no
bec39cab 13846fi
81ecdfbb
RW
13847rm -f core conftest.err conftest.$ac_objext \
13848 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13849LIBS=$ac_check_lib_save_LIBS
13850fi
81ecdfbb
RW
13851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13852$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13853if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13854 cat >>confdefs.h <<_ACEOF
13855#define HAVE_LIBDL 1
13856_ACEOF
c906108c
SS
13857
13858 LIBS="-ldl $LIBS"
13859
c906108c
SS
13860fi
13861
f6528abd 13862 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13863 # Sun randomly tweaked the prototypes in <proc_service.h>
13864 # at one point.
81ecdfbb
RW
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13866$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13867 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13868 $as_echo_n "(cached) " >&6
c906108c 13869else
bec39cab 13870
81ecdfbb 13871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13872/* end confdefs.h. */
c906108c
SS
13873
13874 #include <proc_service.h>
13875 ps_err_e ps_pdwrite
13876 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13877
bec39cab
AC
13878int
13879main ()
13880{
13881
13882 ;
13883 return 0;
13884}
13885_ACEOF
81ecdfbb 13886if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13887 gdb_cv_proc_service_is_old=no
13888else
81ecdfbb 13889 gdb_cv_proc_service_is_old=yes
c906108c 13890fi
81ecdfbb 13891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13892
c906108c
SS
13893fi
13894
81ecdfbb
RW
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13896$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13897 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13898
81ecdfbb 13899$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13900
13901 fi
13902 else
81ecdfbb
RW
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13904$as_echo "no" >&6; }
c906108c
SS
13905 fi
13906 ;;
d92419e5 13907 aix*)
81ecdfbb
RW
13908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13909$as_echo_n "checking for AiX thread debugging library... " >&6; }
13910 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13911 $as_echo_n "(cached) " >&6
bec39cab 13912else
81ecdfbb 13913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13914/* end confdefs.h. */
d92419e5 13915#include <sys/pthdebug.h>
bec39cab
AC
13916int
13917main ()
13918{
d92419e5
JB
13919#ifndef PTHDB_VERSION_3
13920 #error
13921 #endif
bec39cab
AC
13922 ;
13923 return 0;
13924}
13925_ACEOF
81ecdfbb 13926if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13927 gdb_cv_have_aix_thread_debug=yes
13928else
81ecdfbb 13929 gdb_cv_have_aix_thread_debug=no
d92419e5 13930fi
81ecdfbb 13931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13932fi
13933
81ecdfbb
RW
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13935$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13936 if test $gdb_cv_have_aix_thread_debug = yes; then
13937 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13938 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13939 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13940
13941 # Older versions of AIX do not provide the declaration for
13942 # the getthrds function (it appears that it was introduced
13943 # with AIX 6.x).
13944 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13945"
13946if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13947 ac_have_decl=1
13948else
13949 ac_have_decl=0
13950fi
13951
13952cat >>confdefs.h <<_ACEOF
13953#define HAVE_DECL_GETTHRDS $ac_have_decl
13954_ACEOF
13955
d92419e5
JB
13956 fi
13957 ;;
c906108c 13958 esac
bec39cab 13959
c906108c
SS
13960fi
13961
3f47be5c 13962if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13964$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13965if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13966 $as_echo_n "(cached) " >&6
bec39cab 13967else
81ecdfbb 13968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13969/* end confdefs.h. */
3f47be5c 13970#include <thread_db.h>
bec39cab
AC
13971int
13972main ()
13973{
3f47be5c 13974int i = TD_NOTALLOC;
bec39cab
AC
13975 ;
13976 return 0;
13977}
13978_ACEOF
81ecdfbb 13979if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13980 gdb_cv_thread_db_h_has_td_notalloc=yes
13981else
81ecdfbb 13982 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13983
3f47be5c 13984fi
81ecdfbb 13985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13986
bec39cab 13987fi
81ecdfbb
RW
13988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13989$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13991$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13992if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13993 $as_echo_n "(cached) " >&6
59f80f10 13994else
81ecdfbb 13995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13996/* end confdefs.h. */
13997#include <thread_db.h>
13998int
13999main ()
14000{
14001int i = TD_VERSION;
14002 ;
14003 return 0;
14004}
14005_ACEOF
81ecdfbb 14006if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14007 gdb_cv_thread_db_h_has_td_version=yes
14008else
81ecdfbb 14009 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14010
14011fi
81ecdfbb 14012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14013
14014fi
81ecdfbb
RW
14015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14016$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14018$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14019if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14020 $as_echo_n "(cached) " >&6
59f80f10 14021else
81ecdfbb 14022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14023/* end confdefs.h. */
14024#include <thread_db.h>
14025int
14026main ()
14027{
14028int i = TD_NOTLS;
14029 ;
14030 return 0;
14031}
14032_ACEOF
81ecdfbb 14033if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14034 gdb_cv_thread_db_h_has_td_notls=yes
14035else
81ecdfbb 14036 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14037
14038fi
81ecdfbb 14039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14040
14041fi
81ecdfbb
RW
14042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14043$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14044fi
14045if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14046
81ecdfbb 14047$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14048
59f80f10
DJ
14049fi
14050if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14051
81ecdfbb 14052$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14053
14054fi
14055if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14056
81ecdfbb 14057$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14058
3f47be5c
EZ
14059fi
14060
81ecdfbb
RW
14061ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14062"
14063if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14064 ac_have_decl=1
10568435 14065else
81ecdfbb 14066 ac_have_decl=0
10568435 14067fi
10568435
JK
14068
14069cat >>confdefs.h <<_ACEOF
81ecdfbb 14070#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14071_ACEOF
14072
14073
81ecdfbb
RW
14074if test "$cross_compiling" = yes; then :
14075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14076/* end confdefs.h. */
14077#include <sys/personality.h>
14078int
14079main ()
14080{
14081
14082# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14083# define ADDR_NO_RANDOMIZE 0x0040000
14084# endif
14085 /* Test the flag could be set and stays set. */
14086 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14087 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14088 return 1
14089 ;
14090 return 0;
14091}
14092_ACEOF
81ecdfbb 14093if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14094 have_personality=true
14095else
81ecdfbb 14096 have_personality=false
10568435 14097fi
81ecdfbb
RW
14098rm -f core conftest.err conftest.$ac_objext \
14099 conftest$ac_exeext conftest.$ac_ext
10568435 14100else
81ecdfbb 14101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14102/* end confdefs.h. */
14103#include <sys/personality.h>
14104int
14105main ()
14106{
14107
14108# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14109# define ADDR_NO_RANDOMIZE 0x0040000
14110# endif
14111 /* Test the flag could be set and stays set. */
14112 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14113 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14114 return 1
14115 ;
14116 return 0;
14117}
14118_ACEOF
81ecdfbb 14119if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14120 have_personality=true
14121else
81ecdfbb 14122 have_personality=false
10568435 14123fi
81ecdfbb
RW
14124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14125 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14126fi
81ecdfbb 14127
10568435
JK
14128if $have_personality
14129then
14130
81ecdfbb 14131$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14132
14133fi
14134
e655c1a2
PA
14135case $host_os in
14136 go32* | *djgpp*)
14137 gdbinit=gdb.ini
14138 ;;
14139 *)
14140 gdbinit=.gdbinit
14141 ;;
14142esac
14143
14144cat >>confdefs.h <<_ACEOF
14145#define GDBINIT "$gdbinit"
14146_ACEOF
14147
14148
fb40c209 14149
f83d8a90
DE
14150# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14151# except that the argument to --with-sysroot is optional.
14152# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14153if test "x$with_sysroot" = xyes; then
14154 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14155fi
bec39cab 14156
81ecdfbb
RW
14157# Check whether --with-sysroot was given.
14158if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14159 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14160else
14161 TARGET_SYSTEM_ROOT=
14162fi
030292b7 14163
030292b7 14164
f83d8a90
DE
14165 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14167 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14168 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14169
f83d8a90
DE
14170cat >>confdefs.h <<_ACEOF
14171#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14172_ACEOF
bec39cab 14173
030292b7 14174
b14b1491 14175
f83d8a90
DE
14176
14177 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14178 if test "x$prefix" = xNONE; then
14179 test_prefix=/usr/local
14180 else
14181 test_prefix=$prefix
14182 fi
14183 else
14184 test_prefix=$exec_prefix
14185 fi
14186 value=0
14187 case ${ac_define_dir} in
14188 "${test_prefix}"|"${test_prefix}/"*|\
14189 '${exec_prefix}'|'${exec_prefix}/'*)
14190 value=1
14191 ;;
14192 esac
14193
14194cat >>confdefs.h <<_ACEOF
14195#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14196_ACEOF
030292b7
DJ
14197
14198
14199
16e7150e 14200
16e7150e 14201
81ecdfbb
RW
14202# Check whether --with-system-gdbinit was given.
14203if test "${with_system_gdbinit+set}" = set; then :
14204 withval=$with_system_gdbinit;
b14b1491
TT
14205 SYSTEM_GDBINIT=$withval
14206else
14207 SYSTEM_GDBINIT=
81ecdfbb
RW
14208fi
14209
16e7150e
JG
14210
14211 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14212 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14213 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14214 ac_define_dir=`eval echo $ac_define_dir`
14215
14216cat >>confdefs.h <<_ACEOF
14217#define SYSTEM_GDBINIT "$ac_define_dir"
14218_ACEOF
14219
14220
14221
0c4a4063 14222
b14b1491
TT
14223 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14224 if test "x$prefix" = xNONE; then
14225 test_prefix=/usr/local
14226 else
14227 test_prefix=$prefix
14228 fi
14229 else
14230 test_prefix=$exec_prefix
14231 fi
14232 value=0
14233 case ${ac_define_dir} in
14234 "${test_prefix}"|"${test_prefix}/"*|\
14235 '${exec_prefix}'|'${exec_prefix}/'*)
14236 value=1
14237 ;;
14238 esac
16e7150e 14239
b14b1491
TT
14240cat >>confdefs.h <<_ACEOF
14241#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14242_ACEOF
14243
b14b1491 14244
16e7150e 14245
0c4a4063 14246
b835bb52 14247
81ecdfbb
RW
14248# Check whether --enable-werror was given.
14249if test "${enable_werror+set}" = set; then :
14250 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14251 yes | y) ERROR_ON_WARNING="yes" ;;
14252 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14253 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14254 esac
81ecdfbb
RW
14255fi
14256
094a342e 14257
9a084706
PA
14258# Enable -Werror by default when using gcc. Turn it off for releases.
14259if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14260 ERROR_ON_WARNING=yes
14261fi
14262
14263WERROR_CFLAGS=""
14264if test "${ERROR_ON_WARNING}" = yes ; then
14265 WERROR_CFLAGS="-Werror"
14266fi
14267
3bc3d82a 14268# These options work in either C or C++ modes.
aac331e4 14269build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14270-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
14271-Wno-switch -Wno-char-subscripts \
14272-Wempty-body"
a3b362c4 14273
3bc3d82a
PA
14274# Now add in C and C++ specific options, depending on mode.
14275if test "$enable_build_with_cxx" = "yes"; then
14276 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14277-Wno-narrowing"
14278else
aac331e4
PA
14279 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14280-Wdeclaration-after-statement -Wmissing-parameter-type \
14281-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14282fi
14283
3526781e
DJ
14284# Enable -Wno-format by default when using gcc on mingw since many
14285# GCC versions complain about %I64.
14286case "${host}" in
14287 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14288 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14289esac
14290
81ecdfbb
RW
14291# Check whether --enable-build-warnings was given.
14292if test "${enable_build_warnings+set}" = set; then :
14293 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14294 yes) ;;
14295 no) build_warnings="-w";;
14296 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14297 build_warnings="${build_warnings} ${t}";;
14298 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14299 build_warnings="${t} ${build_warnings}";;
14300 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14301esac
d4f3574e 14302if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14303 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14304fi
81ecdfbb
RW
14305fi
14306# Check whether --enable-gdb-build-warnings was given.
14307if test "${enable_gdb_build_warnings+set}" = set; then :
14308 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14309 yes) ;;
14310 no) build_warnings="-w";;
14311 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14312 build_warnings="${build_warnings} ${t}";;
14313 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14314 build_warnings="${t} ${build_warnings}";;
14315 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14316esac
14317if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14318 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14319fi
81ecdfbb 14320fi
3bc3d82a
PA
14321
14322# The set of warnings supported by a C++ compiler is not the same as
14323# of the C compiler.
14324if test "$enable_build_with_cxx" = "yes"; then
14325 ac_ext=cpp
14326ac_cpp='$CXXCPP $CPPFLAGS'
14327ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14328ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14329ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14330
14331fi
14332
81ecdfbb 14333WARN_CFLAGS=""
c906108c
SS
14334if test "x${build_warnings}" != x -a "x$GCC" = xyes
14335then
81ecdfbb
RW
14336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14337$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14338 # Separate out the -Werror flag as some files just cannot be
14339 # compiled with it enabled.
14340 for w in ${build_warnings}; do
7544db95
PA
14341 # GCC does not complain about -Wno-unknown-warning. Invert
14342 # and test -Wunknown-warning instead.
14343 case $w in
14344 -Wno-*)
14345 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
14346 *)
14347 wtest=$w ;;
14348 esac
14349
746a987d
AC
14350 case $w in
14351 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14352 *)
14353 # Check whether GCC accepts it.
4536bbc6 14354 saved_CFLAGS="$CFLAGS"
7544db95 14355 CFLAGS="$CFLAGS $wtest"
3bc3d82a 14356 saved_CXXFLAGS="$CXXFLAGS"
7544db95 14357 CXXFLAGS="$CXXFLAGS $wtest"
54019719 14358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14359/* end confdefs.h. */
4536bbc6 14360
bec39cab
AC
14361int
14362main ()
14363{
4536bbc6 14364
bec39cab
AC
14365 ;
14366 return 0;
14367}
14368_ACEOF
3bc3d82a 14369if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14370 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14371fi
81ecdfbb 14372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14373 CFLAGS="$saved_CFLAGS"
3bc3d82a 14374 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14375 esac
14376 done
81ecdfbb
RW
14377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14378$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14379fi
14380
14381
104c1213 14382
3bc3d82a
PA
14383if test "$enable_build_with_cxx" = "yes"; then
14384 ac_ext=c
14385ac_cpp='$CPP $CPPFLAGS'
14386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14388ac_compiler_gnu=$ac_cv_c_compiler_gnu
14389
14390fi
14391
b835bb52 14392
7a292a7a 14393# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14395$as_echo_n "checking for cygwin... " >&6; }
14396if test "${gdb_cv_os_cygwin+set}" = set; then :
14397 $as_echo_n "(cached) " >&6
bec39cab 14398else
81ecdfbb 14399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14400/* end confdefs.h. */
7a292a7a
SS
14401
14402#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14403lose
14404#endif
bec39cab 14405_ACEOF
7a292a7a 14406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14407 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14408 gdb_cv_os_cygwin=yes
14409else
7a292a7a
SS
14410 gdb_cv_os_cygwin=no
14411fi
14412rm -f conftest*
14413
14414fi
81ecdfbb
RW
14415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14416$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14417
aff38e61 14418
3eb25fda 14419SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14420case ${host} in
95cbc983
AC
14421 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14422 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14423 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14424esac
14425
14426
cd0fc7c3
SS
14427# libreadline needs libuser32.a in a cygwin environment
14428WIN32LIBS=
14429if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14430 WIN32LIBS="-luser32"
14431 case "${target}" in
14432 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14433 ;;
14434 esac
cd0fc7c3 14435fi
c906108c 14436
b4505029
MM
14437# The ser-tcp.c module requires sockets.
14438case ${host} in
14439 *mingw32*)
14440
81ecdfbb 14441$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14442
14443 WIN32LIBS="$WIN32LIBS -lws2_32"
14444 ;;
14445esac
14446
7a292a7a 14447
31d99776 14448# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14449
14450 OLD_CFLAGS=$CFLAGS
14451 OLD_LDFLAGS=$LDFLAGS
14452 OLD_LIBS=$LIBS
14453 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14454 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14455 # always want our bfd.
14456 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14457 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14458 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14459 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14460 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14462$as_echo_n "checking for ELF support in BFD... " >&6; }
14463if test "${gdb_cv_var_elf+set}" = set; then :
14464 $as_echo_n "(cached) " >&6
31d99776 14465else
81ecdfbb 14466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14467/* end confdefs.h. */
14468#include <stdlib.h>
def63ff0
TT
14469 #include "bfd.h"
14470 #include "elf-bfd.h"
31d99776
DJ
14471
14472int
14473main ()
14474{
def63ff0 14475return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14476 ;
14477 return 0;
14478}
14479_ACEOF
81ecdfbb 14480if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14481 gdb_cv_var_elf=yes
14482else
81ecdfbb 14483 gdb_cv_var_elf=no
31d99776 14484fi
81ecdfbb
RW
14485rm -f core conftest.err conftest.$ac_objext \
14486 conftest$ac_exeext conftest.$ac_ext
31d99776 14487fi
81ecdfbb
RW
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14489$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14490 CFLAGS=$OLD_CFLAGS
14491 LDFLAGS=$OLD_LDFLAGS
14492 LIBS=$OLD_LIBS
31d99776 14493if test $gdb_cv_var_elf = yes; then
d4777acb 14494 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14495
81ecdfbb 14496$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14497
075ff26d
JK
14498 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14499 if test "$plugins" = "yes"; then
a48b32c0
L
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14501$as_echo_n "checking for library containing dlopen... " >&6; }
14502if test "${ac_cv_search_dlopen+set}" = set; then :
14503 $as_echo_n "(cached) " >&6
14504else
14505 ac_func_search_save_LIBS=$LIBS
14506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14507/* end confdefs.h. */
14508
14509/* Override any GCC internal prototype to avoid an error.
14510 Use char because int might match the return type of a GCC
14511 builtin and then its argument prototype would still apply. */
14512#ifdef __cplusplus
14513extern "C"
14514#endif
14515char dlopen ();
14516int
14517main ()
14518{
14519return dlopen ();
14520 ;
14521 return 0;
14522}
14523_ACEOF
14524for ac_lib in '' dl; do
14525 if test -z "$ac_lib"; then
14526 ac_res="none required"
14527 else
14528 ac_res=-l$ac_lib
14529 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14530 fi
14531 if ac_fn_c_try_link "$LINENO"; then :
14532 ac_cv_search_dlopen=$ac_res
14533fi
14534rm -f core conftest.err conftest.$ac_objext \
14535 conftest$ac_exeext
14536 if test "${ac_cv_search_dlopen+set}" = set; then :
14537 break
14538fi
14539done
14540if test "${ac_cv_search_dlopen+set}" = set; then :
14541
14542else
14543 ac_cv_search_dlopen=no
14544fi
14545rm conftest.$ac_ext
14546LIBS=$ac_func_search_save_LIBS
14547fi
14548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14549$as_echo "$ac_cv_search_dlopen" >&6; }
14550ac_res=$ac_cv_search_dlopen
14551if test "$ac_res" != no; then :
14552 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14553
14554fi
14555
075ff26d 14556 fi
31d99776 14557fi
31d99776 14558
4f05add4
TT
14559# Add macho support to GDB, but only if BFD includes it.
14560
14561 OLD_CFLAGS=$CFLAGS
14562 OLD_LDFLAGS=$LDFLAGS
14563 OLD_LIBS=$LIBS
14564 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14565 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14566 # always want our bfd.
14567 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14568 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14569 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14570 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14571 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14573$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14574if test "${gdb_cv_var_macho+set}" = set; then :
14575 $as_echo_n "(cached) " >&6
14576else
14577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14578/* end confdefs.h. */
14579#include <stdlib.h>
14580 #include "bfd.h"
14581 #include "mach-o.h"
14582
14583int
14584main ()
14585{
14586return bfd_mach_o_lookup_command (NULL, 0, NULL);
14587 ;
14588 return 0;
14589}
14590_ACEOF
14591if ac_fn_c_try_link "$LINENO"; then :
14592 gdb_cv_var_macho=yes
14593else
14594 gdb_cv_var_macho=no
14595fi
14596rm -f core conftest.err conftest.$ac_objext \
14597 conftest$ac_exeext conftest.$ac_ext
14598fi
14599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14600$as_echo "$gdb_cv_var_macho" >&6; }
14601 CFLAGS=$OLD_CFLAGS
14602 LDFLAGS=$OLD_LDFLAGS
14603 LIBS=$OLD_LIBS
14604if test $gdb_cv_var_macho = yes; then
14605 CONFIG_OBS="$CONFIG_OBS machoread.o"
14606fi
14607
121ce6e5
DJ
14608# Add any host-specific objects to GDB.
14609CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14610
608e2dbb
TT
14611# If building on ELF, look for lzma support for embedded compressed debug info.
14612if test $gdb_cv_var_elf = yes; then
14613
14614# Check whether --with-lzma was given.
14615if test "${with_lzma+set}" = set; then :
14616 withval=$with_lzma;
14617else
14618 with_lzma=auto
14619fi
14620
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14622$as_echo_n "checking whether to use lzma... " >&6; }
14623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14624$as_echo "$with_lzma" >&6; }
14625
14626 if test "${with_lzma}" != no; then
14627
14628
14629
14630
14631
14632
14633
14634
14635 use_additional=yes
14636
14637 acl_save_prefix="$prefix"
14638 prefix="$acl_final_prefix"
14639 acl_save_exec_prefix="$exec_prefix"
14640 exec_prefix="$acl_final_exec_prefix"
14641
14642 eval additional_includedir=\"$includedir\"
14643 eval additional_libdir=\"$libdir\"
14644
14645 exec_prefix="$acl_save_exec_prefix"
14646 prefix="$acl_save_prefix"
14647
14648
14649# Check whether --with-liblzma-prefix was given.
14650if test "${with_liblzma_prefix+set}" = set; then :
14651 withval=$with_liblzma_prefix;
14652 if test "X$withval" = "Xno"; then
14653 use_additional=no
14654 else
14655 if test "X$withval" = "X"; then
14656
14657 acl_save_prefix="$prefix"
14658 prefix="$acl_final_prefix"
14659 acl_save_exec_prefix="$exec_prefix"
14660 exec_prefix="$acl_final_exec_prefix"
14661
14662 eval additional_includedir=\"$includedir\"
14663 eval additional_libdir=\"$libdir\"
14664
14665 exec_prefix="$acl_save_exec_prefix"
14666 prefix="$acl_save_prefix"
14667
14668 else
14669 additional_includedir="$withval/include"
14670 additional_libdir="$withval/lib"
14671 fi
14672 fi
14673
14674fi
14675
14676 LIBLZMA=
14677 LTLIBLZMA=
14678 INCLZMA=
14679 rpathdirs=
14680 ltrpathdirs=
14681 names_already_handled=
14682 names_next_round='lzma '
14683 while test -n "$names_next_round"; do
14684 names_this_round="$names_next_round"
14685 names_next_round=
14686 for name in $names_this_round; do
14687 already_handled=
14688 for n in $names_already_handled; do
14689 if test "$n" = "$name"; then
14690 already_handled=yes
14691 break
14692 fi
14693 done
14694 if test -z "$already_handled"; then
14695 names_already_handled="$names_already_handled $name"
14696 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14697 eval value=\"\$HAVE_LIB$uppername\"
14698 if test -n "$value"; then
14699 if test "$value" = yes; then
14700 eval value=\"\$LIB$uppername\"
14701 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14702 eval value=\"\$LTLIB$uppername\"
14703 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14704 else
14705 :
14706 fi
14707 else
14708 found_dir=
14709 found_la=
14710 found_so=
14711 found_a=
14712 if test $use_additional = yes; then
14713 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14714 found_dir="$additional_libdir"
14715 found_so="$additional_libdir/lib$name.$shlibext"
14716 if test -f "$additional_libdir/lib$name.la"; then
14717 found_la="$additional_libdir/lib$name.la"
14718 fi
14719 else
14720 if test -f "$additional_libdir/lib$name.$libext"; then
14721 found_dir="$additional_libdir"
14722 found_a="$additional_libdir/lib$name.$libext"
14723 if test -f "$additional_libdir/lib$name.la"; then
14724 found_la="$additional_libdir/lib$name.la"
14725 fi
14726 fi
14727 fi
14728 fi
14729 if test "X$found_dir" = "X"; then
14730 for x in $LDFLAGS $LTLIBLZMA; do
14731
14732 acl_save_prefix="$prefix"
14733 prefix="$acl_final_prefix"
14734 acl_save_exec_prefix="$exec_prefix"
14735 exec_prefix="$acl_final_exec_prefix"
14736 eval x=\"$x\"
14737 exec_prefix="$acl_save_exec_prefix"
14738 prefix="$acl_save_prefix"
14739
14740 case "$x" in
14741 -L*)
14742 dir=`echo "X$x" | sed -e 's/^X-L//'`
14743 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14744 found_dir="$dir"
14745 found_so="$dir/lib$name.$shlibext"
14746 if test -f "$dir/lib$name.la"; then
14747 found_la="$dir/lib$name.la"
14748 fi
14749 else
14750 if test -f "$dir/lib$name.$libext"; then
14751 found_dir="$dir"
14752 found_a="$dir/lib$name.$libext"
14753 if test -f "$dir/lib$name.la"; then
14754 found_la="$dir/lib$name.la"
14755 fi
14756 fi
14757 fi
14758 ;;
14759 esac
14760 if test "X$found_dir" != "X"; then
14761 break
14762 fi
14763 done
14764 fi
14765 if test "X$found_dir" != "X"; then
14766 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14767 if test "X$found_so" != "X"; then
14768 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14769 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14770 else
14771 haveit=
14772 for x in $ltrpathdirs; do
14773 if test "X$x" = "X$found_dir"; then
14774 haveit=yes
14775 break
14776 fi
14777 done
14778 if test -z "$haveit"; then
14779 ltrpathdirs="$ltrpathdirs $found_dir"
14780 fi
14781 if test "$hardcode_direct" = yes; then
14782 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14783 else
14784 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14785 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14786 haveit=
14787 for x in $rpathdirs; do
14788 if test "X$x" = "X$found_dir"; then
14789 haveit=yes
14790 break
14791 fi
14792 done
14793 if test -z "$haveit"; then
14794 rpathdirs="$rpathdirs $found_dir"
14795 fi
14796 else
14797 haveit=
14798 for x in $LDFLAGS $LIBLZMA; do
14799
14800 acl_save_prefix="$prefix"
14801 prefix="$acl_final_prefix"
14802 acl_save_exec_prefix="$exec_prefix"
14803 exec_prefix="$acl_final_exec_prefix"
14804 eval x=\"$x\"
14805 exec_prefix="$acl_save_exec_prefix"
14806 prefix="$acl_save_prefix"
14807
14808 if test "X$x" = "X-L$found_dir"; then
14809 haveit=yes
14810 break
14811 fi
14812 done
14813 if test -z "$haveit"; then
14814 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14815 fi
14816 if test "$hardcode_minus_L" != no; then
14817 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14818 else
14819 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14820 fi
14821 fi
14822 fi
14823 fi
14824 else
14825 if test "X$found_a" != "X"; then
14826 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14827 else
14828 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14829 fi
14830 fi
14831 additional_includedir=
14832 case "$found_dir" in
14833 */lib | */lib/)
14834 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14835 additional_includedir="$basedir/include"
14836 ;;
14837 esac
14838 if test "X$additional_includedir" != "X"; then
14839 if test "X$additional_includedir" != "X/usr/include"; then
14840 haveit=
14841 if test "X$additional_includedir" = "X/usr/local/include"; then
14842 if test -n "$GCC"; then
14843 case $host_os in
14844 linux*) haveit=yes;;
14845 esac
14846 fi
14847 fi
14848 if test -z "$haveit"; then
14849 for x in $CPPFLAGS $INCLZMA; do
14850
14851 acl_save_prefix="$prefix"
14852 prefix="$acl_final_prefix"
14853 acl_save_exec_prefix="$exec_prefix"
14854 exec_prefix="$acl_final_exec_prefix"
14855 eval x=\"$x\"
14856 exec_prefix="$acl_save_exec_prefix"
14857 prefix="$acl_save_prefix"
14858
14859 if test "X$x" = "X-I$additional_includedir"; then
14860 haveit=yes
14861 break
14862 fi
14863 done
14864 if test -z "$haveit"; then
14865 if test -d "$additional_includedir"; then
14866 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14867 fi
14868 fi
14869 fi
14870 fi
14871 fi
14872 if test -n "$found_la"; then
14873 save_libdir="$libdir"
14874 case "$found_la" in
14875 */* | *\\*) . "$found_la" ;;
14876 *) . "./$found_la" ;;
14877 esac
14878 libdir="$save_libdir"
14879 for dep in $dependency_libs; do
14880 case "$dep" in
14881 -L*)
14882 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14883 if test "X$additional_libdir" != "X/usr/lib"; then
14884 haveit=
14885 if test "X$additional_libdir" = "X/usr/local/lib"; then
14886 if test -n "$GCC"; then
14887 case $host_os in
14888 linux*) haveit=yes;;
14889 esac
14890 fi
14891 fi
14892 if test -z "$haveit"; then
14893 haveit=
14894 for x in $LDFLAGS $LIBLZMA; do
14895
14896 acl_save_prefix="$prefix"
14897 prefix="$acl_final_prefix"
14898 acl_save_exec_prefix="$exec_prefix"
14899 exec_prefix="$acl_final_exec_prefix"
14900 eval x=\"$x\"
14901 exec_prefix="$acl_save_exec_prefix"
14902 prefix="$acl_save_prefix"
14903
14904 if test "X$x" = "X-L$additional_libdir"; then
14905 haveit=yes
14906 break
14907 fi
14908 done
14909 if test -z "$haveit"; then
14910 if test -d "$additional_libdir"; then
14911 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14912 fi
14913 fi
14914 haveit=
14915 for x in $LDFLAGS $LTLIBLZMA; do
14916
14917 acl_save_prefix="$prefix"
14918 prefix="$acl_final_prefix"
14919 acl_save_exec_prefix="$exec_prefix"
14920 exec_prefix="$acl_final_exec_prefix"
14921 eval x=\"$x\"
14922 exec_prefix="$acl_save_exec_prefix"
14923 prefix="$acl_save_prefix"
14924
14925 if test "X$x" = "X-L$additional_libdir"; then
14926 haveit=yes
14927 break
14928 fi
14929 done
14930 if test -z "$haveit"; then
14931 if test -d "$additional_libdir"; then
14932 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14933 fi
14934 fi
14935 fi
14936 fi
14937 ;;
14938 -R*)
14939 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14940 if test "$enable_rpath" != no; then
14941 haveit=
14942 for x in $rpathdirs; do
14943 if test "X$x" = "X$dir"; then
14944 haveit=yes
14945 break
14946 fi
14947 done
14948 if test -z "$haveit"; then
14949 rpathdirs="$rpathdirs $dir"
14950 fi
14951 haveit=
14952 for x in $ltrpathdirs; do
14953 if test "X$x" = "X$dir"; then
14954 haveit=yes
14955 break
14956 fi
14957 done
14958 if test -z "$haveit"; then
14959 ltrpathdirs="$ltrpathdirs $dir"
14960 fi
14961 fi
14962 ;;
14963 -l*)
14964 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14965 ;;
14966 *.la)
14967 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14968 ;;
14969 *)
14970 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14971 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14972 ;;
14973 esac
14974 done
14975 fi
14976 else
14977 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14978 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14979 fi
14980 fi
14981 fi
14982 done
14983 done
14984 if test "X$rpathdirs" != "X"; then
14985 if test -n "$hardcode_libdir_separator"; then
14986 alldirs=
14987 for found_dir in $rpathdirs; do
14988 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14989 done
14990 acl_save_libdir="$libdir"
14991 libdir="$alldirs"
14992 eval flag=\"$hardcode_libdir_flag_spec\"
14993 libdir="$acl_save_libdir"
14994 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14995 else
14996 for found_dir in $rpathdirs; do
14997 acl_save_libdir="$libdir"
14998 libdir="$found_dir"
14999 eval flag=\"$hardcode_libdir_flag_spec\"
15000 libdir="$acl_save_libdir"
15001 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15002 done
15003 fi
15004 fi
15005 if test "X$ltrpathdirs" != "X"; then
15006 for found_dir in $ltrpathdirs; do
15007 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15008 done
15009 fi
15010
15011
15012 ac_save_CPPFLAGS="$CPPFLAGS"
15013
15014 for element in $INCLZMA; do
15015 haveit=
15016 for x in $CPPFLAGS; do
15017
15018 acl_save_prefix="$prefix"
15019 prefix="$acl_final_prefix"
15020 acl_save_exec_prefix="$exec_prefix"
15021 exec_prefix="$acl_final_exec_prefix"
15022 eval x=\"$x\"
15023 exec_prefix="$acl_save_exec_prefix"
15024 prefix="$acl_save_prefix"
15025
15026 if test "X$x" = "X$element"; then
15027 haveit=yes
15028 break
15029 fi
15030 done
15031 if test -z "$haveit"; then
15032 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15033 fi
15034 done
15035
15036
15037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15038$as_echo_n "checking for liblzma... " >&6; }
15039if test "${ac_cv_liblzma+set}" = set; then :
15040 $as_echo_n "(cached) " >&6
15041else
15042
15043 ac_save_LIBS="$LIBS"
15044 LIBS="$LIBS $LIBLZMA"
15045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15046/* end confdefs.h. */
15047#include "lzma.h"
15048int
15049main ()
15050{
15051lzma_index_iter iter;
15052 lzma_index_iter_init (&iter, 0);
15053 lzma_mf_is_supported (LZMA_MF_HC3);
15054 ;
15055 return 0;
15056}
15057_ACEOF
15058if ac_fn_c_try_link "$LINENO"; then :
15059 ac_cv_liblzma=yes
15060else
15061 ac_cv_liblzma=no
15062fi
15063rm -f core conftest.err conftest.$ac_objext \
15064 conftest$ac_exeext conftest.$ac_ext
15065 LIBS="$ac_save_LIBS"
15066
15067fi
15068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15069$as_echo "$ac_cv_liblzma" >&6; }
15070 if test "$ac_cv_liblzma" = yes; then
15071 HAVE_LIBLZMA=yes
15072
15073$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15074
15075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15076$as_echo_n "checking how to link with liblzma... " >&6; }
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15078$as_echo "$LIBLZMA" >&6; }
15079 else
15080 HAVE_LIBLZMA=no
15081 CPPFLAGS="$ac_save_CPPFLAGS"
15082 LIBLZMA=
15083 LTLIBLZMA=
15084 fi
15085
15086
15087
15088
15089
15090
15091 if test "$HAVE_LIBLZMA" != yes; then
15092 if test "$with_lzma" = yes; then
15093 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15094 fi
15095 fi
15096 fi
15097fi
15098
3fc11d3e
JM
15099LIBGUI="../libgui/src/libgui.a"
15100GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15101
15102
7a292a7a 15103
3fc11d3e
JM
15104WIN32LDAPP=
15105
15106
15107
d91670b9 15108case "${host}" in
686a5eed 15109*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15110 configdir="win"
15111 ;;
15112*)
15113 configdir="unix"
15114 ;;
15115esac
3fc11d3e
JM
15116
15117GDBTKLIBS=
15118if test "${enable_gdbtk}" = "yes"; then
15119
d1c3b63a
KS
15120 # Gdbtk must have an absolute path to srcdir in order to run
15121 # properly when not installed.
15122 here=`pwd`
15123 cd ${srcdir}
15124 GDBTK_SRC_DIR=`pwd`
15125 cd $here
15126
bec39cab 15127
5062cc19
KS
15128 #
15129 # Ok, lets find the tcl configuration
15130 # First, look for one uninstalled.
15131 # the alternative search directory is invoked by --with-tcl
15132 #
3fc11d3e 15133
5062cc19
KS
15134 if test x"${no_tcl}" = x ; then
15135 # we reset no_tcl in case something fails here
15136 no_tcl=true
bec39cab 15137
81ecdfbb
RW
15138# Check whether --with-tcl was given.
15139if test "${with_tcl+set}" = set; then :
15140 withval=$with_tcl; with_tclconfig=${withval}
15141fi
15142
15143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15144$as_echo_n "checking for Tcl configuration... " >&6; }
15145 if test "${ac_cv_c_tclconfig+set}" = set; then :
15146 $as_echo_n "(cached) " >&6
3fc11d3e 15147else
bec39cab 15148
3fc11d3e 15149
5062cc19
KS
15150 # First check to see if --with-tcl was specified.
15151 case "${host}" in
15152 *-*-cygwin*) platDir="win" ;;
15153 *) platDir="unix" ;;
15154 esac
15155 if test x"${with_tclconfig}" != x ; then
15156 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15157 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15158 else
81ecdfbb 15159 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15160 fi
15161 fi
15162
15163 # then check for a private Tcl installation
15164 if test x"${ac_cv_c_tclconfig}" = x ; then
15165 for i in \
15166 ../tcl \
15167 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15168 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15169 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15170 ../../tcl \
15171 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15172 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15173 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15174 ../../../tcl \
15175 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15176 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15177 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15178 if test -f "$i/$platDir/tclConfig.sh" ; then
15179 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15180 break
15181 fi
15182 done
15183 fi
15184
15185 # on Darwin, check in Framework installation locations
15186 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15187 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15188 `ls -d /Library/Frameworks 2>/dev/null` \
15189 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15190 `ls -d /System/Library/Frameworks 2>/dev/null` \
15191 ; do
15192 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15193 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15194 break
15195 fi
15196 done
15197 fi
15198
15199 # check in a few common install locations
15200 if test x"${ac_cv_c_tclconfig}" = x ; then
15201 for i in `ls -d ${libdir} 2>/dev/null` \
15202 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15203 `ls -d ${prefix}/lib 2>/dev/null` \
15204 `ls -d /usr/local/lib 2>/dev/null` \
15205 `ls -d /usr/contrib/lib 2>/dev/null` \
15206 `ls -d /usr/lib 2>/dev/null` \
15207 ; do
15208 if test -f "$i/tclConfig.sh" ; then
15209 ac_cv_c_tclconfig=`(cd $i; pwd)`
15210 break
15211 fi
15212 done
15213 fi
3fc11d3e 15214
5062cc19
KS
15215 # check in a few other private locations
15216 if test x"${ac_cv_c_tclconfig}" = x ; then
15217 for i in \
15218 ${srcdir}/../tcl \
15219 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15220 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15221 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15222 if test -f "$i/$platDir/tclConfig.sh" ; then
15223 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15224 break
15225 fi
15226 done
15227 fi
bec39cab 15228
3fc11d3e
JM
15229fi
15230
5062cc19
KS
15231
15232 if test x"${ac_cv_c_tclconfig}" = x ; then
15233 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15234 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15235$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15236 else
15237 no_tcl=
15238 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15240$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15241 fi
15242 fi
3fc11d3e 15243
bec39cab 15244
85541719
DE
15245 # If $no_tk is nonempty, then we can't do Tk, and there is no
15246 # point to doing Tcl.
bec39cab 15247
5062cc19
KS
15248 #
15249 # Ok, lets find the tk configuration
15250 # First, look for one uninstalled.
15251 # the alternative search directory is invoked by --with-tk
15252 #
3fc11d3e 15253
5062cc19
KS
15254 if test x"${no_tk}" = x ; then
15255 # we reset no_tk in case something fails here
15256 no_tk=true
bec39cab 15257
81ecdfbb
RW
15258# Check whether --with-tk was given.
15259if test "${with_tk+set}" = set; then :
15260 withval=$with_tk; with_tkconfig=${withval}
15261fi
15262
15263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15264$as_echo_n "checking for Tk configuration... " >&6; }
15265 if test "${ac_cv_c_tkconfig+set}" = set; then :
15266 $as_echo_n "(cached) " >&6
bec39cab 15267else
3fc11d3e
JM
15268
15269
5062cc19
KS
15270 # First check to see if --with-tkconfig was specified.
15271 if test x"${with_tkconfig}" != x ; then
15272 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15273 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15274 else
81ecdfbb 15275 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15276 fi
15277 fi
3fc11d3e 15278
5062cc19
KS
15279 # then check for a private Tk library
15280 case "${host}" in
15281 *-*-cygwin*) platDir="win" ;;
15282 *) platDir="unix" ;;
15283 esac
15284 if test x"${ac_cv_c_tkconfig}" = x ; then
15285 for i in \
15286 ../tk \
15287 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15288 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15289 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15290 ../../tk \
15291 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15292 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15293 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15294 ../../../tk \
15295 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15296 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15297 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15298 if test -f "$i/$platDir/tkConfig.sh" ; then
15299 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15300 break
15301 fi
15302 done
15303 fi
15304
15305 # on Darwin, check in Framework installation locations
15306 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15307 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15308 `ls -d /Library/Frameworks 2>/dev/null` \
15309 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15310 `ls -d /System/Library/Frameworks 2>/dev/null` \
15311 ; do
15312 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15313 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15314 break
15315 fi
15316 done
15317 fi
15318
15319 # check in a few common install locations
15320 if test x"${ac_cv_c_tkconfig}" = x ; then
15321 for i in `ls -d ${libdir} 2>/dev/null` \
15322 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15323 `ls -d ${prefix}/lib 2>/dev/null` \
15324 `ls -d /usr/local/lib 2>/dev/null` \
15325 `ls -d /usr/contrib/lib 2>/dev/null` \
15326 `ls -d /usr/lib 2>/dev/null` \
15327 ; do
15328 if test -f "$i/tkConfig.sh" ; then
15329 ac_cv_c_tkconfig=`(cd $i; pwd)`
15330 break
15331 fi
15332 done
15333 fi
15334 # check in a few other private locations
15335 if test x"${ac_cv_c_tkconfig}" = x ; then
15336 for i in \
15337 ${srcdir}/../tk \
15338 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15339 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15340 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15341 if test -f "$i/$platDir/tkConfig.sh" ; then
15342 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15343 break
15344 fi
15345 done
15346 fi
3fc11d3e 15347
3fc11d3e
JM
15348fi
15349
15350
5062cc19
KS
15351 if test x"${ac_cv_c_tkconfig}" = x ; then
15352 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15354$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15355 else
15356 no_tk=
15357 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15359$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15360 fi
3fc11d3e 15361 fi
dd2504ab 15362
dd2504ab 15363
85541719
DE
15364 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15365
81ecdfbb
RW
15366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15367$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15368
15369 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15371$as_echo "loading" >&6; }
85541719
DE
15372 . ${TCL_BIN_DIR}/tclConfig.sh
15373 else
81ecdfbb
RW
15374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15375$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15376 fi
15377
15378 # eval is required to do the TCL_DBGX substitution
15379 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15380 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15381
15382 # If the TCL_BIN_DIR is the build directory (not the install directory),
15383 # then set the common variable name to the value of the build variables.
15384 # For example, the variable TCL_LIB_SPEC will be set to the value
15385 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15386 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15387 # installed and uninstalled version of Tcl.
15388 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15389 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15390 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15391 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15392 elif test "`uname -s`" = "Darwin"; then
15393 # If Tcl was built as a framework, attempt to use the libraries
15394 # from the framework at the given location so that linking works
a68ffae9 15395 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15396 case ${TCL_DEFS} in
15397 *TCL_FRAMEWORK*)
15398 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15399 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15400 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15401 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15402 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15403 break
15404 fi
15405 done
15406 fi
15407 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15408 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15409 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15410 fi
15411 ;;
15412 esac
15413 fi
15414
15415 # eval is required to do the TCL_DBGX substitution
15416 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15417 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15418 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15419 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435 # Check for in-tree tcl
15436 here=`pwd`
15437 cd ${srcdir}/..
15438 topdir=`pwd`
15439 cd ${here}
15440
15441 intree="no"
15442 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15443 intree="yes"
15444 fi
15445
15446 # Find Tcl private headers
15447 if test x"${intree}" = xno; then
15448
81ecdfbb
RW
15449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15450$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15451 private_dir=""
15452 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15453 if test -f ${dir}/tclInt.h ; then
15454 private_dir=${dir}
15455 fi
15456
15457 if test x"${private_dir}" = x; then
81ecdfbb 15458 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15459 else
15460 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15462$as_echo "${private_dir}" >&6; }
85541719
DE
15463 fi
15464
15465 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15466 TCL_LIBRARY="${TCL_LIB_SPEC}"
15467 TCL_DEPS=""
15468 else
15469 # If building tcl in the same src tree, private headers
15470 # are not needed, but we need to be sure to use the right
15471 # headers library
15472 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15473 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15474 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15475 fi
15476
15477
15478
15479
15480
81ecdfbb
RW
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15482$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15483
5062cc19 15484 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15486$as_echo "loading" >&6; }
5062cc19 15487 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15488 else
81ecdfbb
RW
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15490$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15491 fi
bec39cab 15492
5062cc19
KS
15493 # eval is required to do the TK_DBGX substitution
15494 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15495 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15496
15497 # If the TK_BIN_DIR is the build directory (not the install directory),
15498 # then set the common variable name to the value of the build variables.
15499 # For example, the variable TK_LIB_SPEC will be set to the value
15500 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15501 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15502 # installed and uninstalled version of Tcl.
85541719 15503 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15504 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15505 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15506 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15507 elif test "`uname -s`" = "Darwin"; then
15508 # If Tk was built as a framework, attempt to use the libraries
15509 # from the framework at the given location so that linking works
a68ffae9 15510 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15511 case ${TK_DEFS} in
15512 *TK_FRAMEWORK*)
85541719 15513 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15514 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15515 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15516 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15517 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15518 break
15519 fi
15520 done
15521 fi
85541719 15522 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15523 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15524 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15525 fi
15526 ;;
15527 esac
3fc11d3e
JM
15528 fi
15529
5062cc19
KS
15530 # eval is required to do the TK_DBGX substitution
15531 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15532 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15533 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15534 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15535
3fc11d3e
JM
15536
15537
bec39cab
AC
15538
15539
15540
15541
15542
15543
15544
3fc11d3e 15545
3fc11d3e 15546
bec39cab 15547
bec39cab 15548
85541719
DE
15549 # Check for in-tree Tk
15550 intree="no"
15551 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15552 intree="yes"
15553 fi
3fc11d3e 15554
85541719
DE
15555 # Find Tk private headers
15556 if test x"${intree}" = xno; then
3fc11d3e 15557
81ecdfbb
RW
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15559$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15560 private_dir=""
15561 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15562 if test -f ${dir}/tkInt.h; then
15563 private_dir=${dir}
3fc11d3e 15564 fi
bec39cab 15565
5062cc19 15566 if test x"${private_dir}" = x; then
81ecdfbb 15567 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15568 else
5062cc19 15569 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15571$as_echo "${private_dir}" >&6; }
3fc11d3e 15572 fi
3fc11d3e 15573
85541719
DE
15574 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15575 TK_LIBRARY=${TK_LIB_SPEC}
15576 TK_DEPS=""
15577 else
15578 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15579 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15580 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15581 fi
3fc11d3e
JM
15582
15583
3fc11d3e
JM
15584
15585
3fc11d3e 15586
85541719 15587 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15588
85541719
DE
15589 # Include some libraries that Tcl and Tk want.
15590 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15591 # Yes, the ordering seems wrong here. But it isn't.
15592 # TK_LIBS is the list of libraries that need to be linked
15593 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15594 # were in LIBS then any link tests after this point would
15595 # try to include things like `$(LIBGUI)', which wouldn't work.
15596 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15597
85541719
DE
15598 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15599 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15600 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15601 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15602 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15603 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15604 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15605
85541719
DE
15606 if test x$gdb_cv_os_cygwin = xyes; then
15607 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15608 WIN32LDAPP="-Wl,--subsystem,console"
15609 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15610 fi
ffc6a242 15611
81ecdfbb 15612 subdirs="$subdirs gdbtk"
3ace7edb 15613
85541719 15614 fi
3fc11d3e
JM
15615fi
15616
15617
15618
15619
15620
15621
15622
15623
81ecdfbb
RW
15624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15625$as_echo_n "checking for X... " >&6; }
bec39cab 15626
c906108c 15627
81ecdfbb
RW
15628# Check whether --with-x was given.
15629if test "${with_x+set}" = set; then :
15630 withval=$with_x;
15631fi
c906108c
SS
15632
15633# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15634if test "x$with_x" = xno; then
15635 # The user explicitly disabled X.
15636 have_x=disabled
15637else
81ecdfbb
RW
15638 case $x_includes,$x_libraries in #(
15639 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15640 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15641 $as_echo_n "(cached) " >&6
c906108c
SS
15642else
15643 # One or both of the vars are not set, and there is no cached value.
bec39cab 15644ac_x_includes=no ac_x_libraries=no
81ecdfbb 15645rm -f -r conftest.dir
bec39cab
AC
15646if mkdir conftest.dir; then
15647 cd conftest.dir
bec39cab 15648 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15649incroot:
15650 @echo incroot='${INCROOT}'
15651usrlibdir:
15652 @echo usrlibdir='${USRLIBDIR}'
15653libdir:
15654 @echo libdir='${LIBDIR}'
15655_ACEOF
15656 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15657 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15658 for ac_var in incroot usrlibdir libdir; do
15659 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15660 done
c906108c 15661 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15662 for ac_extension in a so sl dylib la dll; do
15663 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15664 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15665 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15666 fi
15667 done
15668 # Screen out bogus values from the imake configuration. They are
15669 # bogus both because they are the default anyway, and because
15670 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15671 case $ac_im_incroot in
81ecdfbb 15672 /usr/include) ac_x_includes= ;;
bec39cab 15673 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15674 esac
bec39cab 15675 case $ac_im_usrlibdir in
81ecdfbb 15676 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15677 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15678 esac
15679 fi
15680 cd ..
81ecdfbb 15681 rm -f -r conftest.dir
c906108c
SS
15682fi
15683
bec39cab
AC
15684# Standard set of common directories for X headers.
15685# Check X11 before X11Rn because it is often a symlink to the current release.
15686ac_x_header_dirs='
15687/usr/X11/include
81ecdfbb 15688/usr/X11R7/include
bec39cab
AC
15689/usr/X11R6/include
15690/usr/X11R5/include
15691/usr/X11R4/include
15692
15693/usr/include/X11
81ecdfbb 15694/usr/include/X11R7
bec39cab
AC
15695/usr/include/X11R6
15696/usr/include/X11R5
15697/usr/include/X11R4
15698
15699/usr/local/X11/include
81ecdfbb 15700/usr/local/X11R7/include
bec39cab
AC
15701/usr/local/X11R6/include
15702/usr/local/X11R5/include
15703/usr/local/X11R4/include
15704
15705/usr/local/include/X11
81ecdfbb 15706/usr/local/include/X11R7
bec39cab
AC
15707/usr/local/include/X11R6
15708/usr/local/include/X11R5
15709/usr/local/include/X11R4
15710
15711/usr/X386/include
15712/usr/x386/include
15713/usr/XFree86/include/X11
15714
15715/usr/include
15716/usr/local/include
15717/usr/unsupported/include
15718/usr/athena/include
15719/usr/local/x11r5/include
15720/usr/lpp/Xamples/include
15721
15722/usr/openwin/include
15723/usr/openwin/share/include'
15724
15725if test "$ac_x_includes" = no; then
81ecdfbb 15726 # Guess where to find include files, by looking for Xlib.h.
c906108c 15727 # First, try using that file with no special directory specified.
81ecdfbb 15728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15729/* end confdefs.h. */
81ecdfbb 15730#include <X11/Xlib.h>
bec39cab 15731_ACEOF
81ecdfbb 15732if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15733 # We can compile using X headers with no special include directory.
15734ac_x_includes=
15735else
bec39cab 15736 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15737 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15738 ac_x_includes=$ac_dir
15739 break
15740 fi
15741done
c906108c 15742fi
bec39cab
AC
15743rm -f conftest.err conftest.$ac_ext
15744fi # $ac_x_includes = no
c906108c 15745
bec39cab 15746if test "$ac_x_libraries" = no; then
c906108c 15747 # Check for the libraries.
c906108c
SS
15748 # See if we find them without any special options.
15749 # Don't add to $LIBS permanently.
bec39cab 15750 ac_save_LIBS=$LIBS
81ecdfbb
RW
15751 LIBS="-lX11 $LIBS"
15752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15753/* end confdefs.h. */
81ecdfbb 15754#include <X11/Xlib.h>
bec39cab
AC
15755int
15756main ()
15757{
81ecdfbb 15758XrmInitialize ()
bec39cab
AC
15759 ;
15760 return 0;
15761}
15762_ACEOF
81ecdfbb 15763if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15764 LIBS=$ac_save_LIBS
c906108c
SS
15765# We can link X programs with no special library path.
15766ac_x_libraries=
15767else
81ecdfbb
RW
15768 LIBS=$ac_save_LIBS
15769for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15770do
bec39cab 15771 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15772 for ac_extension in a so sl dylib la dll; do
15773 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15774 ac_x_libraries=$ac_dir
15775 break 2
15776 fi
15777 done
15778done
15779fi
81ecdfbb
RW
15780rm -f core conftest.err conftest.$ac_objext \
15781 conftest$ac_exeext conftest.$ac_ext
bec39cab 15782fi # $ac_x_libraries = no
c906108c 15783
81ecdfbb
RW
15784case $ac_x_includes,$ac_x_libraries in #(
15785 no,* | *,no | *\'*)
15786 # Didn't find X, or a directory has "'" in its name.
15787 ac_cv_have_x="have_x=no";; #(
15788 *)
15789 # Record where we found X for the cache.
15790 ac_cv_have_x="have_x=yes\
15791 ac_x_includes='$ac_x_includes'\
15792 ac_x_libraries='$ac_x_libraries'"
15793esac
c906108c 15794fi
81ecdfbb
RW
15795;; #(
15796 *) have_x=yes;;
15797 esac
c906108c
SS
15798 eval "$ac_cv_have_x"
15799fi # $with_x != no
15800
15801if test "$have_x" != yes; then
81ecdfbb
RW
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15803$as_echo "$have_x" >&6; }
c906108c
SS
15804 no_x=yes
15805else
15806 # If each of the values was on the command line, it overrides each guess.
15807 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15808 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15809 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15810 ac_cv_have_x="have_x=yes\
15811 ac_x_includes='$x_includes'\
15812 ac_x_libraries='$x_libraries'"
15813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15814$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15815fi
15816
15817
bec39cab 15818# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15819# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15820# This code just checks for a few cases where we'd like to ignore those
15821# definitions, even when they're present in the '.mt' file. These cases
15822# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15823# not part of the source tree.
7a292a7a 15824#
81ecdfbb
RW
15825# Check whether --enable-sim was given.
15826if test "${enable_sim+set}" = set; then :
15827 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15828 echo "enableval = ${enableval}";
15829 case "${enableval}" in
15830 yes) ignore_sim=false ;;
15831 no) ignore_sim=true ;;
15832 *) ignore_sim=false ;;
15833 esac
15834else
15835 ignore_sim=false
81ecdfbb
RW
15836fi
15837
7a292a7a
SS
15838
15839if test ! -d "${srcdir}/../sim"; then
15840 ignore_sim=true
15841fi
15842
9b624dbe
UW
15843SIM=
15844SIM_OBS=
15845if test "${ignore_sim}" = "false"; then
15846 if test x"${gdb_sim}" != x ; then
15847 SIM="${gdb_sim}"
15848 SIM_OBS="remote-sim.o"
60ca704f 15849
81ecdfbb 15850$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15851
976102cd
PA
15852
15853 # Some tdep code should only be compiled in when the ppc sim is
15854 # built. PR sim/13418.
15855 case $target in
15856 powerpc*-*-*)
15857
15858$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
15859
15860 ;;
15861 esac
9b624dbe 15862 fi
7a292a7a
SS
15863fi
15864
15865
15866
c906108c
SS
15867
15868
15869
15870
15871
15872
dfcd3bfb 15873
e56ac5c3
AC
15874
15875
b3a90332
AC
15876
15877
c35f4ffc 15878# List of host floatformats.
bec39cab
AC
15879
15880cat >>confdefs.h <<_ACEOF
c35f4ffc 15881#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15882_ACEOF
c35f4ffc 15883
bec39cab
AC
15884
15885cat >>confdefs.h <<_ACEOF
c35f4ffc 15886#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15887_ACEOF
15888
c35f4ffc 15889
bec39cab 15890cat >>confdefs.h <<_ACEOF
c35f4ffc 15891#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15892_ACEOF
c35f4ffc
AC
15893
15894
c906108c
SS
15895# target_subdir is used by the testsuite to find the target libraries.
15896target_subdir=
15897if test "${host}" != "${target}"; then
15898 target_subdir="${target_alias}/"
15899fi
15900
15901
15902frags=
771b4502 15903if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15904 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15905 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15906 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15907 fi
15908 frags="$frags $host_makefile_frag"
15909else
15910 host_makefile_frag=/dev/null
c906108c 15911fi
c906108c 15912
c906108c
SS
15913
15914
15915
771b4502 15916if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15917# We pick this up from the host configuration file (.mh) because we
15918# do not have a native configuration Makefile fragment.
c906108c
SS
15919nativefile=`sed -n '
15920s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15921' ${host_makefile_frag}`
c906108c
SS
15922fi
15923
15924
b00a8037 15925if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15926
15927cat >>confdefs.h <<_ACEOF
b00a8037 15928#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15929_ACEOF
b00a8037
DJ
15930
15931fi
15932
8dcde887 15933# Enable multi-ice-gdb-server.
81ecdfbb
RW
15934# Check whether --enable-multi-ice was given.
15935if test "${enable_multi_ice+set}" = set; then :
15936 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15937 yes | no)
15938 ;;
81ecdfbb 15939 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15940 esac
81ecdfbb 15941fi
b4e70030 15942
81ecdfbb
RW
15943if test "x$enable_multi_ice" = xyes; then
15944 subdirs="$subdirs multi-ice"
3ace7edb 15945
a85f51e7
DJ
15946fi
15947
496c0e1b
JB
15948# Check whether --enable-gdbserver was given.
15949if test "${enable_gdbserver+set}" = set; then :
15950 enableval=$enable_gdbserver; case "${enableval}" in
15951 yes| no|auto) ;;
15952 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15953esac
15954else
15955 enable_gdbserver=auto
15956fi
15957
15958
15959# We only build gdbserver automatically in a native configuration, and
15960# only if the user did not explicitly disable its build.
15961if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15963$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15964 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15966$as_echo "yes" >&6; }
15967 subdirs="$subdirs gdbserver"
3ace7edb 15968
496c0e1b 15969 gdbserver_build_enabled=yes
8dcde887 15970 else
81ecdfbb
RW
15971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15972$as_echo "no" >&6; }
8dcde887
MK
15973 fi
15974fi
15975
496c0e1b
JB
15976# If the user explicitly request the gdbserver to be built, verify that
15977# we were in fact able to enable it.
15978if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15979 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15980fi
15981
393fd4c3
YQ
15982# Check for babeltrace and babeltrace-ctf
15983
15984# Check whether --with-babeltrace was given.
15985if test "${with_babeltrace+set}" = set; then :
15986 withval=$with_babeltrace;
15987else
15988 with_babeltrace=auto
15989fi
15990
15991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15992$as_echo_n "checking whether to use babeltrace... " >&6; }
15993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15994$as_echo "$with_babeltrace" >&6; }
15995
15996if test "x$with_babeltrace" = "xno"; then
15997 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15998$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15999else
16000 # Append -Werror to CFLAGS so that configure can catch the warning
16001 # "assignment from incompatible pointer type", which is related to
16002 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16003 # in GDB, while babeltrace 1.0.3 is broken.
16004 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16005 # safe to save and restore CFLAGS here.
16006 saved_CFLAGS=$CFLAGS
16007 CFLAGS="$CFLAGS -Werror"
16008
16009
16010
16011
16012
16013
16014
16015
16016 use_additional=yes
16017
16018 acl_save_prefix="$prefix"
16019 prefix="$acl_final_prefix"
16020 acl_save_exec_prefix="$exec_prefix"
16021 exec_prefix="$acl_final_exec_prefix"
16022
16023 eval additional_includedir=\"$includedir\"
16024 eval additional_libdir=\"$libdir\"
16025
16026 exec_prefix="$acl_save_exec_prefix"
16027 prefix="$acl_save_prefix"
16028
16029
16030# Check whether --with-libbabeltrace-prefix was given.
16031if test "${with_libbabeltrace_prefix+set}" = set; then :
16032 withval=$with_libbabeltrace_prefix;
16033 if test "X$withval" = "Xno"; then
16034 use_additional=no
16035 else
16036 if test "X$withval" = "X"; then
16037
16038 acl_save_prefix="$prefix"
16039 prefix="$acl_final_prefix"
16040 acl_save_exec_prefix="$exec_prefix"
16041 exec_prefix="$acl_final_exec_prefix"
16042
16043 eval additional_includedir=\"$includedir\"
16044 eval additional_libdir=\"$libdir\"
16045
16046 exec_prefix="$acl_save_exec_prefix"
16047 prefix="$acl_save_prefix"
16048
16049 else
16050 additional_includedir="$withval/include"
16051 additional_libdir="$withval/lib"
16052 fi
16053 fi
16054
16055fi
16056
16057 LIBBABELTRACE=
16058 LTLIBBABELTRACE=
16059 INCBABELTRACE=
16060 rpathdirs=
16061 ltrpathdirs=
16062 names_already_handled=
16063 names_next_round='babeltrace babeltrace-ctf'
16064 while test -n "$names_next_round"; do
16065 names_this_round="$names_next_round"
16066 names_next_round=
16067 for name in $names_this_round; do
16068 already_handled=
16069 for n in $names_already_handled; do
16070 if test "$n" = "$name"; then
16071 already_handled=yes
16072 break
16073 fi
16074 done
16075 if test -z "$already_handled"; then
16076 names_already_handled="$names_already_handled $name"
16077 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16078 eval value=\"\$HAVE_LIB$uppername\"
16079 if test -n "$value"; then
16080 if test "$value" = yes; then
16081 eval value=\"\$LIB$uppername\"
16082 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16083 eval value=\"\$LTLIB$uppername\"
16084 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16085 else
16086 :
16087 fi
16088 else
16089 found_dir=
16090 found_la=
16091 found_so=
16092 found_a=
16093 if test $use_additional = yes; then
16094 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16095 found_dir="$additional_libdir"
16096 found_so="$additional_libdir/lib$name.$shlibext"
16097 if test -f "$additional_libdir/lib$name.la"; then
16098 found_la="$additional_libdir/lib$name.la"
16099 fi
16100 else
16101 if test -f "$additional_libdir/lib$name.$libext"; then
16102 found_dir="$additional_libdir"
16103 found_a="$additional_libdir/lib$name.$libext"
16104 if test -f "$additional_libdir/lib$name.la"; then
16105 found_la="$additional_libdir/lib$name.la"
16106 fi
16107 fi
16108 fi
16109 fi
16110 if test "X$found_dir" = "X"; then
16111 for x in $LDFLAGS $LTLIBBABELTRACE; do
16112
16113 acl_save_prefix="$prefix"
16114 prefix="$acl_final_prefix"
16115 acl_save_exec_prefix="$exec_prefix"
16116 exec_prefix="$acl_final_exec_prefix"
16117 eval x=\"$x\"
16118 exec_prefix="$acl_save_exec_prefix"
16119 prefix="$acl_save_prefix"
16120
16121 case "$x" in
16122 -L*)
16123 dir=`echo "X$x" | sed -e 's/^X-L//'`
16124 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16125 found_dir="$dir"
16126 found_so="$dir/lib$name.$shlibext"
16127 if test -f "$dir/lib$name.la"; then
16128 found_la="$dir/lib$name.la"
16129 fi
16130 else
16131 if test -f "$dir/lib$name.$libext"; then
16132 found_dir="$dir"
16133 found_a="$dir/lib$name.$libext"
16134 if test -f "$dir/lib$name.la"; then
16135 found_la="$dir/lib$name.la"
16136 fi
16137 fi
16138 fi
16139 ;;
16140 esac
16141 if test "X$found_dir" != "X"; then
16142 break
16143 fi
16144 done
16145 fi
16146 if test "X$found_dir" != "X"; then
16147 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16148 if test "X$found_so" != "X"; then
16149 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16150 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16151 else
16152 haveit=
16153 for x in $ltrpathdirs; do
16154 if test "X$x" = "X$found_dir"; then
16155 haveit=yes
16156 break
16157 fi
16158 done
16159 if test -z "$haveit"; then
16160 ltrpathdirs="$ltrpathdirs $found_dir"
16161 fi
16162 if test "$hardcode_direct" = yes; then
16163 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16164 else
16165 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16166 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16167 haveit=
16168 for x in $rpathdirs; do
16169 if test "X$x" = "X$found_dir"; then
16170 haveit=yes
16171 break
16172 fi
16173 done
16174 if test -z "$haveit"; then
16175 rpathdirs="$rpathdirs $found_dir"
16176 fi
16177 else
16178 haveit=
16179 for x in $LDFLAGS $LIBBABELTRACE; do
16180
16181 acl_save_prefix="$prefix"
16182 prefix="$acl_final_prefix"
16183 acl_save_exec_prefix="$exec_prefix"
16184 exec_prefix="$acl_final_exec_prefix"
16185 eval x=\"$x\"
16186 exec_prefix="$acl_save_exec_prefix"
16187 prefix="$acl_save_prefix"
16188
16189 if test "X$x" = "X-L$found_dir"; then
16190 haveit=yes
16191 break
16192 fi
16193 done
16194 if test -z "$haveit"; then
16195 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16196 fi
16197 if test "$hardcode_minus_L" != no; then
16198 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16199 else
16200 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16201 fi
16202 fi
16203 fi
16204 fi
16205 else
16206 if test "X$found_a" != "X"; then
16207 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16208 else
16209 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16210 fi
16211 fi
16212 additional_includedir=
16213 case "$found_dir" in
16214 */lib | */lib/)
16215 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16216 additional_includedir="$basedir/include"
16217 ;;
16218 esac
16219 if test "X$additional_includedir" != "X"; then
16220 if test "X$additional_includedir" != "X/usr/include"; then
16221 haveit=
16222 if test "X$additional_includedir" = "X/usr/local/include"; then
16223 if test -n "$GCC"; then
16224 case $host_os in
16225 linux*) haveit=yes;;
16226 esac
16227 fi
16228 fi
16229 if test -z "$haveit"; then
16230 for x in $CPPFLAGS $INCBABELTRACE; do
16231
16232 acl_save_prefix="$prefix"
16233 prefix="$acl_final_prefix"
16234 acl_save_exec_prefix="$exec_prefix"
16235 exec_prefix="$acl_final_exec_prefix"
16236 eval x=\"$x\"
16237 exec_prefix="$acl_save_exec_prefix"
16238 prefix="$acl_save_prefix"
16239
16240 if test "X$x" = "X-I$additional_includedir"; then
16241 haveit=yes
16242 break
16243 fi
16244 done
16245 if test -z "$haveit"; then
16246 if test -d "$additional_includedir"; then
16247 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16248 fi
16249 fi
16250 fi
16251 fi
16252 fi
16253 if test -n "$found_la"; then
16254 save_libdir="$libdir"
16255 case "$found_la" in
16256 */* | *\\*) . "$found_la" ;;
16257 *) . "./$found_la" ;;
16258 esac
16259 libdir="$save_libdir"
16260 for dep in $dependency_libs; do
16261 case "$dep" in
16262 -L*)
16263 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16264 if test "X$additional_libdir" != "X/usr/lib"; then
16265 haveit=
16266 if test "X$additional_libdir" = "X/usr/local/lib"; then
16267 if test -n "$GCC"; then
16268 case $host_os in
16269 linux*) haveit=yes;;
16270 esac
16271 fi
16272 fi
16273 if test -z "$haveit"; then
16274 haveit=
16275 for x in $LDFLAGS $LIBBABELTRACE; do
16276
16277 acl_save_prefix="$prefix"
16278 prefix="$acl_final_prefix"
16279 acl_save_exec_prefix="$exec_prefix"
16280 exec_prefix="$acl_final_exec_prefix"
16281 eval x=\"$x\"
16282 exec_prefix="$acl_save_exec_prefix"
16283 prefix="$acl_save_prefix"
16284
16285 if test "X$x" = "X-L$additional_libdir"; then
16286 haveit=yes
16287 break
16288 fi
16289 done
16290 if test -z "$haveit"; then
16291 if test -d "$additional_libdir"; then
16292 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16293 fi
16294 fi
16295 haveit=
16296 for x in $LDFLAGS $LTLIBBABELTRACE; do
16297
16298 acl_save_prefix="$prefix"
16299 prefix="$acl_final_prefix"
16300 acl_save_exec_prefix="$exec_prefix"
16301 exec_prefix="$acl_final_exec_prefix"
16302 eval x=\"$x\"
16303 exec_prefix="$acl_save_exec_prefix"
16304 prefix="$acl_save_prefix"
16305
16306 if test "X$x" = "X-L$additional_libdir"; then
16307 haveit=yes
16308 break
16309 fi
16310 done
16311 if test -z "$haveit"; then
16312 if test -d "$additional_libdir"; then
16313 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16314 fi
16315 fi
16316 fi
16317 fi
16318 ;;
16319 -R*)
16320 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16321 if test "$enable_rpath" != no; then
16322 haveit=
16323 for x in $rpathdirs; do
16324 if test "X$x" = "X$dir"; then
16325 haveit=yes
16326 break
16327 fi
16328 done
16329 if test -z "$haveit"; then
16330 rpathdirs="$rpathdirs $dir"
16331 fi
16332 haveit=
16333 for x in $ltrpathdirs; do
16334 if test "X$x" = "X$dir"; then
16335 haveit=yes
16336 break
16337 fi
16338 done
16339 if test -z "$haveit"; then
16340 ltrpathdirs="$ltrpathdirs $dir"
16341 fi
16342 fi
16343 ;;
16344 -l*)
16345 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16346 ;;
16347 *.la)
16348 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16349 ;;
16350 *)
16351 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16352 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16353 ;;
16354 esac
16355 done
16356 fi
16357 else
16358 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16359 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16360 fi
16361 fi
16362 fi
16363 done
16364 done
16365 if test "X$rpathdirs" != "X"; then
16366 if test -n "$hardcode_libdir_separator"; then
16367 alldirs=
16368 for found_dir in $rpathdirs; do
16369 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16370 done
16371 acl_save_libdir="$libdir"
16372 libdir="$alldirs"
16373 eval flag=\"$hardcode_libdir_flag_spec\"
16374 libdir="$acl_save_libdir"
16375 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16376 else
16377 for found_dir in $rpathdirs; do
16378 acl_save_libdir="$libdir"
16379 libdir="$found_dir"
16380 eval flag=\"$hardcode_libdir_flag_spec\"
16381 libdir="$acl_save_libdir"
16382 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16383 done
16384 fi
16385 fi
16386 if test "X$ltrpathdirs" != "X"; then
16387 for found_dir in $ltrpathdirs; do
16388 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16389 done
16390 fi
16391
16392
16393 ac_save_CPPFLAGS="$CPPFLAGS"
16394
16395 for element in $INCBABELTRACE; do
16396 haveit=
16397 for x in $CPPFLAGS; do
16398
16399 acl_save_prefix="$prefix"
16400 prefix="$acl_final_prefix"
16401 acl_save_exec_prefix="$exec_prefix"
16402 exec_prefix="$acl_final_exec_prefix"
16403 eval x=\"$x\"
16404 exec_prefix="$acl_save_exec_prefix"
16405 prefix="$acl_save_prefix"
16406
16407 if test "X$x" = "X$element"; then
16408 haveit=yes
16409 break
16410 fi
16411 done
16412 if test -z "$haveit"; then
16413 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16414 fi
16415 done
16416
16417
16418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16419$as_echo_n "checking for libbabeltrace... " >&6; }
16420if test "${ac_cv_libbabeltrace+set}" = set; then :
16421 $as_echo_n "(cached) " >&6
16422else
16423
16424 ac_save_LIBS="$LIBS"
16425 LIBS="$LIBS $LIBBABELTRACE"
16426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427/* end confdefs.h. */
16428#include <babeltrace/babeltrace.h>
16429 #include <babeltrace/ctf/events.h>
16430 #include <babeltrace/ctf/iterator.h>
16431int
16432main ()
16433{
16434struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16435 struct bt_ctf_event *event = NULL;
16436 const struct bt_definition *scope;
16437
65c749e7 16438 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16439 scope = bt_ctf_get_top_level_scope (event,
16440 BT_STREAM_EVENT_HEADER);
16441 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16442
16443 ;
16444 return 0;
16445}
16446_ACEOF
16447if ac_fn_c_try_link "$LINENO"; then :
16448 ac_cv_libbabeltrace=yes
16449else
16450 ac_cv_libbabeltrace=no
16451fi
16452rm -f core conftest.err conftest.$ac_objext \
16453 conftest$ac_exeext conftest.$ac_ext
16454 LIBS="$ac_save_LIBS"
16455
16456fi
16457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16458$as_echo "$ac_cv_libbabeltrace" >&6; }
16459 if test "$ac_cv_libbabeltrace" = yes; then
16460 HAVE_LIBBABELTRACE=yes
16461
16462$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16463
16464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16465$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16467$as_echo "$LIBBABELTRACE" >&6; }
16468 else
16469 HAVE_LIBBABELTRACE=no
16470 CPPFLAGS="$ac_save_CPPFLAGS"
16471 LIBBABELTRACE=
16472 LTLIBBABELTRACE=
16473 fi
16474
16475
16476
16477
16478
16479
16480 CFLAGS=$saved_CFLAGS
16481
16482 if test "$HAVE_LIBBABELTRACE" != yes; then
16483 if test "$with_babeltrace" = yes; then
16484 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16485 else
16486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16487$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16488 fi
16489 fi
16490fi
16491
db985757 16492# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16493# to an empty version.
c906108c
SS
16494
16495files=
16496links=
5a2402b8 16497
c906108c
SS
16498rm -f nm.h
16499if test "${nativefile}" != ""; then
0f475e27
AC
16500 case "${nativefile}" in
16501 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16502 * ) GDB_NM_FILE="${nativefile}"
16503 esac
5a2402b8
AC
16504 files="${files} ${GDB_NM_FILE}"
16505 links="${links} nm.h"
60ca704f
SE
16506
16507cat >>confdefs.h <<_ACEOF
b78960be 16508#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16509_ACEOF
5a2402b8 16510
c906108c 16511fi
5a2402b8
AC
16512
16513
bec39cab
AC
16514ac_sources="$files"
16515ac_dests="$links"
16516while test -n "$ac_sources"; do
16517 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16518 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16519 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16520done
81ecdfbb 16521ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16522
16523
c906108c
SS
16524
16525
c906108c 16526
81ecdfbb 16527$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16528
bec39cab 16529
b292c783 16530
f6a88844
JM
16531 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16532 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16533 if test "x$GDB_TRANSFORM_NAME" = x; then
16534 GDB_TRANSFORM_NAME=gdb
16535 fi
16536
16537
16538
16539 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16540 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16541 if test "x$GCORE_TRANSFORM_NAME" = x; then
16542 GCORE_TRANSFORM_NAME=gcore
16543 fi
16544
b292c783
JK
16545
16546ac_config_files="$ac_config_files gcore"
16547
16548
c971b7fa 16549ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
16550
16551ac_config_commands="$ac_config_commands default"
89a34d1b 16552
bec39cab
AC
16553cat >confcache <<\_ACEOF
16554# This file is a shell script that caches the results of configure
16555# tests run on this system so they can be shared between configure
16556# scripts and configure runs, see configure's option --config-cache.
16557# It is not useful on other systems. If it contains results you don't
16558# want to keep, you may remove or edit it.
16559#
16560# config.status only pays attention to the cache file if you give it
16561# the --recheck option to rerun configure.
16562#
16563# `ac_cv_env_foo' variables (set or unset) will be overridden when
16564# loading this file, other *unset* `ac_cv_foo' will be assigned the
16565# following values.
16566
16567_ACEOF
16568
16569# The following way of writing the cache mishandles newlines in values,
16570# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16571# So, we kill variables containing newlines.
bec39cab
AC
16572# Ultrix sh set writes to stderr and can't be redirected directly,
16573# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16574(
16575 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16576 eval ac_val=\$$ac_var
16577 case $ac_val in #(
16578 *${as_nl}*)
16579 case $ac_var in #(
16580 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16581$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16582 esac
16583 case $ac_var in #(
16584 _ | IFS | as_nl) ;; #(
16585 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16586 *) { eval $ac_var=; unset $ac_var;} ;;
16587 esac ;;
16588 esac
16589 done
16590
bec39cab 16591 (set) 2>&1 |
81ecdfbb
RW
16592 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16593 *${as_nl}ac_space=\ *)
16594 # `set' does not quote correctly, so add quotes: double-quote
16595 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16596 sed -n \
16597 "s/'/'\\\\''/g;
16598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16599 ;; #(
bec39cab
AC
16600 *)
16601 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16602 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16603 ;;
81ecdfbb
RW
16604 esac |
16605 sort
16606) |
bec39cab 16607 sed '
81ecdfbb 16608 /^ac_cv_env_/b end
bec39cab 16609 t clear
81ecdfbb 16610 :clear
bec39cab
AC
16611 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16612 t end
81ecdfbb
RW
16613 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16614 :end' >>confcache
16615if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16616 if test -w "$cache_file"; then
16617 test "x$cache_file" != "x/dev/null" &&
16618 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16619$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16620 cat confcache >$cache_file
16621 else
81ecdfbb
RW
16622 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16623$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16624 fi
16625fi
16626rm -f confcache
16627
16628test "x$prefix" = xNONE && prefix=$ac_default_prefix
16629# Let make expand exec_prefix.
16630test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16631
bec39cab
AC
16632DEFS=-DHAVE_CONFIG_H
16633
16634ac_libobjs=
16635ac_ltlibobjs=
16636for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16637 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16638 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16639 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16640 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16641 # will be set to the directory where LIBOBJS objects are built.
16642 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16643 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16644done
16645LIBOBJS=$ac_libobjs
16646
16647LTLIBOBJS=$ac_ltlibobjs
16648
16649
85981d60 16650if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16651 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16652Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16653fi
a417dc56 16654if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16655 as_fn_error "conditional \"GMAKE\" was never defined.
16656Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16657fi
4df42755
DE
16658if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16659 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16660Usually this means the macro was only invoked conditionally." "$LINENO" 5
16661fi
16662if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16663 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16664Usually this means the macro was only invoked conditionally." "$LINENO" 5
16665fi
81ecdfbb
RW
16666
16667
bec39cab 16668: ${CONFIG_STATUS=./config.status}
81ecdfbb 16669ac_write_fail=0
bec39cab
AC
16670ac_clean_files_save=$ac_clean_files
16671ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16672{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16673$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16674as_write_fail=0
16675cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16676#! $SHELL
16677# Generated by $as_me.
16678# Run this file to recreate the current configuration.
16679# Compiler output produced by configure, useful for debugging
16680# configure, is in config.log if it exists.
16681
16682debug=false
16683ac_cs_recheck=false
16684ac_cs_silent=false
bec39cab 16685
81ecdfbb
RW
16686SHELL=\${CONFIG_SHELL-$SHELL}
16687export SHELL
16688_ASEOF
16689cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16690## -------------------- ##
16691## M4sh Initialization. ##
16692## -------------------- ##
16693
16694# Be more Bourne compatible
16695DUALCASE=1; export DUALCASE # for MKS sh
16696if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16697 emulate sh
16698 NULLCMD=:
81ecdfbb 16699 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16700 # is contrary to our usage. Disable this feature.
16701 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16702 setopt NO_GLOB_SUBST
16703else
16704 case `(set -o) 2>/dev/null` in #(
16705 *posix*) :
16706 set -o posix ;; #(
16707 *) :
16708 ;;
16709esac
bec39cab 16710fi
bec39cab 16711
81ecdfbb
RW
16712
16713as_nl='
16714'
16715export as_nl
16716# Printing a long string crashes Solaris 7 /usr/bin/printf.
16717as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16718as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16719as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16720# Prefer a ksh shell builtin over an external printf program on Solaris,
16721# but without wasting forks for bash or zsh.
16722if test -z "$BASH_VERSION$ZSH_VERSION" \
16723 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16724 as_echo='print -r --'
16725 as_echo_n='print -rn --'
16726elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16727 as_echo='printf %s\n'
16728 as_echo_n='printf %s'
16729else
16730 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16731 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16732 as_echo_n='/usr/ucb/echo -n'
16733 else
16734 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16735 as_echo_n_body='eval
16736 arg=$1;
16737 case $arg in #(
16738 *"$as_nl"*)
16739 expr "X$arg" : "X\\(.*\\)$as_nl";
16740 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16741 esac;
16742 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16743 '
16744 export as_echo_n_body
16745 as_echo_n='sh -c $as_echo_n_body as_echo'
16746 fi
16747 export as_echo_body
16748 as_echo='sh -c $as_echo_body as_echo'
16749fi
16750
16751# The user is always right.
16752if test "${PATH_SEPARATOR+set}" != set; then
16753 PATH_SEPARATOR=:
16754 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16755 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16756 PATH_SEPARATOR=';'
16757 }
bec39cab
AC
16758fi
16759
16760
81ecdfbb
RW
16761# IFS
16762# We need space, tab and new line, in precisely that order. Quoting is
16763# there to prevent editors from complaining about space-tab.
16764# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16765# splitting by setting IFS to empty value.)
16766IFS=" "" $as_nl"
16767
16768# Find who we are. Look in the path if we contain no directory separator.
16769case $0 in #((
16770 *[\\/]* ) as_myself=$0 ;;
16771 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16772for as_dir in $PATH
16773do
16774 IFS=$as_save_IFS
16775 test -z "$as_dir" && as_dir=.
16776 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16777 done
16778IFS=$as_save_IFS
16779
16780 ;;
16781esac
16782# We did not find ourselves, most probably we were run as `sh COMMAND'
16783# in which case we are not to be found in the path.
16784if test "x$as_myself" = x; then
16785 as_myself=$0
16786fi
16787if test ! -f "$as_myself"; then
16788 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16789 exit 1
16790fi
16791
16792# Unset variables that we do not need and which cause bugs (e.g. in
16793# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16794# suppresses any "Segmentation fault" message there. '((' could
16795# trigger a bug in pdksh 5.2.14.
16796for as_var in BASH_ENV ENV MAIL MAILPATH
16797do eval test x\${$as_var+set} = xset \
16798 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16799done
bec39cab
AC
16800PS1='$ '
16801PS2='> '
16802PS4='+ '
16803
16804# NLS nuisances.
81ecdfbb
RW
16805LC_ALL=C
16806export LC_ALL
16807LANGUAGE=C
16808export LANGUAGE
16809
16810# CDPATH.
16811(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16812
16813
16814# as_fn_error ERROR [LINENO LOG_FD]
16815# ---------------------------------
16816# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16817# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16818# script with status $?, using 1 if that was 0.
16819as_fn_error ()
16820{
16821 as_status=$?; test $as_status -eq 0 && as_status=1
16822 if test "$3"; then
16823 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16824 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16825 fi
16826 $as_echo "$as_me: error: $1" >&2
16827 as_fn_exit $as_status
16828} # as_fn_error
16829
16830
16831# as_fn_set_status STATUS
16832# -----------------------
16833# Set $? to STATUS, without forking.
16834as_fn_set_status ()
16835{
16836 return $1
16837} # as_fn_set_status
16838
16839# as_fn_exit STATUS
16840# -----------------
16841# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16842as_fn_exit ()
16843{
16844 set +e
16845 as_fn_set_status $1
16846 exit $1
16847} # as_fn_exit
16848
16849# as_fn_unset VAR
16850# ---------------
16851# Portably unset VAR.
16852as_fn_unset ()
16853{
16854 { eval $1=; unset $1;}
16855}
16856as_unset=as_fn_unset
16857# as_fn_append VAR VALUE
16858# ----------------------
16859# Append the text in VALUE to the end of the definition contained in VAR. Take
16860# advantage of any shell optimizations that allow amortized linear growth over
16861# repeated appends, instead of the typical quadratic growth present in naive
16862# implementations.
16863if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16864 eval 'as_fn_append ()
16865 {
16866 eval $1+=\$2
16867 }'
16868else
16869 as_fn_append ()
16870 {
16871 eval $1=\$$1\$2
16872 }
16873fi # as_fn_append
16874
16875# as_fn_arith ARG...
16876# ------------------
16877# Perform arithmetic evaluation on the ARGs, and store the result in the
16878# global $as_val. Take advantage of shells that can avoid forks. The arguments
16879# must be portable across $(()) and expr.
16880if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16881 eval 'as_fn_arith ()
16882 {
16883 as_val=$(( $* ))
16884 }'
16885else
16886 as_fn_arith ()
16887 {
16888 as_val=`expr "$@" || test $? -eq 1`
16889 }
16890fi # as_fn_arith
bec39cab 16891
81ecdfbb
RW
16892
16893if expr a : '\(a\)' >/dev/null 2>&1 &&
16894 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16895 as_expr=expr
16896else
16897 as_expr=false
16898fi
16899
81ecdfbb 16900if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16901 as_basename=basename
16902else
16903 as_basename=false
16904fi
16905
81ecdfbb
RW
16906if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16907 as_dirname=dirname
16908else
16909 as_dirname=false
16910fi
bec39cab 16911
81ecdfbb 16912as_me=`$as_basename -- "$0" ||
bec39cab
AC
16913$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16914 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16915 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16916$as_echo X/"$0" |
16917 sed '/^.*\/\([^/][^/]*\)\/*$/{
16918 s//\1/
16919 q
16920 }
16921 /^X\/\(\/\/\)$/{
16922 s//\1/
16923 q
16924 }
16925 /^X\/\(\/\).*/{
16926 s//\1/
16927 q
16928 }
16929 s/.*/./; q'`
b4e70030 16930
b4e70030
JB
16931# Avoid depending upon Character Ranges.
16932as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16933as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16934as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16935as_cr_digits='0123456789'
16936as_cr_alnum=$as_cr_Letters$as_cr_digits
16937
81ecdfbb
RW
16938ECHO_C= ECHO_N= ECHO_T=
16939case `echo -n x` in #(((((
16940-n*)
16941 case `echo 'xy\c'` in
16942 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16943 xy) ECHO_C='\c';;
16944 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16945 ECHO_T=' ';;
16946 esac;;
16947*)
16948 ECHO_N='-n';;
bec39cab
AC
16949esac
16950
81ecdfbb
RW
16951rm -f conf$$ conf$$.exe conf$$.file
16952if test -d conf$$.dir; then
16953 rm -f conf$$.dir/conf$$.file
bec39cab 16954else
81ecdfbb
RW
16955 rm -f conf$$.dir
16956 mkdir conf$$.dir 2>/dev/null
bec39cab 16957fi
81ecdfbb
RW
16958if (echo >conf$$.file) 2>/dev/null; then
16959 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16960 as_ln_s='ln -s'
81ecdfbb
RW
16961 # ... but there are two gotchas:
16962 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16963 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16964 # In both cases, we have to default to `cp -p'.
16965 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16966 as_ln_s='cp -p'
16967 elif ln conf$$.file conf$$ 2>/dev/null; then
16968 as_ln_s=ln
16969 else
16970 as_ln_s='cp -p'
b4e70030 16971 fi
bec39cab
AC
16972else
16973 as_ln_s='cp -p'
16974fi
81ecdfbb
RW
16975rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16976rmdir conf$$.dir 2>/dev/null
16977
16978
16979# as_fn_mkdir_p
16980# -------------
16981# Create "$as_dir" as a directory, including parents if necessary.
16982as_fn_mkdir_p ()
16983{
16984
16985 case $as_dir in #(
16986 -*) as_dir=./$as_dir;;
16987 esac
16988 test -d "$as_dir" || eval $as_mkdir_p || {
16989 as_dirs=
16990 while :; do
16991 case $as_dir in #(
16992 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16993 *) as_qdir=$as_dir;;
16994 esac
16995 as_dirs="'$as_qdir' $as_dirs"
16996 as_dir=`$as_dirname -- "$as_dir" ||
16997$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16998 X"$as_dir" : 'X\(//\)[^/]' \| \
16999 X"$as_dir" : 'X\(//\)$' \| \
17000 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17001$as_echo X"$as_dir" |
17002 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17003 s//\1/
17004 q
17005 }
17006 /^X\(\/\/\)[^/].*/{
17007 s//\1/
17008 q
17009 }
17010 /^X\(\/\/\)$/{
17011 s//\1/
17012 q
17013 }
17014 /^X\(\/\).*/{
17015 s//\1/
17016 q
17017 }
17018 s/.*/./; q'`
17019 test -d "$as_dir" && break
17020 done
17021 test -z "$as_dirs" || eval "mkdir $as_dirs"
17022 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17023
bec39cab 17024
81ecdfbb 17025} # as_fn_mkdir_p
bec39cab 17026if mkdir -p . 2>/dev/null; then
81ecdfbb 17027 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17028else
17029 test -d ./-p && rmdir ./-p
17030 as_mkdir_p=false
17031fi
17032
81ecdfbb
RW
17033if test -x / >/dev/null 2>&1; then
17034 as_test_x='test -x'
17035else
17036 if ls -dL / >/dev/null 2>&1; then
17037 as_ls_L_option=L
17038 else
17039 as_ls_L_option=
17040 fi
17041 as_test_x='
17042 eval sh -c '\''
17043 if test -d "$1"; then
17044 test -d "$1/.";
17045 else
17046 case $1 in #(
17047 -*)set "./$1";;
17048 esac;
17049 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17050 ???[sx]*):;;*)false;;esac;fi
17051 '\'' sh
17052 '
17053fi
17054as_executable_p=$as_test_x
bec39cab
AC
17055
17056# Sed expression to map a string onto a valid CPP name.
17057as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17058
17059# Sed expression to map a string onto a valid variable name.
17060as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17061
17062
bec39cab 17063exec 6>&1
81ecdfbb
RW
17064## ----------------------------------- ##
17065## Main body of $CONFIG_STATUS script. ##
17066## ----------------------------------- ##
17067_ASEOF
17068test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17069
17070cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17071# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17072# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17073# values after options handling.
17074ac_log="
bec39cab 17075This file was extended by $as_me, which was
81ecdfbb 17076generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17077
17078 CONFIG_FILES = $CONFIG_FILES
17079 CONFIG_HEADERS = $CONFIG_HEADERS
17080 CONFIG_LINKS = $CONFIG_LINKS
17081 CONFIG_COMMANDS = $CONFIG_COMMANDS
17082 $ $0 $@
17083
81ecdfbb
RW
17084on `(hostname || uname -n) 2>/dev/null | sed 1q`
17085"
17086
bec39cab
AC
17087_ACEOF
17088
81ecdfbb
RW
17089case $ac_config_files in *"
17090"*) set x $ac_config_files; shift; ac_config_files=$*;;
17091esac
234b45d4 17092
81ecdfbb
RW
17093case $ac_config_headers in *"
17094"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17095esac
b4e70030 17096
b4e70030 17097
81ecdfbb
RW
17098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17099# Files that config.status was made for.
17100config_files="$ac_config_files"
17101config_headers="$ac_config_headers"
17102config_links="$ac_config_links"
17103config_commands="$ac_config_commands"
234b45d4 17104
81ecdfbb 17105_ACEOF
b4e70030 17106
81ecdfbb 17107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17108ac_cs_usage="\
81ecdfbb
RW
17109\`$as_me' instantiates files and other configuration actions
17110from templates according to the current configuration. Unless the files
17111and actions are specified as TAGs, all are instantiated by default.
234b45d4 17112
81ecdfbb 17113Usage: $0 [OPTION]... [TAG]...
234b45d4 17114
bec39cab 17115 -h, --help print this help, then exit
81ecdfbb
RW
17116 -V, --version print version number and configuration settings, then exit
17117 -q, --quiet, --silent
17118 do not print progress messages
bec39cab
AC
17119 -d, --debug don't remove temporary files
17120 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17121 --file=FILE[:TEMPLATE]
17122 instantiate the configuration file FILE
17123 --header=FILE[:TEMPLATE]
17124 instantiate the configuration header FILE
234b45d4 17125
bec39cab
AC
17126Configuration files:
17127$config_files
234b45d4 17128
bec39cab
AC
17129Configuration headers:
17130$config_headers
234b45d4 17131
bec39cab
AC
17132Configuration links:
17133$config_links
234b45d4 17134
bec39cab
AC
17135Configuration commands:
17136$config_commands
17137
81ecdfbb 17138Report bugs to the package provider."
b4e70030 17139
81ecdfbb
RW
17140_ACEOF
17141cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17142ac_cs_version="\\
17143config.status
81ecdfbb
RW
17144configured by $0, generated by GNU Autoconf 2.64,
17145 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17146
81ecdfbb 17147Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17148This config.status script is free software; the Free Software Foundation
17149gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17150
17151ac_pwd='$ac_pwd'
17152srcdir='$srcdir'
17153INSTALL='$INSTALL'
81ecdfbb
RW
17154AWK='$AWK'
17155test -n "\$AWK" || AWK=awk
bec39cab
AC
17156_ACEOF
17157
81ecdfbb
RW
17158cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17159# The default lists apply if the user does not specify any file.
bec39cab
AC
17160ac_need_defaults=:
17161while test $# != 0
17162do
17163 case $1 in
17164 --*=*)
81ecdfbb
RW
17165 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17166 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17167 ac_shift=:
c906108c 17168 ;;
81ecdfbb 17169 *)
bec39cab
AC
17170 ac_option=$1
17171 ac_optarg=$2
17172 ac_shift=shift
c906108c 17173 ;;
bec39cab 17174 esac
c906108c 17175
bec39cab
AC
17176 case $ac_option in
17177 # Handling of the options.
bec39cab
AC
17178 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17179 ac_cs_recheck=: ;;
81ecdfbb
RW
17180 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17181 $as_echo "$ac_cs_version"; exit ;;
17182 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17183 debug=: ;;
17184 --file | --fil | --fi | --f )
17185 $ac_shift
81ecdfbb
RW
17186 case $ac_optarg in
17187 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17188 esac
17189 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17190 ac_need_defaults=false;;
17191 --header | --heade | --head | --hea )
17192 $ac_shift
81ecdfbb
RW
17193 case $ac_optarg in
17194 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17195 esac
17196 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17197 ac_need_defaults=false;;
81ecdfbb
RW
17198 --he | --h)
17199 # Conflict between --help and --header
17200 as_fn_error "ambiguous option: \`$1'
17201Try \`$0 --help' for more information.";;
17202 --help | --hel | -h )
17203 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17204 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17205 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17206 ac_cs_silent=: ;;
c906108c 17207
bec39cab 17208 # This is an error.
81ecdfbb
RW
17209 -*) as_fn_error "unrecognized option: \`$1'
17210Try \`$0 --help' for more information." ;;
c906108c 17211
81ecdfbb
RW
17212 *) as_fn_append ac_config_targets " $1"
17213 ac_need_defaults=false ;;
c906108c 17214
bec39cab
AC
17215 esac
17216 shift
17217done
c906108c 17218
bec39cab 17219ac_configure_extra_args=
c906108c 17220
bec39cab
AC
17221if $ac_cs_silent; then
17222 exec 6>/dev/null
17223 ac_configure_extra_args="$ac_configure_extra_args --silent"
17224fi
c906108c 17225
bec39cab 17226_ACEOF
81ecdfbb 17227cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17228if \$ac_cs_recheck; then
81ecdfbb
RW
17229 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17230 shift
17231 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17232 CONFIG_SHELL='$SHELL'
17233 export CONFIG_SHELL
17234 exec "\$@"
bec39cab
AC
17235fi
17236
17237_ACEOF
81ecdfbb
RW
17238cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17239exec 5>>config.log
17240{
17241 echo
17242 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17243## Running $as_me. ##
17244_ASBOX
17245 $as_echo "$ac_log"
17246} >&5
bec39cab 17247
81ecdfbb
RW
17248_ACEOF
17249cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17250#
81ecdfbb 17251# INIT-COMMANDS
c906108c 17252#
a417dc56 17253ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17254
bec39cab
AC
17255_ACEOF
17256
81ecdfbb 17257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17258
81ecdfbb 17259# Handling of arguments.
bec39cab 17260for ac_config_target in $ac_config_targets
c906108c 17261do
81ecdfbb
RW
17262 case $ac_config_target in
17263 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17264 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17265 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17266 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17267 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17268 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17269 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17270 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17271 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17272 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17273
17274 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17275 esac
17276done
17277
81ecdfbb 17278
bec39cab
AC
17279# If the user did not use the arguments to specify the items to instantiate,
17280# then the envvar interface is used. Set only those that are not.
17281# We use the long form for the default assignment because of an extremely
17282# bizarre bug on SunOS 4.1.3.
17283if $ac_need_defaults; then
17284 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17285 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17286 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17287 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17288fi
17289
b4e70030 17290# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17291# simply because there is no reason against having it here, and in addition,
b4e70030 17292# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17293# Hook for its removal unless debugging.
17294# Note that there is a small window in which the directory will not be cleaned:
17295# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17296$debug ||
17297{
81ecdfbb
RW
17298 tmp=
17299 trap 'exit_status=$?
17300 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17301' 0
17302 trap 'as_fn_exit 1' 1 2 13 15
17303}
17304# Create a (secure) tmp directory for tmp files.
17305
17306{
17307 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17308 test -n "$tmp" && test -d "$tmp"
17309} ||
17310{
17311 tmp=./conf$$-$RANDOM
17312 (umask 077 && mkdir "$tmp")
17313} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17314
17315# Set up the scripts for CONFIG_FILES section.
17316# No need to generate them if there are no CONFIG_FILES.
17317# This happens for instance with `./config.status config.h'.
17318if test -n "$CONFIG_FILES"; then
17319
17320if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17321 ac_cs_awk_getline=:
17322 ac_cs_awk_pipe_init=
17323 ac_cs_awk_read_file='
17324 while ((getline aline < (F[key])) > 0)
17325 print(aline)
17326 close(F[key])'
17327 ac_cs_awk_pipe_fini=
17328else
17329 ac_cs_awk_getline=false
17330 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17331 ac_cs_awk_read_file='
17332 print "|#_!!_#|"
17333 print "cat " F[key] " &&"
17334 '$ac_cs_awk_pipe_init
17335 # The final `:' finishes the AND list.
17336 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17337fi
17338ac_cr=`echo X | tr X '\015'`
17339# On cygwin, bash can eat \r inside `` if the user requested igncr.
17340# But we know of no other shell where ac_cr would be empty at this
17341# point, so we can use a bashism as a fallback.
17342if test "x$ac_cr" = x; then
17343 eval ac_cr=\$\'\\r\'
17344fi
17345ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17346if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17347 ac_cs_awk_cr='\r'
17348else
17349 ac_cs_awk_cr=$ac_cr
17350fi
17351
17352echo 'BEGIN {' >"$tmp/subs1.awk" &&
17353_ACEOF
17354
17355# Create commands to substitute file output variables.
17356{
17357 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17358 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17359 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17360 echo "_ACAWK" &&
17361 echo "_ACEOF"
17362} >conf$$files.sh &&
17363. ./conf$$files.sh ||
17364 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17365rm -f conf$$files.sh
17366
17367{
17368 echo "cat >conf$$subs.awk <<_ACEOF" &&
17369 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17370 echo "_ACEOF"
17371} >conf$$subs.sh ||
17372 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17373ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17374ac_delim='%!_!# '
17375for ac_last_try in false false false false false :; do
17376 . ./conf$$subs.sh ||
17377 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17378
17379 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17380 if test $ac_delim_n = $ac_delim_num; then
17381 break
17382 elif $ac_last_try; then
17383 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17384 else
17385 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17386 fi
17387done
17388rm -f conf$$subs.sh
17389
17390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17391cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17392_ACEOF
17393sed -n '
17394h
17395s/^/S["/; s/!.*/"]=/
17396p
17397g
17398s/^[^!]*!//
17399:repl
17400t repl
17401s/'"$ac_delim"'$//
17402t delim
17403:nl
17404h
17405s/\(.\{148\}\).*/\1/
17406t more1
17407s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17408p
17409n
17410b repl
17411:more1
17412s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17413p
17414g
17415s/.\{148\}//
17416t nl
17417:delim
17418h
17419s/\(.\{148\}\).*/\1/
17420t more2
17421s/["\\]/\\&/g; s/^/"/; s/$/"/
17422p
17423b
17424:more2
17425s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17426p
17427g
17428s/.\{148\}//
17429t delim
17430' <conf$$subs.awk | sed '
17431/^[^""]/{
17432 N
17433 s/\n//
17434}
17435' >>$CONFIG_STATUS || ac_write_fail=1
17436rm -f conf$$subs.awk
17437cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17438_ACAWK
17439cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17440 for (key in S) S_is_set[key] = 1
17441 FS = "\a"
17442 \$ac_cs_awk_pipe_init
17443}
17444{
17445 line = $ 0
17446 nfields = split(line, field, "@")
17447 substed = 0
17448 len = length(field[1])
17449 for (i = 2; i < nfields; i++) {
17450 key = field[i]
17451 keylen = length(key)
17452 if (S_is_set[key]) {
17453 value = S[key]
17454 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17455 len += length(value) + length(field[++i])
17456 substed = 1
17457 } else
17458 len += 1 + keylen
17459 }
17460 if (nfields == 3 && !substed) {
17461 key = field[2]
17462 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17463 \$ac_cs_awk_read_file
17464 next
17465 }
17466 }
17467 print line
b4e70030 17468}
81ecdfbb
RW
17469\$ac_cs_awk_pipe_fini
17470_ACAWK
17471_ACEOF
17472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17473if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17474 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17475else
17476 cat
17477fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17478 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17479_ACEOF
17480
17481# VPATH may cause trouble with some makes, so we remove $(srcdir),
17482# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17483# trailing colons and then remove the whole line if VPATH becomes empty
17484# (actually we leave an empty line to preserve line numbers).
17485if test "x$srcdir" = x.; then
17486 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17487s/:*\$(srcdir):*/:/
17488s/:*\${srcdir}:*/:/
17489s/:*@srcdir@:*/:/
17490s/^\([^=]*=[ ]*\):*/\1/
17491s/:*$//
17492s/^[^=]*=[ ]*$//
17493}'
17494fi
17495
17496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17497fi # test -n "$CONFIG_FILES"
17498
17499# Set up the scripts for CONFIG_HEADERS section.
17500# No need to generate them if there are no CONFIG_HEADERS.
17501# This happens for instance with `./config.status Makefile'.
17502if test -n "$CONFIG_HEADERS"; then
17503cat >"$tmp/defines.awk" <<\_ACAWK ||
17504BEGIN {
17505_ACEOF
17506
17507# Transform confdefs.h into an awk script `defines.awk', embedded as
17508# here-document in config.status, that substitutes the proper values into
17509# config.h.in to produce config.h.
4e8d927d 17510
81ecdfbb
RW
17511# Create a delimiter string that does not exist in confdefs.h, to ease
17512# handling of long lines.
17513ac_delim='%!_!# '
17514for ac_last_try in false false :; do
17515 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17516 if test -z "$ac_t"; then
17517 break
17518 elif $ac_last_try; then
17519 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17520 else
17521 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17522 fi
17523done
4e8d927d 17524
81ecdfbb
RW
17525# For the awk script, D is an array of macro values keyed by name,
17526# likewise P contains macro parameters if any. Preserve backslash
17527# newline sequences.
17528
17529ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17530sed -n '
17531s/.\{148\}/&'"$ac_delim"'/g
17532t rset
17533:rset
17534s/^[ ]*#[ ]*define[ ][ ]*/ /
17535t def
17536d
17537:def
17538s/\\$//
17539t bsnl
17540s/["\\]/\\&/g
17541s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17542D["\1"]=" \3"/p
17543s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17544d
17545:bsnl
17546s/["\\]/\\&/g
17547s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17548D["\1"]=" \3\\\\\\n"\\/p
17549t cont
17550s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17551t cont
17552d
17553:cont
17554n
17555s/.\{148\}/&'"$ac_delim"'/g
17556t clear
17557:clear
17558s/\\$//
17559t bsnlc
17560s/["\\]/\\&/g; s/^/"/; s/$/"/p
17561d
17562:bsnlc
17563s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17564b cont
17565' <confdefs.h | sed '
17566s/'"$ac_delim"'/"\\\
17567"/g' >>$CONFIG_STATUS || ac_write_fail=1
17568
17569cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17570 for (key in D) D_is_set[key] = 1
17571 FS = "\a"
17572}
17573/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17574 line = \$ 0
17575 split(line, arg, " ")
17576 if (arg[1] == "#") {
17577 defundef = arg[2]
17578 mac1 = arg[3]
17579 } else {
17580 defundef = substr(arg[1], 2)
17581 mac1 = arg[2]
17582 }
17583 split(mac1, mac2, "(") #)
17584 macro = mac2[1]
17585 prefix = substr(line, 1, index(line, defundef) - 1)
17586 if (D_is_set[macro]) {
17587 # Preserve the white space surrounding the "#".
17588 print prefix "define", macro P[macro] D[macro]
17589 next
17590 } else {
17591 # Replace #undef with comments. This is necessary, for example,
17592 # in the case of _POSIX_SOURCE, which is predefined and required
17593 # on some systems where configure will not decide to define it.
17594 if (defundef == "undef") {
17595 print "/*", prefix defundef, macro, "*/"
17596 next
17597 }
17598 }
b4e70030 17599}
81ecdfbb
RW
17600{ print }
17601_ACAWK
b4e70030 17602_ACEOF
81ecdfbb
RW
17603cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17604 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17605fi # test -n "$CONFIG_HEADERS"
4e8d927d 17606
4e8d927d 17607
81ecdfbb
RW
17608eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17609shift
17610for ac_tag
17611do
17612 case $ac_tag in
17613 :[FHLC]) ac_mode=$ac_tag; continue;;
17614 esac
17615 case $ac_mode$ac_tag in
17616 :[FHL]*:*);;
17617 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17618 :[FH]-) ac_tag=-:-;;
17619 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17620 esac
17621 ac_save_IFS=$IFS
17622 IFS=:
17623 set x $ac_tag
17624 IFS=$ac_save_IFS
17625 shift
17626 ac_file=$1
17627 shift
4e8d927d 17628
81ecdfbb
RW
17629 case $ac_mode in
17630 :L) ac_source=$1;;
17631 :[FH])
17632 ac_file_inputs=
17633 for ac_f
17634 do
17635 case $ac_f in
17636 -) ac_f="$tmp/stdin";;
17637 *) # Look for the file first in the build tree, then in the source tree
17638 # (if the path is not absolute). The absolute path cannot be DOS-style,
17639 # because $ac_f cannot contain `:'.
17640 test -f "$ac_f" ||
17641 case $ac_f in
17642 [\\/$]*) false;;
17643 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17644 esac ||
17645 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17646 esac
17647 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17648 as_fn_append ac_file_inputs " '$ac_f'"
17649 done
17650
17651 # Let's still pretend it is `configure' which instantiates (i.e., don't
17652 # use $as_me), people would be surprised to read:
17653 # /* config.h. Generated by config.status. */
17654 configure_input='Generated from '`
17655 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17656 `' by configure.'
17657 if test x"$ac_file" != x-; then
17658 configure_input="$ac_file. $configure_input"
17659 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17660$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17661 fi
81ecdfbb
RW
17662 # Neutralize special characters interpreted by sed in replacement strings.
17663 case $configure_input in #(
17664 *\&* | *\|* | *\\* )
17665 ac_sed_conf_input=`$as_echo "$configure_input" |
17666 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17667 *) ac_sed_conf_input=$configure_input;;
17668 esac
4e8d927d 17669
81ecdfbb
RW
17670 case $ac_tag in
17671 *:-:* | *:-) cat >"$tmp/stdin" \
17672 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17673 esac
17674 ;;
c906108c
SS
17675 esac
17676
81ecdfbb 17677 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17678$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17679 X"$ac_file" : 'X\(//\)[^/]' \| \
17680 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17681 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17682$as_echo X"$ac_file" |
17683 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17684 s//\1/
17685 q
17686 }
17687 /^X\(\/\/\)[^/].*/{
17688 s//\1/
17689 q
17690 }
17691 /^X\(\/\/\)$/{
17692 s//\1/
17693 q
17694 }
17695 /^X\(\/\).*/{
17696 s//\1/
17697 q
17698 }
17699 s/.*/./; q'`
17700 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17701 ac_builddir=.
17702
81ecdfbb
RW
17703case "$ac_dir" in
17704.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17705*)
17706 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17707 # A ".." for each directory in $ac_dir_suffix.
17708 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17709 case $ac_top_builddir_sub in
17710 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17711 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17712 esac ;;
17713esac
17714ac_abs_top_builddir=$ac_pwd
17715ac_abs_builddir=$ac_pwd$ac_dir_suffix
17716# for backward compatibility:
17717ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17718
17719case $srcdir in
81ecdfbb 17720 .) # We are building in place.
bec39cab 17721 ac_srcdir=.
81ecdfbb
RW
17722 ac_top_srcdir=$ac_top_builddir_sub
17723 ac_abs_top_srcdir=$ac_pwd ;;
17724 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17725 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17726 ac_top_srcdir=$srcdir
17727 ac_abs_top_srcdir=$srcdir ;;
17728 *) # Relative name.
17729 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17730 ac_top_srcdir=$ac_top_build_prefix$srcdir
17731 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17732esac
81ecdfbb 17733ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17734
c906108c 17735
81ecdfbb
RW
17736 case $ac_mode in
17737 :F)
17738 #
17739 # CONFIG_FILE
17740 #
c906108c 17741
bec39cab
AC
17742 case $INSTALL in
17743 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17744 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17745 esac
81ecdfbb 17746_ACEOF
121ce6e5 17747
81ecdfbb
RW
17748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17749# If the template does not know about datarootdir, expand it.
17750# FIXME: This hack should be removed a few years after 2.60.
17751ac_datarootdir_hack=; ac_datarootdir_seen=
17752ac_sed_dataroot='
17753/datarootdir/ {
17754 p
17755 q
17756}
17757/@datadir@/p
17758/@docdir@/p
17759/@infodir@/p
17760/@localedir@/p
17761/@mandir@/p'
17762case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17763*datarootdir*) ac_datarootdir_seen=yes;;
17764*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17766$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17767_ACEOF
17768cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17769 ac_datarootdir_hack='
17770 s&@datadir@&$datadir&g
17771 s&@docdir@&$docdir&g
17772 s&@infodir@&$infodir&g
17773 s&@localedir@&$localedir&g
17774 s&@mandir@&$mandir&g
17775 s&\\\${datarootdir}&$datarootdir&g' ;;
17776esac
4e8d927d 17777_ACEOF
81ecdfbb
RW
17778
17779# Neutralize VPATH when `$srcdir' = `.'.
17780# Shell code in configure.ac might set extrasub.
17781# FIXME: do we really want to maintain this feature?
17782cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17783ac_sed_extra="$ac_vpsub
bec39cab
AC
17784$extrasub
17785_ACEOF
81ecdfbb 17786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17787:t
17788/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17789s|@configure_input@|$ac_sed_conf_input|;t t
17790s&@top_builddir@&$ac_top_builddir_sub&;t t
17791s&@top_build_prefix@&$ac_top_build_prefix&;t t
17792s&@srcdir@&$ac_srcdir&;t t
17793s&@abs_srcdir@&$ac_abs_srcdir&;t t
17794s&@top_srcdir@&$ac_top_srcdir&;t t
17795s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17796s&@builddir@&$ac_builddir&;t t
17797s&@abs_builddir@&$ac_abs_builddir&;t t
17798s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17799s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17800$ac_datarootdir_hack
17801"
17802eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17803if $ac_cs_awk_getline; then
17804 $AWK -f "$tmp/subs.awk"
17805else
17806 $AWK -f "$tmp/subs.awk" | $SHELL
17807fi >$tmp/out \
17808 || as_fn_error "could not create $ac_file" "$LINENO" 5
17809
17810test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17811 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17812 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17814which seems to be undefined. Please make sure it is defined." >&5
17815$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17816which seems to be undefined. Please make sure it is defined." >&2;}
17817
17818 rm -f "$tmp/stdin"
bec39cab 17819 case $ac_file in
81ecdfbb
RW
17820 -) cat "$tmp/out" && rm -f "$tmp/out";;
17821 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17822 esac \
17823 || as_fn_error "could not create $ac_file" "$LINENO" 5
17824 ;;
17825 :H)
17826 #
17827 # CONFIG_HEADER
17828 #
bec39cab 17829 if test x"$ac_file" != x-; then
81ecdfbb
RW
17830 {
17831 $as_echo "/* $configure_input */" \
17832 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17833 } >"$tmp/config.h" \
17834 || as_fn_error "could not create $ac_file" "$LINENO" 5
17835 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17836 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17837$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17838 else
81ecdfbb
RW
17839 rm -f "$ac_file"
17840 mv "$tmp/config.h" "$ac_file" \
17841 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17842 fi
17843 else
81ecdfbb
RW
17844 $as_echo "/* $configure_input */" \
17845 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17846 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17847 fi
81ecdfbb
RW
17848 ;;
17849 :L)
17850 #
17851 # CONFIG_LINK
17852 #
c906108c 17853
81ecdfbb
RW
17854 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17855 :
b4e70030 17856 else
81ecdfbb
RW
17857 # Prefer the file from the source tree if names are identical.
17858 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17859 ac_source=$srcdir/$ac_source
17860 fi
b4e70030 17861
81ecdfbb
RW
17862 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17863$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17864
81ecdfbb
RW
17865 if test ! -r "$ac_source"; then
17866 as_fn_error "$ac_source: file not found" "$LINENO" 5
17867 fi
17868 rm -f "$ac_file"
bec39cab 17869
81ecdfbb
RW
17870 # Try a relative symlink, then a hard link, then a copy.
17871 case $srcdir in
17872 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17873 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17874 esac
17875 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17876 ln "$ac_source" "$ac_file" 2>/dev/null ||
17877 cp -p "$ac_source" "$ac_file" ||
17878 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17879 fi
17880 ;;
17881 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17882$as_echo "$as_me: executing $ac_file commands" >&6;}
17883 ;;
c906108c 17884 esac
b4e70030 17885
bec39cab 17886
81ecdfbb
RW
17887 case $ac_file$ac_mode in
17888 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17889 "gcore":F) chmod +x gcore ;;
81ecdfbb 17890 "default":C)
c906108c
SS
17891case x$CONFIG_HEADERS in
17892xconfig.h:config.in)
17893echo > stamp-h ;;
17894esac
bec39cab 17895 ;;
81ecdfbb 17896
bec39cab 17897 esac
81ecdfbb 17898done # for ac_tag
c906108c 17899
bec39cab 17900
81ecdfbb 17901as_fn_exit 0
bec39cab 17902_ACEOF
bec39cab
AC
17903ac_clean_files=$ac_clean_files_save
17904
81ecdfbb
RW
17905test $ac_write_fail = 0 ||
17906 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17907
bec39cab
AC
17908
17909# configure is writing to config.log, and then calls config.status.
17910# config.status does its own redirection, appending to config.log.
17911# Unfortunately, on DOS this fails, as config.log is still kept open
17912# by configure, so config.status won't be able to write to it; its
17913# output is simply discarded. So we exec the FD to /dev/null,
17914# effectively closing config.log, so it can be properly (re)opened and
17915# appended to by config.status. When coming back to configure, we
17916# need to make the FD available again.
17917if test "$no_create" != yes; then
17918 ac_cs_success=:
17919 ac_config_status_args=
17920 test "$silent" = yes &&
17921 ac_config_status_args="$ac_config_status_args --quiet"
17922 exec 5>/dev/null
17923 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17924 exec 5>>config.log
17925 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17926 # would make configure fail if this is the last instruction.
81ecdfbb 17927 $ac_cs_success || as_fn_exit $?
bec39cab 17928fi
c906108c 17929
bec39cab 17930#
81ecdfbb 17931# CONFIG_SUBDIRS section.
bec39cab 17932#
c906108c
SS
17933if test "$no_recursion" != yes; then
17934
81ecdfbb
RW
17935 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17936 # so they do not pile up.
c906108c
SS
17937 ac_sub_configure_args=
17938 ac_prev=
fdc59709
PB
17939 eval "set x $ac_configure_args"
17940 shift
17941 for ac_arg
17942 do
c906108c
SS
17943 if test -n "$ac_prev"; then
17944 ac_prev=
17945 continue
17946 fi
bec39cab 17947 case $ac_arg in
c906108c
SS
17948 -cache-file | --cache-file | --cache-fil | --cache-fi \
17949 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17950 ac_prev=cache_file ;;
17951 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17952 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17953 | --c=*)
17954 ;;
17955 --config-cache | -C)
c906108c
SS
17956 ;;
17957 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17958 ac_prev=srcdir ;;
17959 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17960 ;;
bec39cab
AC
17961 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17962 ac_prev=prefix ;;
17963 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17964 ;;
81ecdfbb
RW
17965 --disable-option-checking)
17966 ;;
fdc59709
PB
17967 *)
17968 case $ac_arg in
81ecdfbb 17969 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17970 esac
81ecdfbb 17971 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17972 esac
17973 done
17974
bec39cab
AC
17975 # Always prepend --prefix to ensure using the same prefix
17976 # in subdir configurations.
fdc59709
PB
17977 ac_arg="--prefix=$prefix"
17978 case $ac_arg in
81ecdfbb 17979 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17980 esac
81ecdfbb
RW
17981 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17982
17983 # Pass --silent
17984 if test "$silent" = yes; then
17985 ac_sub_configure_args="--silent $ac_sub_configure_args"
17986 fi
17987
17988 # Always prepend --disable-option-checking to silence warnings, since
17989 # different subdirs can have different --enable and --with options.
17990 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17991
b4e70030 17992 ac_popdir=`pwd`
bec39cab 17993 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17994
17995 # Do not complain, so a configure script can configure whichever
17996 # parts of a large source tree are present.
fdc59709 17997 test -d "$srcdir/$ac_dir" || continue
c906108c 17998
81ecdfbb
RW
17999 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18000 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18001 $as_echo "$ac_msg" >&6
18002 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18003 ac_builddir=.
18004
81ecdfbb
RW
18005case "$ac_dir" in
18006.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18007*)
18008 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18009 # A ".." for each directory in $ac_dir_suffix.
18010 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18011 case $ac_top_builddir_sub in
18012 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18013 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18014 esac ;;
18015esac
18016ac_abs_top_builddir=$ac_pwd
18017ac_abs_builddir=$ac_pwd$ac_dir_suffix
18018# for backward compatibility:
18019ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18020
18021case $srcdir in
81ecdfbb 18022 .) # We are building in place.
bec39cab 18023 ac_srcdir=.
81ecdfbb
RW
18024 ac_top_srcdir=$ac_top_builddir_sub
18025 ac_abs_top_srcdir=$ac_pwd ;;
18026 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18027 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18028 ac_top_srcdir=$srcdir
18029 ac_abs_top_srcdir=$srcdir ;;
18030 *) # Relative name.
18031 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18032 ac_top_srcdir=$ac_top_build_prefix$srcdir
18033 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18034esac
81ecdfbb 18035ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18036
c906108c 18037
fdc59709 18038 cd "$ac_dir"
c906108c
SS
18039
18040 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18041 if test -f "$ac_srcdir/configure.gnu"; then
18042 ac_sub_configure=$ac_srcdir/configure.gnu
18043 elif test -f "$ac_srcdir/configure"; then
18044 ac_sub_configure=$ac_srcdir/configure
18045 elif test -f "$ac_srcdir/configure.in"; then
18046 # This should be Cygnus configure.
18047 ac_sub_configure=$ac_aux_dir/configure
c906108c 18048 else
81ecdfbb
RW
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18050$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18051 ac_sub_configure=
18052 fi
18053
18054 # The recursion is here.
18055 if test -n "$ac_sub_configure"; then
c906108c 18056 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18057 case $cache_file in
18058 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18059 *) # Relative name.
18060 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18061 esac
c906108c 18062
81ecdfbb
RW
18063 { $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
18064$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18065 # The eval makes quoting arguments work.
fdc59709
PB
18066 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18067 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18068 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18069 fi
18070
fdc59709 18071 cd "$ac_popdir"
c906108c
SS
18072 done
18073fi
81ecdfbb
RW
18074if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18075 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18076$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18077fi
c906108c
SS
18078
18079
18080exit 0
This page took 2.685268 seconds and 4 git commands to generate.