[C++] breakpoint.c: "no memory" software watchpoints and enum casts
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
81ecdfbb 596GDB_NM_FILE
393fd4c3
YQ
597LTLIBBABELTRACE
598LIBBABELTRACE
599HAVE_LIBBABELTRACE
81ecdfbb
RW
600frags
601target_subdir
602CONFIG_UNINSTALL
603CONFIG_INSTALL
604CONFIG_CLEAN
605CONFIG_ALL
606CONFIG_SRCS
607CONFIG_DEPS
608CONFIG_OBS
609PROFILE_CFLAGS
610ENABLE_CFLAGS
611SIM_OBS
612SIM
613XMKMF
614GDBTK_SRC_DIR
615GDBTK_CFLAGS
616GDBTKLIBS
617X_LIBS
618X_LDFLAGS
619X_CFLAGS
620TK_XINCLUDES
621TK_DEPS
622TK_LIBRARY
623TK_INCLUDE
624TK_STUB_LIB_SPEC
625TK_STUB_LIB_FLAG
626TK_STUB_LIB_FILE
627TK_LIB_SPEC
628TK_LIB_FLAG
629TK_LIB_FILE
630TK_SRC_DIR
631TK_BIN_DIR
632TK_VERSION
633TCL_DEPS
634TCL_LIBRARY
635TCL_INCLUDE
636TCL_STUB_LIB_SPEC
637TCL_STUB_LIB_FLAG
638TCL_STUB_LIB_FILE
639TCL_LIB_SPEC
640TCL_LIB_FLAG
641TCL_LIB_FILE
642TCL_SRC_DIR
643TCL_BIN_DIR
644TCL_PATCH_LEVEL
645TCL_VERSION
646WIN32LDAPP
647GUI_CFLAGS_X
648LIBGUI
608e2dbb
TT
649LTLIBLZMA
650LIBLZMA
651HAVE_LIBLZMA
81ecdfbb
RW
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
58bfce93
MM
661LTLIBIPT
662LIBIPT
663HAVE_LIBIPT
4df42755
DE
664HAVE_GUILE_FALSE
665HAVE_GUILE_TRUE
ed3ef339
DE
666GUILE_LIBS
667GUILE_CPPFLAGS
e76c5d17
DE
668GUILD_TARGET_FLAG
669GUILD
ed3ef339 670pkg_config_prog_path
4df42755
DE
671HAVE_PYTHON_FALSE
672HAVE_PYTHON_TRUE
ac534cba
JB
673PYTHON_LIBS
674PYTHON_CPPFLAGS
81ecdfbb 675PYTHON_CFLAGS
ec685c5e 676python_prog_path
81ecdfbb
RW
677LTLIBEXPAT
678LIBEXPAT
679HAVE_LIBEXPAT
b8e0a31c 680JIT_READER_DIR
f997c383 681TARGET_PTR
39037522 682READLINE_TEXI_INCFLAG
81ecdfbb
RW
683READLINE_CFLAGS
684READLINE_DEPS
685READLINE
016a3251
DD
686LTLIBICONV
687LIBICONV
711a72d3
L
688zlibinc
689zlibdir
81ecdfbb
RW
690MIG
691WINDRES
692DLLTOOL
c971b7fa 693AR
81ecdfbb
RW
694YFLAGS
695YACC
c971b7fa 696RANLIB
81ecdfbb 697LN_S
c971b7fa
PA
698INSTALL_DATA
699INSTALL_SCRIPT
700INSTALL_PROGRAM
701AWK
81ecdfbb
RW
702REPORT_BUGS_TEXI
703REPORT_BUGS_TO
704PKGVERSION
b292c783 705HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
706TARGET_OBS
707subdirs
708GDB_DATADIR
709DEBUGDIR
5048e516
JK
710MAKEINFO_EXTRA_FLAGS
711MAKEINFOFLAGS
712MAKEINFO
81ecdfbb
RW
713PACKAGE
714GNULIB_STDINT_H
81ecdfbb
RW
715CATOBJEXT
716GENCAT
717INSTOBJEXT
718DATADIRNAME
719CATALOGS
720POSUB
721GMSGFMT
722XGETTEXT
723INCINTL
724LIBINTL_DEP
725LIBINTL
726USE_NLS
727SET_MAKE
728GMAKE_FALSE
729GMAKE_TRUE
730MAKE
731CCDEPMODE
732DEPDIR
733am__leading_dot
3bc3d82a 734COMPILER
4869db5e
RM
735INSTALL_STRIP_PROGRAM
736STRIP
737install_sh
81ecdfbb
RW
738target_os
739target_vendor
740target_cpu
741target
742host_os
743host_vendor
744host_cpu
745host
746build_os
747build_vendor
748build_cpu
749build
c971b7fa
PA
750EGREP
751GREP
752CPP
3bc3d82a
PA
753ac_ct_CXX
754CXXFLAGS
755CXX
81ecdfbb
RW
756OBJEXT
757EXEEXT
758ac_ct_CC
759CPPFLAGS
760LDFLAGS
761CFLAGS
762CC
763MAINT
764MAINTAINER_MODE_FALSE
765MAINTAINER_MODE_TRUE
766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
a4ce5b0d 804ac_subst_files='host_makefile_frag'
81ecdfbb
RW
805ac_user_opts='
806enable_option_checking
807enable_maintainer_mode
da2f07f1
JK
808enable_plugins
809enable_largefile
3bc3d82a 810enable_build_with_cxx
81ecdfbb
RW
811with_separate_debug_dir
812with_gdb_datadir
813with_relocated_sources
7349ff92 814with_auto_load_dir
bccbefd2 815with_auto_load_safe_path
81ecdfbb
RW
816enable_targets
817enable_64_bit_bfd
818enable_gdbcli
819enable_gdbmi
820enable_tui
821enable_gdbtk
05e7c244 822with_libunwind_ia64
81ecdfbb
RW
823with_curses
824enable_profiling
825with_pkgversion
826with_bugurl
711a72d3 827with_system_zlib
016a3251
DD
828with_gnu_ld
829enable_rpath
81ecdfbb 830with_libiconv_prefix
478aac75 831with_iconv_bin
81ecdfbb 832with_system_readline
b8e0a31c 833with_jit_reader_dir
81ecdfbb 834with_expat
81ecdfbb
RW
835with_libexpat_prefix
836with_python
ed3ef339 837with_guile
a8db4212 838enable_libmcheck
58bfce93
MM
839with_intel_pt
840with_libipt_prefix
81ecdfbb
RW
841with_included_regex
842with_sysroot
843with_system_gdbinit
844enable_werror
845enable_build_warnings
846enable_gdb_build_warnings
608e2dbb
TT
847with_lzma
848with_liblzma_prefix
81ecdfbb
RW
849with_tcl
850with_tk
851with_x
852enable_sim
853enable_multi_ice
496c0e1b 854enable_gdbserver
393fd4c3
YQ
855with_babeltrace
856with_libbabeltrace_prefix
81ecdfbb
RW
857'
858 ac_precious_vars='build_alias
859host_alias
860target_alias
861CC
862CFLAGS
863LDFLAGS
864LIBS
865CPPFLAGS
3bc3d82a
PA
866CXX
867CXXFLAGS
868CCC
81ecdfbb 869CPP
f06e05e0
JK
870MAKEINFO
871MAKEINFOFLAGS
81ecdfbb
RW
872YACC
873YFLAGS
874XMKMF'
5ae98d25 875ac_subdirs_all='testsuite
81ecdfbb
RW
876gdbtk
877multi-ice
878gdbserver'
c906108c
SS
879
880# Initialize some variables set by options.
bec39cab
AC
881ac_init_help=
882ac_init_version=false
81ecdfbb
RW
883ac_unrecognized_opts=
884ac_unrecognized_sep=
c906108c
SS
885# The variables have the same names as the options, with
886# dashes changed to underlines.
bec39cab 887cache_file=/dev/null
c906108c 888exec_prefix=NONE
c906108c 889no_create=
c906108c
SS
890no_recursion=
891prefix=NONE
892program_prefix=NONE
893program_suffix=NONE
894program_transform_name=s,x,x,
895silent=
896site=
897srcdir=
c906108c
SS
898verbose=
899x_includes=NONE
900x_libraries=NONE
bec39cab
AC
901
902# Installation directory options.
903# These are left unexpanded so users can "make install exec_prefix=/foo"
904# and all the variables that are supposed to be based on exec_prefix
905# by default will actually change.
906# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 907# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
908bindir='${exec_prefix}/bin'
909sbindir='${exec_prefix}/sbin'
910libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
911datarootdir='${prefix}/share'
912datadir='${datarootdir}'
c906108c
SS
913sysconfdir='${prefix}/etc'
914sharedstatedir='${prefix}/com'
915localstatedir='${prefix}/var'
c906108c
SS
916includedir='${prefix}/include'
917oldincludedir='/usr/include'
81ecdfbb
RW
918docdir='${datarootdir}/doc/${PACKAGE}'
919infodir='${datarootdir}/info'
920htmldir='${docdir}'
921dvidir='${docdir}'
922pdfdir='${docdir}'
923psdir='${docdir}'
924libdir='${exec_prefix}/lib'
925localedir='${datarootdir}/locale'
926mandir='${datarootdir}/man'
c906108c 927
c906108c 928ac_prev=
81ecdfbb 929ac_dashdash=
c906108c
SS
930for ac_option
931do
c906108c
SS
932 # If the previous option needs an argument, assign it.
933 if test -n "$ac_prev"; then
81ecdfbb 934 eval $ac_prev=\$ac_option
c906108c
SS
935 ac_prev=
936 continue
937 fi
938
81ecdfbb
RW
939 case $ac_option in
940 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
941 *) ac_optarg=yes ;;
942 esac
c906108c
SS
943
944 # Accept the important Cygnus configure options, so we can diagnose typos.
945
81ecdfbb
RW
946 case $ac_dashdash$ac_option in
947 --)
948 ac_dashdash=yes ;;
c906108c
SS
949
950 -bindir | --bindir | --bindi | --bind | --bin | --bi)
951 ac_prev=bindir ;;
952 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 953 bindir=$ac_optarg ;;
c906108c
SS
954
955 -build | --build | --buil | --bui | --bu)
bec39cab 956 ac_prev=build_alias ;;
c906108c 957 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 958 build_alias=$ac_optarg ;;
c906108c
SS
959
960 -cache-file | --cache-file | --cache-fil | --cache-fi \
961 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
962 ac_prev=cache_file ;;
963 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
964 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
965 cache_file=$ac_optarg ;;
966
967 --config-cache | -C)
968 cache_file=config.cache ;;
c906108c 969
81ecdfbb 970 -datadir | --datadir | --datadi | --datad)
c906108c 971 ac_prev=datadir ;;
81ecdfbb 972 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 973 datadir=$ac_optarg ;;
c906108c 974
81ecdfbb
RW
975 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
976 | --dataroo | --dataro | --datar)
977 ac_prev=datarootdir ;;
978 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
979 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
980 datarootdir=$ac_optarg ;;
981
c906108c 982 -disable-* | --disable-*)
81ecdfbb 983 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 984 # Reject names that are not valid shell variable names.
81ecdfbb
RW
985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
986 as_fn_error "invalid feature name: $ac_useropt"
987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=no ;;
997
998 -docdir | --docdir | --docdi | --doc | --do)
999 ac_prev=docdir ;;
1000 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1001 docdir=$ac_optarg ;;
1002
1003 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1004 ac_prev=dvidir ;;
1005 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1006 dvidir=$ac_optarg ;;
c906108c
SS
1007
1008 -enable-* | --enable-*)
81ecdfbb 1009 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1010 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1011 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1012 as_fn_error "invalid feature name: $ac_useropt"
1013 ac_useropt_orig=$ac_useropt
1014 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1015 case $ac_user_opts in
1016 *"
1017"enable_$ac_useropt"
1018"*) ;;
1019 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1020 ac_unrecognized_sep=', ';;
b4e70030 1021 esac
81ecdfbb 1022 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1023
1024 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1025 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1026 | --exec | --exe | --ex)
1027 ac_prev=exec_prefix ;;
1028 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1029 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1030 | --exec=* | --exe=* | --ex=*)
bec39cab 1031 exec_prefix=$ac_optarg ;;
c906108c
SS
1032
1033 -gas | --gas | --ga | --g)
1034 # Obsolete; use --with-gas.
1035 with_gas=yes ;;
1036
bec39cab
AC
1037 -help | --help | --hel | --he | -h)
1038 ac_init_help=long ;;
1039 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1040 ac_init_help=recursive ;;
1041 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1042 ac_init_help=short ;;
c906108c
SS
1043
1044 -host | --host | --hos | --ho)
bec39cab 1045 ac_prev=host_alias ;;
c906108c 1046 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1047 host_alias=$ac_optarg ;;
c906108c 1048
81ecdfbb
RW
1049 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1050 ac_prev=htmldir ;;
1051 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1052 | --ht=*)
1053 htmldir=$ac_optarg ;;
1054
c906108c
SS
1055 -includedir | --includedir | --includedi | --included | --include \
1056 | --includ | --inclu | --incl | --inc)
1057 ac_prev=includedir ;;
1058 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1059 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1060 includedir=$ac_optarg ;;
c906108c
SS
1061
1062 -infodir | --infodir | --infodi | --infod | --info | --inf)
1063 ac_prev=infodir ;;
1064 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1065 infodir=$ac_optarg ;;
c906108c
SS
1066
1067 -libdir | --libdir | --libdi | --libd)
1068 ac_prev=libdir ;;
1069 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1070 libdir=$ac_optarg ;;
c906108c
SS
1071
1072 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1073 | --libexe | --libex | --libe)
1074 ac_prev=libexecdir ;;
1075 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1076 | --libexe=* | --libex=* | --libe=*)
bec39cab 1077 libexecdir=$ac_optarg ;;
c906108c 1078
81ecdfbb
RW
1079 -localedir | --localedir | --localedi | --localed | --locale)
1080 ac_prev=localedir ;;
1081 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1082 localedir=$ac_optarg ;;
1083
c906108c 1084 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1085 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1086 ac_prev=localstatedir ;;
1087 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1088 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1089 localstatedir=$ac_optarg ;;
c906108c
SS
1090
1091 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1092 ac_prev=mandir ;;
1093 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1094 mandir=$ac_optarg ;;
c906108c
SS
1095
1096 -nfp | --nfp | --nf)
1097 # Obsolete; use --without-fp.
1098 with_fp=no ;;
1099
1100 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1101 | --no-cr | --no-c | -n)
c906108c
SS
1102 no_create=yes ;;
1103
1104 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1105 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1106 no_recursion=yes ;;
1107
1108 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1109 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1110 | --oldin | --oldi | --old | --ol | --o)
1111 ac_prev=oldincludedir ;;
1112 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1113 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1114 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1115 oldincludedir=$ac_optarg ;;
c906108c
SS
1116
1117 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1118 ac_prev=prefix ;;
1119 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1120 prefix=$ac_optarg ;;
c906108c
SS
1121
1122 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1123 | --program-pre | --program-pr | --program-p)
1124 ac_prev=program_prefix ;;
1125 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1126 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1127 program_prefix=$ac_optarg ;;
c906108c
SS
1128
1129 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1130 | --program-suf | --program-su | --program-s)
1131 ac_prev=program_suffix ;;
1132 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1133 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1134 program_suffix=$ac_optarg ;;
c906108c
SS
1135
1136 -program-transform-name | --program-transform-name \
1137 | --program-transform-nam | --program-transform-na \
1138 | --program-transform-n | --program-transform- \
1139 | --program-transform | --program-transfor \
1140 | --program-transfo | --program-transf \
1141 | --program-trans | --program-tran \
1142 | --progr-tra | --program-tr | --program-t)
1143 ac_prev=program_transform_name ;;
1144 -program-transform-name=* | --program-transform-name=* \
1145 | --program-transform-nam=* | --program-transform-na=* \
1146 | --program-transform-n=* | --program-transform-=* \
1147 | --program-transform=* | --program-transfor=* \
1148 | --program-transfo=* | --program-transf=* \
1149 | --program-trans=* | --program-tran=* \
1150 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1151 program_transform_name=$ac_optarg ;;
c906108c 1152
81ecdfbb
RW
1153 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1154 ac_prev=pdfdir ;;
1155 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1156 pdfdir=$ac_optarg ;;
1157
1158 -psdir | --psdir | --psdi | --psd | --ps)
1159 ac_prev=psdir ;;
1160 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1161 psdir=$ac_optarg ;;
1162
c906108c
SS
1163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1164 | -silent | --silent | --silen | --sile | --sil)
1165 silent=yes ;;
1166
1167 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1168 ac_prev=sbindir ;;
1169 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1170 | --sbi=* | --sb=*)
bec39cab 1171 sbindir=$ac_optarg ;;
c906108c
SS
1172
1173 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1174 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1175 | --sharedst | --shareds | --shared | --share | --shar \
1176 | --sha | --sh)
1177 ac_prev=sharedstatedir ;;
1178 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1179 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1180 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1181 | --sha=* | --sh=*)
bec39cab 1182 sharedstatedir=$ac_optarg ;;
c906108c
SS
1183
1184 -site | --site | --sit)
1185 ac_prev=site ;;
1186 -site=* | --site=* | --sit=*)
bec39cab 1187 site=$ac_optarg ;;
3ace7edb 1188
c906108c
SS
1189 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1190 ac_prev=srcdir ;;
1191 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1192 srcdir=$ac_optarg ;;
c906108c
SS
1193
1194 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1195 | --syscon | --sysco | --sysc | --sys | --sy)
1196 ac_prev=sysconfdir ;;
1197 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1198 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1199 sysconfdir=$ac_optarg ;;
c906108c
SS
1200
1201 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1202 ac_prev=target_alias ;;
c906108c 1203 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1204 target_alias=$ac_optarg ;;
c906108c
SS
1205
1206 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1207 verbose=yes ;;
1208
bec39cab
AC
1209 -version | --version | --versio | --versi | --vers | -V)
1210 ac_init_version=: ;;
c906108c
SS
1211
1212 -with-* | --with-*)
81ecdfbb 1213 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1214 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1216 as_fn_error "invalid package name: $ac_useropt"
1217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
b4e70030 1225 esac
81ecdfbb 1226 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1227
1228 -without-* | --without-*)
81ecdfbb 1229 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1230 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1231 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1232 as_fn_error "invalid package name: $ac_useropt"
1233 ac_useropt_orig=$ac_useropt
1234 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1235 case $ac_user_opts in
1236 *"
1237"with_$ac_useropt"
1238"*) ;;
1239 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1240 ac_unrecognized_sep=', ';;
1241 esac
1242 eval with_$ac_useropt=no ;;
c906108c
SS
1243
1244 --x)
1245 # Obsolete; use --with-x.
1246 with_x=yes ;;
1247
1248 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1249 | --x-incl | --x-inc | --x-in | --x-i)
1250 ac_prev=x_includes ;;
1251 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1252 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1253 x_includes=$ac_optarg ;;
c906108c
SS
1254
1255 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1256 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1257 ac_prev=x_libraries ;;
1258 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1259 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1260 x_libraries=$ac_optarg ;;
c906108c 1261
81ecdfbb
RW
1262 -*) as_fn_error "unrecognized option: \`$ac_option'
1263Try \`$0 --help' for more information."
c906108c
SS
1264 ;;
1265
bec39cab
AC
1266 *=*)
1267 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1268 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1269 case $ac_envvar in #(
1270 '' | [0-9]* | *[!_$as_cr_alnum]* )
1271 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1272 esac
1273 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1274 export $ac_envvar ;;
1275
c906108c 1276 *)
bec39cab 1277 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1278 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1279 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1280 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1281 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1282 ;;
1283
1284 esac
1285done
1286
1287if test -n "$ac_prev"; then
bec39cab 1288 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1289 as_fn_error "missing argument to $ac_option"
c906108c 1290fi
c906108c 1291
81ecdfbb
RW
1292if test -n "$ac_unrecognized_opts"; then
1293 case $enable_option_checking in
1294 no) ;;
1295 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1296 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1297 esac
81ecdfbb 1298fi
b4e70030 1299
81ecdfbb
RW
1300# Check all directory arguments for consistency.
1301for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1302 datadir sysconfdir sharedstatedir localstatedir includedir \
1303 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1304 libdir localedir mandir
b4e70030 1305do
81ecdfbb
RW
1306 eval ac_val=\$$ac_var
1307 # Remove trailing slashes.
1308 case $ac_val in
1309 */ )
1310 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1311 eval $ac_var=\$ac_val;;
1312 esac
1313 # Be sure to have absolute directory names.
b4e70030 1314 case $ac_val in
81ecdfbb
RW
1315 [\\/$]* | ?:[\\/]* ) continue;;
1316 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1317 esac
81ecdfbb 1318 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1319done
1320
bec39cab
AC
1321# There might be people who depend on the old broken behavior: `$host'
1322# used to hold the argument of --host etc.
1323# FIXME: To remove some day.
1324build=$build_alias
1325host=$host_alias
1326target=$target_alias
1327
1328# FIXME: To remove some day.
1329if test "x$host_alias" != x; then
1330 if test "x$build_alias" = x; then
1331 cross_compiling=maybe
81ecdfbb 1332 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1333 If a cross compiler is detected then cross compile mode will be used." >&2
1334 elif test "x$build_alias" != "x$host_alias"; then
1335 cross_compiling=yes
1336 fi
1337fi
c906108c 1338
bec39cab
AC
1339ac_tool_prefix=
1340test -n "$host_alias" && ac_tool_prefix=$host_alias-
1341
1342test "$silent" = yes && exec 6>/dev/null
c906108c 1343
c906108c 1344
81ecdfbb
RW
1345ac_pwd=`pwd` && test -n "$ac_pwd" &&
1346ac_ls_di=`ls -di .` &&
1347ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1348 as_fn_error "working directory cannot be determined"
1349test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1350 as_fn_error "pwd does not report name of working directory"
1351
1352
c906108c
SS
1353# Find the source files, if location was not specified.
1354if test -z "$srcdir"; then
1355 ac_srcdir_defaulted=yes
81ecdfbb
RW
1356 # Try the directory containing this script, then the parent directory.
1357 ac_confdir=`$as_dirname -- "$as_myself" ||
1358$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1359 X"$as_myself" : 'X\(//\)[^/]' \| \
1360 X"$as_myself" : 'X\(//\)$' \| \
1361 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1362$as_echo X"$as_myself" |
1363 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\/\)[^/].*/{
1368 s//\1/
1369 q
1370 }
1371 /^X\(\/\/\)$/{
1372 s//\1/
1373 q
1374 }
1375 /^X\(\/\).*/{
1376 s//\1/
1377 q
1378 }
1379 s/.*/./; q'`
c906108c 1380 srcdir=$ac_confdir
81ecdfbb 1381 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1382 srcdir=..
1383 fi
1384else
1385 ac_srcdir_defaulted=no
1386fi
81ecdfbb
RW
1387if test ! -r "$srcdir/$ac_unique_file"; then
1388 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1389 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1390fi
1391ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1392ac_abs_confdir=`(
1393 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1394 pwd)`
1395# When building in place, set srcdir=.
1396if test "$ac_abs_confdir" = "$ac_pwd"; then
1397 srcdir=.
1398fi
1399# Remove unnecessary trailing slashes from srcdir.
1400# Double slashes in file names in object file debugging info
1401# mess up M-x gdb in Emacs.
1402case $srcdir in
1403*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1404esac
1405for ac_var in $ac_precious_vars; do
1406 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1407 eval ac_env_${ac_var}_value=\$${ac_var}
1408 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1409 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1410done
c906108c 1411
bec39cab
AC
1412#
1413# Report the --help message.
1414#
1415if test "$ac_init_help" = "long"; then
1416 # Omit some internal or obsolete options to make the list less imposing.
1417 # This message is too long to be a string in the A/UX 3.1 sh.
1418 cat <<_ACEOF
1419\`configure' configures this package to adapt to many kinds of systems.
1420
1421Usage: $0 [OPTION]... [VAR=VALUE]...
1422
1423To assign environment variables (e.g., CC, CFLAGS...), specify them as
1424VAR=VALUE. See below for descriptions of some of the useful variables.
1425
1426Defaults for the options are specified in brackets.
1427
1428Configuration:
1429 -h, --help display this help and exit
1430 --help=short display options specific to this package
1431 --help=recursive display the short help of all the included packages
1432 -V, --version display version information and exit
1433 -q, --quiet, --silent do not print \`checking...' messages
1434 --cache-file=FILE cache test results in FILE [disabled]
1435 -C, --config-cache alias for \`--cache-file=config.cache'
1436 -n, --no-create do not create output files
1437 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1438
bec39cab
AC
1439Installation directories:
1440 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1441 [$ac_default_prefix]
bec39cab 1442 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1443 [PREFIX]
bec39cab
AC
1444
1445By default, \`make install' will install all the files in
1446\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1447an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1448for instance \`--prefix=\$HOME'.
1449
1450For better control, use the options below.
1451
1452Fine tuning of the installation directories:
81ecdfbb
RW
1453 --bindir=DIR user executables [EPREFIX/bin]
1454 --sbindir=DIR system admin executables [EPREFIX/sbin]
1455 --libexecdir=DIR program executables [EPREFIX/libexec]
1456 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1457 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1458 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1459 --libdir=DIR object code libraries [EPREFIX/lib]
1460 --includedir=DIR C header files [PREFIX/include]
1461 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1462 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1463 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1464 --infodir=DIR info documentation [DATAROOTDIR/info]
1465 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1466 --mandir=DIR man documentation [DATAROOTDIR/man]
1467 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1468 --htmldir=DIR html documentation [DOCDIR]
1469 --dvidir=DIR dvi documentation [DOCDIR]
1470 --pdfdir=DIR pdf documentation [DOCDIR]
1471 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1472_ACEOF
1473
1474 cat <<\_ACEOF
1475
9009e1ae
MR
1476Program names:
1477 --program-prefix=PREFIX prepend PREFIX to installed program names
1478 --program-suffix=SUFFIX append SUFFIX to installed program names
1479 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1480
bec39cab
AC
1481X features:
1482 --x-includes=DIR X include files are in DIR
1483 --x-libraries=DIR X library files are in DIR
1484
1485System types:
1486 --build=BUILD configure for building on BUILD [guessed]
1487 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1488 --target=TARGET configure for building compilers for TARGET [HOST]
1489_ACEOF
1490fi
1491
1492if test -n "$ac_init_help"; then
1493
1494 cat <<\_ACEOF
1495
1496Optional Features:
81ecdfbb 1497 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1498 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1499 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1500 --enable-maintainer-mode enable make rules and dependencies not useful
1501 (and sometimes confusing) to the casual installer
2974be62 1502 --enable-plugins Enable support for plugins
da2f07f1 1503 --disable-largefile omit support for large files
3bc3d82a 1504 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1505 --enable-targets=TARGETS
1506 alternative target configurations
c0993dbe 1507 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1508 --disable-gdbcli disable command-line interface (CLI)
1509 --disable-gdbmi disable machine-interface (MI)
1510 --enable-tui enable full-screen terminal user interface (TUI)
1511 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1512 --enable-profiling enable profiling of GDB
3841debe 1513 --disable-rpath do not hardcode runtime library paths
17ef446e 1514 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1515 --enable-werror treat compile warnings as errors
32c1c914 1516 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1517 --enable-gdb-build-warnings
32c1c914 1518 enable GDB specific build-time compiler warnings if
a1220294 1519 gcc is used
32c1c914 1520 --enable-sim link gdb with simulator
bec39cab 1521 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1522 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1523 is auto)
bec39cab
AC
1524
1525Optional Packages:
1526 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1527 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1528 --with-separate-debug-dir=PATH
32c1c914 1529 look for global separate debug info in this path
62e4f60c 1530 [LIBDIR/debug]
b14b1491
TT
1531 --with-gdb-datadir=PATH look for global separate data files in this path
1532 [DATADIR/gdb]
29b0e8a2 1533 --with-relocated-sources=PATH
32c1c914 1534 automatically relocate this path for source files
7349ff92 1535 --with-auto-load-dir=PATH
aff139ff 1536 directories from which to load auto-loaded scripts
1564a261 1537 [$debugdir:$datadir/auto-load]
bccbefd2 1538 --with-auto-load-safe-path=PATH
aff139ff 1539 directories safe to hold auto-loaded files
7349ff92 1540 [--with-auto-load-dir]
bccbefd2
JK
1541 --without-auto-load-safe-path
1542 do not restrict auto-loaded files locations
05e7c244 1543 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1544 --with-curses use the curses library instead of the termcap
1545 library
c16158bc
JM
1546 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1547 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1548 --with-system-zlib use installed libz
016a3251
DD
1549 --with-gnu-ld assume the C compiler uses GNU ld default=no
1550 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1551 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1552 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1553 --with-system-readline use installed readline library
b8e0a31c
SD
1554 --with-jit-reader-dir=PATH
1555 directory to load the JIT readers from
5c39566f 1556 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1557 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1558 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1559 --with-python[=PYTHON] include python support
1560 (auto/yes/no/<python-program>)
ed3ef339
DE
1561 --with-guile[=GUILE] include guile support
1562 (auto/yes/no/<guile-version>/<pkg-config-program>)
5599c404
MM
1563 --with-intel-pt include Intel(R) Processor Trace support
1564 (auto/yes/no)
58bfce93
MM
1565 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1566 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1567 --without-included-regex
1568 don't use included regex; this is the default on
1569 systems with version 2 of the GNU C library (use
1570 with caution on other system)
81ecdfbb 1571 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1572 --with-system-gdbinit=PATH
32c1c914 1573 automatically load a system-wide gdbinit file
608e2dbb
TT
1574 --with-lzma support lzma compression (auto/yes/no)
1575 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1576 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1577 --with-tcl directory containing tcl configuration (tclConfig.sh)
1578 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1579 --with-x use the X Window System
393fd4c3
YQ
1580 --with-babeltrace include babeltrace support (auto/yes/no)
1581 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1582 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1583
1584Some influential environment variables:
1585 CC C compiler command
1586 CFLAGS C compiler flags
1587 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1588 nonstandard directory <lib dir>
81ecdfbb
RW
1589 LIBS libraries to pass to the linker, e.g. -l<library>
1590 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1591 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1592 CXX C++ compiler command
1593 CXXFLAGS C++ compiler flags
bec39cab 1594 CPP C preprocessor
f06e05e0
JK
1595 MAKEINFO Parent configure detects if it is of sufficient version.
1596 MAKEINFOFLAGS
1597 Parameters for MAKEINFO.
81ecdfbb
RW
1598 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1599 the first program found out of: `bison -y', `byacc', `yacc'.
1600 YFLAGS The list of arguments that will be passed by default to $YACC.
1601 This script will default YFLAGS to the empty string to avoid a
1602 default value of `-d' given by some make applications.
1603 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1604
1605Use these variables to override the choices made by `configure' or to help
1606it to find libraries and programs with nonstandard names/locations.
1607
81ecdfbb 1608Report bugs to the package provider.
bec39cab 1609_ACEOF
81ecdfbb 1610ac_status=$?
bec39cab
AC
1611fi
1612
1613if test "$ac_init_help" = "recursive"; then
1614 # If there are subdirs, report their specific --help.
bec39cab 1615 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1616 test -d "$ac_dir" ||
1617 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1618 continue
bec39cab
AC
1619 ac_builddir=.
1620
81ecdfbb
RW
1621case "$ac_dir" in
1622.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1623*)
1624 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1625 # A ".." for each directory in $ac_dir_suffix.
1626 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1627 case $ac_top_builddir_sub in
1628 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1629 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1630 esac ;;
1631esac
1632ac_abs_top_builddir=$ac_pwd
1633ac_abs_builddir=$ac_pwd$ac_dir_suffix
1634# for backward compatibility:
1635ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1636
1637case $srcdir in
81ecdfbb 1638 .) # We are building in place.
bec39cab 1639 ac_srcdir=.
81ecdfbb
RW
1640 ac_top_srcdir=$ac_top_builddir_sub
1641 ac_abs_top_srcdir=$ac_pwd ;;
1642 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1643 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1644 ac_top_srcdir=$srcdir
1645 ac_abs_top_srcdir=$srcdir ;;
1646 *) # Relative name.
1647 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1648 ac_top_srcdir=$ac_top_build_prefix$srcdir
1649 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1650esac
81ecdfbb 1651ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1652
81ecdfbb
RW
1653 cd "$ac_dir" || { ac_status=$?; continue; }
1654 # Check for guested configure.
1655 if test -f "$ac_srcdir/configure.gnu"; then
1656 echo &&
1657 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1658 elif test -f "$ac_srcdir/configure"; then
1659 echo &&
1660 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1661 else
81ecdfbb
RW
1662 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1663 fi || ac_status=$?
1664 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1665 done
1666fi
1667
81ecdfbb 1668test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1669if $ac_init_version; then
1670 cat <<\_ACEOF
81ecdfbb
RW
1671configure
1672generated by GNU Autoconf 2.64
bec39cab 1673
81ecdfbb 1674Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1675This configure script is free software; the Free Software Foundation
1676gives unlimited permission to copy, distribute and modify it.
1677_ACEOF
81ecdfbb 1678 exit
bec39cab 1679fi
bec39cab 1680
81ecdfbb
RW
1681## ------------------------ ##
1682## Autoconf initialization. ##
1683## ------------------------ ##
bec39cab 1684
81ecdfbb
RW
1685# ac_fn_c_try_compile LINENO
1686# --------------------------
1687# Try to compile conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_compile ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 rm -f conftest.$ac_objext
1692 if { { ac_try="$ac_compile"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_compile") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } && {
1708 test -z "$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 } && test -s conftest.$ac_objext; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1715
81ecdfbb
RW
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1719 return $ac_retval
1720
1721} # ac_fn_c_try_compile
1722
3bc3d82a
PA
1723# ac_fn_cxx_try_compile LINENO
1724# ----------------------------
1725# Try to compile conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_cxx_try_compile ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext
1730 if { { ac_try="$ac_compile"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_compile") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_cxx_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest.$ac_objext; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=1
1755fi
1756 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1757 return $ac_retval
1758
1759} # ac_fn_cxx_try_compile
1760
81ecdfbb
RW
1761# ac_fn_c_try_cpp LINENO
1762# ----------------------
1763# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1764ac_fn_c_try_cpp ()
bec39cab 1765{
81ecdfbb
RW
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767 if { { ac_try="$ac_cpp conftest.$ac_ext"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } >/dev/null && {
1783 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 }; then :
1786 ac_retval=0
1787else
1788 $as_echo "$as_me: failed program was:" >&5
1789sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1790
81ecdfbb
RW
1791 ac_retval=1
1792fi
1793 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1794 return $ac_retval
bec39cab 1795
81ecdfbb 1796} # ac_fn_c_try_cpp
bec39cab 1797
81ecdfbb
RW
1798# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1799# -------------------------------------------------------
1800# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1801# the include files in INCLUDES and setting the cache variable VAR
1802# accordingly.
1803ac_fn_c_check_header_mongrel ()
1804{
1805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1806 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1808$as_echo_n "checking for $2... " >&6; }
1809if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1810 $as_echo_n "(cached) " >&6
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
1815else
1816 # Is the header compilable?
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1818$as_echo_n "checking $2 usability... " >&6; }
1819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822#include <$2>
1823_ACEOF
1824if ac_fn_c_try_compile "$LINENO"; then :
1825 ac_header_compiler=yes
1826else
1827 ac_header_compiler=no
1828fi
1829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1831$as_echo "$ac_header_compiler" >&6; }
bec39cab 1832
81ecdfbb
RW
1833# Is the header present?
1834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1835$as_echo_n "checking $2 presence... " >&6; }
1836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838#include <$2>
1839_ACEOF
1840if ac_fn_c_try_cpp "$LINENO"; then :
1841 ac_header_preproc=yes
1842else
1843 ac_header_preproc=no
1844fi
1845rm -f conftest.err conftest.$ac_ext
1846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1847$as_echo "$ac_header_preproc" >&6; }
bec39cab 1848
81ecdfbb
RW
1849# So? What about this header?
1850case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1851 yes:no: )
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1853$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1855$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1856 ;;
1857 no:yes:* )
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1859$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1861$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1863$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1865$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868 ;;
1869esac
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871$as_echo_n "checking for $2... " >&6; }
1872if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1873 $as_echo_n "(cached) " >&6
1874else
1875 eval "$3=\$ac_header_compiler"
1876fi
1877eval ac_res=\$$3
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1879$as_echo "$ac_res" >&6; }
1880fi
1881 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1882
81ecdfbb 1883} # ac_fn_c_check_header_mongrel
bec39cab 1884
81ecdfbb
RW
1885# ac_fn_c_try_run LINENO
1886# ----------------------
1887# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1888# that executables *can* be run.
1889ac_fn_c_try_run ()
1890{
1891 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892 if { { ac_try="$ac_link"
1893case "(($ac_try" in
1894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1895 *) ac_try_echo=$ac_try;;
1896esac
1897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1898$as_echo "$ac_try_echo"; } >&5
1899 (eval "$ac_link") 2>&5
1900 ac_status=$?
1901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1902 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1903 { { case "(($ac_try" in
1904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905 *) ac_try_echo=$ac_try;;
1906esac
1907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908$as_echo "$ac_try_echo"; } >&5
1909 (eval "$ac_try") 2>&5
1910 ac_status=$?
1911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912 test $ac_status = 0; }; }; then :
1913 ac_retval=0
1914else
1915 $as_echo "$as_me: program exited with status $ac_status" >&5
1916 $as_echo "$as_me: failed program was:" >&5
1917sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1918
81ecdfbb
RW
1919 ac_retval=$ac_status
1920fi
1921 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1922 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1923 return $ac_retval
bec39cab 1924
81ecdfbb 1925} # ac_fn_c_try_run
bec39cab 1926
81ecdfbb
RW
1927# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1928# -------------------------------------------------------
1929# Tests whether HEADER exists and can be compiled using the include files in
1930# INCLUDES, setting the cache variable VAR accordingly.
1931ac_fn_c_check_header_compile ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1935$as_echo_n "checking for $2... " >&6; }
1936if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1937 $as_echo_n "(cached) " >&6
1938else
1939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1940/* end confdefs.h. */
1941$4
1942#include <$2>
bec39cab 1943_ACEOF
81ecdfbb
RW
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 eval "$3=yes"
1946else
1947 eval "$3=no"
1948fi
1949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1950fi
1951eval ac_res=\$$3
1952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1953$as_echo "$ac_res" >&6; }
1954 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1955
81ecdfbb 1956} # ac_fn_c_check_header_compile
bec39cab 1957
2974be62
AM
1958# ac_fn_c_try_link LINENO
1959# -----------------------
1960# Try to link conftest.$ac_ext, and return whether this succeeded.
1961ac_fn_c_try_link ()
1962{
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964 rm -f conftest.$ac_objext conftest$ac_exeext
1965 if { { ac_try="$ac_link"
1966case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969esac
1970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971$as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_link") 2>conftest.err
1973 ac_status=$?
1974 if test -s conftest.err; then
1975 grep -v '^ *+' conftest.err >conftest.er1
1976 cat conftest.er1 >&5
1977 mv -f conftest.er1 conftest.err
1978 fi
1979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1980 test $ac_status = 0; } && {
1981 test -z "$ac_c_werror_flag" ||
1982 test ! -s conftest.err
1983 } && test -s conftest$ac_exeext && {
1984 test "$cross_compiling" = yes ||
1985 $as_test_x conftest$ac_exeext
1986 }; then :
1987 ac_retval=0
1988else
1989 $as_echo "$as_me: failed program was:" >&5
1990sed 's/^/| /' conftest.$ac_ext >&5
1991
1992 ac_retval=1
1993fi
1994 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1995 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1996 # interfere with the next link command; also delete a directory that is
1997 # left behind by Apple's compiler. We do this before executing the actions.
1998 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1999 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2000 return $ac_retval
2001
2002} # ac_fn_c_try_link
2003
81ecdfbb
RW
2004# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2005# --------------------------------------------
2006# Tries to find the compile-time value of EXPR in a program that includes
2007# INCLUDES, setting VAR accordingly. Returns whether the value could be
2008# computed
2009ac_fn_c_compute_int ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 if test "$cross_compiling" = yes; then
2013 # Depending upon the size, compute the lo and hi bounds.
2014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) >= 0)];
2021test_array [0] = 0
bec39cab 2022
81ecdfbb
RW
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_lo=0 ac_mid=0
2029 while :; do
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2037test_array [0] = 0
bec39cab 2038
81ecdfbb
RW
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044 ac_hi=$ac_mid; break
2045else
2046 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2047 if test $ac_lo -le $ac_mid; then
2048 ac_lo= ac_hi=
2049 break
2050 fi
2051 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2052fi
81ecdfbb
RW
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054 done
c906108c 2055else
81ecdfbb
RW
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) < 0)];
2063test_array [0] = 0
bec39cab 2064
81ecdfbb
RW
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_hi=-1 ac_mid=-1
2071 while :; do
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2079test_array [0] = 0
bec39cab 2080
81ecdfbb
RW
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_lo=$ac_mid; break
2087else
2088 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2089 if test $ac_mid -le $ac_hi; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 ac_lo= ac_hi=
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103# Binary search between lo and hi bounds.
2104while test "x$ac_lo" != "x$ac_hi"; do
2105 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2113test_array [0] = 0
bec39cab 2114
81ecdfbb
RW
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_hi=$ac_mid
2121else
2122 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125done
2126case $ac_lo in #((
2127?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2128'') ac_retval=1 ;;
2129esac
2130 else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134static long int longval () { return $2; }
2135static unsigned long int ulongval () { return $2; }
2136#include <stdio.h>
2137#include <stdlib.h>
2138int
2139main ()
2140{
bec39cab 2141
81ecdfbb
RW
2142 FILE *f = fopen ("conftest.val", "w");
2143 if (! f)
2144 return 1;
2145 if (($2) < 0)
2146 {
2147 long int i = longval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%ld", i);
2151 }
2152 else
2153 {
2154 unsigned long int i = ulongval ();
2155 if (i != ($2))
2156 return 1;
2157 fprintf (f, "%lu", i);
2158 }
2159 /* Do not output a trailing newline, as this causes \r\n confusion
2160 on some platforms. */
2161 return ferror (f) || fclose (f) != 0;
bec39cab 2162
81ecdfbb
RW
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_run "$LINENO"; then :
2168 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2169else
2170 ac_retval=1
2171fi
2172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2173 conftest.$ac_objext conftest.beam conftest.$ac_ext
2174rm -f conftest.val
bec39cab 2175
81ecdfbb
RW
2176 fi
2177 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2178 return $ac_retval
bec39cab 2179
81ecdfbb 2180} # ac_fn_c_compute_int
bec39cab 2181
55a8c076
YQ
2182# ac_fn_c_check_func LINENO FUNC VAR
2183# ----------------------------------
2184# Tests whether FUNC exists, setting the cache variable VAR accordingly
2185ac_fn_c_check_func ()
81ecdfbb
RW
2186{
2187 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2189$as_echo_n "checking for $2... " >&6; }
2190if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2191 $as_echo_n "(cached) " >&6
2192else
81ecdfbb
RW
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
55a8c076
YQ
2195/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2196 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2197#define $2 innocuous_$2
2198
2199/* System header to define __stub macros and hopefully few prototypes,
2200 which can conflict with char $2 (); below.
2201 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2202 <limits.h> exists even on freestanding compilers. */
2203
2204#ifdef __STDC__
2205# include <limits.h>
2206#else
2207# include <assert.h>
2208#endif
2209
2210#undef $2
2211
2212/* Override any GCC internal prototype to avoid an error.
2213 Use char because int might match the return type of a GCC
2214 builtin and then its argument prototype would still apply. */
2215#ifdef __cplusplus
2216extern "C"
2217#endif
2218char $2 ();
2219/* The GNU C library defines this for functions which it implements
2220 to always fail with ENOSYS. Some functions are actually named
2221 something starting with __ and the normal name is an alias. */
2222#if defined __stub_$2 || defined __stub___$2
2223choke me
2224#endif
2225
2226int
2227main ()
2228{
2229return $2 ();
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_link "$LINENO"; then :
2235 eval "$3=yes"
2236else
2237 eval "$3=no"
2238fi
2239rm -f core conftest.err conftest.$ac_objext \
2240 conftest$ac_exeext conftest.$ac_ext
2241fi
2242eval ac_res=\$$3
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244$as_echo "$ac_res" >&6; }
2245 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2246
2247} # ac_fn_c_check_func
2248
07697489
PA
2249# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2250# -------------------------------------------
2251# Tests whether TYPE exists after having included INCLUDES, setting cache
2252# variable VAR accordingly.
2253ac_fn_c_check_type ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257$as_echo_n "checking for $2... " >&6; }
2258if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2259 $as_echo_n "(cached) " >&6
2260else
2261 eval "$3=no"
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268if (sizeof ($2))
2269 return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$4
2278int
2279main ()
2280{
2281if (sizeof (($2)))
2282 return 0;
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
2288
2289else
2290 eval "$3=yes"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296eval ac_res=\$$3
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
2299 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2300
2301} # ac_fn_c_check_type
2302
770d76d7
PA
2303# ac_fn_c_check_decl LINENO SYMBOL VAR
2304# ------------------------------------
2305# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2306ac_fn_c_check_decl ()
2307{
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309 as_decl_name=`echo $2|sed 's/ *(.*//'`
2310 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2312$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2313if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$4
2319int
2320main ()
2321{
2322#ifndef $as_decl_name
2323#ifdef __cplusplus
2324 (void) $as_decl_use;
2325#else
2326 (void) $as_decl_name;
2327#endif
2328#endif
2329
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 eval "$3=yes"
2336else
2337 eval "$3=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$3
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
2344 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2345
2346} # ac_fn_c_check_decl
2347
55a8c076
YQ
2348# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2349# ----------------------------------------------------
2350# Tries to find if the field MEMBER exists in type AGGR, after including
2351# INCLUDES, setting cache variable VAR accordingly.
2352ac_fn_c_check_member ()
2353{
2354 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2356$as_echo_n "checking for $2.$3... " >&6; }
2357if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2358 $as_echo_n "(cached) " >&6
2359else
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h. */
2362$5
2363int
2364main ()
2365{
2366static $2 ac_aggr;
2367if (ac_aggr.$3)
2368return 0;
2369 ;
2370 return 0;
2371}
2372_ACEOF
2373if ac_fn_c_try_compile "$LINENO"; then :
2374 eval "$4=yes"
2375else
2376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377/* end confdefs.h. */
2378$5
2379int
2380main ()
2381{
2382static $2 ac_aggr;
2383if (sizeof ac_aggr.$3)
2384return 0;
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389if ac_fn_c_try_compile "$LINENO"; then :
2390 eval "$4=yes"
2391else
2392 eval "$4=no"
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2397fi
2398eval ac_res=\$$4
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2400$as_echo "$ac_res" >&6; }
2401 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2402
2403} # ac_fn_c_check_member
54019719
PA
2404
2405# ac_fn_cxx_check_decl LINENO SYMBOL VAR
2406# --------------------------------------
2407# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2408ac_fn_cxx_check_decl ()
2409{
2410 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411 as_decl_name=`echo $2|sed 's/ *(.*//'`
2412 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2414$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2415if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2416 $as_echo_n "(cached) " >&6
2417else
2418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2419/* end confdefs.h. */
2420$4
2421int
2422main ()
2423{
2424#ifndef $as_decl_name
2425#ifdef __cplusplus
2426 (void) $as_decl_use;
2427#else
2428 (void) $as_decl_name;
2429#endif
2430#endif
2431
2432 ;
2433 return 0;
2434}
2435_ACEOF
2436if ac_fn_cxx_try_compile "$LINENO"; then :
2437 eval "$3=yes"
2438else
2439 eval "$3=no"
2440fi
2441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2442fi
2443eval ac_res=\$$3
2444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2445$as_echo "$ac_res" >&6; }
2446 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2447
2448} # ac_fn_cxx_check_decl
81ecdfbb
RW
2449cat >config.log <<_ACEOF
2450This file contains any messages produced by compilers while
2451running configure, to aid debugging if configure makes a mistake.
d5af19ba 2452
81ecdfbb
RW
2453It was created by $as_me, which was
2454generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2455
81ecdfbb 2456 $ $0 $@
413ccac7 2457
81ecdfbb
RW
2458_ACEOF
2459exec 5>>config.log
2460{
2461cat <<_ASUNAME
2462## --------- ##
2463## Platform. ##
2464## --------- ##
413ccac7 2465
81ecdfbb
RW
2466hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2467uname -m = `(uname -m) 2>/dev/null || echo unknown`
2468uname -r = `(uname -r) 2>/dev/null || echo unknown`
2469uname -s = `(uname -s) 2>/dev/null || echo unknown`
2470uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2471
81ecdfbb
RW
2472/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2473/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2474
81ecdfbb
RW
2475/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2476/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2477/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2478/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2479/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2480/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2481/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2482
81ecdfbb 2483_ASUNAME
bec39cab 2484
bec39cab
AC
2485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486for as_dir in $PATH
2487do
2488 IFS=$as_save_IFS
2489 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2490 $as_echo "PATH: $as_dir"
2491 done
2492IFS=$as_save_IFS
bec39cab 2493
81ecdfbb 2494} >&5
bec39cab 2495
81ecdfbb 2496cat >&5 <<_ACEOF
bec39cab 2497
bec39cab 2498
81ecdfbb
RW
2499## ----------- ##
2500## Core tests. ##
2501## ----------- ##
2502
2503_ACEOF
2504
2505
2506# Keep a trace of the command line.
2507# Strip out --no-create and --no-recursion so they do not pile up.
2508# Strip out --silent because we don't want to record it for future runs.
2509# Also quote any args containing shell meta-characters.
2510# Make two passes to allow for proper duplicate-argument suppression.
2511ac_configure_args=
2512ac_configure_args0=
2513ac_configure_args1=
2514ac_must_keep_next=false
2515for ac_pass in 1 2
2516do
2517 for ac_arg
2518 do
2519 case $ac_arg in
2520 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2521 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2522 | -silent | --silent | --silen | --sile | --sil)
2523 continue ;;
2524 *\'*)
2525 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2526 esac
2527 case $ac_pass in
2528 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2529 2)
2530 as_fn_append ac_configure_args1 " '$ac_arg'"
2531 if test $ac_must_keep_next = true; then
2532 ac_must_keep_next=false # Got value, back to normal.
2533 else
2534 case $ac_arg in
2535 *=* | --config-cache | -C | -disable-* | --disable-* \
2536 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2537 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2538 | -with-* | --with-* | -without-* | --without-* | --x)
2539 case "$ac_configure_args0 " in
2540 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2541 esac
2542 ;;
2543 -* ) ac_must_keep_next=true ;;
2544 esac
2545 fi
2546 as_fn_append ac_configure_args " '$ac_arg'"
2547 ;;
2548 esac
2549 done
2550done
2551{ ac_configure_args0=; unset ac_configure_args0;}
2552{ ac_configure_args1=; unset ac_configure_args1;}
2553
2554# When interrupted or exit'd, cleanup temporary files, and complete
2555# config.log. We remove comments because anyway the quotes in there
2556# would cause problems or look ugly.
2557# WARNING: Use '\'' to represent an apostrophe within the trap.
2558# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2559trap 'exit_status=$?
2560 # Save into config.log some information that might help in debugging.
2561 {
2562 echo
2563
2564 cat <<\_ASBOX
2565## ---------------- ##
2566## Cache variables. ##
2567## ---------------- ##
2568_ASBOX
2569 echo
2570 # The following way of writing the cache mishandles newlines in values,
2571(
2572 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2573 eval ac_val=\$$ac_var
2574 case $ac_val in #(
2575 *${as_nl}*)
2576 case $ac_var in #(
2577 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2578$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2579 esac
2580 case $ac_var in #(
2581 _ | IFS | as_nl) ;; #(
2582 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2583 *) { eval $ac_var=; unset $ac_var;} ;;
2584 esac ;;
2585 esac
2586 done
2587 (set) 2>&1 |
2588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2589 *${as_nl}ac_space=\ *)
2590 sed -n \
2591 "s/'\''/'\''\\\\'\'''\''/g;
2592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2593 ;; #(
2594 *)
2595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2596 ;;
2597 esac |
2598 sort
2599)
2600 echo
2601
2602 cat <<\_ASBOX
2603## ----------------- ##
2604## Output variables. ##
2605## ----------------- ##
2606_ASBOX
2607 echo
2608 for ac_var in $ac_subst_vars
2609 do
2610 eval ac_val=\$$ac_var
2611 case $ac_val in
2612 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2613 esac
2614 $as_echo "$ac_var='\''$ac_val'\''"
2615 done | sort
2616 echo
2617
2618 if test -n "$ac_subst_files"; then
2619 cat <<\_ASBOX
2620## ------------------- ##
2621## File substitutions. ##
2622## ------------------- ##
2623_ASBOX
2624 echo
2625 for ac_var in $ac_subst_files
2626 do
2627 eval ac_val=\$$ac_var
2628 case $ac_val in
2629 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2630 esac
2631 $as_echo "$ac_var='\''$ac_val'\''"
2632 done | sort
2633 echo
2634 fi
2635
2636 if test -s confdefs.h; then
2637 cat <<\_ASBOX
2638## ----------- ##
2639## confdefs.h. ##
2640## ----------- ##
2641_ASBOX
2642 echo
2643 cat confdefs.h
2644 echo
2645 fi
2646 test "$ac_signal" != 0 &&
2647 $as_echo "$as_me: caught signal $ac_signal"
2648 $as_echo "$as_me: exit $exit_status"
2649 } >&5
2650 rm -f core *.core core.conftest.* &&
2651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2652 exit $exit_status
2653' 0
2654for ac_signal in 1 2 13 15; do
2655 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2656done
2657ac_signal=0
2658
2659# confdefs.h avoids OS command line length limits that DEFS can exceed.
2660rm -f -r conftest* confdefs.h
2661
2662$as_echo "/* confdefs.h */" > confdefs.h
2663
2664# Predefined preprocessor variables.
2665
2666cat >>confdefs.h <<_ACEOF
2667#define PACKAGE_NAME "$PACKAGE_NAME"
2668_ACEOF
2669
2670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2672_ACEOF
2673
2674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_VERSION "$PACKAGE_VERSION"
2676_ACEOF
2677
2678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_STRING "$PACKAGE_STRING"
2680_ACEOF
2681
2682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2684_ACEOF
2685
2686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_URL "$PACKAGE_URL"
2688_ACEOF
2689
2690
2691# Let the site file select an alternate cache file if it wants to.
2692# Prefer an explicitly selected file to automatically selected ones.
2693ac_site_file1=NONE
2694ac_site_file2=NONE
2695if test -n "$CONFIG_SITE"; then
2696 ac_site_file1=$CONFIG_SITE
2697elif test "x$prefix" != xNONE; then
2698 ac_site_file1=$prefix/share/config.site
2699 ac_site_file2=$prefix/etc/config.site
2700else
2701 ac_site_file1=$ac_default_prefix/share/config.site
2702 ac_site_file2=$ac_default_prefix/etc/config.site
2703fi
2704for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2705do
2706 test "x$ac_site_file" = xNONE && continue
2707 if test -r "$ac_site_file"; then
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2709$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2710 sed 's/^/| /' "$ac_site_file" >&5
2711 . "$ac_site_file"
2712 fi
2713done
2714
2715if test -r "$cache_file"; then
2716 # Some versions of bash will fail to source /dev/null (special
2717 # files actually), so we avoid doing that.
2718 if test -f "$cache_file"; then
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2720$as_echo "$as_me: loading cache $cache_file" >&6;}
2721 case $cache_file in
2722 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2723 *) . "./$cache_file";;
2724 esac
2725 fi
2726else
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2728$as_echo "$as_me: creating cache $cache_file" >&6;}
2729 >$cache_file
bec39cab
AC
2730fi
2731
81ecdfbb
RW
2732# Check that the precious variables saved in the cache have kept the same
2733# value.
2734ac_cache_corrupted=false
2735for ac_var in $ac_precious_vars; do
2736 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2737 eval ac_new_set=\$ac_env_${ac_var}_set
2738 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2739 eval ac_new_val=\$ac_env_${ac_var}_value
2740 case $ac_old_set,$ac_new_set in
2741 set,)
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2743$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2744 ac_cache_corrupted=: ;;
2745 ,set)
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2747$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2748 ac_cache_corrupted=: ;;
2749 ,);;
2750 *)
2751 if test "x$ac_old_val" != "x$ac_new_val"; then
2752 # differences in whitespace do not lead to failure.
2753 ac_old_val_w=`echo x $ac_old_val`
2754 ac_new_val_w=`echo x $ac_new_val`
2755 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2757$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2758 ac_cache_corrupted=:
2759 else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2761$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2762 eval $ac_var=\$ac_old_val
2763 fi
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2765$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2767$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2768 fi;;
2769 esac
2770 # Pass precious variables to config.status.
2771 if test "$ac_new_set" = set; then
2772 case $ac_new_val in
2773 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2774 *) ac_arg=$ac_var=$ac_new_val ;;
2775 esac
2776 case " $ac_configure_args " in
2777 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2778 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2779 esac
2780 fi
2781done
2782if $ac_cache_corrupted; then
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2786$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2787 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2788fi
2789## -------------------- ##
2790## Main body of script. ##
2791## -------------------- ##
2792
2793ac_ext=c
2794ac_cpp='$CPP $CPPFLAGS'
2795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2797ac_compiler_gnu=$ac_cv_c_compiler_gnu
2798
2799
2800
2801
2802
2803ac_config_headers="$ac_config_headers config.h:config.in"
2804
2805
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2807$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2808 # Check whether --enable-maintainer-mode was given.
2809if test "${enable_maintainer_mode+set}" = set; then :
2810 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2811else
2812 USE_MAINTAINER_MODE=no
2813fi
2814
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2816$as_echo "$USE_MAINTAINER_MODE" >&6; }
2817 if test $USE_MAINTAINER_MODE = yes; then
2818 MAINTAINER_MODE_TRUE=
2819 MAINTAINER_MODE_FALSE='#'
2820else
2821 MAINTAINER_MODE_TRUE='#'
2822 MAINTAINER_MODE_FALSE=
2823fi
2824
2825 MAINT=$MAINTAINER_MODE_TRUE
2826
2827
2828
17ef446e 2829# Set the 'development' global.
270c9937 2830. $srcdir/../bfd/development.sh
f5f1cdb6 2831
81ecdfbb
RW
2832ac_ext=c
2833ac_cpp='$CPP $CPPFLAGS'
2834ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2835ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2836ac_compiler_gnu=$ac_cv_c_compiler_gnu
2837if test -n "$ac_tool_prefix"; then
2838 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2839set dummy ${ac_tool_prefix}gcc; ac_word=$2
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2841$as_echo_n "checking for $ac_word... " >&6; }
2842if test "${ac_cv_prog_CC+set}" = set; then :
2843 $as_echo_n "(cached) " >&6
c906108c
SS
2844else
2845 if test -n "$CC"; then
2846 ac_cv_prog_CC="$CC" # Let the user override the test.
2847else
bec39cab
AC
2848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2849for as_dir in $PATH
2850do
2851 IFS=$as_save_IFS
2852 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2853 for ac_exec_ext in '' $ac_executable_extensions; do
2854 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2855 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2857 break 2
2858 fi
2859done
81ecdfbb
RW
2860 done
2861IFS=$as_save_IFS
bec39cab 2862
c906108c
SS
2863fi
2864fi
bec39cab 2865CC=$ac_cv_prog_CC
c906108c 2866if test -n "$CC"; then
81ecdfbb
RW
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2868$as_echo "$CC" >&6; }
c906108c 2869else
81ecdfbb
RW
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2871$as_echo "no" >&6; }
c906108c
SS
2872fi
2873
81ecdfbb 2874
b4e70030
JB
2875fi
2876if test -z "$ac_cv_prog_CC"; then
2877 ac_ct_CC=$CC
81ecdfbb
RW
2878 # Extract the first word of "gcc", so it can be a program name with args.
2879set dummy gcc; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
2882if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2883 $as_echo_n "(cached) " >&6
b4e70030
JB
2884else
2885 if test -n "$ac_ct_CC"; then
2886 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2895 ac_cv_prog_ac_ct_CC="gcc"
2896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2897 break 2
4e8d927d 2898 fi
b4e70030 2899done
81ecdfbb
RW
2900 done
2901IFS=$as_save_IFS
b4e70030
JB
2902
2903fi
2904fi
2905ac_ct_CC=$ac_cv_prog_ac_ct_CC
2906if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2908$as_echo "$ac_ct_CC" >&6; }
b4e70030 2909else
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
b4e70030
JB
2912fi
2913
81ecdfbb
RW
2914 if test "x$ac_ct_CC" = x; then
2915 CC=""
2916 else
2917 case $cross_compiling:$ac_tool_warned in
2918yes:)
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2921ac_tool_warned=yes ;;
2922esac
2923 CC=$ac_ct_CC
2924 fi
b4e70030
JB
2925else
2926 CC="$ac_cv_prog_CC"
2927fi
2928
c906108c 2929if test -z "$CC"; then
81ecdfbb
RW
2930 if test -n "$ac_tool_prefix"; then
2931 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2932set dummy ${ac_tool_prefix}cc; ac_word=$2
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2934$as_echo_n "checking for $ac_word... " >&6; }
2935if test "${ac_cv_prog_CC+set}" = set; then :
2936 $as_echo_n "(cached) " >&6
c906108c
SS
2937else
2938 if test -n "$CC"; then
2939 ac_cv_prog_CC="$CC" # Let the user override the test.
2940else
bec39cab
AC
2941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942for as_dir in $PATH
2943do
2944 IFS=$as_save_IFS
2945 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2946 for ac_exec_ext in '' $ac_executable_extensions; do
2947 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2948 ac_cv_prog_CC="${ac_tool_prefix}cc"
2949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2950 break 2
2951 fi
2952done
81ecdfbb
RW
2953 done
2954IFS=$as_save_IFS
2955
2956fi
2957fi
2958CC=$ac_cv_prog_CC
2959if test -n "$CC"; then
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2961$as_echo "$CC" >&6; }
2962else
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2964$as_echo "no" >&6; }
2965fi
2966
2967
2968 fi
2969fi
2970if test -z "$CC"; then
2971 # Extract the first word of "cc", so it can be a program name with args.
2972set dummy cc; ac_word=$2
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2974$as_echo_n "checking for $ac_word... " >&6; }
2975if test "${ac_cv_prog_CC+set}" = set; then :
2976 $as_echo_n "(cached) " >&6
2977else
2978 if test -n "$CC"; then
2979 ac_cv_prog_CC="$CC" # Let the user override the test.
2980else
2981 ac_prog_rejected=no
2982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2983for as_dir in $PATH
2984do
2985 IFS=$as_save_IFS
2986 test -z "$as_dir" && as_dir=.
2987 for ac_exec_ext in '' $ac_executable_extensions; do
2988 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2989 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2990 ac_prog_rejected=yes
2991 continue
2992 fi
2993 ac_cv_prog_CC="cc"
2994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2995 break 2
2996 fi
2997done
2998 done
2999IFS=$as_save_IFS
bec39cab 3000
c906108c
SS
3001if test $ac_prog_rejected = yes; then
3002 # We found a bogon in the path, so make sure we never use it.
3003 set dummy $ac_cv_prog_CC
3004 shift
bec39cab 3005 if test $# != 0; then
c906108c
SS
3006 # We chose a different compiler from the bogus one.
3007 # However, it has the same basename, so the bogon will be chosen
3008 # first if we set CC to just the basename; use the full file name.
3009 shift
bec39cab 3010 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3011 fi
3012fi
3013fi
3014fi
bec39cab 3015CC=$ac_cv_prog_CC
c906108c 3016if test -n "$CC"; then
81ecdfbb
RW
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018$as_echo "$CC" >&6; }
c906108c 3019else
81ecdfbb
RW
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021$as_echo "no" >&6; }
c906108c
SS
3022fi
3023
81ecdfbb 3024
bec39cab
AC
3025fi
3026if test -z "$CC"; then
3027 if test -n "$ac_tool_prefix"; then
81ecdfbb 3028 for ac_prog in cl.exe
bec39cab
AC
3029 do
3030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033$as_echo_n "checking for $ac_word... " >&6; }
3034if test "${ac_cv_prog_CC+set}" = set; then :
3035 $as_echo_n "(cached) " >&6
c906108c
SS
3036else
3037 if test -n "$CC"; then
3038 ac_cv_prog_CC="$CC" # Let the user override the test.
3039else
bec39cab
AC
3040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3041for as_dir in $PATH
3042do
3043 IFS=$as_save_IFS
3044 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3045 for ac_exec_ext in '' $ac_executable_extensions; do
3046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3047 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3049 break 2
3050 fi
3051done
81ecdfbb
RW
3052 done
3053IFS=$as_save_IFS
bec39cab 3054
c906108c
SS
3055fi
3056fi
bec39cab 3057CC=$ac_cv_prog_CC
c906108c 3058if test -n "$CC"; then
81ecdfbb
RW
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3060$as_echo "$CC" >&6; }
c906108c 3061else
81ecdfbb
RW
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
c906108c 3064fi
bec39cab 3065
81ecdfbb 3066
bec39cab
AC
3067 test -n "$CC" && break
3068 done
3069fi
3070if test -z "$CC"; then
3071 ac_ct_CC=$CC
81ecdfbb 3072 for ac_prog in cl.exe
bec39cab
AC
3073do
3074 # Extract the first word of "$ac_prog", so it can be a program name with args.
3075set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3077$as_echo_n "checking for $ac_word... " >&6; }
3078if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3079 $as_echo_n "(cached) " >&6
bec39cab
AC
3080else
3081 if test -n "$ac_ct_CC"; then
3082 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3083else
3084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085for as_dir in $PATH
3086do
3087 IFS=$as_save_IFS
3088 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3089 for ac_exec_ext in '' $ac_executable_extensions; do
3090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3091 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3093 break 2
c906108c 3094 fi
bec39cab 3095done
81ecdfbb
RW
3096 done
3097IFS=$as_save_IFS
bec39cab
AC
3098
3099fi
3100fi
3101ac_ct_CC=$ac_cv_prog_ac_ct_CC
3102if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3104$as_echo "$ac_ct_CC" >&6; }
bec39cab 3105else
81ecdfbb
RW
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107$as_echo "no" >&6; }
c906108c
SS
3108fi
3109
81ecdfbb 3110
bec39cab
AC
3111 test -n "$ac_ct_CC" && break
3112done
c906108c 3113
81ecdfbb
RW
3114 if test "x$ac_ct_CC" = x; then
3115 CC=""
3116 else
3117 case $cross_compiling:$ac_tool_warned in
3118yes:)
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3121ac_tool_warned=yes ;;
3122esac
3123 CC=$ac_ct_CC
3124 fi
bec39cab
AC
3125fi
3126
3127fi
3128
3129
81ecdfbb
RW
3130test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3132as_fn_error "no acceptable C compiler found in \$PATH
3133See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3134
3135# Provide some information about the compiler.
81ecdfbb
RW
3136$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3137set X $ac_compile
3138ac_compiler=$2
3139for ac_option in --version -v -V -qversion; do
3140 { { ac_try="$ac_compiler $ac_option >&5"
3141case "(($ac_try" in
3142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3143 *) ac_try_echo=$ac_try;;
3144esac
3145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3146$as_echo "$ac_try_echo"; } >&5
3147 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3148 ac_status=$?
81ecdfbb
RW
3149 if test -s conftest.err; then
3150 sed '10a\
3151... rest of stderr output deleted ...
3152 10q' conftest.err >conftest.er1
3153 cat conftest.er1 >&5
3154 rm -f conftest.er1 conftest.err
3155 fi
3156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3157 test $ac_status = 0; }
3158done
bec39cab 3159
81ecdfbb 3160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3161/* end confdefs.h. */
3162
3163int
3164main ()
3165{
3166
3167 ;
3168 return 0;
3169}
3170_ACEOF
3171ac_clean_files_save=$ac_clean_files
81ecdfbb 3172ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3173# Try to create an executable without -o first, disregard a.out.
3174# It will help us diagnose broken compilers, and finding out an intuition
3175# of exeext.
81ecdfbb
RW
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3177$as_echo_n "checking for C compiler default output file name... " >&6; }
3178ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3179
3180# The possible output files:
3181ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3182
3183ac_rmfiles=
3184for ac_file in $ac_files
3185do
3186 case $ac_file in
3187 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3188 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3189 esac
3190done
3191rm -f $ac_rmfiles
3192
3193if { { ac_try="$ac_link_default"
3194case "(($ac_try" in
3195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3196 *) ac_try_echo=$ac_try;;
3197esac
3198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3199$as_echo "$ac_try_echo"; } >&5
3200 (eval "$ac_link_default") 2>&5
3201 ac_status=$?
3202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3203 test $ac_status = 0; }; then :
3204 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3205# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3206# in a Makefile. We should not override ac_cv_exeext if it was cached,
3207# so that the user can short-circuit this test for compilers unknown to
3208# Autoconf.
3209for ac_file in $ac_files ''
bec39cab
AC
3210do
3211 test -f "$ac_file" || continue
3212 case $ac_file in
81ecdfbb 3213 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3214 ;;
3215 [ab].out )
3216 # We found the default executable, but exeext='' is most
3217 # certainly right.
3218 break;;
3219 *.* )
81ecdfbb
RW
3220 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3221 then :; else
3222 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3223 fi
3224 # We set ac_cv_exeext here because the later test for it is not
3225 # safe: cross compilers may not add the suffix if given an `-o'
3226 # argument, so we may need to know it at that point already.
3227 # Even if this section looks crufty: it has the advantage of
3228 # actually working.
b4e70030
JB
3229 break;;
3230 * )
3231 break;;
bec39cab
AC
3232 esac
3233done
81ecdfbb
RW
3234test "$ac_cv_exeext" = no && ac_cv_exeext=
3235
bec39cab 3236else
81ecdfbb
RW
3237 ac_file=''
3238fi
3239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3240$as_echo "$ac_file" >&6; }
3241if test -z "$ac_file"; then :
3242 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3243sed 's/^/| /' conftest.$ac_ext >&5
3244
81ecdfbb
RW
3245{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3247{ as_fn_set_status 77
3248as_fn_error "C compiler cannot create executables
3249See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3250fi
b4e70030 3251ac_exeext=$ac_cv_exeext
b4e70030 3252
81ecdfbb 3253# Check that the compiler produces executables we can run. If not, either
bec39cab 3254# the compiler is broken, or we cross compile.
81ecdfbb
RW
3255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3256$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3257# If not cross compiling, check that we can run a simple program.
3258if test "$cross_compiling" != yes; then
3259 if { ac_try='./$ac_file'
81ecdfbb
RW
3260 { { case "(($ac_try" in
3261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3262 *) ac_try_echo=$ac_try;;
3263esac
3264eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3265$as_echo "$ac_try_echo"; } >&5
3266 (eval "$ac_try") 2>&5
bec39cab 3267 ac_status=$?
81ecdfbb
RW
3268 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3269 test $ac_status = 0; }; }; then
bec39cab 3270 cross_compiling=no
c906108c 3271 else
bec39cab
AC
3272 if test "$cross_compiling" = maybe; then
3273 cross_compiling=yes
3274 else
81ecdfbb
RW
3275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3277as_fn_error "cannot run C compiled programs.
bec39cab 3278If you meant to cross compile, use \`--host'.
81ecdfbb 3279See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3280 fi
c906108c 3281 fi
bec39cab 3282fi
81ecdfbb
RW
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3284$as_echo "yes" >&6; }
bec39cab 3285
81ecdfbb 3286rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3287ac_clean_files=$ac_clean_files_save
81ecdfbb 3288# Check that the compiler produces executables we can run. If not, either
b4e70030 3289# the compiler is broken, or we cross compile.
81ecdfbb
RW
3290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3291$as_echo_n "checking whether we are cross compiling... " >&6; }
3292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3293$as_echo "$cross_compiling" >&6; }
3294
3295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3296$as_echo_n "checking for suffix of executables... " >&6; }
3297if { { ac_try="$ac_link"
3298case "(($ac_try" in
3299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3300 *) ac_try_echo=$ac_try;;
3301esac
3302eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3303$as_echo "$ac_try_echo"; } >&5
3304 (eval "$ac_link") 2>&5
bec39cab 3305 ac_status=$?
81ecdfbb
RW
3306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3307 test $ac_status = 0; }; then :
b4e70030
JB
3308 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3309# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3310# work properly (i.e., refer to `conftest.exe'), while it won't with
3311# `rm'.
3312for ac_file in conftest.exe conftest conftest.*; do
3313 test -f "$ac_file" || continue
3314 case $ac_file in
81ecdfbb 3315 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3316 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3317 break;;
3318 * ) break;;
3319 esac
3320done
c906108c 3321else
81ecdfbb
RW
3322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3324as_fn_error "cannot compute suffix of executables: cannot compile and link
3325See \`config.log' for more details." "$LINENO" 5; }
c906108c 3326fi
b4e70030 3327rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3329$as_echo "$ac_cv_exeext" >&6; }
c906108c 3330
b4e70030 3331rm -f conftest.$ac_ext
bec39cab
AC
3332EXEEXT=$ac_cv_exeext
3333ac_exeext=$EXEEXT
81ecdfbb
RW
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3335$as_echo_n "checking for suffix of object files... " >&6; }
3336if test "${ac_cv_objext+set}" = set; then :
3337 $as_echo_n "(cached) " >&6
bec39cab 3338else
81ecdfbb 3339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3340/* end confdefs.h. */
3341
3342int
3343main ()
3344{
3345
3346 ;
3347 return 0;
3348}
3349_ACEOF
3350rm -f conftest.o conftest.obj
81ecdfbb
RW
3351if { { ac_try="$ac_compile"
3352case "(($ac_try" in
3353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3354 *) ac_try_echo=$ac_try;;
3355esac
3356eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3357$as_echo "$ac_try_echo"; } >&5
3358 (eval "$ac_compile") 2>&5
3359 ac_status=$?
3360 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3361 test $ac_status = 0; }; then :
3362 for ac_file in conftest.o conftest.obj conftest.*; do
3363 test -f "$ac_file" || continue;
bec39cab 3364 case $ac_file in
81ecdfbb 3365 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3366 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3367 break;;
3368 esac
3369done
c906108c 3370else
81ecdfbb 3371 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3372sed 's/^/| /' conftest.$ac_ext >&5
3373
81ecdfbb
RW
3374{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3376as_fn_error "cannot compute suffix of object files: cannot compile
3377See \`config.log' for more details." "$LINENO" 5; }
c906108c 3378fi
b4e70030 3379rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3380fi
81ecdfbb
RW
3381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3382$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3383OBJEXT=$ac_cv_objext
3384ac_objext=$OBJEXT
81ecdfbb
RW
3385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3386$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3387if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3388 $as_echo_n "(cached) " >&6
c906108c 3389else
81ecdfbb 3390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3391/* end confdefs.h. */
3392
3393int
3394main ()
3395{
3396#ifndef __GNUC__
3397 choke me
3398#endif
3399
3400 ;
3401 return 0;
3402}
3403_ACEOF
81ecdfbb 3404if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3405 ac_compiler_gnu=yes
3406else
81ecdfbb 3407 ac_compiler_gnu=no
bec39cab 3408fi
81ecdfbb 3409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3410ac_cv_c_compiler_gnu=$ac_compiler_gnu
3411
3412fi
81ecdfbb
RW
3413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3414$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3415if test $ac_compiler_gnu = yes; then
3416 GCC=yes
3417else
3418 GCC=
3419fi
bec39cab
AC
3420ac_test_CFLAGS=${CFLAGS+set}
3421ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3423$as_echo_n "checking whether $CC accepts -g... " >&6; }
3424if test "${ac_cv_prog_cc_g+set}" = set; then :
3425 $as_echo_n "(cached) " >&6
bec39cab 3426else
81ecdfbb
RW
3427 ac_save_c_werror_flag=$ac_c_werror_flag
3428 ac_c_werror_flag=yes
3429 ac_cv_prog_cc_g=no
3430 CFLAGS="-g"
3431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3432/* end confdefs.h. */
3433
3434int
3435main ()
3436{
3437
3438 ;
3439 return 0;
3440}
3441_ACEOF
81ecdfbb 3442if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3443 ac_cv_prog_cc_g=yes
3444else
81ecdfbb
RW
3445 CFLAGS=""
3446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3447/* end confdefs.h. */
3448
3449int
3450main ()
3451{
3452
3453 ;
3454 return 0;
3455}
3456_ACEOF
3457if ac_fn_c_try_compile "$LINENO"; then :
3458
3459else
3460 ac_c_werror_flag=$ac_save_c_werror_flag
3461 CFLAGS="-g"
3462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3463/* end confdefs.h. */
3464
3465int
3466main ()
3467{
c906108c 3468
81ecdfbb
RW
3469 ;
3470 return 0;
3471}
3472_ACEOF
3473if ac_fn_c_try_compile "$LINENO"; then :
3474 ac_cv_prog_cc_g=yes
3475fi
3476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3477fi
3478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3479fi
81ecdfbb
RW
3480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3481 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3482fi
81ecdfbb
RW
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3484$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3485if test "$ac_test_CFLAGS" = set; then
bec39cab 3486 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3487elif test $ac_cv_prog_cc_g = yes; then
3488 if test "$GCC" = yes; then
3489 CFLAGS="-g -O2"
3490 else
3491 CFLAGS="-g"
3492 fi
3493else
3494 if test "$GCC" = yes; then
3495 CFLAGS="-O2"
3496 else
3497 CFLAGS=
3498 fi
3499fi
81ecdfbb
RW
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3501$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3502if test "${ac_cv_prog_cc_c89+set}" = set; then :
3503 $as_echo_n "(cached) " >&6
bec39cab 3504else
81ecdfbb 3505 ac_cv_prog_cc_c89=no
bec39cab 3506ac_save_CC=$CC
81ecdfbb 3507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3508/* end confdefs.h. */
c906108c
SS
3509#include <stdarg.h>
3510#include <stdio.h>
3511#include <sys/types.h>
3512#include <sys/stat.h>
3513/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3514struct buf { int x; };
3515FILE * (*rcsopen) (struct buf *, struct stat *, int);
3516static char *e (p, i)
3517 char **p;
3518 int i;
3519{
3520 return p[i];
3521}
3522static char *f (char * (*g) (char **, int), char **p, ...)
3523{
3524 char *s;
3525 va_list v;
3526 va_start (v,p);
3527 s = g (p, va_arg (v,int));
3528 va_end (v);
3529 return s;
3530}
bec39cab
AC
3531
3532/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3533 function prototypes and stuff, but not '\xHH' hex character constants.
3534 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3535 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3536 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3537 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3538 that's true only with -std. */
bec39cab
AC
3539int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3540
81ecdfbb
RW
3541/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3542 inside strings and character constants. */
3543#define FOO(x) 'x'
3544int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3545
c906108c
SS
3546int test (int i, double x);
3547struct s1 {int (*f) (int a);};
3548struct s2 {int (*f) (double a);};
3549int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3550int argc;
3551char **argv;
bec39cab
AC
3552int
3553main ()
3554{
c906108c 3555return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3556 ;
3557 return 0;
3558}
3559_ACEOF
81ecdfbb
RW
3560for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3561 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3562do
3563 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3564 if ac_fn_c_try_compile "$LINENO"; then :
3565 ac_cv_prog_cc_c89=$ac_arg
c906108c 3566fi
81ecdfbb
RW
3567rm -f core conftest.err conftest.$ac_objext
3568 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3569done
81ecdfbb 3570rm -f conftest.$ac_ext
bec39cab 3571CC=$ac_save_CC
c906108c
SS
3572
3573fi
81ecdfbb
RW
3574# AC_CACHE_VAL
3575case "x$ac_cv_prog_cc_c89" in
3576 x)
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3578$as_echo "none needed" >&6; } ;;
3579 xno)
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3581$as_echo "unsupported" >&6; } ;;
bec39cab 3582 *)
81ecdfbb
RW
3583 CC="$CC $ac_cv_prog_cc_c89"
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3585$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3586esac
81ecdfbb 3587if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3588
b4e70030
JB
3589fi
3590
bec39cab
AC
3591ac_ext=c
3592ac_cpp='$CPP $CPPFLAGS'
3593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3595ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3596
3bc3d82a
PA
3597ac_ext=cpp
3598ac_cpp='$CXXCPP $CPPFLAGS'
3599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3602if test -z "$CXX"; then
3603 if test -n "$CCC"; then
3604 CXX=$CCC
3605 else
3606 if test -n "$ac_tool_prefix"; then
3607 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3608 do
3609 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3610set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
3613if test "${ac_cv_prog_CXX+set}" = set; then :
3614 $as_echo_n "(cached) " >&6
3615else
3616 if test -n "$CXX"; then
3617 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3618else
3619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
3624 for ac_exec_ext in '' $ac_executable_extensions; do
3625 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3626 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3628 break 2
3629 fi
3630done
3631 done
3632IFS=$as_save_IFS
3633
3634fi
3635fi
3636CXX=$ac_cv_prog_CXX
3637if test -n "$CXX"; then
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3639$as_echo "$CXX" >&6; }
3640else
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
3643fi
3644
3645
3646 test -n "$CXX" && break
3647 done
3648fi
3649if test -z "$CXX"; then
3650 ac_ct_CXX=$CXX
3651 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3652do
3653 # Extract the first word of "$ac_prog", so it can be a program name with args.
3654set dummy $ac_prog; ac_word=$2
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
3657if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3658 $as_echo_n "(cached) " >&6
3659else
3660 if test -n "$ac_ct_CXX"; then
3661 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3662else
3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
3668 for ac_exec_ext in '' $ac_executable_extensions; do
3669 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3670 ac_cv_prog_ac_ct_CXX="$ac_prog"
3671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3672 break 2
3673 fi
3674done
3675 done
3676IFS=$as_save_IFS
3677
3678fi
3679fi
3680ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3681if test -n "$ac_ct_CXX"; then
3682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3683$as_echo "$ac_ct_CXX" >&6; }
3684else
3685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686$as_echo "no" >&6; }
3687fi
3688
3689
3690 test -n "$ac_ct_CXX" && break
3691done
3692
3693 if test "x$ac_ct_CXX" = x; then
3694 CXX="g++"
3695 else
3696 case $cross_compiling:$ac_tool_warned in
3697yes:)
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3699$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3700ac_tool_warned=yes ;;
3701esac
3702 CXX=$ac_ct_CXX
3703 fi
3704fi
3705
3706 fi
3707fi
3708# Provide some information about the compiler.
3709$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3710set X $ac_compile
3711ac_compiler=$2
3712for ac_option in --version -v -V -qversion; do
3713 { { ac_try="$ac_compiler $ac_option >&5"
3714case "(($ac_try" in
3715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3716 *) ac_try_echo=$ac_try;;
3717esac
3718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3719$as_echo "$ac_try_echo"; } >&5
3720 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3721 ac_status=$?
3722 if test -s conftest.err; then
3723 sed '10a\
3724... rest of stderr output deleted ...
3725 10q' conftest.err >conftest.er1
3726 cat conftest.er1 >&5
3727 rm -f conftest.er1 conftest.err
3728 fi
3729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3730 test $ac_status = 0; }
3731done
3732
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3734$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3735if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3736 $as_echo_n "(cached) " >&6
3737else
3738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3739/* end confdefs.h. */
3740
3741int
3742main ()
3743{
3744#ifndef __GNUC__
3745 choke me
3746#endif
3747
3748 ;
3749 return 0;
3750}
3751_ACEOF
3752if ac_fn_cxx_try_compile "$LINENO"; then :
3753 ac_compiler_gnu=yes
3754else
3755 ac_compiler_gnu=no
3756fi
3757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3758ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3759
3760fi
3761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3762$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3763if test $ac_compiler_gnu = yes; then
3764 GXX=yes
3765else
3766 GXX=
3767fi
3768ac_test_CXXFLAGS=${CXXFLAGS+set}
3769ac_save_CXXFLAGS=$CXXFLAGS
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3771$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3772if test "${ac_cv_prog_cxx_g+set}" = set; then :
3773 $as_echo_n "(cached) " >&6
3774else
3775 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3776 ac_cxx_werror_flag=yes
3777 ac_cv_prog_cxx_g=no
3778 CXXFLAGS="-g"
3779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3780/* end confdefs.h. */
3781
3782int
3783main ()
3784{
3785
3786 ;
3787 return 0;
3788}
3789_ACEOF
3790if ac_fn_cxx_try_compile "$LINENO"; then :
3791 ac_cv_prog_cxx_g=yes
3792else
3793 CXXFLAGS=""
3794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3795/* end confdefs.h. */
3796
3797int
3798main ()
3799{
3800
3801 ;
3802 return 0;
3803}
3804_ACEOF
3805if ac_fn_cxx_try_compile "$LINENO"; then :
3806
3807else
3808 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3809 CXXFLAGS="-g"
3810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3811/* end confdefs.h. */
3812
3813int
3814main ()
3815{
3816
3817 ;
3818 return 0;
3819}
3820_ACEOF
3821if ac_fn_cxx_try_compile "$LINENO"; then :
3822 ac_cv_prog_cxx_g=yes
3823fi
3824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3825fi
3826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3827fi
3828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3829 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3830fi
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3832$as_echo "$ac_cv_prog_cxx_g" >&6; }
3833if test "$ac_test_CXXFLAGS" = set; then
3834 CXXFLAGS=$ac_save_CXXFLAGS
3835elif test $ac_cv_prog_cxx_g = yes; then
3836 if test "$GXX" = yes; then
3837 CXXFLAGS="-g -O2"
3838 else
3839 CXXFLAGS="-g"
3840 fi
3841else
3842 if test "$GXX" = yes; then
3843 CXXFLAGS="-O2"
3844 else
3845 CXXFLAGS=
3846 fi
3847fi
3848ac_ext=c
3849ac_cpp='$CPP $CPPFLAGS'
3850ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3851ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3852ac_compiler_gnu=$ac_cv_c_compiler_gnu
3853
3854
60ca704f 3855
bec39cab
AC
3856ac_ext=c
3857ac_cpp='$CPP $CPPFLAGS'
3858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3860ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3862$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3863# On Suns, sometimes $CPP names a directory.
3864if test -n "$CPP" && test -d "$CPP"; then
3865 CPP=
8bb2c122 3866fi
bec39cab 3867if test -z "$CPP"; then
81ecdfbb
RW
3868 if test "${ac_cv_prog_CPP+set}" = set; then :
3869 $as_echo_n "(cached) " >&6
bec39cab
AC
3870else
3871 # Double quotes because CPP needs to be expanded
3872 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3873 do
3874 ac_preproc_ok=false
3875for ac_c_preproc_warn_flag in '' yes
3876do
3877 # Use a header file that comes with gcc, so configuring glibc
3878 # with a fresh cross-compiler works.
3879 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3880 # <limits.h> exists even on freestanding compilers.
3881 # On the NeXT, cc -E runs the code through the compiler's parser,
3882 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3884/* end confdefs.h. */
3885#ifdef __STDC__
3886# include <limits.h>
3887#else
3888# include <assert.h>
3889#endif
3890 Syntax error
3891_ACEOF
81ecdfbb 3892if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3893
81ecdfbb 3894else
bec39cab
AC
3895 # Broken: fails on valid input.
3896continue
3897fi
3898rm -f conftest.err conftest.$ac_ext
3899
81ecdfbb 3900 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3901 # can be detected and how.
81ecdfbb 3902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3903/* end confdefs.h. */
3904#include <ac_nonexistent.h>
3905_ACEOF
81ecdfbb 3906if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3907 # Broken: success on invalid input.
3908continue
8bb2c122 3909else
bec39cab
AC
3910 # Passes both tests.
3911ac_preproc_ok=:
3912break
8bb2c122 3913fi
bec39cab 3914rm -f conftest.err conftest.$ac_ext
8bb2c122 3915
bec39cab
AC
3916done
3917# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3918rm -f conftest.err conftest.$ac_ext
81ecdfbb 3919if $ac_preproc_ok; then :
bec39cab
AC
3920 break
3921fi
8bb2c122 3922
bec39cab
AC
3923 done
3924 ac_cv_prog_CPP=$CPP
ddc9cd0f 3925
c906108c 3926fi
bec39cab
AC
3927 CPP=$ac_cv_prog_CPP
3928else
3929 ac_cv_prog_CPP=$CPP
c906108c 3930fi
81ecdfbb
RW
3931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3932$as_echo "$CPP" >&6; }
bec39cab
AC
3933ac_preproc_ok=false
3934for ac_c_preproc_warn_flag in '' yes
3935do
3936 # Use a header file that comes with gcc, so configuring glibc
3937 # with a fresh cross-compiler works.
3938 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3939 # <limits.h> exists even on freestanding compilers.
3940 # On the NeXT, cc -E runs the code through the compiler's parser,
3941 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3943/* end confdefs.h. */
3944#ifdef __STDC__
3945# include <limits.h>
3946#else
3947# include <assert.h>
3948#endif
3949 Syntax error
3950_ACEOF
81ecdfbb 3951if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3952
81ecdfbb 3953else
bec39cab
AC
3954 # Broken: fails on valid input.
3955continue
3956fi
3957rm -f conftest.err conftest.$ac_ext
3958
81ecdfbb 3959 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3960 # can be detected and how.
81ecdfbb 3961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3962/* end confdefs.h. */
3963#include <ac_nonexistent.h>
3964_ACEOF
81ecdfbb 3965if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3966 # Broken: success on invalid input.
3967continue
c906108c 3968else
bec39cab
AC
3969 # Passes both tests.
3970ac_preproc_ok=:
3971break
c906108c 3972fi
bec39cab 3973rm -f conftest.err conftest.$ac_ext
c906108c 3974
bec39cab
AC
3975done
3976# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3977rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3978if $ac_preproc_ok; then :
3979
c906108c 3980else
81ecdfbb
RW
3981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3983as_fn_error "C preprocessor \"$CPP\" fails sanity check
3984See \`config.log' for more details." "$LINENO" 5; }
c906108c 3985fi
c906108c 3986
bec39cab
AC
3987ac_ext=c
3988ac_cpp='$CPP $CPPFLAGS'
3989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3991ac_compiler_gnu=$ac_cv_c_compiler_gnu
3992
3993
81ecdfbb
RW
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3995$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3996if test "${ac_cv_path_GREP+set}" = set; then :
3997 $as_echo_n "(cached) " >&6
4e8d927d 3998else
81ecdfbb
RW
3999 if test -z "$GREP"; then
4000 ac_path_GREP_found=false
4001 # Loop through the user's path and test for each of PROGNAME-LIST
4002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4003for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4004do
4005 IFS=$as_save_IFS
4006 test -z "$as_dir" && as_dir=.
4007 for ac_prog in grep ggrep; do
4008 for ac_exec_ext in '' $ac_executable_extensions; do
4009 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4010 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4011# Check for GNU ac_path_GREP and select it if it is found.
4012 # Check for GNU $ac_path_GREP
4013case `"$ac_path_GREP" --version 2>&1` in
4014*GNU*)
4015 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4016*)
4017 ac_count=0
4018 $as_echo_n 0123456789 >"conftest.in"
4019 while :
4020 do
4021 cat "conftest.in" "conftest.in" >"conftest.tmp"
4022 mv "conftest.tmp" "conftest.in"
4023 cp "conftest.in" "conftest.nl"
4024 $as_echo 'GREP' >> "conftest.nl"
4025 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4026 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4027 as_fn_arith $ac_count + 1 && ac_count=$as_val
4028 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4029 # Best one so far, save it but keep looking for a better one
4030 ac_cv_path_GREP="$ac_path_GREP"
4031 ac_path_GREP_max=$ac_count
bec39cab 4032 fi
81ecdfbb
RW
4033 # 10*(2^10) chars as input seems more than enough
4034 test $ac_count -gt 10 && break
4035 done
4036 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4037esac
bec39cab 4038
81ecdfbb
RW
4039 $ac_path_GREP_found && break 3
4040 done
4041 done
4042 done
4043IFS=$as_save_IFS
4044 if test -z "$ac_cv_path_GREP"; then
4045 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4046 fi
c906108c 4047else
81ecdfbb 4048 ac_cv_path_GREP=$GREP
c906108c 4049fi
c906108c 4050
81ecdfbb
RW
4051fi
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4053$as_echo "$ac_cv_path_GREP" >&6; }
4054 GREP="$ac_cv_path_GREP"
c906108c 4055
c906108c 4056
81ecdfbb
RW
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4058$as_echo_n "checking for egrep... " >&6; }
4059if test "${ac_cv_path_EGREP+set}" = set; then :
4060 $as_echo_n "(cached) " >&6
783e057b 4061else
81ecdfbb
RW
4062 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4063 then ac_cv_path_EGREP="$GREP -E"
4064 else
4065 if test -z "$EGREP"; then
4066 ac_path_EGREP_found=false
4067 # Loop through the user's path and test for each of PROGNAME-LIST
4068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4070do
4071 IFS=$as_save_IFS
4072 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4073 for ac_prog in egrep; do
4074 for ac_exec_ext in '' $ac_executable_extensions; do
4075 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4076 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4077# Check for GNU ac_path_EGREP and select it if it is found.
4078 # Check for GNU $ac_path_EGREP
4079case `"$ac_path_EGREP" --version 2>&1` in
4080*GNU*)
4081 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4082*)
4083 ac_count=0
4084 $as_echo_n 0123456789 >"conftest.in"
4085 while :
4086 do
4087 cat "conftest.in" "conftest.in" >"conftest.tmp"
4088 mv "conftest.tmp" "conftest.in"
4089 cp "conftest.in" "conftest.nl"
4090 $as_echo 'EGREP' >> "conftest.nl"
4091 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4092 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4093 as_fn_arith $ac_count + 1 && ac_count=$as_val
4094 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4095 # Best one so far, save it but keep looking for a better one
4096 ac_cv_path_EGREP="$ac_path_EGREP"
4097 ac_path_EGREP_max=$ac_count
4098 fi
4099 # 10*(2^10) chars as input seems more than enough
4100 test $ac_count -gt 10 && break
4101 done
4102 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4103esac
bec39cab 4104
81ecdfbb
RW
4105 $ac_path_EGREP_found && break 3
4106 done
4107 done
4108 done
4109IFS=$as_save_IFS
4110 if test -z "$ac_cv_path_EGREP"; then
4111 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4112 fi
783e057b 4113else
81ecdfbb 4114 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4115fi
4116
81ecdfbb 4117 fi
783e057b 4118fi
81ecdfbb
RW
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4120$as_echo "$ac_cv_path_EGREP" >&6; }
4121 EGREP="$ac_cv_path_EGREP"
4122
783e057b 4123
81ecdfbb
RW
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4125$as_echo_n "checking for ANSI C header files... " >&6; }
4126if test "${ac_cv_header_stdc+set}" = set; then :
4127 $as_echo_n "(cached) " >&6
783e057b 4128else
81ecdfbb 4129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4130/* end confdefs.h. */
783e057b 4131#include <stdlib.h>
bec39cab 4132#include <stdarg.h>
783e057b
DJ
4133#include <string.h>
4134#include <float.h>
c906108c 4135
bec39cab
AC
4136int
4137main ()
4138{
c906108c 4139
bec39cab
AC
4140 ;
4141 return 0;
4142}
4143_ACEOF
81ecdfbb 4144if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4145 ac_cv_header_stdc=yes
c906108c 4146else
81ecdfbb 4147 ac_cv_header_stdc=no
c906108c 4148fi
81ecdfbb 4149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4150
783e057b
DJ
4151if test $ac_cv_header_stdc = yes; then
4152 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4154/* end confdefs.h. */
4155#include <string.h>
c906108c 4156
783e057b
DJ
4157_ACEOF
4158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4159 $EGREP "memchr" >/dev/null 2>&1; then :
4160
c906108c 4161else
783e057b 4162 ac_cv_header_stdc=no
c906108c 4163fi
783e057b 4164rm -f conftest*
c906108c
SS
4165
4166fi
4167
783e057b
DJ
4168if test $ac_cv_header_stdc = yes; then
4169 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4171/* end confdefs.h. */
4172#include <stdlib.h>
bec39cab 4173
783e057b
DJ
4174_ACEOF
4175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4176 $EGREP "free" >/dev/null 2>&1; then :
4177
bec39cab 4178else
783e057b 4179 ac_cv_header_stdc=no
bec39cab 4180fi
783e057b 4181rm -f conftest*
bec39cab
AC
4182
4183fi
bec39cab 4184
783e057b
DJ
4185if test $ac_cv_header_stdc = yes; then
4186 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4187 if test "$cross_compiling" = yes; then :
783e057b 4188 :
bec39cab 4189else
81ecdfbb 4190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4191/* end confdefs.h. */
4192#include <ctype.h>
81ecdfbb 4193#include <stdlib.h>
783e057b
DJ
4194#if ((' ' & 0x0FF) == 0x020)
4195# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4196# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4197#else
4198# define ISLOWER(c) \
4199 (('a' <= (c) && (c) <= 'i') \
4200 || ('j' <= (c) && (c) <= 'r') \
4201 || ('s' <= (c) && (c) <= 'z'))
4202# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4203#endif
4204
4205#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4206int
4207main ()
4208{
4209 int i;
4210 for (i = 0; i < 256; i++)
4211 if (XOR (islower (i), ISLOWER (i))
4212 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4213 return 2;
4214 return 0;
783e057b
DJ
4215}
4216_ACEOF
81ecdfbb 4217if ac_fn_c_try_run "$LINENO"; then :
783e057b 4218
81ecdfbb
RW
4219else
4220 ac_cv_header_stdc=no
783e057b 4221fi
81ecdfbb
RW
4222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4223 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4224fi
81ecdfbb 4225
783e057b
DJ
4226fi
4227fi
81ecdfbb
RW
4228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4229$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4230if test $ac_cv_header_stdc = yes; then
4231
81ecdfbb 4232$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4233
4234fi
4235
4236# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4237for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4238 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4239do :
4240 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4241ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4242"
4243eval as_val=\$$as_ac_Header
4244 if test "x$as_val" = x""yes; then :
783e057b 4245 cat >>confdefs.h <<_ACEOF
81ecdfbb 4246#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4247_ACEOF
4248
4249fi
4250
4251done
4252
4253
4254
81ecdfbb
RW
4255 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4256if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4257 MINIX=yes
4258else
4259 MINIX=
4260fi
4261
4262
4263 if test "$MINIX" = yes; then
4264
81ecdfbb 4265$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4266
4267
81ecdfbb 4268$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4269
4270
81ecdfbb 4271$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4272
4273 fi
4274
4275
81ecdfbb
RW
4276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4277$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4278if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4279 $as_echo_n "(cached) " >&6
783e057b 4280else
81ecdfbb 4281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4282/* end confdefs.h. */
4283
c971b7fa
PA
4284# define __EXTENSIONS__ 1
4285 $ac_includes_default
783e057b
DJ
4286int
4287main ()
4288{
4289
4290 ;
4291 return 0;
4292}
4293_ACEOF
81ecdfbb 4294if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4295 ac_cv_safe_to_define___extensions__=yes
4296else
81ecdfbb 4297 ac_cv_safe_to_define___extensions__=no
783e057b 4298fi
81ecdfbb 4299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4300fi
81ecdfbb
RW
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4302$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4303 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4304 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4305
81ecdfbb 4306 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4307
81ecdfbb 4308 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4309
81ecdfbb 4310 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4311
81ecdfbb 4312 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4313
4314
c971b7fa
PA
4315ac_aux_dir=
4316for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4317 for ac_t in install-sh install.sh shtool; do
4318 if test -f "$ac_dir/$ac_t"; then
4319 ac_aux_dir=$ac_dir
4320 ac_install_sh="$ac_aux_dir/$ac_t -c"
4321 break 2
4322 fi
4323 done
4324done
4325if test -z "$ac_aux_dir"; then
4326 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4327fi
770d76d7 4328
c971b7fa
PA
4329# These three variables are undocumented and unsupported,
4330# and are intended to be withdrawn in a future Autoconf release.
4331# They can cause serious problems if a builder's source tree is in a directory
4332# whose full name contains unusual characters.
4333ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4334ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4335ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4336
770d76d7 4337
c971b7fa
PA
4338# Make sure we can run config.sub.
4339$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4340 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4341
c971b7fa
PA
4342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4343$as_echo_n "checking build system type... " >&6; }
4344if test "${ac_cv_build+set}" = set; then :
4345 $as_echo_n "(cached) " >&6
770d76d7 4346else
c971b7fa
PA
4347 ac_build_alias=$build_alias
4348test "x$ac_build_alias" = x &&
4349 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4350test "x$ac_build_alias" = x &&
4351 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4352ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4353 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4354
770d76d7 4355fi
c971b7fa
PA
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4357$as_echo "$ac_cv_build" >&6; }
4358case $ac_cv_build in
4359*-*-*) ;;
4360*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4361esac
c971b7fa
PA
4362build=$ac_cv_build
4363ac_save_IFS=$IFS; IFS='-'
4364set x $ac_cv_build
4365shift
4366build_cpu=$1
4367build_vendor=$2
4368shift; shift
4369# Remember, the first character of IFS is used to create $*,
4370# except with old shells:
4371build_os=$*
4372IFS=$ac_save_IFS
4373case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4374
4375
c971b7fa
PA
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4377$as_echo_n "checking host system type... " >&6; }
4378if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4379 $as_echo_n "(cached) " >&6
4380else
c971b7fa
PA
4381 if test "x$host_alias" = x; then
4382 ac_cv_host=$ac_cv_build
81ecdfbb 4383else
c971b7fa
PA
4384 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4385 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4386fi
81ecdfbb
RW
4387
4388fi
c971b7fa
PA
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4390$as_echo "$ac_cv_host" >&6; }
4391case $ac_cv_host in
4392*-*-*) ;;
4393*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4394esac
c971b7fa
PA
4395host=$ac_cv_host
4396ac_save_IFS=$IFS; IFS='-'
4397set x $ac_cv_host
4398shift
4399host_cpu=$1
4400host_vendor=$2
4401shift; shift
4402# Remember, the first character of IFS is used to create $*,
4403# except with old shells:
4404host_os=$*
4405IFS=$ac_save_IFS
4406case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4407
4408
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4410$as_echo_n "checking target system type... " >&6; }
4411if test "${ac_cv_target+set}" = set; then :
4412 $as_echo_n "(cached) " >&6
4413else
4414 if test "x$target_alias" = x; then
4415 ac_cv_target=$ac_cv_host
4416else
4417 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4418 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4419fi
4420
4421fi
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4423$as_echo "$ac_cv_target" >&6; }
4424case $ac_cv_target in
4425*-*-*) ;;
4426*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4427esac
4428target=$ac_cv_target
4429ac_save_IFS=$IFS; IFS='-'
4430set x $ac_cv_target
4431shift
4432target_cpu=$1
4433target_vendor=$2
4434shift; shift
4435# Remember, the first character of IFS is used to create $*,
4436# except with old shells:
4437target_os=$*
4438IFS=$ac_save_IFS
4439case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4440
4441
4442# The aliases save the names the user supplied, while $host etc.
4443# will get canonicalized.
4444test -n "$target_alias" &&
4445 test "$program_prefix$program_suffix$program_transform_name" = \
4446 NONENONEs,x,x, &&
4447 program_prefix=${target_alias}-
4448
4449# The tests for host and target for $enable_largefile require
4450# canonical names.
4451
4452
81ecdfbb 4453
da2f07f1
JK
4454# As the $enable_largefile decision depends on --enable-plugins we must set it
4455# even in directories otherwise not depending on the $plugins option.
4456
4457
2974be62
AM
4458 maybe_plugins=no
4459 for ac_header in dlfcn.h
4460do :
4461 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4462"
4463if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4464 cat >>confdefs.h <<_ACEOF
4465#define HAVE_DLFCN_H 1
4466_ACEOF
4467 maybe_plugins=yes
4468fi
4469
4470done
4471
4472 for ac_header in windows.h
4473do :
4474 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4475"
4476if test "x$ac_cv_header_windows_h" = x""yes; then :
4477 cat >>confdefs.h <<_ACEOF
4478#define HAVE_WINDOWS_H 1
4479_ACEOF
4480 maybe_plugins=yes
4481fi
4482
4483done
4484
4485
4486 # Check whether --enable-plugins was given.
da2f07f1
JK
4487if test "${enable_plugins+set}" = set; then :
4488 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4489 no) plugins=no ;;
4490 *) plugins=yes
4491 if test "$maybe_plugins" != "yes" ; then
4492 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4493 fi ;;
4494 esac
da2f07f1 4495else
2974be62
AM
4496 plugins=$maybe_plugins
4497
da2f07f1
JK
4498fi
4499
2974be62
AM
4500 if test "$plugins" = "yes"; then
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4502$as_echo_n "checking for library containing dlopen... " >&6; }
4503if test "${ac_cv_search_dlopen+set}" = set; then :
4504 $as_echo_n "(cached) " >&6
4505else
4506 ac_func_search_save_LIBS=$LIBS
4507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509
4510/* Override any GCC internal prototype to avoid an error.
4511 Use char because int might match the return type of a GCC
4512 builtin and then its argument prototype would still apply. */
4513#ifdef __cplusplus
4514extern "C"
4515#endif
4516char dlopen ();
4517int
4518main ()
4519{
4520return dlopen ();
4521 ;
4522 return 0;
4523}
4524_ACEOF
4525for ac_lib in '' dl; do
4526 if test -z "$ac_lib"; then
4527 ac_res="none required"
4528 else
4529 ac_res=-l$ac_lib
4530 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4531 fi
4532 if ac_fn_c_try_link "$LINENO"; then :
4533 ac_cv_search_dlopen=$ac_res
4534fi
4535rm -f core conftest.err conftest.$ac_objext \
4536 conftest$ac_exeext
4537 if test "${ac_cv_search_dlopen+set}" = set; then :
4538 break
4539fi
4540done
4541if test "${ac_cv_search_dlopen+set}" = set; then :
4542
4543else
4544 ac_cv_search_dlopen=no
4545fi
4546rm conftest.$ac_ext
4547LIBS=$ac_func_search_save_LIBS
4548fi
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4550$as_echo "$ac_cv_search_dlopen" >&6; }
4551ac_res=$ac_cv_search_dlopen
4552if test "$ac_res" != no; then :
4553 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4554
4555fi
4556
4557 fi
da2f07f1
JK
4558
4559
4560case "${host}" in
4561 sparc-*-solaris*|i[3-7]86-*-solaris*)
4562 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4563 # are mutually exclusive; and without procfs support, the bfd/ elf module
4564 # cannot provide certain routines such as elfcore_write_prpsinfo
4565 # or elfcore_write_prstatus. So unless the user explicitly requested
4566 # large-file support through the --enable-largefile switch, disable
4567 # large-file support in favor of procfs support.
4568 test "${target}" = "${host}" -a "x$plugins" = xno \
4569 && : ${enable_largefile="no"}
4570 ;;
4571esac
4572
4573# Check whether --enable-largefile was given.
4574if test "${enable_largefile+set}" = set; then :
4575 enableval=$enable_largefile;
4576fi
4577
4578if test "$enable_largefile" != no; then
4579
4580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4581$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4582if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4583 $as_echo_n "(cached) " >&6
4584else
4585 ac_cv_sys_largefile_CC=no
4586 if test "$GCC" != yes; then
4587 ac_save_CC=$CC
4588 while :; do
4589 # IRIX 6.2 and later do not support large files by default,
4590 # so use the C compiler's -n32 option if that helps.
4591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592/* end confdefs.h. */
4593#include <sys/types.h>
4594 /* Check that off_t can represent 2**63 - 1 correctly.
4595 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4596 since some C++ compilers masquerading as C compilers
4597 incorrectly reject 9223372036854775807. */
4598#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4599 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4600 && LARGE_OFF_T % 2147483647 == 1)
4601 ? 1 : -1];
4602int
4603main ()
4604{
4605
4606 ;
4607 return 0;
4608}
4609_ACEOF
4610 if ac_fn_c_try_compile "$LINENO"; then :
4611 break
4612fi
4613rm -f core conftest.err conftest.$ac_objext
4614 CC="$CC -n32"
4615 if ac_fn_c_try_compile "$LINENO"; then :
4616 ac_cv_sys_largefile_CC=' -n32'; break
4617fi
4618rm -f core conftest.err conftest.$ac_objext
4619 break
4620 done
4621 CC=$ac_save_CC
4622 rm -f conftest.$ac_ext
4623 fi
4624fi
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4626$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4627 if test "$ac_cv_sys_largefile_CC" != no; then
4628 CC=$CC$ac_cv_sys_largefile_CC
4629 fi
4630
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4632$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4633if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 while :; do
4637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4638/* end confdefs.h. */
4639#include <sys/types.h>
4640 /* Check that off_t can represent 2**63 - 1 correctly.
4641 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4642 since some C++ compilers masquerading as C compilers
4643 incorrectly reject 9223372036854775807. */
4644#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4645 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4646 && LARGE_OFF_T % 2147483647 == 1)
4647 ? 1 : -1];
4648int
4649main ()
4650{
4651
4652 ;
4653 return 0;
4654}
4655_ACEOF
4656if ac_fn_c_try_compile "$LINENO"; then :
4657 ac_cv_sys_file_offset_bits=no; break
4658fi
4659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661/* end confdefs.h. */
4662#define _FILE_OFFSET_BITS 64
4663#include <sys/types.h>
4664 /* Check that off_t can represent 2**63 - 1 correctly.
4665 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4666 since some C++ compilers masquerading as C compilers
4667 incorrectly reject 9223372036854775807. */
4668#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4669 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4670 && LARGE_OFF_T % 2147483647 == 1)
4671 ? 1 : -1];
4672int
4673main ()
4674{
4675
4676 ;
4677 return 0;
4678}
4679_ACEOF
4680if ac_fn_c_try_compile "$LINENO"; then :
4681 ac_cv_sys_file_offset_bits=64; break
4682fi
4683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4684 ac_cv_sys_file_offset_bits=unknown
4685 break
4686done
4687fi
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4689$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4690case $ac_cv_sys_file_offset_bits in #(
4691 no | unknown) ;;
4692 *)
4693cat >>confdefs.h <<_ACEOF
4694#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4695_ACEOF
4696;;
4697esac
4698rm -rf conftest*
4699 if test $ac_cv_sys_file_offset_bits = unknown; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4701$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4702if test "${ac_cv_sys_large_files+set}" = set; then :
4703 $as_echo_n "(cached) " >&6
4704else
4705 while :; do
4706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4707/* end confdefs.h. */
4708#include <sys/types.h>
4709 /* Check that off_t can represent 2**63 - 1 correctly.
4710 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4711 since some C++ compilers masquerading as C compilers
4712 incorrectly reject 9223372036854775807. */
4713#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4714 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4715 && LARGE_OFF_T % 2147483647 == 1)
4716 ? 1 : -1];
4717int
4718main ()
4719{
4720
4721 ;
4722 return 0;
4723}
4724_ACEOF
4725if ac_fn_c_try_compile "$LINENO"; then :
4726 ac_cv_sys_large_files=no; break
4727fi
4728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4730/* end confdefs.h. */
4731#define _LARGE_FILES 1
4732#include <sys/types.h>
4733 /* Check that off_t can represent 2**63 - 1 correctly.
4734 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4735 since some C++ compilers masquerading as C compilers
4736 incorrectly reject 9223372036854775807. */
4737#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4738 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4739 && LARGE_OFF_T % 2147483647 == 1)
4740 ? 1 : -1];
4741int
4742main ()
4743{
4744
4745 ;
4746 return 0;
4747}
4748_ACEOF
4749if ac_fn_c_try_compile "$LINENO"; then :
4750 ac_cv_sys_large_files=1; break
4751fi
4752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4753 ac_cv_sys_large_files=unknown
4754 break
4755done
4756fi
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4758$as_echo "$ac_cv_sys_large_files" >&6; }
4759case $ac_cv_sys_large_files in #(
4760 no | unknown) ;;
4761 *)
4762cat >>confdefs.h <<_ACEOF
4763#define _LARGE_FILES $ac_cv_sys_large_files
4764_ACEOF
4765;;
4766esac
4767rm -rf conftest*
4768 fi
4769fi
4770
4771
4772
81ecdfbb
RW
4773
4774
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4776$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4777if test "${am_cv_prog_cc_stdc+set}" = set; then :
4778 $as_echo_n "(cached) " >&6
4779else
4780 am_cv_prog_cc_stdc=no
4781ac_save_CC="$CC"
4782# Don't try gcc -ansi; that turns off useful extensions and
4783# breaks some systems' header files.
4784# AIX -qlanglvl=ansi
4785# Ultrix and OSF/1 -std1
4786# HP-UX 10.20 and later -Ae
4787# HP-UX older versions -Aa -D_HPUX_SOURCE
4788# SVR4 -Xc -D__EXTENSIONS__
4789for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4790do
783e057b 4791 CC="$ac_save_CC $ac_arg"
81ecdfbb 4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4793/* end confdefs.h. */
4794#include <stdarg.h>
4795#include <stdio.h>
4796#include <sys/types.h>
4797#include <sys/stat.h>
4798/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4799struct buf { int x; };
4800FILE * (*rcsopen) (struct buf *, struct stat *, int);
4801static char *e (p, i)
4802 char **p;
4803 int i;
4804{
4805 return p[i];
4806}
4807static char *f (char * (*g) (char **, int), char **p, ...)
4808{
4809 char *s;
4810 va_list v;
4811 va_start (v,p);
4812 s = g (p, va_arg (v,int));
4813 va_end (v);
4814 return s;
4815}
4816int test (int i, double x);
4817struct s1 {int (*f) (int a);};
4818struct s2 {int (*f) (double a);};
4819int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4820int argc;
4821char **argv;
4822
4823int
4824main ()
4825{
4826
4827return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4828
4829 ;
4830 return 0;
4831}
4832_ACEOF
81ecdfbb 4833if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4834 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4835fi
81ecdfbb 4836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4837done
4838CC="$ac_save_CC"
4839
4840fi
4841
4842if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4844$as_echo "none needed" >&6; }
783e057b 4845else
81ecdfbb
RW
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4847$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4848fi
4849case "x$am_cv_prog_cc_stdc" in
4850 x|xno) ;;
4851 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4852esac
4853
4869db5e
RM
4854# expand $ac_aux_dir to an absolute path
4855am_aux_dir=`cd $ac_aux_dir && pwd`
4856
4857if test x"${install_sh}" != xset; then
4858 case $am_aux_dir in
4859 *\ * | *\ *)
4860 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4861 *)
4862 install_sh="\${SHELL} $am_aux_dir/install-sh"
4863 esac
4864fi
4865
4866# Installed binaries are usually stripped using `strip' when the user
4867# run `make install-strip'. However `strip' might not be the right
4868# tool to use in cross-compilation environments, therefore Automake
4869# will honor the `STRIP' environment variable to overrule this program.
4870if test "$cross_compiling" != no; then
4871 if test -n "$ac_tool_prefix"; then
4872 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4873set dummy ${ac_tool_prefix}strip; ac_word=$2
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if test "${ac_cv_prog_STRIP+set}" = set; then :
4877 $as_echo_n "(cached) " >&6
4878else
4879 if test -n "$STRIP"; then
4880 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4881else
4882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4883for as_dir in $PATH
4884do
4885 IFS=$as_save_IFS
4886 test -z "$as_dir" && as_dir=.
4887 for ac_exec_ext in '' $ac_executable_extensions; do
4888 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4889 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4891 break 2
4892 fi
4893done
4894 done
4895IFS=$as_save_IFS
4896
4897fi
4898fi
4899STRIP=$ac_cv_prog_STRIP
4900if test -n "$STRIP"; then
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4902$as_echo "$STRIP" >&6; }
4903else
4904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4905$as_echo "no" >&6; }
4906fi
4907
4908
4909fi
4910if test -z "$ac_cv_prog_STRIP"; then
4911 ac_ct_STRIP=$STRIP
4912 # Extract the first word of "strip", so it can be a program name with args.
4913set dummy strip; ac_word=$2
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
4916if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4917 $as_echo_n "(cached) " >&6
4918else
4919 if test -n "$ac_ct_STRIP"; then
4920 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4921else
4922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in $PATH
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4929 ac_cv_prog_ac_ct_STRIP="strip"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937fi
4938fi
4939ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4940if test -n "$ac_ct_STRIP"; then
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4942$as_echo "$ac_ct_STRIP" >&6; }
4943else
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4945$as_echo "no" >&6; }
4946fi
4947
4948 if test "x$ac_ct_STRIP" = x; then
4949 STRIP=":"
4950 else
4951 case $cross_compiling:$ac_tool_warned in
4952yes:)
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4954$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4955ac_tool_warned=yes ;;
4956esac
4957 STRIP=$ac_ct_STRIP
4958 fi
4959else
4960 STRIP="$ac_cv_prog_STRIP"
4961fi
4962
4963fi
4964INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4965
783e057b
DJ
4966
4967ac_aux_dir=
81ecdfbb
RW
4968for ac_dir in .. "$srcdir"/..; do
4969 for ac_t in install-sh install.sh shtool; do
4970 if test -f "$ac_dir/$ac_t"; then
4971 ac_aux_dir=$ac_dir
4972 ac_install_sh="$ac_aux_dir/$ac_t -c"
4973 break 2
4974 fi
4975 done
783e057b
DJ
4976done
4977if test -z "$ac_aux_dir"; then
81ecdfbb 4978 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4979fi
81ecdfbb
RW
4980
4981# These three variables are undocumented and unsupported,
4982# and are intended to be withdrawn in a future Autoconf release.
4983# They can cause serious problems if a builder's source tree is in a directory
4984# whose full name contains unusual characters.
4985ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4986ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4987ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4988
783e057b 4989
783e057b 4990
9009e1ae
MR
4991test "$program_prefix" != NONE &&
4992 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4993# Use a double $ so make ignores it.
4994test "$program_suffix" != NONE &&
4995 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4996# Double any \ or $.
4997# By default was `s,x,x', remove it if useless.
4998ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4999program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5000
81ecdfbb 5001
3bc3d82a
PA
5002# See if we are building with C++, and substitute COMPILER.
5003
5004 # Check whether --enable-build-with-cxx was given.
5005if test "${enable_build_with_cxx+set}" = set; then :
5006 enableval=$enable_build_with_cxx; case $enableval in
5007 yes | no)
5008 ;;
5009 *)
5010 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
5011 esac
5012else
5013 enable_build_with_cxx=no
5014fi
5015
5016
5017 if test "$enable_build_with_cxx" = "yes"; then
5018 # We're using -fpermissive as shortcut for now.
5019 COMPILER='$(CXX) -fpermissive'
5020 else
5021 COMPILER='$(CC)'
5022 fi
5023
5024
5025
a417dc56
RW
5026# Dependency checking.
5027rm -rf .tst 2>/dev/null
5028mkdir .tst 2>/dev/null
5029if test -d .tst; then
5030 am__leading_dot=.
5031else
5032 am__leading_dot=_
5033fi
5034rmdir .tst 2>/dev/null
5035
5036DEPDIR="${am__leading_dot}deps"
5037
81ecdfbb 5038ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5039
5040
5041depcc="$CC" am_compiler_list=
5042
5043am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5045$as_echo_n "checking dependency style of $depcc... " >&6; }
5046if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5047 $as_echo_n "(cached) " >&6
a417dc56
RW
5048else
5049 if test -f "$am_depcomp"; then
5050 # We make a subdir and do the tests there. Otherwise we can end up
5051 # making bogus files that we don't know about and never remove. For
5052 # instance it was reported that on HP-UX the gcc test will end up
5053 # making a dummy file named `D' -- because `-MD' means `put the output
5054 # in D'.
5055 mkdir conftest.dir
5056 # Copy depcomp to subdir because otherwise we won't find it if we're
5057 # using a relative directory.
5058 cp "$am_depcomp" conftest.dir
5059 cd conftest.dir
5060 # We will build objects and dependencies in a subdirectory because
5061 # it helps to detect inapplicable dependency modes. For instance
5062 # both Tru64's cc and ICC support -MD to output dependencies as a
5063 # side effect of compilation, but ICC will put the dependencies in
5064 # the current directory while Tru64 will put them in the object
5065 # directory.
5066 mkdir sub
5067
5068 am_cv_CC_dependencies_compiler_type=none
5069 if test "$am_compiler_list" = ""; then
5070 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5071 fi
5072 for depmode in $am_compiler_list; do
5073 if test $depmode = none; then break; fi
5074
81ecdfbb 5075 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5076 # Setup a source with many dependencies, because some compilers
5077 # like to wrap large dependency lists on column 80 (with \), and
5078 # we should not choose a depcomp mode which is confused by this.
5079 #
5080 # We need to recreate these files for each test, as the compiler may
5081 # overwrite some of them when testing with obscure command lines.
5082 # This happens at least with the AIX C compiler.
5083 : > sub/conftest.c
5084 for i in 1 2 3 4 5 6; do
5085 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5086 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5087 # Solaris 8's {/usr,}/bin/sh.
5088 touch sub/conftst$i.h
5089 done
5090 echo "include sub/conftest.Po" > confmf
5091
5092 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5093 # mode. It turns out that the SunPro C++ compiler does not properly
5094 # handle `-M -o', and we need to detect this.
5095 depcmd="depmode=$depmode \
5096 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5097 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5098 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5099 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5100 if env $depcmd > conftest.err 2>&1 &&
5101 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5102 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5103 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5104 # icc doesn't choke on unknown options, it will just issue warnings
5105 # or remarks (even with -Werror). So we grep stderr for any message
5106 # that says an option was ignored or not supported.
5107 # When given -MP, icc 7.0 and 7.1 complain thusly:
5108 # icc: Command line warning: ignoring option '-M'; no argument required
5109 # The diagnosis changed in icc 8.0:
5110 # icc: Command line remark: option '-MP' not supported
5111 if (grep 'ignoring option' conftest.err ||
5112 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5113 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5114 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5115 break
5116 fi
5117 fi
81ecdfbb 5118 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5119 sed -e 's/^/| /' < conftest.err >&5
5120 done
5121
5122 cd ..
5123 rm -rf conftest.dir
5124else
5125 am_cv_CC_dependencies_compiler_type=none
5126fi
5127
5128fi
81ecdfbb
RW
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5130$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5131if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5132then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5133else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5134
5135fi
5136
5137
5138# Check for the 'make' the user wants to use.
5139for ac_prog in make
5140do
5141 # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if test "${ac_cv_prog_MAKE+set}" = set; then :
5146 $as_echo_n "(cached) " >&6
a417dc56
RW
5147else
5148 if test -n "$MAKE"; then
5149 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5150else
5151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152for as_dir in $PATH
5153do
5154 IFS=$as_save_IFS
5155 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5156 for ac_exec_ext in '' $ac_executable_extensions; do
5157 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5158 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5160 break 2
5161 fi
5162done
81ecdfbb
RW
5163 done
5164IFS=$as_save_IFS
a417dc56
RW
5165
5166fi
5167fi
5168MAKE=$ac_cv_prog_MAKE
5169if test -n "$MAKE"; then
81ecdfbb
RW
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5171$as_echo "$MAKE" >&6; }
a417dc56 5172else
81ecdfbb
RW
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174$as_echo "no" >&6; }
a417dc56
RW
5175fi
5176
81ecdfbb 5177
a417dc56
RW
5178 test -n "$MAKE" && break
5179done
5180
5181MAKE_IS_GNU=
5182case "`$MAKE --version 2>&1 | sed 1q`" in
5183 *GNU*)
5184 MAKE_IS_GNU=yes
5185 ;;
5186esac
81ecdfbb 5187 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5188 GMAKE_TRUE=
5189 GMAKE_FALSE='#'
5190else
5191 GMAKE_TRUE='#'
5192 GMAKE_FALSE=
5193fi
5194
81ecdfbb
RW
5195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5196$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5197set x ${MAKE-make}
5198ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5199if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5200 $as_echo_n "(cached) " >&6
a417dc56
RW
5201else
5202 cat >conftest.make <<\_ACEOF
81ecdfbb 5203SHELL = /bin/sh
a417dc56 5204all:
81ecdfbb 5205 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5206_ACEOF
5207# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5208case `${MAKE-make} -f conftest.make 2>/dev/null` in
5209 *@@@%%%=?*=@@@%%%*)
5210 eval ac_cv_prog_make_${ac_make}_set=yes;;
5211 *)
5212 eval ac_cv_prog_make_${ac_make}_set=no;;
5213esac
a417dc56
RW
5214rm -f conftest.make
5215fi
81ecdfbb
RW
5216if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5218$as_echo "yes" >&6; }
a417dc56
RW
5219 SET_MAKE=
5220else
81ecdfbb
RW
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5222$as_echo "no" >&6; }
a417dc56
RW
5223 SET_MAKE="MAKE=${MAKE-make}"
5224fi
5225
5226
648d586d
JB
5227gnulib_extra_configure_args=
5228# If large-file support is disabled, make sure gnulib does the same.
5229if test "$enable_largefile" = no; then
5230gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5231fi
5232
c971b7fa
PA
5233# Configure gnulib. We need to build gnulib under some other
5234# directory not "gnulib", to avoid the problem of both GDB and
5235# GDBserver wanting to build it in the same directory, when building
5236# in the source dir.
783e057b 5237
c971b7fa
PA
5238 in_src="gnulib"
5239 in_build="build-gnulib"
648d586d 5240 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5241
5242 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5243 # so they do not pile up.
5244 ac_sub_configure_args=
5245 ac_prev=
5246 eval "set x $ac_configure_args"
5247 shift
5248 for ac_arg
5249 do
5250 if test -n "$ac_prev"; then
5251 ac_prev=
5252 continue
5253 fi
5254 case $ac_arg in
5255 -cache-file | --cache-file | --cache-fil | --cache-fi \
5256 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5257 ac_prev=cache_file ;;
5258 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5259 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5260 | --c=*)
5261 ;;
5262 --config-cache | -C)
5263 ;;
5264 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5265 ac_prev=srcdir ;;
5266 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5267 ;;
5268 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5269 ac_prev=prefix ;;
5270 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5271 ;;
5272 --disable-option-checking)
5273 ;;
5274 *)
5275 case $ac_arg in
5276 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5277 esac
5278 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5279 esac
5280 done
5281
5282 # Always prepend --prefix to ensure using the same prefix
5283 # in subdir configurations.
5284 ac_arg="--prefix=$prefix"
5285 case $ac_arg in
5286 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5287 esac
5288 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5289
5290 # Pass --silent
5291 if test "$silent" = yes; then
5292 ac_sub_configure_args="--silent $ac_sub_configure_args"
5293 fi
5294
5295 # Always prepend --disable-option-checking to silence warnings, since
5296 # different subdirs can have different --enable and --with options.
5297 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5298
5299 ac_popdir=`pwd`
5300 ac_dir=$in_build
5301
5302 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5303 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5304 $as_echo "$ac_msg" >&6
5305 as_dir="$ac_dir"; as_fn_mkdir_p
5306
38ea300a
PA
5307 case $srcdir in
5308 [\\/]* | ?:[\\/]* )
5309 ac_srcdir=$srcdir/$in_src ;;
5310 *) # Relative name.
5311 ac_srcdir=../$srcdir/$in_src ;;
5312 esac
c971b7fa
PA
5313
5314 cd "$ac_dir"
5315
5316 ac_sub_configure=$ac_srcdir/configure
5317
5318 # Make the cache file name correct relative to the subdirectory.
5319 case $cache_file in
5320 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5321 *) # Relative name.
5322 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5323 esac
5324
648d586d
JB
5325 if test -n "$in_extra_args"; then
5326 # Add the extra args at the end.
5327 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5328 fi
5329
c971b7fa
PA
5330 { $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
5331$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5332 # The eval makes quoting arguments work.
5333 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5334 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5335 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5336
5337 cd "$ac_popdir"
783e057b 5338
c971b7fa
PA
5339
5340
5341CONFIG_OBS=
5342CONFIG_DEPS=
5343CONFIG_SRCS=
5344ENABLE_CFLAGS=
5345
5346CONFIG_ALL=
5347CONFIG_CLEAN=
5348CONFIG_INSTALL=
5349CONFIG_UNINSTALL=
5350
5351# If we haven't got the data from the intl directory,
5352# assume NLS is disabled.
5353USE_NLS=no
5354LIBINTL=
5355LIBINTL_DEP=
5356INCINTL=
5357XGETTEXT=
5358GMSGFMT=
5359POSUB=
783e057b
DJ
5360
5361if test -f ../intl/config.intl; then
5362 . ../intl/config.intl
5363fi
81ecdfbb
RW
5364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5365$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5366if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368$as_echo "no" >&6; }
783e057b 5369else
81ecdfbb
RW
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5371$as_echo "yes" >&6; }
783e057b 5372
81ecdfbb 5373$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5374
5375
81ecdfbb
RW
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5377$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5378 # Look for .po and .gmo files in the source directory.
5379 CATALOGS=
5380 XLINGUAS=
5381 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5382 # If there aren't any .gmo files the shell will give us the
5383 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5384 # weeded out.
5385 case "$cat" in *\**)
5386 continue;;
5387 esac
5388 # The quadruple backslash is collapsed to a double backslash
5389 # by the backticks, then collapsed again by the double quotes,
5390 # leaving us with one backslash in the sed expression (right
5391 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5392 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5393 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5394 # The user is allowed to set LINGUAS to a list of languages to
5395 # install catalogs for. If it's empty that means "all of them."
5396 if test "x$LINGUAS" = x; then
5397 CATALOGS="$CATALOGS $cat"
5398 XLINGUAS="$XLINGUAS $lang"
5399 else
5400 case "$LINGUAS" in *$lang*)
5401 CATALOGS="$CATALOGS $cat"
5402 XLINGUAS="$XLINGUAS $lang"
5403 ;;
5404 esac
e28b3332
DJ
5405 fi
5406 done
c971b7fa
PA
5407 LINGUAS="$XLINGUAS"
5408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5409$as_echo "$LINGUAS" >&6; }
5410
5411
5412 DATADIRNAME=share
5413
5414 INSTOBJEXT=.mo
5415
5416 GENCAT=gencat
5417
5418 CATOBJEXT=.gmo
e28b3332 5419
e28b3332
DJ
5420fi
5421
c971b7fa
PA
5422localedir='${datadir}/locale'
5423
5424
5425if test x"$USE_NLS" = xyes; then
5426 CONFIG_ALL="$CONFIG_ALL all-po"
5427 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5428 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5429 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5430fi
e28b3332 5431
c971b7fa
PA
5432GNULIB=build-gnulib/import
5433
5434# For Makefile dependencies.
5435GNULIB_STDINT_H=
5436if test x"$STDINT_H" != x; then
5437 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5438fi
5439
5440
c971b7fa
PA
5441PACKAGE=gdb
5442
5443cat >>confdefs.h <<_ACEOF
5444#define PACKAGE "$PACKAGE"
5445_ACEOF
5446
5447
5448
5449# We never need to detect it in this sub-configure.
5450# But preserve it for config.status --recheck.
5451
5452
5453
5454MAKEINFO_EXTRA_FLAGS=""
5455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5456$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5457if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5458 $as_echo_n "(cached) " >&6
5459else
5460 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5461 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5462 gdb_cv_have_makeinfo_click=yes
5463 else
5464 gdb_cv_have_makeinfo_click=no
5465 fi
5466fi
5467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5468$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5469if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5470 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5471fi
e28b3332
DJ
5472
5473
bec39cab
AC
5474
5475
81ecdfbb
RW
5476# Check whether --with-separate-debug-dir was given.
5477if test "${with_separate_debug_dir+set}" = set; then :
5478 withval=$with_separate_debug_dir;
b14b1491
TT
5479 DEBUGDIR=$withval
5480else
5481 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5482fi
5483
20e95c23 5484
783e057b
DJ
5485 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5486 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5487 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5488 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5489
783e057b
DJ
5490cat >>confdefs.h <<_ACEOF
5491#define DEBUGDIR "$ac_define_dir"
20e95c23 5492_ACEOF
20e95c23 5493
20e95c23 5494
20e95c23 5495
0c4a4063 5496
b14b1491
TT
5497 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5498 if test "x$prefix" = xNONE; then
5499 test_prefix=/usr/local
5500 else
5501 test_prefix=$prefix
5502 fi
783e057b 5503 else
b14b1491 5504 test_prefix=$exec_prefix
783e057b 5505 fi
b14b1491
TT
5506 value=0
5507 case ${ac_define_dir} in
5508 "${test_prefix}"|"${test_prefix}/"*|\
5509 '${exec_prefix}'|'${exec_prefix}/'*)
5510 value=1
5511 ;;
5512 esac
5513
5514cat >>confdefs.h <<_ACEOF
5515#define DEBUGDIR_RELOCATABLE $value
5516_ACEOF
5517
5518
5519
0c4a4063 5520
f83d8a90
DE
5521# We can't pass paths as command line arguments.
5522# Mingw32 tries to be clever and will convert the paths for us.
5523# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5524# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5525# This breaks GDB's relocatable path conversions since paths passed in
5526# config.h would not get so translated, the path prefixes no longer match.
5527
5528 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5529 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5530 ac_define_dir=`eval echo $bindir`
5531 ac_define_dir=`eval echo $ac_define_dir`
5532
5533cat >>confdefs.h <<_ACEOF
5534#define BINDIR "$ac_define_dir"
5535_ACEOF
5536
5537
5538
b14b1491
TT
5539# GDB's datadir relocation
5540
5541
5542
81ecdfbb
RW
5543# Check whether --with-gdb-datadir was given.
5544if test "${with_gdb_datadir+set}" = set; then :
5545 withval=$with_gdb_datadir;
b14b1491 5546 GDB_DATADIR=$withval
20e95c23 5547else
b14b1491 5548 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5549fi
5550
20e95c23 5551
b14b1491
TT
5552 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5553 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5554 ac_define_dir=`eval echo $GDB_DATADIR`
5555 ac_define_dir=`eval echo $ac_define_dir`
5556
5557cat >>confdefs.h <<_ACEOF
5558#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5559_ACEOF
5560
b14b1491
TT
5561
5562
0c4a4063 5563
b14b1491
TT
5564 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5565 if test "x$prefix" = xNONE; then
5566 test_prefix=/usr/local
5567 else
5568 test_prefix=$prefix
5569 fi
5570 else
5571 test_prefix=$exec_prefix
5572 fi
5573 value=0
5574 case ${ac_define_dir} in
5575 "${test_prefix}"|"${test_prefix}/"*|\
5576 '${exec_prefix}'|'${exec_prefix}/'*)
5577 value=1
5578 ;;
5579 esac
5580
5581cat >>confdefs.h <<_ACEOF
5582#define GDB_DATADIR_RELOCATABLE $value
5583_ACEOF
5584
5585
783e057b 5586
20e95c23 5587
0c4a4063 5588
81ecdfbb
RW
5589# Check whether --with-relocated-sources was given.
5590if test "${with_relocated_sources+set}" = set; then :
5591 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5592
5593 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5594 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5595 ac_define_dir=`eval echo $reloc_srcdir`
5596 ac_define_dir=`eval echo $ac_define_dir`
5597
5598cat >>confdefs.h <<_ACEOF
5599#define RELOC_SRCDIR "$ac_define_dir"
5600_ACEOF
5601
5602
5603
81ecdfbb
RW
5604fi
5605
29b0e8a2 5606
7349ff92
JK
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5608$as_echo_n "checking for default auto-load directory... " >&6; }
5609
5610# Check whether --with-auto-load-dir was given.
5611if test "${with_auto_load_dir+set}" = set; then :
5612 withval=$with_auto_load_dir;
5613else
1564a261 5614 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5615fi
5616
1564a261 5617escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5618
5619 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5620 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5621 ac_define_dir=`eval echo $escape_dir`
5622 ac_define_dir=`eval echo $ac_define_dir`
5623
5624cat >>confdefs.h <<_ACEOF
5625#define AUTO_LOAD_DIR "$ac_define_dir"
5626_ACEOF
5627
5628
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5630$as_echo "$with_auto_load_dir" >&6; }
5631
bccbefd2
JK
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5633$as_echo_n "checking for default auto-load safe-path... " >&6; }
5634
5635# Check whether --with-auto-load-safe-path was given.
5636if test "${with_auto_load_safe_path+set}" = set; then :
5637 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5638 with_auto_load_safe_path="/"
5639 fi
bccbefd2 5640else
7349ff92 5641 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5642fi
5643
1564a261 5644escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5645
5646 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5647 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5648 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5649 ac_define_dir=`eval echo $ac_define_dir`
5650
5651cat >>confdefs.h <<_ACEOF
6dea1fbd 5652#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5653_ACEOF
5654
5655
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5657$as_echo "$with_auto_load_safe_path" >&6; }
5658
29b0e8a2 5659
20e95c23 5660
5ae98d25 5661subdirs="$subdirs testsuite"
20e95c23
DJ
5662
5663
783e057b 5664# Check whether to support alternative target configurations
81ecdfbb
RW
5665# Check whether --enable-targets was given.
5666if test "${enable_targets+set}" = set; then :
5667 enableval=$enable_targets; case "${enableval}" in
5668 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5669 ;;
5670 no) enable_targets= ;;
5671 *) enable_targets=$enableval ;;
5672esac
81ecdfbb
RW
5673fi
5674
20e95c23 5675
783e057b 5676# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5677# Check whether --enable-64-bit-bfd was given.
5678if test "${enable_64_bit_bfd+set}" = set; then :
5679 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5680 yes) want64=true ;;
5681 no) want64=false ;;
81ecdfbb 5682 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5683esac
5684else
5685 want64=false
81ecdfbb
RW
5686fi
5687
783e057b
DJ
5688# Provide defaults for some variables set by the per-host and per-target
5689# configuration.
5690gdb_host_obs=posix-hdep.o
20e95c23 5691
783e057b
DJ
5692if test "${target}" = "${host}"; then
5693 gdb_native=yes
5694else
5695 gdb_native=no
5696fi
20e95c23 5697
783e057b 5698. $srcdir/configure.host
20e95c23 5699
fb23d554
SDJ
5700# Add in the common host objects.
5701. $srcdir/common/common.host
5702gdb_host_obs="$gdb_host_obs $common_host_obs"
5703
783e057b 5704# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5705
783e057b
DJ
5706TARGET_OBS=
5707all_targets=
b292c783 5708HAVE_NATIVE_GCORE_TARGET=
20e95c23 5709
783e057b 5710for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5711do
783e057b
DJ
5712 if test "$targ_alias" = "all"; then
5713 all_targets=true
5714 else
5715 # Canonicalize the secondary target names.
5716 result=`$ac_config_sub $targ_alias 2>/dev/null`
5717 if test -n "$result"; then
5718 targ=$result
5719 else
5720 targ=$targ_alias
5721 fi
20e95c23 5722
783e057b 5723 . ${srcdir}/configure.tgt
20e95c23 5724
bf307134
JB
5725 if test -z "${gdb_target_obs}"; then :
5726 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5727fi
5728
783e057b
DJ
5729 # Target-specific object files
5730 for i in ${gdb_target_obs}; do
5731 case " $TARGET_OBS " in
5732 *" ${i} "*) ;;
5733 *)
5734 TARGET_OBS="$TARGET_OBS ${i}"
5735 ;;
5736 esac
5737 done
20e95c23 5738
783e057b
DJ
5739 # Check whether this target needs 64-bit CORE_ADDR
5740 if test x${want64} = xfalse; then
5741 . ${srcdir}/../bfd/config.bfd
5742 fi
b292c783
JK
5743
5744 # Check whether this target is native and supports gcore.
5745 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5746 && $gdb_have_gcore; then
5747 HAVE_NATIVE_GCORE_TARGET=1
5748 fi
783e057b 5749 fi
20e95c23
DJ
5750done
5751
783e057b
DJ
5752if test x${all_targets} = xtrue; then
5753
5754 # We want all 64-bit targets if we either:
5755 # - run on a 64-bit host or
5756 # - already require 64-bit support for some other target or
5757 # - the --enable-64-bit-bfd option was supplied
5758 # Otherwise we only support all 32-bit targets.
5759 #
5760 # NOTE: This test must be in sync with the corresponding
5761 # tests in BFD!
20e95c23 5762
783e057b 5763 if test x${want64} = xfalse; then
81ecdfbb
RW
5764 # The cast to long int works around a bug in the HP C Compiler
5765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5767# This bug is HP SR number 8606223364.
5768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5769$as_echo_n "checking size of long... " >&6; }
5770if test "${ac_cv_sizeof_long+set}" = set; then :
5771 $as_echo_n "(cached) " >&6
c0993dbe 5772else
81ecdfbb 5773 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5774
81ecdfbb
RW
5775else
5776 if test "$ac_cv_type_long" = yes; then
5777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5779{ as_fn_set_status 77
5780as_fn_error "cannot compute sizeof (long)
5781See \`config.log' for more details." "$LINENO" 5; }; }
5782 else
5783 ac_cv_sizeof_long=0
5784 fi
c0993dbe 5785fi
81ecdfbb 5786
c0993dbe 5787fi
81ecdfbb
RW
5788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5789$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5790
c0993dbe 5791
c0993dbe 5792
c0993dbe
UW
5793cat >>confdefs.h <<_ACEOF
5794#define SIZEOF_LONG $ac_cv_sizeof_long
5795_ACEOF
5796
5797
5798 if test "x${ac_cv_sizeof_long}" = "x8"; then
5799 want64=true
5800 fi
5801 fi
5802 if test x${want64} = xtrue; then
5803 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5804 else
5805 TARGET_OBS='$(ALL_TARGET_OBS)'
5806 fi
5807fi
5808
5809
5810
b292c783 5811
c0993dbe
UW
5812# For other settings, only the main target counts.
5813gdb_sim=
5814gdb_osabi=
5815build_gdbserver=
5816targ=$target; . ${srcdir}/configure.tgt
5817
5818# Fetch the default architecture and default target vector from BFD.
5819targ=$target; . $srcdir/../bfd/config.bfd
5820
5821# We only want the first architecture, so strip off the others if
5822# there is more than one.
5823targ_archs=`echo $targ_archs | sed 's/ .*//'`
5824
5825if test "x$targ_archs" != x; then
5826
5827cat >>confdefs.h <<_ACEOF
5828#define DEFAULT_BFD_ARCH $targ_archs
5829_ACEOF
5830
5831fi
5832if test "x$targ_defvec" != x; then
5833
5834cat >>confdefs.h <<_ACEOF
5835#define DEFAULT_BFD_VEC $targ_defvec
5836_ACEOF
5837
5838fi
5839
c0993dbe
UW
5840# The CLI cannot be disabled yet, but may be in the future.
5841
5842# Enable CLI.
81ecdfbb
RW
5843# Check whether --enable-gdbcli was given.
5844if test "${enable_gdbcli+set}" = set; then :
5845 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5846 yes)
5847 ;;
5848 no)
81ecdfbb 5849 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5850 *)
81ecdfbb 5851 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5852 esac
5853else
5854 enable_gdbcli=yes
81ecdfbb
RW
5855fi
5856
c0993dbe
UW
5857if test x"$enable_gdbcli" = xyes; then
5858 if test -d $srcdir/cli; then
5859 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5860 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5861 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5862 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5863 fi
5864fi
5865
5866# Enable MI.
81ecdfbb
RW
5867# Check whether --enable-gdbmi was given.
5868if test "${enable_gdbmi+set}" = set; then :
5869 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5870 yes | no)
5871 ;;
5872 *)
81ecdfbb 5873 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5874 esac
5875else
5876 enable_gdbmi=yes
81ecdfbb
RW
5877fi
5878
c0993dbe
UW
5879if test x"$enable_gdbmi" = xyes; then
5880 if test -d $srcdir/mi; then
5881 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5882 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5883 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5884 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5885 fi
5886fi
5887
5888# Enable TUI.
81ecdfbb
RW
5889# Check whether --enable-tui was given.
5890if test "${enable_tui+set}" = set; then :
5891 enableval=$enable_tui; case $enableval in
3ca64bd3 5892 yes | no | auto)
c0993dbe
UW
5893 ;;
5894 *)
81ecdfbb 5895 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5896 esac
5897else
3ca64bd3 5898 enable_tui=auto
81ecdfbb
RW
5899fi
5900
c0993dbe
UW
5901
5902# Enable gdbtk.
81ecdfbb
RW
5903# Check whether --enable-gdbtk was given.
5904if test "${enable_gdbtk+set}" = set; then :
5905 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5906 yes | no)
5907 ;;
5908 *)
81ecdfbb 5909 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5910 esac
5911else
5062cc19 5912 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5913 enable_gdbtk=yes
5914 else
5915 enable_gdbtk=no
5916 fi
81ecdfbb
RW
5917fi
5918
c0993dbe
UW
5919# We unconditionally disable gdbtk tests on selected platforms.
5920case $host_os in
5921 go32* | windows*)
81ecdfbb
RW
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5923$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5924 enable_gdbtk=no ;;
5925esac
5926
05e7c244 5927# Libunwind support for ia64.
bec39cab 5928
05e7c244
JK
5929
5930# Check whether --with-libunwind-ia64 was given.
5931if test "${with_libunwind_ia64+set}" = set; then :
5932 withval=$with_libunwind_ia64;
bec39cab 5933else
05e7c244
JK
5934 with_libunwind_ia64=auto
5935fi
bec39cab 5936
05e7c244
JK
5937
5938# Backward compatibility option.
5939if test "${with_libunwind+set}" = set; then
5940 if test x"$with_libunwind_ia64" != xauto; then
5941 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5942 fi
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5944$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5945 with_libunwind_ia64="$with_libunwind"
5946fi
5947
5948case "$with_libunwind_ia64" in
5949 yes | no)
5950 ;;
5951 auto)
5952 for ac_header in libunwind-ia64.h
81ecdfbb 5953do :
b54a8fd7
PA
5954 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5955if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5956 cat >>confdefs.h <<_ACEOF
b54a8fd7 5957#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5958_ACEOF
5959
5960fi
5961
5962done
5963
05e7c244
JK
5964 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5965 ;;
5966 *)
5967 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5968 ;;
5969esac
bec39cab 5970
05e7c244 5971if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5972 for ac_header in libunwind-ia64.h
81ecdfbb 5973do :
b54a8fd7
PA
5974 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5975if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5976 cat >>confdefs.h <<_ACEOF
b54a8fd7 5977#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5978_ACEOF
5979
5980fi
5981
5982done
5983
05e7c244
JK
5984 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5985 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5986 fi
5987 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5988 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5989 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5990fi
5991
cb01cfba
JB
5992opt_curses=no
5993
81ecdfbb
RW
5994# Check whether --with-curses was given.
5995if test "${with_curses+set}" = set; then :
5996 withval=$with_curses; opt_curses=$withval
5997fi
5998
cb01cfba 5999
76a39ba7 6000prefer_curses=no
cb01cfba 6001if test "$opt_curses" = "yes"; then
76a39ba7 6002 prefer_curses=yes
cb01cfba
JB
6003fi
6004
a9322a30 6005# Profiling support.
81ecdfbb
RW
6006# Check whether --enable-profiling was given.
6007if test "${enable_profiling+set}" = set; then :
6008 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6009 yes | no)
6010 ;;
6011 *)
81ecdfbb 6012 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6013 esac
6014else
6015 enable_profiling=no
81ecdfbb 6016fi
bec39cab 6017
a9322a30
TT
6018
6019for ac_func in monstartup _mcleanup
81ecdfbb
RW
6020do :
6021 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6022ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6023eval as_val=\$$as_ac_var
6024 if test "x$as_val" = x""yes; then :
6025 cat >>confdefs.h <<_ACEOF
6026#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6027_ACEOF
a9322a30 6028
81ecdfbb
RW
6029fi
6030done
a9322a30 6031
81ecdfbb
RW
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6033$as_echo_n "checking for _etext... " >&6; }
6034if test "${ac_cv_var__etext+set}" = set; then :
6035 $as_echo_n "(cached) " >&6
6036else
6037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6038/* end confdefs.h. */
6039#include <stdlib.h>
6040extern char _etext;
a9322a30
TT
6041
6042int
6043main ()
6044{
6045free (&_etext);
6046 ;
6047 return 0;
6048}
bec39cab 6049_ACEOF
81ecdfbb 6050if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6051 ac_cv_var__etext=yes
bec39cab 6052else
81ecdfbb 6053 ac_cv_var__etext=no
bec39cab 6054fi
81ecdfbb
RW
6055rm -f core conftest.err conftest.$ac_objext \
6056 conftest$ac_exeext conftest.$ac_ext
bec39cab 6057fi
81ecdfbb
RW
6058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6059$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6060if test $ac_cv_var__etext = yes; then
60ca704f 6061
81ecdfbb 6062$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6063
bec39cab 6064fi
81ecdfbb
RW
6065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6066$as_echo_n "checking for etext... " >&6; }
6067if test "${ac_cv_var_etext+set}" = set; then :
6068 $as_echo_n "(cached) " >&6
bec39cab 6069else
81ecdfbb 6070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6071/* end confdefs.h. */
a9322a30
TT
6072#include <stdlib.h>
6073extern char etext;
bec39cab
AC
6074
6075int
6076main ()
6077{
a9322a30 6078free (&etext);
bec39cab
AC
6079 ;
6080 return 0;
6081}
6082_ACEOF
81ecdfbb 6083if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6084 ac_cv_var_etext=yes
bec39cab 6085else
81ecdfbb 6086 ac_cv_var_etext=no
bec39cab 6087fi
81ecdfbb
RW
6088rm -f core conftest.err conftest.$ac_objext \
6089 conftest$ac_exeext conftest.$ac_ext
bec39cab 6090fi
81ecdfbb
RW
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6092$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6093if test $ac_cv_var_etext = yes; then
6094
81ecdfbb 6095$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6096
6097fi
a9322a30
TT
6098if test "$enable_profiling" = yes ; then
6099 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6100 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6101 fi
6102 PROFILE_CFLAGS=-pg
6103 OLD_CFLAGS="$CFLAGS"
6104 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6105
81ecdfbb
RW
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6107$as_echo_n "checking whether $CC supports -pg... " >&6; }
6108if test "${ac_cv_cc_supports_pg+set}" = set; then :
6109 $as_echo_n "(cached) " >&6
bec39cab 6110else
81ecdfbb 6111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6112/* end confdefs.h. */
bec39cab
AC
6113
6114int
6115main ()
6116{
a9322a30 6117int x;
bec39cab
AC
6118 ;
6119 return 0;
6120}
6121_ACEOF
81ecdfbb 6122if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6123 ac_cv_cc_supports_pg=yes
bec39cab 6124else
81ecdfbb 6125 ac_cv_cc_supports_pg=no
bec39cab 6126fi
81ecdfbb 6127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6128fi
81ecdfbb
RW
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6130$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6131
a9322a30 6132 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6133 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6134 fi
bec39cab 6135
a9322a30 6136 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6137fi
6138
c16158bc
JM
6139
6140
81ecdfbb
RW
6141# Check whether --with-pkgversion was given.
6142if test "${with_pkgversion+set}" = set; then :
6143 withval=$with_pkgversion; case "$withval" in
6144 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6145 no) PKGVERSION= ;;
6146 *) PKGVERSION="($withval) " ;;
6147 esac
6148else
6149 PKGVERSION="(GDB) "
6150
81ecdfbb 6151fi
c16158bc
JM
6152
6153
6154
6155
81ecdfbb
RW
6156
6157# Check whether --with-bugurl was given.
6158if test "${with_bugurl+set}" = set; then :
6159 withval=$with_bugurl; case "$withval" in
6160 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6161 no) BUGURL=
6162 ;;
6163 *) BUGURL="$withval"
6164 ;;
6165 esac
6166else
6167 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6168
81ecdfbb
RW
6169fi
6170
c16158bc
JM
6171 case ${BUGURL} in
6172 "")
6173 REPORT_BUGS_TO=
6174 REPORT_BUGS_TEXI=
6175 ;;
6176 *)
6177 REPORT_BUGS_TO="<$BUGURL>"
6178 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6179 ;;
6180 esac;
6181
6182
6183
6184
6185cat >>confdefs.h <<_ACEOF
6186#define PKGVERSION "$PKGVERSION"
6187_ACEOF
6188
6189
6190cat >>confdefs.h <<_ACEOF
6191#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6192_ACEOF
6193
6194
bec39cab
AC
6195# --------------------- #
6196# Checks for programs. #
6197# --------------------- #
6198
6199for ac_prog in gawk mawk nawk awk
6200do
6201 # Extract the first word of "$ac_prog", so it can be a program name with args.
6202set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6204$as_echo_n "checking for $ac_word... " >&6; }
6205if test "${ac_cv_prog_AWK+set}" = set; then :
6206 $as_echo_n "(cached) " >&6
bec39cab
AC
6207else
6208 if test -n "$AWK"; then
6209 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6210else
6211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212for as_dir in $PATH
6213do
6214 IFS=$as_save_IFS
6215 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6216 for ac_exec_ext in '' $ac_executable_extensions; do
6217 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6218 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6220 break 2
6221 fi
6222done
81ecdfbb
RW
6223 done
6224IFS=$as_save_IFS
bec39cab
AC
6225
6226fi
6227fi
6228AWK=$ac_cv_prog_AWK
6229if test -n "$AWK"; then
81ecdfbb
RW
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6231$as_echo "$AWK" >&6; }
bec39cab 6232else
81ecdfbb
RW
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6234$as_echo "no" >&6; }
bec39cab
AC
6235fi
6236
bec39cab 6237
81ecdfbb 6238 test -n "$AWK" && break
bec39cab
AC
6239done
6240
c971b7fa
PA
6241# Find a good install program. We prefer a C program (faster),
6242# so one script is as good as another. But avoid the broken or
6243# incompatible versions:
6244# SysV /etc/install, /usr/sbin/install
6245# SunOS /usr/etc/install
6246# IRIX /sbin/install
6247# AIX /bin/install
6248# AmigaOS /C/install, which installs bootblocks on floppy discs
6249# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6250# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6251# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6252# OS/2's system install, which has a completely different semantic
6253# ./install, which can be erroneously created by make from ./install.sh.
6254# Reject install programs that cannot install multiple files.
6255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6256$as_echo_n "checking for a BSD-compatible install... " >&6; }
6257if test -z "$INSTALL"; then
6258if test "${ac_cv_path_install+set}" = set; then :
6259 $as_echo_n "(cached) " >&6
6260else
6261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6262for as_dir in $PATH
6263do
6264 IFS=$as_save_IFS
6265 test -z "$as_dir" && as_dir=.
6266 # Account for people who put trailing slashes in PATH elements.
6267case $as_dir/ in #((
6268 ./ | .// | /[cC]/* | \
6269 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6270 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6271 /usr/ucb/* ) ;;
6272 *)
6273 # OSF1 and SCO ODT 3.0 have their own names for install.
6274 # Don't use installbsd from OSF since it installs stuff as root
6275 # by default.
6276 for ac_prog in ginstall scoinst install; do
6277 for ac_exec_ext in '' $ac_executable_extensions; do
6278 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6279 if test $ac_prog = install &&
6280 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6281 # AIX install. It has an incompatible calling convention.
6282 :
6283 elif test $ac_prog = install &&
6284 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6285 # program-specific install script used by HP pwplus--don't use.
6286 :
6287 else
6288 rm -rf conftest.one conftest.two conftest.dir
6289 echo one > conftest.one
6290 echo two > conftest.two
6291 mkdir conftest.dir
6292 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6293 test -s conftest.one && test -s conftest.two &&
6294 test -s conftest.dir/conftest.one &&
6295 test -s conftest.dir/conftest.two
6296 then
6297 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6298 break 3
6299 fi
6300 fi
6301 fi
6302 done
6303 done
6304 ;;
6305esac
6306
6307 done
6308IFS=$as_save_IFS
6309
6310rm -rf conftest.one conftest.two conftest.dir
6311
6312fi
6313 if test "${ac_cv_path_install+set}" = set; then
6314 INSTALL=$ac_cv_path_install
6315 else
6316 # As a last resort, use the slow shell script. Don't cache a
6317 # value for INSTALL within a source directory, because that will
6318 # break other packages using the cache if that directory is
6319 # removed, or if the value is a relative name.
6320 INSTALL=$ac_install_sh
6321 fi
6322fi
6323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6324$as_echo "$INSTALL" >&6; }
6325
6326# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6327# It thinks the first close brace ends the variable substitution.
6328test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6329
6330test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6331
6332test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6333
81ecdfbb
RW
6334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6335$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6336LN_S=$as_ln_s
6337if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6339$as_echo "yes" >&6; }
bec39cab 6340else
81ecdfbb
RW
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6342$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6343fi
6344
6345if test -n "$ac_tool_prefix"; then
6346 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6347set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6349$as_echo_n "checking for $ac_word... " >&6; }
6350if test "${ac_cv_prog_RANLIB+set}" = set; then :
6351 $as_echo_n "(cached) " >&6
bec39cab
AC
6352else
6353 if test -n "$RANLIB"; then
6354 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6355else
6356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6357for as_dir in $PATH
6358do
6359 IFS=$as_save_IFS
6360 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6361 for ac_exec_ext in '' $ac_executable_extensions; do
6362 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6363 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6365 break 2
6366 fi
6367done
81ecdfbb
RW
6368 done
6369IFS=$as_save_IFS
bec39cab
AC
6370
6371fi
6372fi
6373RANLIB=$ac_cv_prog_RANLIB
6374if test -n "$RANLIB"; then
81ecdfbb
RW
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6376$as_echo "$RANLIB" >&6; }
bec39cab 6377else
81ecdfbb
RW
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379$as_echo "no" >&6; }
bec39cab
AC
6380fi
6381
81ecdfbb 6382
bec39cab
AC
6383fi
6384if test -z "$ac_cv_prog_RANLIB"; then
6385 ac_ct_RANLIB=$RANLIB
6386 # Extract the first word of "ranlib", so it can be a program name with args.
6387set dummy ranlib; ac_word=$2
81ecdfbb
RW
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389$as_echo_n "checking for $ac_word... " >&6; }
6390if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6391 $as_echo_n "(cached) " >&6
bec39cab
AC
6392else
6393 if test -n "$ac_ct_RANLIB"; then
6394 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6395else
6396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6397for as_dir in $PATH
6398do
6399 IFS=$as_save_IFS
6400 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6401 for ac_exec_ext in '' $ac_executable_extensions; do
6402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6403 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6405 break 2
6406 fi
6407done
81ecdfbb
RW
6408 done
6409IFS=$as_save_IFS
bec39cab 6410
bec39cab
AC
6411fi
6412fi
6413ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6414if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6416$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6417else
81ecdfbb
RW
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; }
bec39cab
AC
6420fi
6421
81ecdfbb
RW
6422 if test "x$ac_ct_RANLIB" = x; then
6423 RANLIB=":"
6424 else
6425 case $cross_compiling:$ac_tool_warned in
6426yes:)
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6428$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6429ac_tool_warned=yes ;;
6430esac
6431 RANLIB=$ac_ct_RANLIB
6432 fi
bec39cab
AC
6433else
6434 RANLIB="$ac_cv_prog_RANLIB"
6435fi
6436
6437for ac_prog in 'bison -y' byacc
6438do
6439 # Extract the first word of "$ac_prog", so it can be a program name with args.
6440set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442$as_echo_n "checking for $ac_word... " >&6; }
6443if test "${ac_cv_prog_YACC+set}" = set; then :
6444 $as_echo_n "(cached) " >&6
bec39cab
AC
6445else
6446 if test -n "$YACC"; then
6447 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6448else
6449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450for as_dir in $PATH
6451do
6452 IFS=$as_save_IFS
6453 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6454 for ac_exec_ext in '' $ac_executable_extensions; do
6455 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6456 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6458 break 2
6459 fi
6460done
81ecdfbb
RW
6461 done
6462IFS=$as_save_IFS
bec39cab
AC
6463
6464fi
6465fi
6466YACC=$ac_cv_prog_YACC
6467if test -n "$YACC"; then
81ecdfbb
RW
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6469$as_echo "$YACC" >&6; }
bec39cab 6470else
81ecdfbb
RW
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
bec39cab
AC
6473fi
6474
81ecdfbb 6475
bec39cab
AC
6476 test -n "$YACC" && break
6477done
6478test -n "$YACC" || YACC="yacc"
6479
6480
6481if test -n "$ac_tool_prefix"; then
6482 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6483set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6485$as_echo_n "checking for $ac_word... " >&6; }
6486if test "${ac_cv_prog_AR+set}" = set; then :
6487 $as_echo_n "(cached) " >&6
bec39cab
AC
6488else
6489 if test -n "$AR"; then
6490 ac_cv_prog_AR="$AR" # Let the user override the test.
6491else
6492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6493for as_dir in $PATH
6494do
6495 IFS=$as_save_IFS
6496 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6497 for ac_exec_ext in '' $ac_executable_extensions; do
6498 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6499 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6501 break 2
6502 fi
6503done
81ecdfbb
RW
6504 done
6505IFS=$as_save_IFS
bec39cab
AC
6506
6507fi
6508fi
6509AR=$ac_cv_prog_AR
6510if test -n "$AR"; then
81ecdfbb
RW
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6512$as_echo "$AR" >&6; }
bec39cab 6513else
81ecdfbb
RW
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515$as_echo "no" >&6; }
bec39cab
AC
6516fi
6517
81ecdfbb 6518
bec39cab
AC
6519fi
6520if test -z "$ac_cv_prog_AR"; then
6521 ac_ct_AR=$AR
6522 # Extract the first word of "ar", so it can be a program name with args.
6523set dummy ar; ac_word=$2
81ecdfbb
RW
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6525$as_echo_n "checking for $ac_word... " >&6; }
6526if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6527 $as_echo_n "(cached) " >&6
bec39cab
AC
6528else
6529 if test -n "$ac_ct_AR"; then
6530 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6531else
6532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6533for as_dir in $PATH
6534do
6535 IFS=$as_save_IFS
6536 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6537 for ac_exec_ext in '' $ac_executable_extensions; do
6538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6539 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6541 break 2
6542 fi
6543done
81ecdfbb
RW
6544 done
6545IFS=$as_save_IFS
bec39cab
AC
6546
6547fi
6548fi
6549ac_ct_AR=$ac_cv_prog_ac_ct_AR
6550if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6552$as_echo "$ac_ct_AR" >&6; }
bec39cab 6553else
81ecdfbb
RW
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555$as_echo "no" >&6; }
bec39cab
AC
6556fi
6557
81ecdfbb
RW
6558 if test "x$ac_ct_AR" = x; then
6559 AR=""
6560 else
6561 case $cross_compiling:$ac_tool_warned in
6562yes:)
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6564$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6565ac_tool_warned=yes ;;
6566esac
6567 AR=$ac_ct_AR
6568 fi
bec39cab
AC
6569else
6570 AR="$ac_cv_prog_AR"
6571fi
6572
6573if test -n "$ac_tool_prefix"; then
6574 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6575set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6577$as_echo_n "checking for $ac_word... " >&6; }
6578if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6579 $as_echo_n "(cached) " >&6
bec39cab
AC
6580else
6581 if test -n "$DLLTOOL"; then
6582 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6583else
6584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585for as_dir in $PATH
6586do
6587 IFS=$as_save_IFS
6588 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6589 for ac_exec_ext in '' $ac_executable_extensions; do
6590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6591 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6593 break 2
6594 fi
6595done
81ecdfbb
RW
6596 done
6597IFS=$as_save_IFS
bec39cab
AC
6598
6599fi
6600fi
6601DLLTOOL=$ac_cv_prog_DLLTOOL
6602if test -n "$DLLTOOL"; then
81ecdfbb
RW
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6604$as_echo "$DLLTOOL" >&6; }
bec39cab 6605else
81ecdfbb
RW
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
bec39cab
AC
6608fi
6609
81ecdfbb 6610
bec39cab
AC
6611fi
6612if test -z "$ac_cv_prog_DLLTOOL"; then
6613 ac_ct_DLLTOOL=$DLLTOOL
6614 # Extract the first word of "dlltool", so it can be a program name with args.
6615set dummy dlltool; ac_word=$2
81ecdfbb
RW
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6617$as_echo_n "checking for $ac_word... " >&6; }
6618if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6619 $as_echo_n "(cached) " >&6
bec39cab
AC
6620else
6621 if test -n "$ac_ct_DLLTOOL"; then
6622 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6623else
6624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6625for as_dir in $PATH
6626do
6627 IFS=$as_save_IFS
6628 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6629 for ac_exec_ext in '' $ac_executable_extensions; do
6630 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6631 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6633 break 2
6634 fi
6635done
81ecdfbb
RW
6636 done
6637IFS=$as_save_IFS
bec39cab
AC
6638
6639fi
6640fi
6641ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6642if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6644$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6645else
81ecdfbb
RW
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6647$as_echo "no" >&6; }
bec39cab
AC
6648fi
6649
81ecdfbb
RW
6650 if test "x$ac_ct_DLLTOOL" = x; then
6651 DLLTOOL=""
6652 else
6653 case $cross_compiling:$ac_tool_warned in
6654yes:)
6655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6657ac_tool_warned=yes ;;
6658esac
6659 DLLTOOL=$ac_ct_DLLTOOL
6660 fi
bec39cab
AC
6661else
6662 DLLTOOL="$ac_cv_prog_DLLTOOL"
6663fi
6664
6665if test -n "$ac_tool_prefix"; then
6666 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6667set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669$as_echo_n "checking for $ac_word... " >&6; }
6670if test "${ac_cv_prog_WINDRES+set}" = set; then :
6671 $as_echo_n "(cached) " >&6
bec39cab
AC
6672else
6673 if test -n "$WINDRES"; then
6674 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6675else
6676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6677for as_dir in $PATH
6678do
6679 IFS=$as_save_IFS
6680 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6681 for ac_exec_ext in '' $ac_executable_extensions; do
6682 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6683 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6685 break 2
6686 fi
6687done
81ecdfbb
RW
6688 done
6689IFS=$as_save_IFS
bec39cab
AC
6690
6691fi
6692fi
6693WINDRES=$ac_cv_prog_WINDRES
6694if test -n "$WINDRES"; then
81ecdfbb
RW
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6696$as_echo "$WINDRES" >&6; }
bec39cab 6697else
81ecdfbb
RW
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6699$as_echo "no" >&6; }
bec39cab
AC
6700fi
6701
81ecdfbb 6702
bec39cab
AC
6703fi
6704if test -z "$ac_cv_prog_WINDRES"; then
6705 ac_ct_WINDRES=$WINDRES
6706 # Extract the first word of "windres", so it can be a program name with args.
6707set dummy windres; ac_word=$2
81ecdfbb
RW
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709$as_echo_n "checking for $ac_word... " >&6; }
6710if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6711 $as_echo_n "(cached) " >&6
bec39cab
AC
6712else
6713 if test -n "$ac_ct_WINDRES"; then
6714 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6715else
6716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in $PATH
6718do
6719 IFS=$as_save_IFS
6720 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6723 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6725 break 2
6726 fi
6727done
81ecdfbb
RW
6728 done
6729IFS=$as_save_IFS
bec39cab
AC
6730
6731fi
6732fi
6733ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6734if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6736$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6737else
81ecdfbb
RW
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6739$as_echo "no" >&6; }
c906108c 6740fi
bec39cab 6741
81ecdfbb
RW
6742 if test "x$ac_ct_WINDRES" = x; then
6743 WINDRES=""
6744 else
6745 case $cross_compiling:$ac_tool_warned in
6746yes:)
6747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6749ac_tool_warned=yes ;;
6750esac
6751 WINDRES=$ac_ct_WINDRES
6752 fi
c906108c 6753else
bec39cab 6754 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6755fi
6756
bec39cab 6757
036c3acb
TS
6758case $host_os in
6759 gnu*)
6760 # Needed for GNU Hurd hosts.
6761 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6762 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6763set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6765$as_echo_n "checking for $ac_word... " >&6; }
6766if test "${ac_cv_prog_MIG+set}" = set; then :
6767 $as_echo_n "(cached) " >&6
c906108c 6768else
bec39cab
AC
6769 if test -n "$MIG"; then
6770 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6771else
6772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6773for as_dir in $PATH
6774do
6775 IFS=$as_save_IFS
6776 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6777 for ac_exec_ext in '' $ac_executable_extensions; do
6778 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6779 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6781 break 2
6782 fi
6783done
81ecdfbb
RW
6784 done
6785IFS=$as_save_IFS
bec39cab 6786
c906108c 6787fi
bec39cab
AC
6788fi
6789MIG=$ac_cv_prog_MIG
6790if test -n "$MIG"; then
81ecdfbb
RW
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6792$as_echo "$MIG" >&6; }
c906108c 6793else
81ecdfbb
RW
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6795$as_echo "no" >&6; }
c906108c
SS
6796fi
6797
81ecdfbb 6798
bec39cab
AC
6799fi
6800if test -z "$ac_cv_prog_MIG"; then
6801 ac_ct_MIG=$MIG
6802 # Extract the first word of "mig", so it can be a program name with args.
6803set dummy mig; ac_word=$2
81ecdfbb
RW
6804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6805$as_echo_n "checking for $ac_word... " >&6; }
6806if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6807 $as_echo_n "(cached) " >&6
bec39cab
AC
6808else
6809 if test -n "$ac_ct_MIG"; then
6810 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6811else
6812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6813for as_dir in $PATH
6814do
6815 IFS=$as_save_IFS
6816 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6817 for ac_exec_ext in '' $ac_executable_extensions; do
6818 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6819 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6820 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6821 break 2
6822 fi
6823done
81ecdfbb
RW
6824 done
6825IFS=$as_save_IFS
c906108c 6826
bec39cab
AC
6827fi
6828fi
6829ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6830if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6832$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6833else
81ecdfbb
RW
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6835$as_echo "no" >&6; }
bec39cab 6836fi
c906108c 6837
81ecdfbb
RW
6838 if test "x$ac_ct_MIG" = x; then
6839 MIG=""
6840 else
6841 case $cross_compiling:$ac_tool_warned in
6842yes:)
6843{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6844$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6845ac_tool_warned=yes ;;
6846esac
6847 MIG=$ac_ct_MIG
6848 fi
bec39cab
AC
6849else
6850 MIG="$ac_cv_prog_MIG"
6851fi
c906108c 6852
036c3acb
TS
6853 if test x"$MIG" = x; then
6854 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6855 fi
6856 ;;
6857esac
c906108c 6858
bec39cab
AC
6859# ---------------------- #
6860# Checks for libraries. #
6861# ---------------------- #
c906108c 6862
bec39cab 6863# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6865$as_echo_n "checking for main in -lm... " >&6; }
6866if test "${ac_cv_lib_m_main+set}" = set; then :
6867 $as_echo_n "(cached) " >&6
bec39cab
AC
6868else
6869 ac_check_lib_save_LIBS=$LIBS
6870LIBS="-lm $LIBS"
81ecdfbb 6871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6872/* end confdefs.h. */
c906108c 6873
c906108c 6874
bec39cab
AC
6875int
6876main ()
6877{
81ecdfbb 6878return main ();
bec39cab
AC
6879 ;
6880 return 0;
6881}
6882_ACEOF
81ecdfbb 6883if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6884 ac_cv_lib_m_main=yes
6885else
81ecdfbb 6886 ac_cv_lib_m_main=no
bec39cab 6887fi
81ecdfbb
RW
6888rm -f core conftest.err conftest.$ac_objext \
6889 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6890LIBS=$ac_check_lib_save_LIBS
6891fi
81ecdfbb
RW
6892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6893$as_echo "$ac_cv_lib_m_main" >&6; }
6894if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6895 cat >>confdefs.h <<_ACEOF
6896#define HAVE_LIBM 1
6897_ACEOF
6898
6899 LIBS="-lm $LIBS"
c906108c 6900
c906108c 6901fi
bec39cab
AC
6902
6903
6904# We need to link with -lw to get `wctype' on Solaris before Solaris
6905# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6906# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6907# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6908ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6909if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6910
c906108c 6911else
81ecdfbb
RW
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6913$as_echo_n "checking for wctype in -lw... " >&6; }
6914if test "${ac_cv_lib_w_wctype+set}" = set; then :
6915 $as_echo_n "(cached) " >&6
bec39cab
AC
6916else
6917 ac_check_lib_save_LIBS=$LIBS
6918LIBS="-lw $LIBS"
81ecdfbb 6919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6920/* end confdefs.h. */
c906108c 6921
81ecdfbb
RW
6922/* Override any GCC internal prototype to avoid an error.
6923 Use char because int might match the return type of a GCC
6924 builtin and then its argument prototype would still apply. */
bec39cab
AC
6925#ifdef __cplusplus
6926extern "C"
6927#endif
bec39cab
AC
6928char wctype ();
6929int
6930main ()
6931{
81ecdfbb 6932return wctype ();
bec39cab
AC
6933 ;
6934 return 0;
6935}
6936_ACEOF
81ecdfbb 6937if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6938 ac_cv_lib_w_wctype=yes
6939else
81ecdfbb 6940 ac_cv_lib_w_wctype=no
bec39cab 6941fi
81ecdfbb
RW
6942rm -f core conftest.err conftest.$ac_objext \
6943 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6944LIBS=$ac_check_lib_save_LIBS
6945fi
81ecdfbb
RW
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6947$as_echo "$ac_cv_lib_w_wctype" >&6; }
6948if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6949 cat >>confdefs.h <<_ACEOF
6950#define HAVE_LIBW 1
6951_ACEOF
c906108c 6952
bec39cab 6953 LIBS="-lw $LIBS"
c906108c 6954
bec39cab 6955fi
c906108c 6956
bec39cab 6957fi
c906108c 6958
ddc9cd0f 6959
bec39cab 6960# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6962$as_echo_n "checking for library containing gethostbyname... " >&6; }
6963if test "${ac_cv_search_gethostbyname+set}" = set; then :
6964 $as_echo_n "(cached) " >&6
bec39cab
AC
6965else
6966 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6968/* end confdefs.h. */
ddc9cd0f 6969
81ecdfbb
RW
6970/* Override any GCC internal prototype to avoid an error.
6971 Use char because int might match the return type of a GCC
6972 builtin and then its argument prototype would still apply. */
bec39cab
AC
6973#ifdef __cplusplus
6974extern "C"
6975#endif
bec39cab
AC
6976char gethostbyname ();
6977int
6978main ()
6979{
81ecdfbb 6980return gethostbyname ();
bec39cab
AC
6981 ;
6982 return 0;
6983}
6984_ACEOF
81ecdfbb
RW
6985for ac_lib in '' nsl; do
6986 if test -z "$ac_lib"; then
6987 ac_res="none required"
6988 else
6989 ac_res=-l$ac_lib
b4e70030 6990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6991 fi
6992 if ac_fn_c_try_link "$LINENO"; then :
6993 ac_cv_search_gethostbyname=$ac_res
6994fi
6995rm -f core conftest.err conftest.$ac_objext \
6996 conftest$ac_exeext
6997 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6998 break
6999fi
7000done
7001if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7002
bec39cab 7003else
81ecdfbb 7004 ac_cv_search_gethostbyname=no
bec39cab 7005fi
81ecdfbb 7006rm conftest.$ac_ext
bec39cab
AC
7007LIBS=$ac_func_search_save_LIBS
7008fi
81ecdfbb
RW
7009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7010$as_echo "$ac_cv_search_gethostbyname" >&6; }
7011ac_res=$ac_cv_search_gethostbyname
7012if test "$ac_res" != no; then :
7013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7014
bec39cab 7015fi
96baa820 7016
c906108c 7017
b4e70030 7018# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7020$as_echo_n "checking for library containing socketpair... " >&6; }
7021if test "${ac_cv_search_socketpair+set}" = set; then :
7022 $as_echo_n "(cached) " >&6
b4e70030
JB
7023else
7024 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7026/* end confdefs.h. */
7027
81ecdfbb
RW
7028/* Override any GCC internal prototype to avoid an error.
7029 Use char because int might match the return type of a GCC
7030 builtin and then its argument prototype would still apply. */
b4e70030
JB
7031#ifdef __cplusplus
7032extern "C"
7033#endif
b4e70030
JB
7034char socketpair ();
7035int
7036main ()
7037{
81ecdfbb 7038return socketpair ();
b4e70030
JB
7039 ;
7040 return 0;
7041}
7042_ACEOF
81ecdfbb
RW
7043for ac_lib in '' socket; do
7044 if test -z "$ac_lib"; then
7045 ac_res="none required"
7046 else
7047 ac_res=-l$ac_lib
b4e70030 7048 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7049 fi
7050 if ac_fn_c_try_link "$LINENO"; then :
7051 ac_cv_search_socketpair=$ac_res
7052fi
7053rm -f core conftest.err conftest.$ac_objext \
7054 conftest$ac_exeext
7055 if test "${ac_cv_search_socketpair+set}" = set; then :
7056 break
7057fi
7058done
7059if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7060
b4e70030 7061else
81ecdfbb 7062 ac_cv_search_socketpair=no
b4e70030 7063fi
81ecdfbb 7064rm conftest.$ac_ext
b4e70030
JB
7065LIBS=$ac_func_search_save_LIBS
7066fi
81ecdfbb
RW
7067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7068$as_echo "$ac_cv_search_socketpair" >&6; }
7069ac_res=$ac_cv_search_socketpair
7070if test "$ac_res" != no; then :
7071 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7072
7073fi
7074
7075
233a11ab 7076# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7077
711a72d3 7078 # Use the system's zlib library.
39f3de7c
L
7079 zlibdir="-L\$(top_builddir)/../zlib"
7080 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7081
711a72d3
L
7082# Check whether --with-system-zlib was given.
7083if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7084 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7085 zlibdir=
7086 zlibinc=
7087 fi
b040ad30 7088
233a11ab 7089fi
233a11ab 7090
233a11ab 7091
233a11ab 7092
b040ad30 7093
233a11ab 7094
25268153
JB
7095# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7097$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7098if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7099 $as_echo_n "(cached) " >&6
7100else
7101 ac_func_search_save_LIBS=$LIBS
7102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7103/* end confdefs.h. */
7104
7105/* Override any GCC internal prototype to avoid an error.
7106 Use char because int might match the return type of a GCC
7107 builtin and then its argument prototype would still apply. */
7108#ifdef __cplusplus
7109extern "C"
7110#endif
7111char kinfo_getvmmap ();
7112int
7113main ()
7114{
7115return kinfo_getvmmap ();
7116 ;
7117 return 0;
7118}
7119_ACEOF
7120for ac_lib in '' util; do
7121 if test -z "$ac_lib"; then
7122 ac_res="none required"
7123 else
7124 ac_res=-l$ac_lib
7125 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7126 fi
7127 if ac_fn_c_try_link "$LINENO"; then :
7128 ac_cv_search_kinfo_getvmmap=$ac_res
7129fi
7130rm -f core conftest.err conftest.$ac_objext \
7131 conftest$ac_exeext
7132 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7133 break
7134fi
7135done
7136if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7137
7138else
7139 ac_cv_search_kinfo_getvmmap=no
7140fi
7141rm conftest.$ac_ext
7142LIBS=$ac_func_search_save_LIBS
7143fi
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7145$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7146ac_res=$ac_cv_search_kinfo_getvmmap
7147if test "$ac_res" != no; then :
7148 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7149
7150$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7151
7152fi
7153
7154
77f120bf 7155
016a3251
DD
7156 if test "X$prefix" = "XNONE"; then
7157 acl_final_prefix="$ac_default_prefix"
7158 else
7159 acl_final_prefix="$prefix"
7160 fi
7161 if test "X$exec_prefix" = "XNONE"; then
7162 acl_final_exec_prefix='${prefix}'
7163 else
7164 acl_final_exec_prefix="$exec_prefix"
7165 fi
7166 acl_save_prefix="$prefix"
7167 prefix="$acl_final_prefix"
7168 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7169 prefix="$acl_save_prefix"
7170
7171
7172# Check whether --with-gnu-ld was given.
7173if test "${with_gnu_ld+set}" = set; then :
7174 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7175else
7176 with_gnu_ld=no
7177fi
7178
7179# Prepare PATH_SEPARATOR.
7180# The user is always right.
7181if test "${PATH_SEPARATOR+set}" != set; then
7182 echo "#! /bin/sh" >conf$$.sh
7183 echo "exit 0" >>conf$$.sh
7184 chmod +x conf$$.sh
7185 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7186 PATH_SEPARATOR=';'
7187 else
7188 PATH_SEPARATOR=:
7189 fi
7190 rm -f conf$$.sh
7191fi
7192ac_prog=ld
7193if test "$GCC" = yes; then
7194 # Check if gcc -print-prog-name=ld gives a path.
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7196$as_echo_n "checking for ld used by GCC... " >&6; }
7197 case $host in
7198 *-*-mingw*)
7199 # gcc leaves a trailing carriage return which upsets mingw
7200 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7201 *)
7202 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7203 esac
7204 case $ac_prog in
7205 # Accept absolute paths.
7206 [\\/]* | [A-Za-z]:[\\/]*)
7207 re_direlt='/[^/][^/]*/\.\./'
7208 # Canonicalize the path of ld
7209 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7210 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7211 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7212 done
7213 test -z "$LD" && LD="$ac_prog"
7214 ;;
7215 "")
7216 # If it fails, then pretend we aren't using GCC.
7217 ac_prog=ld
7218 ;;
7219 *)
7220 # If it is relative, then search for the first ld in PATH.
7221 with_gnu_ld=unknown
7222 ;;
7223 esac
7224elif test "$with_gnu_ld" = yes; then
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7226$as_echo_n "checking for GNU ld... " >&6; }
7227else
7228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7229$as_echo_n "checking for non-GNU ld... " >&6; }
7230fi
7231if test "${acl_cv_path_LD+set}" = set; then :
7232 $as_echo_n "(cached) " >&6
7233else
7234 if test -z "$LD"; then
7235 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7236 for ac_dir in $PATH; do
7237 test -z "$ac_dir" && ac_dir=.
7238 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7239 acl_cv_path_LD="$ac_dir/$ac_prog"
7240 # Check to see if the program is GNU ld. I'd rather use --version,
7241 # but apparently some GNU ld's only accept -v.
7242 # Break only if it was the GNU/non-GNU ld that we prefer.
7243 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7244 test "$with_gnu_ld" != no && break
7245 else
7246 test "$with_gnu_ld" != yes && break
7247 fi
7248 fi
7249 done
7250 IFS="$ac_save_ifs"
7251else
7252 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7253fi
7254fi
7255
7256LD="$acl_cv_path_LD"
7257if test -n "$LD"; then
7258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7259$as_echo "$LD" >&6; }
7260else
7261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7262$as_echo "no" >&6; }
7263fi
7264test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7266$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7267if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7268 $as_echo_n "(cached) " >&6
7269else
7270 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7271if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7272 acl_cv_prog_gnu_ld=yes
7273else
7274 acl_cv_prog_gnu_ld=no
7275fi
7276fi
7277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7278$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7279with_gnu_ld=$acl_cv_prog_gnu_ld
7280
7281
7282
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7284$as_echo_n "checking for shared library run path origin... " >&6; }
7285if test "${acl_cv_rpath+set}" = set; then :
7286 $as_echo_n "(cached) " >&6
7287else
7288
7289 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7290 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7291 . ./conftest.sh
7292 rm -f ./conftest.sh
7293 acl_cv_rpath=done
7294
7295fi
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7297$as_echo "$acl_cv_rpath" >&6; }
7298 wl="$acl_cv_wl"
7299 libext="$acl_cv_libext"
7300 shlibext="$acl_cv_shlibext"
7301 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7302 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7303 hardcode_direct="$acl_cv_hardcode_direct"
7304 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7305 # Check whether --enable-rpath was given.
7306if test "${enable_rpath+set}" = set; then :
7307 enableval=$enable_rpath; :
7308else
7309 enable_rpath=yes
7310fi
7311
7312
7313
7314
7315
7316
7317
7318
7319 use_additional=yes
7320
7321 acl_save_prefix="$prefix"
7322 prefix="$acl_final_prefix"
7323 acl_save_exec_prefix="$exec_prefix"
7324 exec_prefix="$acl_final_exec_prefix"
7325
7326 eval additional_includedir=\"$includedir\"
7327 eval additional_libdir=\"$libdir\"
7328
7329 exec_prefix="$acl_save_exec_prefix"
7330 prefix="$acl_save_prefix"
77f120bf 7331
6c7a06a3 7332
81ecdfbb
RW
7333# Check whether --with-libiconv-prefix was given.
7334if test "${with_libiconv_prefix+set}" = set; then :
7335 withval=$with_libiconv_prefix;
016a3251
DD
7336 if test "X$withval" = "Xno"; then
7337 use_additional=no
7338 else
7339 if test "X$withval" = "X"; then
7340
7341 acl_save_prefix="$prefix"
7342 prefix="$acl_final_prefix"
7343 acl_save_exec_prefix="$exec_prefix"
7344 exec_prefix="$acl_final_exec_prefix"
7345
7346 eval additional_includedir=\"$includedir\"
7347 eval additional_libdir=\"$libdir\"
7348
7349 exec_prefix="$acl_save_exec_prefix"
7350 prefix="$acl_save_prefix"
7351
7352 else
7353 additional_includedir="$withval/include"
7354 additional_libdir="$withval/lib"
7355 fi
7356 fi
6c7a06a3 7357
81ecdfbb
RW
7358fi
7359
016a3251
DD
7360 LIBICONV=
7361 LTLIBICONV=
7362 INCICONV=
7363 rpathdirs=
7364 ltrpathdirs=
7365 names_already_handled=
7366 names_next_round='iconv '
7367 while test -n "$names_next_round"; do
7368 names_this_round="$names_next_round"
7369 names_next_round=
7370 for name in $names_this_round; do
7371 already_handled=
7372 for n in $names_already_handled; do
7373 if test "$n" = "$name"; then
7374 already_handled=yes
7375 break
7376 fi
7377 done
7378 if test -z "$already_handled"; then
7379 names_already_handled="$names_already_handled $name"
7380 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7381 eval value=\"\$HAVE_LIB$uppername\"
7382 if test -n "$value"; then
7383 if test "$value" = yes; then
7384 eval value=\"\$LIB$uppername\"
7385 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7386 eval value=\"\$LTLIB$uppername\"
7387 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7388 else
7389 :
7390 fi
7391 else
7392 found_dir=
7393 found_la=
7394 found_so=
7395 found_a=
7396 if test $use_additional = yes; then
7397 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7398 found_dir="$additional_libdir"
7399 found_so="$additional_libdir/lib$name.$shlibext"
7400 if test -f "$additional_libdir/lib$name.la"; then
7401 found_la="$additional_libdir/lib$name.la"
7402 fi
7403 else
7404 if test -f "$additional_libdir/lib$name.$libext"; then
7405 found_dir="$additional_libdir"
7406 found_a="$additional_libdir/lib$name.$libext"
7407 if test -f "$additional_libdir/lib$name.la"; then
7408 found_la="$additional_libdir/lib$name.la"
7409 fi
7410 fi
7411 fi
7412 fi
7413 if test "X$found_dir" = "X"; then
7414 for x in $LDFLAGS $LTLIBICONV; do
7415
7416 acl_save_prefix="$prefix"
7417 prefix="$acl_final_prefix"
7418 acl_save_exec_prefix="$exec_prefix"
7419 exec_prefix="$acl_final_exec_prefix"
7420 eval x=\"$x\"
7421 exec_prefix="$acl_save_exec_prefix"
7422 prefix="$acl_save_prefix"
7423
7424 case "$x" in
7425 -L*)
7426 dir=`echo "X$x" | sed -e 's/^X-L//'`
7427 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7428 found_dir="$dir"
7429 found_so="$dir/lib$name.$shlibext"
7430 if test -f "$dir/lib$name.la"; then
7431 found_la="$dir/lib$name.la"
7432 fi
7433 else
7434 if test -f "$dir/lib$name.$libext"; then
7435 found_dir="$dir"
7436 found_a="$dir/lib$name.$libext"
7437 if test -f "$dir/lib$name.la"; then
7438 found_la="$dir/lib$name.la"
7439 fi
7440 fi
7441 fi
7442 ;;
7443 esac
7444 if test "X$found_dir" != "X"; then
7445 break
7446 fi
7447 done
7448 fi
7449 if test "X$found_dir" != "X"; then
7450 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7451 if test "X$found_so" != "X"; then
7452 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7453 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7454 else
7455 haveit=
7456 for x in $ltrpathdirs; do
7457 if test "X$x" = "X$found_dir"; then
7458 haveit=yes
7459 break
7460 fi
7461 done
7462 if test -z "$haveit"; then
7463 ltrpathdirs="$ltrpathdirs $found_dir"
7464 fi
7465 if test "$hardcode_direct" = yes; then
7466 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7467 else
7468 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7469 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7470 haveit=
7471 for x in $rpathdirs; do
7472 if test "X$x" = "X$found_dir"; then
7473 haveit=yes
7474 break
7475 fi
7476 done
7477 if test -z "$haveit"; then
7478 rpathdirs="$rpathdirs $found_dir"
7479 fi
7480 else
7481 haveit=
7482 for x in $LDFLAGS $LIBICONV; do
7483
7484 acl_save_prefix="$prefix"
7485 prefix="$acl_final_prefix"
7486 acl_save_exec_prefix="$exec_prefix"
7487 exec_prefix="$acl_final_exec_prefix"
7488 eval x=\"$x\"
7489 exec_prefix="$acl_save_exec_prefix"
7490 prefix="$acl_save_prefix"
7491
7492 if test "X$x" = "X-L$found_dir"; then
7493 haveit=yes
7494 break
7495 fi
7496 done
7497 if test -z "$haveit"; then
7498 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7499 fi
7500 if test "$hardcode_minus_L" != no; then
7501 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7502 else
7503 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7504 fi
7505 fi
7506 fi
7507 fi
7508 else
7509 if test "X$found_a" != "X"; then
7510 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7511 else
7512 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7513 fi
7514 fi
7515 additional_includedir=
7516 case "$found_dir" in
7517 */lib | */lib/)
7518 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7519 additional_includedir="$basedir/include"
7520 ;;
7521 esac
7522 if test "X$additional_includedir" != "X"; then
7523 if test "X$additional_includedir" != "X/usr/include"; then
7524 haveit=
7525 if test "X$additional_includedir" = "X/usr/local/include"; then
7526 if test -n "$GCC"; then
7527 case $host_os in
7528 linux*) haveit=yes;;
7529 esac
7530 fi
7531 fi
7532 if test -z "$haveit"; then
7533 for x in $CPPFLAGS $INCICONV; do
7534
7535 acl_save_prefix="$prefix"
7536 prefix="$acl_final_prefix"
7537 acl_save_exec_prefix="$exec_prefix"
7538 exec_prefix="$acl_final_exec_prefix"
7539 eval x=\"$x\"
7540 exec_prefix="$acl_save_exec_prefix"
7541 prefix="$acl_save_prefix"
7542
7543 if test "X$x" = "X-I$additional_includedir"; then
7544 haveit=yes
7545 break
7546 fi
7547 done
7548 if test -z "$haveit"; then
7549 if test -d "$additional_includedir"; then
7550 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7551 fi
7552 fi
7553 fi
7554 fi
7555 fi
7556 if test -n "$found_la"; then
7557 save_libdir="$libdir"
7558 case "$found_la" in
7559 */* | *\\*) . "$found_la" ;;
7560 *) . "./$found_la" ;;
7561 esac
7562 libdir="$save_libdir"
7563 for dep in $dependency_libs; do
7564 case "$dep" in
7565 -L*)
7566 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7567 if test "X$additional_libdir" != "X/usr/lib"; then
7568 haveit=
7569 if test "X$additional_libdir" = "X/usr/local/lib"; then
7570 if test -n "$GCC"; then
7571 case $host_os in
7572 linux*) haveit=yes;;
7573 esac
7574 fi
7575 fi
7576 if test -z "$haveit"; then
7577 haveit=
7578 for x in $LDFLAGS $LIBICONV; do
7579
7580 acl_save_prefix="$prefix"
7581 prefix="$acl_final_prefix"
7582 acl_save_exec_prefix="$exec_prefix"
7583 exec_prefix="$acl_final_exec_prefix"
7584 eval x=\"$x\"
7585 exec_prefix="$acl_save_exec_prefix"
7586 prefix="$acl_save_prefix"
7587
7588 if test "X$x" = "X-L$additional_libdir"; then
7589 haveit=yes
7590 break
7591 fi
7592 done
7593 if test -z "$haveit"; then
7594 if test -d "$additional_libdir"; then
7595 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7596 fi
7597 fi
7598 haveit=
7599 for x in $LDFLAGS $LTLIBICONV; do
7600
7601 acl_save_prefix="$prefix"
7602 prefix="$acl_final_prefix"
7603 acl_save_exec_prefix="$exec_prefix"
7604 exec_prefix="$acl_final_exec_prefix"
7605 eval x=\"$x\"
7606 exec_prefix="$acl_save_exec_prefix"
7607 prefix="$acl_save_prefix"
7608
7609 if test "X$x" = "X-L$additional_libdir"; then
7610 haveit=yes
7611 break
7612 fi
7613 done
7614 if test -z "$haveit"; then
7615 if test -d "$additional_libdir"; then
7616 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7617 fi
7618 fi
7619 fi
7620 fi
7621 ;;
7622 -R*)
7623 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7624 if test "$enable_rpath" != no; then
7625 haveit=
7626 for x in $rpathdirs; do
7627 if test "X$x" = "X$dir"; then
7628 haveit=yes
7629 break
7630 fi
7631 done
7632 if test -z "$haveit"; then
7633 rpathdirs="$rpathdirs $dir"
7634 fi
7635 haveit=
7636 for x in $ltrpathdirs; do
7637 if test "X$x" = "X$dir"; then
7638 haveit=yes
7639 break
7640 fi
7641 done
7642 if test -z "$haveit"; then
7643 ltrpathdirs="$ltrpathdirs $dir"
7644 fi
7645 fi
7646 ;;
7647 -l*)
7648 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7649 ;;
7650 *.la)
7651 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7652 ;;
7653 *)
7654 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7655 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7656 ;;
7657 esac
7658 done
7659 fi
7660 else
7661 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7662 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7663 fi
7664 fi
7665 fi
7666 done
7667 done
7668 if test "X$rpathdirs" != "X"; then
7669 if test -n "$hardcode_libdir_separator"; then
7670 alldirs=
7671 for found_dir in $rpathdirs; do
7672 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7673 done
7674 acl_save_libdir="$libdir"
7675 libdir="$alldirs"
7676 eval flag=\"$hardcode_libdir_flag_spec\"
7677 libdir="$acl_save_libdir"
7678 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7679 else
7680 for found_dir in $rpathdirs; do
7681 acl_save_libdir="$libdir"
7682 libdir="$found_dir"
7683 eval flag=\"$hardcode_libdir_flag_spec\"
7684 libdir="$acl_save_libdir"
7685 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7686 done
7687 fi
7688 fi
7689 if test "X$ltrpathdirs" != "X"; then
7690 for found_dir in $ltrpathdirs; do
7691 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7692 done
7693 fi
7694
7695
7696
7697
7698
6c7a06a3 7699
6c7a06a3 7700
81ecdfbb
RW
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7702$as_echo_n "checking for iconv... " >&6; }
7703if test "${am_cv_func_iconv+set}" = set; then :
7704 $as_echo_n "(cached) " >&6
d542061a 7705else
6c7a06a3
TT
7706
7707 am_cv_func_iconv="no, consider installing GNU libiconv"
7708 am_cv_lib_iconv=no
016a3251
DD
7709 am_save_CPPFLAGS="$CPPFLAGS"
7710 CPPFLAGS="$CPPFLAGS $INCICONV"
7711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7712/* end confdefs.h. */
6c7a06a3
TT
7713#include <stdlib.h>
7714#include <iconv.h>
d542061a
UW
7715int
7716main ()
7717{
6c7a06a3 7718iconv_t cd = iconv_open("","");
016a3251
DD
7719 iconv(cd,NULL,NULL,NULL,NULL);
7720 iconv_close(cd);
d542061a
UW
7721 ;
7722 return 0;
7723}
7724_ACEOF
81ecdfbb 7725if ac_fn_c_try_link "$LINENO"; then :
016a3251 7726 am_cv_func_iconv=yes
d542061a 7727fi
81ecdfbb
RW
7728rm -f core conftest.err conftest.$ac_objext \
7729 conftest$ac_exeext conftest.$ac_ext
016a3251 7730 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7731
016a3251
DD
7732 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7733 for _libs in .libs _libs; do
7734 am_save_CPPFLAGS="$CPPFLAGS"
7735 am_save_LIBS="$LIBS"
7736 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7737 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7739/* end confdefs.h. */
6c7a06a3
TT
7740#include <stdlib.h>
7741#include <iconv.h>
d542061a
UW
7742int
7743main ()
7744{
6c7a06a3 7745iconv_t cd = iconv_open("","");
016a3251
DD
7746 iconv(cd,NULL,NULL,NULL,NULL);
7747 iconv_close(cd);
d542061a
UW
7748 ;
7749 return 0;
7750}
7751_ACEOF
81ecdfbb 7752if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7753 INCICONV="-I../libiconv/include"
7754 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7755 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7756 am_cv_lib_iconv=yes
7757 am_cv_func_iconv=yes
d542061a 7758fi
81ecdfbb
RW
7759rm -f core conftest.err conftest.$ac_objext \
7760 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7761 CPPFLAGS="$am_save_CPPFLAGS"
7762 LIBS="$am_save_LIBS"
7763 if test "$am_cv_func_iconv" = "yes"; then
7764 break
7765 fi
7766 done
77f120bf 7767 fi
94ae1714 7768
4edb1e84 7769 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7770 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7771 am_save_LIBS="$LIBS"
016a3251
DD
7772 CPPFLAGS="$LIBS $INCICONV"
7773 LIBS="$LIBS $LIBICONV"
81ecdfbb 7774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7775/* end confdefs.h. */
6c7a06a3
TT
7776#include <stdlib.h>
7777#include <iconv.h>
bec39cab
AC
7778int
7779main ()
7780{
6c7a06a3
TT
7781iconv_t cd = iconv_open("","");
7782 iconv(cd,NULL,NULL,NULL,NULL);
7783 iconv_close(cd);
bec39cab
AC
7784 ;
7785 return 0;
7786}
7787_ACEOF
81ecdfbb 7788if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7789 am_cv_lib_iconv=yes
6c7a06a3 7790 am_cv_func_iconv=yes
627af7ea 7791fi
81ecdfbb
RW
7792rm -f core conftest.err conftest.$ac_objext \
7793 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7794 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7795 LIBS="$am_save_LIBS"
6c7a06a3
TT
7796 fi
7797
7798fi
81ecdfbb
RW
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7800$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7801 if test "$am_cv_func_iconv" = yes; then
7802
7803$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7804
016a3251 7805 fi
fc3b640d 7806 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7807
7808 for element in $INCICONV; do
7809 haveit=
7810 for x in $CPPFLAGS; do
7811
7812 acl_save_prefix="$prefix"
7813 prefix="$acl_final_prefix"
7814 acl_save_exec_prefix="$exec_prefix"
7815 exec_prefix="$acl_final_exec_prefix"
7816 eval x=\"$x\"
7817 exec_prefix="$acl_save_exec_prefix"
7818 prefix="$acl_save_prefix"
7819
7820 if test "X$x" = "X$element"; then
7821 haveit=yes
7822 break
7823 fi
7824 done
7825 if test -z "$haveit"; then
7826 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7827 fi
7828 done
7829
7830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7831$as_echo_n "checking how to link with libiconv... " >&6; }
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7833$as_echo "$LIBICONV" >&6; }
94ae1714 7834 else
016a3251
DD
7835 LIBICONV=
7836 LTLIBICONV=
fc3b640d 7837 fi
94ae1714 7838
6c7a06a3 7839
6c7a06a3 7840
016a3251 7841 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7843$as_echo_n "checking for iconv declaration... " >&6; }
7844 if test "${am_cv_proto_iconv+set}" = set; then :
7845 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7846else
7847
81ecdfbb 7848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7849/* end confdefs.h. */
7850
6c7a06a3
TT
7851#include <stdlib.h>
7852#include <iconv.h>
7853extern
b4e70030 7854#ifdef __cplusplus
6c7a06a3 7855"C"
b4e70030 7856#endif
6c7a06a3
TT
7857#if defined(__STDC__) || defined(__cplusplus)
7858size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7859#else
7860size_t iconv();
7861#endif
7862
b4e70030
JB
7863int
7864main ()
7865{
6c7a06a3 7866
b4e70030
JB
7867 ;
7868 return 0;
7869}
7870_ACEOF
81ecdfbb 7871if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7872 am_cv_proto_iconv_arg1=""
4e8d927d 7873else
81ecdfbb 7874 am_cv_proto_iconv_arg1="const"
b4e70030 7875fi
81ecdfbb 7876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7877 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);"
7878fi
7879
7880 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7882 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7883$as_echo "${ac_t:-
7884 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7885
7886cat >>confdefs.h <<_ACEOF
7887#define ICONV_CONST $am_cv_proto_iconv_arg1
7888_ACEOF
7889
7890 fi
6c7a06a3
TT
7891
7892
478aac75
DE
7893# GDB may fork/exec the iconv program to get the list of supported character
7894# sets. Allow the user to specify where to find it.
7895# There are several factors affecting the choice of option name:
7896# - There is already --with-libiconv-prefix but we can't use it, it specifies
7897# the build-time location of libiconv files.
7898# - The program we need to find is iconv, which comes with glibc. The user
7899# doesn't necessarily have libiconv installed. Therefore naming this
7900# --with-libiconv-foo feels wrong.
7901# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7902# defined to work on directories not files (though it really doesn't know
7903# the difference).
7904# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7905# with --with-libiconv-prefix.
7906# Putting these together is why the option name is --with-iconv-bin.
7907
7908
7909# Check whether --with-iconv-bin was given.
7910if test "${with_iconv_bin+set}" = set; then :
7911 withval=$with_iconv_bin; iconv_bin="${withval}"
7912
7913cat >>confdefs.h <<_ACEOF
7914#define ICONV_BIN "${iconv_bin}"
7915_ACEOF
7916
7917
7918 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7919 if test "x$prefix" = xNONE; then
7920 test_prefix=/usr/local
7921 else
7922 test_prefix=$prefix
7923 fi
7924 else
7925 test_prefix=$exec_prefix
7926 fi
7927 value=0
7928 case ${iconv_bin} in
7929 "${test_prefix}"|"${test_prefix}/"*|\
7930 '${exec_prefix}'|'${exec_prefix}/'*)
7931 value=1
7932 ;;
7933 esac
7934
7935cat >>confdefs.h <<_ACEOF
7936#define ICONV_BIN_RELOCATABLE $value
7937_ACEOF
7938
7939
7940
7941fi
7942
7943
cb01cfba 7944# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7945if test x"$enable_tui" != xno; then
cb01cfba
JB
7946 prefer_curses=yes
7947fi
7948
7949curses_found=no
7950if test x"$prefer_curses" = xyes; then
7951 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7952 # curses library because the latter might not provide all the
7953 # functionality we need. However, this leads to problems on systems
7954 # where the linker searches /usr/local/lib, but the compiler doesn't
7955 # search /usr/local/include, if ncurses is installed in /usr/local. A
7956 # default installation of ncurses on alpha*-dec-osf* will lead to such
7957 # a situation.
81ecdfbb
RW
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7959$as_echo_n "checking for library containing waddstr... " >&6; }
7960if test "${ac_cv_search_waddstr+set}" = set; then :
7961 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7962else
7963 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7965/* end confdefs.h. */
7966
81ecdfbb
RW
7967/* Override any GCC internal prototype to avoid an error.
7968 Use char because int might match the return type of a GCC
7969 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7970#ifdef __cplusplus
7971extern "C"
7972#endif
6c7a06a3
TT
7973char waddstr ();
7974int
7975main ()
7976{
81ecdfbb 7977return waddstr ();
6c7a06a3
TT
7978 ;
7979 return 0;
7980}
7981_ACEOF
81ecdfbb
RW
7982for ac_lib in '' ncurses cursesX curses; do
7983 if test -z "$ac_lib"; then
7984 ac_res="none required"
7985 else
7986 ac_res=-l$ac_lib
7987 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7988 fi
7989 if ac_fn_c_try_link "$LINENO"; then :
7990 ac_cv_search_waddstr=$ac_res
7991fi
7992rm -f core conftest.err conftest.$ac_objext \
7993 conftest$ac_exeext
7994 if test "${ac_cv_search_waddstr+set}" = set; then :
7995 break
7996fi
7997done
7998if test "${ac_cv_search_waddstr+set}" = set; then :
7999
6c7a06a3 8000else
81ecdfbb
RW
8001 ac_cv_search_waddstr=no
8002fi
8003rm conftest.$ac_ext
8004LIBS=$ac_func_search_save_LIBS
8005fi
8006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8007$as_echo "$ac_cv_search_waddstr" >&6; }
8008ac_res=$ac_cv_search_waddstr
8009if test "$ac_res" != no; then :
8010 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8011
8012fi
8013
8014
cb01cfba
JB
8015 if test "$ac_cv_search_waddstr" != no; then
8016 curses_found=yes
8017 fi
8018fi
8019
8020# Check whether we should enable the TUI, but only do so if we really
8021# can.
8022if test x"$enable_tui" != xno; then
8023 if test -d $srcdir/tui; then
8024 if test "$curses_found" != no; then
6c7a06a3
TT
8025 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8026 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8027 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8028 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8029 else
8030 if test x"$enable_tui" = xyes; then
81ecdfbb 8031 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8032 else
81ecdfbb
RW
8033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8034$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8035 fi
8036 fi
8037 fi
8038fi
8039
8040# Since GDB uses Readline, we need termcap functionality. In many
8041# cases this will be provided by the curses library, but some systems
8042# have a seperate termcap library, or no curses library at all.
8043
8044case $host_os in
8045 cygwin*)
8046 if test -d $srcdir/libtermcap; then
8047 LIBS="../libtermcap/libtermcap.a $LIBS"
8048 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8049 fi ;;
8050 go32* | *djgpp*)
8051 ac_cv_search_tgetent="none required"
8052 ;;
6c7a06a3
TT
8053esac
8054
8055# These are the libraries checked by Readline.
81ecdfbb
RW
8056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8057$as_echo_n "checking for library containing tgetent... " >&6; }
8058if test "${ac_cv_search_tgetent+set}" = set; then :
8059 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8060else
8061 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8063/* end confdefs.h. */
8064
81ecdfbb
RW
8065/* Override any GCC internal prototype to avoid an error.
8066 Use char because int might match the return type of a GCC
8067 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8068#ifdef __cplusplus
8069extern "C"
8070#endif
6c7a06a3
TT
8071char tgetent ();
8072int
8073main ()
8074{
81ecdfbb 8075return tgetent ();
6c7a06a3
TT
8076 ;
8077 return 0;
8078}
8079_ACEOF
81ecdfbb
RW
8080for ac_lib in '' termcap tinfo curses ncurses; do
8081 if test -z "$ac_lib"; then
8082 ac_res="none required"
8083 else
8084 ac_res=-l$ac_lib
6c7a06a3 8085 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8086 fi
8087 if ac_fn_c_try_link "$LINENO"; then :
8088 ac_cv_search_tgetent=$ac_res
8089fi
8090rm -f core conftest.err conftest.$ac_objext \
8091 conftest$ac_exeext
8092 if test "${ac_cv_search_tgetent+set}" = set; then :
8093 break
8094fi
8095done
8096if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8097
6c7a06a3 8098else
81ecdfbb 8099 ac_cv_search_tgetent=no
6c7a06a3 8100fi
81ecdfbb 8101rm conftest.$ac_ext
6c7a06a3
TT
8102LIBS=$ac_func_search_save_LIBS
8103fi
81ecdfbb
RW
8104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8105$as_echo "$ac_cv_search_tgetent" >&6; }
8106ac_res=$ac_cv_search_tgetent
8107if test "$ac_res" != no; then :
8108 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8109
06825bd1
MK
8110fi
8111
06825bd1 8112
bec39cab 8113if test "$ac_cv_search_tgetent" = no; then
7a85168d 8114 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8115fi
8116
3841debe 8117
81ecdfbb
RW
8118# Check whether --with-system-readline was given.
8119if test "${with_system_readline+set}" = set; then :
8120 withval=$with_system_readline;
8121fi
6a30b0a5 8122
6a30b0a5
AS
8123
8124if test "$with_system_readline" = yes; then
8125 READLINE=-lreadline
8126 READLINE_DEPS=
8127 READLINE_CFLAGS=
39037522 8128 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8129else
8130 READLINE='$(READLINE_DIR)/libreadline.a'
8131 READLINE_DEPS='$(READLINE)'
8132 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8133 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8134fi
8135
8136
8137
8138
8139
f997c383
SD
8140# Generate jit-reader.h
8141
8142# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8143TARGET_PTR=
8144
8145# The cast to long int works around a bug in the HP C Compiler
8146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8148# This bug is HP SR number 8606223364.
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8150$as_echo_n "checking size of unsigned long long... " >&6; }
8151if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8152 $as_echo_n "(cached) " >&6
8153else
8154 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8155
8156else
8157 if test "$ac_cv_type_unsigned_long_long" = yes; then
8158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8160{ as_fn_set_status 77
8161as_fn_error "cannot compute sizeof (unsigned long long)
8162See \`config.log' for more details." "$LINENO" 5; }; }
8163 else
8164 ac_cv_sizeof_unsigned_long_long=0
8165 fi
8166fi
8167
8168fi
8169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8170$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8171
8172
8173
8174cat >>confdefs.h <<_ACEOF
8175#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8176_ACEOF
8177
8178
8179# The cast to long int works around a bug in the HP C Compiler
8180# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8181# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8182# This bug is HP SR number 8606223364.
8183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8184$as_echo_n "checking size of unsigned long... " >&6; }
8185if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8186 $as_echo_n "(cached) " >&6
8187else
8188 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8189
8190else
8191 if test "$ac_cv_type_unsigned_long" = yes; then
8192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8194{ as_fn_set_status 77
8195as_fn_error "cannot compute sizeof (unsigned long)
8196See \`config.log' for more details." "$LINENO" 5; }; }
8197 else
8198 ac_cv_sizeof_unsigned_long=0
8199 fi
8200fi
8201
8202fi
8203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8204$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8205
8206
8207
8208cat >>confdefs.h <<_ACEOF
8209#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8210_ACEOF
8211
8212
8213# The cast to long int works around a bug in the HP C Compiler
8214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8216# This bug is HP SR number 8606223364.
8217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8218$as_echo_n "checking size of unsigned __int128... " >&6; }
8219if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8220 $as_echo_n "(cached) " >&6
8221else
8222 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8223
8224else
8225 if test "$ac_cv_type_unsigned___int128" = yes; then
8226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8227$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8228{ as_fn_set_status 77
8229as_fn_error "cannot compute sizeof (unsigned __int128)
8230See \`config.log' for more details." "$LINENO" 5; }; }
8231 else
8232 ac_cv_sizeof_unsigned___int128=0
8233 fi
8234fi
8235
8236fi
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8238$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8239
8240
8241
8242cat >>confdefs.h <<_ACEOF
8243#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8244_ACEOF
8245
8246
8247
8248if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8249 TARGET_PTR="unsigned long"
8250elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8251 TARGET_PTR="unsigned long long"
8252elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8253 TARGET_PTR="unsigned __int128"
8254else
8255 TARGET_PTR="unsigned long"
8256fi
8257
8258
8259ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8260
8261
a2d08b9e
SD
8262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8263$as_echo_n "checking for library containing dlopen... " >&6; }
8264if test "${ac_cv_search_dlopen+set}" = set; then :
8265 $as_echo_n "(cached) " >&6
8266else
8267 ac_func_search_save_LIBS=$LIBS
8268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8269/* end confdefs.h. */
8270
8271/* Override any GCC internal prototype to avoid an error.
8272 Use char because int might match the return type of a GCC
8273 builtin and then its argument prototype would still apply. */
8274#ifdef __cplusplus
8275extern "C"
8276#endif
8277char dlopen ();
8278int
8279main ()
8280{
8281return dlopen ();
8282 ;
8283 return 0;
8284}
8285_ACEOF
8286for ac_lib in '' dl; do
8287 if test -z "$ac_lib"; then
8288 ac_res="none required"
8289 else
8290 ac_res=-l$ac_lib
8291 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8292 fi
8293 if ac_fn_c_try_link "$LINENO"; then :
8294 ac_cv_search_dlopen=$ac_res
8295fi
8296rm -f core conftest.err conftest.$ac_objext \
8297 conftest$ac_exeext
8298 if test "${ac_cv_search_dlopen+set}" = set; then :
8299 break
8300fi
8301done
8302if test "${ac_cv_search_dlopen+set}" = set; then :
8303
8304else
8305 ac_cv_search_dlopen=no
8306fi
8307rm conftest.$ac_ext
8308LIBS=$ac_func_search_save_LIBS
8309fi
8310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8311$as_echo "$ac_cv_search_dlopen" >&6; }
8312ac_res=$ac_cv_search_dlopen
8313if test "$ac_res" != no; then :
8314 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8315
8316fi
8317
8318
39037522 8319
b8e0a31c
SD
8320
8321# Check whether --with-jit-reader-dir was given.
8322if test "${with_jit_reader_dir+set}" = set; then :
8323 withval=$with_jit_reader_dir;
8324 JIT_READER_DIR=$withval
8325else
8326 JIT_READER_DIR=${libdir}/gdb
8327fi
8328
8329
8330 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8331 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8332 ac_define_dir=`eval echo $JIT_READER_DIR`
8333 ac_define_dir=`eval echo $ac_define_dir`
8334
8335cat >>confdefs.h <<_ACEOF
8336#define JIT_READER_DIR "$ac_define_dir"
8337_ACEOF
8338
8339
8340
8341
8342 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8343 if test "x$prefix" = xNONE; then
8344 test_prefix=/usr/local
8345 else
8346 test_prefix=$prefix
8347 fi
8348 else
8349 test_prefix=$exec_prefix
8350 fi
8351 value=0
8352 case ${ac_define_dir} in
8353 "${test_prefix}"|"${test_prefix}/"*|\
8354 '${exec_prefix}'|'${exec_prefix}/'*)
8355 value=1
8356 ;;
8357 esac
8358
8359cat >>confdefs.h <<_ACEOF
8360#define JIT_READER_DIR_RELOCATABLE $value
8361_ACEOF
8362
8363
8364
8365
8366
81ecdfbb
RW
8367# Check whether --with-expat was given.
8368if test "${with_expat+set}" = set; then :
8369 withval=$with_expat;
5c39566f
DJ
8370else
8371 with_expat=auto
81ecdfbb
RW
8372fi
8373
8374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8375$as_echo_n "checking whether to use expat... " >&6; }
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8377$as_echo "$with_expat" >&6; }
5c39566f
DJ
8378
8379if test "${with_expat}" = no; then
81ecdfbb
RW
8380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8381$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8382 HAVE_LIBEXPAT=no
8383else
8384
3841debe
DJ
8385
8386
8387
8388
8389
8390
8391
8392 use_additional=yes
8393
8394 acl_save_prefix="$prefix"
8395 prefix="$acl_final_prefix"
8396 acl_save_exec_prefix="$exec_prefix"
8397 exec_prefix="$acl_final_exec_prefix"
8398
8399 eval additional_includedir=\"$includedir\"
8400 eval additional_libdir=\"$libdir\"
8401
8402 exec_prefix="$acl_save_exec_prefix"
8403 prefix="$acl_save_prefix"
8404
8405
81ecdfbb
RW
8406# Check whether --with-libexpat-prefix was given.
8407if test "${with_libexpat_prefix+set}" = set; then :
8408 withval=$with_libexpat_prefix;
3841debe
DJ
8409 if test "X$withval" = "Xno"; then
8410 use_additional=no
8411 else
8412 if test "X$withval" = "X"; then
8413
8414 acl_save_prefix="$prefix"
8415 prefix="$acl_final_prefix"
8416 acl_save_exec_prefix="$exec_prefix"
8417 exec_prefix="$acl_final_exec_prefix"
8418
8419 eval additional_includedir=\"$includedir\"
8420 eval additional_libdir=\"$libdir\"
8421
8422 exec_prefix="$acl_save_exec_prefix"
8423 prefix="$acl_save_prefix"
8424
8425 else
8426 additional_includedir="$withval/include"
8427 additional_libdir="$withval/lib"
8428 fi
8429 fi
8430
81ecdfbb
RW
8431fi
8432
3841debe
DJ
8433 LIBEXPAT=
8434 LTLIBEXPAT=
8435 INCEXPAT=
8436 rpathdirs=
8437 ltrpathdirs=
8438 names_already_handled=
8439 names_next_round='expat '
8440 while test -n "$names_next_round"; do
8441 names_this_round="$names_next_round"
8442 names_next_round=
8443 for name in $names_this_round; do
8444 already_handled=
8445 for n in $names_already_handled; do
8446 if test "$n" = "$name"; then
8447 already_handled=yes
8448 break
8449 fi
8450 done
8451 if test -z "$already_handled"; then
8452 names_already_handled="$names_already_handled $name"
8453 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8454 eval value=\"\$HAVE_LIB$uppername\"
8455 if test -n "$value"; then
8456 if test "$value" = yes; then
8457 eval value=\"\$LIB$uppername\"
8458 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8459 eval value=\"\$LTLIB$uppername\"
8460 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8461 else
8462 :
8463 fi
8464 else
8465 found_dir=
8466 found_la=
8467 found_so=
8468 found_a=
8469 if test $use_additional = yes; then
8470 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8471 found_dir="$additional_libdir"
8472 found_so="$additional_libdir/lib$name.$shlibext"
8473 if test -f "$additional_libdir/lib$name.la"; then
8474 found_la="$additional_libdir/lib$name.la"
8475 fi
8476 else
8477 if test -f "$additional_libdir/lib$name.$libext"; then
8478 found_dir="$additional_libdir"
8479 found_a="$additional_libdir/lib$name.$libext"
8480 if test -f "$additional_libdir/lib$name.la"; then
8481 found_la="$additional_libdir/lib$name.la"
8482 fi
8483 fi
8484 fi
8485 fi
8486 if test "X$found_dir" = "X"; then
8487 for x in $LDFLAGS $LTLIBEXPAT; do
8488
8489 acl_save_prefix="$prefix"
8490 prefix="$acl_final_prefix"
8491 acl_save_exec_prefix="$exec_prefix"
8492 exec_prefix="$acl_final_exec_prefix"
8493 eval x=\"$x\"
8494 exec_prefix="$acl_save_exec_prefix"
8495 prefix="$acl_save_prefix"
8496
8497 case "$x" in
8498 -L*)
8499 dir=`echo "X$x" | sed -e 's/^X-L//'`
8500 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8501 found_dir="$dir"
8502 found_so="$dir/lib$name.$shlibext"
8503 if test -f "$dir/lib$name.la"; then
8504 found_la="$dir/lib$name.la"
8505 fi
8506 else
8507 if test -f "$dir/lib$name.$libext"; then
8508 found_dir="$dir"
8509 found_a="$dir/lib$name.$libext"
8510 if test -f "$dir/lib$name.la"; then
8511 found_la="$dir/lib$name.la"
8512 fi
8513 fi
8514 fi
8515 ;;
8516 esac
8517 if test "X$found_dir" != "X"; then
8518 break
8519 fi
8520 done
8521 fi
8522 if test "X$found_dir" != "X"; then
8523 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8524 if test "X$found_so" != "X"; then
8525 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8526 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8527 else
8528 haveit=
8529 for x in $ltrpathdirs; do
8530 if test "X$x" = "X$found_dir"; then
8531 haveit=yes
8532 break
8533 fi
8534 done
8535 if test -z "$haveit"; then
8536 ltrpathdirs="$ltrpathdirs $found_dir"
8537 fi
8538 if test "$hardcode_direct" = yes; then
8539 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8540 else
8541 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8542 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8543 haveit=
8544 for x in $rpathdirs; do
8545 if test "X$x" = "X$found_dir"; then
8546 haveit=yes
8547 break
8548 fi
8549 done
8550 if test -z "$haveit"; then
8551 rpathdirs="$rpathdirs $found_dir"
8552 fi
8553 else
8554 haveit=
8555 for x in $LDFLAGS $LIBEXPAT; do
8556
8557 acl_save_prefix="$prefix"
8558 prefix="$acl_final_prefix"
8559 acl_save_exec_prefix="$exec_prefix"
8560 exec_prefix="$acl_final_exec_prefix"
8561 eval x=\"$x\"
8562 exec_prefix="$acl_save_exec_prefix"
8563 prefix="$acl_save_prefix"
8564
8565 if test "X$x" = "X-L$found_dir"; then
8566 haveit=yes
8567 break
8568 fi
8569 done
8570 if test -z "$haveit"; then
8571 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8572 fi
8573 if test "$hardcode_minus_L" != no; then
8574 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8575 else
8576 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8577 fi
8578 fi
8579 fi
8580 fi
8581 else
8582 if test "X$found_a" != "X"; then
8583 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8584 else
8585 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8586 fi
8587 fi
8588 additional_includedir=
8589 case "$found_dir" in
8590 */lib | */lib/)
8591 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8592 additional_includedir="$basedir/include"
8593 ;;
8594 esac
8595 if test "X$additional_includedir" != "X"; then
8596 if test "X$additional_includedir" != "X/usr/include"; then
8597 haveit=
8598 if test "X$additional_includedir" = "X/usr/local/include"; then
8599 if test -n "$GCC"; then
8600 case $host_os in
8601 linux*) haveit=yes;;
8602 esac
8603 fi
8604 fi
8605 if test -z "$haveit"; then
8606 for x in $CPPFLAGS $INCEXPAT; do
8607
8608 acl_save_prefix="$prefix"
8609 prefix="$acl_final_prefix"
8610 acl_save_exec_prefix="$exec_prefix"
8611 exec_prefix="$acl_final_exec_prefix"
8612 eval x=\"$x\"
8613 exec_prefix="$acl_save_exec_prefix"
8614 prefix="$acl_save_prefix"
8615
8616 if test "X$x" = "X-I$additional_includedir"; then
8617 haveit=yes
8618 break
8619 fi
8620 done
8621 if test -z "$haveit"; then
8622 if test -d "$additional_includedir"; then
8623 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8624 fi
8625 fi
8626 fi
8627 fi
8628 fi
8629 if test -n "$found_la"; then
8630 save_libdir="$libdir"
8631 case "$found_la" in
8632 */* | *\\*) . "$found_la" ;;
8633 *) . "./$found_la" ;;
8634 esac
8635 libdir="$save_libdir"
8636 for dep in $dependency_libs; do
8637 case "$dep" in
8638 -L*)
8639 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8640 if test "X$additional_libdir" != "X/usr/lib"; then
8641 haveit=
8642 if test "X$additional_libdir" = "X/usr/local/lib"; then
8643 if test -n "$GCC"; then
8644 case $host_os in
8645 linux*) haveit=yes;;
8646 esac
8647 fi
8648 fi
8649 if test -z "$haveit"; then
8650 haveit=
8651 for x in $LDFLAGS $LIBEXPAT; do
8652
8653 acl_save_prefix="$prefix"
8654 prefix="$acl_final_prefix"
8655 acl_save_exec_prefix="$exec_prefix"
8656 exec_prefix="$acl_final_exec_prefix"
8657 eval x=\"$x\"
8658 exec_prefix="$acl_save_exec_prefix"
8659 prefix="$acl_save_prefix"
8660
8661 if test "X$x" = "X-L$additional_libdir"; then
8662 haveit=yes
8663 break
8664 fi
8665 done
8666 if test -z "$haveit"; then
8667 if test -d "$additional_libdir"; then
8668 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8669 fi
8670 fi
8671 haveit=
8672 for x in $LDFLAGS $LTLIBEXPAT; do
8673
8674 acl_save_prefix="$prefix"
8675 prefix="$acl_final_prefix"
8676 acl_save_exec_prefix="$exec_prefix"
8677 exec_prefix="$acl_final_exec_prefix"
8678 eval x=\"$x\"
8679 exec_prefix="$acl_save_exec_prefix"
8680 prefix="$acl_save_prefix"
8681
8682 if test "X$x" = "X-L$additional_libdir"; then
8683 haveit=yes
8684 break
8685 fi
8686 done
8687 if test -z "$haveit"; then
8688 if test -d "$additional_libdir"; then
8689 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8690 fi
8691 fi
8692 fi
8693 fi
8694 ;;
8695 -R*)
8696 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8697 if test "$enable_rpath" != no; then
8698 haveit=
8699 for x in $rpathdirs; do
8700 if test "X$x" = "X$dir"; then
8701 haveit=yes
8702 break
8703 fi
8704 done
8705 if test -z "$haveit"; then
8706 rpathdirs="$rpathdirs $dir"
8707 fi
8708 haveit=
8709 for x in $ltrpathdirs; do
8710 if test "X$x" = "X$dir"; then
8711 haveit=yes
8712 break
8713 fi
8714 done
8715 if test -z "$haveit"; then
8716 ltrpathdirs="$ltrpathdirs $dir"
8717 fi
8718 fi
8719 ;;
8720 -l*)
8721 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8722 ;;
8723 *.la)
8724 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8725 ;;
8726 *)
8727 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8728 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8729 ;;
81ecdfbb
RW
8730 esac
8731 done
8732 fi
8733 else
8734 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8735 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8736 fi
8737 fi
8738 fi
8739 done
8740 done
8741 if test "X$rpathdirs" != "X"; then
8742 if test -n "$hardcode_libdir_separator"; then
8743 alldirs=
8744 for found_dir in $rpathdirs; do
8745 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8746 done
8747 acl_save_libdir="$libdir"
8748 libdir="$alldirs"
8749 eval flag=\"$hardcode_libdir_flag_spec\"
8750 libdir="$acl_save_libdir"
8751 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8752 else
8753 for found_dir in $rpathdirs; do
8754 acl_save_libdir="$libdir"
8755 libdir="$found_dir"
8756 eval flag=\"$hardcode_libdir_flag_spec\"
8757 libdir="$acl_save_libdir"
8758 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8759 done
8760 fi
8761 fi
8762 if test "X$ltrpathdirs" != "X"; then
8763 for found_dir in $ltrpathdirs; do
8764 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8765 done
8766 fi
a9322a30
TT
8767
8768
81ecdfbb 8769 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8770
81ecdfbb
RW
8771 for element in $INCEXPAT; do
8772 haveit=
8773 for x in $CPPFLAGS; do
a9322a30 8774
81ecdfbb
RW
8775 acl_save_prefix="$prefix"
8776 prefix="$acl_final_prefix"
8777 acl_save_exec_prefix="$exec_prefix"
8778 exec_prefix="$acl_final_exec_prefix"
8779 eval x=\"$x\"
8780 exec_prefix="$acl_save_exec_prefix"
8781 prefix="$acl_save_prefix"
a8111142 8782
81ecdfbb
RW
8783 if test "X$x" = "X$element"; then
8784 haveit=yes
8785 break
8786 fi
8787 done
8788 if test -z "$haveit"; then
8789 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8790 fi
8791 done
a9322a30
TT
8792
8793
81ecdfbb
RW
8794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8795$as_echo_n "checking for libexpat... " >&6; }
8796if test "${ac_cv_libexpat+set}" = set; then :
8797 $as_echo_n "(cached) " >&6
bec39cab 8798else
bec39cab 8799
81ecdfbb
RW
8800 ac_save_LIBS="$LIBS"
8801 LIBS="$LIBS $LIBEXPAT"
8802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8803/* end confdefs.h. */
81ecdfbb
RW
8804#include "expat.h"
8805int
8806main ()
8807{
8808XML_Parser p = XML_ParserCreate (0);
8809 ;
8810 return 0;
8811}
bec39cab 8812_ACEOF
81ecdfbb
RW
8813if ac_fn_c_try_link "$LINENO"; then :
8814 ac_cv_libexpat=yes
c906108c 8815else
81ecdfbb 8816 ac_cv_libexpat=no
bec39cab 8817fi
81ecdfbb
RW
8818rm -f core conftest.err conftest.$ac_objext \
8819 conftest$ac_exeext conftest.$ac_ext
8820 LIBS="$ac_save_LIBS"
c906108c 8821
95ca63c4 8822fi
81ecdfbb
RW
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8824$as_echo "$ac_cv_libexpat" >&6; }
8825 if test "$ac_cv_libexpat" = yes; then
8826 HAVE_LIBEXPAT=yes
bec39cab 8827
81ecdfbb 8828$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8829
81ecdfbb
RW
8830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8831$as_echo_n "checking how to link with libexpat... " >&6; }
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8833$as_echo "$LIBEXPAT" >&6; }
8834 else
8835 HAVE_LIBEXPAT=no
8836 CPPFLAGS="$ac_save_CPPFLAGS"
8837 LIBEXPAT=
8838 LTLIBEXPAT=
8839 fi
95ca63c4
CF
8840
8841
8842
7cb9022a
MK
8843
8844
bec39cab 8845
81ecdfbb
RW
8846 if test "$HAVE_LIBEXPAT" != yes; then
8847 if test "$with_expat" = yes; then
8848 as_fn_error "expat is missing or unusable" "$LINENO" 5
8849 else
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8851$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8852 fi
8853 else
8854 save_LIBS=$LIBS
8855 LIBS="$LIBS $LIBEXPAT"
8856 for ac_func in XML_StopParser
8857do :
8858 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8859if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8860 cat >>confdefs.h <<_ACEOF
81ecdfbb 8861#define HAVE_XML_STOPPARSER 1
bec39cab 8862_ACEOF
95ca63c4 8863
bec39cab 8864fi
bec39cab 8865done
95ca63c4 8866
81ecdfbb
RW
8867 LIBS=$save_LIBS
8868 fi
a9322a30
TT
8869fi
8870
d344e670
DE
8871# --------------------- #
8872# Check for libpython. #
8873# --------------------- #
8874
a9322a30 8875
a9322a30
TT
8876
8877
ec685c5e 8878
0c4a4063 8879
81ecdfbb
RW
8880# Check whether --with-python was given.
8881if test "${with_python+set}" = set; then :
8882 withval=$with_python;
bec39cab 8883else
81ecdfbb 8884 with_python=auto
bec39cab 8885fi
bec39cab 8886
81ecdfbb
RW
8887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8888$as_echo_n "checking whether to use python... " >&6; }
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8890$as_echo "$with_python" >&6; }
9a156167 8891
81ecdfbb
RW
8892if test "${with_python}" = no; then
8893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8894$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8895 have_libpython=no
bec39cab 8896else
81ecdfbb 8897 case "${with_python}" in
8c85a4e2 8898 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8899 if test -d ${with_python}; then
8900 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8901 python_prog="${with_python}/bin/python"
0c4a4063 8902 python_prefix=
9c4ea6c5
JB
8903 # If python does not exit ${with_python}/bin, then try in
8904 # ${with_python}. On Windows/MinGW, this is where the Python
8905 # executable is.
8906 if test ! -x "${python_prog}"; then
8907 python_prog="${with_python}/python"
8908 python_prefix=
8909 fi
e7a30f46 8910 if test ! -x "${python_prog}"; then
ec685c5e
DE
8911 # Fall back to gdb 7.0/7.1 behaviour.
8912 python_prog=missing
0c4a4063 8913 python_prefix=${with_python}
ec685c5e 8914 fi
e7a30f46 8915 elif test -x "${with_python}"; then
ec685c5e
DE
8916 # While we can't run python compiled for $host (unless host == build),
8917 # the user could write a script that provides the needed information,
8918 # so we support that.
ec685c5e 8919 python_prog=${with_python}
0c4a4063 8920 python_prefix=
ec685c5e
DE
8921 else
8922 as_fn_error "invalid value for --with-python" "$LINENO" 5
8923 fi
81ecdfbb 8924 ;;
ec685c5e
DE
8925 */*)
8926 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8927 as_fn_error "invalid value for --with-python" "$LINENO" 5
8928 ;;
ec685c5e
DE
8929 *)
8930 # The user has either specified auto, yes, or the name of the python
8931 # program assumed to be in $PATH.
8932 python_prefix=
8933 case "${with_python}" in
8934 yes | auto)
8935 if test ${build} = ${host}; then
8936 # Extract the first word of "python", so it can be a program name with args.
8937set dummy python; ac_word=$2
8938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8939$as_echo_n "checking for $ac_word... " >&6; }
8940if test "${ac_cv_path_python_prog_path+set}" = set; then :
8941 $as_echo_n "(cached) " >&6
8942else
8943 case $python_prog_path in
8944 [\\/]* | ?:[\\/]*)
8945 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8946 ;;
8947 *)
8948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8949for as_dir in $PATH
8950do
8951 IFS=$as_save_IFS
8952 test -z "$as_dir" && as_dir=.
8953 for ac_exec_ext in '' $ac_executable_extensions; do
8954 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8955 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8957 break 2
8958 fi
8959done
8960 done
8961IFS=$as_save_IFS
8962
8963 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8964 ;;
8965esac
8966fi
8967python_prog_path=$ac_cv_path_python_prog_path
8968if test -n "$python_prog_path"; then
8969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8970$as_echo "$python_prog_path" >&6; }
8971else
8972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8973$as_echo "no" >&6; }
8974fi
8975
8976
8977 if test "${python_prog_path}" = missing; then
8978 python_prog=missing
8979 else
8980 python_prog=${python_prog_path}
8981 fi
8982 else
8983 # Not much we can do except assume the cross-compiler will find the
8984 # right files.
8985 python_prog=missing
8986 fi
8987 ;;
8988 *)
8989 # While we can't run python compiled for $host (unless host == build),
8990 # the user could write a script that provides the needed information,
8991 # so we support that.
8992 python_prog="${with_python}"
8993 # Extract the first word of "${python_prog}", so it can be a program name with args.
8994set dummy ${python_prog}; ac_word=$2
8995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8996$as_echo_n "checking for $ac_word... " >&6; }
8997if test "${ac_cv_path_python_prog_path+set}" = set; then :
8998 $as_echo_n "(cached) " >&6
8999else
9000 case $python_prog_path in
9001 [\\/]* | ?:[\\/]*)
9002 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9003 ;;
9004 *)
9005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9006for as_dir in $PATH
9007do
9008 IFS=$as_save_IFS
9009 test -z "$as_dir" && as_dir=.
9010 for ac_exec_ext in '' $ac_executable_extensions; do
9011 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9012 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9014 break 2
9015 fi
9016done
9017 done
9018IFS=$as_save_IFS
9019
9020 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9021 ;;
9022esac
9023fi
9024python_prog_path=$ac_cv_path_python_prog_path
9025if test -n "$python_prog_path"; then
9026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9027$as_echo "$python_prog_path" >&6; }
9028else
9029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030$as_echo "no" >&6; }
9031fi
9032
9033
9034 if test "${python_prog_path}" = missing; then
9035 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9036 fi
9037 ;;
9038 esac
81ecdfbb
RW
9039 esac
9040
ec685c5e 9041 if test "${python_prog}" != missing; then
e7a30f46
DE
9042 # We have a python program to use, but it may be too old.
9043 # Don't flag an error for --with-python=auto (the default).
9044 have_python_config=yes
ec685c5e
DE
9045 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9046 if test $? != 0; then
e7a30f46
DE
9047 have_python_config=failed
9048 if test "${with_python}" != auto; then
9049 as_fn_error "failure running python-config --includes" "$LINENO" 5
9050 fi
ec685c5e
DE
9051 fi
9052 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9053 if test $? != 0; then
e7a30f46
DE
9054 have_python_config=failed
9055 if test "${with_python}" != auto; then
9056 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9057 fi
ec685c5e 9058 fi
0c4a4063
DE
9059 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9060 if test $? != 0; then
e7a30f46
DE
9061 have_python_config=failed
9062 if test "${with_python}" != auto; then
9063 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9064 fi
0c4a4063 9065 fi
ec685c5e 9066 else
ac534cba
JB
9067 # We do not have a python executable we can use to determine where
9068 # to find the Python headers and libs. We cannot guess the include
9069 # path from the python_prefix either, because that include path
9070 # depends on the Python version. So, there is nothing much we can
9071 # do except assume that the compiler will be able to find those files.
9072 python_includes=
9073 python_libs=
0c4a4063 9074 have_python_config=no
ec685c5e 9075 fi
bec39cab 9076
ec685c5e
DE
9077 # If we have python-config, only try the configuration it provides.
9078 # Otherwise fallback on the old way of trying different versions of
9079 # python in turn.
81ecdfbb 9080
ec685c5e
DE
9081 have_libpython=no
9082 if test "${have_python_config}" = yes; then
c1039e3c
JB
9083 # Determine the Python version by extracting "-lpython<version>"
9084 # part of the python_libs. <version> is usually X.Y with X and Y
9085 # being decimal numbers, but can also be XY (seen on Windows).
9086 #
9087 # The extraction is performed using sed with a regular expression.
9088 # Initially, the regexp used was using the '?' quantifier to make
9089 # the dot in the version number optional. Unfortunately, this
9090 # does not work with non-GNU versions of sed because, because of
9091 # what looks like a limitation (the '?' quantifier does not work
9092 # with back-references). We work around this limitation by using
9093 # the '*' quantifier instead. It means that, in theory, we might
9094 # match unexpected version strings such as "-lpython2..7", but
9095 # this seems unlikely in practice. And even if that happens,
9096 # an error will be triggered later on, when checking that version
9097 # number.
ec685c5e 9098 python_version=`echo " ${python_libs} " \
c1039e3c 9099 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9100 case "${python_version}" in
9101 python*)
ec685c5e
DE
9102
9103 version=${python_version}
9104
9105 new_CPPFLAGS=${python_includes}
9106 new_LIBS=${python_libs}
81ecdfbb
RW
9107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9108$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9109 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9110 save_LIBS=$LIBS
ec685c5e
DE
9111 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9112 LIBS="$LIBS $new_LIBS"
9113 found_usable_python=no
81ecdfbb 9114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9115/* end confdefs.h. */
ac534cba 9116#include "Python.h"
81ecdfbb
RW
9117int
9118main ()
9119{
9120Py_Initialize ();
9121 ;
9122 return 0;
9123}
bec39cab 9124_ACEOF
81ecdfbb 9125if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9126 have_libpython=${version}
9127 found_usable_python=yes
ac534cba
JB
9128 PYTHON_CPPFLAGS=$new_CPPFLAGS
9129 PYTHON_LIBS=$new_LIBS
9a156167 9130fi
81ecdfbb
RW
9131rm -f core conftest.err conftest.$ac_objext \
9132 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9133 CPPFLAGS=$save_CPPFLAGS
9134 LIBS=$save_LIBS
ec685c5e
DE
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9136$as_echo "${found_usable_python}" >&6; }
9a156167 9137
0c4a4063
DE
9138 ;;
9139 *)
ec685c5e 9140 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9141 ;;
9142 esac
e7a30f46 9143 elif test "${have_python_config}" != failed; then
ec685c5e 9144 if test "${have_libpython}" = no; then
9a156167 9145
420697bb
TT
9146 version=python2.7
9147
9148 new_CPPFLAGS=${python_includes}
9149 new_LIBS="${python_libs} -lpython2.7"
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9151$as_echo_n "checking for ${version}... " >&6; }
9152 save_CPPFLAGS=$CPPFLAGS
9153 save_LIBS=$LIBS
9154 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9155 LIBS="$LIBS $new_LIBS"
9156 found_usable_python=no
9157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9158/* end confdefs.h. */
ac534cba 9159#include "Python.h"
420697bb
TT
9160int
9161main ()
9162{
9163Py_Initialize ();
9164 ;
9165 return 0;
9166}
9167_ACEOF
9168if ac_fn_c_try_link "$LINENO"; then :
9169 have_libpython=${version}
9170 found_usable_python=yes
ac534cba
JB
9171 PYTHON_CPPFLAGS=$new_CPPFLAGS
9172 PYTHON_LIBS=$new_LIBS
420697bb
TT
9173fi
9174rm -f core conftest.err conftest.$ac_objext \
9175 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9176 CPPFLAGS=$save_CPPFLAGS
9177 LIBS=$save_LIBS
420697bb
TT
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9179$as_echo "${found_usable_python}" >&6; }
9180
9181 fi
9182 if test "${have_libpython}" = no; then
9183
ec685c5e
DE
9184 version=python2.6
9185
9186 new_CPPFLAGS=${python_includes}
9187 new_LIBS="${python_libs} -lpython2.6"
9188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9189$as_echo_n "checking for ${version}... " >&6; }
9190 save_CPPFLAGS=$CPPFLAGS
9191 save_LIBS=$LIBS
9192 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9193 LIBS="$LIBS $new_LIBS"
9194 found_usable_python=no
9195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9196/* end confdefs.h. */
ac534cba 9197#include "Python.h"
ec685c5e
DE
9198int
9199main ()
9200{
9201Py_Initialize ();
9202 ;
9203 return 0;
9204}
9205_ACEOF
9206if ac_fn_c_try_link "$LINENO"; then :
9207 have_libpython=${version}
9208 found_usable_python=yes
ac534cba
JB
9209 PYTHON_CPPFLAGS=$new_CPPFLAGS
9210 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9211fi
9212rm -f core conftest.err conftest.$ac_objext \
9213 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9214 CPPFLAGS=$save_CPPFLAGS
9215 LIBS=$save_LIBS
ec685c5e
DE
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9217$as_echo "${found_usable_python}" >&6; }
9a156167 9218
81ecdfbb 9219 fi
ec685c5e 9220 if test ${have_libpython} = no; then
9a156167 9221
81ecdfbb 9222 version=python2.5
9a156167 9223
ec685c5e
DE
9224 new_CPPFLAGS=${python_includes}
9225 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9227$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9228 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9229 save_LIBS=$LIBS
ec685c5e
DE
9230 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9231 LIBS="$LIBS $new_LIBS"
9232 found_usable_python=no
81ecdfbb 9233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9234/* end confdefs.h. */
ac534cba 9235#include "Python.h"
81ecdfbb
RW
9236int
9237main ()
9238{
9239Py_Initialize ();
9240 ;
9241 return 0;
9242}
436868fb 9243_ACEOF
81ecdfbb 9244if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9245 have_libpython=${version}
9246 found_usable_python=yes
ac534cba
JB
9247 PYTHON_CPPFLAGS=$new_CPPFLAGS
9248 PYTHON_LIBS=$new_LIBS
436868fb 9249fi
81ecdfbb
RW
9250rm -f core conftest.err conftest.$ac_objext \
9251 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9252 CPPFLAGS=$save_CPPFLAGS
9253 LIBS=$save_LIBS
ec685c5e
DE
9254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9255$as_echo "${found_usable_python}" >&6; }
a9322a30 9256
81ecdfbb 9257 fi
ec685c5e 9258 if test ${have_libpython} = no; then
a9322a30 9259
81ecdfbb 9260 version=python2.4
a9322a30 9261
ec685c5e
DE
9262 new_CPPFLAGS=${python_includes}
9263 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9265$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9266 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9267 save_LIBS=$LIBS
ec685c5e
DE
9268 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9269 LIBS="$LIBS $new_LIBS"
9270 found_usable_python=no
81ecdfbb 9271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9272/* end confdefs.h. */
ac534cba 9273#include "Python.h"
a9322a30
TT
9274int
9275main ()
9276{
81ecdfbb 9277Py_Initialize ();
a9322a30
TT
9278 ;
9279 return 0;
9280}
436868fb 9281_ACEOF
81ecdfbb 9282if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9283 have_libpython=${version}
9284 found_usable_python=yes
ac534cba
JB
9285 PYTHON_CPPFLAGS=$new_CPPFLAGS
9286 PYTHON_LIBS=$new_LIBS
436868fb 9287fi
81ecdfbb
RW
9288rm -f core conftest.err conftest.$ac_objext \
9289 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9290 CPPFLAGS=$save_CPPFLAGS
9291 LIBS=$save_LIBS
ec685c5e
DE
9292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9293$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9294
ec685c5e
DE
9295 fi
9296 fi
9c4ea6c5 9297 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9298
9299$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9300
9c4ea6c5 9301 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9302
9303$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9304
9c4ea6c5 9305 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9306
9307$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9308
9c4ea6c5 9309 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9310
9311$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9312
81ecdfbb 9313 fi
ec685c5e
DE
9314
9315 if test "${have_libpython}" = no; then
81ecdfbb
RW
9316 case "${with_python}" in
9317 yes)
9318 as_fn_error "python is missing or unusable" "$LINENO" 5
9319 ;;
9320 auto)
9321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9322$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9323 ;;
9324 *)
9325 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9326 ;;
9327 esac
0c4a4063
DE
9328 else
9329 if test -n "${python_prefix}"; then
9330
9331cat >>confdefs.h <<_ACEOF
9332#define WITH_PYTHON_PATH "${python_prefix}"
9333_ACEOF
9334
9335
9336 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9337 if test "x$prefix" = xNONE; then
9338 test_prefix=/usr/local
9339 else
9340 test_prefix=$prefix
9341 fi
9342 else
9343 test_prefix=$exec_prefix
9344 fi
9345 value=0
9346 case ${python_prefix} in
9347 "${test_prefix}"|"${test_prefix}/"*|\
9348 '${exec_prefix}'|'${exec_prefix}/'*)
9349 value=1
9350 ;;
9351 esac
9352
9353cat >>confdefs.h <<_ACEOF
9354#define PYTHON_PATH_RELOCATABLE $value
9355_ACEOF
9356
9357
9358 fi
81ecdfbb 9359 fi
436868fb 9360fi
436868fb 9361
ec685c5e 9362if test "${have_libpython}" != no; then
436868fb 9363
81ecdfbb 9364$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9365
81ecdfbb
RW
9366 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9367 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9368 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9369 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9370 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9371
81ecdfbb
RW
9372 # Flags needed to compile Python code (taken from python-config --cflags).
9373 # We cannot call python-config directly because it will output whatever was
9374 # used when compiling the Python interpreter itself, including flags which
9375 # would make the python-related objects be compiled differently from the
9376 # rest of GDB (e.g., -O2 and -fPIC).
9377 if test "${GCC}" = yes; then
9378 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9379 fi
436868fb 9380
81ecdfbb
RW
9381 if test "x${tentative_python_cflags}" != x; then
9382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9383$as_echo_n "checking compiler flags for python code... " >&6; }
9384 for flag in ${tentative_python_cflags}; do
9385 # Check that the compiler accepts it
9386 saved_CFLAGS="$CFLAGS"
9387 CFLAGS="$CFLAGS $flag"
9388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9389/* end confdefs.h. */
81ecdfbb 9390
a9322a30
TT
9391int
9392main ()
9393{
a9322a30
TT
9394
9395 ;
9396 return 0;
9397}
bec39cab 9398_ACEOF
81ecdfbb
RW
9399if ac_fn_c_try_compile "$LINENO"; then :
9400 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9401fi
81ecdfbb
RW
9402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9403 CFLAGS="$saved_CFLAGS"
9404 done
9405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9406$as_echo "${PYTHON_CFLAGS}" >&6; }
9407 fi
043b6510 9408
c83393b9
JB
9409 # On x64 Windows, Python's include headers, and pyconfig.h in
9410 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9411 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9412 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9413 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9414 # The issue was reported to the Python community, but still isn't
9415 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9416
043b6510 9417 case "$gdb_host" in
c83393b9
JB
9418 mingw64)
9419 if test "${GCC}" = yes; then
9420 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9421 fi
9422 ;;
043b6510 9423 esac
a8db4212
YPK
9424
9425 # Note that "python -m threading" cannot be used to check for
9426 # threading support due to a bug in Python 2.7.3
9427 # (http://bugs.python.org/issue15567).
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9429$as_echo_n "checking whether python supports threads... " >&6; }
9430 saved_CPPFLAGS="${CPPFLAGS}"
9431 CPPFLAGS="${PYTHON_CPPFLAGS}"
9432 # Note that the test is reversed so that python_has_threads=yes on
9433 # unexpected failures.
9434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9435/* end confdefs.h. */
9436
9437#include <Python.h>
9438#ifdef WITH_THREAD
9439# error
9440#endif
9441
9442_ACEOF
9443if ac_fn_c_try_cpp "$LINENO"; then :
9444 python_has_threads=no
9445else
9446 python_has_threads=yes
9447fi
9448rm -f conftest.err conftest.$ac_ext
9449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9450$as_echo "${python_has_threads}" >&6; }
9451 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9452else
6dddc817
DE
9453 # Even if Python support is not compiled in, we need to have this file
9454 # included so that the "python" command, et.al., still exists.
9455 CONFIG_OBS="$CONFIG_OBS python.o"
9456 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9457fi
9a156167 9458
ed3ef339
DE
9459
9460
4df42755
DE
9461 if test "${have_libpython}" != no; then
9462 HAVE_PYTHON_TRUE=
9463 HAVE_PYTHON_FALSE='#'
9464else
9465 HAVE_PYTHON_TRUE='#'
9466 HAVE_PYTHON_FALSE=
9467fi
9468
ed3ef339
DE
9469
9470# -------------------- #
9471# Check for libguile. #
9472# -------------------- #
9473
9474
e1402065
DE
9475
9476
9477
9478
9479# Check whether --with-guile was given.
9480if test "${with_guile+set}" = set; then :
9481 withval=$with_guile;
9482else
9483 with_guile=auto
9484fi
9485
9486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9487$as_echo_n "checking whether to use guile... " >&6; }
9488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9489$as_echo "$with_guile" >&6; }
9490
ed3ef339
DE
9491# Extract the first word of "pkg-config", so it can be a program name with args.
9492set dummy pkg-config; ac_word=$2
9493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9494$as_echo_n "checking for $ac_word... " >&6; }
9495if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9496 $as_echo_n "(cached) " >&6
9497else
9498 case $pkg_config_prog_path in
9499 [\\/]* | ?:[\\/]*)
9500 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9501 ;;
9502 *)
9503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504for as_dir in $PATH
9505do
9506 IFS=$as_save_IFS
9507 test -z "$as_dir" && as_dir=.
9508 for ac_exec_ext in '' $ac_executable_extensions; do
9509 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9510 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512 break 2
9513 fi
9514done
9515 done
9516IFS=$as_save_IFS
9517
9518 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9519 ;;
9520esac
9521fi
9522pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9523if test -n "$pkg_config_prog_path"; then
9524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9525$as_echo "$pkg_config_prog_path" >&6; }
9526else
9527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9528$as_echo "no" >&6; }
9529fi
9530
9531
9532
214ab2da 9533try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9534have_libguile=no
9535case "${with_guile}" in
9536no)
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9538$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9539 ;;
9540auto)
e1402065
DE
9541 if test "${pkg_config_prog_path}" = "missing"; then
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9543$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9544 else
ed3ef339
DE
9545
9546 pkg_config=${pkg_config_prog_path}
9547 guile_version_list=${try_guile_versions}
9548 flag_errors=no
9549
ed3ef339
DE
9550 found_usable_guile=checking
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9552$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9553 for guile_version in ${guile_version_list}; do
9554 ${pkg_config} --exists ${guile_version} 2>/dev/null
9555 if test $? != 0; then
9556 continue
9557 fi
9558 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9559 if test $? != 0; then
9560 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9561 fi
9562 new_LIBS=`${pkg_config} --libs ${guile_version}`
9563 if test $? != 0; then
9564 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9565 fi
9566 found_usable_guile=${guile_version}
9567 break
9568 done
9569 if test "${found_usable_guile}" = "checking"; then
9570 if test "${flag_errors}" = "yes"; then
9571 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9572 else
9573 found_usable_guile=no
9574 fi
9575 fi
9576 if test "${found_usable_guile}" != no; then
9577 save_CPPFLAGS=$CPPFLAGS
9578 save_LIBS=$LIBS
9579 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9580 LIBS="$LIBS $new_LIBS"
9581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9582/* end confdefs.h. */
9583#include "libguile.h"
9584int
9585main ()
9586{
9587scm_init_guile ();
9588 ;
9589 return 0;
9590}
9591_ACEOF
9592if ac_fn_c_try_link "$LINENO"; then :
9593 have_libguile=yes
9594 GUILE_CPPFLAGS=$new_CPPFLAGS
9595 GUILE_LIBS=$new_LIBS
9596else
9597 found_usable_guile=no
9598fi
9599rm -f core conftest.err conftest.$ac_objext \
9600 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9601 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9602if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9603
9604$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9605
9606
9607fi
9608
ed3ef339
DE
9609 CPPFLAGS=$save_CPPFLAGS
9610 LIBS=$save_LIBS
9611 if test "${found_usable_guile}" = no; then
9612 if test "${flag_errors}" = yes; then
9613 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9615as_fn_error "linking guile version ${guile_version} test program failed
9616See \`config.log' for more details." "$LINENO" 5; }
9617 fi
9618 fi
9619 fi
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9621$as_echo "${found_usable_guile}" >&6; }
9622
e1402065 9623 fi
ed3ef339
DE
9624 ;;
9625yes)
e1402065
DE
9626 if test "${pkg_config_prog_path}" = "missing"; then
9627 as_fn_error "pkg-config not found" "$LINENO" 5
9628 fi
ed3ef339
DE
9629
9630 pkg_config=${pkg_config_prog_path}
9631 guile_version_list=${try_guile_versions}
9632 flag_errors=yes
9633
ed3ef339
DE
9634 found_usable_guile=checking
9635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9636$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9637 for guile_version in ${guile_version_list}; do
9638 ${pkg_config} --exists ${guile_version} 2>/dev/null
9639 if test $? != 0; then
9640 continue
9641 fi
9642 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9643 if test $? != 0; then
9644 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9645 fi
9646 new_LIBS=`${pkg_config} --libs ${guile_version}`
9647 if test $? != 0; then
9648 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9649 fi
9650 found_usable_guile=${guile_version}
9651 break
9652 done
9653 if test "${found_usable_guile}" = "checking"; then
9654 if test "${flag_errors}" = "yes"; then
9655 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9656 else
9657 found_usable_guile=no
9658 fi
9659 fi
9660 if test "${found_usable_guile}" != no; then
9661 save_CPPFLAGS=$CPPFLAGS
9662 save_LIBS=$LIBS
9663 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9664 LIBS="$LIBS $new_LIBS"
9665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9666/* end confdefs.h. */
9667#include "libguile.h"
9668int
9669main ()
9670{
9671scm_init_guile ();
9672 ;
9673 return 0;
9674}
9675_ACEOF
9676if ac_fn_c_try_link "$LINENO"; then :
9677 have_libguile=yes
9678 GUILE_CPPFLAGS=$new_CPPFLAGS
9679 GUILE_LIBS=$new_LIBS
9680else
9681 found_usable_guile=no
9682fi
9683rm -f core conftest.err conftest.$ac_objext \
9684 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9685 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9686if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9687
9688$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9689
9690
9691fi
9692
ed3ef339
DE
9693 CPPFLAGS=$save_CPPFLAGS
9694 LIBS=$save_LIBS
9695 if test "${found_usable_guile}" = no; then
9696 if test "${flag_errors}" = yes; then
9697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9699as_fn_error "linking guile version ${guile_version} test program failed
9700See \`config.log' for more details." "$LINENO" 5; }
9701 fi
9702 fi
9703 fi
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9705$as_echo "${found_usable_guile}" >&6; }
9706
9707 ;;
9708[\\/]* | ?:[\\/]*)
e1402065 9709 if test -x "${with_guile}"; then
ed3ef339
DE
9710
9711 pkg_config=${with_guile}
9712 guile_version_list=${try_guile_versions}
9713 flag_errors=yes
9714
ed3ef339
DE
9715 found_usable_guile=checking
9716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9717$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9718 for guile_version in ${guile_version_list}; do
9719 ${pkg_config} --exists ${guile_version} 2>/dev/null
9720 if test $? != 0; then
9721 continue
9722 fi
9723 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9724 if test $? != 0; then
9725 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9726 fi
9727 new_LIBS=`${pkg_config} --libs ${guile_version}`
9728 if test $? != 0; then
9729 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9730 fi
9731 found_usable_guile=${guile_version}
9732 break
9733 done
9734 if test "${found_usable_guile}" = "checking"; then
9735 if test "${flag_errors}" = "yes"; then
9736 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9737 else
9738 found_usable_guile=no
9739 fi
9740 fi
9741 if test "${found_usable_guile}" != no; then
9742 save_CPPFLAGS=$CPPFLAGS
9743 save_LIBS=$LIBS
9744 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9745 LIBS="$LIBS $new_LIBS"
9746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9747/* end confdefs.h. */
9748#include "libguile.h"
9749int
9750main ()
9751{
9752scm_init_guile ();
9753 ;
9754 return 0;
9755}
9756_ACEOF
9757if ac_fn_c_try_link "$LINENO"; then :
9758 have_libguile=yes
9759 GUILE_CPPFLAGS=$new_CPPFLAGS
9760 GUILE_LIBS=$new_LIBS
9761else
9762 found_usable_guile=no
9763fi
9764rm -f core conftest.err conftest.$ac_objext \
9765 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9766 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9767if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9768
9769$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9770
9771
9772fi
9773
ed3ef339
DE
9774 CPPFLAGS=$save_CPPFLAGS
9775 LIBS=$save_LIBS
9776 if test "${found_usable_guile}" = no; then
9777 if test "${flag_errors}" = yes; then
9778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9780as_fn_error "linking guile version ${guile_version} test program failed
9781See \`config.log' for more details." "$LINENO" 5; }
9782 fi
9783 fi
9784 fi
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9786$as_echo "${found_usable_guile}" >&6; }
9787
e1402065
DE
9788 else
9789 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9790 fi
ed3ef339
DE
9791 ;;
9792"" | */*)
9793 # Disallow --with=guile="" and --with-guile=foo/bar.
9794 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9795 ;;
9796*)
9797 # A space separate list of guile versions to try, in order.
e1402065
DE
9798 if test "${pkg_config_prog_path}" = "missing"; then
9799 as_fn_error "pkg-config not found" "$LINENO" 5
9800 fi
ed3ef339
DE
9801
9802 pkg_config=${pkg_config_prog_path}
9803 guile_version_list=${with_guile}
9804 flag_errors=yes
9805
ed3ef339
DE
9806 found_usable_guile=checking
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9808$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9809 for guile_version in ${guile_version_list}; do
9810 ${pkg_config} --exists ${guile_version} 2>/dev/null
9811 if test $? != 0; then
9812 continue
9813 fi
9814 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9815 if test $? != 0; then
9816 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9817 fi
9818 new_LIBS=`${pkg_config} --libs ${guile_version}`
9819 if test $? != 0; then
9820 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9821 fi
9822 found_usable_guile=${guile_version}
9823 break
9824 done
9825 if test "${found_usable_guile}" = "checking"; then
9826 if test "${flag_errors}" = "yes"; then
9827 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9828 else
9829 found_usable_guile=no
9830 fi
9831 fi
9832 if test "${found_usable_guile}" != no; then
9833 save_CPPFLAGS=$CPPFLAGS
9834 save_LIBS=$LIBS
9835 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9836 LIBS="$LIBS $new_LIBS"
9837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9838/* end confdefs.h. */
9839#include "libguile.h"
9840int
9841main ()
9842{
9843scm_init_guile ();
9844 ;
9845 return 0;
9846}
9847_ACEOF
9848if ac_fn_c_try_link "$LINENO"; then :
9849 have_libguile=yes
9850 GUILE_CPPFLAGS=$new_CPPFLAGS
9851 GUILE_LIBS=$new_LIBS
9852else
9853 found_usable_guile=no
9854fi
9855rm -f core conftest.err conftest.$ac_objext \
9856 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9857 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9858if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9859
9860$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9861
9862
9863fi
9864
ed3ef339
DE
9865 CPPFLAGS=$save_CPPFLAGS
9866 LIBS=$save_LIBS
9867 if test "${found_usable_guile}" = no; then
9868 if test "${flag_errors}" = yes; then
9869 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9871as_fn_error "linking guile version ${guile_version} test program failed
9872See \`config.log' for more details." "$LINENO" 5; }
9873 fi
9874 fi
9875 fi
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9877$as_echo "${found_usable_guile}" >&6; }
9878
9879 ;;
9880esac
9881
e76c5d17 9882if test "${have_libguile}" != no; then
d342a0da
DE
9883 case "${with_guile}" in
9884 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9885
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9887$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9888if test "${ac_cv_guild_program_name+set}" = set; then :
9889 $as_echo_n "(cached) " >&6
9890else
d342a0da 9891 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9892
9893 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9894 # the 'guild' and 'bindir' variables. In that case, try to guess
9895 # what the program name is, at the risk of getting it wrong if
9896 # Guile was configured with '--program-suffix' or similar.
9897 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9898 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9899 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9900 fi
9901
9902fi
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9904$as_echo "$ac_cv_guild_program_name" >&6; }
9905
9906 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9907 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9908 fi
9909
9910 GUILD="$ac_cv_guild_program_name"
9911
9912
d342a0da
DE
9913 ;;
9914 *)
9915
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9917$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9918if test "${ac_cv_guild_program_name+set}" = set; then :
9919 $as_echo_n "(cached) " >&6
9920else
9921 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9922
9923 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9924 # the 'guild' and 'bindir' variables. In that case, try to guess
9925 # what the program name is, at the risk of getting it wrong if
9926 # Guile was configured with '--program-suffix' or similar.
9927 if test "x$ac_cv_guild_program_name" = "x"; then
9928 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9929 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9930 fi
9931
9932fi
9933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9934$as_echo "$ac_cv_guild_program_name" >&6; }
9935
9936 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9937 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9938 fi
9939
9940 GUILD="$ac_cv_guild_program_name"
9941
9942
9943 ;;
9944 esac
e76c5d17
DE
9945
9946
9947 if test "$cross_compiling" = no; then
9948 GUILD_TARGET_FLAG=
9949 else
9950 GUILD_TARGET_FLAG="--target=$host"
9951 fi
9952
9953
9954
9955
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9957$as_echo_n "checking whether guild supports this host... " >&6; }
9958if test "${ac_cv_guild_ok+set}" = set; then :
9959 $as_echo_n "(cached) " >&6
9960else
9961 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9962 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9963 ac_cv_guild_ok=yes
9964 else
9965 ac_cv_guild_ok=no
9966 fi
9967fi
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9969$as_echo "$ac_cv_guild_ok" >&6; }
9970
9971 if test "$ac_cv_guild_ok" = no; then
9972 have_libguile=no
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9974$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9975 fi
9976fi
9977
ed3ef339
DE
9978if test "${have_libguile}" != no; then
9979
9980$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9981
9982 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9983 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9984 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9985 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9986 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9987
9988 save_LIBS="$LIBS"
9989 save_CPPFLAGS="$CPPFLAGS"
9990 LIBS="$GUILE_LIBS"
9991 CPPFLAGS="$GUILE_CPPFLAGS"
9992 for ac_func in scm_new_smob
9993do :
9994 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9995if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9996 cat >>confdefs.h <<_ACEOF
9997#define HAVE_SCM_NEW_SMOB 1
9998_ACEOF
9999
10000fi
10001done
10002
10003 LIBS="$save_LIBS"
10004 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10005else
10006 # Even if Guile support is not compiled in, we need to have these files
10007 # included.
10008 CONFIG_OBS="$CONFIG_OBS guile.o"
10009 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10010fi
9a156167 10011
ac534cba 10012
4df42755
DE
10013 if test "${have_libguile}" != no; then
10014 HAVE_GUILE_TRUE=
10015 HAVE_GUILE_FALSE='#'
10016else
10017 HAVE_GUILE_TRUE='#'
10018 HAVE_GUILE_FALSE=
10019fi
10020
ac534cba 10021
d344e670
DE
10022# --------------------- #
10023# Check for libmcheck. #
10024# --------------------- #
10025
a8db4212
YPK
10026# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10027# but turn it off if Python is enabled with threads, since -lmcheck is
10028# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10029# and for releases.
17ef446e
PA
10030if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10031 && $development; then
10032 libmcheck_default=yes
10033else
10034 libmcheck_default=no
a8db4212
YPK
10035fi
10036
17ef446e
PA
10037 # Check whether --enable-libmcheck was given.
10038if test "${enable_libmcheck+set}" = set; then :
10039 enableval=$enable_libmcheck; case "${enableval}" in
10040 yes | y) ENABLE_LIBMCHECK="yes" ;;
10041 no | n) ENABLE_LIBMCHECK="no" ;;
10042 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10043 esac
10044fi
10045
10046
10047 if test -z "${ENABLE_LIBMCHECK}"; then
10048 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10049 fi
17ef446e
PA
10050
10051 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10053$as_echo_n "checking for main in -lmcheck... " >&6; }
10054if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10055 $as_echo_n "(cached) " >&6
10056else
10057 ac_check_lib_save_LIBS=$LIBS
10058LIBS="-lmcheck $LIBS"
10059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10060/* end confdefs.h. */
10061
10062
10063int
10064main ()
10065{
10066return main ();
10067 ;
10068 return 0;
10069}
10070_ACEOF
10071if ac_fn_c_try_link "$LINENO"; then :
10072 ac_cv_lib_mcheck_main=yes
10073else
10074 ac_cv_lib_mcheck_main=no
10075fi
10076rm -f core conftest.err conftest.$ac_objext \
10077 conftest$ac_exeext conftest.$ac_ext
10078LIBS=$ac_check_lib_save_LIBS
10079fi
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10081$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10082if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10083 cat >>confdefs.h <<_ACEOF
10084#define HAVE_LIBMCHECK 1
10085_ACEOF
10086
10087 LIBS="-lmcheck $LIBS"
10088
10089fi
10090
17ef446e
PA
10091 fi
10092
10093
10094if test "$ENABLE_LIBMCHECK" = "yes" \
10095 -a "${have_libpython}" != "no" \
10096 -a "${python_has_threads}" = "yes" ; then
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10098$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10099fi
10100
58bfce93
MM
10101
10102# Check whether --with-intel_pt was given.
10103if test "${with_intel_pt+set}" = set; then :
10104 withval=$with_intel_pt;
10105else
10106 with_intel_pt=auto
10107fi
10108
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10110$as_echo_n "checking whether to use intel pt... " >&6; }
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10112$as_echo "$with_intel_pt" >&6; }
10113
10114if test "${with_intel_pt}" = no; then
10115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&5
10116$as_echo "$as_me: WARNING: Intel(R) Processor Trace support disabled; some features may be unavailable." >&2;}
10117 HAVE_LIBIPT=no
10118else
5599c404
MM
10119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10120/* end confdefs.h. */
10121
10122#include <linux/perf_event.h>
10123#ifndef PERF_ATTR_SIZE_VER5
10124# error
10125#endif
10126
10127_ACEOF
10128if ac_fn_c_try_cpp "$LINENO"; then :
10129 perf_event=yes
10130else
10131 perf_event=no
10132fi
10133rm -f conftest.err conftest.$ac_ext
10134 if test "$perf_event" != yes; then
10135 if test "$with_intel_pt" = yes; then
10136 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10137 else
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10139$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10140 fi
10141 fi
10142
58bfce93
MM
10143
10144
10145
10146
10147
10148
10149
10150
10151 use_additional=yes
10152
10153 acl_save_prefix="$prefix"
10154 prefix="$acl_final_prefix"
10155 acl_save_exec_prefix="$exec_prefix"
10156 exec_prefix="$acl_final_exec_prefix"
10157
10158 eval additional_includedir=\"$includedir\"
10159 eval additional_libdir=\"$libdir\"
10160
10161 exec_prefix="$acl_save_exec_prefix"
10162 prefix="$acl_save_prefix"
10163
10164
10165# Check whether --with-libipt-prefix was given.
10166if test "${with_libipt_prefix+set}" = set; then :
10167 withval=$with_libipt_prefix;
10168 if test "X$withval" = "Xno"; then
10169 use_additional=no
10170 else
10171 if test "X$withval" = "X"; then
10172
10173 acl_save_prefix="$prefix"
10174 prefix="$acl_final_prefix"
10175 acl_save_exec_prefix="$exec_prefix"
10176 exec_prefix="$acl_final_exec_prefix"
10177
10178 eval additional_includedir=\"$includedir\"
10179 eval additional_libdir=\"$libdir\"
10180
10181 exec_prefix="$acl_save_exec_prefix"
10182 prefix="$acl_save_prefix"
10183
10184 else
10185 additional_includedir="$withval/include"
10186 additional_libdir="$withval/lib"
10187 fi
10188 fi
10189
10190fi
10191
10192 LIBIPT=
10193 LTLIBIPT=
10194 INCIPT=
10195 rpathdirs=
10196 ltrpathdirs=
10197 names_already_handled=
10198 names_next_round='ipt '
10199 while test -n "$names_next_round"; do
10200 names_this_round="$names_next_round"
10201 names_next_round=
10202 for name in $names_this_round; do
10203 already_handled=
10204 for n in $names_already_handled; do
10205 if test "$n" = "$name"; then
10206 already_handled=yes
10207 break
10208 fi
10209 done
10210 if test -z "$already_handled"; then
10211 names_already_handled="$names_already_handled $name"
10212 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10213 eval value=\"\$HAVE_LIB$uppername\"
10214 if test -n "$value"; then
10215 if test "$value" = yes; then
10216 eval value=\"\$LIB$uppername\"
10217 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10218 eval value=\"\$LTLIB$uppername\"
10219 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10220 else
10221 :
10222 fi
10223 else
10224 found_dir=
10225 found_la=
10226 found_so=
10227 found_a=
10228 if test $use_additional = yes; then
10229 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10230 found_dir="$additional_libdir"
10231 found_so="$additional_libdir/lib$name.$shlibext"
10232 if test -f "$additional_libdir/lib$name.la"; then
10233 found_la="$additional_libdir/lib$name.la"
10234 fi
10235 else
10236 if test -f "$additional_libdir/lib$name.$libext"; then
10237 found_dir="$additional_libdir"
10238 found_a="$additional_libdir/lib$name.$libext"
10239 if test -f "$additional_libdir/lib$name.la"; then
10240 found_la="$additional_libdir/lib$name.la"
10241 fi
10242 fi
10243 fi
10244 fi
10245 if test "X$found_dir" = "X"; then
10246 for x in $LDFLAGS $LTLIBIPT; do
10247
10248 acl_save_prefix="$prefix"
10249 prefix="$acl_final_prefix"
10250 acl_save_exec_prefix="$exec_prefix"
10251 exec_prefix="$acl_final_exec_prefix"
10252 eval x=\"$x\"
10253 exec_prefix="$acl_save_exec_prefix"
10254 prefix="$acl_save_prefix"
10255
10256 case "$x" in
10257 -L*)
10258 dir=`echo "X$x" | sed -e 's/^X-L//'`
10259 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10260 found_dir="$dir"
10261 found_so="$dir/lib$name.$shlibext"
10262 if test -f "$dir/lib$name.la"; then
10263 found_la="$dir/lib$name.la"
10264 fi
10265 else
10266 if test -f "$dir/lib$name.$libext"; then
10267 found_dir="$dir"
10268 found_a="$dir/lib$name.$libext"
10269 if test -f "$dir/lib$name.la"; then
10270 found_la="$dir/lib$name.la"
10271 fi
10272 fi
10273 fi
10274 ;;
10275 esac
10276 if test "X$found_dir" != "X"; then
10277 break
10278 fi
10279 done
10280 fi
10281 if test "X$found_dir" != "X"; then
10282 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10283 if test "X$found_so" != "X"; then
10284 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10285 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10286 else
10287 haveit=
10288 for x in $ltrpathdirs; do
10289 if test "X$x" = "X$found_dir"; then
10290 haveit=yes
10291 break
10292 fi
10293 done
10294 if test -z "$haveit"; then
10295 ltrpathdirs="$ltrpathdirs $found_dir"
10296 fi
10297 if test "$hardcode_direct" = yes; then
10298 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10299 else
10300 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10301 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10302 haveit=
10303 for x in $rpathdirs; do
10304 if test "X$x" = "X$found_dir"; then
10305 haveit=yes
10306 break
10307 fi
10308 done
10309 if test -z "$haveit"; then
10310 rpathdirs="$rpathdirs $found_dir"
10311 fi
10312 else
10313 haveit=
10314 for x in $LDFLAGS $LIBIPT; do
10315
10316 acl_save_prefix="$prefix"
10317 prefix="$acl_final_prefix"
10318 acl_save_exec_prefix="$exec_prefix"
10319 exec_prefix="$acl_final_exec_prefix"
10320 eval x=\"$x\"
10321 exec_prefix="$acl_save_exec_prefix"
10322 prefix="$acl_save_prefix"
10323
10324 if test "X$x" = "X-L$found_dir"; then
10325 haveit=yes
10326 break
10327 fi
10328 done
10329 if test -z "$haveit"; then
10330 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10331 fi
10332 if test "$hardcode_minus_L" != no; then
10333 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10334 else
10335 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10336 fi
10337 fi
10338 fi
10339 fi
10340 else
10341 if test "X$found_a" != "X"; then
10342 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10343 else
10344 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10345 fi
10346 fi
10347 additional_includedir=
10348 case "$found_dir" in
10349 */lib | */lib/)
10350 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10351 additional_includedir="$basedir/include"
10352 ;;
10353 esac
10354 if test "X$additional_includedir" != "X"; then
10355 if test "X$additional_includedir" != "X/usr/include"; then
10356 haveit=
10357 if test "X$additional_includedir" = "X/usr/local/include"; then
10358 if test -n "$GCC"; then
10359 case $host_os in
10360 linux*) haveit=yes;;
10361 esac
10362 fi
10363 fi
10364 if test -z "$haveit"; then
10365 for x in $CPPFLAGS $INCIPT; do
10366
10367 acl_save_prefix="$prefix"
10368 prefix="$acl_final_prefix"
10369 acl_save_exec_prefix="$exec_prefix"
10370 exec_prefix="$acl_final_exec_prefix"
10371 eval x=\"$x\"
10372 exec_prefix="$acl_save_exec_prefix"
10373 prefix="$acl_save_prefix"
10374
10375 if test "X$x" = "X-I$additional_includedir"; then
10376 haveit=yes
10377 break
10378 fi
10379 done
10380 if test -z "$haveit"; then
10381 if test -d "$additional_includedir"; then
10382 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10383 fi
10384 fi
10385 fi
10386 fi
10387 fi
10388 if test -n "$found_la"; then
10389 save_libdir="$libdir"
10390 case "$found_la" in
10391 */* | *\\*) . "$found_la" ;;
10392 *) . "./$found_la" ;;
10393 esac
10394 libdir="$save_libdir"
10395 for dep in $dependency_libs; do
10396 case "$dep" in
10397 -L*)
10398 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10399 if test "X$additional_libdir" != "X/usr/lib"; then
10400 haveit=
10401 if test "X$additional_libdir" = "X/usr/local/lib"; then
10402 if test -n "$GCC"; then
10403 case $host_os in
10404 linux*) haveit=yes;;
10405 esac
10406 fi
10407 fi
10408 if test -z "$haveit"; then
10409 haveit=
10410 for x in $LDFLAGS $LIBIPT; do
10411
10412 acl_save_prefix="$prefix"
10413 prefix="$acl_final_prefix"
10414 acl_save_exec_prefix="$exec_prefix"
10415 exec_prefix="$acl_final_exec_prefix"
10416 eval x=\"$x\"
10417 exec_prefix="$acl_save_exec_prefix"
10418 prefix="$acl_save_prefix"
10419
10420 if test "X$x" = "X-L$additional_libdir"; then
10421 haveit=yes
10422 break
10423 fi
10424 done
10425 if test -z "$haveit"; then
10426 if test -d "$additional_libdir"; then
10427 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10428 fi
10429 fi
10430 haveit=
10431 for x in $LDFLAGS $LTLIBIPT; do
10432
10433 acl_save_prefix="$prefix"
10434 prefix="$acl_final_prefix"
10435 acl_save_exec_prefix="$exec_prefix"
10436 exec_prefix="$acl_final_exec_prefix"
10437 eval x=\"$x\"
10438 exec_prefix="$acl_save_exec_prefix"
10439 prefix="$acl_save_prefix"
10440
10441 if test "X$x" = "X-L$additional_libdir"; then
10442 haveit=yes
10443 break
10444 fi
10445 done
10446 if test -z "$haveit"; then
10447 if test -d "$additional_libdir"; then
10448 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10449 fi
10450 fi
10451 fi
10452 fi
10453 ;;
10454 -R*)
10455 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10456 if test "$enable_rpath" != no; then
10457 haveit=
10458 for x in $rpathdirs; do
10459 if test "X$x" = "X$dir"; then
10460 haveit=yes
10461 break
10462 fi
10463 done
10464 if test -z "$haveit"; then
10465 rpathdirs="$rpathdirs $dir"
10466 fi
10467 haveit=
10468 for x in $ltrpathdirs; do
10469 if test "X$x" = "X$dir"; then
10470 haveit=yes
10471 break
10472 fi
10473 done
10474 if test -z "$haveit"; then
10475 ltrpathdirs="$ltrpathdirs $dir"
10476 fi
10477 fi
10478 ;;
10479 -l*)
10480 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10481 ;;
10482 *.la)
10483 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10484 ;;
10485 *)
10486 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10487 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10488 ;;
10489 esac
10490 done
10491 fi
10492 else
10493 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10494 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10495 fi
10496 fi
10497 fi
10498 done
10499 done
10500 if test "X$rpathdirs" != "X"; then
10501 if test -n "$hardcode_libdir_separator"; then
10502 alldirs=
10503 for found_dir in $rpathdirs; do
10504 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10505 done
10506 acl_save_libdir="$libdir"
10507 libdir="$alldirs"
10508 eval flag=\"$hardcode_libdir_flag_spec\"
10509 libdir="$acl_save_libdir"
10510 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10511 else
10512 for found_dir in $rpathdirs; do
10513 acl_save_libdir="$libdir"
10514 libdir="$found_dir"
10515 eval flag=\"$hardcode_libdir_flag_spec\"
10516 libdir="$acl_save_libdir"
10517 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10518 done
10519 fi
10520 fi
10521 if test "X$ltrpathdirs" != "X"; then
10522 for found_dir in $ltrpathdirs; do
10523 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10524 done
10525 fi
10526
10527
10528 ac_save_CPPFLAGS="$CPPFLAGS"
10529
10530 for element in $INCIPT; do
10531 haveit=
10532 for x in $CPPFLAGS; do
10533
10534 acl_save_prefix="$prefix"
10535 prefix="$acl_final_prefix"
10536 acl_save_exec_prefix="$exec_prefix"
10537 exec_prefix="$acl_final_exec_prefix"
10538 eval x=\"$x\"
10539 exec_prefix="$acl_save_exec_prefix"
10540 prefix="$acl_save_prefix"
10541
10542 if test "X$x" = "X$element"; then
10543 haveit=yes
10544 break
10545 fi
10546 done
10547 if test -z "$haveit"; then
10548 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10549 fi
10550 done
10551
10552
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10554$as_echo_n "checking for libipt... " >&6; }
10555if test "${ac_cv_libipt+set}" = set; then :
10556 $as_echo_n "(cached) " >&6
10557else
10558
10559 ac_save_LIBS="$LIBS"
10560 LIBS="$LIBS $LIBIPT"
10561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10562/* end confdefs.h. */
10563#include "intel-pt.h"
10564int
10565main ()
10566{
10567pt_insn_alloc_decoder (0);
10568 ;
10569 return 0;
10570}
10571_ACEOF
10572if ac_fn_c_try_link "$LINENO"; then :
10573 ac_cv_libipt=yes
10574else
10575 ac_cv_libipt=no
10576fi
10577rm -f core conftest.err conftest.$ac_objext \
10578 conftest$ac_exeext conftest.$ac_ext
10579 LIBS="$ac_save_LIBS"
10580
10581fi
10582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10583$as_echo "$ac_cv_libipt" >&6; }
10584 if test "$ac_cv_libipt" = yes; then
10585 HAVE_LIBIPT=yes
10586
10587$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10588
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10590$as_echo_n "checking how to link with libipt... " >&6; }
10591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10592$as_echo "$LIBIPT" >&6; }
10593 else
10594 HAVE_LIBIPT=no
10595 CPPFLAGS="$ac_save_CPPFLAGS"
10596 LIBIPT=
10597 LTLIBIPT=
10598 fi
10599
10600
10601
10602
10603
10604
10605 if test "$HAVE_LIBIPT" != yes; then
10606 if test "$with_intel_pt" = yes; then
10607 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10608 else
10609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10610$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10611 fi
10612 fi
10613fi
10614
81ecdfbb
RW
10615# ------------------------- #
10616# Checks for header files. #
10617# ------------------------- #
c890192f 10618
81ecdfbb
RW
10619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10620$as_echo_n "checking for ANSI C header files... " >&6; }
10621if test "${ac_cv_header_stdc+set}" = set; then :
10622 $as_echo_n "(cached) " >&6
bec39cab 10623else
81ecdfbb 10624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10625/* end confdefs.h. */
81ecdfbb
RW
10626#include <stdlib.h>
10627#include <stdarg.h>
10628#include <string.h>
10629#include <float.h>
10630
a9322a30
TT
10631int
10632main ()
10633{
a9322a30
TT
10634
10635 ;
10636 return 0;
10637}
bec39cab 10638_ACEOF
81ecdfbb
RW
10639if ac_fn_c_try_compile "$LINENO"; then :
10640 ac_cv_header_stdc=yes
bec39cab 10641else
81ecdfbb 10642 ac_cv_header_stdc=no
a9322a30 10643fi
81ecdfbb 10644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10645
81ecdfbb
RW
10646if test $ac_cv_header_stdc = yes; then
10647 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10649/* end confdefs.h. */
10650#include <string.h>
bec39cab 10651
81ecdfbb
RW
10652_ACEOF
10653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10654 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10655
bec39cab 10656else
81ecdfbb
RW
10657 ac_cv_header_stdc=no
10658fi
10659rm -f conftest*
10660
10661fi
10662
10663if test $ac_cv_header_stdc = yes; then
10664 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10666/* end confdefs.h. */
10667#include <stdlib.h>
10668
bec39cab 10669_ACEOF
81ecdfbb
RW
10670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10671 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10672
81ecdfbb
RW
10673else
10674 ac_cv_header_stdc=no
10675fi
10676rm -f conftest*
bec39cab 10677
bec39cab 10678fi
81ecdfbb
RW
10679
10680if test $ac_cv_header_stdc = yes; then
10681 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10682 if test "$cross_compiling" = yes; then :
10683 :
bec39cab 10684else
81ecdfbb 10685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10686/* end confdefs.h. */
81ecdfbb
RW
10687#include <ctype.h>
10688#include <stdlib.h>
10689#if ((' ' & 0x0FF) == 0x020)
10690# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10691# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10692#else
10693# define ISLOWER(c) \
10694 (('a' <= (c) && (c) <= 'i') \
10695 || ('j' <= (c) && (c) <= 'r') \
10696 || ('s' <= (c) && (c) <= 'z'))
10697# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10698#endif
10699
10700#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10701int
10702main ()
10703{
81ecdfbb
RW
10704 int i;
10705 for (i = 0; i < 256; i++)
10706 if (XOR (islower (i), ISLOWER (i))
10707 || toupper (i) != TOUPPER (i))
10708 return 2;
a9322a30
TT
10709 return 0;
10710}
bec39cab 10711_ACEOF
81ecdfbb
RW
10712if ac_fn_c_try_run "$LINENO"; then :
10713
bec39cab 10714else
81ecdfbb
RW
10715 ac_cv_header_stdc=no
10716fi
10717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10718 conftest.$ac_objext conftest.beam conftest.$ac_ext
10719fi
bec39cab 10720
bec39cab 10721fi
a9322a30 10722fi
81ecdfbb
RW
10723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10724$as_echo "$ac_cv_header_stdc" >&6; }
10725if test $ac_cv_header_stdc = yes; then
bec39cab 10726
81ecdfbb 10727$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10728
81ecdfbb 10729fi
bec39cab 10730
81ecdfbb 10731# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10732for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10733 thread_db.h \
0080a2f6 10734 sys/fault.h \
81ecdfbb
RW
10735 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10736 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10737 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10738 termios.h termio.h \
3447c057 10739 sgtty.h elf_hp.h \
9467110b 10740 dlfcn.h
81ecdfbb
RW
10741do :
10742 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10743ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10744eval as_val=\$$as_ac_Header
10745 if test "x$as_val" = x""yes; then :
bec39cab 10746 cat >>confdefs.h <<_ACEOF
81ecdfbb 10747#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10748_ACEOF
c906108c 10749
bec39cab 10750fi
81ecdfbb
RW
10751
10752done
10753
81ecdfbb
RW
10754for ac_header in sys/proc.h
10755do :
10756 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10757# include <sys/param.h>
10758#endif
c906108c 10759
81ecdfbb
RW
10760"
10761if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10762 cat >>confdefs.h <<_ACEOF
81ecdfbb 10763#define HAVE_SYS_PROC_H 1
bec39cab 10764_ACEOF
5ee754fc 10765
bec39cab 10766fi
81ecdfbb
RW
10767
10768done
10769
10770for ac_header in sys/user.h
10771do :
10772 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10773# include <sys/param.h>
a9322a30
TT
10774#endif
10775
81ecdfbb
RW
10776"
10777if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10778 cat >>confdefs.h <<_ACEOF
10779#define HAVE_SYS_USER_H 1
bec39cab 10780_ACEOF
bec39cab 10781
a9322a30 10782fi
bec39cab 10783
81ecdfbb 10784done
5ee754fc 10785
5ee754fc 10786
81ecdfbb
RW
10787# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10788# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10789# think that we don't have <curses.h> if we're using GCC.
10790case $host_os in
10791 solaris2.[789])
10792 if test "$GCC" = yes; then
10793
10794$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10795
10796 fi ;;
10797esac
10798for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10799do :
10800 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10801ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10802eval as_val=\$$as_ac_Header
10803 if test "x$as_val" = x""yes; then :
bec39cab 10804 cat >>confdefs.h <<_ACEOF
81ecdfbb 10805#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10806_ACEOF
5ee754fc
MK
10807
10808fi
10809
81ecdfbb 10810done
bec39cab 10811
81ecdfbb
RW
10812for ac_header in term.h
10813do :
10814 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10815# include <curses.h>
10816#endif
bec39cab 10817
81ecdfbb
RW
10818"
10819if test "x$ac_cv_header_term_h" = x""yes; then :
10820 cat >>confdefs.h <<_ACEOF
10821#define HAVE_TERM_H 1
a8111142 10822_ACEOF
a8111142 10823
a8111142 10824fi
a8111142 10825
81ecdfbb 10826done
a8111142
TT
10827
10828
81ecdfbb
RW
10829# ------------------------- #
10830# Checks for declarations. #
10831# ------------------------- #
a9322a30 10832
07697489
PA
10833
10834 # Check for presence and size of long long.
10835 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10836if test "x$ac_cv_type_long_long" = x""yes; then :
10837
10838cat >>confdefs.h <<_ACEOF
10839#define HAVE_LONG_LONG 1
10840_ACEOF
10841
10842# The cast to long int works around a bug in the HP C Compiler
10843# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10844# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10845# This bug is HP SR number 8606223364.
10846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10847$as_echo_n "checking size of long long... " >&6; }
10848if test "${ac_cv_sizeof_long_long+set}" = set; then :
10849 $as_echo_n "(cached) " >&6
10850else
10851 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10852
10853else
10854 if test "$ac_cv_type_long_long" = yes; then
10855 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10857{ as_fn_set_status 77
10858as_fn_error "cannot compute sizeof (long long)
10859See \`config.log' for more details." "$LINENO" 5; }; }
10860 else
10861 ac_cv_sizeof_long_long=0
10862 fi
10863fi
10864
10865fi
10866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10867$as_echo "$ac_cv_sizeof_long_long" >&6; }
10868
10869
10870
10871cat >>confdefs.h <<_ACEOF
10872#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10873_ACEOF
10874
10875
10876fi
10877
10878
10879 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10880if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10881 ac_have_decl=1
10882else
10883 ac_have_decl=0
10884fi
10885
10886cat >>confdefs.h <<_ACEOF
10887#define HAVE_DECL_BASENAME $ac_have_decl
10888_ACEOF
10889ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10890if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10891 ac_have_decl=1
10892else
10893 ac_have_decl=0
10894fi
10895
10896cat >>confdefs.h <<_ACEOF
10897#define HAVE_DECL_FFS $ac_have_decl
10898_ACEOF
10899ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10900if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10901 ac_have_decl=1
10902else
10903 ac_have_decl=0
10904fi
10905
10906cat >>confdefs.h <<_ACEOF
10907#define HAVE_DECL_ASPRINTF $ac_have_decl
10908_ACEOF
10909ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10910if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10911 ac_have_decl=1
10912else
10913 ac_have_decl=0
10914fi
10915
10916cat >>confdefs.h <<_ACEOF
10917#define HAVE_DECL_VASPRINTF $ac_have_decl
10918_ACEOF
10919ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10920if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10921 ac_have_decl=1
10922else
10923 ac_have_decl=0
10924fi
10925
10926cat >>confdefs.h <<_ACEOF
10927#define HAVE_DECL_SNPRINTF $ac_have_decl
10928_ACEOF
10929ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10930if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10931 ac_have_decl=1
10932else
10933 ac_have_decl=0
10934fi
10935
10936cat >>confdefs.h <<_ACEOF
10937#define HAVE_DECL_VSNPRINTF $ac_have_decl
10938_ACEOF
10939
10940 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10941if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10942 ac_have_decl=1
10943else
10944 ac_have_decl=0
10945fi
10946
10947cat >>confdefs.h <<_ACEOF
10948#define HAVE_DECL_STRTOL $ac_have_decl
10949_ACEOF
10950ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10951if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10952 ac_have_decl=1
10953else
10954 ac_have_decl=0
10955fi
10956
10957cat >>confdefs.h <<_ACEOF
10958#define HAVE_DECL_STRTOUL $ac_have_decl
10959_ACEOF
10960ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10961if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10962 ac_have_decl=1
10963else
10964 ac_have_decl=0
10965fi
10966
10967cat >>confdefs.h <<_ACEOF
10968#define HAVE_DECL_STRTOLL $ac_have_decl
10969_ACEOF
10970ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10971if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10972 ac_have_decl=1
10973else
10974 ac_have_decl=0
10975fi
10976
10977cat >>confdefs.h <<_ACEOF
10978#define HAVE_DECL_STRTOULL $ac_have_decl
10979_ACEOF
10980
10981 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10982if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10983 ac_have_decl=1
10984else
10985 ac_have_decl=0
10986fi
10987
10988cat >>confdefs.h <<_ACEOF
10989#define HAVE_DECL_STRVERSCMP $ac_have_decl
10990_ACEOF
10991
10992
10993
81ecdfbb
RW
10994ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10995if test "x$ac_cv_have_decl_free" = x""yes; then :
10996 ac_have_decl=1
bec39cab 10997else
81ecdfbb
RW
10998 ac_have_decl=0
10999fi
11000
11001cat >>confdefs.h <<_ACEOF
11002#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11003_ACEOF
81ecdfbb
RW
11004ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11005if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11006 ac_have_decl=1
11007else
11008 ac_have_decl=0
11009fi
11010
11011cat >>confdefs.h <<_ACEOF
11012#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11013_ACEOF
81ecdfbb
RW
11014ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11015if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11016 ac_have_decl=1
bec39cab 11017else
81ecdfbb
RW
11018 ac_have_decl=0
11019fi
bec39cab 11020
81ecdfbb
RW
11021cat >>confdefs.h <<_ACEOF
11022#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11023_ACEOF
81ecdfbb
RW
11024ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11025if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11026 ac_have_decl=1
11027else
11028 ac_have_decl=0
5ee754fc 11029fi
81ecdfbb
RW
11030
11031cat >>confdefs.h <<_ACEOF
11032#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11033_ACEOF
5ee754fc 11034
5ee754fc 11035
81ecdfbb
RW
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11037$as_echo_n "checking for LC_MESSAGES... " >&6; }
11038if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11039 $as_echo_n "(cached) " >&6
bec39cab 11040else
81ecdfbb 11041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11042/* end confdefs.h. */
81ecdfbb 11043#include <locale.h>
a9322a30
TT
11044int
11045main ()
11046{
81ecdfbb 11047return LC_MESSAGES
a9322a30
TT
11048 ;
11049 return 0;
11050}
bec39cab 11051_ACEOF
81ecdfbb
RW
11052if ac_fn_c_try_link "$LINENO"; then :
11053 am_cv_val_LC_MESSAGES=yes
bec39cab 11054else
81ecdfbb
RW
11055 am_cv_val_LC_MESSAGES=no
11056fi
11057rm -f core conftest.err conftest.$ac_objext \
11058 conftest$ac_exeext conftest.$ac_ext
11059fi
11060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11061$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11062 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11063
81ecdfbb
RW
11064$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11065
11066 fi
11067
11068
11069# ----------------------- #
11070# Checks for structures. #
11071# ----------------------- #
11072
11073ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11074if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11075
11076cat >>confdefs.h <<_ACEOF
11077#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11078_ACEOF
7eb368b3 11079
81ecdfbb 11080
7eb368b3 11081fi
81ecdfbb
RW
11082ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11083if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11084
a9322a30
TT
11085cat >>confdefs.h <<_ACEOF
11086#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11087_ACEOF
11088
a9322a30 11089
7eb368b3
NR
11090fi
11091
7eb368b3 11092
a9322a30
TT
11093# ------------------ #
11094# Checks for types. #
11095# ------------------ #
7eb368b3 11096
81ecdfbb 11097ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11098#include <sys/socket.h>
11099
81ecdfbb
RW
11100"
11101if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11102
a9322a30
TT
11103cat >>confdefs.h <<_ACEOF
11104#define HAVE_SOCKLEN_T 1
11105_ACEOF
11106
11107
11108fi
11109
11110
11111# ------------------------------------- #
11112# Checks for compiler characteristics. #
11113# ------------------------------------- #
11114
81ecdfbb
RW
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11116$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11117if test "${ac_cv_c_const+set}" = set; then :
11118 $as_echo_n "(cached) " >&6
a9322a30 11119else
81ecdfbb 11120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11121/* end confdefs.h. */
a9322a30
TT
11122
11123int
11124main ()
11125{
11126/* FIXME: Include the comments suggested by Paul. */
11127#ifndef __cplusplus
11128 /* Ultrix mips cc rejects this. */
11129 typedef int charset[2];
81ecdfbb 11130 const charset cs;
a9322a30 11131 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11132 char const *const *pcpcc;
11133 char **ppc;
a9322a30
TT
11134 /* NEC SVR4.0.2 mips cc rejects this. */
11135 struct point {int x, y;};
11136 static struct point const zero = {0,0};
11137 /* AIX XL C 1.02.0.0 rejects this.
11138 It does not let you subtract one const X* pointer from another in
11139 an arm of an if-expression whose if-part is not a constant
11140 expression */
11141 const char *g = "string";
81ecdfbb 11142 pcpcc = &g + (g ? g-g : 0);
a9322a30 11143 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11144 ++pcpcc;
11145 ppc = (char**) pcpcc;
11146 pcpcc = (char const *const *) ppc;
a9322a30
TT
11147 { /* SCO 3.2v4 cc rejects this. */
11148 char *t;
11149 char const *s = 0 ? (char *) 0 : (char const *) 0;
11150
11151 *t++ = 0;
81ecdfbb 11152 if (s) return 0;
a9322a30
TT
11153 }
11154 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11155 int x[] = {25, 17};
11156 const int *foo = &x[0];
11157 ++foo;
11158 }
11159 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11160 typedef const int *iptr;
11161 iptr p = 0;
11162 ++p;
11163 }
11164 { /* AIX XL C 1.02.0.0 rejects this saying
11165 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11166 struct s { int j; const int *ap[3]; };
11167 struct s *b; b->j = 5;
11168 }
11169 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11170 const int foo = 10;
81ecdfbb 11171 if (!foo) return 0;
a9322a30 11172 }
81ecdfbb 11173 return !cs[0] && !zero.x;
a9322a30
TT
11174#endif
11175
11176 ;
11177 return 0;
11178}
bec39cab 11179_ACEOF
81ecdfbb 11180if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11181 ac_cv_c_const=yes
5ee754fc 11182else
81ecdfbb 11183 ac_cv_c_const=no
5ee754fc 11184fi
81ecdfbb 11185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11186fi
81ecdfbb
RW
11187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11188$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11189if test $ac_cv_c_const = no; then
bec39cab 11190
81ecdfbb 11191$as_echo "#define const /**/" >>confdefs.h
bec39cab 11192
5ee754fc 11193fi
bec39cab 11194
81ecdfbb
RW
11195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11196$as_echo_n "checking for inline... " >&6; }
11197if test "${ac_cv_c_inline+set}" = set; then :
11198 $as_echo_n "(cached) " >&6
bec39cab 11199else
a9322a30
TT
11200 ac_cv_c_inline=no
11201for ac_kw in inline __inline__ __inline; do
81ecdfbb 11202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11203/* end confdefs.h. */
a9322a30
TT
11204#ifndef __cplusplus
11205typedef int foo_t;
11206static $ac_kw foo_t static_foo () {return 0; }
11207$ac_kw foo_t foo () {return 0; }
11208#endif
11209
bec39cab 11210_ACEOF
81ecdfbb
RW
11211if ac_fn_c_try_compile "$LINENO"; then :
11212 ac_cv_c_inline=$ac_kw
bec39cab 11213fi
81ecdfbb
RW
11214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11215 test "$ac_cv_c_inline" != no && break
a9322a30 11216done
bec39cab 11217
5ee754fc 11218fi
81ecdfbb
RW
11219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11220$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11221
a9322a30
TT
11222case $ac_cv_c_inline in
11223 inline | yes) ;;
11224 *)
11225 case $ac_cv_c_inline in
11226 no) ac_val=;;
11227 *) ac_val=$ac_cv_c_inline;;
11228 esac
11229 cat >>confdefs.h <<_ACEOF
11230#ifndef __cplusplus
11231#define inline $ac_val
11232#endif
11233_ACEOF
bec39cab
AC
11234 ;;
11235esac
bec39cab 11236
81ecdfbb
RW
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11238$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11239if test "${ac_cv_c_bigendian+set}" = set; then :
11240 $as_echo_n "(cached) " >&6
bec39cab 11241else
81ecdfbb
RW
11242 ac_cv_c_bigendian=unknown
11243 # See if we're dealing with a universal compiler.
11244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11245/* end confdefs.h. */
11246#ifndef __APPLE_CC__
11247 not a universal capable compiler
11248 #endif
11249 typedef int dummy;
11250
11251_ACEOF
11252if ac_fn_c_try_compile "$LINENO"; then :
11253
11254 # Check for potential -arch flags. It is not universal unless
11255 # there are at least two -arch flags with different values.
11256 ac_arch=
11257 ac_prev=
11258 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11259 if test -n "$ac_prev"; then
11260 case $ac_word in
11261 i?86 | x86_64 | ppc | ppc64)
11262 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11263 ac_arch=$ac_word
11264 else
11265 ac_cv_c_bigendian=universal
11266 break
11267 fi
11268 ;;
11269 esac
11270 ac_prev=
11271 elif test "x$ac_word" = "x-arch"; then
11272 ac_prev=arch
11273 fi
11274 done
11275fi
11276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11277 if test $ac_cv_c_bigendian = unknown; then
11278 # See if sys/param.h defines the BYTE_ORDER macro.
11279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11280/* end confdefs.h. */
a9322a30 11281#include <sys/types.h>
81ecdfbb 11282 #include <sys/param.h>
a9322a30
TT
11283
11284int
11285main ()
11286{
81ecdfbb
RW
11287#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11288 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11289 && LITTLE_ENDIAN)
11290 bogus endian macros
11291 #endif
a9322a30
TT
11292
11293 ;
11294 return 0;
11295}
bec39cab 11296_ACEOF
81ecdfbb 11297if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11298 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11300/* end confdefs.h. */
a9322a30 11301#include <sys/types.h>
81ecdfbb 11302 #include <sys/param.h>
a9322a30
TT
11303
11304int
11305main ()
11306{
11307#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11308 not big endian
11309 #endif
a9322a30
TT
11310
11311 ;
11312 return 0;
11313}
bec39cab 11314_ACEOF
81ecdfbb 11315if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11316 ac_cv_c_bigendian=yes
5ee754fc 11317else
81ecdfbb 11318 ac_cv_c_bigendian=no
5ee754fc 11319fi
81ecdfbb
RW
11320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11321fi
11322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11323 fi
11324 if test $ac_cv_c_bigendian = unknown; then
11325 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327/* end confdefs.h. */
11328#include <limits.h>
bec39cab 11329
81ecdfbb
RW
11330int
11331main ()
11332{
11333#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11334 bogus endian macros
11335 #endif
11336
11337 ;
11338 return 0;
11339}
7eb368b3 11340_ACEOF
81ecdfbb
RW
11341if ac_fn_c_try_compile "$LINENO"; then :
11342 # It does; now see whether it defined to _BIG_ENDIAN or not.
11343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11344/* end confdefs.h. */
81ecdfbb
RW
11345#include <limits.h>
11346
7eb368b3
NR
11347int
11348main ()
11349{
81ecdfbb
RW
11350#ifndef _BIG_ENDIAN
11351 not big endian
11352 #endif
11353
7eb368b3
NR
11354 ;
11355 return 0;
11356}
11357_ACEOF
81ecdfbb 11358if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11359 ac_cv_c_bigendian=yes
81ecdfbb
RW
11360else
11361 ac_cv_c_bigendian=no
a9322a30 11362fi
81ecdfbb 11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11364fi
81ecdfbb
RW
11365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11366 fi
11367 if test $ac_cv_c_bigendian = unknown; then
11368 # Compile a test program.
11369 if test "$cross_compiling" = yes; then :
11370 # Try to guess by grepping values from an object file.
11371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11372/* end confdefs.h. */
11373short int ascii_mm[] =
11374 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11375 short int ascii_ii[] =
11376 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11377 int use_ascii (int i) {
11378 return ascii_mm[i] + ascii_ii[i];
11379 }
11380 short int ebcdic_ii[] =
11381 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11382 short int ebcdic_mm[] =
11383 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11384 int use_ebcdic (int i) {
11385 return ebcdic_mm[i] + ebcdic_ii[i];
11386 }
11387 extern int foo;
7eb368b3 11388
81ecdfbb
RW
11389int
11390main ()
11391{
11392return use_ascii (foo) == use_ebcdic (foo);
11393 ;
11394 return 0;
11395}
11396_ACEOF
11397if ac_fn_c_try_compile "$LINENO"; then :
11398 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11399 ac_cv_c_bigendian=yes
11400 fi
11401 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11402 if test "$ac_cv_c_bigendian" = unknown; then
11403 ac_cv_c_bigendian=no
11404 else
11405 # finding both strings is unlikely to happen, but who knows?
11406 ac_cv_c_bigendian=unknown
11407 fi
11408 fi
7eb368b3 11409fi
81ecdfbb 11410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11411else
81ecdfbb 11412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11413/* end confdefs.h. */
81ecdfbb 11414$ac_includes_default
d3ea6809
MM
11415int
11416main ()
11417{
81ecdfbb
RW
11418
11419 /* Are we little or big endian? From Harbison&Steele. */
11420 union
11421 {
11422 long int l;
11423 char c[sizeof (long int)];
11424 } u;
11425 u.l = 1;
11426 return u.c[sizeof (long int) - 1] == 1;
11427
11428 ;
11429 return 0;
d3ea6809
MM
11430}
11431_ACEOF
81ecdfbb 11432if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11433 ac_cv_c_bigendian=no
d3ea6809 11434else
81ecdfbb 11435 ac_cv_c_bigendian=yes
d3ea6809 11436fi
81ecdfbb
RW
11437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11438 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11439fi
a9322a30 11440
81ecdfbb
RW
11441 fi
11442fi
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11444$as_echo "$ac_cv_c_bigendian" >&6; }
11445 case $ac_cv_c_bigendian in #(
11446 yes)
11447 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11448;; #(
11449 no)
11450 ;; #(
11451 universal)
11452
11453$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11454
11455 ;; #(
11456 *)
11457 as_fn_error "unknown endianness
11458 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11459 esac
d3ea6809
MM
11460
11461
a9322a30
TT
11462# ------------------------------ #
11463# Checks for library functions. #
11464# ------------------------------ #
d3ea6809 11465
a9322a30 11466for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11467do :
11468 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11469ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11470eval as_val=\$$as_ac_Header
11471 if test "x$as_val" = x""yes; then :
bec39cab 11472 cat >>confdefs.h <<_ACEOF
81ecdfbb 11473#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11474_ACEOF
b757528f 11475
b757528f 11476fi
bec39cab 11477
a9322a30 11478done
a3828db0 11479
a9322a30 11480for ac_func in getpagesize
81ecdfbb
RW
11481do :
11482 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11483if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11484 cat >>confdefs.h <<_ACEOF
81ecdfbb 11485#define HAVE_GETPAGESIZE 1
bec39cab 11486_ACEOF
bcb3dc3d 11487
bcb3dc3d
MK
11488fi
11489done
11490
81ecdfbb
RW
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11492$as_echo_n "checking for working mmap... " >&6; }
11493if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11494 $as_echo_n "(cached) " >&6
a9322a30 11495else
81ecdfbb 11496 if test "$cross_compiling" = yes; then :
a9322a30 11497 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11498else
81ecdfbb 11499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11500/* end confdefs.h. */
a9322a30
TT
11501$ac_includes_default
11502/* malloc might have been renamed as rpl_malloc. */
11503#undef malloc
bec39cab 11504
a9322a30
TT
11505/* Thanks to Mike Haertel and Jim Avera for this test.
11506 Here is a matrix of mmap possibilities:
11507 mmap private not fixed
11508 mmap private fixed at somewhere currently unmapped
11509 mmap private fixed at somewhere already mapped
11510 mmap shared not fixed
11511 mmap shared fixed at somewhere currently unmapped
11512 mmap shared fixed at somewhere already mapped
11513 For private mappings, we should verify that changes cannot be read()
11514 back from the file, nor mmap's back from the file at a different
11515 address. (There have been systems where private was not correctly
11516 implemented like the infamous i386 svr4.0, and systems where the
11517 VM page cache was not coherent with the file system buffer cache
11518 like early versions of FreeBSD and possibly contemporary NetBSD.)
11519 For shared mappings, we should conversely verify that changes get
11520 propagated back to all the places they're supposed to be.
bec39cab 11521
a9322a30
TT
11522 Grep wants private fixed already mapped.
11523 The main things grep needs to know about mmap are:
11524 * does it exist and is it safe to write into the mmap'd area
11525 * how to use it (BSD variants) */
8b9cf735 11526
a9322a30
TT
11527#include <fcntl.h>
11528#include <sys/mman.h>
8b9cf735 11529
81ecdfbb 11530#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11531char *malloc ();
a3828db0
MK
11532#endif
11533
a9322a30 11534/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11535#ifndef HAVE_GETPAGESIZE
a9322a30 11536/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11537# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11538# define HAVE_SYS_PARAM_H 1
11539# endif
11540
11541# ifdef _SC_PAGESIZE
11542# define getpagesize() sysconf(_SC_PAGESIZE)
11543# else /* no _SC_PAGESIZE */
81ecdfbb 11544# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11545# include <sys/param.h>
11546# ifdef EXEC_PAGESIZE
11547# define getpagesize() EXEC_PAGESIZE
11548# else /* no EXEC_PAGESIZE */
11549# ifdef NBPG
11550# define getpagesize() NBPG * CLSIZE
11551# ifndef CLSIZE
11552# define CLSIZE 1
11553# endif /* no CLSIZE */
11554# else /* no NBPG */
11555# ifdef NBPC
11556# define getpagesize() NBPC
11557# else /* no NBPC */
11558# ifdef PAGESIZE
11559# define getpagesize() PAGESIZE
11560# endif /* PAGESIZE */
11561# endif /* no NBPC */
11562# endif /* no NBPG */
11563# endif /* no EXEC_PAGESIZE */
11564# else /* no HAVE_SYS_PARAM_H */
11565# define getpagesize() 8192 /* punt totally */
11566# endif /* no HAVE_SYS_PARAM_H */
11567# endif /* no _SC_PAGESIZE */
11568
11569#endif /* no HAVE_GETPAGESIZE */
11570
bec39cab
AC
11571int
11572main ()
11573{
a9322a30
TT
11574 char *data, *data2, *data3;
11575 int i, pagesize;
11576 int fd;
11577
11578 pagesize = getpagesize ();
11579
11580 /* First, make a file with some known garbage in it. */
11581 data = (char *) malloc (pagesize);
11582 if (!data)
81ecdfbb 11583 return 1;
a9322a30
TT
11584 for (i = 0; i < pagesize; ++i)
11585 *(data + i) = rand ();
11586 umask (0);
11587 fd = creat ("conftest.mmap", 0600);
11588 if (fd < 0)
81ecdfbb 11589 return 1;
a9322a30 11590 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11591 return 1;
a9322a30
TT
11592 close (fd);
11593
11594 /* Next, try to mmap the file at a fixed address which already has
11595 something else allocated at it. If we can, also make sure that
11596 we see the same garbage. */
11597 fd = open ("conftest.mmap", O_RDWR);
11598 if (fd < 0)
81ecdfbb 11599 return 1;
a9322a30
TT
11600 data2 = (char *) malloc (2 * pagesize);
11601 if (!data2)
81ecdfbb
RW
11602 return 1;
11603 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11604 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11605 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11606 return 1;
a9322a30
TT
11607 for (i = 0; i < pagesize; ++i)
11608 if (*(data + i) != *(data2 + i))
81ecdfbb 11609 return 1;
a9322a30
TT
11610
11611 /* Finally, make sure that changes to the mapped area do not
11612 percolate back to the file as seen by read(). (This is a bug on
11613 some variants of i386 svr4.0.) */
11614 for (i = 0; i < pagesize; ++i)
11615 *(data2 + i) = *(data2 + i) + 1;
11616 data3 = (char *) malloc (pagesize);
11617 if (!data3)
81ecdfbb 11618 return 1;
a9322a30 11619 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11620 return 1;
a9322a30
TT
11621 for (i = 0; i < pagesize; ++i)
11622 if (*(data + i) != *(data3 + i))
81ecdfbb 11623 return 1;
a9322a30 11624 close (fd);
81ecdfbb 11625 return 0;
bec39cab
AC
11626}
11627_ACEOF
81ecdfbb 11628if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11629 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11630else
81ecdfbb 11631 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11632fi
81ecdfbb
RW
11633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11634 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11635fi
81ecdfbb 11636
a9322a30 11637fi
81ecdfbb
RW
11638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11639$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11640if test $ac_cv_func_mmap_fixed_mapped = yes; then
11641
81ecdfbb 11642$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11643
086ec9eb 11644fi
a9322a30 11645rm -f conftest.mmap
a3828db0 11646
81ecdfbb
RW
11647ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11648if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11649
a9322a30
TT
11650else
11651
11652cat >>confdefs.h <<_ACEOF
11653#define pid_t int
bec39cab 11654_ACEOF
086ec9eb
MK
11655
11656fi
11657
81ecdfbb
RW
11658for ac_header in vfork.h
11659do :
11660 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11661if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11662 cat >>confdefs.h <<_ACEOF
81ecdfbb 11663#define HAVE_VFORK_H 1
bec39cab 11664_ACEOF
c906108c
SS
11665
11666fi
a9322a30 11667
a3828db0 11668done
c906108c 11669
a9322a30 11670for ac_func in fork vfork
81ecdfbb
RW
11671do :
11672 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11673ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11674eval as_val=\$$as_ac_var
11675 if test "x$as_val" = x""yes; then :
a3828db0 11676 cat >>confdefs.h <<_ACEOF
81ecdfbb 11677#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11678_ACEOF
b83266a0 11679
97bf5e38 11680fi
a3828db0 11681done
b83266a0 11682
a9322a30 11683if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11685$as_echo_n "checking for working fork... " >&6; }
11686if test "${ac_cv_func_fork_works+set}" = set; then :
11687 $as_echo_n "(cached) " >&6
a9322a30 11688else
81ecdfbb 11689 if test "$cross_compiling" = yes; then :
a9322a30
TT
11690 ac_cv_func_fork_works=cross
11691else
81ecdfbb
RW
11692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11693/* end confdefs.h. */
11694$ac_includes_default
11695int
11696main ()
11697{
11698
11699 /* By Ruediger Kuhlmann. */
11700 return fork () < 0;
11701
11702 ;
11703 return 0;
11704}
a9322a30 11705_ACEOF
81ecdfbb 11706if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11707 ac_cv_func_fork_works=yes
11708else
81ecdfbb 11709 ac_cv_func_fork_works=no
a9322a30 11710fi
81ecdfbb
RW
11711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11712 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11713fi
81ecdfbb 11714
a9322a30 11715fi
81ecdfbb
RW
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11717$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11718
11719else
11720 ac_cv_func_fork_works=$ac_cv_func_fork
11721fi
11722if test "x$ac_cv_func_fork_works" = xcross; then
11723 case $host in
11724 *-*-amigaos* | *-*-msdosdjgpp*)
11725 # Override, as these systems have only a dummy fork() stub
11726 ac_cv_func_fork_works=no
11727 ;;
11728 *)
11729 ac_cv_func_fork_works=yes
11730 ;;
11731 esac
81ecdfbb
RW
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11733$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11734fi
11735ac_cv_func_vfork_works=$ac_cv_func_vfork
11736if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11738$as_echo_n "checking for working vfork... " >&6; }
11739if test "${ac_cv_func_vfork_works+set}" = set; then :
11740 $as_echo_n "(cached) " >&6
a9322a30 11741else
81ecdfbb 11742 if test "$cross_compiling" = yes; then :
a9322a30
TT
11743 ac_cv_func_vfork_works=cross
11744else
81ecdfbb 11745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11746/* end confdefs.h. */
11747/* Thanks to Paul Eggert for this test. */
81ecdfbb 11748$ac_includes_default
a9322a30 11749#include <sys/wait.h>
81ecdfbb 11750#ifdef HAVE_VFORK_H
a9322a30
TT
11751# include <vfork.h>
11752#endif
11753/* On some sparc systems, changes by the child to local and incoming
11754 argument registers are propagated back to the parent. The compiler
11755 is told about this with #include <vfork.h>, but some compilers
11756 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11757 static variable whose address is put into a register that is
11758 clobbered by the vfork. */
11759static void
11760#ifdef __cplusplus
11761sparc_address_test (int arg)
11762# else
11763sparc_address_test (arg) int arg;
11764#endif
11765{
11766 static pid_t child;
11767 if (!child) {
11768 child = vfork ();
11769 if (child < 0) {
11770 perror ("vfork");
11771 _exit(2);
11772 }
11773 if (!child) {
11774 arg = getpid();
11775 write(-1, "", 0);
11776 _exit (arg);
11777 }
11778 }
11779}
11780
11781int
11782main ()
11783{
11784 pid_t parent = getpid ();
11785 pid_t child;
11786
11787 sparc_address_test (0);
11788
11789 child = vfork ();
11790
11791 if (child == 0) {
11792 /* Here is another test for sparc vfork register problems. This
11793 test uses lots of local variables, at least as many local
11794 variables as main has allocated so far including compiler
11795 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11796 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11797 reuse the register of parent for one of the local variables,
11798 since it will think that parent can't possibly be used any more
11799 in this routine. Assigning to the local variable will thus
11800 munge parent in the parent process. */
11801 pid_t
11802 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11803 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11804 /* Convince the compiler that p..p7 are live; otherwise, it might
11805 use the same hardware register for all 8 local variables. */
11806 if (p != p1 || p != p2 || p != p3 || p != p4
11807 || p != p5 || p != p6 || p != p7)
11808 _exit(1);
11809
11810 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11811 from child file descriptors. If the child closes a descriptor
11812 before it execs or exits, this munges the parent's descriptor
11813 as well. Test for this by closing stdout in the child. */
11814 _exit(close(fileno(stdout)) != 0);
11815 } else {
11816 int status;
11817 struct stat st;
11818
11819 while (wait(&status) != child)
11820 ;
81ecdfbb 11821 return (
a9322a30
TT
11822 /* Was there some problem with vforking? */
11823 child < 0
11824
11825 /* Did the child fail? (This shouldn't happen.) */
11826 || status
11827
11828 /* Did the vfork/compiler bug occur? */
11829 || parent != getpid()
11830
11831 /* Did the file descriptor bug occur? */
11832 || fstat(fileno(stdout), &st) != 0
11833 );
11834 }
11835}
11836_ACEOF
81ecdfbb 11837if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11838 ac_cv_func_vfork_works=yes
11839else
81ecdfbb 11840 ac_cv_func_vfork_works=no
a9322a30 11841fi
81ecdfbb
RW
11842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11843 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11844fi
81ecdfbb 11845
a9322a30 11846fi
81ecdfbb
RW
11847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11848$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11849
11850fi;
11851if test "x$ac_cv_func_fork_works" = xcross; then
11852 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11854$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11855fi
11856
11857if test "x$ac_cv_func_vfork_works" = xyes; then
11858
81ecdfbb 11859$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11860
11861else
11862
81ecdfbb 11863$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11864
11865fi
11866if test "x$ac_cv_func_fork_works" = xyes; then
11867
81ecdfbb 11868$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11869
11870fi
11871
cdf43629 11872for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11873 pipe poll pread pread64 pwrite resize_term \
7313baad 11874 sbrk setpgid setpgrp setsid \
9467110b 11875 sigaction sigprocmask sigsetmask socketpair \
110ed339 11876 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11877 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11878 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11879do :
11880 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11881ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11882eval as_val=\$$as_ac_var
11883 if test "x$as_val" = x""yes; then :
6c7a06a3 11884 cat >>confdefs.h <<_ACEOF
81ecdfbb 11885#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11886_ACEOF
11887
11888fi
11889done
11890
11891
81ecdfbb
RW
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11893$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11894if test "${am_cv_langinfo_codeset+set}" = set; then :
11895 $as_echo_n "(cached) " >&6
6c7a06a3 11896else
81ecdfbb 11897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11898/* end confdefs.h. */
11899#include <langinfo.h>
11900int
11901main ()
11902{
11903char* cs = nl_langinfo(CODESET);
bec39cab
AC
11904 ;
11905 return 0;
11906}
11907_ACEOF
81ecdfbb 11908if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11909 am_cv_langinfo_codeset=yes
a4db0f07 11910else
81ecdfbb 11911 am_cv_langinfo_codeset=no
a4db0f07 11912fi
81ecdfbb
RW
11913rm -f core conftest.err conftest.$ac_objext \
11914 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11915
a4db0f07 11916fi
81ecdfbb
RW
11917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11918$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11919 if test $am_cv_langinfo_codeset = yes; then
11920
81ecdfbb 11921$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11922
6c7a06a3 11923 fi
c906108c 11924
06825bd1 11925
3266f10b
TT
11926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11927$as_echo_n "checking for ANSI C header files... " >&6; }
11928if test "${ac_cv_header_stdc+set}" = set; then :
11929 $as_echo_n "(cached) " >&6
11930else
11931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11932/* end confdefs.h. */
11933#include <stdlib.h>
11934#include <stdarg.h>
11935#include <string.h>
11936#include <float.h>
11937
11938int
11939main ()
11940{
11941
11942 ;
11943 return 0;
11944}
11945_ACEOF
11946if ac_fn_c_try_compile "$LINENO"; then :
11947 ac_cv_header_stdc=yes
11948else
11949 ac_cv_header_stdc=no
11950fi
11951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11952
11953if test $ac_cv_header_stdc = yes; then
11954 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11956/* end confdefs.h. */
11957#include <string.h>
11958
11959_ACEOF
11960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11961 $EGREP "memchr" >/dev/null 2>&1; then :
11962
11963else
11964 ac_cv_header_stdc=no
11965fi
11966rm -f conftest*
11967
11968fi
11969
11970if test $ac_cv_header_stdc = yes; then
11971 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11973/* end confdefs.h. */
11974#include <stdlib.h>
11975
11976_ACEOF
11977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11978 $EGREP "free" >/dev/null 2>&1; then :
11979
11980else
11981 ac_cv_header_stdc=no
11982fi
11983rm -f conftest*
11984
11985fi
11986
11987if test $ac_cv_header_stdc = yes; then
11988 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11989 if test "$cross_compiling" = yes; then :
11990 :
11991else
11992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11993/* end confdefs.h. */
11994#include <ctype.h>
11995#include <stdlib.h>
11996#if ((' ' & 0x0FF) == 0x020)
11997# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11998# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11999#else
12000# define ISLOWER(c) \
12001 (('a' <= (c) && (c) <= 'i') \
12002 || ('j' <= (c) && (c) <= 'r') \
12003 || ('s' <= (c) && (c) <= 'z'))
12004# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12005#endif
12006
12007#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12008int
12009main ()
12010{
12011 int i;
12012 for (i = 0; i < 256; i++)
12013 if (XOR (islower (i), ISLOWER (i))
12014 || toupper (i) != TOUPPER (i))
12015 return 2;
12016 return 0;
12017}
12018_ACEOF
12019if ac_fn_c_try_run "$LINENO"; then :
12020
12021else
12022 ac_cv_header_stdc=no
12023fi
12024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12025 conftest.$ac_objext conftest.beam conftest.$ac_ext
12026fi
12027
12028fi
12029fi
12030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12031$as_echo "$ac_cv_header_stdc" >&6; }
12032if test $ac_cv_header_stdc = yes; then
12033
12034$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12035
3266f10b
TT
12036fi
12037
12038 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12039# for constant arguments. Useless!
12040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12041$as_echo_n "checking for working alloca.h... " >&6; }
12042if test "${ac_cv_working_alloca_h+set}" = set; then :
12043 $as_echo_n "(cached) " >&6
12044else
12045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046/* end confdefs.h. */
12047#include <alloca.h>
12048int
12049main ()
12050{
12051char *p = (char *) alloca (2 * sizeof (int));
12052 if (p) return 0;
12053 ;
12054 return 0;
12055}
12056_ACEOF
12057if ac_fn_c_try_link "$LINENO"; then :
12058 ac_cv_working_alloca_h=yes
12059else
12060 ac_cv_working_alloca_h=no
12061fi
12062rm -f core conftest.err conftest.$ac_objext \
12063 conftest$ac_exeext conftest.$ac_ext
12064fi
12065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12066$as_echo "$ac_cv_working_alloca_h" >&6; }
12067if test $ac_cv_working_alloca_h = yes; then
12068
12069$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12070
12071fi
12072
12073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12074$as_echo_n "checking for alloca... " >&6; }
12075if test "${ac_cv_func_alloca_works+set}" = set; then :
12076 $as_echo_n "(cached) " >&6
12077else
12078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12079/* end confdefs.h. */
12080#ifdef __GNUC__
12081# define alloca __builtin_alloca
12082#else
12083# ifdef _MSC_VER
12084# include <malloc.h>
12085# define alloca _alloca
12086# else
12087# ifdef HAVE_ALLOCA_H
12088# include <alloca.h>
12089# else
12090# ifdef _AIX
12091 #pragma alloca
12092# else
12093# ifndef alloca /* predefined by HP cc +Olibcalls */
12094char *alloca ();
12095# endif
12096# endif
12097# endif
12098# endif
12099#endif
12100
12101int
12102main ()
12103{
12104char *p = (char *) alloca (1);
12105 if (p) return 0;
12106 ;
12107 return 0;
12108}
12109_ACEOF
12110if ac_fn_c_try_link "$LINENO"; then :
12111 ac_cv_func_alloca_works=yes
12112else
12113 ac_cv_func_alloca_works=no
12114fi
12115rm -f core conftest.err conftest.$ac_objext \
12116 conftest$ac_exeext conftest.$ac_ext
12117fi
12118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12119$as_echo "$ac_cv_func_alloca_works" >&6; }
12120
12121if test $ac_cv_func_alloca_works = yes; then
12122
12123$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12124
12125else
12126 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12127# that cause trouble. Some versions do not even contain alloca or
12128# contain a buggy version. If you still want to use their alloca,
12129# use ar to extract alloca.o from them instead of compiling alloca.c.
12130
12131ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12132
12133$as_echo "#define C_ALLOCA 1" >>confdefs.h
12134
12135
12136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12137$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12138if test "${ac_cv_os_cray+set}" = set; then :
12139 $as_echo_n "(cached) " >&6
12140else
12141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12142/* end confdefs.h. */
12143#if defined CRAY && ! defined CRAY2
12144webecray
12145#else
12146wenotbecray
12147#endif
12148
12149_ACEOF
12150if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12151 $EGREP "webecray" >/dev/null 2>&1; then :
12152 ac_cv_os_cray=yes
12153else
12154 ac_cv_os_cray=no
12155fi
12156rm -f conftest*
12157
12158fi
12159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12160$as_echo "$ac_cv_os_cray" >&6; }
12161if test $ac_cv_os_cray = yes; then
12162 for ac_func in _getb67 GETB67 getb67; do
12163 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12164ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12165eval as_val=\$$as_ac_var
12166 if test "x$as_val" = x""yes; then :
12167
12168cat >>confdefs.h <<_ACEOF
12169#define CRAY_STACKSEG_END $ac_func
12170_ACEOF
12171
12172 break
12173fi
12174
12175 done
12176fi
12177
12178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12179$as_echo_n "checking stack direction for C alloca... " >&6; }
12180if test "${ac_cv_c_stack_direction+set}" = set; then :
12181 $as_echo_n "(cached) " >&6
12182else
12183 if test "$cross_compiling" = yes; then :
12184 ac_cv_c_stack_direction=0
12185else
12186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12187/* end confdefs.h. */
12188$ac_includes_default
12189int
12190find_stack_direction ()
12191{
12192 static char *addr = 0;
12193 auto char dummy;
12194 if (addr == 0)
12195 {
12196 addr = &dummy;
12197 return find_stack_direction ();
12198 }
12199 else
12200 return (&dummy > addr) ? 1 : -1;
12201}
12202
12203int
12204main ()
12205{
12206 return find_stack_direction () < 0;
12207}
12208_ACEOF
12209if ac_fn_c_try_run "$LINENO"; then :
12210 ac_cv_c_stack_direction=1
12211else
12212 ac_cv_c_stack_direction=-1
12213fi
12214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12215 conftest.$ac_objext conftest.beam conftest.$ac_ext
12216fi
12217
12218fi
12219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12220$as_echo "$ac_cv_c_stack_direction" >&6; }
12221cat >>confdefs.h <<_ACEOF
12222#define STACK_DIRECTION $ac_cv_c_stack_direction
12223_ACEOF
12224
12225
12226fi
12227
12228
12229
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12231$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12232if test "${am_cv_langinfo_codeset+set}" = set; then :
12233 $as_echo_n "(cached) " >&6
12234else
12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236/* end confdefs.h. */
12237#include <langinfo.h>
12238int
12239main ()
12240{
12241char* cs = nl_langinfo(CODESET);
12242 ;
12243 return 0;
12244}
12245_ACEOF
12246if ac_fn_c_try_link "$LINENO"; then :
12247 am_cv_langinfo_codeset=yes
12248else
12249 am_cv_langinfo_codeset=no
12250fi
12251rm -f core conftest.err conftest.$ac_objext \
12252 conftest$ac_exeext conftest.$ac_ext
12253
12254fi
12255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12256$as_echo "$am_cv_langinfo_codeset" >&6; }
12257 if test $am_cv_langinfo_codeset = yes; then
12258
12259$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12260
12261 fi
12262
12263
a3d08894 12264 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
12265do :
12266 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12267ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12268eval as_val=\$$as_ac_Header
12269 if test "x$as_val" = x""yes; then :
12270 cat >>confdefs.h <<_ACEOF
12271#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12272_ACEOF
12273
12274fi
12275
12276done
12277
12278
12279 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12280do :
12281 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12282ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12283eval as_val=\$$as_ac_var
12284 if test "x$as_val" = x""yes; then :
12285 cat >>confdefs.h <<_ACEOF
12286#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12287_ACEOF
12288
12289fi
12290done
12291
12292
12293 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12294if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12295 ac_have_decl=1
12296else
12297 ac_have_decl=0
12298fi
12299
12300cat >>confdefs.h <<_ACEOF
12301#define HAVE_DECL_STRERROR $ac_have_decl
12302_ACEOF
12303ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12304if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12305 ac_have_decl=1
12306else
12307 ac_have_decl=0
12308fi
12309
12310cat >>confdefs.h <<_ACEOF
12311#define HAVE_DECL_STRSTR $ac_have_decl
12312_ACEOF
12313
12314
e9bcb658
GB
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12316$as_echo_n "checking for sigsetjmp... " >&6; }
12317if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12318 $as_echo_n "(cached) " >&6
12319else
12320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12321/* end confdefs.h. */
12322
12323#include <setjmp.h>
12324
12325int
12326main ()
12327{
12328sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12329 ;
12330 return 0;
12331}
12332_ACEOF
12333if ac_fn_c_try_compile "$LINENO"; then :
12334 gdb_cv_func_sigsetjmp=yes
12335else
12336 gdb_cv_func_sigsetjmp=no
12337fi
12338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12339fi
12340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12341$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12342if test $gdb_cv_func_sigsetjmp = yes; then
12343
12344$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12345
12346fi
12347
3266f10b 12348
54019719
PA
12349# Check the return and argument types of ptrace.
12350
12351
12352
12353for ac_header in sys/ptrace.h ptrace.h
12354do :
12355 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12356ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12357eval as_val=\$$as_ac_Header
12358 if test "x$as_val" = x""yes; then :
12359 cat >>confdefs.h <<_ACEOF
12360#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12361_ACEOF
12362
12363fi
12364
12365done
12366
12367
12368# Needs to be tested in C++ mode, to detect whether we need to cast
12369# the first argument to enum __ptrace_request.
12370if test "$enable_build_with_cxx" = "yes"; then
12371 ac_ext=cpp
12372ac_cpp='$CXXCPP $CPPFLAGS'
12373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12376
12377fi
12378
a3828db0 12379gdb_ptrace_headers='
4ff70b84 12380#include <sys/types.h>
a3828db0
MK
12381#if HAVE_SYS_PTRACE_H
12382# include <sys/ptrace.h>
12383#endif
12384#if HAVE_UNISTD_H
12385# include <unistd.h>
12386#endif
12387'
12388# There is no point in checking if we don't have a prototype.
54019719 12389ac_fn_cxx_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12390"
12391if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12392 ac_have_decl=1
06825bd1 12393else
81ecdfbb 12394 ac_have_decl=0
06825bd1 12395fi
06825bd1 12396
a3828db0 12397cat >>confdefs.h <<_ACEOF
81ecdfbb 12398#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12399_ACEOF
81ecdfbb 12400if test $ac_have_decl = 1; then :
bec39cab 12401
a3828db0 12402else
a3828db0
MK
12403
12404 : ${gdb_cv_func_ptrace_ret='int'}
12405 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12406
06825bd1
MK
12407fi
12408
064ef605
DJ
12409# Check return type. Varargs (used on GNU/Linux) conflict with the
12410# empty argument list, so check for that explicitly.
81ecdfbb
RW
12411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12412$as_echo_n "checking return type of ptrace... " >&6; }
12413if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12414 $as_echo_n "(cached) " >&6
bec39cab 12415else
81ecdfbb 12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12417/* end confdefs.h. */
a3828db0 12418$gdb_ptrace_headers
bec39cab
AC
12419int
12420main ()
12421{
064ef605
DJ
12422extern long ptrace (enum __ptrace_request, ...);
12423 ;
12424 return 0;
12425}
12426_ACEOF
54019719 12427if ac_fn_cxx_try_compile "$LINENO"; then :
064ef605
DJ
12428 gdb_cv_func_ptrace_ret='long'
12429else
81ecdfbb 12430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12431/* end confdefs.h. */
12432$gdb_ptrace_headers
12433int
12434main ()
12435{
a3828db0 12436extern int ptrace ();
bec39cab
AC
12437 ;
12438 return 0;
12439}
12440_ACEOF
54019719 12441if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0 12442 gdb_cv_func_ptrace_ret='int'
70f9f479 12443else
81ecdfbb 12444 gdb_cv_func_ptrace_ret='long'
70f9f479 12445fi
81ecdfbb 12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12447fi
81ecdfbb 12448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12449fi
81ecdfbb
RW
12450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12451$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12452
a3828db0
MK
12453cat >>confdefs.h <<_ACEOF
12454#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12455_ACEOF
70f9f479 12456
a3828db0 12457# Check argument types.
81ecdfbb
RW
12458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12459$as_echo_n "checking types of arguments for ptrace... " >&6; }
12460if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12461 $as_echo_n "(cached) " >&6
bec39cab 12462else
a3828db0 12463
81ecdfbb 12464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12465/* end confdefs.h. */
12466$gdb_ptrace_headers
12467int
12468main ()
12469{
12470extern long ptrace (enum __ptrace_request, ...);
12471 ;
12472 return 0;
12473}
12474_ACEOF
54019719
PA
12475if ac_fn_cxx_try_compile "$LINENO"; then :
12476 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12477else
064ef605 12478
a3828db0
MK
12479for gdb_arg1 in 'int' 'long'; do
12480 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12481 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12482 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12484/* end confdefs.h. */
a3828db0 12485$gdb_ptrace_headers
bec39cab
AC
12486int
12487main ()
12488{
a3828db0
MK
12489
12490extern $gdb_cv_func_ptrace_ret
12491 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12492
bec39cab
AC
12493 ;
12494 return 0;
12495}
12496_ACEOF
54019719 12497if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12498 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12499 break 4;
5c7f2947 12500fi
81ecdfbb 12501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12502 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12504/* end confdefs.h. */
a3828db0 12505$gdb_ptrace_headers
bec39cab
AC
12506int
12507main ()
12508{
a3828db0
MK
12509
12510extern $gdb_cv_func_ptrace_ret
12511 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12512
bec39cab
AC
12513 ;
12514 return 0;
12515}
12516_ACEOF
54019719 12517if ac_fn_cxx_try_compile "$LINENO"; then :
a3828db0
MK
12518
12519gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12520 break 5;
78434e59 12521fi
81ecdfbb 12522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12523 done
12524 done
12525 done
12526 done
12527done
12528# Provide a safe default value.
12529: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12530
064ef605 12531fi
81ecdfbb 12532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12533fi
81ecdfbb
RW
12534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12535$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12536ac_save_IFS=$IFS; IFS=','
12537set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12538IFS=$ac_save_IFS
12539shift
bec39cab 12540
54019719
PA
12541cat >>confdefs.h <<_ACEOF
12542#define PTRACE_TYPE_ARG1 $1
12543_ACEOF
12544
12545
a3828db0
MK
12546cat >>confdefs.h <<_ACEOF
12547#define PTRACE_TYPE_ARG3 $3
12548_ACEOF
12549
96d7229d
LM
12550
12551cat >>confdefs.h <<_ACEOF
12552#define PTRACE_TYPE_ARG4 $4
12553_ACEOF
12554
a3828db0
MK
12555if test -n "$5"; then
12556
12557cat >>confdefs.h <<_ACEOF
12558#define PTRACE_TYPE_ARG5 $5
bec39cab 12559_ACEOF
78434e59
MK
12560
12561fi
12562
54019719
PA
12563if test "$enable_build_with_cxx" = "yes"; then
12564 ac_ext=c
12565ac_cpp='$CPP $CPPFLAGS'
12566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12568ac_compiler_gnu=$ac_cv_c_compiler_gnu
12569
12570fi
12571
12572
a3828db0 12573if test "$cross_compiling" = no; then
81ecdfbb
RW
12574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12575$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12576if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12577 $as_echo_n "(cached) " >&6
a3828db0 12578else
81ecdfbb
RW
12579 if test "$cross_compiling" = yes; then :
12580 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12581else
81ecdfbb 12582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12583/* end confdefs.h. */
81ecdfbb 12584$ac_includes_default
bec39cab
AC
12585int
12586main ()
12587{
a3828db0
MK
12588/* If this system has a BSD-style setpgrp which takes arguments,
12589 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12590 exit successfully. */
81ecdfbb 12591 return setpgrp (1,1) != -1;
bec39cab
AC
12592 ;
12593 return 0;
12594}
12595_ACEOF
81ecdfbb 12596if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12597 ac_cv_func_setpgrp_void=no
c906108c 12598else
81ecdfbb 12599 ac_cv_func_setpgrp_void=yes
c906108c 12600fi
81ecdfbb
RW
12601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12602 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12603fi
81ecdfbb 12604
a3828db0 12605fi
81ecdfbb
RW
12606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12607$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12608if test $ac_cv_func_setpgrp_void = yes; then
12609
81ecdfbb 12610$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12611
12612fi
a3828db0
MK
12613
12614else
81ecdfbb
RW
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12616$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12617if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12618 $as_echo_n "(cached) " >&6
97bf5e38 12619else
81ecdfbb 12620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12621/* end confdefs.h. */
a3828db0
MK
12622
12623#include <unistd.h>
12624
bec39cab
AC
12625int
12626main ()
12627{
a3828db0
MK
12628
12629 if (setpgrp(1,1) == -1)
12630 exit (0);
12631 else
12632 exit (1);
12633
bec39cab
AC
12634 ;
12635 return 0;
12636}
12637_ACEOF
81ecdfbb 12638if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12639 ac_cv_func_setpgrp_void=no
c906108c 12640else
81ecdfbb 12641 ac_cv_func_setpgrp_void=yes
c906108c 12642fi
81ecdfbb 12643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12644fi
81ecdfbb
RW
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12646$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12647if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12648 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12649
a3828db0 12650fi
c906108c
SS
12651fi
12652
db1ff28b
JK
12653# Assume we'll default to using the included libiberty regex.
12654gdb_use_included_regex=yes
12655
12656# However, if the system regex is GNU regex, then default to *not*
12657# using the included regex.
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12659$as_echo_n "checking for GNU regex... " >&6; }
12660if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12661 $as_echo_n "(cached) " >&6
12662else
12663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12664/* end confdefs.h. */
12665#include <gnu-versions.h>
12666int
12667main ()
12668{
12669#define REGEX_INTERFACE_VERSION 1
12670#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12671# error "Version mismatch"
12672#endif
12673 ;
12674 return 0;
12675}
12676_ACEOF
12677if ac_fn_c_try_compile "$LINENO"; then :
12678 gdb_cv_have_gnu_regex=yes
12679else
12680 gdb_cv_have_gnu_regex=no
12681fi
12682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12683fi
12684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12685$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12686if test $gdb_cv_have_gnu_regex = yes; then
12687 gdb_use_included_regex=no
12688fi
12689
12690
12691# Check whether --with-included-regex was given.
12692if test "${with_included_regex+set}" = set; then :
12693 withval=$with_included_regex; gdb_with_regex=$withval
12694else
12695 gdb_with_regex=$gdb_use_included_regex
12696fi
12697
12698if test "$gdb_with_regex" = yes; then
12699
12700$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12701
12702fi
12703
81ecdfbb
RW
12704# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12705ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12706#include <sys/proc.h>
12707
12708"
12709if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12710
5c45e068 12711cat >>confdefs.h <<_ACEOF
a3828db0 12712#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12713_ACEOF
c906108c 12714
5c45e068 12715
97bf5e38 12716fi
c906108c 12717
5c45e068 12718
a3828db0 12719# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12721$as_echo_n "checking for struct lwp... " >&6; }
12722if test "${gdb_cv_struct_lwp+set}" = set; then :
12723 $as_echo_n "(cached) " >&6
bec39cab 12724else
81ecdfbb 12725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12726/* end confdefs.h. */
a3828db0
MK
12727#include <sys/param.h>
12728#include <sys/lwp.h>
bec39cab
AC
12729int
12730main ()
12731{
a3828db0 12732struct lwp l;
bec39cab
AC
12733 ;
12734 return 0;
12735}
12736_ACEOF
81ecdfbb 12737if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12738 gdb_cv_struct_lwp=yes
c906108c 12739else
81ecdfbb 12740 gdb_cv_struct_lwp=no
c906108c 12741fi
81ecdfbb 12742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12743fi
81ecdfbb
RW
12744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12745$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12746if test $gdb_cv_struct_lwp = yes; then
c906108c 12747
81ecdfbb 12748$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12749
97bf5e38 12750fi
c906108c 12751
a3828db0 12752# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12754$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12755if test "${gdb_cv_struct_reg+set}" = set; then :
12756 $as_echo_n "(cached) " >&6
bec39cab 12757else
81ecdfbb 12758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12759/* end confdefs.h. */
a3828db0
MK
12760#include <sys/types.h>
12761#include <machine/reg.h>
bec39cab
AC
12762int
12763main ()
12764{
a3828db0 12765struct reg r;
bec39cab
AC
12766 ;
12767 return 0;
12768}
12769_ACEOF
81ecdfbb 12770if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12771 gdb_cv_struct_reg=yes
27ca5dad 12772else
81ecdfbb 12773 gdb_cv_struct_reg=no
27ca5dad 12774fi
81ecdfbb 12775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12776fi
81ecdfbb
RW
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12778$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12779if test $gdb_cv_struct_reg = yes; then
bec39cab 12780
81ecdfbb 12781$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12782
12783fi
97bf5e38 12784
a3828db0
MK
12785# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12786# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
12787ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
12788"
12789if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12790
12791cat >>confdefs.h <<_ACEOF
a3828db0 12792#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12793_ACEOF
3862412b 12794
5c45e068 12795
97bf5e38 12796fi
81ecdfbb
RW
12797ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
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
b757528f 14061if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
14062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
14063$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
14064if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
14065 $as_echo_n "(cached) " >&6
bec39cab 14066else
81ecdfbb 14067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14068/* end confdefs.h. */
b757528f 14069#include <sys/syscall.h>
bec39cab
AC
14070int
14071main ()
14072{
b757528f 14073int i = __NR_tkill;
bec39cab
AC
14074 ;
14075 return 0;
14076}
14077_ACEOF
81ecdfbb 14078if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
14079 gdb_cv_sys_syscall_h_has_tkill=yes
14080else
81ecdfbb 14081 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 14082
b757528f 14083fi
81ecdfbb 14084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 14085
bec39cab 14086fi
81ecdfbb
RW
14087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
14088$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 14089fi
99c1d451
TT
14090if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
14091 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
14092if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 14093
81ecdfbb 14094$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 14095
99c1d451
TT
14096
14097fi
14098
b757528f
JJ
14099fi
14100
81ecdfbb
RW
14101ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14102"
14103if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14104 ac_have_decl=1
10568435 14105else
81ecdfbb 14106 ac_have_decl=0
10568435 14107fi
10568435
JK
14108
14109cat >>confdefs.h <<_ACEOF
81ecdfbb 14110#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14111_ACEOF
14112
14113
81ecdfbb
RW
14114if test "$cross_compiling" = yes; then :
14115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14116/* end confdefs.h. */
14117#include <sys/personality.h>
14118int
14119main ()
14120{
14121
14122# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14123# define ADDR_NO_RANDOMIZE 0x0040000
14124# endif
14125 /* Test the flag could be set and stays set. */
14126 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14127 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14128 return 1
14129 ;
14130 return 0;
14131}
14132_ACEOF
81ecdfbb 14133if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14134 have_personality=true
14135else
81ecdfbb 14136 have_personality=false
10568435 14137fi
81ecdfbb
RW
14138rm -f core conftest.err conftest.$ac_objext \
14139 conftest$ac_exeext conftest.$ac_ext
10568435 14140else
81ecdfbb 14141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14142/* end confdefs.h. */
14143#include <sys/personality.h>
14144int
14145main ()
14146{
14147
14148# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14149# define ADDR_NO_RANDOMIZE 0x0040000
14150# endif
14151 /* Test the flag could be set and stays set. */
14152 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14153 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14154 return 1
14155 ;
14156 return 0;
14157}
14158_ACEOF
81ecdfbb 14159if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14160 have_personality=true
14161else
81ecdfbb 14162 have_personality=false
10568435 14163fi
81ecdfbb
RW
14164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14165 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14166fi
81ecdfbb 14167
10568435
JK
14168if $have_personality
14169then
14170
81ecdfbb 14171$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14172
14173fi
14174
e655c1a2
PA
14175case $host_os in
14176 go32* | *djgpp*)
14177 gdbinit=gdb.ini
14178 ;;
14179 *)
14180 gdbinit=.gdbinit
14181 ;;
14182esac
14183
14184cat >>confdefs.h <<_ACEOF
14185#define GDBINIT "$gdbinit"
14186_ACEOF
14187
14188
fb40c209 14189
f83d8a90
DE
14190# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14191# except that the argument to --with-sysroot is optional.
14192# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14193if test "x$with_sysroot" = xyes; then
14194 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14195fi
bec39cab 14196
81ecdfbb
RW
14197# Check whether --with-sysroot was given.
14198if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14199 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14200else
14201 TARGET_SYSTEM_ROOT=
14202fi
030292b7 14203
030292b7 14204
f83d8a90
DE
14205 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14206 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14207 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14208 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14209
f83d8a90
DE
14210cat >>confdefs.h <<_ACEOF
14211#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14212_ACEOF
bec39cab 14213
030292b7 14214
b14b1491 14215
f83d8a90
DE
14216
14217 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14218 if test "x$prefix" = xNONE; then
14219 test_prefix=/usr/local
14220 else
14221 test_prefix=$prefix
14222 fi
14223 else
14224 test_prefix=$exec_prefix
14225 fi
14226 value=0
14227 case ${ac_define_dir} in
14228 "${test_prefix}"|"${test_prefix}/"*|\
14229 '${exec_prefix}'|'${exec_prefix}/'*)
14230 value=1
14231 ;;
14232 esac
14233
14234cat >>confdefs.h <<_ACEOF
14235#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14236_ACEOF
030292b7
DJ
14237
14238
14239
16e7150e 14240
16e7150e 14241
81ecdfbb
RW
14242# Check whether --with-system-gdbinit was given.
14243if test "${with_system_gdbinit+set}" = set; then :
14244 withval=$with_system_gdbinit;
b14b1491
TT
14245 SYSTEM_GDBINIT=$withval
14246else
14247 SYSTEM_GDBINIT=
81ecdfbb
RW
14248fi
14249
16e7150e
JG
14250
14251 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14252 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14253 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14254 ac_define_dir=`eval echo $ac_define_dir`
14255
14256cat >>confdefs.h <<_ACEOF
14257#define SYSTEM_GDBINIT "$ac_define_dir"
14258_ACEOF
14259
14260
14261
0c4a4063 14262
b14b1491
TT
14263 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14264 if test "x$prefix" = xNONE; then
14265 test_prefix=/usr/local
14266 else
14267 test_prefix=$prefix
14268 fi
14269 else
14270 test_prefix=$exec_prefix
14271 fi
14272 value=0
14273 case ${ac_define_dir} in
14274 "${test_prefix}"|"${test_prefix}/"*|\
14275 '${exec_prefix}'|'${exec_prefix}/'*)
14276 value=1
14277 ;;
14278 esac
16e7150e 14279
b14b1491
TT
14280cat >>confdefs.h <<_ACEOF
14281#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14282_ACEOF
14283
b14b1491 14284
16e7150e 14285
0c4a4063 14286
81ecdfbb
RW
14287# Check whether --enable-werror was given.
14288if test "${enable_werror+set}" = set; then :
14289 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14290 yes | y) ERROR_ON_WARNING="yes" ;;
14291 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14292 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14293 esac
81ecdfbb
RW
14294fi
14295
094a342e 14296
3bc3d82a
PA
14297# Enable -Werror by default when using gcc in C mode. Leave it off
14298# for C++ until we're warning clean. Turn it off for releases.
14299if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" \
14300 && test x"$enable_build_with_cxx" != x"yes" \
14301 && $development; then
094a342e
MK
14302 ERROR_ON_WARNING=yes
14303fi
14304
14305WERROR_CFLAGS=""
14306if test "${ERROR_ON_WARNING}" = yes ; then
14307 WERROR_CFLAGS="-Werror"
14308fi
14309
3bc3d82a 14310# These options work in either C or C++ modes.
aac331e4 14311build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14312-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
14313-Wno-switch -Wno-char-subscripts \
14314-Wempty-body"
a3b362c4 14315
3bc3d82a
PA
14316# Now add in C and C++ specific options, depending on mode.
14317if test "$enable_build_with_cxx" = "yes"; then
14318 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14319-Wno-narrowing"
14320else
aac331e4
PA
14321 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14322-Wdeclaration-after-statement -Wmissing-parameter-type \
14323-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14324fi
14325
3526781e
DJ
14326# Enable -Wno-format by default when using gcc on mingw since many
14327# GCC versions complain about %I64.
14328case "${host}" in
14329 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14330 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14331esac
14332
81ecdfbb
RW
14333# Check whether --enable-build-warnings was given.
14334if test "${enable_build_warnings+set}" = set; then :
14335 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14336 yes) ;;
14337 no) build_warnings="-w";;
14338 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14339 build_warnings="${build_warnings} ${t}";;
14340 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14341 build_warnings="${t} ${build_warnings}";;
14342 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14343esac
d4f3574e 14344if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14345 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14346fi
81ecdfbb
RW
14347fi
14348# Check whether --enable-gdb-build-warnings was given.
14349if test "${enable_gdb_build_warnings+set}" = set; then :
14350 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14351 yes) ;;
14352 no) build_warnings="-w";;
14353 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14354 build_warnings="${build_warnings} ${t}";;
14355 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14356 build_warnings="${t} ${build_warnings}";;
14357 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14358esac
14359if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14360 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14361fi
81ecdfbb 14362fi
3bc3d82a
PA
14363
14364# The set of warnings supported by a C++ compiler is not the same as
14365# of the C compiler.
14366if test "$enable_build_with_cxx" = "yes"; then
14367 ac_ext=cpp
14368ac_cpp='$CXXCPP $CPPFLAGS'
14369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14372
14373fi
14374
81ecdfbb 14375WARN_CFLAGS=""
c906108c
SS
14376if test "x${build_warnings}" != x -a "x$GCC" = xyes
14377then
81ecdfbb
RW
14378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14379$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14380 # Separate out the -Werror flag as some files just cannot be
14381 # compiled with it enabled.
14382 for w in ${build_warnings}; do
14383 case $w in
14384 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14385 *)
14386 # Check whether GCC accepts it.
4536bbc6
AC
14387 saved_CFLAGS="$CFLAGS"
14388 CFLAGS="$CFLAGS $w"
3bc3d82a
PA
14389 saved_CXXFLAGS="$CXXFLAGS"
14390 CXXFLAGS="$CXXFLAGS $w"
54019719 14391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14392/* end confdefs.h. */
4536bbc6 14393
bec39cab
AC
14394int
14395main ()
14396{
4536bbc6 14397
bec39cab
AC
14398 ;
14399 return 0;
14400}
14401_ACEOF
3bc3d82a 14402if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14403 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14404fi
81ecdfbb 14405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14406 CFLAGS="$saved_CFLAGS"
3bc3d82a 14407 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14408 esac
14409 done
81ecdfbb
RW
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14411$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14412fi
14413
14414
104c1213 14415
3bc3d82a
PA
14416if test "$enable_build_with_cxx" = "yes"; then
14417 ac_ext=c
14418ac_cpp='$CPP $CPPFLAGS'
14419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14421ac_compiler_gnu=$ac_cv_c_compiler_gnu
14422
14423fi
14424
7a292a7a 14425# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14427$as_echo_n "checking for cygwin... " >&6; }
14428if test "${gdb_cv_os_cygwin+set}" = set; then :
14429 $as_echo_n "(cached) " >&6
bec39cab 14430else
81ecdfbb 14431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14432/* end confdefs.h. */
7a292a7a
SS
14433
14434#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14435lose
14436#endif
bec39cab 14437_ACEOF
7a292a7a 14438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14439 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14440 gdb_cv_os_cygwin=yes
14441else
7a292a7a
SS
14442 gdb_cv_os_cygwin=no
14443fi
14444rm -f conftest*
14445
14446fi
81ecdfbb
RW
14447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14448$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14449
aff38e61 14450
3eb25fda 14451SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14452case ${host} in
95cbc983
AC
14453 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14454 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14455 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14456esac
14457
14458
cd0fc7c3
SS
14459# libreadline needs libuser32.a in a cygwin environment
14460WIN32LIBS=
14461if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14462 WIN32LIBS="-luser32"
14463 case "${target}" in
14464 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14465 ;;
14466 esac
cd0fc7c3 14467fi
c906108c 14468
b4505029
MM
14469# The ser-tcp.c module requires sockets.
14470case ${host} in
14471 *mingw32*)
14472
81ecdfbb 14473$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14474
14475 WIN32LIBS="$WIN32LIBS -lws2_32"
14476 ;;
14477esac
14478
7a292a7a 14479
31d99776 14480# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14481
14482 OLD_CFLAGS=$CFLAGS
14483 OLD_LDFLAGS=$LDFLAGS
14484 OLD_LIBS=$LIBS
14485 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14486 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14487 # always want our bfd.
14488 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14489 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14490 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14491 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14492 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14494$as_echo_n "checking for ELF support in BFD... " >&6; }
14495if test "${gdb_cv_var_elf+set}" = set; then :
14496 $as_echo_n "(cached) " >&6
31d99776 14497else
81ecdfbb 14498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14499/* end confdefs.h. */
14500#include <stdlib.h>
def63ff0
TT
14501 #include "bfd.h"
14502 #include "elf-bfd.h"
31d99776
DJ
14503
14504int
14505main ()
14506{
def63ff0 14507return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14508 ;
14509 return 0;
14510}
14511_ACEOF
81ecdfbb 14512if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14513 gdb_cv_var_elf=yes
14514else
81ecdfbb 14515 gdb_cv_var_elf=no
31d99776 14516fi
81ecdfbb
RW
14517rm -f core conftest.err conftest.$ac_objext \
14518 conftest$ac_exeext conftest.$ac_ext
31d99776 14519fi
81ecdfbb
RW
14520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14521$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14522 CFLAGS=$OLD_CFLAGS
14523 LDFLAGS=$OLD_LDFLAGS
14524 LIBS=$OLD_LIBS
31d99776 14525if test $gdb_cv_var_elf = yes; then
d4777acb 14526 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14527
81ecdfbb 14528$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14529
075ff26d
JK
14530 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14531 if test "$plugins" = "yes"; then
a48b32c0
L
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14533$as_echo_n "checking for library containing dlopen... " >&6; }
14534if test "${ac_cv_search_dlopen+set}" = set; then :
14535 $as_echo_n "(cached) " >&6
14536else
14537 ac_func_search_save_LIBS=$LIBS
14538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14539/* end confdefs.h. */
14540
14541/* Override any GCC internal prototype to avoid an error.
14542 Use char because int might match the return type of a GCC
14543 builtin and then its argument prototype would still apply. */
14544#ifdef __cplusplus
14545extern "C"
14546#endif
14547char dlopen ();
14548int
14549main ()
14550{
14551return dlopen ();
14552 ;
14553 return 0;
14554}
14555_ACEOF
14556for ac_lib in '' dl; do
14557 if test -z "$ac_lib"; then
14558 ac_res="none required"
14559 else
14560 ac_res=-l$ac_lib
14561 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14562 fi
14563 if ac_fn_c_try_link "$LINENO"; then :
14564 ac_cv_search_dlopen=$ac_res
14565fi
14566rm -f core conftest.err conftest.$ac_objext \
14567 conftest$ac_exeext
14568 if test "${ac_cv_search_dlopen+set}" = set; then :
14569 break
14570fi
14571done
14572if test "${ac_cv_search_dlopen+set}" = set; then :
14573
14574else
14575 ac_cv_search_dlopen=no
14576fi
14577rm conftest.$ac_ext
14578LIBS=$ac_func_search_save_LIBS
14579fi
14580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14581$as_echo "$ac_cv_search_dlopen" >&6; }
14582ac_res=$ac_cv_search_dlopen
14583if test "$ac_res" != no; then :
14584 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14585
14586fi
14587
075ff26d 14588 fi
31d99776 14589fi
31d99776 14590
4f05add4
TT
14591# Add macho support to GDB, but only if BFD includes it.
14592
14593 OLD_CFLAGS=$CFLAGS
14594 OLD_LDFLAGS=$LDFLAGS
14595 OLD_LIBS=$LIBS
14596 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14597 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14598 # always want our bfd.
14599 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14600 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14601 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14602 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14603 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14605$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14606if test "${gdb_cv_var_macho+set}" = set; then :
14607 $as_echo_n "(cached) " >&6
14608else
14609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14610/* end confdefs.h. */
14611#include <stdlib.h>
14612 #include "bfd.h"
14613 #include "mach-o.h"
14614
14615int
14616main ()
14617{
14618return bfd_mach_o_lookup_command (NULL, 0, NULL);
14619 ;
14620 return 0;
14621}
14622_ACEOF
14623if ac_fn_c_try_link "$LINENO"; then :
14624 gdb_cv_var_macho=yes
14625else
14626 gdb_cv_var_macho=no
14627fi
14628rm -f core conftest.err conftest.$ac_objext \
14629 conftest$ac_exeext conftest.$ac_ext
14630fi
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14632$as_echo "$gdb_cv_var_macho" >&6; }
14633 CFLAGS=$OLD_CFLAGS
14634 LDFLAGS=$OLD_LDFLAGS
14635 LIBS=$OLD_LIBS
14636if test $gdb_cv_var_macho = yes; then
14637 CONFIG_OBS="$CONFIG_OBS machoread.o"
14638fi
14639
121ce6e5
DJ
14640# Add any host-specific objects to GDB.
14641CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14642
608e2dbb
TT
14643# If building on ELF, look for lzma support for embedded compressed debug info.
14644if test $gdb_cv_var_elf = yes; then
14645
14646# Check whether --with-lzma was given.
14647if test "${with_lzma+set}" = set; then :
14648 withval=$with_lzma;
14649else
14650 with_lzma=auto
14651fi
14652
14653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14654$as_echo_n "checking whether to use lzma... " >&6; }
14655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14656$as_echo "$with_lzma" >&6; }
14657
14658 if test "${with_lzma}" != no; then
14659
14660
14661
14662
14663
14664
14665
14666
14667 use_additional=yes
14668
14669 acl_save_prefix="$prefix"
14670 prefix="$acl_final_prefix"
14671 acl_save_exec_prefix="$exec_prefix"
14672 exec_prefix="$acl_final_exec_prefix"
14673
14674 eval additional_includedir=\"$includedir\"
14675 eval additional_libdir=\"$libdir\"
14676
14677 exec_prefix="$acl_save_exec_prefix"
14678 prefix="$acl_save_prefix"
14679
14680
14681# Check whether --with-liblzma-prefix was given.
14682if test "${with_liblzma_prefix+set}" = set; then :
14683 withval=$with_liblzma_prefix;
14684 if test "X$withval" = "Xno"; then
14685 use_additional=no
14686 else
14687 if test "X$withval" = "X"; then
14688
14689 acl_save_prefix="$prefix"
14690 prefix="$acl_final_prefix"
14691 acl_save_exec_prefix="$exec_prefix"
14692 exec_prefix="$acl_final_exec_prefix"
14693
14694 eval additional_includedir=\"$includedir\"
14695 eval additional_libdir=\"$libdir\"
14696
14697 exec_prefix="$acl_save_exec_prefix"
14698 prefix="$acl_save_prefix"
14699
14700 else
14701 additional_includedir="$withval/include"
14702 additional_libdir="$withval/lib"
14703 fi
14704 fi
14705
14706fi
14707
14708 LIBLZMA=
14709 LTLIBLZMA=
14710 INCLZMA=
14711 rpathdirs=
14712 ltrpathdirs=
14713 names_already_handled=
14714 names_next_round='lzma '
14715 while test -n "$names_next_round"; do
14716 names_this_round="$names_next_round"
14717 names_next_round=
14718 for name in $names_this_round; do
14719 already_handled=
14720 for n in $names_already_handled; do
14721 if test "$n" = "$name"; then
14722 already_handled=yes
14723 break
14724 fi
14725 done
14726 if test -z "$already_handled"; then
14727 names_already_handled="$names_already_handled $name"
14728 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14729 eval value=\"\$HAVE_LIB$uppername\"
14730 if test -n "$value"; then
14731 if test "$value" = yes; then
14732 eval value=\"\$LIB$uppername\"
14733 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14734 eval value=\"\$LTLIB$uppername\"
14735 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14736 else
14737 :
14738 fi
14739 else
14740 found_dir=
14741 found_la=
14742 found_so=
14743 found_a=
14744 if test $use_additional = yes; then
14745 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14746 found_dir="$additional_libdir"
14747 found_so="$additional_libdir/lib$name.$shlibext"
14748 if test -f "$additional_libdir/lib$name.la"; then
14749 found_la="$additional_libdir/lib$name.la"
14750 fi
14751 else
14752 if test -f "$additional_libdir/lib$name.$libext"; then
14753 found_dir="$additional_libdir"
14754 found_a="$additional_libdir/lib$name.$libext"
14755 if test -f "$additional_libdir/lib$name.la"; then
14756 found_la="$additional_libdir/lib$name.la"
14757 fi
14758 fi
14759 fi
14760 fi
14761 if test "X$found_dir" = "X"; then
14762 for x in $LDFLAGS $LTLIBLZMA; do
14763
14764 acl_save_prefix="$prefix"
14765 prefix="$acl_final_prefix"
14766 acl_save_exec_prefix="$exec_prefix"
14767 exec_prefix="$acl_final_exec_prefix"
14768 eval x=\"$x\"
14769 exec_prefix="$acl_save_exec_prefix"
14770 prefix="$acl_save_prefix"
14771
14772 case "$x" in
14773 -L*)
14774 dir=`echo "X$x" | sed -e 's/^X-L//'`
14775 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14776 found_dir="$dir"
14777 found_so="$dir/lib$name.$shlibext"
14778 if test -f "$dir/lib$name.la"; then
14779 found_la="$dir/lib$name.la"
14780 fi
14781 else
14782 if test -f "$dir/lib$name.$libext"; then
14783 found_dir="$dir"
14784 found_a="$dir/lib$name.$libext"
14785 if test -f "$dir/lib$name.la"; then
14786 found_la="$dir/lib$name.la"
14787 fi
14788 fi
14789 fi
14790 ;;
14791 esac
14792 if test "X$found_dir" != "X"; then
14793 break
14794 fi
14795 done
14796 fi
14797 if test "X$found_dir" != "X"; then
14798 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14799 if test "X$found_so" != "X"; then
14800 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14801 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14802 else
14803 haveit=
14804 for x in $ltrpathdirs; do
14805 if test "X$x" = "X$found_dir"; then
14806 haveit=yes
14807 break
14808 fi
14809 done
14810 if test -z "$haveit"; then
14811 ltrpathdirs="$ltrpathdirs $found_dir"
14812 fi
14813 if test "$hardcode_direct" = yes; then
14814 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14815 else
14816 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14817 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14818 haveit=
14819 for x in $rpathdirs; do
14820 if test "X$x" = "X$found_dir"; then
14821 haveit=yes
14822 break
14823 fi
14824 done
14825 if test -z "$haveit"; then
14826 rpathdirs="$rpathdirs $found_dir"
14827 fi
14828 else
14829 haveit=
14830 for x in $LDFLAGS $LIBLZMA; do
14831
14832 acl_save_prefix="$prefix"
14833 prefix="$acl_final_prefix"
14834 acl_save_exec_prefix="$exec_prefix"
14835 exec_prefix="$acl_final_exec_prefix"
14836 eval x=\"$x\"
14837 exec_prefix="$acl_save_exec_prefix"
14838 prefix="$acl_save_prefix"
14839
14840 if test "X$x" = "X-L$found_dir"; then
14841 haveit=yes
14842 break
14843 fi
14844 done
14845 if test -z "$haveit"; then
14846 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14847 fi
14848 if test "$hardcode_minus_L" != no; then
14849 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14850 else
14851 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14852 fi
14853 fi
14854 fi
14855 fi
14856 else
14857 if test "X$found_a" != "X"; then
14858 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14859 else
14860 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14861 fi
14862 fi
14863 additional_includedir=
14864 case "$found_dir" in
14865 */lib | */lib/)
14866 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14867 additional_includedir="$basedir/include"
14868 ;;
14869 esac
14870 if test "X$additional_includedir" != "X"; then
14871 if test "X$additional_includedir" != "X/usr/include"; then
14872 haveit=
14873 if test "X$additional_includedir" = "X/usr/local/include"; then
14874 if test -n "$GCC"; then
14875 case $host_os in
14876 linux*) haveit=yes;;
14877 esac
14878 fi
14879 fi
14880 if test -z "$haveit"; then
14881 for x in $CPPFLAGS $INCLZMA; do
14882
14883 acl_save_prefix="$prefix"
14884 prefix="$acl_final_prefix"
14885 acl_save_exec_prefix="$exec_prefix"
14886 exec_prefix="$acl_final_exec_prefix"
14887 eval x=\"$x\"
14888 exec_prefix="$acl_save_exec_prefix"
14889 prefix="$acl_save_prefix"
14890
14891 if test "X$x" = "X-I$additional_includedir"; then
14892 haveit=yes
14893 break
14894 fi
14895 done
14896 if test -z "$haveit"; then
14897 if test -d "$additional_includedir"; then
14898 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14899 fi
14900 fi
14901 fi
14902 fi
14903 fi
14904 if test -n "$found_la"; then
14905 save_libdir="$libdir"
14906 case "$found_la" in
14907 */* | *\\*) . "$found_la" ;;
14908 *) . "./$found_la" ;;
14909 esac
14910 libdir="$save_libdir"
14911 for dep in $dependency_libs; do
14912 case "$dep" in
14913 -L*)
14914 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14915 if test "X$additional_libdir" != "X/usr/lib"; then
14916 haveit=
14917 if test "X$additional_libdir" = "X/usr/local/lib"; then
14918 if test -n "$GCC"; then
14919 case $host_os in
14920 linux*) haveit=yes;;
14921 esac
14922 fi
14923 fi
14924 if test -z "$haveit"; then
14925 haveit=
14926 for x in $LDFLAGS $LIBLZMA; do
14927
14928 acl_save_prefix="$prefix"
14929 prefix="$acl_final_prefix"
14930 acl_save_exec_prefix="$exec_prefix"
14931 exec_prefix="$acl_final_exec_prefix"
14932 eval x=\"$x\"
14933 exec_prefix="$acl_save_exec_prefix"
14934 prefix="$acl_save_prefix"
14935
14936 if test "X$x" = "X-L$additional_libdir"; then
14937 haveit=yes
14938 break
14939 fi
14940 done
14941 if test -z "$haveit"; then
14942 if test -d "$additional_libdir"; then
14943 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14944 fi
14945 fi
14946 haveit=
14947 for x in $LDFLAGS $LTLIBLZMA; do
14948
14949 acl_save_prefix="$prefix"
14950 prefix="$acl_final_prefix"
14951 acl_save_exec_prefix="$exec_prefix"
14952 exec_prefix="$acl_final_exec_prefix"
14953 eval x=\"$x\"
14954 exec_prefix="$acl_save_exec_prefix"
14955 prefix="$acl_save_prefix"
14956
14957 if test "X$x" = "X-L$additional_libdir"; then
14958 haveit=yes
14959 break
14960 fi
14961 done
14962 if test -z "$haveit"; then
14963 if test -d "$additional_libdir"; then
14964 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14965 fi
14966 fi
14967 fi
14968 fi
14969 ;;
14970 -R*)
14971 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14972 if test "$enable_rpath" != no; then
14973 haveit=
14974 for x in $rpathdirs; do
14975 if test "X$x" = "X$dir"; then
14976 haveit=yes
14977 break
14978 fi
14979 done
14980 if test -z "$haveit"; then
14981 rpathdirs="$rpathdirs $dir"
14982 fi
14983 haveit=
14984 for x in $ltrpathdirs; do
14985 if test "X$x" = "X$dir"; then
14986 haveit=yes
14987 break
14988 fi
14989 done
14990 if test -z "$haveit"; then
14991 ltrpathdirs="$ltrpathdirs $dir"
14992 fi
14993 fi
14994 ;;
14995 -l*)
14996 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14997 ;;
14998 *.la)
14999 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15000 ;;
15001 *)
15002 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15003 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15004 ;;
15005 esac
15006 done
15007 fi
15008 else
15009 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15010 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15011 fi
15012 fi
15013 fi
15014 done
15015 done
15016 if test "X$rpathdirs" != "X"; then
15017 if test -n "$hardcode_libdir_separator"; then
15018 alldirs=
15019 for found_dir in $rpathdirs; do
15020 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15021 done
15022 acl_save_libdir="$libdir"
15023 libdir="$alldirs"
15024 eval flag=\"$hardcode_libdir_flag_spec\"
15025 libdir="$acl_save_libdir"
15026 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15027 else
15028 for found_dir in $rpathdirs; do
15029 acl_save_libdir="$libdir"
15030 libdir="$found_dir"
15031 eval flag=\"$hardcode_libdir_flag_spec\"
15032 libdir="$acl_save_libdir"
15033 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15034 done
15035 fi
15036 fi
15037 if test "X$ltrpathdirs" != "X"; then
15038 for found_dir in $ltrpathdirs; do
15039 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15040 done
15041 fi
15042
15043
15044 ac_save_CPPFLAGS="$CPPFLAGS"
15045
15046 for element in $INCLZMA; do
15047 haveit=
15048 for x in $CPPFLAGS; do
15049
15050 acl_save_prefix="$prefix"
15051 prefix="$acl_final_prefix"
15052 acl_save_exec_prefix="$exec_prefix"
15053 exec_prefix="$acl_final_exec_prefix"
15054 eval x=\"$x\"
15055 exec_prefix="$acl_save_exec_prefix"
15056 prefix="$acl_save_prefix"
15057
15058 if test "X$x" = "X$element"; then
15059 haveit=yes
15060 break
15061 fi
15062 done
15063 if test -z "$haveit"; then
15064 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15065 fi
15066 done
15067
15068
15069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15070$as_echo_n "checking for liblzma... " >&6; }
15071if test "${ac_cv_liblzma+set}" = set; then :
15072 $as_echo_n "(cached) " >&6
15073else
15074
15075 ac_save_LIBS="$LIBS"
15076 LIBS="$LIBS $LIBLZMA"
15077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15078/* end confdefs.h. */
15079#include "lzma.h"
15080int
15081main ()
15082{
15083lzma_index_iter iter;
15084 lzma_index_iter_init (&iter, 0);
15085 lzma_mf_is_supported (LZMA_MF_HC3);
15086 ;
15087 return 0;
15088}
15089_ACEOF
15090if ac_fn_c_try_link "$LINENO"; then :
15091 ac_cv_liblzma=yes
15092else
15093 ac_cv_liblzma=no
15094fi
15095rm -f core conftest.err conftest.$ac_objext \
15096 conftest$ac_exeext conftest.$ac_ext
15097 LIBS="$ac_save_LIBS"
15098
15099fi
15100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15101$as_echo "$ac_cv_liblzma" >&6; }
15102 if test "$ac_cv_liblzma" = yes; then
15103 HAVE_LIBLZMA=yes
15104
15105$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15106
15107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15108$as_echo_n "checking how to link with liblzma... " >&6; }
15109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15110$as_echo "$LIBLZMA" >&6; }
15111 else
15112 HAVE_LIBLZMA=no
15113 CPPFLAGS="$ac_save_CPPFLAGS"
15114 LIBLZMA=
15115 LTLIBLZMA=
15116 fi
15117
15118
15119
15120
15121
15122
15123 if test "$HAVE_LIBLZMA" != yes; then
15124 if test "$with_lzma" = yes; then
15125 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15126 fi
15127 fi
15128 fi
15129fi
15130
3fc11d3e
JM
15131LIBGUI="../libgui/src/libgui.a"
15132GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15133
15134
7a292a7a 15135
3fc11d3e
JM
15136WIN32LDAPP=
15137
15138
15139
d91670b9 15140case "${host}" in
686a5eed 15141*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15142 configdir="win"
15143 ;;
15144*)
15145 configdir="unix"
15146 ;;
15147esac
3fc11d3e
JM
15148
15149GDBTKLIBS=
15150if test "${enable_gdbtk}" = "yes"; then
15151
d1c3b63a
KS
15152 # Gdbtk must have an absolute path to srcdir in order to run
15153 # properly when not installed.
15154 here=`pwd`
15155 cd ${srcdir}
15156 GDBTK_SRC_DIR=`pwd`
15157 cd $here
15158
bec39cab 15159
5062cc19
KS
15160 #
15161 # Ok, lets find the tcl configuration
15162 # First, look for one uninstalled.
15163 # the alternative search directory is invoked by --with-tcl
15164 #
3fc11d3e 15165
5062cc19
KS
15166 if test x"${no_tcl}" = x ; then
15167 # we reset no_tcl in case something fails here
15168 no_tcl=true
bec39cab 15169
81ecdfbb
RW
15170# Check whether --with-tcl was given.
15171if test "${with_tcl+set}" = set; then :
15172 withval=$with_tcl; with_tclconfig=${withval}
15173fi
15174
15175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15176$as_echo_n "checking for Tcl configuration... " >&6; }
15177 if test "${ac_cv_c_tclconfig+set}" = set; then :
15178 $as_echo_n "(cached) " >&6
3fc11d3e 15179else
bec39cab 15180
3fc11d3e 15181
5062cc19
KS
15182 # First check to see if --with-tcl was specified.
15183 case "${host}" in
15184 *-*-cygwin*) platDir="win" ;;
15185 *) platDir="unix" ;;
15186 esac
15187 if test x"${with_tclconfig}" != x ; then
15188 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15189 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15190 else
81ecdfbb 15191 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15192 fi
15193 fi
15194
15195 # then check for a private Tcl installation
15196 if test x"${ac_cv_c_tclconfig}" = x ; then
15197 for i in \
15198 ../tcl \
15199 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15200 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15201 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15202 ../../tcl \
15203 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15204 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15205 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15206 ../../../tcl \
15207 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15208 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15209 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15210 if test -f "$i/$platDir/tclConfig.sh" ; then
15211 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15212 break
15213 fi
15214 done
15215 fi
15216
15217 # on Darwin, check in Framework installation locations
15218 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15219 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15220 `ls -d /Library/Frameworks 2>/dev/null` \
15221 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15222 `ls -d /System/Library/Frameworks 2>/dev/null` \
15223 ; do
15224 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15225 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15226 break
15227 fi
15228 done
15229 fi
15230
15231 # check in a few common install locations
15232 if test x"${ac_cv_c_tclconfig}" = x ; then
15233 for i in `ls -d ${libdir} 2>/dev/null` \
15234 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15235 `ls -d ${prefix}/lib 2>/dev/null` \
15236 `ls -d /usr/local/lib 2>/dev/null` \
15237 `ls -d /usr/contrib/lib 2>/dev/null` \
15238 `ls -d /usr/lib 2>/dev/null` \
15239 ; do
15240 if test -f "$i/tclConfig.sh" ; then
15241 ac_cv_c_tclconfig=`(cd $i; pwd)`
15242 break
15243 fi
15244 done
15245 fi
3fc11d3e 15246
5062cc19
KS
15247 # check in a few other private locations
15248 if test x"${ac_cv_c_tclconfig}" = x ; then
15249 for i in \
15250 ${srcdir}/../tcl \
15251 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15252 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15253 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15254 if test -f "$i/$platDir/tclConfig.sh" ; then
15255 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15256 break
15257 fi
15258 done
15259 fi
bec39cab 15260
3fc11d3e
JM
15261fi
15262
5062cc19
KS
15263
15264 if test x"${ac_cv_c_tclconfig}" = x ; then
15265 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15267$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15268 else
15269 no_tcl=
15270 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15272$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15273 fi
15274 fi
3fc11d3e 15275
bec39cab 15276
85541719
DE
15277 # If $no_tk is nonempty, then we can't do Tk, and there is no
15278 # point to doing Tcl.
bec39cab 15279
5062cc19
KS
15280 #
15281 # Ok, lets find the tk configuration
15282 # First, look for one uninstalled.
15283 # the alternative search directory is invoked by --with-tk
15284 #
3fc11d3e 15285
5062cc19
KS
15286 if test x"${no_tk}" = x ; then
15287 # we reset no_tk in case something fails here
15288 no_tk=true
bec39cab 15289
81ecdfbb
RW
15290# Check whether --with-tk was given.
15291if test "${with_tk+set}" = set; then :
15292 withval=$with_tk; with_tkconfig=${withval}
15293fi
15294
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15296$as_echo_n "checking for Tk configuration... " >&6; }
15297 if test "${ac_cv_c_tkconfig+set}" = set; then :
15298 $as_echo_n "(cached) " >&6
bec39cab 15299else
3fc11d3e
JM
15300
15301
5062cc19
KS
15302 # First check to see if --with-tkconfig was specified.
15303 if test x"${with_tkconfig}" != x ; then
15304 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15305 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15306 else
81ecdfbb 15307 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15308 fi
15309 fi
3fc11d3e 15310
5062cc19
KS
15311 # then check for a private Tk library
15312 case "${host}" in
15313 *-*-cygwin*) platDir="win" ;;
15314 *) platDir="unix" ;;
15315 esac
15316 if test x"${ac_cv_c_tkconfig}" = x ; then
15317 for i in \
15318 ../tk \
15319 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15320 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15321 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15322 ../../tk \
15323 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15324 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15325 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15326 ../../../tk \
15327 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15328 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15329 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15330 if test -f "$i/$platDir/tkConfig.sh" ; then
15331 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15332 break
15333 fi
15334 done
15335 fi
15336
15337 # on Darwin, check in Framework installation locations
15338 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15339 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15340 `ls -d /Library/Frameworks 2>/dev/null` \
15341 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15342 `ls -d /System/Library/Frameworks 2>/dev/null` \
15343 ; do
15344 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15345 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15346 break
15347 fi
15348 done
15349 fi
15350
15351 # check in a few common install locations
15352 if test x"${ac_cv_c_tkconfig}" = x ; then
15353 for i in `ls -d ${libdir} 2>/dev/null` \
15354 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15355 `ls -d ${prefix}/lib 2>/dev/null` \
15356 `ls -d /usr/local/lib 2>/dev/null` \
15357 `ls -d /usr/contrib/lib 2>/dev/null` \
15358 `ls -d /usr/lib 2>/dev/null` \
15359 ; do
15360 if test -f "$i/tkConfig.sh" ; then
15361 ac_cv_c_tkconfig=`(cd $i; pwd)`
15362 break
15363 fi
15364 done
15365 fi
15366 # check in a few other private locations
15367 if test x"${ac_cv_c_tkconfig}" = x ; then
15368 for i in \
15369 ${srcdir}/../tk \
15370 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15371 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15372 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15373 if test -f "$i/$platDir/tkConfig.sh" ; then
15374 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15375 break
15376 fi
15377 done
15378 fi
3fc11d3e 15379
3fc11d3e
JM
15380fi
15381
15382
5062cc19
KS
15383 if test x"${ac_cv_c_tkconfig}" = x ; then
15384 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15386$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15387 else
15388 no_tk=
15389 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15391$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15392 fi
3fc11d3e 15393 fi
dd2504ab 15394
dd2504ab 15395
85541719
DE
15396 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15397
81ecdfbb
RW
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15399$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15400
15401 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15403$as_echo "loading" >&6; }
85541719
DE
15404 . ${TCL_BIN_DIR}/tclConfig.sh
15405 else
81ecdfbb
RW
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15407$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15408 fi
15409
15410 # eval is required to do the TCL_DBGX substitution
15411 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15412 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15413
15414 # If the TCL_BIN_DIR is the build directory (not the install directory),
15415 # then set the common variable name to the value of the build variables.
15416 # For example, the variable TCL_LIB_SPEC will be set to the value
15417 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15418 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15419 # installed and uninstalled version of Tcl.
15420 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15421 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15422 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15423 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15424 elif test "`uname -s`" = "Darwin"; then
15425 # If Tcl was built as a framework, attempt to use the libraries
15426 # from the framework at the given location so that linking works
a68ffae9 15427 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15428 case ${TCL_DEFS} in
15429 *TCL_FRAMEWORK*)
15430 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15431 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15432 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15433 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15434 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15435 break
15436 fi
15437 done
15438 fi
15439 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15440 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15441 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15442 fi
15443 ;;
15444 esac
15445 fi
15446
15447 # eval is required to do the TCL_DBGX substitution
15448 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15449 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15450 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15451 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467 # Check for in-tree tcl
15468 here=`pwd`
15469 cd ${srcdir}/..
15470 topdir=`pwd`
15471 cd ${here}
15472
15473 intree="no"
15474 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15475 intree="yes"
15476 fi
15477
15478 # Find Tcl private headers
15479 if test x"${intree}" = xno; then
15480
81ecdfbb
RW
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15482$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15483 private_dir=""
15484 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15485 if test -f ${dir}/tclInt.h ; then
15486 private_dir=${dir}
15487 fi
15488
15489 if test x"${private_dir}" = x; then
81ecdfbb 15490 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15491 else
15492 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15494$as_echo "${private_dir}" >&6; }
85541719
DE
15495 fi
15496
15497 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15498 TCL_LIBRARY="${TCL_LIB_SPEC}"
15499 TCL_DEPS=""
15500 else
15501 # If building tcl in the same src tree, private headers
15502 # are not needed, but we need to be sure to use the right
15503 # headers library
15504 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15505 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15506 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15507 fi
15508
15509
15510
15511
15512
81ecdfbb
RW
15513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15514$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15515
5062cc19 15516 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15518$as_echo "loading" >&6; }
5062cc19 15519 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15520 else
81ecdfbb
RW
15521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15522$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15523 fi
bec39cab 15524
5062cc19
KS
15525 # eval is required to do the TK_DBGX substitution
15526 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15527 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15528
15529 # If the TK_BIN_DIR is the build directory (not the install directory),
15530 # then set the common variable name to the value of the build variables.
15531 # For example, the variable TK_LIB_SPEC will be set to the value
15532 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15533 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15534 # installed and uninstalled version of Tcl.
85541719 15535 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15536 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15537 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15538 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15539 elif test "`uname -s`" = "Darwin"; then
15540 # If Tk was built as a framework, attempt to use the libraries
15541 # from the framework at the given location so that linking works
a68ffae9 15542 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15543 case ${TK_DEFS} in
15544 *TK_FRAMEWORK*)
85541719 15545 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15546 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15547 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15548 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15549 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15550 break
15551 fi
15552 done
15553 fi
85541719 15554 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15555 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15556 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15557 fi
15558 ;;
15559 esac
3fc11d3e
JM
15560 fi
15561
5062cc19
KS
15562 # eval is required to do the TK_DBGX substitution
15563 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15564 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15565 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15566 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15567
3fc11d3e
JM
15568
15569
bec39cab
AC
15570
15571
15572
15573
15574
15575
15576
3fc11d3e 15577
3fc11d3e 15578
bec39cab 15579
bec39cab 15580
85541719
DE
15581 # Check for in-tree Tk
15582 intree="no"
15583 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15584 intree="yes"
15585 fi
3fc11d3e 15586
85541719
DE
15587 # Find Tk private headers
15588 if test x"${intree}" = xno; then
3fc11d3e 15589
81ecdfbb
RW
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15591$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15592 private_dir=""
15593 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15594 if test -f ${dir}/tkInt.h; then
15595 private_dir=${dir}
3fc11d3e 15596 fi
bec39cab 15597
5062cc19 15598 if test x"${private_dir}" = x; then
81ecdfbb 15599 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15600 else
5062cc19 15601 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15603$as_echo "${private_dir}" >&6; }
3fc11d3e 15604 fi
3fc11d3e 15605
85541719
DE
15606 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15607 TK_LIBRARY=${TK_LIB_SPEC}
15608 TK_DEPS=""
15609 else
15610 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15611 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15612 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15613 fi
3fc11d3e
JM
15614
15615
3fc11d3e
JM
15616
15617
3fc11d3e 15618
85541719 15619 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15620
85541719
DE
15621 # Include some libraries that Tcl and Tk want.
15622 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15623 # Yes, the ordering seems wrong here. But it isn't.
15624 # TK_LIBS is the list of libraries that need to be linked
15625 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15626 # were in LIBS then any link tests after this point would
15627 # try to include things like `$(LIBGUI)', which wouldn't work.
15628 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15629
85541719
DE
15630 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15631 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15632 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15633 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15634 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15635 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15636 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15637
85541719
DE
15638 if test x$gdb_cv_os_cygwin = xyes; then
15639 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15640 WIN32LDAPP="-Wl,--subsystem,console"
15641 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15642 fi
ffc6a242 15643
81ecdfbb 15644 subdirs="$subdirs gdbtk"
3ace7edb 15645
85541719 15646 fi
3fc11d3e
JM
15647fi
15648
15649
15650
15651
15652
15653
15654
15655
81ecdfbb
RW
15656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15657$as_echo_n "checking for X... " >&6; }
bec39cab 15658
c906108c 15659
81ecdfbb
RW
15660# Check whether --with-x was given.
15661if test "${with_x+set}" = set; then :
15662 withval=$with_x;
15663fi
c906108c
SS
15664
15665# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15666if test "x$with_x" = xno; then
15667 # The user explicitly disabled X.
15668 have_x=disabled
15669else
81ecdfbb
RW
15670 case $x_includes,$x_libraries in #(
15671 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15672 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15673 $as_echo_n "(cached) " >&6
c906108c
SS
15674else
15675 # One or both of the vars are not set, and there is no cached value.
bec39cab 15676ac_x_includes=no ac_x_libraries=no
81ecdfbb 15677rm -f -r conftest.dir
bec39cab
AC
15678if mkdir conftest.dir; then
15679 cd conftest.dir
bec39cab 15680 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15681incroot:
15682 @echo incroot='${INCROOT}'
15683usrlibdir:
15684 @echo usrlibdir='${USRLIBDIR}'
15685libdir:
15686 @echo libdir='${LIBDIR}'
15687_ACEOF
15688 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15689 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15690 for ac_var in incroot usrlibdir libdir; do
15691 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15692 done
c906108c 15693 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15694 for ac_extension in a so sl dylib la dll; do
15695 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15696 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15697 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15698 fi
15699 done
15700 # Screen out bogus values from the imake configuration. They are
15701 # bogus both because they are the default anyway, and because
15702 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15703 case $ac_im_incroot in
81ecdfbb 15704 /usr/include) ac_x_includes= ;;
bec39cab 15705 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15706 esac
bec39cab 15707 case $ac_im_usrlibdir in
81ecdfbb 15708 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15709 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15710 esac
15711 fi
15712 cd ..
81ecdfbb 15713 rm -f -r conftest.dir
c906108c
SS
15714fi
15715
bec39cab
AC
15716# Standard set of common directories for X headers.
15717# Check X11 before X11Rn because it is often a symlink to the current release.
15718ac_x_header_dirs='
15719/usr/X11/include
81ecdfbb 15720/usr/X11R7/include
bec39cab
AC
15721/usr/X11R6/include
15722/usr/X11R5/include
15723/usr/X11R4/include
15724
15725/usr/include/X11
81ecdfbb 15726/usr/include/X11R7
bec39cab
AC
15727/usr/include/X11R6
15728/usr/include/X11R5
15729/usr/include/X11R4
15730
15731/usr/local/X11/include
81ecdfbb 15732/usr/local/X11R7/include
bec39cab
AC
15733/usr/local/X11R6/include
15734/usr/local/X11R5/include
15735/usr/local/X11R4/include
15736
15737/usr/local/include/X11
81ecdfbb 15738/usr/local/include/X11R7
bec39cab
AC
15739/usr/local/include/X11R6
15740/usr/local/include/X11R5
15741/usr/local/include/X11R4
15742
15743/usr/X386/include
15744/usr/x386/include
15745/usr/XFree86/include/X11
15746
15747/usr/include
15748/usr/local/include
15749/usr/unsupported/include
15750/usr/athena/include
15751/usr/local/x11r5/include
15752/usr/lpp/Xamples/include
15753
15754/usr/openwin/include
15755/usr/openwin/share/include'
15756
15757if test "$ac_x_includes" = no; then
81ecdfbb 15758 # Guess where to find include files, by looking for Xlib.h.
c906108c 15759 # First, try using that file with no special directory specified.
81ecdfbb 15760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15761/* end confdefs.h. */
81ecdfbb 15762#include <X11/Xlib.h>
bec39cab 15763_ACEOF
81ecdfbb 15764if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15765 # We can compile using X headers with no special include directory.
15766ac_x_includes=
15767else
bec39cab 15768 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15769 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15770 ac_x_includes=$ac_dir
15771 break
15772 fi
15773done
c906108c 15774fi
bec39cab
AC
15775rm -f conftest.err conftest.$ac_ext
15776fi # $ac_x_includes = no
c906108c 15777
bec39cab 15778if test "$ac_x_libraries" = no; then
c906108c 15779 # Check for the libraries.
c906108c
SS
15780 # See if we find them without any special options.
15781 # Don't add to $LIBS permanently.
bec39cab 15782 ac_save_LIBS=$LIBS
81ecdfbb
RW
15783 LIBS="-lX11 $LIBS"
15784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15785/* end confdefs.h. */
81ecdfbb 15786#include <X11/Xlib.h>
bec39cab
AC
15787int
15788main ()
15789{
81ecdfbb 15790XrmInitialize ()
bec39cab
AC
15791 ;
15792 return 0;
15793}
15794_ACEOF
81ecdfbb 15795if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15796 LIBS=$ac_save_LIBS
c906108c
SS
15797# We can link X programs with no special library path.
15798ac_x_libraries=
15799else
81ecdfbb
RW
15800 LIBS=$ac_save_LIBS
15801for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15802do
bec39cab 15803 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15804 for ac_extension in a so sl dylib la dll; do
15805 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15806 ac_x_libraries=$ac_dir
15807 break 2
15808 fi
15809 done
15810done
15811fi
81ecdfbb
RW
15812rm -f core conftest.err conftest.$ac_objext \
15813 conftest$ac_exeext conftest.$ac_ext
bec39cab 15814fi # $ac_x_libraries = no
c906108c 15815
81ecdfbb
RW
15816case $ac_x_includes,$ac_x_libraries in #(
15817 no,* | *,no | *\'*)
15818 # Didn't find X, or a directory has "'" in its name.
15819 ac_cv_have_x="have_x=no";; #(
15820 *)
15821 # Record where we found X for the cache.
15822 ac_cv_have_x="have_x=yes\
15823 ac_x_includes='$ac_x_includes'\
15824 ac_x_libraries='$ac_x_libraries'"
15825esac
c906108c 15826fi
81ecdfbb
RW
15827;; #(
15828 *) have_x=yes;;
15829 esac
c906108c
SS
15830 eval "$ac_cv_have_x"
15831fi # $with_x != no
15832
15833if test "$have_x" != yes; then
81ecdfbb
RW
15834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15835$as_echo "$have_x" >&6; }
c906108c
SS
15836 no_x=yes
15837else
15838 # If each of the values was on the command line, it overrides each guess.
15839 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15840 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15841 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15842 ac_cv_have_x="have_x=yes\
15843 ac_x_includes='$x_includes'\
15844 ac_x_libraries='$x_libraries'"
15845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15846$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15847fi
15848
15849
bec39cab 15850# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15851# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15852# This code just checks for a few cases where we'd like to ignore those
15853# definitions, even when they're present in the '.mt' file. These cases
15854# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15855# not part of the source tree.
7a292a7a 15856#
81ecdfbb
RW
15857# Check whether --enable-sim was given.
15858if test "${enable_sim+set}" = set; then :
15859 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15860 echo "enableval = ${enableval}";
15861 case "${enableval}" in
15862 yes) ignore_sim=false ;;
15863 no) ignore_sim=true ;;
15864 *) ignore_sim=false ;;
15865 esac
15866else
15867 ignore_sim=false
81ecdfbb
RW
15868fi
15869
7a292a7a
SS
15870
15871if test ! -d "${srcdir}/../sim"; then
15872 ignore_sim=true
15873fi
15874
9b624dbe
UW
15875SIM=
15876SIM_OBS=
15877if test "${ignore_sim}" = "false"; then
15878 if test x"${gdb_sim}" != x ; then
15879 SIM="${gdb_sim}"
15880 SIM_OBS="remote-sim.o"
60ca704f 15881
81ecdfbb 15882$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15883
9b624dbe 15884 fi
7a292a7a
SS
15885fi
15886
15887
15888
c906108c
SS
15889
15890
15891
15892
15893
15894
dfcd3bfb 15895
e56ac5c3
AC
15896
15897
b3a90332
AC
15898
15899
c35f4ffc 15900# List of host floatformats.
bec39cab
AC
15901
15902cat >>confdefs.h <<_ACEOF
c35f4ffc 15903#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15904_ACEOF
c35f4ffc 15905
bec39cab
AC
15906
15907cat >>confdefs.h <<_ACEOF
c35f4ffc 15908#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15909_ACEOF
15910
c35f4ffc 15911
bec39cab 15912cat >>confdefs.h <<_ACEOF
c35f4ffc 15913#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15914_ACEOF
c35f4ffc
AC
15915
15916
c906108c
SS
15917# target_subdir is used by the testsuite to find the target libraries.
15918target_subdir=
15919if test "${host}" != "${target}"; then
15920 target_subdir="${target_alias}/"
15921fi
15922
15923
15924frags=
771b4502 15925if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15926 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15927 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15928 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15929 fi
15930 frags="$frags $host_makefile_frag"
15931else
15932 host_makefile_frag=/dev/null
c906108c 15933fi
c906108c 15934
c906108c
SS
15935
15936
15937
771b4502 15938if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15939# We pick this up from the host configuration file (.mh) because we
15940# do not have a native configuration Makefile fragment.
c906108c
SS
15941nativefile=`sed -n '
15942s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15943' ${host_makefile_frag}`
c906108c
SS
15944fi
15945
15946
b00a8037 15947if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15948
15949cat >>confdefs.h <<_ACEOF
b00a8037 15950#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15951_ACEOF
b00a8037
DJ
15952
15953fi
15954
8dcde887 15955# Enable multi-ice-gdb-server.
81ecdfbb
RW
15956# Check whether --enable-multi-ice was given.
15957if test "${enable_multi_ice+set}" = set; then :
15958 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15959 yes | no)
15960 ;;
81ecdfbb 15961 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15962 esac
81ecdfbb 15963fi
b4e70030 15964
81ecdfbb
RW
15965if test "x$enable_multi_ice" = xyes; then
15966 subdirs="$subdirs multi-ice"
3ace7edb 15967
a85f51e7
DJ
15968fi
15969
496c0e1b
JB
15970# Check whether --enable-gdbserver was given.
15971if test "${enable_gdbserver+set}" = set; then :
15972 enableval=$enable_gdbserver; case "${enableval}" in
15973 yes| no|auto) ;;
15974 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15975esac
15976else
15977 enable_gdbserver=auto
15978fi
15979
15980
15981# We only build gdbserver automatically in a native configuration, and
15982# only if the user did not explicitly disable its build.
15983if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15985$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15986 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15988$as_echo "yes" >&6; }
15989 subdirs="$subdirs gdbserver"
3ace7edb 15990
496c0e1b 15991 gdbserver_build_enabled=yes
8dcde887 15992 else
81ecdfbb
RW
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15994$as_echo "no" >&6; }
8dcde887
MK
15995 fi
15996fi
15997
496c0e1b
JB
15998# If the user explicitly request the gdbserver to be built, verify that
15999# we were in fact able to enable it.
16000if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16001 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16002fi
16003
393fd4c3
YQ
16004# Check for babeltrace and babeltrace-ctf
16005
16006# Check whether --with-babeltrace was given.
16007if test "${with_babeltrace+set}" = set; then :
16008 withval=$with_babeltrace;
16009else
16010 with_babeltrace=auto
16011fi
16012
16013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16014$as_echo_n "checking whether to use babeltrace... " >&6; }
16015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16016$as_echo "$with_babeltrace" >&6; }
16017
16018if test "x$with_babeltrace" = "xno"; then
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16020$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16021else
16022 # Append -Werror to CFLAGS so that configure can catch the warning
16023 # "assignment from incompatible pointer type", which is related to
16024 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16025 # in GDB, while babeltrace 1.0.3 is broken.
16026 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16027 # safe to save and restore CFLAGS here.
16028 saved_CFLAGS=$CFLAGS
16029 CFLAGS="$CFLAGS -Werror"
16030
16031
16032
16033
16034
16035
16036
16037
16038 use_additional=yes
16039
16040 acl_save_prefix="$prefix"
16041 prefix="$acl_final_prefix"
16042 acl_save_exec_prefix="$exec_prefix"
16043 exec_prefix="$acl_final_exec_prefix"
16044
16045 eval additional_includedir=\"$includedir\"
16046 eval additional_libdir=\"$libdir\"
16047
16048 exec_prefix="$acl_save_exec_prefix"
16049 prefix="$acl_save_prefix"
16050
16051
16052# Check whether --with-libbabeltrace-prefix was given.
16053if test "${with_libbabeltrace_prefix+set}" = set; then :
16054 withval=$with_libbabeltrace_prefix;
16055 if test "X$withval" = "Xno"; then
16056 use_additional=no
16057 else
16058 if test "X$withval" = "X"; then
16059
16060 acl_save_prefix="$prefix"
16061 prefix="$acl_final_prefix"
16062 acl_save_exec_prefix="$exec_prefix"
16063 exec_prefix="$acl_final_exec_prefix"
16064
16065 eval additional_includedir=\"$includedir\"
16066 eval additional_libdir=\"$libdir\"
16067
16068 exec_prefix="$acl_save_exec_prefix"
16069 prefix="$acl_save_prefix"
16070
16071 else
16072 additional_includedir="$withval/include"
16073 additional_libdir="$withval/lib"
16074 fi
16075 fi
16076
16077fi
16078
16079 LIBBABELTRACE=
16080 LTLIBBABELTRACE=
16081 INCBABELTRACE=
16082 rpathdirs=
16083 ltrpathdirs=
16084 names_already_handled=
16085 names_next_round='babeltrace babeltrace-ctf'
16086 while test -n "$names_next_round"; do
16087 names_this_round="$names_next_round"
16088 names_next_round=
16089 for name in $names_this_round; do
16090 already_handled=
16091 for n in $names_already_handled; do
16092 if test "$n" = "$name"; then
16093 already_handled=yes
16094 break
16095 fi
16096 done
16097 if test -z "$already_handled"; then
16098 names_already_handled="$names_already_handled $name"
16099 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16100 eval value=\"\$HAVE_LIB$uppername\"
16101 if test -n "$value"; then
16102 if test "$value" = yes; then
16103 eval value=\"\$LIB$uppername\"
16104 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16105 eval value=\"\$LTLIB$uppername\"
16106 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16107 else
16108 :
16109 fi
16110 else
16111 found_dir=
16112 found_la=
16113 found_so=
16114 found_a=
16115 if test $use_additional = yes; then
16116 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16117 found_dir="$additional_libdir"
16118 found_so="$additional_libdir/lib$name.$shlibext"
16119 if test -f "$additional_libdir/lib$name.la"; then
16120 found_la="$additional_libdir/lib$name.la"
16121 fi
16122 else
16123 if test -f "$additional_libdir/lib$name.$libext"; then
16124 found_dir="$additional_libdir"
16125 found_a="$additional_libdir/lib$name.$libext"
16126 if test -f "$additional_libdir/lib$name.la"; then
16127 found_la="$additional_libdir/lib$name.la"
16128 fi
16129 fi
16130 fi
16131 fi
16132 if test "X$found_dir" = "X"; then
16133 for x in $LDFLAGS $LTLIBBABELTRACE; do
16134
16135 acl_save_prefix="$prefix"
16136 prefix="$acl_final_prefix"
16137 acl_save_exec_prefix="$exec_prefix"
16138 exec_prefix="$acl_final_exec_prefix"
16139 eval x=\"$x\"
16140 exec_prefix="$acl_save_exec_prefix"
16141 prefix="$acl_save_prefix"
16142
16143 case "$x" in
16144 -L*)
16145 dir=`echo "X$x" | sed -e 's/^X-L//'`
16146 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16147 found_dir="$dir"
16148 found_so="$dir/lib$name.$shlibext"
16149 if test -f "$dir/lib$name.la"; then
16150 found_la="$dir/lib$name.la"
16151 fi
16152 else
16153 if test -f "$dir/lib$name.$libext"; then
16154 found_dir="$dir"
16155 found_a="$dir/lib$name.$libext"
16156 if test -f "$dir/lib$name.la"; then
16157 found_la="$dir/lib$name.la"
16158 fi
16159 fi
16160 fi
16161 ;;
16162 esac
16163 if test "X$found_dir" != "X"; then
16164 break
16165 fi
16166 done
16167 fi
16168 if test "X$found_dir" != "X"; then
16169 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16170 if test "X$found_so" != "X"; then
16171 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16172 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16173 else
16174 haveit=
16175 for x in $ltrpathdirs; do
16176 if test "X$x" = "X$found_dir"; then
16177 haveit=yes
16178 break
16179 fi
16180 done
16181 if test -z "$haveit"; then
16182 ltrpathdirs="$ltrpathdirs $found_dir"
16183 fi
16184 if test "$hardcode_direct" = yes; then
16185 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16186 else
16187 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16188 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16189 haveit=
16190 for x in $rpathdirs; do
16191 if test "X$x" = "X$found_dir"; then
16192 haveit=yes
16193 break
16194 fi
16195 done
16196 if test -z "$haveit"; then
16197 rpathdirs="$rpathdirs $found_dir"
16198 fi
16199 else
16200 haveit=
16201 for x in $LDFLAGS $LIBBABELTRACE; do
16202
16203 acl_save_prefix="$prefix"
16204 prefix="$acl_final_prefix"
16205 acl_save_exec_prefix="$exec_prefix"
16206 exec_prefix="$acl_final_exec_prefix"
16207 eval x=\"$x\"
16208 exec_prefix="$acl_save_exec_prefix"
16209 prefix="$acl_save_prefix"
16210
16211 if test "X$x" = "X-L$found_dir"; then
16212 haveit=yes
16213 break
16214 fi
16215 done
16216 if test -z "$haveit"; then
16217 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16218 fi
16219 if test "$hardcode_minus_L" != no; then
16220 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16221 else
16222 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16223 fi
16224 fi
16225 fi
16226 fi
16227 else
16228 if test "X$found_a" != "X"; then
16229 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16230 else
16231 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16232 fi
16233 fi
16234 additional_includedir=
16235 case "$found_dir" in
16236 */lib | */lib/)
16237 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16238 additional_includedir="$basedir/include"
16239 ;;
16240 esac
16241 if test "X$additional_includedir" != "X"; then
16242 if test "X$additional_includedir" != "X/usr/include"; then
16243 haveit=
16244 if test "X$additional_includedir" = "X/usr/local/include"; then
16245 if test -n "$GCC"; then
16246 case $host_os in
16247 linux*) haveit=yes;;
16248 esac
16249 fi
16250 fi
16251 if test -z "$haveit"; then
16252 for x in $CPPFLAGS $INCBABELTRACE; do
16253
16254 acl_save_prefix="$prefix"
16255 prefix="$acl_final_prefix"
16256 acl_save_exec_prefix="$exec_prefix"
16257 exec_prefix="$acl_final_exec_prefix"
16258 eval x=\"$x\"
16259 exec_prefix="$acl_save_exec_prefix"
16260 prefix="$acl_save_prefix"
16261
16262 if test "X$x" = "X-I$additional_includedir"; then
16263 haveit=yes
16264 break
16265 fi
16266 done
16267 if test -z "$haveit"; then
16268 if test -d "$additional_includedir"; then
16269 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16270 fi
16271 fi
16272 fi
16273 fi
16274 fi
16275 if test -n "$found_la"; then
16276 save_libdir="$libdir"
16277 case "$found_la" in
16278 */* | *\\*) . "$found_la" ;;
16279 *) . "./$found_la" ;;
16280 esac
16281 libdir="$save_libdir"
16282 for dep in $dependency_libs; do
16283 case "$dep" in
16284 -L*)
16285 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16286 if test "X$additional_libdir" != "X/usr/lib"; then
16287 haveit=
16288 if test "X$additional_libdir" = "X/usr/local/lib"; then
16289 if test -n "$GCC"; then
16290 case $host_os in
16291 linux*) haveit=yes;;
16292 esac
16293 fi
16294 fi
16295 if test -z "$haveit"; then
16296 haveit=
16297 for x in $LDFLAGS $LIBBABELTRACE; do
16298
16299 acl_save_prefix="$prefix"
16300 prefix="$acl_final_prefix"
16301 acl_save_exec_prefix="$exec_prefix"
16302 exec_prefix="$acl_final_exec_prefix"
16303 eval x=\"$x\"
16304 exec_prefix="$acl_save_exec_prefix"
16305 prefix="$acl_save_prefix"
16306
16307 if test "X$x" = "X-L$additional_libdir"; then
16308 haveit=yes
16309 break
16310 fi
16311 done
16312 if test -z "$haveit"; then
16313 if test -d "$additional_libdir"; then
16314 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16315 fi
16316 fi
16317 haveit=
16318 for x in $LDFLAGS $LTLIBBABELTRACE; do
16319
16320 acl_save_prefix="$prefix"
16321 prefix="$acl_final_prefix"
16322 acl_save_exec_prefix="$exec_prefix"
16323 exec_prefix="$acl_final_exec_prefix"
16324 eval x=\"$x\"
16325 exec_prefix="$acl_save_exec_prefix"
16326 prefix="$acl_save_prefix"
16327
16328 if test "X$x" = "X-L$additional_libdir"; then
16329 haveit=yes
16330 break
16331 fi
16332 done
16333 if test -z "$haveit"; then
16334 if test -d "$additional_libdir"; then
16335 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16336 fi
16337 fi
16338 fi
16339 fi
16340 ;;
16341 -R*)
16342 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16343 if test "$enable_rpath" != no; then
16344 haveit=
16345 for x in $rpathdirs; do
16346 if test "X$x" = "X$dir"; then
16347 haveit=yes
16348 break
16349 fi
16350 done
16351 if test -z "$haveit"; then
16352 rpathdirs="$rpathdirs $dir"
16353 fi
16354 haveit=
16355 for x in $ltrpathdirs; do
16356 if test "X$x" = "X$dir"; then
16357 haveit=yes
16358 break
16359 fi
16360 done
16361 if test -z "$haveit"; then
16362 ltrpathdirs="$ltrpathdirs $dir"
16363 fi
16364 fi
16365 ;;
16366 -l*)
16367 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16368 ;;
16369 *.la)
16370 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16371 ;;
16372 *)
16373 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16374 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16375 ;;
16376 esac
16377 done
16378 fi
16379 else
16380 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16381 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16382 fi
16383 fi
16384 fi
16385 done
16386 done
16387 if test "X$rpathdirs" != "X"; then
16388 if test -n "$hardcode_libdir_separator"; then
16389 alldirs=
16390 for found_dir in $rpathdirs; do
16391 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16392 done
16393 acl_save_libdir="$libdir"
16394 libdir="$alldirs"
16395 eval flag=\"$hardcode_libdir_flag_spec\"
16396 libdir="$acl_save_libdir"
16397 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16398 else
16399 for found_dir in $rpathdirs; do
16400 acl_save_libdir="$libdir"
16401 libdir="$found_dir"
16402 eval flag=\"$hardcode_libdir_flag_spec\"
16403 libdir="$acl_save_libdir"
16404 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16405 done
16406 fi
16407 fi
16408 if test "X$ltrpathdirs" != "X"; then
16409 for found_dir in $ltrpathdirs; do
16410 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16411 done
16412 fi
16413
16414
16415 ac_save_CPPFLAGS="$CPPFLAGS"
16416
16417 for element in $INCBABELTRACE; do
16418 haveit=
16419 for x in $CPPFLAGS; do
16420
16421 acl_save_prefix="$prefix"
16422 prefix="$acl_final_prefix"
16423 acl_save_exec_prefix="$exec_prefix"
16424 exec_prefix="$acl_final_exec_prefix"
16425 eval x=\"$x\"
16426 exec_prefix="$acl_save_exec_prefix"
16427 prefix="$acl_save_prefix"
16428
16429 if test "X$x" = "X$element"; then
16430 haveit=yes
16431 break
16432 fi
16433 done
16434 if test -z "$haveit"; then
16435 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16436 fi
16437 done
16438
16439
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16441$as_echo_n "checking for libbabeltrace... " >&6; }
16442if test "${ac_cv_libbabeltrace+set}" = set; then :
16443 $as_echo_n "(cached) " >&6
16444else
16445
16446 ac_save_LIBS="$LIBS"
16447 LIBS="$LIBS $LIBBABELTRACE"
16448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16449/* end confdefs.h. */
16450#include <babeltrace/babeltrace.h>
16451 #include <babeltrace/ctf/events.h>
16452 #include <babeltrace/ctf/iterator.h>
16453int
16454main ()
16455{
16456struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16457 struct bt_ctf_event *event = NULL;
16458 const struct bt_definition *scope;
16459
65c749e7 16460 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16461 scope = bt_ctf_get_top_level_scope (event,
16462 BT_STREAM_EVENT_HEADER);
16463 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16464
16465 ;
16466 return 0;
16467}
16468_ACEOF
16469if ac_fn_c_try_link "$LINENO"; then :
16470 ac_cv_libbabeltrace=yes
16471else
16472 ac_cv_libbabeltrace=no
16473fi
16474rm -f core conftest.err conftest.$ac_objext \
16475 conftest$ac_exeext conftest.$ac_ext
16476 LIBS="$ac_save_LIBS"
16477
16478fi
16479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16480$as_echo "$ac_cv_libbabeltrace" >&6; }
16481 if test "$ac_cv_libbabeltrace" = yes; then
16482 HAVE_LIBBABELTRACE=yes
16483
16484$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16485
16486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16487$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16489$as_echo "$LIBBABELTRACE" >&6; }
16490 else
16491 HAVE_LIBBABELTRACE=no
16492 CPPFLAGS="$ac_save_CPPFLAGS"
16493 LIBBABELTRACE=
16494 LTLIBBABELTRACE=
16495 fi
16496
16497
16498
16499
16500
16501
16502 CFLAGS=$saved_CFLAGS
16503
16504 if test "$HAVE_LIBBABELTRACE" != yes; then
16505 if test "$with_babeltrace" = yes; then
16506 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16507 else
16508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16509$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16510 fi
16511 fi
16512fi
16513
db985757 16514# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16515# to an empty version.
c906108c
SS
16516
16517files=
16518links=
5a2402b8 16519
c906108c
SS
16520rm -f nm.h
16521if test "${nativefile}" != ""; then
0f475e27
AC
16522 case "${nativefile}" in
16523 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16524 * ) GDB_NM_FILE="${nativefile}"
16525 esac
5a2402b8
AC
16526 files="${files} ${GDB_NM_FILE}"
16527 links="${links} nm.h"
60ca704f
SE
16528
16529cat >>confdefs.h <<_ACEOF
b78960be 16530#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16531_ACEOF
5a2402b8 16532
c906108c 16533fi
5a2402b8
AC
16534
16535
bec39cab
AC
16536ac_sources="$files"
16537ac_dests="$links"
16538while test -n "$ac_sources"; do
16539 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16540 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16541 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16542done
81ecdfbb 16543ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16544
16545
c906108c
SS
16546
16547
c906108c 16548
81ecdfbb 16549$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16550
bec39cab 16551
b292c783 16552
f6a88844
JM
16553 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16554 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16555 if test "x$GDB_TRANSFORM_NAME" = x; then
16556 GDB_TRANSFORM_NAME=gdb
16557 fi
16558
16559
16560
16561 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16562 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16563 if test "x$GCORE_TRANSFORM_NAME" = x; then
16564 GCORE_TRANSFORM_NAME=gcore
16565 fi
16566
b292c783
JK
16567
16568ac_config_files="$ac_config_files gcore"
16569
16570
c971b7fa 16571ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
16572
16573ac_config_commands="$ac_config_commands default"
89a34d1b 16574
bec39cab
AC
16575cat >confcache <<\_ACEOF
16576# This file is a shell script that caches the results of configure
16577# tests run on this system so they can be shared between configure
16578# scripts and configure runs, see configure's option --config-cache.
16579# It is not useful on other systems. If it contains results you don't
16580# want to keep, you may remove or edit it.
16581#
16582# config.status only pays attention to the cache file if you give it
16583# the --recheck option to rerun configure.
16584#
16585# `ac_cv_env_foo' variables (set or unset) will be overridden when
16586# loading this file, other *unset* `ac_cv_foo' will be assigned the
16587# following values.
16588
16589_ACEOF
16590
16591# The following way of writing the cache mishandles newlines in values,
16592# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16593# So, we kill variables containing newlines.
bec39cab
AC
16594# Ultrix sh set writes to stderr and can't be redirected directly,
16595# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16596(
16597 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16598 eval ac_val=\$$ac_var
16599 case $ac_val in #(
16600 *${as_nl}*)
16601 case $ac_var in #(
16602 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16603$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16604 esac
16605 case $ac_var in #(
16606 _ | IFS | as_nl) ;; #(
16607 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16608 *) { eval $ac_var=; unset $ac_var;} ;;
16609 esac ;;
16610 esac
16611 done
16612
bec39cab 16613 (set) 2>&1 |
81ecdfbb
RW
16614 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16615 *${as_nl}ac_space=\ *)
16616 # `set' does not quote correctly, so add quotes: double-quote
16617 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16618 sed -n \
16619 "s/'/'\\\\''/g;
16620 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16621 ;; #(
bec39cab
AC
16622 *)
16623 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16624 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16625 ;;
81ecdfbb
RW
16626 esac |
16627 sort
16628) |
bec39cab 16629 sed '
81ecdfbb 16630 /^ac_cv_env_/b end
bec39cab 16631 t clear
81ecdfbb 16632 :clear
bec39cab
AC
16633 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16634 t end
81ecdfbb
RW
16635 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16636 :end' >>confcache
16637if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16638 if test -w "$cache_file"; then
16639 test "x$cache_file" != "x/dev/null" &&
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16641$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16642 cat confcache >$cache_file
16643 else
81ecdfbb
RW
16644 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16645$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16646 fi
16647fi
16648rm -f confcache
16649
16650test "x$prefix" = xNONE && prefix=$ac_default_prefix
16651# Let make expand exec_prefix.
16652test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16653
bec39cab
AC
16654DEFS=-DHAVE_CONFIG_H
16655
16656ac_libobjs=
16657ac_ltlibobjs=
16658for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16659 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16660 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16661 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16662 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16663 # will be set to the directory where LIBOBJS objects are built.
16664 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16665 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16666done
16667LIBOBJS=$ac_libobjs
16668
16669LTLIBOBJS=$ac_ltlibobjs
16670
16671
85981d60 16672if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16673 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16674Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16675fi
a417dc56 16676if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16677 as_fn_error "conditional \"GMAKE\" was never defined.
16678Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16679fi
4df42755
DE
16680if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16681 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16682Usually this means the macro was only invoked conditionally." "$LINENO" 5
16683fi
16684if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16685 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16686Usually this means the macro was only invoked conditionally." "$LINENO" 5
16687fi
81ecdfbb
RW
16688
16689
bec39cab 16690: ${CONFIG_STATUS=./config.status}
81ecdfbb 16691ac_write_fail=0
bec39cab
AC
16692ac_clean_files_save=$ac_clean_files
16693ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16694{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16695$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16696as_write_fail=0
16697cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16698#! $SHELL
16699# Generated by $as_me.
16700# Run this file to recreate the current configuration.
16701# Compiler output produced by configure, useful for debugging
16702# configure, is in config.log if it exists.
16703
16704debug=false
16705ac_cs_recheck=false
16706ac_cs_silent=false
bec39cab 16707
81ecdfbb
RW
16708SHELL=\${CONFIG_SHELL-$SHELL}
16709export SHELL
16710_ASEOF
16711cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16712## -------------------- ##
16713## M4sh Initialization. ##
16714## -------------------- ##
16715
16716# Be more Bourne compatible
16717DUALCASE=1; export DUALCASE # for MKS sh
16718if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16719 emulate sh
16720 NULLCMD=:
81ecdfbb 16721 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16722 # is contrary to our usage. Disable this feature.
16723 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16724 setopt NO_GLOB_SUBST
16725else
16726 case `(set -o) 2>/dev/null` in #(
16727 *posix*) :
16728 set -o posix ;; #(
16729 *) :
16730 ;;
16731esac
bec39cab 16732fi
bec39cab 16733
81ecdfbb
RW
16734
16735as_nl='
16736'
16737export as_nl
16738# Printing a long string crashes Solaris 7 /usr/bin/printf.
16739as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16740as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16741as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16742# Prefer a ksh shell builtin over an external printf program on Solaris,
16743# but without wasting forks for bash or zsh.
16744if test -z "$BASH_VERSION$ZSH_VERSION" \
16745 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16746 as_echo='print -r --'
16747 as_echo_n='print -rn --'
16748elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16749 as_echo='printf %s\n'
16750 as_echo_n='printf %s'
16751else
16752 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16753 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16754 as_echo_n='/usr/ucb/echo -n'
16755 else
16756 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16757 as_echo_n_body='eval
16758 arg=$1;
16759 case $arg in #(
16760 *"$as_nl"*)
16761 expr "X$arg" : "X\\(.*\\)$as_nl";
16762 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16763 esac;
16764 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16765 '
16766 export as_echo_n_body
16767 as_echo_n='sh -c $as_echo_n_body as_echo'
16768 fi
16769 export as_echo_body
16770 as_echo='sh -c $as_echo_body as_echo'
16771fi
16772
16773# The user is always right.
16774if test "${PATH_SEPARATOR+set}" != set; then
16775 PATH_SEPARATOR=:
16776 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16777 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16778 PATH_SEPARATOR=';'
16779 }
bec39cab
AC
16780fi
16781
16782
81ecdfbb
RW
16783# IFS
16784# We need space, tab and new line, in precisely that order. Quoting is
16785# there to prevent editors from complaining about space-tab.
16786# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16787# splitting by setting IFS to empty value.)
16788IFS=" "" $as_nl"
16789
16790# Find who we are. Look in the path if we contain no directory separator.
16791case $0 in #((
16792 *[\\/]* ) as_myself=$0 ;;
16793 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16794for as_dir in $PATH
16795do
16796 IFS=$as_save_IFS
16797 test -z "$as_dir" && as_dir=.
16798 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16799 done
16800IFS=$as_save_IFS
16801
16802 ;;
16803esac
16804# We did not find ourselves, most probably we were run as `sh COMMAND'
16805# in which case we are not to be found in the path.
16806if test "x$as_myself" = x; then
16807 as_myself=$0
16808fi
16809if test ! -f "$as_myself"; then
16810 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16811 exit 1
16812fi
16813
16814# Unset variables that we do not need and which cause bugs (e.g. in
16815# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16816# suppresses any "Segmentation fault" message there. '((' could
16817# trigger a bug in pdksh 5.2.14.
16818for as_var in BASH_ENV ENV MAIL MAILPATH
16819do eval test x\${$as_var+set} = xset \
16820 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16821done
bec39cab
AC
16822PS1='$ '
16823PS2='> '
16824PS4='+ '
16825
16826# NLS nuisances.
81ecdfbb
RW
16827LC_ALL=C
16828export LC_ALL
16829LANGUAGE=C
16830export LANGUAGE
16831
16832# CDPATH.
16833(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16834
16835
16836# as_fn_error ERROR [LINENO LOG_FD]
16837# ---------------------------------
16838# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16839# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16840# script with status $?, using 1 if that was 0.
16841as_fn_error ()
16842{
16843 as_status=$?; test $as_status -eq 0 && as_status=1
16844 if test "$3"; then
16845 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16846 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16847 fi
16848 $as_echo "$as_me: error: $1" >&2
16849 as_fn_exit $as_status
16850} # as_fn_error
16851
16852
16853# as_fn_set_status STATUS
16854# -----------------------
16855# Set $? to STATUS, without forking.
16856as_fn_set_status ()
16857{
16858 return $1
16859} # as_fn_set_status
16860
16861# as_fn_exit STATUS
16862# -----------------
16863# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16864as_fn_exit ()
16865{
16866 set +e
16867 as_fn_set_status $1
16868 exit $1
16869} # as_fn_exit
16870
16871# as_fn_unset VAR
16872# ---------------
16873# Portably unset VAR.
16874as_fn_unset ()
16875{
16876 { eval $1=; unset $1;}
16877}
16878as_unset=as_fn_unset
16879# as_fn_append VAR VALUE
16880# ----------------------
16881# Append the text in VALUE to the end of the definition contained in VAR. Take
16882# advantage of any shell optimizations that allow amortized linear growth over
16883# repeated appends, instead of the typical quadratic growth present in naive
16884# implementations.
16885if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16886 eval 'as_fn_append ()
16887 {
16888 eval $1+=\$2
16889 }'
16890else
16891 as_fn_append ()
16892 {
16893 eval $1=\$$1\$2
16894 }
16895fi # as_fn_append
16896
16897# as_fn_arith ARG...
16898# ------------------
16899# Perform arithmetic evaluation on the ARGs, and store the result in the
16900# global $as_val. Take advantage of shells that can avoid forks. The arguments
16901# must be portable across $(()) and expr.
16902if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16903 eval 'as_fn_arith ()
16904 {
16905 as_val=$(( $* ))
16906 }'
16907else
16908 as_fn_arith ()
16909 {
16910 as_val=`expr "$@" || test $? -eq 1`
16911 }
16912fi # as_fn_arith
bec39cab 16913
81ecdfbb
RW
16914
16915if expr a : '\(a\)' >/dev/null 2>&1 &&
16916 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16917 as_expr=expr
16918else
16919 as_expr=false
16920fi
16921
81ecdfbb 16922if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16923 as_basename=basename
16924else
16925 as_basename=false
16926fi
16927
81ecdfbb
RW
16928if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16929 as_dirname=dirname
16930else
16931 as_dirname=false
16932fi
bec39cab 16933
81ecdfbb 16934as_me=`$as_basename -- "$0" ||
bec39cab
AC
16935$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16936 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16937 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16938$as_echo X/"$0" |
16939 sed '/^.*\/\([^/][^/]*\)\/*$/{
16940 s//\1/
16941 q
16942 }
16943 /^X\/\(\/\/\)$/{
16944 s//\1/
16945 q
16946 }
16947 /^X\/\(\/\).*/{
16948 s//\1/
16949 q
16950 }
16951 s/.*/./; q'`
b4e70030 16952
b4e70030
JB
16953# Avoid depending upon Character Ranges.
16954as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16955as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16956as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16957as_cr_digits='0123456789'
16958as_cr_alnum=$as_cr_Letters$as_cr_digits
16959
81ecdfbb
RW
16960ECHO_C= ECHO_N= ECHO_T=
16961case `echo -n x` in #(((((
16962-n*)
16963 case `echo 'xy\c'` in
16964 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16965 xy) ECHO_C='\c';;
16966 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16967 ECHO_T=' ';;
16968 esac;;
16969*)
16970 ECHO_N='-n';;
bec39cab
AC
16971esac
16972
81ecdfbb
RW
16973rm -f conf$$ conf$$.exe conf$$.file
16974if test -d conf$$.dir; then
16975 rm -f conf$$.dir/conf$$.file
bec39cab 16976else
81ecdfbb
RW
16977 rm -f conf$$.dir
16978 mkdir conf$$.dir 2>/dev/null
bec39cab 16979fi
81ecdfbb
RW
16980if (echo >conf$$.file) 2>/dev/null; then
16981 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16982 as_ln_s='ln -s'
81ecdfbb
RW
16983 # ... but there are two gotchas:
16984 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16985 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16986 # In both cases, we have to default to `cp -p'.
16987 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16988 as_ln_s='cp -p'
16989 elif ln conf$$.file conf$$ 2>/dev/null; then
16990 as_ln_s=ln
16991 else
16992 as_ln_s='cp -p'
b4e70030 16993 fi
bec39cab
AC
16994else
16995 as_ln_s='cp -p'
16996fi
81ecdfbb
RW
16997rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16998rmdir conf$$.dir 2>/dev/null
16999
17000
17001# as_fn_mkdir_p
17002# -------------
17003# Create "$as_dir" as a directory, including parents if necessary.
17004as_fn_mkdir_p ()
17005{
17006
17007 case $as_dir in #(
17008 -*) as_dir=./$as_dir;;
17009 esac
17010 test -d "$as_dir" || eval $as_mkdir_p || {
17011 as_dirs=
17012 while :; do
17013 case $as_dir in #(
17014 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17015 *) as_qdir=$as_dir;;
17016 esac
17017 as_dirs="'$as_qdir' $as_dirs"
17018 as_dir=`$as_dirname -- "$as_dir" ||
17019$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17020 X"$as_dir" : 'X\(//\)[^/]' \| \
17021 X"$as_dir" : 'X\(//\)$' \| \
17022 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17023$as_echo X"$as_dir" |
17024 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17025 s//\1/
17026 q
17027 }
17028 /^X\(\/\/\)[^/].*/{
17029 s//\1/
17030 q
17031 }
17032 /^X\(\/\/\)$/{
17033 s//\1/
17034 q
17035 }
17036 /^X\(\/\).*/{
17037 s//\1/
17038 q
17039 }
17040 s/.*/./; q'`
17041 test -d "$as_dir" && break
17042 done
17043 test -z "$as_dirs" || eval "mkdir $as_dirs"
17044 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17045
bec39cab 17046
81ecdfbb 17047} # as_fn_mkdir_p
bec39cab 17048if mkdir -p . 2>/dev/null; then
81ecdfbb 17049 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17050else
17051 test -d ./-p && rmdir ./-p
17052 as_mkdir_p=false
17053fi
17054
81ecdfbb
RW
17055if test -x / >/dev/null 2>&1; then
17056 as_test_x='test -x'
17057else
17058 if ls -dL / >/dev/null 2>&1; then
17059 as_ls_L_option=L
17060 else
17061 as_ls_L_option=
17062 fi
17063 as_test_x='
17064 eval sh -c '\''
17065 if test -d "$1"; then
17066 test -d "$1/.";
17067 else
17068 case $1 in #(
17069 -*)set "./$1";;
17070 esac;
17071 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17072 ???[sx]*):;;*)false;;esac;fi
17073 '\'' sh
17074 '
17075fi
17076as_executable_p=$as_test_x
bec39cab
AC
17077
17078# Sed expression to map a string onto a valid CPP name.
17079as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17080
17081# Sed expression to map a string onto a valid variable name.
17082as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17083
17084
bec39cab 17085exec 6>&1
81ecdfbb
RW
17086## ----------------------------------- ##
17087## Main body of $CONFIG_STATUS script. ##
17088## ----------------------------------- ##
17089_ASEOF
17090test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17091
17092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17093# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17094# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17095# values after options handling.
17096ac_log="
bec39cab 17097This file was extended by $as_me, which was
81ecdfbb 17098generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17099
17100 CONFIG_FILES = $CONFIG_FILES
17101 CONFIG_HEADERS = $CONFIG_HEADERS
17102 CONFIG_LINKS = $CONFIG_LINKS
17103 CONFIG_COMMANDS = $CONFIG_COMMANDS
17104 $ $0 $@
17105
81ecdfbb
RW
17106on `(hostname || uname -n) 2>/dev/null | sed 1q`
17107"
17108
bec39cab
AC
17109_ACEOF
17110
81ecdfbb
RW
17111case $ac_config_files in *"
17112"*) set x $ac_config_files; shift; ac_config_files=$*;;
17113esac
234b45d4 17114
81ecdfbb
RW
17115case $ac_config_headers in *"
17116"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17117esac
b4e70030 17118
b4e70030 17119
81ecdfbb
RW
17120cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17121# Files that config.status was made for.
17122config_files="$ac_config_files"
17123config_headers="$ac_config_headers"
17124config_links="$ac_config_links"
17125config_commands="$ac_config_commands"
234b45d4 17126
81ecdfbb 17127_ACEOF
b4e70030 17128
81ecdfbb 17129cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17130ac_cs_usage="\
81ecdfbb
RW
17131\`$as_me' instantiates files and other configuration actions
17132from templates according to the current configuration. Unless the files
17133and actions are specified as TAGs, all are instantiated by default.
234b45d4 17134
81ecdfbb 17135Usage: $0 [OPTION]... [TAG]...
234b45d4 17136
bec39cab 17137 -h, --help print this help, then exit
81ecdfbb
RW
17138 -V, --version print version number and configuration settings, then exit
17139 -q, --quiet, --silent
17140 do not print progress messages
bec39cab
AC
17141 -d, --debug don't remove temporary files
17142 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17143 --file=FILE[:TEMPLATE]
17144 instantiate the configuration file FILE
17145 --header=FILE[:TEMPLATE]
17146 instantiate the configuration header FILE
234b45d4 17147
bec39cab
AC
17148Configuration files:
17149$config_files
234b45d4 17150
bec39cab
AC
17151Configuration headers:
17152$config_headers
234b45d4 17153
bec39cab
AC
17154Configuration links:
17155$config_links
234b45d4 17156
bec39cab
AC
17157Configuration commands:
17158$config_commands
17159
81ecdfbb 17160Report bugs to the package provider."
b4e70030 17161
81ecdfbb
RW
17162_ACEOF
17163cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17164ac_cs_version="\\
17165config.status
81ecdfbb
RW
17166configured by $0, generated by GNU Autoconf 2.64,
17167 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17168
81ecdfbb 17169Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17170This config.status script is free software; the Free Software Foundation
17171gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17172
17173ac_pwd='$ac_pwd'
17174srcdir='$srcdir'
17175INSTALL='$INSTALL'
81ecdfbb
RW
17176AWK='$AWK'
17177test -n "\$AWK" || AWK=awk
bec39cab
AC
17178_ACEOF
17179
81ecdfbb
RW
17180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17181# The default lists apply if the user does not specify any file.
bec39cab
AC
17182ac_need_defaults=:
17183while test $# != 0
17184do
17185 case $1 in
17186 --*=*)
81ecdfbb
RW
17187 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17188 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17189 ac_shift=:
c906108c 17190 ;;
81ecdfbb 17191 *)
bec39cab
AC
17192 ac_option=$1
17193 ac_optarg=$2
17194 ac_shift=shift
c906108c 17195 ;;
bec39cab 17196 esac
c906108c 17197
bec39cab
AC
17198 case $ac_option in
17199 # Handling of the options.
bec39cab
AC
17200 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17201 ac_cs_recheck=: ;;
81ecdfbb
RW
17202 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17203 $as_echo "$ac_cs_version"; exit ;;
17204 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17205 debug=: ;;
17206 --file | --fil | --fi | --f )
17207 $ac_shift
81ecdfbb
RW
17208 case $ac_optarg in
17209 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17210 esac
17211 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17212 ac_need_defaults=false;;
17213 --header | --heade | --head | --hea )
17214 $ac_shift
81ecdfbb
RW
17215 case $ac_optarg in
17216 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17217 esac
17218 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17219 ac_need_defaults=false;;
81ecdfbb
RW
17220 --he | --h)
17221 # Conflict between --help and --header
17222 as_fn_error "ambiguous option: \`$1'
17223Try \`$0 --help' for more information.";;
17224 --help | --hel | -h )
17225 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17226 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17227 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17228 ac_cs_silent=: ;;
c906108c 17229
bec39cab 17230 # This is an error.
81ecdfbb
RW
17231 -*) as_fn_error "unrecognized option: \`$1'
17232Try \`$0 --help' for more information." ;;
c906108c 17233
81ecdfbb
RW
17234 *) as_fn_append ac_config_targets " $1"
17235 ac_need_defaults=false ;;
c906108c 17236
bec39cab
AC
17237 esac
17238 shift
17239done
c906108c 17240
bec39cab 17241ac_configure_extra_args=
c906108c 17242
bec39cab
AC
17243if $ac_cs_silent; then
17244 exec 6>/dev/null
17245 ac_configure_extra_args="$ac_configure_extra_args --silent"
17246fi
c906108c 17247
bec39cab 17248_ACEOF
81ecdfbb 17249cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17250if \$ac_cs_recheck; then
81ecdfbb
RW
17251 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17252 shift
17253 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17254 CONFIG_SHELL='$SHELL'
17255 export CONFIG_SHELL
17256 exec "\$@"
bec39cab
AC
17257fi
17258
17259_ACEOF
81ecdfbb
RW
17260cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17261exec 5>>config.log
17262{
17263 echo
17264 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17265## Running $as_me. ##
17266_ASBOX
17267 $as_echo "$ac_log"
17268} >&5
bec39cab 17269
81ecdfbb
RW
17270_ACEOF
17271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17272#
81ecdfbb 17273# INIT-COMMANDS
c906108c 17274#
a417dc56 17275ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17276
bec39cab
AC
17277_ACEOF
17278
81ecdfbb 17279cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17280
81ecdfbb 17281# Handling of arguments.
bec39cab 17282for ac_config_target in $ac_config_targets
c906108c 17283do
81ecdfbb
RW
17284 case $ac_config_target in
17285 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17286 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17287 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17288 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17289 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17290 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17291 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17292 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17293 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17294 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17295
17296 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17297 esac
17298done
17299
81ecdfbb 17300
bec39cab
AC
17301# If the user did not use the arguments to specify the items to instantiate,
17302# then the envvar interface is used. Set only those that are not.
17303# We use the long form for the default assignment because of an extremely
17304# bizarre bug on SunOS 4.1.3.
17305if $ac_need_defaults; then
17306 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17307 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17308 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17309 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17310fi
17311
b4e70030 17312# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17313# simply because there is no reason against having it here, and in addition,
b4e70030 17314# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17315# Hook for its removal unless debugging.
17316# Note that there is a small window in which the directory will not be cleaned:
17317# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17318$debug ||
17319{
81ecdfbb
RW
17320 tmp=
17321 trap 'exit_status=$?
17322 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17323' 0
17324 trap 'as_fn_exit 1' 1 2 13 15
17325}
17326# Create a (secure) tmp directory for tmp files.
17327
17328{
17329 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17330 test -n "$tmp" && test -d "$tmp"
17331} ||
17332{
17333 tmp=./conf$$-$RANDOM
17334 (umask 077 && mkdir "$tmp")
17335} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17336
17337# Set up the scripts for CONFIG_FILES section.
17338# No need to generate them if there are no CONFIG_FILES.
17339# This happens for instance with `./config.status config.h'.
17340if test -n "$CONFIG_FILES"; then
17341
17342if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17343 ac_cs_awk_getline=:
17344 ac_cs_awk_pipe_init=
17345 ac_cs_awk_read_file='
17346 while ((getline aline < (F[key])) > 0)
17347 print(aline)
17348 close(F[key])'
17349 ac_cs_awk_pipe_fini=
17350else
17351 ac_cs_awk_getline=false
17352 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17353 ac_cs_awk_read_file='
17354 print "|#_!!_#|"
17355 print "cat " F[key] " &&"
17356 '$ac_cs_awk_pipe_init
17357 # The final `:' finishes the AND list.
17358 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17359fi
17360ac_cr=`echo X | tr X '\015'`
17361# On cygwin, bash can eat \r inside `` if the user requested igncr.
17362# But we know of no other shell where ac_cr would be empty at this
17363# point, so we can use a bashism as a fallback.
17364if test "x$ac_cr" = x; then
17365 eval ac_cr=\$\'\\r\'
17366fi
17367ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17368if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17369 ac_cs_awk_cr='\r'
17370else
17371 ac_cs_awk_cr=$ac_cr
17372fi
17373
17374echo 'BEGIN {' >"$tmp/subs1.awk" &&
17375_ACEOF
17376
17377# Create commands to substitute file output variables.
17378{
17379 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17380 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17381 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17382 echo "_ACAWK" &&
17383 echo "_ACEOF"
17384} >conf$$files.sh &&
17385. ./conf$$files.sh ||
17386 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17387rm -f conf$$files.sh
17388
17389{
17390 echo "cat >conf$$subs.awk <<_ACEOF" &&
17391 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17392 echo "_ACEOF"
17393} >conf$$subs.sh ||
17394 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17395ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17396ac_delim='%!_!# '
17397for ac_last_try in false false false false false :; do
17398 . ./conf$$subs.sh ||
17399 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17400
17401 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17402 if test $ac_delim_n = $ac_delim_num; then
17403 break
17404 elif $ac_last_try; then
17405 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17406 else
17407 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17408 fi
17409done
17410rm -f conf$$subs.sh
17411
17412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17413cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17414_ACEOF
17415sed -n '
17416h
17417s/^/S["/; s/!.*/"]=/
17418p
17419g
17420s/^[^!]*!//
17421:repl
17422t repl
17423s/'"$ac_delim"'$//
17424t delim
17425:nl
17426h
17427s/\(.\{148\}\).*/\1/
17428t more1
17429s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17430p
17431n
17432b repl
17433:more1
17434s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17435p
17436g
17437s/.\{148\}//
17438t nl
17439:delim
17440h
17441s/\(.\{148\}\).*/\1/
17442t more2
17443s/["\\]/\\&/g; s/^/"/; s/$/"/
17444p
17445b
17446:more2
17447s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17448p
17449g
17450s/.\{148\}//
17451t delim
17452' <conf$$subs.awk | sed '
17453/^[^""]/{
17454 N
17455 s/\n//
17456}
17457' >>$CONFIG_STATUS || ac_write_fail=1
17458rm -f conf$$subs.awk
17459cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17460_ACAWK
17461cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17462 for (key in S) S_is_set[key] = 1
17463 FS = "\a"
17464 \$ac_cs_awk_pipe_init
17465}
17466{
17467 line = $ 0
17468 nfields = split(line, field, "@")
17469 substed = 0
17470 len = length(field[1])
17471 for (i = 2; i < nfields; i++) {
17472 key = field[i]
17473 keylen = length(key)
17474 if (S_is_set[key]) {
17475 value = S[key]
17476 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17477 len += length(value) + length(field[++i])
17478 substed = 1
17479 } else
17480 len += 1 + keylen
17481 }
17482 if (nfields == 3 && !substed) {
17483 key = field[2]
17484 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17485 \$ac_cs_awk_read_file
17486 next
17487 }
17488 }
17489 print line
b4e70030 17490}
81ecdfbb
RW
17491\$ac_cs_awk_pipe_fini
17492_ACAWK
17493_ACEOF
17494cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17495if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17496 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17497else
17498 cat
17499fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17500 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17501_ACEOF
17502
17503# VPATH may cause trouble with some makes, so we remove $(srcdir),
17504# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17505# trailing colons and then remove the whole line if VPATH becomes empty
17506# (actually we leave an empty line to preserve line numbers).
17507if test "x$srcdir" = x.; then
17508 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17509s/:*\$(srcdir):*/:/
17510s/:*\${srcdir}:*/:/
17511s/:*@srcdir@:*/:/
17512s/^\([^=]*=[ ]*\):*/\1/
17513s/:*$//
17514s/^[^=]*=[ ]*$//
17515}'
17516fi
17517
17518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17519fi # test -n "$CONFIG_FILES"
17520
17521# Set up the scripts for CONFIG_HEADERS section.
17522# No need to generate them if there are no CONFIG_HEADERS.
17523# This happens for instance with `./config.status Makefile'.
17524if test -n "$CONFIG_HEADERS"; then
17525cat >"$tmp/defines.awk" <<\_ACAWK ||
17526BEGIN {
17527_ACEOF
17528
17529# Transform confdefs.h into an awk script `defines.awk', embedded as
17530# here-document in config.status, that substitutes the proper values into
17531# config.h.in to produce config.h.
4e8d927d 17532
81ecdfbb
RW
17533# Create a delimiter string that does not exist in confdefs.h, to ease
17534# handling of long lines.
17535ac_delim='%!_!# '
17536for ac_last_try in false false :; do
17537 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17538 if test -z "$ac_t"; then
17539 break
17540 elif $ac_last_try; then
17541 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17542 else
17543 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17544 fi
17545done
4e8d927d 17546
81ecdfbb
RW
17547# For the awk script, D is an array of macro values keyed by name,
17548# likewise P contains macro parameters if any. Preserve backslash
17549# newline sequences.
17550
17551ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17552sed -n '
17553s/.\{148\}/&'"$ac_delim"'/g
17554t rset
17555:rset
17556s/^[ ]*#[ ]*define[ ][ ]*/ /
17557t def
17558d
17559:def
17560s/\\$//
17561t bsnl
17562s/["\\]/\\&/g
17563s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17564D["\1"]=" \3"/p
17565s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17566d
17567:bsnl
17568s/["\\]/\\&/g
17569s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17570D["\1"]=" \3\\\\\\n"\\/p
17571t cont
17572s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17573t cont
17574d
17575:cont
17576n
17577s/.\{148\}/&'"$ac_delim"'/g
17578t clear
17579:clear
17580s/\\$//
17581t bsnlc
17582s/["\\]/\\&/g; s/^/"/; s/$/"/p
17583d
17584:bsnlc
17585s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17586b cont
17587' <confdefs.h | sed '
17588s/'"$ac_delim"'/"\\\
17589"/g' >>$CONFIG_STATUS || ac_write_fail=1
17590
17591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17592 for (key in D) D_is_set[key] = 1
17593 FS = "\a"
17594}
17595/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17596 line = \$ 0
17597 split(line, arg, " ")
17598 if (arg[1] == "#") {
17599 defundef = arg[2]
17600 mac1 = arg[3]
17601 } else {
17602 defundef = substr(arg[1], 2)
17603 mac1 = arg[2]
17604 }
17605 split(mac1, mac2, "(") #)
17606 macro = mac2[1]
17607 prefix = substr(line, 1, index(line, defundef) - 1)
17608 if (D_is_set[macro]) {
17609 # Preserve the white space surrounding the "#".
17610 print prefix "define", macro P[macro] D[macro]
17611 next
17612 } else {
17613 # Replace #undef with comments. This is necessary, for example,
17614 # in the case of _POSIX_SOURCE, which is predefined and required
17615 # on some systems where configure will not decide to define it.
17616 if (defundef == "undef") {
17617 print "/*", prefix defundef, macro, "*/"
17618 next
17619 }
17620 }
b4e70030 17621}
81ecdfbb
RW
17622{ print }
17623_ACAWK
b4e70030 17624_ACEOF
81ecdfbb
RW
17625cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17626 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17627fi # test -n "$CONFIG_HEADERS"
4e8d927d 17628
4e8d927d 17629
81ecdfbb
RW
17630eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17631shift
17632for ac_tag
17633do
17634 case $ac_tag in
17635 :[FHLC]) ac_mode=$ac_tag; continue;;
17636 esac
17637 case $ac_mode$ac_tag in
17638 :[FHL]*:*);;
17639 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17640 :[FH]-) ac_tag=-:-;;
17641 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17642 esac
17643 ac_save_IFS=$IFS
17644 IFS=:
17645 set x $ac_tag
17646 IFS=$ac_save_IFS
17647 shift
17648 ac_file=$1
17649 shift
4e8d927d 17650
81ecdfbb
RW
17651 case $ac_mode in
17652 :L) ac_source=$1;;
17653 :[FH])
17654 ac_file_inputs=
17655 for ac_f
17656 do
17657 case $ac_f in
17658 -) ac_f="$tmp/stdin";;
17659 *) # Look for the file first in the build tree, then in the source tree
17660 # (if the path is not absolute). The absolute path cannot be DOS-style,
17661 # because $ac_f cannot contain `:'.
17662 test -f "$ac_f" ||
17663 case $ac_f in
17664 [\\/$]*) false;;
17665 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17666 esac ||
17667 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17668 esac
17669 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17670 as_fn_append ac_file_inputs " '$ac_f'"
17671 done
17672
17673 # Let's still pretend it is `configure' which instantiates (i.e., don't
17674 # use $as_me), people would be surprised to read:
17675 # /* config.h. Generated by config.status. */
17676 configure_input='Generated from '`
17677 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17678 `' by configure.'
17679 if test x"$ac_file" != x-; then
17680 configure_input="$ac_file. $configure_input"
17681 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17682$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17683 fi
81ecdfbb
RW
17684 # Neutralize special characters interpreted by sed in replacement strings.
17685 case $configure_input in #(
17686 *\&* | *\|* | *\\* )
17687 ac_sed_conf_input=`$as_echo "$configure_input" |
17688 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17689 *) ac_sed_conf_input=$configure_input;;
17690 esac
4e8d927d 17691
81ecdfbb
RW
17692 case $ac_tag in
17693 *:-:* | *:-) cat >"$tmp/stdin" \
17694 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17695 esac
17696 ;;
c906108c
SS
17697 esac
17698
81ecdfbb 17699 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17700$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17701 X"$ac_file" : 'X\(//\)[^/]' \| \
17702 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17703 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17704$as_echo X"$ac_file" |
17705 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17706 s//\1/
17707 q
17708 }
17709 /^X\(\/\/\)[^/].*/{
17710 s//\1/
17711 q
17712 }
17713 /^X\(\/\/\)$/{
17714 s//\1/
17715 q
17716 }
17717 /^X\(\/\).*/{
17718 s//\1/
17719 q
17720 }
17721 s/.*/./; q'`
17722 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17723 ac_builddir=.
17724
81ecdfbb
RW
17725case "$ac_dir" in
17726.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17727*)
17728 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17729 # A ".." for each directory in $ac_dir_suffix.
17730 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17731 case $ac_top_builddir_sub in
17732 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17733 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17734 esac ;;
17735esac
17736ac_abs_top_builddir=$ac_pwd
17737ac_abs_builddir=$ac_pwd$ac_dir_suffix
17738# for backward compatibility:
17739ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17740
17741case $srcdir in
81ecdfbb 17742 .) # We are building in place.
bec39cab 17743 ac_srcdir=.
81ecdfbb
RW
17744 ac_top_srcdir=$ac_top_builddir_sub
17745 ac_abs_top_srcdir=$ac_pwd ;;
17746 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17747 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17748 ac_top_srcdir=$srcdir
17749 ac_abs_top_srcdir=$srcdir ;;
17750 *) # Relative name.
17751 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17752 ac_top_srcdir=$ac_top_build_prefix$srcdir
17753 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17754esac
81ecdfbb 17755ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17756
c906108c 17757
81ecdfbb
RW
17758 case $ac_mode in
17759 :F)
17760 #
17761 # CONFIG_FILE
17762 #
c906108c 17763
bec39cab
AC
17764 case $INSTALL in
17765 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17766 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17767 esac
81ecdfbb 17768_ACEOF
121ce6e5 17769
81ecdfbb
RW
17770cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17771# If the template does not know about datarootdir, expand it.
17772# FIXME: This hack should be removed a few years after 2.60.
17773ac_datarootdir_hack=; ac_datarootdir_seen=
17774ac_sed_dataroot='
17775/datarootdir/ {
17776 p
17777 q
17778}
17779/@datadir@/p
17780/@docdir@/p
17781/@infodir@/p
17782/@localedir@/p
17783/@mandir@/p'
17784case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17785*datarootdir*) ac_datarootdir_seen=yes;;
17786*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17788$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17789_ACEOF
17790cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17791 ac_datarootdir_hack='
17792 s&@datadir@&$datadir&g
17793 s&@docdir@&$docdir&g
17794 s&@infodir@&$infodir&g
17795 s&@localedir@&$localedir&g
17796 s&@mandir@&$mandir&g
17797 s&\\\${datarootdir}&$datarootdir&g' ;;
17798esac
4e8d927d 17799_ACEOF
81ecdfbb
RW
17800
17801# Neutralize VPATH when `$srcdir' = `.'.
17802# Shell code in configure.ac might set extrasub.
17803# FIXME: do we really want to maintain this feature?
17804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17805ac_sed_extra="$ac_vpsub
bec39cab
AC
17806$extrasub
17807_ACEOF
81ecdfbb 17808cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17809:t
17810/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17811s|@configure_input@|$ac_sed_conf_input|;t t
17812s&@top_builddir@&$ac_top_builddir_sub&;t t
17813s&@top_build_prefix@&$ac_top_build_prefix&;t t
17814s&@srcdir@&$ac_srcdir&;t t
17815s&@abs_srcdir@&$ac_abs_srcdir&;t t
17816s&@top_srcdir@&$ac_top_srcdir&;t t
17817s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17818s&@builddir@&$ac_builddir&;t t
17819s&@abs_builddir@&$ac_abs_builddir&;t t
17820s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17821s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17822$ac_datarootdir_hack
17823"
17824eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17825if $ac_cs_awk_getline; then
17826 $AWK -f "$tmp/subs.awk"
17827else
17828 $AWK -f "$tmp/subs.awk" | $SHELL
17829fi >$tmp/out \
17830 || as_fn_error "could not create $ac_file" "$LINENO" 5
17831
17832test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17833 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17834 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17836which seems to be undefined. Please make sure it is defined." >&5
17837$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17838which seems to be undefined. Please make sure it is defined." >&2;}
17839
17840 rm -f "$tmp/stdin"
bec39cab 17841 case $ac_file in
81ecdfbb
RW
17842 -) cat "$tmp/out" && rm -f "$tmp/out";;
17843 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17844 esac \
17845 || as_fn_error "could not create $ac_file" "$LINENO" 5
17846 ;;
17847 :H)
17848 #
17849 # CONFIG_HEADER
17850 #
bec39cab 17851 if test x"$ac_file" != x-; then
81ecdfbb
RW
17852 {
17853 $as_echo "/* $configure_input */" \
17854 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17855 } >"$tmp/config.h" \
17856 || as_fn_error "could not create $ac_file" "$LINENO" 5
17857 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17859$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17860 else
81ecdfbb
RW
17861 rm -f "$ac_file"
17862 mv "$tmp/config.h" "$ac_file" \
17863 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17864 fi
17865 else
81ecdfbb
RW
17866 $as_echo "/* $configure_input */" \
17867 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17868 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17869 fi
81ecdfbb
RW
17870 ;;
17871 :L)
17872 #
17873 # CONFIG_LINK
17874 #
c906108c 17875
81ecdfbb
RW
17876 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17877 :
b4e70030 17878 else
81ecdfbb
RW
17879 # Prefer the file from the source tree if names are identical.
17880 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17881 ac_source=$srcdir/$ac_source
17882 fi
b4e70030 17883
81ecdfbb
RW
17884 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17885$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17886
81ecdfbb
RW
17887 if test ! -r "$ac_source"; then
17888 as_fn_error "$ac_source: file not found" "$LINENO" 5
17889 fi
17890 rm -f "$ac_file"
bec39cab 17891
81ecdfbb
RW
17892 # Try a relative symlink, then a hard link, then a copy.
17893 case $srcdir in
17894 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17895 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17896 esac
17897 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17898 ln "$ac_source" "$ac_file" 2>/dev/null ||
17899 cp -p "$ac_source" "$ac_file" ||
17900 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17901 fi
17902 ;;
17903 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17904$as_echo "$as_me: executing $ac_file commands" >&6;}
17905 ;;
c906108c 17906 esac
b4e70030 17907
bec39cab 17908
81ecdfbb
RW
17909 case $ac_file$ac_mode in
17910 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17911 "gcore":F) chmod +x gcore ;;
81ecdfbb 17912 "default":C)
c906108c
SS
17913case x$CONFIG_HEADERS in
17914xconfig.h:config.in)
17915echo > stamp-h ;;
17916esac
bec39cab 17917 ;;
81ecdfbb 17918
bec39cab 17919 esac
81ecdfbb 17920done # for ac_tag
c906108c 17921
bec39cab 17922
81ecdfbb 17923as_fn_exit 0
bec39cab 17924_ACEOF
bec39cab
AC
17925ac_clean_files=$ac_clean_files_save
17926
81ecdfbb
RW
17927test $ac_write_fail = 0 ||
17928 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17929
bec39cab
AC
17930
17931# configure is writing to config.log, and then calls config.status.
17932# config.status does its own redirection, appending to config.log.
17933# Unfortunately, on DOS this fails, as config.log is still kept open
17934# by configure, so config.status won't be able to write to it; its
17935# output is simply discarded. So we exec the FD to /dev/null,
17936# effectively closing config.log, so it can be properly (re)opened and
17937# appended to by config.status. When coming back to configure, we
17938# need to make the FD available again.
17939if test "$no_create" != yes; then
17940 ac_cs_success=:
17941 ac_config_status_args=
17942 test "$silent" = yes &&
17943 ac_config_status_args="$ac_config_status_args --quiet"
17944 exec 5>/dev/null
17945 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17946 exec 5>>config.log
17947 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17948 # would make configure fail if this is the last instruction.
81ecdfbb 17949 $ac_cs_success || as_fn_exit $?
bec39cab 17950fi
c906108c 17951
bec39cab 17952#
81ecdfbb 17953# CONFIG_SUBDIRS section.
bec39cab 17954#
c906108c
SS
17955if test "$no_recursion" != yes; then
17956
81ecdfbb
RW
17957 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17958 # so they do not pile up.
c906108c
SS
17959 ac_sub_configure_args=
17960 ac_prev=
fdc59709
PB
17961 eval "set x $ac_configure_args"
17962 shift
17963 for ac_arg
17964 do
c906108c
SS
17965 if test -n "$ac_prev"; then
17966 ac_prev=
17967 continue
17968 fi
bec39cab 17969 case $ac_arg in
c906108c
SS
17970 -cache-file | --cache-file | --cache-fil | --cache-fi \
17971 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17972 ac_prev=cache_file ;;
17973 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17974 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17975 | --c=*)
17976 ;;
17977 --config-cache | -C)
c906108c
SS
17978 ;;
17979 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17980 ac_prev=srcdir ;;
17981 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17982 ;;
bec39cab
AC
17983 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17984 ac_prev=prefix ;;
17985 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17986 ;;
81ecdfbb
RW
17987 --disable-option-checking)
17988 ;;
fdc59709
PB
17989 *)
17990 case $ac_arg in
81ecdfbb 17991 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17992 esac
81ecdfbb 17993 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17994 esac
17995 done
17996
bec39cab
AC
17997 # Always prepend --prefix to ensure using the same prefix
17998 # in subdir configurations.
fdc59709
PB
17999 ac_arg="--prefix=$prefix"
18000 case $ac_arg in
81ecdfbb 18001 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18002 esac
81ecdfbb
RW
18003 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18004
18005 # Pass --silent
18006 if test "$silent" = yes; then
18007 ac_sub_configure_args="--silent $ac_sub_configure_args"
18008 fi
18009
18010 # Always prepend --disable-option-checking to silence warnings, since
18011 # different subdirs can have different --enable and --with options.
18012 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18013
b4e70030 18014 ac_popdir=`pwd`
bec39cab 18015 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18016
18017 # Do not complain, so a configure script can configure whichever
18018 # parts of a large source tree are present.
fdc59709 18019 test -d "$srcdir/$ac_dir" || continue
c906108c 18020
81ecdfbb
RW
18021 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18022 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18023 $as_echo "$ac_msg" >&6
18024 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18025 ac_builddir=.
18026
81ecdfbb
RW
18027case "$ac_dir" in
18028.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18029*)
18030 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18031 # A ".." for each directory in $ac_dir_suffix.
18032 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18033 case $ac_top_builddir_sub in
18034 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18035 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18036 esac ;;
18037esac
18038ac_abs_top_builddir=$ac_pwd
18039ac_abs_builddir=$ac_pwd$ac_dir_suffix
18040# for backward compatibility:
18041ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18042
18043case $srcdir in
81ecdfbb 18044 .) # We are building in place.
bec39cab 18045 ac_srcdir=.
81ecdfbb
RW
18046 ac_top_srcdir=$ac_top_builddir_sub
18047 ac_abs_top_srcdir=$ac_pwd ;;
18048 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18049 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18050 ac_top_srcdir=$srcdir
18051 ac_abs_top_srcdir=$srcdir ;;
18052 *) # Relative name.
18053 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18054 ac_top_srcdir=$ac_top_build_prefix$srcdir
18055 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18056esac
81ecdfbb 18057ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18058
c906108c 18059
fdc59709 18060 cd "$ac_dir"
c906108c
SS
18061
18062 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18063 if test -f "$ac_srcdir/configure.gnu"; then
18064 ac_sub_configure=$ac_srcdir/configure.gnu
18065 elif test -f "$ac_srcdir/configure"; then
18066 ac_sub_configure=$ac_srcdir/configure
18067 elif test -f "$ac_srcdir/configure.in"; then
18068 # This should be Cygnus configure.
18069 ac_sub_configure=$ac_aux_dir/configure
c906108c 18070 else
81ecdfbb
RW
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18072$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18073 ac_sub_configure=
18074 fi
18075
18076 # The recursion is here.
18077 if test -n "$ac_sub_configure"; then
c906108c 18078 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18079 case $cache_file in
18080 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18081 *) # Relative name.
18082 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18083 esac
c906108c 18084
81ecdfbb
RW
18085 { $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
18086$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18087 # The eval makes quoting arguments work.
fdc59709
PB
18088 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18089 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18090 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18091 fi
18092
fdc59709 18093 cd "$ac_popdir"
c906108c
SS
18094 done
18095fi
81ecdfbb
RW
18096if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18098$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18099fi
c906108c
SS
18100
18101
18102exit 0
This page took 3.928967 seconds and 4 git commands to generate.