[gdb] Fix -Wparentheses warnings
[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
a994041d 734COMPILER_CFLAGS
3bc3d82a 735COMPILER
4869db5e
RM
736INSTALL_STRIP_PROGRAM
737STRIP
738install_sh
81ecdfbb
RW
739target_os
740target_vendor
741target_cpu
742target
743host_os
744host_vendor
745host_cpu
746host
747build_os
748build_vendor
749build_cpu
750build
c971b7fa
PA
751EGREP
752GREP
753CPP
3bc3d82a
PA
754ac_ct_CXX
755CXXFLAGS
756CXX
81ecdfbb
RW
757OBJEXT
758EXEEXT
759ac_ct_CC
760CPPFLAGS
761LDFLAGS
762CFLAGS
763CC
764MAINT
765MAINTAINER_MODE_FALSE
766MAINTAINER_MODE_TRUE
767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
a4ce5b0d 805ac_subst_files='host_makefile_frag'
81ecdfbb
RW
806ac_user_opts='
807enable_option_checking
808enable_maintainer_mode
da2f07f1
JK
809enable_plugins
810enable_largefile
3bc3d82a 811enable_build_with_cxx
81ecdfbb
RW
812with_separate_debug_dir
813with_gdb_datadir
814with_relocated_sources
7349ff92 815with_auto_load_dir
bccbefd2 816with_auto_load_safe_path
81ecdfbb
RW
817enable_targets
818enable_64_bit_bfd
819enable_gdbcli
820enable_gdbmi
821enable_tui
822enable_gdbtk
05e7c244 823with_libunwind_ia64
81ecdfbb
RW
824with_curses
825enable_profiling
826with_pkgversion
827with_bugurl
711a72d3 828with_system_zlib
016a3251
DD
829with_gnu_ld
830enable_rpath
81ecdfbb 831with_libiconv_prefix
478aac75 832with_iconv_bin
81ecdfbb 833with_system_readline
b8e0a31c 834with_jit_reader_dir
81ecdfbb 835with_expat
81ecdfbb
RW
836with_libexpat_prefix
837with_python
ed3ef339 838with_guile
a8db4212 839enable_libmcheck
58bfce93
MM
840with_intel_pt
841with_libipt_prefix
81ecdfbb
RW
842with_included_regex
843with_sysroot
844with_system_gdbinit
845enable_werror
846enable_build_warnings
847enable_gdb_build_warnings
608e2dbb
TT
848with_lzma
849with_liblzma_prefix
81ecdfbb
RW
850with_tcl
851with_tk
852with_x
853enable_sim
854enable_multi_ice
496c0e1b 855enable_gdbserver
393fd4c3
YQ
856with_babeltrace
857with_libbabeltrace_prefix
81ecdfbb
RW
858'
859 ac_precious_vars='build_alias
860host_alias
861target_alias
862CC
863CFLAGS
864LDFLAGS
865LIBS
866CPPFLAGS
3bc3d82a
PA
867CXX
868CXXFLAGS
869CCC
81ecdfbb 870CPP
f06e05e0
JK
871MAKEINFO
872MAKEINFOFLAGS
81ecdfbb
RW
873YACC
874YFLAGS
875XMKMF'
5ae98d25 876ac_subdirs_all='testsuite
81ecdfbb
RW
877gdbtk
878multi-ice
879gdbserver'
c906108c
SS
880
881# Initialize some variables set by options.
bec39cab
AC
882ac_init_help=
883ac_init_version=false
81ecdfbb
RW
884ac_unrecognized_opts=
885ac_unrecognized_sep=
c906108c
SS
886# The variables have the same names as the options, with
887# dashes changed to underlines.
bec39cab 888cache_file=/dev/null
c906108c 889exec_prefix=NONE
c906108c 890no_create=
c906108c
SS
891no_recursion=
892prefix=NONE
893program_prefix=NONE
894program_suffix=NONE
895program_transform_name=s,x,x,
896silent=
897site=
898srcdir=
c906108c
SS
899verbose=
900x_includes=NONE
901x_libraries=NONE
bec39cab
AC
902
903# Installation directory options.
904# These are left unexpanded so users can "make install exec_prefix=/foo"
905# and all the variables that are supposed to be based on exec_prefix
906# by default will actually change.
907# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 908# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
909bindir='${exec_prefix}/bin'
910sbindir='${exec_prefix}/sbin'
911libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
912datarootdir='${prefix}/share'
913datadir='${datarootdir}'
c906108c
SS
914sysconfdir='${prefix}/etc'
915sharedstatedir='${prefix}/com'
916localstatedir='${prefix}/var'
c906108c
SS
917includedir='${prefix}/include'
918oldincludedir='/usr/include'
81ecdfbb
RW
919docdir='${datarootdir}/doc/${PACKAGE}'
920infodir='${datarootdir}/info'
921htmldir='${docdir}'
922dvidir='${docdir}'
923pdfdir='${docdir}'
924psdir='${docdir}'
925libdir='${exec_prefix}/lib'
926localedir='${datarootdir}/locale'
927mandir='${datarootdir}/man'
c906108c 928
c906108c 929ac_prev=
81ecdfbb 930ac_dashdash=
c906108c
SS
931for ac_option
932do
c906108c
SS
933 # If the previous option needs an argument, assign it.
934 if test -n "$ac_prev"; then
81ecdfbb 935 eval $ac_prev=\$ac_option
c906108c
SS
936 ac_prev=
937 continue
938 fi
939
81ecdfbb
RW
940 case $ac_option in
941 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
942 *) ac_optarg=yes ;;
943 esac
c906108c
SS
944
945 # Accept the important Cygnus configure options, so we can diagnose typos.
946
81ecdfbb
RW
947 case $ac_dashdash$ac_option in
948 --)
949 ac_dashdash=yes ;;
c906108c
SS
950
951 -bindir | --bindir | --bindi | --bind | --bin | --bi)
952 ac_prev=bindir ;;
953 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 954 bindir=$ac_optarg ;;
c906108c
SS
955
956 -build | --build | --buil | --bui | --bu)
bec39cab 957 ac_prev=build_alias ;;
c906108c 958 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 959 build_alias=$ac_optarg ;;
c906108c
SS
960
961 -cache-file | --cache-file | --cache-fil | --cache-fi \
962 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963 ac_prev=cache_file ;;
964 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
966 cache_file=$ac_optarg ;;
967
968 --config-cache | -C)
969 cache_file=config.cache ;;
c906108c 970
81ecdfbb 971 -datadir | --datadir | --datadi | --datad)
c906108c 972 ac_prev=datadir ;;
81ecdfbb 973 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 974 datadir=$ac_optarg ;;
c906108c 975
81ecdfbb
RW
976 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977 | --dataroo | --dataro | --datar)
978 ac_prev=datarootdir ;;
979 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981 datarootdir=$ac_optarg ;;
982
c906108c 983 -disable-* | --disable-*)
81ecdfbb 984 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 985 # Reject names that are not valid shell variable names.
81ecdfbb
RW
986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
987 as_fn_error "invalid feature name: $ac_useropt"
988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=no ;;
998
999 -docdir | --docdir | --docdi | --doc | --do)
1000 ac_prev=docdir ;;
1001 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1002 docdir=$ac_optarg ;;
1003
1004 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1005 ac_prev=dvidir ;;
1006 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1007 dvidir=$ac_optarg ;;
c906108c
SS
1008
1009 -enable-* | --enable-*)
81ecdfbb 1010 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1011 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1012 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1013 as_fn_error "invalid feature name: $ac_useropt"
1014 ac_useropt_orig=$ac_useropt
1015 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1016 case $ac_user_opts in
1017 *"
1018"enable_$ac_useropt"
1019"*) ;;
1020 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1021 ac_unrecognized_sep=', ';;
b4e70030 1022 esac
81ecdfbb 1023 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1024
1025 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1026 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1027 | --exec | --exe | --ex)
1028 ac_prev=exec_prefix ;;
1029 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1030 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1031 | --exec=* | --exe=* | --ex=*)
bec39cab 1032 exec_prefix=$ac_optarg ;;
c906108c
SS
1033
1034 -gas | --gas | --ga | --g)
1035 # Obsolete; use --with-gas.
1036 with_gas=yes ;;
1037
bec39cab
AC
1038 -help | --help | --hel | --he | -h)
1039 ac_init_help=long ;;
1040 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1041 ac_init_help=recursive ;;
1042 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1043 ac_init_help=short ;;
c906108c
SS
1044
1045 -host | --host | --hos | --ho)
bec39cab 1046 ac_prev=host_alias ;;
c906108c 1047 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1048 host_alias=$ac_optarg ;;
c906108c 1049
81ecdfbb
RW
1050 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1051 ac_prev=htmldir ;;
1052 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1053 | --ht=*)
1054 htmldir=$ac_optarg ;;
1055
c906108c
SS
1056 -includedir | --includedir | --includedi | --included | --include \
1057 | --includ | --inclu | --incl | --inc)
1058 ac_prev=includedir ;;
1059 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1060 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1061 includedir=$ac_optarg ;;
c906108c
SS
1062
1063 -infodir | --infodir | --infodi | --infod | --info | --inf)
1064 ac_prev=infodir ;;
1065 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1066 infodir=$ac_optarg ;;
c906108c
SS
1067
1068 -libdir | --libdir | --libdi | --libd)
1069 ac_prev=libdir ;;
1070 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1071 libdir=$ac_optarg ;;
c906108c
SS
1072
1073 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1074 | --libexe | --libex | --libe)
1075 ac_prev=libexecdir ;;
1076 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1077 | --libexe=* | --libex=* | --libe=*)
bec39cab 1078 libexecdir=$ac_optarg ;;
c906108c 1079
81ecdfbb
RW
1080 -localedir | --localedir | --localedi | --localed | --locale)
1081 ac_prev=localedir ;;
1082 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1083 localedir=$ac_optarg ;;
1084
c906108c 1085 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1086 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1087 ac_prev=localstatedir ;;
1088 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1089 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1090 localstatedir=$ac_optarg ;;
c906108c
SS
1091
1092 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1093 ac_prev=mandir ;;
1094 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1095 mandir=$ac_optarg ;;
c906108c
SS
1096
1097 -nfp | --nfp | --nf)
1098 # Obsolete; use --without-fp.
1099 with_fp=no ;;
1100
1101 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1102 | --no-cr | --no-c | -n)
c906108c
SS
1103 no_create=yes ;;
1104
1105 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1106 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1107 no_recursion=yes ;;
1108
1109 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1110 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1111 | --oldin | --oldi | --old | --ol | --o)
1112 ac_prev=oldincludedir ;;
1113 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1114 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1115 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1116 oldincludedir=$ac_optarg ;;
c906108c
SS
1117
1118 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1119 ac_prev=prefix ;;
1120 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1121 prefix=$ac_optarg ;;
c906108c
SS
1122
1123 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1124 | --program-pre | --program-pr | --program-p)
1125 ac_prev=program_prefix ;;
1126 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1127 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1128 program_prefix=$ac_optarg ;;
c906108c
SS
1129
1130 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1131 | --program-suf | --program-su | --program-s)
1132 ac_prev=program_suffix ;;
1133 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1134 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1135 program_suffix=$ac_optarg ;;
c906108c
SS
1136
1137 -program-transform-name | --program-transform-name \
1138 | --program-transform-nam | --program-transform-na \
1139 | --program-transform-n | --program-transform- \
1140 | --program-transform | --program-transfor \
1141 | --program-transfo | --program-transf \
1142 | --program-trans | --program-tran \
1143 | --progr-tra | --program-tr | --program-t)
1144 ac_prev=program_transform_name ;;
1145 -program-transform-name=* | --program-transform-name=* \
1146 | --program-transform-nam=* | --program-transform-na=* \
1147 | --program-transform-n=* | --program-transform-=* \
1148 | --program-transform=* | --program-transfor=* \
1149 | --program-transfo=* | --program-transf=* \
1150 | --program-trans=* | --program-tran=* \
1151 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1152 program_transform_name=$ac_optarg ;;
c906108c 1153
81ecdfbb
RW
1154 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1155 ac_prev=pdfdir ;;
1156 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1157 pdfdir=$ac_optarg ;;
1158
1159 -psdir | --psdir | --psdi | --psd | --ps)
1160 ac_prev=psdir ;;
1161 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1162 psdir=$ac_optarg ;;
1163
c906108c
SS
1164 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1165 | -silent | --silent | --silen | --sile | --sil)
1166 silent=yes ;;
1167
1168 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1169 ac_prev=sbindir ;;
1170 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1171 | --sbi=* | --sb=*)
bec39cab 1172 sbindir=$ac_optarg ;;
c906108c
SS
1173
1174 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1175 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1176 | --sharedst | --shareds | --shared | --share | --shar \
1177 | --sha | --sh)
1178 ac_prev=sharedstatedir ;;
1179 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1180 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1181 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1182 | --sha=* | --sh=*)
bec39cab 1183 sharedstatedir=$ac_optarg ;;
c906108c
SS
1184
1185 -site | --site | --sit)
1186 ac_prev=site ;;
1187 -site=* | --site=* | --sit=*)
bec39cab 1188 site=$ac_optarg ;;
3ace7edb 1189
c906108c
SS
1190 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1191 ac_prev=srcdir ;;
1192 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1193 srcdir=$ac_optarg ;;
c906108c
SS
1194
1195 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1196 | --syscon | --sysco | --sysc | --sys | --sy)
1197 ac_prev=sysconfdir ;;
1198 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1199 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1200 sysconfdir=$ac_optarg ;;
c906108c
SS
1201
1202 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1203 ac_prev=target_alias ;;
c906108c 1204 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1205 target_alias=$ac_optarg ;;
c906108c
SS
1206
1207 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1208 verbose=yes ;;
1209
bec39cab
AC
1210 -version | --version | --versio | --versi | --vers | -V)
1211 ac_init_version=: ;;
c906108c
SS
1212
1213 -with-* | --with-*)
81ecdfbb 1214 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1215 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1217 as_fn_error "invalid package name: $ac_useropt"
1218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
b4e70030 1226 esac
81ecdfbb 1227 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1228
1229 -without-* | --without-*)
81ecdfbb 1230 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1231 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1232 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233 as_fn_error "invalid package name: $ac_useropt"
1234 ac_useropt_orig=$ac_useropt
1235 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236 case $ac_user_opts in
1237 *"
1238"with_$ac_useropt"
1239"*) ;;
1240 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1241 ac_unrecognized_sep=', ';;
1242 esac
1243 eval with_$ac_useropt=no ;;
c906108c
SS
1244
1245 --x)
1246 # Obsolete; use --with-x.
1247 with_x=yes ;;
1248
1249 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1250 | --x-incl | --x-inc | --x-in | --x-i)
1251 ac_prev=x_includes ;;
1252 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1253 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1254 x_includes=$ac_optarg ;;
c906108c
SS
1255
1256 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1257 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1258 ac_prev=x_libraries ;;
1259 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1260 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1261 x_libraries=$ac_optarg ;;
c906108c 1262
81ecdfbb
RW
1263 -*) as_fn_error "unrecognized option: \`$ac_option'
1264Try \`$0 --help' for more information."
c906108c
SS
1265 ;;
1266
bec39cab
AC
1267 *=*)
1268 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1269 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1270 case $ac_envvar in #(
1271 '' | [0-9]* | *[!_$as_cr_alnum]* )
1272 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1273 esac
1274 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1275 export $ac_envvar ;;
1276
c906108c 1277 *)
bec39cab 1278 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1279 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1280 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1281 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1282 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1283 ;;
1284
1285 esac
1286done
1287
1288if test -n "$ac_prev"; then
bec39cab 1289 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1290 as_fn_error "missing argument to $ac_option"
c906108c 1291fi
c906108c 1292
81ecdfbb
RW
1293if test -n "$ac_unrecognized_opts"; then
1294 case $enable_option_checking in
1295 no) ;;
1296 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1297 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1298 esac
81ecdfbb 1299fi
b4e70030 1300
81ecdfbb
RW
1301# Check all directory arguments for consistency.
1302for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1303 datadir sysconfdir sharedstatedir localstatedir includedir \
1304 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1305 libdir localedir mandir
b4e70030 1306do
81ecdfbb
RW
1307 eval ac_val=\$$ac_var
1308 # Remove trailing slashes.
1309 case $ac_val in
1310 */ )
1311 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1312 eval $ac_var=\$ac_val;;
1313 esac
1314 # Be sure to have absolute directory names.
b4e70030 1315 case $ac_val in
81ecdfbb
RW
1316 [\\/$]* | ?:[\\/]* ) continue;;
1317 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1318 esac
81ecdfbb 1319 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1320done
1321
bec39cab
AC
1322# There might be people who depend on the old broken behavior: `$host'
1323# used to hold the argument of --host etc.
1324# FIXME: To remove some day.
1325build=$build_alias
1326host=$host_alias
1327target=$target_alias
1328
1329# FIXME: To remove some day.
1330if test "x$host_alias" != x; then
1331 if test "x$build_alias" = x; then
1332 cross_compiling=maybe
81ecdfbb 1333 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1334 If a cross compiler is detected then cross compile mode will be used." >&2
1335 elif test "x$build_alias" != "x$host_alias"; then
1336 cross_compiling=yes
1337 fi
1338fi
c906108c 1339
bec39cab
AC
1340ac_tool_prefix=
1341test -n "$host_alias" && ac_tool_prefix=$host_alias-
1342
1343test "$silent" = yes && exec 6>/dev/null
c906108c 1344
c906108c 1345
81ecdfbb
RW
1346ac_pwd=`pwd` && test -n "$ac_pwd" &&
1347ac_ls_di=`ls -di .` &&
1348ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1349 as_fn_error "working directory cannot be determined"
1350test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1351 as_fn_error "pwd does not report name of working directory"
1352
1353
c906108c
SS
1354# Find the source files, if location was not specified.
1355if test -z "$srcdir"; then
1356 ac_srcdir_defaulted=yes
81ecdfbb
RW
1357 # Try the directory containing this script, then the parent directory.
1358 ac_confdir=`$as_dirname -- "$as_myself" ||
1359$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1360 X"$as_myself" : 'X\(//\)[^/]' \| \
1361 X"$as_myself" : 'X\(//\)$' \| \
1362 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1363$as_echo X"$as_myself" |
1364 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\/\)[^/].*/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\/\)$/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\).*/{
1377 s//\1/
1378 q
1379 }
1380 s/.*/./; q'`
c906108c 1381 srcdir=$ac_confdir
81ecdfbb 1382 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1383 srcdir=..
1384 fi
1385else
1386 ac_srcdir_defaulted=no
1387fi
81ecdfbb
RW
1388if test ! -r "$srcdir/$ac_unique_file"; then
1389 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1390 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1391fi
1392ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1393ac_abs_confdir=`(
1394 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1395 pwd)`
1396# When building in place, set srcdir=.
1397if test "$ac_abs_confdir" = "$ac_pwd"; then
1398 srcdir=.
1399fi
1400# Remove unnecessary trailing slashes from srcdir.
1401# Double slashes in file names in object file debugging info
1402# mess up M-x gdb in Emacs.
1403case $srcdir in
1404*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1405esac
1406for ac_var in $ac_precious_vars; do
1407 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1408 eval ac_env_${ac_var}_value=\$${ac_var}
1409 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1410 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1411done
c906108c 1412
bec39cab
AC
1413#
1414# Report the --help message.
1415#
1416if test "$ac_init_help" = "long"; then
1417 # Omit some internal or obsolete options to make the list less imposing.
1418 # This message is too long to be a string in the A/UX 3.1 sh.
1419 cat <<_ACEOF
1420\`configure' configures this package to adapt to many kinds of systems.
1421
1422Usage: $0 [OPTION]... [VAR=VALUE]...
1423
1424To assign environment variables (e.g., CC, CFLAGS...), specify them as
1425VAR=VALUE. See below for descriptions of some of the useful variables.
1426
1427Defaults for the options are specified in brackets.
1428
1429Configuration:
1430 -h, --help display this help and exit
1431 --help=short display options specific to this package
1432 --help=recursive display the short help of all the included packages
1433 -V, --version display version information and exit
1434 -q, --quiet, --silent do not print \`checking...' messages
1435 --cache-file=FILE cache test results in FILE [disabled]
1436 -C, --config-cache alias for \`--cache-file=config.cache'
1437 -n, --no-create do not create output files
1438 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1439
bec39cab
AC
1440Installation directories:
1441 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1442 [$ac_default_prefix]
bec39cab 1443 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1444 [PREFIX]
bec39cab
AC
1445
1446By default, \`make install' will install all the files in
1447\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1448an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1449for instance \`--prefix=\$HOME'.
1450
1451For better control, use the options below.
1452
1453Fine tuning of the installation directories:
81ecdfbb
RW
1454 --bindir=DIR user executables [EPREFIX/bin]
1455 --sbindir=DIR system admin executables [EPREFIX/sbin]
1456 --libexecdir=DIR program executables [EPREFIX/libexec]
1457 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1458 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1459 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1460 --libdir=DIR object code libraries [EPREFIX/lib]
1461 --includedir=DIR C header files [PREFIX/include]
1462 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1463 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1464 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1465 --infodir=DIR info documentation [DATAROOTDIR/info]
1466 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1467 --mandir=DIR man documentation [DATAROOTDIR/man]
1468 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1469 --htmldir=DIR html documentation [DOCDIR]
1470 --dvidir=DIR dvi documentation [DOCDIR]
1471 --pdfdir=DIR pdf documentation [DOCDIR]
1472 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1473_ACEOF
1474
1475 cat <<\_ACEOF
1476
9009e1ae
MR
1477Program names:
1478 --program-prefix=PREFIX prepend PREFIX to installed program names
1479 --program-suffix=SUFFIX append SUFFIX to installed program names
1480 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1481
bec39cab
AC
1482X features:
1483 --x-includes=DIR X include files are in DIR
1484 --x-libraries=DIR X library files are in DIR
1485
1486System types:
1487 --build=BUILD configure for building on BUILD [guessed]
1488 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1489 --target=TARGET configure for building compilers for TARGET [HOST]
1490_ACEOF
1491fi
1492
1493if test -n "$ac_init_help"; then
1494
1495 cat <<\_ACEOF
1496
1497Optional Features:
81ecdfbb 1498 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1499 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1500 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1501 --enable-maintainer-mode enable make rules and dependencies not useful
1502 (and sometimes confusing) to the casual installer
2974be62 1503 --enable-plugins Enable support for plugins
da2f07f1 1504 --disable-largefile omit support for large files
3bc3d82a 1505 --enable-build-with-cxx build with C++ compiler instead of C compiler
a1220294
TT
1506 --enable-targets=TARGETS
1507 alternative target configurations
c0993dbe 1508 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1509 --disable-gdbcli disable command-line interface (CLI)
1510 --disable-gdbmi disable machine-interface (MI)
1511 --enable-tui enable full-screen terminal user interface (TUI)
1512 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1513 --enable-profiling enable profiling of GDB
3841debe 1514 --disable-rpath do not hardcode runtime library paths
17ef446e 1515 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1516 --enable-werror treat compile warnings as errors
32c1c914 1517 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1518 --enable-gdb-build-warnings
32c1c914 1519 enable GDB specific build-time compiler warnings if
a1220294 1520 gcc is used
32c1c914 1521 --enable-sim link gdb with simulator
bec39cab 1522 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1523 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1524 is auto)
bec39cab
AC
1525
1526Optional Packages:
1527 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1528 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1529 --with-separate-debug-dir=PATH
32c1c914 1530 look for global separate debug info in this path
62e4f60c 1531 [LIBDIR/debug]
b14b1491
TT
1532 --with-gdb-datadir=PATH look for global separate data files in this path
1533 [DATADIR/gdb]
29b0e8a2 1534 --with-relocated-sources=PATH
32c1c914 1535 automatically relocate this path for source files
7349ff92 1536 --with-auto-load-dir=PATH
aff139ff 1537 directories from which to load auto-loaded scripts
1564a261 1538 [$debugdir:$datadir/auto-load]
bccbefd2 1539 --with-auto-load-safe-path=PATH
aff139ff 1540 directories safe to hold auto-loaded files
7349ff92 1541 [--with-auto-load-dir]
bccbefd2
JK
1542 --without-auto-load-safe-path
1543 do not restrict auto-loaded files locations
05e7c244 1544 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1545 --with-curses use the curses library instead of the termcap
1546 library
c16158bc
JM
1547 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1548 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1549 --with-system-zlib use installed libz
016a3251
DD
1550 --with-gnu-ld assume the C compiler uses GNU ld default=no
1551 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1552 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1553 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1554 --with-system-readline use installed readline library
b8e0a31c
SD
1555 --with-jit-reader-dir=PATH
1556 directory to load the JIT readers from
5c39566f 1557 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1558 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1559 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1560 --with-python[=PYTHON] include python support
1561 (auto/yes/no/<python-program>)
ed3ef339
DE
1562 --with-guile[=GUILE] include guile support
1563 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1564 --with-intel-pt include Intel Processor Trace support (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
81ecdfbb
RW
2404cat >config.log <<_ACEOF
2405This file contains any messages produced by compilers while
2406running configure, to aid debugging if configure makes a mistake.
d5af19ba 2407
81ecdfbb
RW
2408It was created by $as_me, which was
2409generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2410
81ecdfbb 2411 $ $0 $@
413ccac7 2412
81ecdfbb
RW
2413_ACEOF
2414exec 5>>config.log
2415{
2416cat <<_ASUNAME
2417## --------- ##
2418## Platform. ##
2419## --------- ##
413ccac7 2420
81ecdfbb
RW
2421hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2422uname -m = `(uname -m) 2>/dev/null || echo unknown`
2423uname -r = `(uname -r) 2>/dev/null || echo unknown`
2424uname -s = `(uname -s) 2>/dev/null || echo unknown`
2425uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2426
81ecdfbb
RW
2427/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2428/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2429
81ecdfbb
RW
2430/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2431/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2432/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2433/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2434/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2435/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2436/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2437
81ecdfbb 2438_ASUNAME
bec39cab 2439
bec39cab
AC
2440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2441for as_dir in $PATH
2442do
2443 IFS=$as_save_IFS
2444 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2445 $as_echo "PATH: $as_dir"
2446 done
2447IFS=$as_save_IFS
bec39cab 2448
81ecdfbb 2449} >&5
bec39cab 2450
81ecdfbb 2451cat >&5 <<_ACEOF
bec39cab 2452
bec39cab 2453
81ecdfbb
RW
2454## ----------- ##
2455## Core tests. ##
2456## ----------- ##
2457
2458_ACEOF
2459
2460
2461# Keep a trace of the command line.
2462# Strip out --no-create and --no-recursion so they do not pile up.
2463# Strip out --silent because we don't want to record it for future runs.
2464# Also quote any args containing shell meta-characters.
2465# Make two passes to allow for proper duplicate-argument suppression.
2466ac_configure_args=
2467ac_configure_args0=
2468ac_configure_args1=
2469ac_must_keep_next=false
2470for ac_pass in 1 2
2471do
2472 for ac_arg
2473 do
2474 case $ac_arg in
2475 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2476 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2477 | -silent | --silent | --silen | --sile | --sil)
2478 continue ;;
2479 *\'*)
2480 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2481 esac
2482 case $ac_pass in
2483 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2484 2)
2485 as_fn_append ac_configure_args1 " '$ac_arg'"
2486 if test $ac_must_keep_next = true; then
2487 ac_must_keep_next=false # Got value, back to normal.
2488 else
2489 case $ac_arg in
2490 *=* | --config-cache | -C | -disable-* | --disable-* \
2491 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2492 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2493 | -with-* | --with-* | -without-* | --without-* | --x)
2494 case "$ac_configure_args0 " in
2495 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2496 esac
2497 ;;
2498 -* ) ac_must_keep_next=true ;;
2499 esac
2500 fi
2501 as_fn_append ac_configure_args " '$ac_arg'"
2502 ;;
2503 esac
2504 done
2505done
2506{ ac_configure_args0=; unset ac_configure_args0;}
2507{ ac_configure_args1=; unset ac_configure_args1;}
2508
2509# When interrupted or exit'd, cleanup temporary files, and complete
2510# config.log. We remove comments because anyway the quotes in there
2511# would cause problems or look ugly.
2512# WARNING: Use '\'' to represent an apostrophe within the trap.
2513# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2514trap 'exit_status=$?
2515 # Save into config.log some information that might help in debugging.
2516 {
2517 echo
2518
2519 cat <<\_ASBOX
2520## ---------------- ##
2521## Cache variables. ##
2522## ---------------- ##
2523_ASBOX
2524 echo
2525 # The following way of writing the cache mishandles newlines in values,
2526(
2527 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2528 eval ac_val=\$$ac_var
2529 case $ac_val in #(
2530 *${as_nl}*)
2531 case $ac_var in #(
2532 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2533$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2534 esac
2535 case $ac_var in #(
2536 _ | IFS | as_nl) ;; #(
2537 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2538 *) { eval $ac_var=; unset $ac_var;} ;;
2539 esac ;;
2540 esac
2541 done
2542 (set) 2>&1 |
2543 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2544 *${as_nl}ac_space=\ *)
2545 sed -n \
2546 "s/'\''/'\''\\\\'\'''\''/g;
2547 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2548 ;; #(
2549 *)
2550 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2551 ;;
2552 esac |
2553 sort
2554)
2555 echo
2556
2557 cat <<\_ASBOX
2558## ----------------- ##
2559## Output variables. ##
2560## ----------------- ##
2561_ASBOX
2562 echo
2563 for ac_var in $ac_subst_vars
2564 do
2565 eval ac_val=\$$ac_var
2566 case $ac_val in
2567 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2568 esac
2569 $as_echo "$ac_var='\''$ac_val'\''"
2570 done | sort
2571 echo
2572
2573 if test -n "$ac_subst_files"; then
2574 cat <<\_ASBOX
2575## ------------------- ##
2576## File substitutions. ##
2577## ------------------- ##
2578_ASBOX
2579 echo
2580 for ac_var in $ac_subst_files
2581 do
2582 eval ac_val=\$$ac_var
2583 case $ac_val in
2584 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2585 esac
2586 $as_echo "$ac_var='\''$ac_val'\''"
2587 done | sort
2588 echo
2589 fi
2590
2591 if test -s confdefs.h; then
2592 cat <<\_ASBOX
2593## ----------- ##
2594## confdefs.h. ##
2595## ----------- ##
2596_ASBOX
2597 echo
2598 cat confdefs.h
2599 echo
2600 fi
2601 test "$ac_signal" != 0 &&
2602 $as_echo "$as_me: caught signal $ac_signal"
2603 $as_echo "$as_me: exit $exit_status"
2604 } >&5
2605 rm -f core *.core core.conftest.* &&
2606 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2607 exit $exit_status
2608' 0
2609for ac_signal in 1 2 13 15; do
2610 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2611done
2612ac_signal=0
2613
2614# confdefs.h avoids OS command line length limits that DEFS can exceed.
2615rm -f -r conftest* confdefs.h
2616
2617$as_echo "/* confdefs.h */" > confdefs.h
2618
2619# Predefined preprocessor variables.
2620
2621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_NAME "$PACKAGE_NAME"
2623_ACEOF
2624
2625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2627_ACEOF
2628
2629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_VERSION "$PACKAGE_VERSION"
2631_ACEOF
2632
2633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_STRING "$PACKAGE_STRING"
2635_ACEOF
2636
2637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2639_ACEOF
2640
2641cat >>confdefs.h <<_ACEOF
2642#define PACKAGE_URL "$PACKAGE_URL"
2643_ACEOF
2644
2645
2646# Let the site file select an alternate cache file if it wants to.
2647# Prefer an explicitly selected file to automatically selected ones.
2648ac_site_file1=NONE
2649ac_site_file2=NONE
2650if test -n "$CONFIG_SITE"; then
2651 ac_site_file1=$CONFIG_SITE
2652elif test "x$prefix" != xNONE; then
2653 ac_site_file1=$prefix/share/config.site
2654 ac_site_file2=$prefix/etc/config.site
2655else
2656 ac_site_file1=$ac_default_prefix/share/config.site
2657 ac_site_file2=$ac_default_prefix/etc/config.site
2658fi
2659for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2660do
2661 test "x$ac_site_file" = xNONE && continue
2662 if test -r "$ac_site_file"; then
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2664$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2665 sed 's/^/| /' "$ac_site_file" >&5
2666 . "$ac_site_file"
2667 fi
2668done
2669
2670if test -r "$cache_file"; then
2671 # Some versions of bash will fail to source /dev/null (special
2672 # files actually), so we avoid doing that.
2673 if test -f "$cache_file"; then
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2675$as_echo "$as_me: loading cache $cache_file" >&6;}
2676 case $cache_file in
2677 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2678 *) . "./$cache_file";;
2679 esac
2680 fi
2681else
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2683$as_echo "$as_me: creating cache $cache_file" >&6;}
2684 >$cache_file
bec39cab
AC
2685fi
2686
81ecdfbb
RW
2687# Check that the precious variables saved in the cache have kept the same
2688# value.
2689ac_cache_corrupted=false
2690for ac_var in $ac_precious_vars; do
2691 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2692 eval ac_new_set=\$ac_env_${ac_var}_set
2693 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2694 eval ac_new_val=\$ac_env_${ac_var}_value
2695 case $ac_old_set,$ac_new_set in
2696 set,)
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2698$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2699 ac_cache_corrupted=: ;;
2700 ,set)
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2702$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2703 ac_cache_corrupted=: ;;
2704 ,);;
2705 *)
2706 if test "x$ac_old_val" != "x$ac_new_val"; then
2707 # differences in whitespace do not lead to failure.
2708 ac_old_val_w=`echo x $ac_old_val`
2709 ac_new_val_w=`echo x $ac_new_val`
2710 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2712$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2713 ac_cache_corrupted=:
2714 else
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2716$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2717 eval $ac_var=\$ac_old_val
2718 fi
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2720$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2722$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2723 fi;;
2724 esac
2725 # Pass precious variables to config.status.
2726 if test "$ac_new_set" = set; then
2727 case $ac_new_val in
2728 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2729 *) ac_arg=$ac_var=$ac_new_val ;;
2730 esac
2731 case " $ac_configure_args " in
2732 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2733 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2734 esac
2735 fi
2736done
2737if $ac_cache_corrupted; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2741$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2742 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2743fi
2744## -------------------- ##
2745## Main body of script. ##
2746## -------------------- ##
2747
2748ac_ext=c
2749ac_cpp='$CPP $CPPFLAGS'
2750ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2751ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2752ac_compiler_gnu=$ac_cv_c_compiler_gnu
2753
2754
2755
2756
2757
2758ac_config_headers="$ac_config_headers config.h:config.in"
2759
2760
2761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2762$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2763 # Check whether --enable-maintainer-mode was given.
2764if test "${enable_maintainer_mode+set}" = set; then :
2765 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2766else
2767 USE_MAINTAINER_MODE=no
2768fi
2769
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2771$as_echo "$USE_MAINTAINER_MODE" >&6; }
2772 if test $USE_MAINTAINER_MODE = yes; then
2773 MAINTAINER_MODE_TRUE=
2774 MAINTAINER_MODE_FALSE='#'
2775else
2776 MAINTAINER_MODE_TRUE='#'
2777 MAINTAINER_MODE_FALSE=
2778fi
2779
2780 MAINT=$MAINTAINER_MODE_TRUE
2781
2782
2783
17ef446e 2784# Set the 'development' global.
270c9937 2785. $srcdir/../bfd/development.sh
f5f1cdb6 2786
81ecdfbb
RW
2787ac_ext=c
2788ac_cpp='$CPP $CPPFLAGS'
2789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2791ac_compiler_gnu=$ac_cv_c_compiler_gnu
2792if test -n "$ac_tool_prefix"; then
2793 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2794set dummy ${ac_tool_prefix}gcc; ac_word=$2
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2796$as_echo_n "checking for $ac_word... " >&6; }
2797if test "${ac_cv_prog_CC+set}" = set; then :
2798 $as_echo_n "(cached) " >&6
c906108c
SS
2799else
2800 if test -n "$CC"; then
2801 ac_cv_prog_CC="$CC" # Let the user override the test.
2802else
bec39cab
AC
2803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2804for as_dir in $PATH
2805do
2806 IFS=$as_save_IFS
2807 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2808 for ac_exec_ext in '' $ac_executable_extensions; do
2809 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2810 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2812 break 2
2813 fi
2814done
81ecdfbb
RW
2815 done
2816IFS=$as_save_IFS
bec39cab 2817
c906108c
SS
2818fi
2819fi
bec39cab 2820CC=$ac_cv_prog_CC
c906108c 2821if test -n "$CC"; then
81ecdfbb
RW
2822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2823$as_echo "$CC" >&6; }
c906108c 2824else
81ecdfbb
RW
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2826$as_echo "no" >&6; }
c906108c
SS
2827fi
2828
81ecdfbb 2829
b4e70030
JB
2830fi
2831if test -z "$ac_cv_prog_CC"; then
2832 ac_ct_CC=$CC
81ecdfbb
RW
2833 # Extract the first word of "gcc", so it can be a program name with args.
2834set dummy gcc; ac_word=$2
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2836$as_echo_n "checking for $ac_word... " >&6; }
2837if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2838 $as_echo_n "(cached) " >&6
b4e70030
JB
2839else
2840 if test -n "$ac_ct_CC"; then
2841 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2842else
2843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2844for as_dir in $PATH
2845do
2846 IFS=$as_save_IFS
2847 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2848 for ac_exec_ext in '' $ac_executable_extensions; do
2849 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2850 ac_cv_prog_ac_ct_CC="gcc"
2851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2852 break 2
4e8d927d 2853 fi
b4e70030 2854done
81ecdfbb
RW
2855 done
2856IFS=$as_save_IFS
b4e70030
JB
2857
2858fi
2859fi
2860ac_ct_CC=$ac_cv_prog_ac_ct_CC
2861if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2863$as_echo "$ac_ct_CC" >&6; }
b4e70030 2864else
81ecdfbb
RW
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2866$as_echo "no" >&6; }
b4e70030
JB
2867fi
2868
81ecdfbb
RW
2869 if test "x$ac_ct_CC" = x; then
2870 CC=""
2871 else
2872 case $cross_compiling:$ac_tool_warned in
2873yes:)
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2876ac_tool_warned=yes ;;
2877esac
2878 CC=$ac_ct_CC
2879 fi
b4e70030
JB
2880else
2881 CC="$ac_cv_prog_CC"
2882fi
2883
c906108c 2884if test -z "$CC"; then
81ecdfbb
RW
2885 if test -n "$ac_tool_prefix"; then
2886 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2887set dummy ${ac_tool_prefix}cc; ac_word=$2
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2889$as_echo_n "checking for $ac_word... " >&6; }
2890if test "${ac_cv_prog_CC+set}" = set; then :
2891 $as_echo_n "(cached) " >&6
c906108c
SS
2892else
2893 if test -n "$CC"; then
2894 ac_cv_prog_CC="$CC" # Let the user override the test.
2895else
bec39cab
AC
2896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2897for as_dir in $PATH
2898do
2899 IFS=$as_save_IFS
2900 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2901 for ac_exec_ext in '' $ac_executable_extensions; do
2902 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2903 ac_cv_prog_CC="${ac_tool_prefix}cc"
2904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2905 break 2
2906 fi
2907done
81ecdfbb
RW
2908 done
2909IFS=$as_save_IFS
2910
2911fi
2912fi
2913CC=$ac_cv_prog_CC
2914if test -n "$CC"; then
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2916$as_echo "$CC" >&6; }
2917else
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2919$as_echo "no" >&6; }
2920fi
2921
2922
2923 fi
2924fi
2925if test -z "$CC"; then
2926 # Extract the first word of "cc", so it can be a program name with args.
2927set dummy cc; ac_word=$2
2928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2929$as_echo_n "checking for $ac_word... " >&6; }
2930if test "${ac_cv_prog_CC+set}" = set; then :
2931 $as_echo_n "(cached) " >&6
2932else
2933 if test -n "$CC"; then
2934 ac_cv_prog_CC="$CC" # Let the user override the test.
2935else
2936 ac_prog_rejected=no
2937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2938for as_dir in $PATH
2939do
2940 IFS=$as_save_IFS
2941 test -z "$as_dir" && as_dir=.
2942 for ac_exec_ext in '' $ac_executable_extensions; do
2943 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2944 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2945 ac_prog_rejected=yes
2946 continue
2947 fi
2948 ac_cv_prog_CC="cc"
2949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2950 break 2
2951 fi
2952done
2953 done
2954IFS=$as_save_IFS
bec39cab 2955
c906108c
SS
2956if test $ac_prog_rejected = yes; then
2957 # We found a bogon in the path, so make sure we never use it.
2958 set dummy $ac_cv_prog_CC
2959 shift
bec39cab 2960 if test $# != 0; then
c906108c
SS
2961 # We chose a different compiler from the bogus one.
2962 # However, it has the same basename, so the bogon will be chosen
2963 # first if we set CC to just the basename; use the full file name.
2964 shift
bec39cab 2965 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2966 fi
2967fi
2968fi
2969fi
bec39cab 2970CC=$ac_cv_prog_CC
c906108c 2971if test -n "$CC"; then
81ecdfbb
RW
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2973$as_echo "$CC" >&6; }
c906108c 2974else
81ecdfbb
RW
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2976$as_echo "no" >&6; }
c906108c
SS
2977fi
2978
81ecdfbb 2979
bec39cab
AC
2980fi
2981if test -z "$CC"; then
2982 if test -n "$ac_tool_prefix"; then
81ecdfbb 2983 for ac_prog in cl.exe
bec39cab
AC
2984 do
2985 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2986set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2988$as_echo_n "checking for $ac_word... " >&6; }
2989if test "${ac_cv_prog_CC+set}" = set; then :
2990 $as_echo_n "(cached) " >&6
c906108c
SS
2991else
2992 if test -n "$CC"; then
2993 ac_cv_prog_CC="$CC" # Let the user override the test.
2994else
bec39cab
AC
2995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996for as_dir in $PATH
2997do
2998 IFS=$as_save_IFS
2999 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3000 for ac_exec_ext in '' $ac_executable_extensions; do
3001 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3002 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3004 break 2
3005 fi
3006done
81ecdfbb
RW
3007 done
3008IFS=$as_save_IFS
bec39cab 3009
c906108c
SS
3010fi
3011fi
bec39cab 3012CC=$ac_cv_prog_CC
c906108c 3013if test -n "$CC"; then
81ecdfbb
RW
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3015$as_echo "$CC" >&6; }
c906108c 3016else
81ecdfbb
RW
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018$as_echo "no" >&6; }
c906108c 3019fi
bec39cab 3020
81ecdfbb 3021
bec39cab
AC
3022 test -n "$CC" && break
3023 done
3024fi
3025if test -z "$CC"; then
3026 ac_ct_CC=$CC
81ecdfbb 3027 for ac_prog in cl.exe
bec39cab
AC
3028do
3029 # Extract the first word of "$ac_prog", so it can be a program name with args.
3030set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3032$as_echo_n "checking for $ac_word... " >&6; }
3033if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3034 $as_echo_n "(cached) " >&6
bec39cab
AC
3035else
3036 if test -n "$ac_ct_CC"; then
3037 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3038else
3039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040for as_dir in $PATH
3041do
3042 IFS=$as_save_IFS
3043 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3044 for ac_exec_ext in '' $ac_executable_extensions; do
3045 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3046 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3048 break 2
c906108c 3049 fi
bec39cab 3050done
81ecdfbb
RW
3051 done
3052IFS=$as_save_IFS
bec39cab
AC
3053
3054fi
3055fi
3056ac_ct_CC=$ac_cv_prog_ac_ct_CC
3057if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3059$as_echo "$ac_ct_CC" >&6; }
bec39cab 3060else
81ecdfbb
RW
3061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
c906108c
SS
3063fi
3064
81ecdfbb 3065
bec39cab
AC
3066 test -n "$ac_ct_CC" && break
3067done
c906108c 3068
81ecdfbb
RW
3069 if test "x$ac_ct_CC" = x; then
3070 CC=""
3071 else
3072 case $cross_compiling:$ac_tool_warned in
3073yes:)
3074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3076ac_tool_warned=yes ;;
3077esac
3078 CC=$ac_ct_CC
3079 fi
bec39cab
AC
3080fi
3081
3082fi
3083
3084
81ecdfbb
RW
3085test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3087as_fn_error "no acceptable C compiler found in \$PATH
3088See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3089
3090# Provide some information about the compiler.
81ecdfbb
RW
3091$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3092set X $ac_compile
3093ac_compiler=$2
3094for ac_option in --version -v -V -qversion; do
3095 { { ac_try="$ac_compiler $ac_option >&5"
3096case "(($ac_try" in
3097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3098 *) ac_try_echo=$ac_try;;
3099esac
3100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3101$as_echo "$ac_try_echo"; } >&5
3102 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3103 ac_status=$?
81ecdfbb
RW
3104 if test -s conftest.err; then
3105 sed '10a\
3106... rest of stderr output deleted ...
3107 10q' conftest.err >conftest.er1
3108 cat conftest.er1 >&5
3109 rm -f conftest.er1 conftest.err
3110 fi
3111 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3112 test $ac_status = 0; }
3113done
bec39cab 3114
81ecdfbb 3115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3116/* end confdefs.h. */
3117
3118int
3119main ()
3120{
3121
3122 ;
3123 return 0;
3124}
3125_ACEOF
3126ac_clean_files_save=$ac_clean_files
81ecdfbb 3127ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3128# Try to create an executable without -o first, disregard a.out.
3129# It will help us diagnose broken compilers, and finding out an intuition
3130# of exeext.
81ecdfbb
RW
3131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3132$as_echo_n "checking for C compiler default output file name... " >&6; }
3133ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3134
3135# The possible output files:
3136ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3137
3138ac_rmfiles=
3139for ac_file in $ac_files
3140do
3141 case $ac_file in
3142 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3143 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3144 esac
3145done
3146rm -f $ac_rmfiles
3147
3148if { { ac_try="$ac_link_default"
3149case "(($ac_try" in
3150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151 *) ac_try_echo=$ac_try;;
3152esac
3153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154$as_echo "$ac_try_echo"; } >&5
3155 (eval "$ac_link_default") 2>&5
3156 ac_status=$?
3157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158 test $ac_status = 0; }; then :
3159 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3160# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3161# in a Makefile. We should not override ac_cv_exeext if it was cached,
3162# so that the user can short-circuit this test for compilers unknown to
3163# Autoconf.
3164for ac_file in $ac_files ''
bec39cab
AC
3165do
3166 test -f "$ac_file" || continue
3167 case $ac_file in
81ecdfbb 3168 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3169 ;;
3170 [ab].out )
3171 # We found the default executable, but exeext='' is most
3172 # certainly right.
3173 break;;
3174 *.* )
81ecdfbb
RW
3175 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3176 then :; else
3177 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3178 fi
3179 # We set ac_cv_exeext here because the later test for it is not
3180 # safe: cross compilers may not add the suffix if given an `-o'
3181 # argument, so we may need to know it at that point already.
3182 # Even if this section looks crufty: it has the advantage of
3183 # actually working.
b4e70030
JB
3184 break;;
3185 * )
3186 break;;
bec39cab
AC
3187 esac
3188done
81ecdfbb
RW
3189test "$ac_cv_exeext" = no && ac_cv_exeext=
3190
bec39cab 3191else
81ecdfbb
RW
3192 ac_file=''
3193fi
3194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3195$as_echo "$ac_file" >&6; }
3196if test -z "$ac_file"; then :
3197 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3198sed 's/^/| /' conftest.$ac_ext >&5
3199
81ecdfbb
RW
3200{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3202{ as_fn_set_status 77
3203as_fn_error "C compiler cannot create executables
3204See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3205fi
b4e70030 3206ac_exeext=$ac_cv_exeext
b4e70030 3207
81ecdfbb 3208# Check that the compiler produces executables we can run. If not, either
bec39cab 3209# the compiler is broken, or we cross compile.
81ecdfbb
RW
3210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3211$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3212# If not cross compiling, check that we can run a simple program.
3213if test "$cross_compiling" != yes; then
3214 if { ac_try='./$ac_file'
81ecdfbb
RW
3215 { { case "(($ac_try" in
3216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3217 *) ac_try_echo=$ac_try;;
3218esac
3219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3220$as_echo "$ac_try_echo"; } >&5
3221 (eval "$ac_try") 2>&5
bec39cab 3222 ac_status=$?
81ecdfbb
RW
3223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3224 test $ac_status = 0; }; }; then
bec39cab 3225 cross_compiling=no
c906108c 3226 else
bec39cab
AC
3227 if test "$cross_compiling" = maybe; then
3228 cross_compiling=yes
3229 else
81ecdfbb
RW
3230 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3231$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3232as_fn_error "cannot run C compiled programs.
bec39cab 3233If you meant to cross compile, use \`--host'.
81ecdfbb 3234See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3235 fi
c906108c 3236 fi
bec39cab 3237fi
81ecdfbb
RW
3238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3239$as_echo "yes" >&6; }
bec39cab 3240
81ecdfbb 3241rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3242ac_clean_files=$ac_clean_files_save
81ecdfbb 3243# Check that the compiler produces executables we can run. If not, either
b4e70030 3244# the compiler is broken, or we cross compile.
81ecdfbb
RW
3245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3246$as_echo_n "checking whether we are cross compiling... " >&6; }
3247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3248$as_echo "$cross_compiling" >&6; }
3249
3250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3251$as_echo_n "checking for suffix of executables... " >&6; }
3252if { { ac_try="$ac_link"
3253case "(($ac_try" in
3254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3255 *) ac_try_echo=$ac_try;;
3256esac
3257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3258$as_echo "$ac_try_echo"; } >&5
3259 (eval "$ac_link") 2>&5
bec39cab 3260 ac_status=$?
81ecdfbb
RW
3261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3262 test $ac_status = 0; }; then :
b4e70030
JB
3263 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3264# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3265# work properly (i.e., refer to `conftest.exe'), while it won't with
3266# `rm'.
3267for ac_file in conftest.exe conftest conftest.*; do
3268 test -f "$ac_file" || continue
3269 case $ac_file in
81ecdfbb 3270 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3271 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3272 break;;
3273 * ) break;;
3274 esac
3275done
c906108c 3276else
81ecdfbb
RW
3277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3279as_fn_error "cannot compute suffix of executables: cannot compile and link
3280See \`config.log' for more details." "$LINENO" 5; }
c906108c 3281fi
b4e70030 3282rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3284$as_echo "$ac_cv_exeext" >&6; }
c906108c 3285
b4e70030 3286rm -f conftest.$ac_ext
bec39cab
AC
3287EXEEXT=$ac_cv_exeext
3288ac_exeext=$EXEEXT
81ecdfbb
RW
3289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3290$as_echo_n "checking for suffix of object files... " >&6; }
3291if test "${ac_cv_objext+set}" = set; then :
3292 $as_echo_n "(cached) " >&6
bec39cab 3293else
81ecdfbb 3294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3295/* end confdefs.h. */
3296
3297int
3298main ()
3299{
3300
3301 ;
3302 return 0;
3303}
3304_ACEOF
3305rm -f conftest.o conftest.obj
81ecdfbb
RW
3306if { { ac_try="$ac_compile"
3307case "(($ac_try" in
3308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3309 *) ac_try_echo=$ac_try;;
3310esac
3311eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3312$as_echo "$ac_try_echo"; } >&5
3313 (eval "$ac_compile") 2>&5
3314 ac_status=$?
3315 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3316 test $ac_status = 0; }; then :
3317 for ac_file in conftest.o conftest.obj conftest.*; do
3318 test -f "$ac_file" || continue;
bec39cab 3319 case $ac_file in
81ecdfbb 3320 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3321 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3322 break;;
3323 esac
3324done
c906108c 3325else
81ecdfbb 3326 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3327sed 's/^/| /' conftest.$ac_ext >&5
3328
81ecdfbb
RW
3329{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3331as_fn_error "cannot compute suffix of object files: cannot compile
3332See \`config.log' for more details." "$LINENO" 5; }
c906108c 3333fi
b4e70030 3334rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3335fi
81ecdfbb
RW
3336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3337$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3338OBJEXT=$ac_cv_objext
3339ac_objext=$OBJEXT
81ecdfbb
RW
3340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3341$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3342if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3343 $as_echo_n "(cached) " >&6
c906108c 3344else
81ecdfbb 3345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3346/* end confdefs.h. */
3347
3348int
3349main ()
3350{
3351#ifndef __GNUC__
3352 choke me
3353#endif
3354
3355 ;
3356 return 0;
3357}
3358_ACEOF
81ecdfbb 3359if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3360 ac_compiler_gnu=yes
3361else
81ecdfbb 3362 ac_compiler_gnu=no
bec39cab 3363fi
81ecdfbb 3364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3365ac_cv_c_compiler_gnu=$ac_compiler_gnu
3366
3367fi
81ecdfbb
RW
3368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3369$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3370if test $ac_compiler_gnu = yes; then
3371 GCC=yes
3372else
3373 GCC=
3374fi
bec39cab
AC
3375ac_test_CFLAGS=${CFLAGS+set}
3376ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3378$as_echo_n "checking whether $CC accepts -g... " >&6; }
3379if test "${ac_cv_prog_cc_g+set}" = set; then :
3380 $as_echo_n "(cached) " >&6
bec39cab 3381else
81ecdfbb
RW
3382 ac_save_c_werror_flag=$ac_c_werror_flag
3383 ac_c_werror_flag=yes
3384 ac_cv_prog_cc_g=no
3385 CFLAGS="-g"
3386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3387/* end confdefs.h. */
3388
3389int
3390main ()
3391{
3392
3393 ;
3394 return 0;
3395}
3396_ACEOF
81ecdfbb 3397if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3398 ac_cv_prog_cc_g=yes
3399else
81ecdfbb
RW
3400 CFLAGS=""
3401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3402/* end confdefs.h. */
3403
3404int
3405main ()
3406{
3407
3408 ;
3409 return 0;
3410}
3411_ACEOF
3412if ac_fn_c_try_compile "$LINENO"; then :
3413
3414else
3415 ac_c_werror_flag=$ac_save_c_werror_flag
3416 CFLAGS="-g"
3417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3418/* end confdefs.h. */
3419
3420int
3421main ()
3422{
c906108c 3423
81ecdfbb
RW
3424 ;
3425 return 0;
3426}
3427_ACEOF
3428if ac_fn_c_try_compile "$LINENO"; then :
3429 ac_cv_prog_cc_g=yes
3430fi
3431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3432fi
3433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3434fi
81ecdfbb
RW
3435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3436 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3437fi
81ecdfbb
RW
3438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3439$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3440if test "$ac_test_CFLAGS" = set; then
bec39cab 3441 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3442elif test $ac_cv_prog_cc_g = yes; then
3443 if test "$GCC" = yes; then
3444 CFLAGS="-g -O2"
3445 else
3446 CFLAGS="-g"
3447 fi
3448else
3449 if test "$GCC" = yes; then
3450 CFLAGS="-O2"
3451 else
3452 CFLAGS=
3453 fi
3454fi
81ecdfbb
RW
3455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3456$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3457if test "${ac_cv_prog_cc_c89+set}" = set; then :
3458 $as_echo_n "(cached) " >&6
bec39cab 3459else
81ecdfbb 3460 ac_cv_prog_cc_c89=no
bec39cab 3461ac_save_CC=$CC
81ecdfbb 3462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3463/* end confdefs.h. */
c906108c
SS
3464#include <stdarg.h>
3465#include <stdio.h>
3466#include <sys/types.h>
3467#include <sys/stat.h>
3468/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3469struct buf { int x; };
3470FILE * (*rcsopen) (struct buf *, struct stat *, int);
3471static char *e (p, i)
3472 char **p;
3473 int i;
3474{
3475 return p[i];
3476}
3477static char *f (char * (*g) (char **, int), char **p, ...)
3478{
3479 char *s;
3480 va_list v;
3481 va_start (v,p);
3482 s = g (p, va_arg (v,int));
3483 va_end (v);
3484 return s;
3485}
bec39cab
AC
3486
3487/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3488 function prototypes and stuff, but not '\xHH' hex character constants.
3489 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3490 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3491 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3492 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3493 that's true only with -std. */
bec39cab
AC
3494int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3495
81ecdfbb
RW
3496/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3497 inside strings and character constants. */
3498#define FOO(x) 'x'
3499int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3500
c906108c
SS
3501int test (int i, double x);
3502struct s1 {int (*f) (int a);};
3503struct s2 {int (*f) (double a);};
3504int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3505int argc;
3506char **argv;
bec39cab
AC
3507int
3508main ()
3509{
c906108c 3510return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3511 ;
3512 return 0;
3513}
3514_ACEOF
81ecdfbb
RW
3515for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3516 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3517do
3518 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3519 if ac_fn_c_try_compile "$LINENO"; then :
3520 ac_cv_prog_cc_c89=$ac_arg
c906108c 3521fi
81ecdfbb
RW
3522rm -f core conftest.err conftest.$ac_objext
3523 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3524done
81ecdfbb 3525rm -f conftest.$ac_ext
bec39cab 3526CC=$ac_save_CC
c906108c
SS
3527
3528fi
81ecdfbb
RW
3529# AC_CACHE_VAL
3530case "x$ac_cv_prog_cc_c89" in
3531 x)
3532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3533$as_echo "none needed" >&6; } ;;
3534 xno)
3535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3536$as_echo "unsupported" >&6; } ;;
bec39cab 3537 *)
81ecdfbb
RW
3538 CC="$CC $ac_cv_prog_cc_c89"
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3540$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3541esac
81ecdfbb 3542if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3543
b4e70030
JB
3544fi
3545
bec39cab
AC
3546ac_ext=c
3547ac_cpp='$CPP $CPPFLAGS'
3548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3550ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3551
3bc3d82a
PA
3552ac_ext=cpp
3553ac_cpp='$CXXCPP $CPPFLAGS'
3554ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3555ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3556ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3557if test -z "$CXX"; then
3558 if test -n "$CCC"; then
3559 CXX=$CCC
3560 else
3561 if test -n "$ac_tool_prefix"; then
3562 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3563 do
3564 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3565set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3567$as_echo_n "checking for $ac_word... " >&6; }
3568if test "${ac_cv_prog_CXX+set}" = set; then :
3569 $as_echo_n "(cached) " >&6
3570else
3571 if test -n "$CXX"; then
3572 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3573else
3574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3575for as_dir in $PATH
3576do
3577 IFS=$as_save_IFS
3578 test -z "$as_dir" && as_dir=.
3579 for ac_exec_ext in '' $ac_executable_extensions; do
3580 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3581 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3583 break 2
3584 fi
3585done
3586 done
3587IFS=$as_save_IFS
3588
3589fi
3590fi
3591CXX=$ac_cv_prog_CXX
3592if test -n "$CXX"; then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3594$as_echo "$CXX" >&6; }
3595else
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3597$as_echo "no" >&6; }
3598fi
3599
3600
3601 test -n "$CXX" && break
3602 done
3603fi
3604if test -z "$CXX"; then
3605 ac_ct_CXX=$CXX
3606 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3607do
3608 # Extract the first word of "$ac_prog", so it can be a program name with args.
3609set dummy $ac_prog; ac_word=$2
3610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3611$as_echo_n "checking for $ac_word... " >&6; }
3612if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3613 $as_echo_n "(cached) " >&6
3614else
3615 if test -n "$ac_ct_CXX"; then
3616 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3617else
3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619for as_dir in $PATH
3620do
3621 IFS=$as_save_IFS
3622 test -z "$as_dir" && as_dir=.
3623 for ac_exec_ext in '' $ac_executable_extensions; do
3624 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3625 ac_cv_prog_ac_ct_CXX="$ac_prog"
3626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3627 break 2
3628 fi
3629done
3630 done
3631IFS=$as_save_IFS
3632
3633fi
3634fi
3635ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3636if test -n "$ac_ct_CXX"; then
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3638$as_echo "$ac_ct_CXX" >&6; }
3639else
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3641$as_echo "no" >&6; }
3642fi
3643
3644
3645 test -n "$ac_ct_CXX" && break
3646done
3647
3648 if test "x$ac_ct_CXX" = x; then
3649 CXX="g++"
3650 else
3651 case $cross_compiling:$ac_tool_warned in
3652yes:)
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3655ac_tool_warned=yes ;;
3656esac
3657 CXX=$ac_ct_CXX
3658 fi
3659fi
3660
3661 fi
3662fi
3663# Provide some information about the compiler.
3664$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3665set X $ac_compile
3666ac_compiler=$2
3667for ac_option in --version -v -V -qversion; do
3668 { { ac_try="$ac_compiler $ac_option >&5"
3669case "(($ac_try" in
3670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671 *) ac_try_echo=$ac_try;;
3672esac
3673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
3675 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3676 ac_status=$?
3677 if test -s conftest.err; then
3678 sed '10a\
3679... rest of stderr output deleted ...
3680 10q' conftest.err >conftest.er1
3681 cat conftest.er1 >&5
3682 rm -f conftest.er1 conftest.err
3683 fi
3684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685 test $ac_status = 0; }
3686done
3687
3688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3689$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3690if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3691 $as_echo_n "(cached) " >&6
3692else
3693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694/* end confdefs.h. */
3695
3696int
3697main ()
3698{
3699#ifndef __GNUC__
3700 choke me
3701#endif
3702
3703 ;
3704 return 0;
3705}
3706_ACEOF
3707if ac_fn_cxx_try_compile "$LINENO"; then :
3708 ac_compiler_gnu=yes
3709else
3710 ac_compiler_gnu=no
3711fi
3712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3713ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3714
3715fi
3716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3717$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3718if test $ac_compiler_gnu = yes; then
3719 GXX=yes
3720else
3721 GXX=
3722fi
3723ac_test_CXXFLAGS=${CXXFLAGS+set}
3724ac_save_CXXFLAGS=$CXXFLAGS
3725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3726$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3727if test "${ac_cv_prog_cxx_g+set}" = set; then :
3728 $as_echo_n "(cached) " >&6
3729else
3730 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3731 ac_cxx_werror_flag=yes
3732 ac_cv_prog_cxx_g=no
3733 CXXFLAGS="-g"
3734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3735/* end confdefs.h. */
3736
3737int
3738main ()
3739{
3740
3741 ;
3742 return 0;
3743}
3744_ACEOF
3745if ac_fn_cxx_try_compile "$LINENO"; then :
3746 ac_cv_prog_cxx_g=yes
3747else
3748 CXXFLAGS=""
3749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3750/* end confdefs.h. */
3751
3752int
3753main ()
3754{
3755
3756 ;
3757 return 0;
3758}
3759_ACEOF
3760if ac_fn_cxx_try_compile "$LINENO"; then :
3761
3762else
3763 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3764 CXXFLAGS="-g"
3765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3766/* end confdefs.h. */
3767
3768int
3769main ()
3770{
3771
3772 ;
3773 return 0;
3774}
3775_ACEOF
3776if ac_fn_cxx_try_compile "$LINENO"; then :
3777 ac_cv_prog_cxx_g=yes
3778fi
3779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3780fi
3781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3782fi
3783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3784 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3785fi
3786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3787$as_echo "$ac_cv_prog_cxx_g" >&6; }
3788if test "$ac_test_CXXFLAGS" = set; then
3789 CXXFLAGS=$ac_save_CXXFLAGS
3790elif test $ac_cv_prog_cxx_g = yes; then
3791 if test "$GXX" = yes; then
3792 CXXFLAGS="-g -O2"
3793 else
3794 CXXFLAGS="-g"
3795 fi
3796else
3797 if test "$GXX" = yes; then
3798 CXXFLAGS="-O2"
3799 else
3800 CXXFLAGS=
3801 fi
3802fi
3803ac_ext=c
3804ac_cpp='$CPP $CPPFLAGS'
3805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3807ac_compiler_gnu=$ac_cv_c_compiler_gnu
3808
3809
60ca704f 3810
bec39cab
AC
3811ac_ext=c
3812ac_cpp='$CPP $CPPFLAGS'
3813ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3814ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3815ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3817$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3818# On Suns, sometimes $CPP names a directory.
3819if test -n "$CPP" && test -d "$CPP"; then
3820 CPP=
8bb2c122 3821fi
bec39cab 3822if test -z "$CPP"; then
81ecdfbb
RW
3823 if test "${ac_cv_prog_CPP+set}" = set; then :
3824 $as_echo_n "(cached) " >&6
bec39cab
AC
3825else
3826 # Double quotes because CPP needs to be expanded
3827 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3828 do
3829 ac_preproc_ok=false
3830for ac_c_preproc_warn_flag in '' yes
3831do
3832 # Use a header file that comes with gcc, so configuring glibc
3833 # with a fresh cross-compiler works.
3834 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3835 # <limits.h> exists even on freestanding compilers.
3836 # On the NeXT, cc -E runs the code through the compiler's parser,
3837 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3839/* end confdefs.h. */
3840#ifdef __STDC__
3841# include <limits.h>
3842#else
3843# include <assert.h>
3844#endif
3845 Syntax error
3846_ACEOF
81ecdfbb 3847if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3848
81ecdfbb 3849else
bec39cab
AC
3850 # Broken: fails on valid input.
3851continue
3852fi
3853rm -f conftest.err conftest.$ac_ext
3854
81ecdfbb 3855 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3856 # can be detected and how.
81ecdfbb 3857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3858/* end confdefs.h. */
3859#include <ac_nonexistent.h>
3860_ACEOF
81ecdfbb 3861if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3862 # Broken: success on invalid input.
3863continue
8bb2c122 3864else
bec39cab
AC
3865 # Passes both tests.
3866ac_preproc_ok=:
3867break
8bb2c122 3868fi
bec39cab 3869rm -f conftest.err conftest.$ac_ext
8bb2c122 3870
bec39cab
AC
3871done
3872# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3873rm -f conftest.err conftest.$ac_ext
81ecdfbb 3874if $ac_preproc_ok; then :
bec39cab
AC
3875 break
3876fi
8bb2c122 3877
bec39cab
AC
3878 done
3879 ac_cv_prog_CPP=$CPP
ddc9cd0f 3880
c906108c 3881fi
bec39cab
AC
3882 CPP=$ac_cv_prog_CPP
3883else
3884 ac_cv_prog_CPP=$CPP
c906108c 3885fi
81ecdfbb
RW
3886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3887$as_echo "$CPP" >&6; }
bec39cab
AC
3888ac_preproc_ok=false
3889for ac_c_preproc_warn_flag in '' yes
3890do
3891 # Use a header file that comes with gcc, so configuring glibc
3892 # with a fresh cross-compiler works.
3893 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3894 # <limits.h> exists even on freestanding compilers.
3895 # On the NeXT, cc -E runs the code through the compiler's parser,
3896 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3898/* end confdefs.h. */
3899#ifdef __STDC__
3900# include <limits.h>
3901#else
3902# include <assert.h>
3903#endif
3904 Syntax error
3905_ACEOF
81ecdfbb 3906if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3907
81ecdfbb 3908else
bec39cab
AC
3909 # Broken: fails on valid input.
3910continue
3911fi
3912rm -f conftest.err conftest.$ac_ext
3913
81ecdfbb 3914 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3915 # can be detected and how.
81ecdfbb 3916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3917/* end confdefs.h. */
3918#include <ac_nonexistent.h>
3919_ACEOF
81ecdfbb 3920if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3921 # Broken: success on invalid input.
3922continue
c906108c 3923else
bec39cab
AC
3924 # Passes both tests.
3925ac_preproc_ok=:
3926break
c906108c 3927fi
bec39cab 3928rm -f conftest.err conftest.$ac_ext
c906108c 3929
bec39cab
AC
3930done
3931# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3932rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3933if $ac_preproc_ok; then :
3934
c906108c 3935else
81ecdfbb
RW
3936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3938as_fn_error "C preprocessor \"$CPP\" fails sanity check
3939See \`config.log' for more details." "$LINENO" 5; }
c906108c 3940fi
c906108c 3941
bec39cab
AC
3942ac_ext=c
3943ac_cpp='$CPP $CPPFLAGS'
3944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3946ac_compiler_gnu=$ac_cv_c_compiler_gnu
3947
3948
81ecdfbb
RW
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3950$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3951if test "${ac_cv_path_GREP+set}" = set; then :
3952 $as_echo_n "(cached) " >&6
4e8d927d 3953else
81ecdfbb
RW
3954 if test -z "$GREP"; then
3955 ac_path_GREP_found=false
3956 # Loop through the user's path and test for each of PROGNAME-LIST
3957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3959do
3960 IFS=$as_save_IFS
3961 test -z "$as_dir" && as_dir=.
3962 for ac_prog in grep ggrep; do
3963 for ac_exec_ext in '' $ac_executable_extensions; do
3964 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3965 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3966# Check for GNU ac_path_GREP and select it if it is found.
3967 # Check for GNU $ac_path_GREP
3968case `"$ac_path_GREP" --version 2>&1` in
3969*GNU*)
3970 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3971*)
3972 ac_count=0
3973 $as_echo_n 0123456789 >"conftest.in"
3974 while :
3975 do
3976 cat "conftest.in" "conftest.in" >"conftest.tmp"
3977 mv "conftest.tmp" "conftest.in"
3978 cp "conftest.in" "conftest.nl"
3979 $as_echo 'GREP' >> "conftest.nl"
3980 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3981 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3982 as_fn_arith $ac_count + 1 && ac_count=$as_val
3983 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3984 # Best one so far, save it but keep looking for a better one
3985 ac_cv_path_GREP="$ac_path_GREP"
3986 ac_path_GREP_max=$ac_count
bec39cab 3987 fi
81ecdfbb
RW
3988 # 10*(2^10) chars as input seems more than enough
3989 test $ac_count -gt 10 && break
3990 done
3991 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3992esac
bec39cab 3993
81ecdfbb
RW
3994 $ac_path_GREP_found && break 3
3995 done
3996 done
3997 done
3998IFS=$as_save_IFS
3999 if test -z "$ac_cv_path_GREP"; then
4000 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4001 fi
c906108c 4002else
81ecdfbb 4003 ac_cv_path_GREP=$GREP
c906108c 4004fi
c906108c 4005
81ecdfbb
RW
4006fi
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4008$as_echo "$ac_cv_path_GREP" >&6; }
4009 GREP="$ac_cv_path_GREP"
c906108c 4010
c906108c 4011
81ecdfbb
RW
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4013$as_echo_n "checking for egrep... " >&6; }
4014if test "${ac_cv_path_EGREP+set}" = set; then :
4015 $as_echo_n "(cached) " >&6
783e057b 4016else
81ecdfbb
RW
4017 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4018 then ac_cv_path_EGREP="$GREP -E"
4019 else
4020 if test -z "$EGREP"; then
4021 ac_path_EGREP_found=false
4022 # Loop through the user's path and test for each of PROGNAME-LIST
4023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4024for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4025do
4026 IFS=$as_save_IFS
4027 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4028 for ac_prog in egrep; do
4029 for ac_exec_ext in '' $ac_executable_extensions; do
4030 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4031 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4032# Check for GNU ac_path_EGREP and select it if it is found.
4033 # Check for GNU $ac_path_EGREP
4034case `"$ac_path_EGREP" --version 2>&1` in
4035*GNU*)
4036 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4037*)
4038 ac_count=0
4039 $as_echo_n 0123456789 >"conftest.in"
4040 while :
4041 do
4042 cat "conftest.in" "conftest.in" >"conftest.tmp"
4043 mv "conftest.tmp" "conftest.in"
4044 cp "conftest.in" "conftest.nl"
4045 $as_echo 'EGREP' >> "conftest.nl"
4046 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4047 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4048 as_fn_arith $ac_count + 1 && ac_count=$as_val
4049 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4050 # Best one so far, save it but keep looking for a better one
4051 ac_cv_path_EGREP="$ac_path_EGREP"
4052 ac_path_EGREP_max=$ac_count
4053 fi
4054 # 10*(2^10) chars as input seems more than enough
4055 test $ac_count -gt 10 && break
4056 done
4057 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4058esac
bec39cab 4059
81ecdfbb
RW
4060 $ac_path_EGREP_found && break 3
4061 done
4062 done
4063 done
4064IFS=$as_save_IFS
4065 if test -z "$ac_cv_path_EGREP"; then
4066 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4067 fi
783e057b 4068else
81ecdfbb 4069 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4070fi
4071
81ecdfbb 4072 fi
783e057b 4073fi
81ecdfbb
RW
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4075$as_echo "$ac_cv_path_EGREP" >&6; }
4076 EGREP="$ac_cv_path_EGREP"
4077
783e057b 4078
81ecdfbb
RW
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4080$as_echo_n "checking for ANSI C header files... " >&6; }
4081if test "${ac_cv_header_stdc+set}" = set; then :
4082 $as_echo_n "(cached) " >&6
783e057b 4083else
81ecdfbb 4084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4085/* end confdefs.h. */
783e057b 4086#include <stdlib.h>
bec39cab 4087#include <stdarg.h>
783e057b
DJ
4088#include <string.h>
4089#include <float.h>
c906108c 4090
bec39cab
AC
4091int
4092main ()
4093{
c906108c 4094
bec39cab
AC
4095 ;
4096 return 0;
4097}
4098_ACEOF
81ecdfbb 4099if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4100 ac_cv_header_stdc=yes
c906108c 4101else
81ecdfbb 4102 ac_cv_header_stdc=no
c906108c 4103fi
81ecdfbb 4104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4105
783e057b
DJ
4106if test $ac_cv_header_stdc = yes; then
4107 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4109/* end confdefs.h. */
4110#include <string.h>
c906108c 4111
783e057b
DJ
4112_ACEOF
4113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4114 $EGREP "memchr" >/dev/null 2>&1; then :
4115
c906108c 4116else
783e057b 4117 ac_cv_header_stdc=no
c906108c 4118fi
783e057b 4119rm -f conftest*
c906108c
SS
4120
4121fi
4122
783e057b
DJ
4123if test $ac_cv_header_stdc = yes; then
4124 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4126/* end confdefs.h. */
4127#include <stdlib.h>
bec39cab 4128
783e057b
DJ
4129_ACEOF
4130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4131 $EGREP "free" >/dev/null 2>&1; then :
4132
bec39cab 4133else
783e057b 4134 ac_cv_header_stdc=no
bec39cab 4135fi
783e057b 4136rm -f conftest*
bec39cab
AC
4137
4138fi
bec39cab 4139
783e057b
DJ
4140if test $ac_cv_header_stdc = yes; then
4141 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4142 if test "$cross_compiling" = yes; then :
783e057b 4143 :
bec39cab 4144else
81ecdfbb 4145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4146/* end confdefs.h. */
4147#include <ctype.h>
81ecdfbb 4148#include <stdlib.h>
783e057b
DJ
4149#if ((' ' & 0x0FF) == 0x020)
4150# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4151# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4152#else
4153# define ISLOWER(c) \
4154 (('a' <= (c) && (c) <= 'i') \
4155 || ('j' <= (c) && (c) <= 'r') \
4156 || ('s' <= (c) && (c) <= 'z'))
4157# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4158#endif
4159
4160#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4161int
4162main ()
4163{
4164 int i;
4165 for (i = 0; i < 256; i++)
4166 if (XOR (islower (i), ISLOWER (i))
4167 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4168 return 2;
4169 return 0;
783e057b
DJ
4170}
4171_ACEOF
81ecdfbb 4172if ac_fn_c_try_run "$LINENO"; then :
783e057b 4173
81ecdfbb
RW
4174else
4175 ac_cv_header_stdc=no
783e057b 4176fi
81ecdfbb
RW
4177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4178 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4179fi
81ecdfbb 4180
783e057b
DJ
4181fi
4182fi
81ecdfbb
RW
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4184$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4185if test $ac_cv_header_stdc = yes; then
4186
81ecdfbb 4187$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4188
4189fi
4190
4191# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4192for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4193 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4194do :
4195 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4196ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4197"
4198eval as_val=\$$as_ac_Header
4199 if test "x$as_val" = x""yes; then :
783e057b 4200 cat >>confdefs.h <<_ACEOF
81ecdfbb 4201#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4202_ACEOF
4203
4204fi
4205
4206done
4207
4208
4209
81ecdfbb
RW
4210 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4211if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4212 MINIX=yes
4213else
4214 MINIX=
4215fi
4216
4217
4218 if test "$MINIX" = yes; then
4219
81ecdfbb 4220$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4221
4222
81ecdfbb 4223$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4224
4225
81ecdfbb 4226$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4227
4228 fi
4229
4230
81ecdfbb
RW
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4232$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4233if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4234 $as_echo_n "(cached) " >&6
783e057b 4235else
81ecdfbb 4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4237/* end confdefs.h. */
4238
c971b7fa
PA
4239# define __EXTENSIONS__ 1
4240 $ac_includes_default
783e057b
DJ
4241int
4242main ()
4243{
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
81ecdfbb 4249if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4250 ac_cv_safe_to_define___extensions__=yes
4251else
81ecdfbb 4252 ac_cv_safe_to_define___extensions__=no
783e057b 4253fi
81ecdfbb 4254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4255fi
81ecdfbb
RW
4256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4257$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4258 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4259 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4260
81ecdfbb 4261 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4262
81ecdfbb 4263 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4264
81ecdfbb 4265 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4266
81ecdfbb 4267 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4268
4269
c971b7fa
PA
4270ac_aux_dir=
4271for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4272 for ac_t in install-sh install.sh shtool; do
4273 if test -f "$ac_dir/$ac_t"; then
4274 ac_aux_dir=$ac_dir
4275 ac_install_sh="$ac_aux_dir/$ac_t -c"
4276 break 2
4277 fi
4278 done
4279done
4280if test -z "$ac_aux_dir"; then
4281 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4282fi
770d76d7 4283
c971b7fa
PA
4284# These three variables are undocumented and unsupported,
4285# and are intended to be withdrawn in a future Autoconf release.
4286# They can cause serious problems if a builder's source tree is in a directory
4287# whose full name contains unusual characters.
4288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4291
770d76d7 4292
c971b7fa
PA
4293# Make sure we can run config.sub.
4294$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4295 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4296
c971b7fa
PA
4297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4298$as_echo_n "checking build system type... " >&6; }
4299if test "${ac_cv_build+set}" = set; then :
4300 $as_echo_n "(cached) " >&6
770d76d7 4301else
c971b7fa
PA
4302 ac_build_alias=$build_alias
4303test "x$ac_build_alias" = x &&
4304 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4305test "x$ac_build_alias" = x &&
4306 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4307ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4308 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4309
770d76d7 4310fi
c971b7fa
PA
4311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4312$as_echo "$ac_cv_build" >&6; }
4313case $ac_cv_build in
4314*-*-*) ;;
4315*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4316esac
c971b7fa
PA
4317build=$ac_cv_build
4318ac_save_IFS=$IFS; IFS='-'
4319set x $ac_cv_build
4320shift
4321build_cpu=$1
4322build_vendor=$2
4323shift; shift
4324# Remember, the first character of IFS is used to create $*,
4325# except with old shells:
4326build_os=$*
4327IFS=$ac_save_IFS
4328case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4329
4330
c971b7fa
PA
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4332$as_echo_n "checking host system type... " >&6; }
4333if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4334 $as_echo_n "(cached) " >&6
4335else
c971b7fa
PA
4336 if test "x$host_alias" = x; then
4337 ac_cv_host=$ac_cv_build
81ecdfbb 4338else
c971b7fa
PA
4339 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4340 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4341fi
81ecdfbb
RW
4342
4343fi
c971b7fa
PA
4344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4345$as_echo "$ac_cv_host" >&6; }
4346case $ac_cv_host in
4347*-*-*) ;;
4348*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4349esac
c971b7fa
PA
4350host=$ac_cv_host
4351ac_save_IFS=$IFS; IFS='-'
4352set x $ac_cv_host
4353shift
4354host_cpu=$1
4355host_vendor=$2
4356shift; shift
4357# Remember, the first character of IFS is used to create $*,
4358# except with old shells:
4359host_os=$*
4360IFS=$ac_save_IFS
4361case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4362
4363
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4365$as_echo_n "checking target system type... " >&6; }
4366if test "${ac_cv_target+set}" = set; then :
4367 $as_echo_n "(cached) " >&6
4368else
4369 if test "x$target_alias" = x; then
4370 ac_cv_target=$ac_cv_host
4371else
4372 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4373 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4374fi
4375
4376fi
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4378$as_echo "$ac_cv_target" >&6; }
4379case $ac_cv_target in
4380*-*-*) ;;
4381*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4382esac
4383target=$ac_cv_target
4384ac_save_IFS=$IFS; IFS='-'
4385set x $ac_cv_target
4386shift
4387target_cpu=$1
4388target_vendor=$2
4389shift; shift
4390# Remember, the first character of IFS is used to create $*,
4391# except with old shells:
4392target_os=$*
4393IFS=$ac_save_IFS
4394case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4395
4396
4397# The aliases save the names the user supplied, while $host etc.
4398# will get canonicalized.
4399test -n "$target_alias" &&
4400 test "$program_prefix$program_suffix$program_transform_name" = \
4401 NONENONEs,x,x, &&
4402 program_prefix=${target_alias}-
4403
4404# The tests for host and target for $enable_largefile require
4405# canonical names.
4406
4407
81ecdfbb 4408
da2f07f1
JK
4409# As the $enable_largefile decision depends on --enable-plugins we must set it
4410# even in directories otherwise not depending on the $plugins option.
4411
4412
2974be62
AM
4413 maybe_plugins=no
4414 for ac_header in dlfcn.h
4415do :
4416 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4417"
4418if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4419 cat >>confdefs.h <<_ACEOF
4420#define HAVE_DLFCN_H 1
4421_ACEOF
4422 maybe_plugins=yes
4423fi
4424
4425done
4426
4427 for ac_header in windows.h
4428do :
4429 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4430"
4431if test "x$ac_cv_header_windows_h" = x""yes; then :
4432 cat >>confdefs.h <<_ACEOF
4433#define HAVE_WINDOWS_H 1
4434_ACEOF
4435 maybe_plugins=yes
4436fi
4437
4438done
4439
4440
4441 # Check whether --enable-plugins was given.
da2f07f1
JK
4442if test "${enable_plugins+set}" = set; then :
4443 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4444 no) plugins=no ;;
4445 *) plugins=yes
4446 if test "$maybe_plugins" != "yes" ; then
4447 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4448 fi ;;
4449 esac
da2f07f1 4450else
2974be62
AM
4451 plugins=$maybe_plugins
4452
da2f07f1
JK
4453fi
4454
2974be62
AM
4455 if test "$plugins" = "yes"; then
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4457$as_echo_n "checking for library containing dlopen... " >&6; }
4458if test "${ac_cv_search_dlopen+set}" = set; then :
4459 $as_echo_n "(cached) " >&6
4460else
4461 ac_func_search_save_LIBS=$LIBS
4462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463/* end confdefs.h. */
4464
4465/* Override any GCC internal prototype to avoid an error.
4466 Use char because int might match the return type of a GCC
4467 builtin and then its argument prototype would still apply. */
4468#ifdef __cplusplus
4469extern "C"
4470#endif
4471char dlopen ();
4472int
4473main ()
4474{
4475return dlopen ();
4476 ;
4477 return 0;
4478}
4479_ACEOF
4480for ac_lib in '' dl; do
4481 if test -z "$ac_lib"; then
4482 ac_res="none required"
4483 else
4484 ac_res=-l$ac_lib
4485 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4486 fi
4487 if ac_fn_c_try_link "$LINENO"; then :
4488 ac_cv_search_dlopen=$ac_res
4489fi
4490rm -f core conftest.err conftest.$ac_objext \
4491 conftest$ac_exeext
4492 if test "${ac_cv_search_dlopen+set}" = set; then :
4493 break
4494fi
4495done
4496if test "${ac_cv_search_dlopen+set}" = set; then :
4497
4498else
4499 ac_cv_search_dlopen=no
4500fi
4501rm conftest.$ac_ext
4502LIBS=$ac_func_search_save_LIBS
4503fi
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4505$as_echo "$ac_cv_search_dlopen" >&6; }
4506ac_res=$ac_cv_search_dlopen
4507if test "$ac_res" != no; then :
4508 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4509
4510fi
4511
4512 fi
da2f07f1
JK
4513
4514
4515case "${host}" in
4516 sparc-*-solaris*|i[3-7]86-*-solaris*)
4517 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4518 # are mutually exclusive; and without procfs support, the bfd/ elf module
4519 # cannot provide certain routines such as elfcore_write_prpsinfo
4520 # or elfcore_write_prstatus. So unless the user explicitly requested
4521 # large-file support through the --enable-largefile switch, disable
4522 # large-file support in favor of procfs support.
4523 test "${target}" = "${host}" -a "x$plugins" = xno \
4524 && : ${enable_largefile="no"}
4525 ;;
4526esac
4527
4528# Check whether --enable-largefile was given.
4529if test "${enable_largefile+set}" = set; then :
4530 enableval=$enable_largefile;
4531fi
4532
4533if test "$enable_largefile" != no; then
4534
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4536$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4537if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4538 $as_echo_n "(cached) " >&6
4539else
4540 ac_cv_sys_largefile_CC=no
4541 if test "$GCC" != yes; then
4542 ac_save_CC=$CC
4543 while :; do
4544 # IRIX 6.2 and later do not support large files by default,
4545 # so use the C compiler's -n32 option if that helps.
4546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4547/* end confdefs.h. */
4548#include <sys/types.h>
4549 /* Check that off_t can represent 2**63 - 1 correctly.
4550 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4551 since some C++ compilers masquerading as C compilers
4552 incorrectly reject 9223372036854775807. */
4553#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4554 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4555 && LARGE_OFF_T % 2147483647 == 1)
4556 ? 1 : -1];
4557int
4558main ()
4559{
4560
4561 ;
4562 return 0;
4563}
4564_ACEOF
4565 if ac_fn_c_try_compile "$LINENO"; then :
4566 break
4567fi
4568rm -f core conftest.err conftest.$ac_objext
4569 CC="$CC -n32"
4570 if ac_fn_c_try_compile "$LINENO"; then :
4571 ac_cv_sys_largefile_CC=' -n32'; break
4572fi
4573rm -f core conftest.err conftest.$ac_objext
4574 break
4575 done
4576 CC=$ac_save_CC
4577 rm -f conftest.$ac_ext
4578 fi
4579fi
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4581$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4582 if test "$ac_cv_sys_largefile_CC" != no; then
4583 CC=$CC$ac_cv_sys_largefile_CC
4584 fi
4585
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4587$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4588if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4589 $as_echo_n "(cached) " >&6
4590else
4591 while :; do
4592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4593/* end confdefs.h. */
4594#include <sys/types.h>
4595 /* Check that off_t can represent 2**63 - 1 correctly.
4596 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4597 since some C++ compilers masquerading as C compilers
4598 incorrectly reject 9223372036854775807. */
4599#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4600 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4601 && LARGE_OFF_T % 2147483647 == 1)
4602 ? 1 : -1];
4603int
4604main ()
4605{
4606
4607 ;
4608 return 0;
4609}
4610_ACEOF
4611if ac_fn_c_try_compile "$LINENO"; then :
4612 ac_cv_sys_file_offset_bits=no; break
4613fi
4614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4616/* end confdefs.h. */
4617#define _FILE_OFFSET_BITS 64
4618#include <sys/types.h>
4619 /* Check that off_t can represent 2**63 - 1 correctly.
4620 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4621 since some C++ compilers masquerading as C compilers
4622 incorrectly reject 9223372036854775807. */
4623#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4624 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4625 && LARGE_OFF_T % 2147483647 == 1)
4626 ? 1 : -1];
4627int
4628main ()
4629{
4630
4631 ;
4632 return 0;
4633}
4634_ACEOF
4635if ac_fn_c_try_compile "$LINENO"; then :
4636 ac_cv_sys_file_offset_bits=64; break
4637fi
4638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4639 ac_cv_sys_file_offset_bits=unknown
4640 break
4641done
4642fi
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4644$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4645case $ac_cv_sys_file_offset_bits in #(
4646 no | unknown) ;;
4647 *)
4648cat >>confdefs.h <<_ACEOF
4649#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4650_ACEOF
4651;;
4652esac
4653rm -rf conftest*
4654 if test $ac_cv_sys_file_offset_bits = unknown; then
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4656$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4657if test "${ac_cv_sys_large_files+set}" = set; then :
4658 $as_echo_n "(cached) " >&6
4659else
4660 while :; do
4661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4662/* end confdefs.h. */
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_large_files=no; break
4682fi
4683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4685/* end confdefs.h. */
4686#define _LARGE_FILES 1
4687#include <sys/types.h>
4688 /* Check that off_t can represent 2**63 - 1 correctly.
4689 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4690 since some C++ compilers masquerading as C compilers
4691 incorrectly reject 9223372036854775807. */
4692#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4693 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4694 && LARGE_OFF_T % 2147483647 == 1)
4695 ? 1 : -1];
4696int
4697main ()
4698{
4699
4700 ;
4701 return 0;
4702}
4703_ACEOF
4704if ac_fn_c_try_compile "$LINENO"; then :
4705 ac_cv_sys_large_files=1; break
4706fi
4707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4708 ac_cv_sys_large_files=unknown
4709 break
4710done
4711fi
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4713$as_echo "$ac_cv_sys_large_files" >&6; }
4714case $ac_cv_sys_large_files in #(
4715 no | unknown) ;;
4716 *)
4717cat >>confdefs.h <<_ACEOF
4718#define _LARGE_FILES $ac_cv_sys_large_files
4719_ACEOF
4720;;
4721esac
4722rm -rf conftest*
4723 fi
4724fi
4725
4726
4727
81ecdfbb
RW
4728
4729
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4731$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4732if test "${am_cv_prog_cc_stdc+set}" = set; then :
4733 $as_echo_n "(cached) " >&6
4734else
4735 am_cv_prog_cc_stdc=no
4736ac_save_CC="$CC"
4737# Don't try gcc -ansi; that turns off useful extensions and
4738# breaks some systems' header files.
4739# AIX -qlanglvl=ansi
4740# Ultrix and OSF/1 -std1
4741# HP-UX 10.20 and later -Ae
4742# HP-UX older versions -Aa -D_HPUX_SOURCE
4743# SVR4 -Xc -D__EXTENSIONS__
4744for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4745do
783e057b 4746 CC="$ac_save_CC $ac_arg"
81ecdfbb 4747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4748/* end confdefs.h. */
4749#include <stdarg.h>
4750#include <stdio.h>
4751#include <sys/types.h>
4752#include <sys/stat.h>
4753/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4754struct buf { int x; };
4755FILE * (*rcsopen) (struct buf *, struct stat *, int);
4756static char *e (p, i)
4757 char **p;
4758 int i;
4759{
4760 return p[i];
4761}
4762static char *f (char * (*g) (char **, int), char **p, ...)
4763{
4764 char *s;
4765 va_list v;
4766 va_start (v,p);
4767 s = g (p, va_arg (v,int));
4768 va_end (v);
4769 return s;
4770}
4771int test (int i, double x);
4772struct s1 {int (*f) (int a);};
4773struct s2 {int (*f) (double a);};
4774int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4775int argc;
4776char **argv;
4777
4778int
4779main ()
4780{
4781
4782return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4783
4784 ;
4785 return 0;
4786}
4787_ACEOF
81ecdfbb 4788if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4789 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4790fi
81ecdfbb 4791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4792done
4793CC="$ac_save_CC"
4794
4795fi
4796
4797if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4799$as_echo "none needed" >&6; }
783e057b 4800else
81ecdfbb
RW
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4802$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4803fi
4804case "x$am_cv_prog_cc_stdc" in
4805 x|xno) ;;
4806 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4807esac
4808
4869db5e
RM
4809# expand $ac_aux_dir to an absolute path
4810am_aux_dir=`cd $ac_aux_dir && pwd`
4811
4812if test x"${install_sh}" != xset; then
4813 case $am_aux_dir in
4814 *\ * | *\ *)
4815 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4816 *)
4817 install_sh="\${SHELL} $am_aux_dir/install-sh"
4818 esac
4819fi
4820
4821# Installed binaries are usually stripped using `strip' when the user
4822# run `make install-strip'. However `strip' might not be the right
4823# tool to use in cross-compilation environments, therefore Automake
4824# will honor the `STRIP' environment variable to overrule this program.
4825if test "$cross_compiling" != no; then
4826 if test -n "$ac_tool_prefix"; then
4827 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4828set dummy ${ac_tool_prefix}strip; ac_word=$2
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4830$as_echo_n "checking for $ac_word... " >&6; }
4831if test "${ac_cv_prog_STRIP+set}" = set; then :
4832 $as_echo_n "(cached) " >&6
4833else
4834 if test -n "$STRIP"; then
4835 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4836else
4837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in $PATH
4839do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
4842 for ac_exec_ext in '' $ac_executable_extensions; do
4843 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4844 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846 break 2
4847 fi
4848done
4849 done
4850IFS=$as_save_IFS
4851
4852fi
4853fi
4854STRIP=$ac_cv_prog_STRIP
4855if test -n "$STRIP"; then
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4857$as_echo "$STRIP" >&6; }
4858else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860$as_echo "no" >&6; }
4861fi
4862
4863
4864fi
4865if test -z "$ac_cv_prog_STRIP"; then
4866 ac_ct_STRIP=$STRIP
4867 # Extract the first word of "strip", so it can be a program name with args.
4868set dummy strip; ac_word=$2
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
4871if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4872 $as_echo_n "(cached) " >&6
4873else
4874 if test -n "$ac_ct_STRIP"; then
4875 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4876else
4877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878for as_dir in $PATH
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
4883 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4884 ac_cv_prog_ac_ct_STRIP="strip"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888done
4889 done
4890IFS=$as_save_IFS
4891
4892fi
4893fi
4894ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4895if test -n "$ac_ct_STRIP"; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4897$as_echo "$ac_ct_STRIP" >&6; }
4898else
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
4901fi
4902
4903 if test "x$ac_ct_STRIP" = x; then
4904 STRIP=":"
4905 else
4906 case $cross_compiling:$ac_tool_warned in
4907yes:)
4908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4910ac_tool_warned=yes ;;
4911esac
4912 STRIP=$ac_ct_STRIP
4913 fi
4914else
4915 STRIP="$ac_cv_prog_STRIP"
4916fi
4917
4918fi
4919INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4920
783e057b
DJ
4921
4922ac_aux_dir=
81ecdfbb
RW
4923for ac_dir in .. "$srcdir"/..; do
4924 for ac_t in install-sh install.sh shtool; do
4925 if test -f "$ac_dir/$ac_t"; then
4926 ac_aux_dir=$ac_dir
4927 ac_install_sh="$ac_aux_dir/$ac_t -c"
4928 break 2
4929 fi
4930 done
783e057b
DJ
4931done
4932if test -z "$ac_aux_dir"; then
81ecdfbb 4933 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4934fi
81ecdfbb
RW
4935
4936# These three variables are undocumented and unsupported,
4937# and are intended to be withdrawn in a future Autoconf release.
4938# They can cause serious problems if a builder's source tree is in a directory
4939# whose full name contains unusual characters.
4940ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4941ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4942ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4943
783e057b 4944
783e057b 4945
9009e1ae
MR
4946test "$program_prefix" != NONE &&
4947 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4948# Use a double $ so make ignores it.
4949test "$program_suffix" != NONE &&
4950 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4951# Double any \ or $.
4952# By default was `s,x,x', remove it if useless.
4953ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4954program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4955
81ecdfbb 4956
3bc3d82a
PA
4957# See if we are building with C++, and substitute COMPILER.
4958
4959 # Check whether --enable-build-with-cxx was given.
4960if test "${enable_build_with_cxx+set}" = set; then :
4961 enableval=$enable_build_with_cxx; case $enableval in
4962 yes | no)
4963 ;;
4964 *)
4965 as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
4966 esac
4967else
a2358508 4968 enable_build_with_cxx=yes
3bc3d82a
PA
4969fi
4970
4971
4972 if test "$enable_build_with_cxx" = "yes"; then
dad44a1f 4973 COMPILER='$(CXX)'
a994041d 4974 COMPILER_CFLAGS='$(CXXFLAGS)'
3bc3d82a
PA
4975 else
4976 COMPILER='$(CC)'
a994041d 4977 COMPILER_CFLAGS='$(CFLAGS)'
3bc3d82a
PA
4978 fi
4979
4980
4981
a994041d 4982
a417dc56
RW
4983# Dependency checking.
4984rm -rf .tst 2>/dev/null
4985mkdir .tst 2>/dev/null
4986if test -d .tst; then
4987 am__leading_dot=.
4988else
4989 am__leading_dot=_
4990fi
4991rmdir .tst 2>/dev/null
4992
4993DEPDIR="${am__leading_dot}deps"
4994
81ecdfbb 4995ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4996
4997
4998depcc="$CC" am_compiler_list=
4999
5000am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5002$as_echo_n "checking dependency style of $depcc... " >&6; }
5003if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5004 $as_echo_n "(cached) " >&6
a417dc56
RW
5005else
5006 if test -f "$am_depcomp"; then
5007 # We make a subdir and do the tests there. Otherwise we can end up
5008 # making bogus files that we don't know about and never remove. For
5009 # instance it was reported that on HP-UX the gcc test will end up
5010 # making a dummy file named `D' -- because `-MD' means `put the output
5011 # in D'.
5012 mkdir conftest.dir
5013 # Copy depcomp to subdir because otherwise we won't find it if we're
5014 # using a relative directory.
5015 cp "$am_depcomp" conftest.dir
5016 cd conftest.dir
5017 # We will build objects and dependencies in a subdirectory because
5018 # it helps to detect inapplicable dependency modes. For instance
5019 # both Tru64's cc and ICC support -MD to output dependencies as a
5020 # side effect of compilation, but ICC will put the dependencies in
5021 # the current directory while Tru64 will put them in the object
5022 # directory.
5023 mkdir sub
5024
5025 am_cv_CC_dependencies_compiler_type=none
5026 if test "$am_compiler_list" = ""; then
5027 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5028 fi
5029 for depmode in $am_compiler_list; do
5030 if test $depmode = none; then break; fi
5031
81ecdfbb 5032 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5033 # Setup a source with many dependencies, because some compilers
5034 # like to wrap large dependency lists on column 80 (with \), and
5035 # we should not choose a depcomp mode which is confused by this.
5036 #
5037 # We need to recreate these files for each test, as the compiler may
5038 # overwrite some of them when testing with obscure command lines.
5039 # This happens at least with the AIX C compiler.
5040 : > sub/conftest.c
5041 for i in 1 2 3 4 5 6; do
5042 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5043 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5044 # Solaris 8's {/usr,}/bin/sh.
5045 touch sub/conftst$i.h
5046 done
5047 echo "include sub/conftest.Po" > confmf
5048
5049 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5050 # mode. It turns out that the SunPro C++ compiler does not properly
5051 # handle `-M -o', and we need to detect this.
5052 depcmd="depmode=$depmode \
5053 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5054 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5055 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
5056 echo "| $depcmd" | sed -e 's/ */ /g' >&5
5057 if env $depcmd > conftest.err 2>&1 &&
5058 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
5059 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
5060 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
5061 # icc doesn't choke on unknown options, it will just issue warnings
5062 # or remarks (even with -Werror). So we grep stderr for any message
5063 # that says an option was ignored or not supported.
5064 # When given -MP, icc 7.0 and 7.1 complain thusly:
5065 # icc: Command line warning: ignoring option '-M'; no argument required
5066 # The diagnosis changed in icc 8.0:
5067 # icc: Command line remark: option '-MP' not supported
5068 if (grep 'ignoring option' conftest.err ||
5069 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5070 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 5071 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
5072 break
5073 fi
5074 fi
81ecdfbb 5075 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
5076 sed -e 's/^/| /' < conftest.err >&5
5077 done
5078
5079 cd ..
5080 rm -rf conftest.dir
5081else
5082 am_cv_CC_dependencies_compiler_type=none
5083fi
5084
5085fi
81ecdfbb
RW
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5087$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 5088if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 5089then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
5090else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5091
5092fi
5093
5094
5095# Check for the 'make' the user wants to use.
5096for ac_prog in make
5097do
5098 # Extract the first word of "$ac_prog", so it can be a program name with args.
5099set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
5102if test "${ac_cv_prog_MAKE+set}" = set; then :
5103 $as_echo_n "(cached) " >&6
a417dc56
RW
5104else
5105 if test -n "$MAKE"; then
5106 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
5107else
5108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109for as_dir in $PATH
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5113 for ac_exec_ext in '' $ac_executable_extensions; do
5114 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 5115 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 5116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
5117 break 2
5118 fi
5119done
81ecdfbb
RW
5120 done
5121IFS=$as_save_IFS
a417dc56
RW
5122
5123fi
5124fi
5125MAKE=$ac_cv_prog_MAKE
5126if test -n "$MAKE"; then
81ecdfbb
RW
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
5128$as_echo "$MAKE" >&6; }
a417dc56 5129else
81ecdfbb
RW
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131$as_echo "no" >&6; }
a417dc56
RW
5132fi
5133
81ecdfbb 5134
a417dc56
RW
5135 test -n "$MAKE" && break
5136done
5137
5138MAKE_IS_GNU=
5139case "`$MAKE --version 2>&1 | sed 1q`" in
5140 *GNU*)
5141 MAKE_IS_GNU=yes
5142 ;;
5143esac
81ecdfbb 5144 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
5145 GMAKE_TRUE=
5146 GMAKE_FALSE='#'
5147else
5148 GMAKE_TRUE='#'
5149 GMAKE_FALSE=
5150fi
5151
81ecdfbb
RW
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5153$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5154set x ${MAKE-make}
5155ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5156if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5157 $as_echo_n "(cached) " >&6
a417dc56
RW
5158else
5159 cat >conftest.make <<\_ACEOF
81ecdfbb 5160SHELL = /bin/sh
a417dc56 5161all:
81ecdfbb 5162 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
5163_ACEOF
5164# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
5165case `${MAKE-make} -f conftest.make 2>/dev/null` in
5166 *@@@%%%=?*=@@@%%%*)
5167 eval ac_cv_prog_make_${ac_make}_set=yes;;
5168 *)
5169 eval ac_cv_prog_make_${ac_make}_set=no;;
5170esac
a417dc56
RW
5171rm -f conftest.make
5172fi
81ecdfbb
RW
5173if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5175$as_echo "yes" >&6; }
a417dc56
RW
5176 SET_MAKE=
5177else
81ecdfbb
RW
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
a417dc56
RW
5180 SET_MAKE="MAKE=${MAKE-make}"
5181fi
5182
5183
648d586d
JB
5184gnulib_extra_configure_args=
5185# If large-file support is disabled, make sure gnulib does the same.
5186if test "$enable_largefile" = no; then
5187gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
5188fi
5189
c971b7fa
PA
5190# Configure gnulib. We need to build gnulib under some other
5191# directory not "gnulib", to avoid the problem of both GDB and
5192# GDBserver wanting to build it in the same directory, when building
5193# in the source dir.
783e057b 5194
c971b7fa
PA
5195 in_src="gnulib"
5196 in_build="build-gnulib"
648d586d 5197 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
5198
5199 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
5200 # so they do not pile up.
5201 ac_sub_configure_args=
5202 ac_prev=
5203 eval "set x $ac_configure_args"
5204 shift
5205 for ac_arg
5206 do
5207 if test -n "$ac_prev"; then
5208 ac_prev=
5209 continue
5210 fi
5211 case $ac_arg in
5212 -cache-file | --cache-file | --cache-fil | --cache-fi \
5213 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5214 ac_prev=cache_file ;;
5215 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5216 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
5217 | --c=*)
5218 ;;
5219 --config-cache | -C)
5220 ;;
5221 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5222 ac_prev=srcdir ;;
5223 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5224 ;;
5225 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
5226 ac_prev=prefix ;;
5227 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
5228 ;;
5229 --disable-option-checking)
5230 ;;
5231 *)
5232 case $ac_arg in
5233 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5234 esac
5235 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
5236 esac
5237 done
5238
5239 # Always prepend --prefix to ensure using the same prefix
5240 # in subdir configurations.
5241 ac_arg="--prefix=$prefix"
5242 case $ac_arg in
5243 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
5244 esac
5245 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
5246
5247 # Pass --silent
5248 if test "$silent" = yes; then
5249 ac_sub_configure_args="--silent $ac_sub_configure_args"
5250 fi
5251
5252 # Always prepend --disable-option-checking to silence warnings, since
5253 # different subdirs can have different --enable and --with options.
5254 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
5255
5256 ac_popdir=`pwd`
5257 ac_dir=$in_build
5258
5259 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
5260 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
5261 $as_echo "$ac_msg" >&6
5262 as_dir="$ac_dir"; as_fn_mkdir_p
5263
38ea300a
PA
5264 case $srcdir in
5265 [\\/]* | ?:[\\/]* )
5266 ac_srcdir=$srcdir/$in_src ;;
5267 *) # Relative name.
5268 ac_srcdir=../$srcdir/$in_src ;;
5269 esac
c971b7fa
PA
5270
5271 cd "$ac_dir"
5272
5273 ac_sub_configure=$ac_srcdir/configure
5274
5275 # Make the cache file name correct relative to the subdirectory.
5276 case $cache_file in
5277 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
5278 *) # Relative name.
5279 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
5280 esac
5281
648d586d
JB
5282 if test -n "$in_extra_args"; then
5283 # Add the extra args at the end.
5284 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
5285 fi
5286
c971b7fa
PA
5287 { $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
5288$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
5289 # The eval makes quoting arguments work.
5290 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
5291 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
5292 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
5293
5294 cd "$ac_popdir"
783e057b 5295
c971b7fa
PA
5296
5297
5298CONFIG_OBS=
5299CONFIG_DEPS=
5300CONFIG_SRCS=
5301ENABLE_CFLAGS=
5302
5303CONFIG_ALL=
5304CONFIG_CLEAN=
5305CONFIG_INSTALL=
5306CONFIG_UNINSTALL=
5307
5308# If we haven't got the data from the intl directory,
5309# assume NLS is disabled.
5310USE_NLS=no
5311LIBINTL=
5312LIBINTL_DEP=
5313INCINTL=
5314XGETTEXT=
5315GMSGFMT=
5316POSUB=
783e057b
DJ
5317
5318if test -f ../intl/config.intl; then
5319 . ../intl/config.intl
5320fi
81ecdfbb
RW
5321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5322$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 5323if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325$as_echo "no" >&6; }
783e057b 5326else
81ecdfbb
RW
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5328$as_echo "yes" >&6; }
783e057b 5329
81ecdfbb 5330$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
5331
5332
81ecdfbb
RW
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
5334$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
5335 # Look for .po and .gmo files in the source directory.
5336 CATALOGS=
5337 XLINGUAS=
5338 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
5339 # If there aren't any .gmo files the shell will give us the
5340 # literal string "../path/to/srcdir/po/*.gmo" which has to be
5341 # weeded out.
5342 case "$cat" in *\**)
5343 continue;;
5344 esac
5345 # The quadruple backslash is collapsed to a double backslash
5346 # by the backticks, then collapsed again by the double quotes,
5347 # leaving us with one backslash in the sed expression (right
5348 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5349 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5350 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5351 # The user is allowed to set LINGUAS to a list of languages to
5352 # install catalogs for. If it's empty that means "all of them."
5353 if test "x$LINGUAS" = x; then
5354 CATALOGS="$CATALOGS $cat"
5355 XLINGUAS="$XLINGUAS $lang"
5356 else
5357 case "$LINGUAS" in *$lang*)
5358 CATALOGS="$CATALOGS $cat"
5359 XLINGUAS="$XLINGUAS $lang"
5360 ;;
5361 esac
e28b3332
DJ
5362 fi
5363 done
c971b7fa
PA
5364 LINGUAS="$XLINGUAS"
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5366$as_echo "$LINGUAS" >&6; }
5367
5368
5369 DATADIRNAME=share
5370
5371 INSTOBJEXT=.mo
5372
5373 GENCAT=gencat
5374
5375 CATOBJEXT=.gmo
e28b3332 5376
e28b3332
DJ
5377fi
5378
c971b7fa
PA
5379localedir='${datadir}/locale'
5380
5381
5382if test x"$USE_NLS" = xyes; then
5383 CONFIG_ALL="$CONFIG_ALL all-po"
5384 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5385 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5386 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5387fi
e28b3332 5388
c971b7fa
PA
5389GNULIB=build-gnulib/import
5390
5391# For Makefile dependencies.
5392GNULIB_STDINT_H=
5393if test x"$STDINT_H" != x; then
5394 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5395fi
5396
5397
c971b7fa
PA
5398PACKAGE=gdb
5399
5400cat >>confdefs.h <<_ACEOF
5401#define PACKAGE "$PACKAGE"
5402_ACEOF
5403
5404
5405
5406# We never need to detect it in this sub-configure.
5407# But preserve it for config.status --recheck.
5408
5409
5410
5411MAKEINFO_EXTRA_FLAGS=""
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5413$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5414if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5415 $as_echo_n "(cached) " >&6
5416else
5417 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5418 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5419 gdb_cv_have_makeinfo_click=yes
5420 else
5421 gdb_cv_have_makeinfo_click=no
5422 fi
5423fi
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5425$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5426if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5427 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5428fi
e28b3332
DJ
5429
5430
bec39cab
AC
5431
5432
81ecdfbb
RW
5433# Check whether --with-separate-debug-dir was given.
5434if test "${with_separate_debug_dir+set}" = set; then :
5435 withval=$with_separate_debug_dir;
b14b1491
TT
5436 DEBUGDIR=$withval
5437else
5438 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5439fi
5440
20e95c23 5441
783e057b
DJ
5442 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5443 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5444 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5445 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5446
783e057b
DJ
5447cat >>confdefs.h <<_ACEOF
5448#define DEBUGDIR "$ac_define_dir"
20e95c23 5449_ACEOF
20e95c23 5450
20e95c23 5451
20e95c23 5452
0c4a4063 5453
b14b1491
TT
5454 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5455 if test "x$prefix" = xNONE; then
5456 test_prefix=/usr/local
5457 else
5458 test_prefix=$prefix
5459 fi
783e057b 5460 else
b14b1491 5461 test_prefix=$exec_prefix
783e057b 5462 fi
b14b1491
TT
5463 value=0
5464 case ${ac_define_dir} in
5465 "${test_prefix}"|"${test_prefix}/"*|\
5466 '${exec_prefix}'|'${exec_prefix}/'*)
5467 value=1
5468 ;;
5469 esac
5470
5471cat >>confdefs.h <<_ACEOF
5472#define DEBUGDIR_RELOCATABLE $value
5473_ACEOF
5474
5475
5476
0c4a4063 5477
f83d8a90
DE
5478# We can't pass paths as command line arguments.
5479# Mingw32 tries to be clever and will convert the paths for us.
5480# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5481# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5482# This breaks GDB's relocatable path conversions since paths passed in
5483# config.h would not get so translated, the path prefixes no longer match.
5484
5485 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5486 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5487 ac_define_dir=`eval echo $bindir`
5488 ac_define_dir=`eval echo $ac_define_dir`
5489
5490cat >>confdefs.h <<_ACEOF
5491#define BINDIR "$ac_define_dir"
5492_ACEOF
5493
5494
5495
b14b1491
TT
5496# GDB's datadir relocation
5497
5498
5499
81ecdfbb
RW
5500# Check whether --with-gdb-datadir was given.
5501if test "${with_gdb_datadir+set}" = set; then :
5502 withval=$with_gdb_datadir;
b14b1491 5503 GDB_DATADIR=$withval
20e95c23 5504else
b14b1491 5505 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5506fi
5507
20e95c23 5508
b14b1491
TT
5509 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5510 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5511 ac_define_dir=`eval echo $GDB_DATADIR`
5512 ac_define_dir=`eval echo $ac_define_dir`
5513
5514cat >>confdefs.h <<_ACEOF
5515#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5516_ACEOF
5517
b14b1491
TT
5518
5519
0c4a4063 5520
b14b1491
TT
5521 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5522 if test "x$prefix" = xNONE; then
5523 test_prefix=/usr/local
5524 else
5525 test_prefix=$prefix
5526 fi
5527 else
5528 test_prefix=$exec_prefix
5529 fi
5530 value=0
5531 case ${ac_define_dir} in
5532 "${test_prefix}"|"${test_prefix}/"*|\
5533 '${exec_prefix}'|'${exec_prefix}/'*)
5534 value=1
5535 ;;
5536 esac
5537
5538cat >>confdefs.h <<_ACEOF
5539#define GDB_DATADIR_RELOCATABLE $value
5540_ACEOF
5541
5542
783e057b 5543
20e95c23 5544
0c4a4063 5545
81ecdfbb
RW
5546# Check whether --with-relocated-sources was given.
5547if test "${with_relocated_sources+set}" = set; then :
5548 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5549
5550 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5551 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5552 ac_define_dir=`eval echo $reloc_srcdir`
5553 ac_define_dir=`eval echo $ac_define_dir`
5554
5555cat >>confdefs.h <<_ACEOF
5556#define RELOC_SRCDIR "$ac_define_dir"
5557_ACEOF
5558
5559
5560
81ecdfbb
RW
5561fi
5562
29b0e8a2 5563
7349ff92
JK
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5565$as_echo_n "checking for default auto-load directory... " >&6; }
5566
5567# Check whether --with-auto-load-dir was given.
5568if test "${with_auto_load_dir+set}" = set; then :
5569 withval=$with_auto_load_dir;
5570else
1564a261 5571 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5572fi
5573
1564a261 5574escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5575
5576 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5577 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5578 ac_define_dir=`eval echo $escape_dir`
5579 ac_define_dir=`eval echo $ac_define_dir`
5580
5581cat >>confdefs.h <<_ACEOF
5582#define AUTO_LOAD_DIR "$ac_define_dir"
5583_ACEOF
5584
5585
5586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5587$as_echo "$with_auto_load_dir" >&6; }
5588
bccbefd2
JK
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5590$as_echo_n "checking for default auto-load safe-path... " >&6; }
5591
5592# Check whether --with-auto-load-safe-path was given.
5593if test "${with_auto_load_safe_path+set}" = set; then :
5594 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5595 with_auto_load_safe_path="/"
5596 fi
bccbefd2 5597else
7349ff92 5598 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5599fi
5600
1564a261 5601escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5602
5603 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5604 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5605 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5606 ac_define_dir=`eval echo $ac_define_dir`
5607
5608cat >>confdefs.h <<_ACEOF
6dea1fbd 5609#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5610_ACEOF
5611
5612
5613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5614$as_echo "$with_auto_load_safe_path" >&6; }
5615
29b0e8a2 5616
20e95c23 5617
5ae98d25 5618subdirs="$subdirs testsuite"
20e95c23
DJ
5619
5620
783e057b 5621# Check whether to support alternative target configurations
81ecdfbb
RW
5622# Check whether --enable-targets was given.
5623if test "${enable_targets+set}" = set; then :
5624 enableval=$enable_targets; case "${enableval}" in
5625 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5626 ;;
5627 no) enable_targets= ;;
5628 *) enable_targets=$enableval ;;
5629esac
81ecdfbb
RW
5630fi
5631
20e95c23 5632
783e057b 5633# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5634# Check whether --enable-64-bit-bfd was given.
5635if test "${enable_64_bit_bfd+set}" = set; then :
5636 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5637 yes) want64=true ;;
5638 no) want64=false ;;
81ecdfbb 5639 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5640esac
5641else
5642 want64=false
81ecdfbb
RW
5643fi
5644
783e057b
DJ
5645# Provide defaults for some variables set by the per-host and per-target
5646# configuration.
5647gdb_host_obs=posix-hdep.o
20e95c23 5648
783e057b
DJ
5649if test "${target}" = "${host}"; then
5650 gdb_native=yes
5651else
5652 gdb_native=no
5653fi
20e95c23 5654
783e057b 5655. $srcdir/configure.host
20e95c23 5656
fb23d554
SDJ
5657# Add in the common host objects.
5658. $srcdir/common/common.host
5659gdb_host_obs="$gdb_host_obs $common_host_obs"
5660
783e057b 5661# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5662
783e057b
DJ
5663TARGET_OBS=
5664all_targets=
b292c783 5665HAVE_NATIVE_GCORE_TARGET=
20e95c23 5666
783e057b 5667for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5668do
783e057b
DJ
5669 if test "$targ_alias" = "all"; then
5670 all_targets=true
5671 else
5672 # Canonicalize the secondary target names.
5673 result=`$ac_config_sub $targ_alias 2>/dev/null`
5674 if test -n "$result"; then
5675 targ=$result
5676 else
5677 targ=$targ_alias
5678 fi
20e95c23 5679
783e057b 5680 . ${srcdir}/configure.tgt
20e95c23 5681
bf307134
JB
5682 if test -z "${gdb_target_obs}"; then :
5683 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5684fi
5685
783e057b
DJ
5686 # Target-specific object files
5687 for i in ${gdb_target_obs}; do
5688 case " $TARGET_OBS " in
5689 *" ${i} "*) ;;
5690 *)
5691 TARGET_OBS="$TARGET_OBS ${i}"
5692 ;;
5693 esac
5694 done
20e95c23 5695
783e057b
DJ
5696 # Check whether this target needs 64-bit CORE_ADDR
5697 if test x${want64} = xfalse; then
5698 . ${srcdir}/../bfd/config.bfd
5699 fi
b292c783
JK
5700
5701 # Check whether this target is native and supports gcore.
5702 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5703 && $gdb_have_gcore; then
5704 HAVE_NATIVE_GCORE_TARGET=1
5705 fi
783e057b 5706 fi
20e95c23
DJ
5707done
5708
783e057b
DJ
5709if test x${all_targets} = xtrue; then
5710
5711 # We want all 64-bit targets if we either:
5712 # - run on a 64-bit host or
5713 # - already require 64-bit support for some other target or
5714 # - the --enable-64-bit-bfd option was supplied
5715 # Otherwise we only support all 32-bit targets.
5716 #
5717 # NOTE: This test must be in sync with the corresponding
5718 # tests in BFD!
20e95c23 5719
783e057b 5720 if test x${want64} = xfalse; then
81ecdfbb
RW
5721 # The cast to long int works around a bug in the HP C Compiler
5722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5724# This bug is HP SR number 8606223364.
5725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5726$as_echo_n "checking size of long... " >&6; }
5727if test "${ac_cv_sizeof_long+set}" = set; then :
5728 $as_echo_n "(cached) " >&6
c0993dbe 5729else
81ecdfbb 5730 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5731
81ecdfbb
RW
5732else
5733 if test "$ac_cv_type_long" = yes; then
5734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5736{ as_fn_set_status 77
5737as_fn_error "cannot compute sizeof (long)
5738See \`config.log' for more details." "$LINENO" 5; }; }
5739 else
5740 ac_cv_sizeof_long=0
5741 fi
c0993dbe 5742fi
81ecdfbb 5743
c0993dbe 5744fi
81ecdfbb
RW
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5746$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5747
c0993dbe 5748
c0993dbe 5749
c0993dbe
UW
5750cat >>confdefs.h <<_ACEOF
5751#define SIZEOF_LONG $ac_cv_sizeof_long
5752_ACEOF
5753
5754
5755 if test "x${ac_cv_sizeof_long}" = "x8"; then
5756 want64=true
5757 fi
5758 fi
5759 if test x${want64} = xtrue; then
5760 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5761 else
5762 TARGET_OBS='$(ALL_TARGET_OBS)'
5763 fi
5764fi
5765
5766
5767
b292c783 5768
c0993dbe
UW
5769# For other settings, only the main target counts.
5770gdb_sim=
5771gdb_osabi=
5772build_gdbserver=
5773targ=$target; . ${srcdir}/configure.tgt
5774
5775# Fetch the default architecture and default target vector from BFD.
5776targ=$target; . $srcdir/../bfd/config.bfd
5777
5778# We only want the first architecture, so strip off the others if
5779# there is more than one.
5780targ_archs=`echo $targ_archs | sed 's/ .*//'`
5781
5782if test "x$targ_archs" != x; then
5783
5784cat >>confdefs.h <<_ACEOF
5785#define DEFAULT_BFD_ARCH $targ_archs
5786_ACEOF
5787
5788fi
5789if test "x$targ_defvec" != x; then
5790
5791cat >>confdefs.h <<_ACEOF
5792#define DEFAULT_BFD_VEC $targ_defvec
5793_ACEOF
5794
5795fi
5796
c0993dbe
UW
5797# The CLI cannot be disabled yet, but may be in the future.
5798
5799# Enable CLI.
81ecdfbb
RW
5800# Check whether --enable-gdbcli was given.
5801if test "${enable_gdbcli+set}" = set; then :
5802 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5803 yes)
5804 ;;
5805 no)
81ecdfbb 5806 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5807 *)
81ecdfbb 5808 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5809 esac
5810else
5811 enable_gdbcli=yes
81ecdfbb
RW
5812fi
5813
c0993dbe
UW
5814if test x"$enable_gdbcli" = xyes; then
5815 if test -d $srcdir/cli; then
5816 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5817 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5818 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5819 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5820 fi
5821fi
5822
5823# Enable MI.
81ecdfbb
RW
5824# Check whether --enable-gdbmi was given.
5825if test "${enable_gdbmi+set}" = set; then :
5826 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5827 yes | no)
5828 ;;
5829 *)
81ecdfbb 5830 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5831 esac
5832else
5833 enable_gdbmi=yes
81ecdfbb
RW
5834fi
5835
c0993dbe
UW
5836if test x"$enable_gdbmi" = xyes; then
5837 if test -d $srcdir/mi; then
5838 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5839 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5840 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5841 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5842 fi
5843fi
5844
5845# Enable TUI.
81ecdfbb
RW
5846# Check whether --enable-tui was given.
5847if test "${enable_tui+set}" = set; then :
5848 enableval=$enable_tui; case $enableval in
3ca64bd3 5849 yes | no | auto)
c0993dbe
UW
5850 ;;
5851 *)
81ecdfbb 5852 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5853 esac
5854else
3ca64bd3 5855 enable_tui=auto
81ecdfbb
RW
5856fi
5857
c0993dbe
UW
5858
5859# Enable gdbtk.
81ecdfbb
RW
5860# Check whether --enable-gdbtk was given.
5861if test "${enable_gdbtk+set}" = set; then :
5862 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5863 yes | no)
5864 ;;
5865 *)
81ecdfbb 5866 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5867 esac
5868else
5062cc19 5869 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5870 enable_gdbtk=yes
5871 else
5872 enable_gdbtk=no
5873 fi
81ecdfbb
RW
5874fi
5875
c0993dbe
UW
5876# We unconditionally disable gdbtk tests on selected platforms.
5877case $host_os in
5878 go32* | windows*)
81ecdfbb
RW
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5880$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5881 enable_gdbtk=no ;;
5882esac
5883
05e7c244 5884# Libunwind support for ia64.
bec39cab 5885
05e7c244
JK
5886
5887# Check whether --with-libunwind-ia64 was given.
5888if test "${with_libunwind_ia64+set}" = set; then :
5889 withval=$with_libunwind_ia64;
bec39cab 5890else
05e7c244
JK
5891 with_libunwind_ia64=auto
5892fi
bec39cab 5893
05e7c244
JK
5894
5895# Backward compatibility option.
5896if test "${with_libunwind+set}" = set; then
5897 if test x"$with_libunwind_ia64" != xauto; then
5898 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5899 fi
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5901$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5902 with_libunwind_ia64="$with_libunwind"
5903fi
5904
5905case "$with_libunwind_ia64" in
5906 yes | no)
5907 ;;
5908 auto)
5909 for ac_header in libunwind-ia64.h
81ecdfbb 5910do :
b54a8fd7
PA
5911 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5912if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5913 cat >>confdefs.h <<_ACEOF
b54a8fd7 5914#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5915_ACEOF
5916
5917fi
5918
5919done
5920
05e7c244
JK
5921 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5922 ;;
5923 *)
5924 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5925 ;;
5926esac
bec39cab 5927
05e7c244 5928if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5929 for ac_header in libunwind-ia64.h
81ecdfbb 5930do :
b54a8fd7
PA
5931 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5932if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5933 cat >>confdefs.h <<_ACEOF
b54a8fd7 5934#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5935_ACEOF
5936
5937fi
5938
5939done
5940
05e7c244
JK
5941 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5942 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5943 fi
5944 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5945 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5946 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5947fi
5948
cb01cfba
JB
5949opt_curses=no
5950
81ecdfbb
RW
5951# Check whether --with-curses was given.
5952if test "${with_curses+set}" = set; then :
5953 withval=$with_curses; opt_curses=$withval
5954fi
5955
cb01cfba 5956
76a39ba7 5957prefer_curses=no
cb01cfba 5958if test "$opt_curses" = "yes"; then
76a39ba7 5959 prefer_curses=yes
cb01cfba
JB
5960fi
5961
a9322a30 5962# Profiling support.
81ecdfbb
RW
5963# Check whether --enable-profiling was given.
5964if test "${enable_profiling+set}" = set; then :
5965 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5966 yes | no)
5967 ;;
5968 *)
81ecdfbb 5969 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5970 esac
5971else
5972 enable_profiling=no
81ecdfbb 5973fi
bec39cab 5974
a9322a30
TT
5975
5976for ac_func in monstartup _mcleanup
81ecdfbb
RW
5977do :
5978 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5979ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5980eval as_val=\$$as_ac_var
5981 if test "x$as_val" = x""yes; then :
5982 cat >>confdefs.h <<_ACEOF
5983#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5984_ACEOF
a9322a30 5985
81ecdfbb
RW
5986fi
5987done
a9322a30 5988
81ecdfbb
RW
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5990$as_echo_n "checking for _etext... " >&6; }
5991if test "${ac_cv_var__etext+set}" = set; then :
5992 $as_echo_n "(cached) " >&6
5993else
5994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5995/* end confdefs.h. */
5996#include <stdlib.h>
5997extern char _etext;
a9322a30
TT
5998
5999int
6000main ()
6001{
6002free (&_etext);
6003 ;
6004 return 0;
6005}
bec39cab 6006_ACEOF
81ecdfbb 6007if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6008 ac_cv_var__etext=yes
bec39cab 6009else
81ecdfbb 6010 ac_cv_var__etext=no
bec39cab 6011fi
81ecdfbb
RW
6012rm -f core conftest.err conftest.$ac_objext \
6013 conftest$ac_exeext conftest.$ac_ext
bec39cab 6014fi
81ecdfbb
RW
6015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6016$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6017if test $ac_cv_var__etext = yes; then
60ca704f 6018
81ecdfbb 6019$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6020
bec39cab 6021fi
81ecdfbb
RW
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6023$as_echo_n "checking for etext... " >&6; }
6024if test "${ac_cv_var_etext+set}" = set; then :
6025 $as_echo_n "(cached) " >&6
bec39cab 6026else
81ecdfbb 6027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6028/* end confdefs.h. */
a9322a30
TT
6029#include <stdlib.h>
6030extern char etext;
bec39cab
AC
6031
6032int
6033main ()
6034{
a9322a30 6035free (&etext);
bec39cab
AC
6036 ;
6037 return 0;
6038}
6039_ACEOF
81ecdfbb 6040if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6041 ac_cv_var_etext=yes
bec39cab 6042else
81ecdfbb 6043 ac_cv_var_etext=no
bec39cab 6044fi
81ecdfbb
RW
6045rm -f core conftest.err conftest.$ac_objext \
6046 conftest$ac_exeext conftest.$ac_ext
bec39cab 6047fi
81ecdfbb
RW
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6049$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6050if test $ac_cv_var_etext = yes; then
6051
81ecdfbb 6052$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6053
6054fi
a9322a30
TT
6055if test "$enable_profiling" = yes ; then
6056 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6057 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6058 fi
6059 PROFILE_CFLAGS=-pg
6060 OLD_CFLAGS="$CFLAGS"
6061 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6062
81ecdfbb
RW
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6064$as_echo_n "checking whether $CC supports -pg... " >&6; }
6065if test "${ac_cv_cc_supports_pg+set}" = set; then :
6066 $as_echo_n "(cached) " >&6
bec39cab 6067else
81ecdfbb 6068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6069/* end confdefs.h. */
bec39cab
AC
6070
6071int
6072main ()
6073{
a9322a30 6074int x;
bec39cab
AC
6075 ;
6076 return 0;
6077}
6078_ACEOF
81ecdfbb 6079if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6080 ac_cv_cc_supports_pg=yes
bec39cab 6081else
81ecdfbb 6082 ac_cv_cc_supports_pg=no
bec39cab 6083fi
81ecdfbb 6084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6085fi
81ecdfbb
RW
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6087$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6088
a9322a30 6089 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6090 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6091 fi
bec39cab 6092
a9322a30 6093 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6094fi
6095
c16158bc
JM
6096
6097
81ecdfbb
RW
6098# Check whether --with-pkgversion was given.
6099if test "${with_pkgversion+set}" = set; then :
6100 withval=$with_pkgversion; case "$withval" in
6101 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6102 no) PKGVERSION= ;;
6103 *) PKGVERSION="($withval) " ;;
6104 esac
6105else
6106 PKGVERSION="(GDB) "
6107
81ecdfbb 6108fi
c16158bc
JM
6109
6110
6111
6112
81ecdfbb
RW
6113
6114# Check whether --with-bugurl was given.
6115if test "${with_bugurl+set}" = set; then :
6116 withval=$with_bugurl; case "$withval" in
6117 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6118 no) BUGURL=
6119 ;;
6120 *) BUGURL="$withval"
6121 ;;
6122 esac
6123else
6124 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6125
81ecdfbb
RW
6126fi
6127
c16158bc
JM
6128 case ${BUGURL} in
6129 "")
6130 REPORT_BUGS_TO=
6131 REPORT_BUGS_TEXI=
6132 ;;
6133 *)
6134 REPORT_BUGS_TO="<$BUGURL>"
6135 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6136 ;;
6137 esac;
6138
6139
6140
6141
6142cat >>confdefs.h <<_ACEOF
6143#define PKGVERSION "$PKGVERSION"
6144_ACEOF
6145
6146
6147cat >>confdefs.h <<_ACEOF
6148#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
6149_ACEOF
6150
6151
bec39cab
AC
6152# --------------------- #
6153# Checks for programs. #
6154# --------------------- #
6155
6156for ac_prog in gawk mawk nawk awk
6157do
6158 # Extract the first word of "$ac_prog", so it can be a program name with args.
6159set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6161$as_echo_n "checking for $ac_word... " >&6; }
6162if test "${ac_cv_prog_AWK+set}" = set; then :
6163 $as_echo_n "(cached) " >&6
bec39cab
AC
6164else
6165 if test -n "$AWK"; then
6166 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6167else
6168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169for as_dir in $PATH
6170do
6171 IFS=$as_save_IFS
6172 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6173 for ac_exec_ext in '' $ac_executable_extensions; do
6174 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6175 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 6176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6177 break 2
6178 fi
6179done
81ecdfbb
RW
6180 done
6181IFS=$as_save_IFS
bec39cab
AC
6182
6183fi
6184fi
6185AWK=$ac_cv_prog_AWK
6186if test -n "$AWK"; then
81ecdfbb
RW
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6188$as_echo "$AWK" >&6; }
bec39cab 6189else
81ecdfbb
RW
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191$as_echo "no" >&6; }
bec39cab
AC
6192fi
6193
bec39cab 6194
81ecdfbb 6195 test -n "$AWK" && break
bec39cab
AC
6196done
6197
c971b7fa
PA
6198# Find a good install program. We prefer a C program (faster),
6199# so one script is as good as another. But avoid the broken or
6200# incompatible versions:
6201# SysV /etc/install, /usr/sbin/install
6202# SunOS /usr/etc/install
6203# IRIX /sbin/install
6204# AIX /bin/install
6205# AmigaOS /C/install, which installs bootblocks on floppy discs
6206# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6207# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6208# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6209# OS/2's system install, which has a completely different semantic
6210# ./install, which can be erroneously created by make from ./install.sh.
6211# Reject install programs that cannot install multiple files.
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6213$as_echo_n "checking for a BSD-compatible install... " >&6; }
6214if test -z "$INSTALL"; then
6215if test "${ac_cv_path_install+set}" = set; then :
6216 $as_echo_n "(cached) " >&6
6217else
6218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH
6220do
6221 IFS=$as_save_IFS
6222 test -z "$as_dir" && as_dir=.
6223 # Account for people who put trailing slashes in PATH elements.
6224case $as_dir/ in #((
6225 ./ | .// | /[cC]/* | \
6226 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6227 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6228 /usr/ucb/* ) ;;
6229 *)
6230 # OSF1 and SCO ODT 3.0 have their own names for install.
6231 # Don't use installbsd from OSF since it installs stuff as root
6232 # by default.
6233 for ac_prog in ginstall scoinst install; do
6234 for ac_exec_ext in '' $ac_executable_extensions; do
6235 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6236 if test $ac_prog = install &&
6237 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6238 # AIX install. It has an incompatible calling convention.
6239 :
6240 elif test $ac_prog = install &&
6241 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6242 # program-specific install script used by HP pwplus--don't use.
6243 :
6244 else
6245 rm -rf conftest.one conftest.two conftest.dir
6246 echo one > conftest.one
6247 echo two > conftest.two
6248 mkdir conftest.dir
6249 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6250 test -s conftest.one && test -s conftest.two &&
6251 test -s conftest.dir/conftest.one &&
6252 test -s conftest.dir/conftest.two
6253 then
6254 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6255 break 3
6256 fi
6257 fi
6258 fi
6259 done
6260 done
6261 ;;
6262esac
6263
6264 done
6265IFS=$as_save_IFS
6266
6267rm -rf conftest.one conftest.two conftest.dir
6268
6269fi
6270 if test "${ac_cv_path_install+set}" = set; then
6271 INSTALL=$ac_cv_path_install
6272 else
6273 # As a last resort, use the slow shell script. Don't cache a
6274 # value for INSTALL within a source directory, because that will
6275 # break other packages using the cache if that directory is
6276 # removed, or if the value is a relative name.
6277 INSTALL=$ac_install_sh
6278 fi
6279fi
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6281$as_echo "$INSTALL" >&6; }
6282
6283# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6284# It thinks the first close brace ends the variable substitution.
6285test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6286
6287test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6288
6289test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 6290
81ecdfbb
RW
6291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6292$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
6293LN_S=$as_ln_s
6294if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6296$as_echo "yes" >&6; }
bec39cab 6297else
81ecdfbb
RW
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6299$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
6300fi
6301
6302if test -n "$ac_tool_prefix"; then
6303 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6304set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6306$as_echo_n "checking for $ac_word... " >&6; }
6307if test "${ac_cv_prog_RANLIB+set}" = set; then :
6308 $as_echo_n "(cached) " >&6
bec39cab
AC
6309else
6310 if test -n "$RANLIB"; then
6311 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6312else
6313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6314for as_dir in $PATH
6315do
6316 IFS=$as_save_IFS
6317 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6318 for ac_exec_ext in '' $ac_executable_extensions; do
6319 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6320 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 6321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6322 break 2
6323 fi
6324done
81ecdfbb
RW
6325 done
6326IFS=$as_save_IFS
bec39cab
AC
6327
6328fi
6329fi
6330RANLIB=$ac_cv_prog_RANLIB
6331if test -n "$RANLIB"; then
81ecdfbb
RW
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6333$as_echo "$RANLIB" >&6; }
bec39cab 6334else
81ecdfbb
RW
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
bec39cab
AC
6337fi
6338
81ecdfbb 6339
bec39cab
AC
6340fi
6341if test -z "$ac_cv_prog_RANLIB"; then
6342 ac_ct_RANLIB=$RANLIB
6343 # Extract the first word of "ranlib", so it can be a program name with args.
6344set dummy ranlib; ac_word=$2
81ecdfbb
RW
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346$as_echo_n "checking for $ac_word... " >&6; }
6347if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6348 $as_echo_n "(cached) " >&6
bec39cab
AC
6349else
6350 if test -n "$ac_ct_RANLIB"; then
6351 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6352else
6353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6354for as_dir in $PATH
6355do
6356 IFS=$as_save_IFS
6357 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6358 for ac_exec_ext in '' $ac_executable_extensions; do
6359 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6360 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6361 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6362 break 2
6363 fi
6364done
81ecdfbb
RW
6365 done
6366IFS=$as_save_IFS
bec39cab 6367
bec39cab
AC
6368fi
6369fi
6370ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6371if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6373$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6374else
81ecdfbb
RW
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376$as_echo "no" >&6; }
bec39cab
AC
6377fi
6378
81ecdfbb
RW
6379 if test "x$ac_ct_RANLIB" = x; then
6380 RANLIB=":"
6381 else
6382 case $cross_compiling:$ac_tool_warned in
6383yes:)
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6386ac_tool_warned=yes ;;
6387esac
6388 RANLIB=$ac_ct_RANLIB
6389 fi
bec39cab
AC
6390else
6391 RANLIB="$ac_cv_prog_RANLIB"
6392fi
6393
6394for ac_prog in 'bison -y' byacc
6395do
6396 # Extract the first word of "$ac_prog", so it can be a program name with args.
6397set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6399$as_echo_n "checking for $ac_word... " >&6; }
6400if test "${ac_cv_prog_YACC+set}" = set; then :
6401 $as_echo_n "(cached) " >&6
bec39cab
AC
6402else
6403 if test -n "$YACC"; then
6404 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6405else
6406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6407for as_dir in $PATH
6408do
6409 IFS=$as_save_IFS
6410 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6411 for ac_exec_ext in '' $ac_executable_extensions; do
6412 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6413 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6415 break 2
6416 fi
6417done
81ecdfbb
RW
6418 done
6419IFS=$as_save_IFS
bec39cab
AC
6420
6421fi
6422fi
6423YACC=$ac_cv_prog_YACC
6424if test -n "$YACC"; then
81ecdfbb
RW
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6426$as_echo "$YACC" >&6; }
bec39cab 6427else
81ecdfbb
RW
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; }
bec39cab
AC
6430fi
6431
81ecdfbb 6432
bec39cab
AC
6433 test -n "$YACC" && break
6434done
6435test -n "$YACC" || YACC="yacc"
6436
6437
6438if test -n "$ac_tool_prefix"; then
6439 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6440set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then :
6444 $as_echo_n "(cached) " >&6
bec39cab
AC
6445else
6446 if test -n "$AR"; then
6447 ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
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
6466AR=$ac_cv_prog_AR
6467if test -n "$AR"; then
81ecdfbb
RW
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6469$as_echo "$AR" >&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
6476fi
6477if test -z "$ac_cv_prog_AR"; then
6478 ac_ct_AR=$AR
6479 # Extract the first word of "ar", so it can be a program name with args.
6480set dummy ar; ac_word=$2
81ecdfbb
RW
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482$as_echo_n "checking for $ac_word... " >&6; }
6483if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6484 $as_echo_n "(cached) " >&6
bec39cab
AC
6485else
6486 if test -n "$ac_ct_AR"; then
6487 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6488else
6489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6490for as_dir in $PATH
6491do
6492 IFS=$as_save_IFS
6493 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6494 for ac_exec_ext in '' $ac_executable_extensions; do
6495 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6496 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6498 break 2
6499 fi
6500done
81ecdfbb
RW
6501 done
6502IFS=$as_save_IFS
bec39cab
AC
6503
6504fi
6505fi
6506ac_ct_AR=$ac_cv_prog_ac_ct_AR
6507if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6509$as_echo "$ac_ct_AR" >&6; }
bec39cab 6510else
81ecdfbb
RW
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512$as_echo "no" >&6; }
bec39cab
AC
6513fi
6514
81ecdfbb
RW
6515 if test "x$ac_ct_AR" = x; then
6516 AR=""
6517 else
6518 case $cross_compiling:$ac_tool_warned in
6519yes:)
6520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6522ac_tool_warned=yes ;;
6523esac
6524 AR=$ac_ct_AR
6525 fi
bec39cab
AC
6526else
6527 AR="$ac_cv_prog_AR"
6528fi
6529
6530if test -n "$ac_tool_prefix"; then
6531 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6532set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6534$as_echo_n "checking for $ac_word... " >&6; }
6535if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6536 $as_echo_n "(cached) " >&6
bec39cab
AC
6537else
6538 if test -n "$DLLTOOL"; then
6539 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6540else
6541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in $PATH
6543do
6544 IFS=$as_save_IFS
6545 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6546 for ac_exec_ext in '' $ac_executable_extensions; do
6547 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6548 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6550 break 2
6551 fi
6552done
81ecdfbb
RW
6553 done
6554IFS=$as_save_IFS
bec39cab
AC
6555
6556fi
6557fi
6558DLLTOOL=$ac_cv_prog_DLLTOOL
6559if test -n "$DLLTOOL"; then
81ecdfbb
RW
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6561$as_echo "$DLLTOOL" >&6; }
bec39cab 6562else
81ecdfbb
RW
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
bec39cab
AC
6565fi
6566
81ecdfbb 6567
bec39cab
AC
6568fi
6569if test -z "$ac_cv_prog_DLLTOOL"; then
6570 ac_ct_DLLTOOL=$DLLTOOL
6571 # Extract the first word of "dlltool", so it can be a program name with args.
6572set dummy dlltool; ac_word=$2
81ecdfbb
RW
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6576 $as_echo_n "(cached) " >&6
bec39cab
AC
6577else
6578 if test -n "$ac_ct_DLLTOOL"; then
6579 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6580else
6581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in $PATH
6583do
6584 IFS=$as_save_IFS
6585 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6586 for ac_exec_ext in '' $ac_executable_extensions; do
6587 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6588 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6590 break 2
6591 fi
6592done
81ecdfbb
RW
6593 done
6594IFS=$as_save_IFS
bec39cab
AC
6595
6596fi
6597fi
6598ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6599if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6601$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6602else
81ecdfbb
RW
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
bec39cab
AC
6605fi
6606
81ecdfbb
RW
6607 if test "x$ac_ct_DLLTOOL" = x; then
6608 DLLTOOL=""
6609 else
6610 case $cross_compiling:$ac_tool_warned in
6611yes:)
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6614ac_tool_warned=yes ;;
6615esac
6616 DLLTOOL=$ac_ct_DLLTOOL
6617 fi
bec39cab
AC
6618else
6619 DLLTOOL="$ac_cv_prog_DLLTOOL"
6620fi
6621
6622if test -n "$ac_tool_prefix"; then
6623 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6624set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6626$as_echo_n "checking for $ac_word... " >&6; }
6627if test "${ac_cv_prog_WINDRES+set}" = set; then :
6628 $as_echo_n "(cached) " >&6
bec39cab
AC
6629else
6630 if test -n "$WINDRES"; then
6631 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6632else
6633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6634for as_dir in $PATH
6635do
6636 IFS=$as_save_IFS
6637 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6638 for ac_exec_ext in '' $ac_executable_extensions; do
6639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6640 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6642 break 2
6643 fi
6644done
81ecdfbb
RW
6645 done
6646IFS=$as_save_IFS
bec39cab
AC
6647
6648fi
6649fi
6650WINDRES=$ac_cv_prog_WINDRES
6651if test -n "$WINDRES"; then
81ecdfbb
RW
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6653$as_echo "$WINDRES" >&6; }
bec39cab 6654else
81ecdfbb
RW
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
bec39cab
AC
6657fi
6658
81ecdfbb 6659
bec39cab
AC
6660fi
6661if test -z "$ac_cv_prog_WINDRES"; then
6662 ac_ct_WINDRES=$WINDRES
6663 # Extract the first word of "windres", so it can be a program name with args.
6664set dummy windres; ac_word=$2
81ecdfbb
RW
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6666$as_echo_n "checking for $ac_word... " >&6; }
6667if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6668 $as_echo_n "(cached) " >&6
bec39cab
AC
6669else
6670 if test -n "$ac_ct_WINDRES"; then
6671 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6672else
6673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in $PATH
6675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6680 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6682 break 2
6683 fi
6684done
81ecdfbb
RW
6685 done
6686IFS=$as_save_IFS
bec39cab
AC
6687
6688fi
6689fi
6690ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6691if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6693$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6694else
81ecdfbb
RW
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696$as_echo "no" >&6; }
c906108c 6697fi
bec39cab 6698
81ecdfbb
RW
6699 if test "x$ac_ct_WINDRES" = x; then
6700 WINDRES=""
6701 else
6702 case $cross_compiling:$ac_tool_warned in
6703yes:)
6704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6706ac_tool_warned=yes ;;
6707esac
6708 WINDRES=$ac_ct_WINDRES
6709 fi
c906108c 6710else
bec39cab 6711 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6712fi
6713
bec39cab 6714
036c3acb
TS
6715case $host_os in
6716 gnu*)
6717 # Needed for GNU Hurd hosts.
6718 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6719 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6720set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6722$as_echo_n "checking for $ac_word... " >&6; }
6723if test "${ac_cv_prog_MIG+set}" = set; then :
6724 $as_echo_n "(cached) " >&6
c906108c 6725else
bec39cab
AC
6726 if test -n "$MIG"; then
6727 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6728else
6729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6730for as_dir in $PATH
6731do
6732 IFS=$as_save_IFS
6733 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6734 for ac_exec_ext in '' $ac_executable_extensions; do
6735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6736 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6738 break 2
6739 fi
6740done
81ecdfbb
RW
6741 done
6742IFS=$as_save_IFS
bec39cab 6743
c906108c 6744fi
bec39cab
AC
6745fi
6746MIG=$ac_cv_prog_MIG
6747if test -n "$MIG"; then
81ecdfbb
RW
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6749$as_echo "$MIG" >&6; }
c906108c 6750else
81ecdfbb
RW
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752$as_echo "no" >&6; }
c906108c
SS
6753fi
6754
81ecdfbb 6755
bec39cab
AC
6756fi
6757if test -z "$ac_cv_prog_MIG"; then
6758 ac_ct_MIG=$MIG
6759 # Extract the first word of "mig", so it can be a program name with args.
6760set dummy mig; ac_word=$2
81ecdfbb
RW
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6762$as_echo_n "checking for $ac_word... " >&6; }
6763if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6764 $as_echo_n "(cached) " >&6
bec39cab
AC
6765else
6766 if test -n "$ac_ct_MIG"; then
6767 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6768else
6769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6770for as_dir in $PATH
6771do
6772 IFS=$as_save_IFS
6773 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6774 for ac_exec_ext in '' $ac_executable_extensions; do
6775 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6776 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6778 break 2
6779 fi
6780done
81ecdfbb
RW
6781 done
6782IFS=$as_save_IFS
c906108c 6783
bec39cab
AC
6784fi
6785fi
6786ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6787if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6789$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6790else
81ecdfbb
RW
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6792$as_echo "no" >&6; }
bec39cab 6793fi
c906108c 6794
81ecdfbb
RW
6795 if test "x$ac_ct_MIG" = x; then
6796 MIG=""
6797 else
6798 case $cross_compiling:$ac_tool_warned in
6799yes:)
6800{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6802ac_tool_warned=yes ;;
6803esac
6804 MIG=$ac_ct_MIG
6805 fi
bec39cab
AC
6806else
6807 MIG="$ac_cv_prog_MIG"
6808fi
c906108c 6809
036c3acb
TS
6810 if test x"$MIG" = x; then
6811 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6812 fi
6813 ;;
6814esac
c906108c 6815
bec39cab
AC
6816# ---------------------- #
6817# Checks for libraries. #
6818# ---------------------- #
c906108c 6819
bec39cab 6820# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6822$as_echo_n "checking for main in -lm... " >&6; }
6823if test "${ac_cv_lib_m_main+set}" = set; then :
6824 $as_echo_n "(cached) " >&6
bec39cab
AC
6825else
6826 ac_check_lib_save_LIBS=$LIBS
6827LIBS="-lm $LIBS"
81ecdfbb 6828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6829/* end confdefs.h. */
c906108c 6830
c906108c 6831
bec39cab
AC
6832int
6833main ()
6834{
81ecdfbb 6835return main ();
bec39cab
AC
6836 ;
6837 return 0;
6838}
6839_ACEOF
81ecdfbb 6840if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6841 ac_cv_lib_m_main=yes
6842else
81ecdfbb 6843 ac_cv_lib_m_main=no
bec39cab 6844fi
81ecdfbb
RW
6845rm -f core conftest.err conftest.$ac_objext \
6846 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6847LIBS=$ac_check_lib_save_LIBS
6848fi
81ecdfbb
RW
6849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6850$as_echo "$ac_cv_lib_m_main" >&6; }
6851if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6852 cat >>confdefs.h <<_ACEOF
6853#define HAVE_LIBM 1
6854_ACEOF
6855
6856 LIBS="-lm $LIBS"
c906108c 6857
c906108c 6858fi
bec39cab
AC
6859
6860
6861# We need to link with -lw to get `wctype' on Solaris before Solaris
6862# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6863# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6864# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6865ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6866if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6867
c906108c 6868else
81ecdfbb
RW
6869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6870$as_echo_n "checking for wctype in -lw... " >&6; }
6871if test "${ac_cv_lib_w_wctype+set}" = set; then :
6872 $as_echo_n "(cached) " >&6
bec39cab
AC
6873else
6874 ac_check_lib_save_LIBS=$LIBS
6875LIBS="-lw $LIBS"
81ecdfbb 6876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6877/* end confdefs.h. */
c906108c 6878
81ecdfbb
RW
6879/* Override any GCC internal prototype to avoid an error.
6880 Use char because int might match the return type of a GCC
6881 builtin and then its argument prototype would still apply. */
bec39cab
AC
6882#ifdef __cplusplus
6883extern "C"
6884#endif
bec39cab
AC
6885char wctype ();
6886int
6887main ()
6888{
81ecdfbb 6889return wctype ();
bec39cab
AC
6890 ;
6891 return 0;
6892}
6893_ACEOF
81ecdfbb 6894if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6895 ac_cv_lib_w_wctype=yes
6896else
81ecdfbb 6897 ac_cv_lib_w_wctype=no
bec39cab 6898fi
81ecdfbb
RW
6899rm -f core conftest.err conftest.$ac_objext \
6900 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6901LIBS=$ac_check_lib_save_LIBS
6902fi
81ecdfbb
RW
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6904$as_echo "$ac_cv_lib_w_wctype" >&6; }
6905if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6906 cat >>confdefs.h <<_ACEOF
6907#define HAVE_LIBW 1
6908_ACEOF
c906108c 6909
bec39cab 6910 LIBS="-lw $LIBS"
c906108c 6911
bec39cab 6912fi
c906108c 6913
bec39cab 6914fi
c906108c 6915
ddc9cd0f 6916
bec39cab 6917# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6919$as_echo_n "checking for library containing gethostbyname... " >&6; }
6920if test "${ac_cv_search_gethostbyname+set}" = set; then :
6921 $as_echo_n "(cached) " >&6
bec39cab
AC
6922else
6923 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6925/* end confdefs.h. */
ddc9cd0f 6926
81ecdfbb
RW
6927/* Override any GCC internal prototype to avoid an error.
6928 Use char because int might match the return type of a GCC
6929 builtin and then its argument prototype would still apply. */
bec39cab
AC
6930#ifdef __cplusplus
6931extern "C"
6932#endif
bec39cab
AC
6933char gethostbyname ();
6934int
6935main ()
6936{
81ecdfbb 6937return gethostbyname ();
bec39cab
AC
6938 ;
6939 return 0;
6940}
6941_ACEOF
81ecdfbb
RW
6942for ac_lib in '' nsl; do
6943 if test -z "$ac_lib"; then
6944 ac_res="none required"
6945 else
6946 ac_res=-l$ac_lib
b4e70030 6947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6948 fi
6949 if ac_fn_c_try_link "$LINENO"; then :
6950 ac_cv_search_gethostbyname=$ac_res
6951fi
6952rm -f core conftest.err conftest.$ac_objext \
6953 conftest$ac_exeext
6954 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6955 break
6956fi
6957done
6958if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6959
bec39cab 6960else
81ecdfbb 6961 ac_cv_search_gethostbyname=no
bec39cab 6962fi
81ecdfbb 6963rm conftest.$ac_ext
bec39cab
AC
6964LIBS=$ac_func_search_save_LIBS
6965fi
81ecdfbb
RW
6966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6967$as_echo "$ac_cv_search_gethostbyname" >&6; }
6968ac_res=$ac_cv_search_gethostbyname
6969if test "$ac_res" != no; then :
6970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6971
bec39cab 6972fi
96baa820 6973
c906108c 6974
b4e70030 6975# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6977$as_echo_n "checking for library containing socketpair... " >&6; }
6978if test "${ac_cv_search_socketpair+set}" = set; then :
6979 $as_echo_n "(cached) " >&6
b4e70030
JB
6980else
6981 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6983/* end confdefs.h. */
6984
81ecdfbb
RW
6985/* Override any GCC internal prototype to avoid an error.
6986 Use char because int might match the return type of a GCC
6987 builtin and then its argument prototype would still apply. */
b4e70030
JB
6988#ifdef __cplusplus
6989extern "C"
6990#endif
b4e70030
JB
6991char socketpair ();
6992int
6993main ()
6994{
81ecdfbb 6995return socketpair ();
b4e70030
JB
6996 ;
6997 return 0;
6998}
6999_ACEOF
81ecdfbb
RW
7000for ac_lib in '' socket; do
7001 if test -z "$ac_lib"; then
7002 ac_res="none required"
7003 else
7004 ac_res=-l$ac_lib
b4e70030 7005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7006 fi
7007 if ac_fn_c_try_link "$LINENO"; then :
7008 ac_cv_search_socketpair=$ac_res
7009fi
7010rm -f core conftest.err conftest.$ac_objext \
7011 conftest$ac_exeext
7012 if test "${ac_cv_search_socketpair+set}" = set; then :
7013 break
7014fi
7015done
7016if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7017
b4e70030 7018else
81ecdfbb 7019 ac_cv_search_socketpair=no
b4e70030 7020fi
81ecdfbb 7021rm conftest.$ac_ext
b4e70030
JB
7022LIBS=$ac_func_search_save_LIBS
7023fi
81ecdfbb
RW
7024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7025$as_echo "$ac_cv_search_socketpair" >&6; }
7026ac_res=$ac_cv_search_socketpair
7027if test "$ac_res" != no; then :
7028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7029
7030fi
7031
7032
233a11ab 7033# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7034
711a72d3 7035 # Use the system's zlib library.
39f3de7c
L
7036 zlibdir="-L\$(top_builddir)/../zlib"
7037 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7038
711a72d3
L
7039# Check whether --with-system-zlib was given.
7040if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7041 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7042 zlibdir=
7043 zlibinc=
7044 fi
b040ad30 7045
233a11ab 7046fi
233a11ab 7047
233a11ab 7048
233a11ab 7049
b040ad30 7050
233a11ab 7051
25268153
JB
7052# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7054$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7055if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7056 $as_echo_n "(cached) " >&6
7057else
7058 ac_func_search_save_LIBS=$LIBS
7059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7060/* end confdefs.h. */
7061
7062/* Override any GCC internal prototype to avoid an error.
7063 Use char because int might match the return type of a GCC
7064 builtin and then its argument prototype would still apply. */
7065#ifdef __cplusplus
7066extern "C"
7067#endif
7068char kinfo_getvmmap ();
7069int
7070main ()
7071{
7072return kinfo_getvmmap ();
7073 ;
7074 return 0;
7075}
7076_ACEOF
7077for ac_lib in '' util; do
7078 if test -z "$ac_lib"; then
7079 ac_res="none required"
7080 else
7081 ac_res=-l$ac_lib
7082 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7083 fi
7084 if ac_fn_c_try_link "$LINENO"; then :
7085 ac_cv_search_kinfo_getvmmap=$ac_res
7086fi
7087rm -f core conftest.err conftest.$ac_objext \
7088 conftest$ac_exeext
7089 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7090 break
7091fi
7092done
7093if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7094
7095else
7096 ac_cv_search_kinfo_getvmmap=no
7097fi
7098rm conftest.$ac_ext
7099LIBS=$ac_func_search_save_LIBS
7100fi
7101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7102$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7103ac_res=$ac_cv_search_kinfo_getvmmap
7104if test "$ac_res" != no; then :
7105 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7106
7107$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7108
7109fi
7110
7111
77f120bf 7112
016a3251
DD
7113 if test "X$prefix" = "XNONE"; then
7114 acl_final_prefix="$ac_default_prefix"
7115 else
7116 acl_final_prefix="$prefix"
7117 fi
7118 if test "X$exec_prefix" = "XNONE"; then
7119 acl_final_exec_prefix='${prefix}'
7120 else
7121 acl_final_exec_prefix="$exec_prefix"
7122 fi
7123 acl_save_prefix="$prefix"
7124 prefix="$acl_final_prefix"
7125 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7126 prefix="$acl_save_prefix"
7127
7128
7129# Check whether --with-gnu-ld was given.
7130if test "${with_gnu_ld+set}" = set; then :
7131 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7132else
7133 with_gnu_ld=no
7134fi
7135
7136# Prepare PATH_SEPARATOR.
7137# The user is always right.
7138if test "${PATH_SEPARATOR+set}" != set; then
7139 echo "#! /bin/sh" >conf$$.sh
7140 echo "exit 0" >>conf$$.sh
7141 chmod +x conf$$.sh
7142 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7143 PATH_SEPARATOR=';'
7144 else
7145 PATH_SEPARATOR=:
7146 fi
7147 rm -f conf$$.sh
7148fi
7149ac_prog=ld
7150if test "$GCC" = yes; then
7151 # Check if gcc -print-prog-name=ld gives a path.
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7153$as_echo_n "checking for ld used by GCC... " >&6; }
7154 case $host in
7155 *-*-mingw*)
7156 # gcc leaves a trailing carriage return which upsets mingw
7157 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7158 *)
7159 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7160 esac
7161 case $ac_prog in
7162 # Accept absolute paths.
7163 [\\/]* | [A-Za-z]:[\\/]*)
7164 re_direlt='/[^/][^/]*/\.\./'
7165 # Canonicalize the path of ld
7166 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7167 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7168 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7169 done
7170 test -z "$LD" && LD="$ac_prog"
7171 ;;
7172 "")
7173 # If it fails, then pretend we aren't using GCC.
7174 ac_prog=ld
7175 ;;
7176 *)
7177 # If it is relative, then search for the first ld in PATH.
7178 with_gnu_ld=unknown
7179 ;;
7180 esac
7181elif test "$with_gnu_ld" = yes; then
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7183$as_echo_n "checking for GNU ld... " >&6; }
7184else
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7186$as_echo_n "checking for non-GNU ld... " >&6; }
7187fi
7188if test "${acl_cv_path_LD+set}" = set; then :
7189 $as_echo_n "(cached) " >&6
7190else
7191 if test -z "$LD"; then
7192 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7193 for ac_dir in $PATH; do
7194 test -z "$ac_dir" && ac_dir=.
7195 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7196 acl_cv_path_LD="$ac_dir/$ac_prog"
7197 # Check to see if the program is GNU ld. I'd rather use --version,
7198 # but apparently some GNU ld's only accept -v.
7199 # Break only if it was the GNU/non-GNU ld that we prefer.
7200 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7201 test "$with_gnu_ld" != no && break
7202 else
7203 test "$with_gnu_ld" != yes && break
7204 fi
7205 fi
7206 done
7207 IFS="$ac_save_ifs"
7208else
7209 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7210fi
7211fi
7212
7213LD="$acl_cv_path_LD"
7214if test -n "$LD"; then
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7216$as_echo "$LD" >&6; }
7217else
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7219$as_echo "no" >&6; }
7220fi
7221test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7223$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7224if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7225 $as_echo_n "(cached) " >&6
7226else
7227 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7228if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7229 acl_cv_prog_gnu_ld=yes
7230else
7231 acl_cv_prog_gnu_ld=no
7232fi
7233fi
7234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7235$as_echo "$acl_cv_prog_gnu_ld" >&6; }
7236with_gnu_ld=$acl_cv_prog_gnu_ld
7237
7238
7239
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7241$as_echo_n "checking for shared library run path origin... " >&6; }
7242if test "${acl_cv_rpath+set}" = set; then :
7243 $as_echo_n "(cached) " >&6
7244else
7245
7246 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7247 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7248 . ./conftest.sh
7249 rm -f ./conftest.sh
7250 acl_cv_rpath=done
7251
7252fi
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7254$as_echo "$acl_cv_rpath" >&6; }
7255 wl="$acl_cv_wl"
7256 libext="$acl_cv_libext"
7257 shlibext="$acl_cv_shlibext"
7258 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7259 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7260 hardcode_direct="$acl_cv_hardcode_direct"
7261 hardcode_minus_L="$acl_cv_hardcode_minus_L"
7262 # Check whether --enable-rpath was given.
7263if test "${enable_rpath+set}" = set; then :
7264 enableval=$enable_rpath; :
7265else
7266 enable_rpath=yes
7267fi
7268
7269
7270
7271
7272
7273
7274
7275
7276 use_additional=yes
7277
7278 acl_save_prefix="$prefix"
7279 prefix="$acl_final_prefix"
7280 acl_save_exec_prefix="$exec_prefix"
7281 exec_prefix="$acl_final_exec_prefix"
7282
7283 eval additional_includedir=\"$includedir\"
7284 eval additional_libdir=\"$libdir\"
7285
7286 exec_prefix="$acl_save_exec_prefix"
7287 prefix="$acl_save_prefix"
77f120bf 7288
6c7a06a3 7289
81ecdfbb
RW
7290# Check whether --with-libiconv-prefix was given.
7291if test "${with_libiconv_prefix+set}" = set; then :
7292 withval=$with_libiconv_prefix;
016a3251
DD
7293 if test "X$withval" = "Xno"; then
7294 use_additional=no
7295 else
7296 if test "X$withval" = "X"; then
7297
7298 acl_save_prefix="$prefix"
7299 prefix="$acl_final_prefix"
7300 acl_save_exec_prefix="$exec_prefix"
7301 exec_prefix="$acl_final_exec_prefix"
7302
7303 eval additional_includedir=\"$includedir\"
7304 eval additional_libdir=\"$libdir\"
7305
7306 exec_prefix="$acl_save_exec_prefix"
7307 prefix="$acl_save_prefix"
7308
7309 else
7310 additional_includedir="$withval/include"
7311 additional_libdir="$withval/lib"
7312 fi
7313 fi
6c7a06a3 7314
81ecdfbb
RW
7315fi
7316
016a3251
DD
7317 LIBICONV=
7318 LTLIBICONV=
7319 INCICONV=
7320 rpathdirs=
7321 ltrpathdirs=
7322 names_already_handled=
7323 names_next_round='iconv '
7324 while test -n "$names_next_round"; do
7325 names_this_round="$names_next_round"
7326 names_next_round=
7327 for name in $names_this_round; do
7328 already_handled=
7329 for n in $names_already_handled; do
7330 if test "$n" = "$name"; then
7331 already_handled=yes
7332 break
7333 fi
7334 done
7335 if test -z "$already_handled"; then
7336 names_already_handled="$names_already_handled $name"
7337 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7338 eval value=\"\$HAVE_LIB$uppername\"
7339 if test -n "$value"; then
7340 if test "$value" = yes; then
7341 eval value=\"\$LIB$uppername\"
7342 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7343 eval value=\"\$LTLIB$uppername\"
7344 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7345 else
7346 :
7347 fi
7348 else
7349 found_dir=
7350 found_la=
7351 found_so=
7352 found_a=
7353 if test $use_additional = yes; then
7354 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7355 found_dir="$additional_libdir"
7356 found_so="$additional_libdir/lib$name.$shlibext"
7357 if test -f "$additional_libdir/lib$name.la"; then
7358 found_la="$additional_libdir/lib$name.la"
7359 fi
7360 else
7361 if test -f "$additional_libdir/lib$name.$libext"; then
7362 found_dir="$additional_libdir"
7363 found_a="$additional_libdir/lib$name.$libext"
7364 if test -f "$additional_libdir/lib$name.la"; then
7365 found_la="$additional_libdir/lib$name.la"
7366 fi
7367 fi
7368 fi
7369 fi
7370 if test "X$found_dir" = "X"; then
7371 for x in $LDFLAGS $LTLIBICONV; do
7372
7373 acl_save_prefix="$prefix"
7374 prefix="$acl_final_prefix"
7375 acl_save_exec_prefix="$exec_prefix"
7376 exec_prefix="$acl_final_exec_prefix"
7377 eval x=\"$x\"
7378 exec_prefix="$acl_save_exec_prefix"
7379 prefix="$acl_save_prefix"
7380
7381 case "$x" in
7382 -L*)
7383 dir=`echo "X$x" | sed -e 's/^X-L//'`
7384 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7385 found_dir="$dir"
7386 found_so="$dir/lib$name.$shlibext"
7387 if test -f "$dir/lib$name.la"; then
7388 found_la="$dir/lib$name.la"
7389 fi
7390 else
7391 if test -f "$dir/lib$name.$libext"; then
7392 found_dir="$dir"
7393 found_a="$dir/lib$name.$libext"
7394 if test -f "$dir/lib$name.la"; then
7395 found_la="$dir/lib$name.la"
7396 fi
7397 fi
7398 fi
7399 ;;
7400 esac
7401 if test "X$found_dir" != "X"; then
7402 break
7403 fi
7404 done
7405 fi
7406 if test "X$found_dir" != "X"; then
7407 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7408 if test "X$found_so" != "X"; then
7409 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7410 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7411 else
7412 haveit=
7413 for x in $ltrpathdirs; do
7414 if test "X$x" = "X$found_dir"; then
7415 haveit=yes
7416 break
7417 fi
7418 done
7419 if test -z "$haveit"; then
7420 ltrpathdirs="$ltrpathdirs $found_dir"
7421 fi
7422 if test "$hardcode_direct" = yes; then
7423 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7424 else
7425 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7426 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7427 haveit=
7428 for x in $rpathdirs; do
7429 if test "X$x" = "X$found_dir"; then
7430 haveit=yes
7431 break
7432 fi
7433 done
7434 if test -z "$haveit"; then
7435 rpathdirs="$rpathdirs $found_dir"
7436 fi
7437 else
7438 haveit=
7439 for x in $LDFLAGS $LIBICONV; do
7440
7441 acl_save_prefix="$prefix"
7442 prefix="$acl_final_prefix"
7443 acl_save_exec_prefix="$exec_prefix"
7444 exec_prefix="$acl_final_exec_prefix"
7445 eval x=\"$x\"
7446 exec_prefix="$acl_save_exec_prefix"
7447 prefix="$acl_save_prefix"
7448
7449 if test "X$x" = "X-L$found_dir"; then
7450 haveit=yes
7451 break
7452 fi
7453 done
7454 if test -z "$haveit"; then
7455 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7456 fi
7457 if test "$hardcode_minus_L" != no; then
7458 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7459 else
7460 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7461 fi
7462 fi
7463 fi
7464 fi
7465 else
7466 if test "X$found_a" != "X"; then
7467 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7468 else
7469 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7470 fi
7471 fi
7472 additional_includedir=
7473 case "$found_dir" in
7474 */lib | */lib/)
7475 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7476 additional_includedir="$basedir/include"
7477 ;;
7478 esac
7479 if test "X$additional_includedir" != "X"; then
7480 if test "X$additional_includedir" != "X/usr/include"; then
7481 haveit=
7482 if test "X$additional_includedir" = "X/usr/local/include"; then
7483 if test -n "$GCC"; then
7484 case $host_os in
7485 linux*) haveit=yes;;
7486 esac
7487 fi
7488 fi
7489 if test -z "$haveit"; then
7490 for x in $CPPFLAGS $INCICONV; do
7491
7492 acl_save_prefix="$prefix"
7493 prefix="$acl_final_prefix"
7494 acl_save_exec_prefix="$exec_prefix"
7495 exec_prefix="$acl_final_exec_prefix"
7496 eval x=\"$x\"
7497 exec_prefix="$acl_save_exec_prefix"
7498 prefix="$acl_save_prefix"
7499
7500 if test "X$x" = "X-I$additional_includedir"; then
7501 haveit=yes
7502 break
7503 fi
7504 done
7505 if test -z "$haveit"; then
7506 if test -d "$additional_includedir"; then
7507 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7508 fi
7509 fi
7510 fi
7511 fi
7512 fi
7513 if test -n "$found_la"; then
7514 save_libdir="$libdir"
7515 case "$found_la" in
7516 */* | *\\*) . "$found_la" ;;
7517 *) . "./$found_la" ;;
7518 esac
7519 libdir="$save_libdir"
7520 for dep in $dependency_libs; do
7521 case "$dep" in
7522 -L*)
7523 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7524 if test "X$additional_libdir" != "X/usr/lib"; then
7525 haveit=
7526 if test "X$additional_libdir" = "X/usr/local/lib"; then
7527 if test -n "$GCC"; then
7528 case $host_os in
7529 linux*) haveit=yes;;
7530 esac
7531 fi
7532 fi
7533 if test -z "$haveit"; then
7534 haveit=
7535 for x in $LDFLAGS $LIBICONV; do
7536
7537 acl_save_prefix="$prefix"
7538 prefix="$acl_final_prefix"
7539 acl_save_exec_prefix="$exec_prefix"
7540 exec_prefix="$acl_final_exec_prefix"
7541 eval x=\"$x\"
7542 exec_prefix="$acl_save_exec_prefix"
7543 prefix="$acl_save_prefix"
7544
7545 if test "X$x" = "X-L$additional_libdir"; then
7546 haveit=yes
7547 break
7548 fi
7549 done
7550 if test -z "$haveit"; then
7551 if test -d "$additional_libdir"; then
7552 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7553 fi
7554 fi
7555 haveit=
7556 for x in $LDFLAGS $LTLIBICONV; do
7557
7558 acl_save_prefix="$prefix"
7559 prefix="$acl_final_prefix"
7560 acl_save_exec_prefix="$exec_prefix"
7561 exec_prefix="$acl_final_exec_prefix"
7562 eval x=\"$x\"
7563 exec_prefix="$acl_save_exec_prefix"
7564 prefix="$acl_save_prefix"
7565
7566 if test "X$x" = "X-L$additional_libdir"; then
7567 haveit=yes
7568 break
7569 fi
7570 done
7571 if test -z "$haveit"; then
7572 if test -d "$additional_libdir"; then
7573 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7574 fi
7575 fi
7576 fi
7577 fi
7578 ;;
7579 -R*)
7580 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7581 if test "$enable_rpath" != no; then
7582 haveit=
7583 for x in $rpathdirs; do
7584 if test "X$x" = "X$dir"; then
7585 haveit=yes
7586 break
7587 fi
7588 done
7589 if test -z "$haveit"; then
7590 rpathdirs="$rpathdirs $dir"
7591 fi
7592 haveit=
7593 for x in $ltrpathdirs; do
7594 if test "X$x" = "X$dir"; then
7595 haveit=yes
7596 break
7597 fi
7598 done
7599 if test -z "$haveit"; then
7600 ltrpathdirs="$ltrpathdirs $dir"
7601 fi
7602 fi
7603 ;;
7604 -l*)
7605 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7606 ;;
7607 *.la)
7608 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7609 ;;
7610 *)
7611 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7612 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7613 ;;
7614 esac
7615 done
7616 fi
7617 else
7618 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7619 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7620 fi
7621 fi
7622 fi
7623 done
7624 done
7625 if test "X$rpathdirs" != "X"; then
7626 if test -n "$hardcode_libdir_separator"; then
7627 alldirs=
7628 for found_dir in $rpathdirs; do
7629 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7630 done
7631 acl_save_libdir="$libdir"
7632 libdir="$alldirs"
7633 eval flag=\"$hardcode_libdir_flag_spec\"
7634 libdir="$acl_save_libdir"
7635 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7636 else
7637 for found_dir in $rpathdirs; do
7638 acl_save_libdir="$libdir"
7639 libdir="$found_dir"
7640 eval flag=\"$hardcode_libdir_flag_spec\"
7641 libdir="$acl_save_libdir"
7642 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7643 done
7644 fi
7645 fi
7646 if test "X$ltrpathdirs" != "X"; then
7647 for found_dir in $ltrpathdirs; do
7648 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7649 done
7650 fi
7651
7652
7653
7654
7655
6c7a06a3 7656
6c7a06a3 7657
81ecdfbb
RW
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7659$as_echo_n "checking for iconv... " >&6; }
7660if test "${am_cv_func_iconv+set}" = set; then :
7661 $as_echo_n "(cached) " >&6
d542061a 7662else
6c7a06a3
TT
7663
7664 am_cv_func_iconv="no, consider installing GNU libiconv"
7665 am_cv_lib_iconv=no
016a3251
DD
7666 am_save_CPPFLAGS="$CPPFLAGS"
7667 CPPFLAGS="$CPPFLAGS $INCICONV"
7668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7669/* end confdefs.h. */
6c7a06a3
TT
7670#include <stdlib.h>
7671#include <iconv.h>
d542061a
UW
7672int
7673main ()
7674{
6c7a06a3 7675iconv_t cd = iconv_open("","");
016a3251
DD
7676 iconv(cd,NULL,NULL,NULL,NULL);
7677 iconv_close(cd);
d542061a
UW
7678 ;
7679 return 0;
7680}
7681_ACEOF
81ecdfbb 7682if ac_fn_c_try_link "$LINENO"; then :
016a3251 7683 am_cv_func_iconv=yes
d542061a 7684fi
81ecdfbb
RW
7685rm -f core conftest.err conftest.$ac_objext \
7686 conftest$ac_exeext conftest.$ac_ext
016a3251 7687 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 7688
016a3251
DD
7689 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
7690 for _libs in .libs _libs; do
7691 am_save_CPPFLAGS="$CPPFLAGS"
7692 am_save_LIBS="$LIBS"
7693 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
7694 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
7695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 7696/* end confdefs.h. */
6c7a06a3
TT
7697#include <stdlib.h>
7698#include <iconv.h>
d542061a
UW
7699int
7700main ()
7701{
6c7a06a3 7702iconv_t cd = iconv_open("","");
016a3251
DD
7703 iconv(cd,NULL,NULL,NULL,NULL);
7704 iconv_close(cd);
d542061a
UW
7705 ;
7706 return 0;
7707}
7708_ACEOF
81ecdfbb 7709if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
7710 INCICONV="-I../libiconv/include"
7711 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
7712 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
7713 am_cv_lib_iconv=yes
7714 am_cv_func_iconv=yes
d542061a 7715fi
81ecdfbb
RW
7716rm -f core conftest.err conftest.$ac_objext \
7717 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
7718 CPPFLAGS="$am_save_CPPFLAGS"
7719 LIBS="$am_save_LIBS"
7720 if test "$am_cv_func_iconv" = "yes"; then
7721 break
7722 fi
7723 done
77f120bf 7724 fi
94ae1714 7725
4edb1e84 7726 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 7727 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 7728 am_save_LIBS="$LIBS"
016a3251
DD
7729 CPPFLAGS="$LIBS $INCICONV"
7730 LIBS="$LIBS $LIBICONV"
81ecdfbb 7731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7732/* end confdefs.h. */
6c7a06a3
TT
7733#include <stdlib.h>
7734#include <iconv.h>
bec39cab
AC
7735int
7736main ()
7737{
6c7a06a3
TT
7738iconv_t cd = iconv_open("","");
7739 iconv(cd,NULL,NULL,NULL,NULL);
7740 iconv_close(cd);
bec39cab
AC
7741 ;
7742 return 0;
7743}
7744_ACEOF
81ecdfbb 7745if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 7746 am_cv_lib_iconv=yes
6c7a06a3 7747 am_cv_func_iconv=yes
627af7ea 7748fi
81ecdfbb
RW
7749rm -f core conftest.err conftest.$ac_objext \
7750 conftest$ac_exeext conftest.$ac_ext
fc3b640d 7751 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 7752 LIBS="$am_save_LIBS"
6c7a06a3
TT
7753 fi
7754
7755fi
81ecdfbb
RW
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7757$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
7758 if test "$am_cv_func_iconv" = yes; then
7759
7760$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 7761
016a3251 7762 fi
fc3b640d 7763 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
7764
7765 for element in $INCICONV; do
7766 haveit=
7767 for x in $CPPFLAGS; do
7768
7769 acl_save_prefix="$prefix"
7770 prefix="$acl_final_prefix"
7771 acl_save_exec_prefix="$exec_prefix"
7772 exec_prefix="$acl_final_exec_prefix"
7773 eval x=\"$x\"
7774 exec_prefix="$acl_save_exec_prefix"
7775 prefix="$acl_save_prefix"
7776
7777 if test "X$x" = "X$element"; then
7778 haveit=yes
7779 break
7780 fi
7781 done
7782 if test -z "$haveit"; then
7783 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7784 fi
7785 done
7786
7787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7788$as_echo_n "checking how to link with libiconv... " >&6; }
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7790$as_echo "$LIBICONV" >&6; }
94ae1714 7791 else
016a3251
DD
7792 LIBICONV=
7793 LTLIBICONV=
fc3b640d 7794 fi
94ae1714 7795
6c7a06a3 7796
6c7a06a3 7797
016a3251 7798 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
7799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
7800$as_echo_n "checking for iconv declaration... " >&6; }
7801 if test "${am_cv_proto_iconv+set}" = set; then :
7802 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7803else
7804
81ecdfbb 7805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7806/* end confdefs.h. */
7807
6c7a06a3
TT
7808#include <stdlib.h>
7809#include <iconv.h>
7810extern
b4e70030 7811#ifdef __cplusplus
6c7a06a3 7812"C"
b4e70030 7813#endif
6c7a06a3
TT
7814#if defined(__STDC__) || defined(__cplusplus)
7815size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
7816#else
7817size_t iconv();
7818#endif
7819
b4e70030
JB
7820int
7821main ()
7822{
6c7a06a3 7823
b4e70030
JB
7824 ;
7825 return 0;
7826}
7827_ACEOF
81ecdfbb 7828if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7829 am_cv_proto_iconv_arg1=""
4e8d927d 7830else
81ecdfbb 7831 am_cv_proto_iconv_arg1="const"
b4e70030 7832fi
81ecdfbb 7833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7834 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);"
7835fi
7836
7837 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7839 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7840$as_echo "${ac_t:-
7841 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7842
7843cat >>confdefs.h <<_ACEOF
7844#define ICONV_CONST $am_cv_proto_iconv_arg1
7845_ACEOF
7846
7847 fi
6c7a06a3
TT
7848
7849
478aac75
DE
7850# GDB may fork/exec the iconv program to get the list of supported character
7851# sets. Allow the user to specify where to find it.
7852# There are several factors affecting the choice of option name:
7853# - There is already --with-libiconv-prefix but we can't use it, it specifies
7854# the build-time location of libiconv files.
7855# - The program we need to find is iconv, which comes with glibc. The user
7856# doesn't necessarily have libiconv installed. Therefore naming this
7857# --with-libiconv-foo feels wrong.
7858# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7859# defined to work on directories not files (though it really doesn't know
7860# the difference).
7861# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7862# with --with-libiconv-prefix.
7863# Putting these together is why the option name is --with-iconv-bin.
7864
7865
7866# Check whether --with-iconv-bin was given.
7867if test "${with_iconv_bin+set}" = set; then :
7868 withval=$with_iconv_bin; iconv_bin="${withval}"
7869
7870cat >>confdefs.h <<_ACEOF
7871#define ICONV_BIN "${iconv_bin}"
7872_ACEOF
7873
7874
7875 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7876 if test "x$prefix" = xNONE; then
7877 test_prefix=/usr/local
7878 else
7879 test_prefix=$prefix
7880 fi
7881 else
7882 test_prefix=$exec_prefix
7883 fi
7884 value=0
7885 case ${iconv_bin} in
7886 "${test_prefix}"|"${test_prefix}/"*|\
7887 '${exec_prefix}'|'${exec_prefix}/'*)
7888 value=1
7889 ;;
7890 esac
7891
7892cat >>confdefs.h <<_ACEOF
7893#define ICONV_BIN_RELOCATABLE $value
7894_ACEOF
7895
7896
7897
7898fi
7899
7900
cb01cfba 7901# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7902if test x"$enable_tui" != xno; then
cb01cfba
JB
7903 prefer_curses=yes
7904fi
7905
7906curses_found=no
7907if test x"$prefer_curses" = xyes; then
7908 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7909 # curses library because the latter might not provide all the
7910 # functionality we need. However, this leads to problems on systems
7911 # where the linker searches /usr/local/lib, but the compiler doesn't
7912 # search /usr/local/include, if ncurses is installed in /usr/local. A
7913 # default installation of ncurses on alpha*-dec-osf* will lead to such
7914 # a situation.
81ecdfbb
RW
7915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7916$as_echo_n "checking for library containing waddstr... " >&6; }
7917if test "${ac_cv_search_waddstr+set}" = set; then :
7918 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7919else
7920 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7922/* end confdefs.h. */
7923
81ecdfbb
RW
7924/* Override any GCC internal prototype to avoid an error.
7925 Use char because int might match the return type of a GCC
7926 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7927#ifdef __cplusplus
7928extern "C"
7929#endif
6c7a06a3
TT
7930char waddstr ();
7931int
7932main ()
7933{
81ecdfbb 7934return waddstr ();
6c7a06a3
TT
7935 ;
7936 return 0;
7937}
7938_ACEOF
81ecdfbb
RW
7939for ac_lib in '' ncurses cursesX curses; do
7940 if test -z "$ac_lib"; then
7941 ac_res="none required"
7942 else
7943 ac_res=-l$ac_lib
7944 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7945 fi
7946 if ac_fn_c_try_link "$LINENO"; then :
7947 ac_cv_search_waddstr=$ac_res
7948fi
7949rm -f core conftest.err conftest.$ac_objext \
7950 conftest$ac_exeext
7951 if test "${ac_cv_search_waddstr+set}" = set; then :
7952 break
7953fi
7954done
7955if test "${ac_cv_search_waddstr+set}" = set; then :
7956
6c7a06a3 7957else
81ecdfbb
RW
7958 ac_cv_search_waddstr=no
7959fi
7960rm conftest.$ac_ext
7961LIBS=$ac_func_search_save_LIBS
7962fi
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7964$as_echo "$ac_cv_search_waddstr" >&6; }
7965ac_res=$ac_cv_search_waddstr
7966if test "$ac_res" != no; then :
7967 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7968
7969fi
7970
7971
cb01cfba
JB
7972 if test "$ac_cv_search_waddstr" != no; then
7973 curses_found=yes
7974 fi
7975fi
7976
7977# Check whether we should enable the TUI, but only do so if we really
7978# can.
7979if test x"$enable_tui" != xno; then
7980 if test -d $srcdir/tui; then
7981 if test "$curses_found" != no; then
6c7a06a3
TT
7982 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7983 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7984 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7985 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7986 else
7987 if test x"$enable_tui" = xyes; then
81ecdfbb 7988 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7989 else
81ecdfbb
RW
7990 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7991$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7992 fi
7993 fi
7994 fi
7995fi
7996
7997# Since GDB uses Readline, we need termcap functionality. In many
7998# cases this will be provided by the curses library, but some systems
7999# have a seperate termcap library, or no curses library at all.
8000
8001case $host_os in
8002 cygwin*)
8003 if test -d $srcdir/libtermcap; then
8004 LIBS="../libtermcap/libtermcap.a $LIBS"
8005 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8006 fi ;;
8007 go32* | *djgpp*)
8008 ac_cv_search_tgetent="none required"
8009 ;;
6c7a06a3
TT
8010esac
8011
8012# These are the libraries checked by Readline.
81ecdfbb
RW
8013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8014$as_echo_n "checking for library containing tgetent... " >&6; }
8015if test "${ac_cv_search_tgetent+set}" = set; then :
8016 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8017else
8018 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8020/* end confdefs.h. */
8021
81ecdfbb
RW
8022/* Override any GCC internal prototype to avoid an error.
8023 Use char because int might match the return type of a GCC
8024 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8025#ifdef __cplusplus
8026extern "C"
8027#endif
6c7a06a3
TT
8028char tgetent ();
8029int
8030main ()
8031{
81ecdfbb 8032return tgetent ();
6c7a06a3
TT
8033 ;
8034 return 0;
8035}
8036_ACEOF
81ecdfbb
RW
8037for ac_lib in '' termcap tinfo curses ncurses; do
8038 if test -z "$ac_lib"; then
8039 ac_res="none required"
8040 else
8041 ac_res=-l$ac_lib
6c7a06a3 8042 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8043 fi
8044 if ac_fn_c_try_link "$LINENO"; then :
8045 ac_cv_search_tgetent=$ac_res
8046fi
8047rm -f core conftest.err conftest.$ac_objext \
8048 conftest$ac_exeext
8049 if test "${ac_cv_search_tgetent+set}" = set; then :
8050 break
8051fi
8052done
8053if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8054
6c7a06a3 8055else
81ecdfbb 8056 ac_cv_search_tgetent=no
6c7a06a3 8057fi
81ecdfbb 8058rm conftest.$ac_ext
6c7a06a3
TT
8059LIBS=$ac_func_search_save_LIBS
8060fi
81ecdfbb
RW
8061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8062$as_echo "$ac_cv_search_tgetent" >&6; }
8063ac_res=$ac_cv_search_tgetent
8064if test "$ac_res" != no; then :
8065 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8066
06825bd1
MK
8067fi
8068
06825bd1 8069
bec39cab 8070if test "$ac_cv_search_tgetent" = no; then
7a85168d 8071 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8072fi
8073
3841debe 8074
81ecdfbb
RW
8075# Check whether --with-system-readline was given.
8076if test "${with_system_readline+set}" = set; then :
8077 withval=$with_system_readline;
8078fi
6a30b0a5 8079
6a30b0a5
AS
8080
8081if test "$with_system_readline" = yes; then
8082 READLINE=-lreadline
8083 READLINE_DEPS=
8084 READLINE_CFLAGS=
39037522 8085 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8086else
8087 READLINE='$(READLINE_DIR)/libreadline.a'
8088 READLINE_DEPS='$(READLINE)'
8089 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8090 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8091fi
8092
8093
8094
8095
8096
f997c383
SD
8097# Generate jit-reader.h
8098
8099# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8100TARGET_PTR=
8101
8102# The cast to long int works around a bug in the HP C Compiler
8103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8105# This bug is HP SR number 8606223364.
8106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8107$as_echo_n "checking size of unsigned long long... " >&6; }
8108if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8109 $as_echo_n "(cached) " >&6
8110else
8111 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8112
8113else
8114 if test "$ac_cv_type_unsigned_long_long" = yes; then
8115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8117{ as_fn_set_status 77
8118as_fn_error "cannot compute sizeof (unsigned long long)
8119See \`config.log' for more details." "$LINENO" 5; }; }
8120 else
8121 ac_cv_sizeof_unsigned_long_long=0
8122 fi
8123fi
8124
8125fi
8126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8127$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8128
8129
8130
8131cat >>confdefs.h <<_ACEOF
8132#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8133_ACEOF
8134
8135
8136# The cast to long int works around a bug in the HP C Compiler
8137# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8138# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8139# This bug is HP SR number 8606223364.
8140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
8141$as_echo_n "checking size of unsigned long... " >&6; }
8142if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
8143 $as_echo_n "(cached) " >&6
8144else
8145 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
8146
8147else
8148 if test "$ac_cv_type_unsigned_long" = yes; then
8149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8151{ as_fn_set_status 77
8152as_fn_error "cannot compute sizeof (unsigned long)
8153See \`config.log' for more details." "$LINENO" 5; }; }
8154 else
8155 ac_cv_sizeof_unsigned_long=0
8156 fi
8157fi
8158
8159fi
8160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
8161$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
8162
8163
8164
8165cat >>confdefs.h <<_ACEOF
8166#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8167_ACEOF
8168
8169
8170# The cast to long int works around a bug in the HP C Compiler
8171# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8172# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8173# This bug is HP SR number 8606223364.
8174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
8175$as_echo_n "checking size of unsigned __int128... " >&6; }
8176if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
8177 $as_echo_n "(cached) " >&6
8178else
8179 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
8180
8181else
8182 if test "$ac_cv_type_unsigned___int128" = yes; then
8183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8185{ as_fn_set_status 77
8186as_fn_error "cannot compute sizeof (unsigned __int128)
8187See \`config.log' for more details." "$LINENO" 5; }; }
8188 else
8189 ac_cv_sizeof_unsigned___int128=0
8190 fi
8191fi
8192
8193fi
8194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
8195$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
8196
8197
8198
8199cat >>confdefs.h <<_ACEOF
8200#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
8201_ACEOF
8202
8203
8204
8205if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
8206 TARGET_PTR="unsigned long"
8207elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
8208 TARGET_PTR="unsigned long long"
8209elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
8210 TARGET_PTR="unsigned __int128"
8211else
8212 TARGET_PTR="unsigned long"
8213fi
8214
8215
8216ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
8217
8218
a2d08b9e
SD
8219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8220$as_echo_n "checking for library containing dlopen... " >&6; }
8221if test "${ac_cv_search_dlopen+set}" = set; then :
8222 $as_echo_n "(cached) " >&6
8223else
8224 ac_func_search_save_LIBS=$LIBS
8225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8226/* end confdefs.h. */
8227
8228/* Override any GCC internal prototype to avoid an error.
8229 Use char because int might match the return type of a GCC
8230 builtin and then its argument prototype would still apply. */
8231#ifdef __cplusplus
8232extern "C"
8233#endif
8234char dlopen ();
8235int
8236main ()
8237{
8238return dlopen ();
8239 ;
8240 return 0;
8241}
8242_ACEOF
8243for ac_lib in '' dl; do
8244 if test -z "$ac_lib"; then
8245 ac_res="none required"
8246 else
8247 ac_res=-l$ac_lib
8248 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8249 fi
8250 if ac_fn_c_try_link "$LINENO"; then :
8251 ac_cv_search_dlopen=$ac_res
8252fi
8253rm -f core conftest.err conftest.$ac_objext \
8254 conftest$ac_exeext
8255 if test "${ac_cv_search_dlopen+set}" = set; then :
8256 break
8257fi
8258done
8259if test "${ac_cv_search_dlopen+set}" = set; then :
8260
8261else
8262 ac_cv_search_dlopen=no
8263fi
8264rm conftest.$ac_ext
8265LIBS=$ac_func_search_save_LIBS
8266fi
8267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8268$as_echo "$ac_cv_search_dlopen" >&6; }
8269ac_res=$ac_cv_search_dlopen
8270if test "$ac_res" != no; then :
8271 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8272
8273fi
8274
8275
39037522 8276
b8e0a31c
SD
8277
8278# Check whether --with-jit-reader-dir was given.
8279if test "${with_jit_reader_dir+set}" = set; then :
8280 withval=$with_jit_reader_dir;
8281 JIT_READER_DIR=$withval
8282else
8283 JIT_READER_DIR=${libdir}/gdb
8284fi
8285
8286
8287 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
8288 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8289 ac_define_dir=`eval echo $JIT_READER_DIR`
8290 ac_define_dir=`eval echo $ac_define_dir`
8291
8292cat >>confdefs.h <<_ACEOF
8293#define JIT_READER_DIR "$ac_define_dir"
8294_ACEOF
8295
8296
8297
8298
8299 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8300 if test "x$prefix" = xNONE; then
8301 test_prefix=/usr/local
8302 else
8303 test_prefix=$prefix
8304 fi
8305 else
8306 test_prefix=$exec_prefix
8307 fi
8308 value=0
8309 case ${ac_define_dir} in
8310 "${test_prefix}"|"${test_prefix}/"*|\
8311 '${exec_prefix}'|'${exec_prefix}/'*)
8312 value=1
8313 ;;
8314 esac
8315
8316cat >>confdefs.h <<_ACEOF
8317#define JIT_READER_DIR_RELOCATABLE $value
8318_ACEOF
8319
8320
8321
8322
8323
81ecdfbb
RW
8324# Check whether --with-expat was given.
8325if test "${with_expat+set}" = set; then :
8326 withval=$with_expat;
5c39566f
DJ
8327else
8328 with_expat=auto
81ecdfbb
RW
8329fi
8330
8331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
8332$as_echo_n "checking whether to use expat... " >&6; }
8333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
8334$as_echo "$with_expat" >&6; }
5c39566f
DJ
8335
8336if test "${with_expat}" = no; then
81ecdfbb
RW
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
8338$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
8339 HAVE_LIBEXPAT=no
8340else
8341
3841debe
DJ
8342
8343
8344
8345
8346
8347
8348
8349 use_additional=yes
8350
8351 acl_save_prefix="$prefix"
8352 prefix="$acl_final_prefix"
8353 acl_save_exec_prefix="$exec_prefix"
8354 exec_prefix="$acl_final_exec_prefix"
8355
8356 eval additional_includedir=\"$includedir\"
8357 eval additional_libdir=\"$libdir\"
8358
8359 exec_prefix="$acl_save_exec_prefix"
8360 prefix="$acl_save_prefix"
8361
8362
81ecdfbb
RW
8363# Check whether --with-libexpat-prefix was given.
8364if test "${with_libexpat_prefix+set}" = set; then :
8365 withval=$with_libexpat_prefix;
3841debe
DJ
8366 if test "X$withval" = "Xno"; then
8367 use_additional=no
8368 else
8369 if test "X$withval" = "X"; then
8370
8371 acl_save_prefix="$prefix"
8372 prefix="$acl_final_prefix"
8373 acl_save_exec_prefix="$exec_prefix"
8374 exec_prefix="$acl_final_exec_prefix"
8375
8376 eval additional_includedir=\"$includedir\"
8377 eval additional_libdir=\"$libdir\"
8378
8379 exec_prefix="$acl_save_exec_prefix"
8380 prefix="$acl_save_prefix"
8381
8382 else
8383 additional_includedir="$withval/include"
8384 additional_libdir="$withval/lib"
8385 fi
8386 fi
8387
81ecdfbb
RW
8388fi
8389
3841debe
DJ
8390 LIBEXPAT=
8391 LTLIBEXPAT=
8392 INCEXPAT=
8393 rpathdirs=
8394 ltrpathdirs=
8395 names_already_handled=
8396 names_next_round='expat '
8397 while test -n "$names_next_round"; do
8398 names_this_round="$names_next_round"
8399 names_next_round=
8400 for name in $names_this_round; do
8401 already_handled=
8402 for n in $names_already_handled; do
8403 if test "$n" = "$name"; then
8404 already_handled=yes
8405 break
8406 fi
8407 done
8408 if test -z "$already_handled"; then
8409 names_already_handled="$names_already_handled $name"
8410 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8411 eval value=\"\$HAVE_LIB$uppername\"
8412 if test -n "$value"; then
8413 if test "$value" = yes; then
8414 eval value=\"\$LIB$uppername\"
8415 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
8416 eval value=\"\$LTLIB$uppername\"
8417 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
8418 else
8419 :
8420 fi
8421 else
8422 found_dir=
8423 found_la=
8424 found_so=
8425 found_a=
8426 if test $use_additional = yes; then
8427 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8428 found_dir="$additional_libdir"
8429 found_so="$additional_libdir/lib$name.$shlibext"
8430 if test -f "$additional_libdir/lib$name.la"; then
8431 found_la="$additional_libdir/lib$name.la"
8432 fi
8433 else
8434 if test -f "$additional_libdir/lib$name.$libext"; then
8435 found_dir="$additional_libdir"
8436 found_a="$additional_libdir/lib$name.$libext"
8437 if test -f "$additional_libdir/lib$name.la"; then
8438 found_la="$additional_libdir/lib$name.la"
8439 fi
8440 fi
8441 fi
8442 fi
8443 if test "X$found_dir" = "X"; then
8444 for x in $LDFLAGS $LTLIBEXPAT; do
8445
8446 acl_save_prefix="$prefix"
8447 prefix="$acl_final_prefix"
8448 acl_save_exec_prefix="$exec_prefix"
8449 exec_prefix="$acl_final_exec_prefix"
8450 eval x=\"$x\"
8451 exec_prefix="$acl_save_exec_prefix"
8452 prefix="$acl_save_prefix"
8453
8454 case "$x" in
8455 -L*)
8456 dir=`echo "X$x" | sed -e 's/^X-L//'`
8457 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8458 found_dir="$dir"
8459 found_so="$dir/lib$name.$shlibext"
8460 if test -f "$dir/lib$name.la"; then
8461 found_la="$dir/lib$name.la"
8462 fi
8463 else
8464 if test -f "$dir/lib$name.$libext"; then
8465 found_dir="$dir"
8466 found_a="$dir/lib$name.$libext"
8467 if test -f "$dir/lib$name.la"; then
8468 found_la="$dir/lib$name.la"
8469 fi
8470 fi
8471 fi
8472 ;;
8473 esac
8474 if test "X$found_dir" != "X"; then
8475 break
8476 fi
8477 done
8478 fi
8479 if test "X$found_dir" != "X"; then
8480 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
8481 if test "X$found_so" != "X"; then
8482 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8483 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8484 else
8485 haveit=
8486 for x in $ltrpathdirs; do
8487 if test "X$x" = "X$found_dir"; then
8488 haveit=yes
8489 break
8490 fi
8491 done
8492 if test -z "$haveit"; then
8493 ltrpathdirs="$ltrpathdirs $found_dir"
8494 fi
8495 if test "$hardcode_direct" = yes; then
8496 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8497 else
8498 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8499 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8500 haveit=
8501 for x in $rpathdirs; do
8502 if test "X$x" = "X$found_dir"; then
8503 haveit=yes
8504 break
8505 fi
8506 done
8507 if test -z "$haveit"; then
8508 rpathdirs="$rpathdirs $found_dir"
8509 fi
8510 else
8511 haveit=
8512 for x in $LDFLAGS $LIBEXPAT; do
8513
8514 acl_save_prefix="$prefix"
8515 prefix="$acl_final_prefix"
8516 acl_save_exec_prefix="$exec_prefix"
8517 exec_prefix="$acl_final_exec_prefix"
8518 eval x=\"$x\"
8519 exec_prefix="$acl_save_exec_prefix"
8520 prefix="$acl_save_prefix"
8521
8522 if test "X$x" = "X-L$found_dir"; then
8523 haveit=yes
8524 break
8525 fi
8526 done
8527 if test -z "$haveit"; then
8528 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
8529 fi
8530 if test "$hardcode_minus_L" != no; then
8531 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
8532 else
8533 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8534 fi
8535 fi
8536 fi
8537 fi
8538 else
8539 if test "X$found_a" != "X"; then
8540 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
8541 else
8542 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
8543 fi
8544 fi
8545 additional_includedir=
8546 case "$found_dir" in
8547 */lib | */lib/)
8548 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8549 additional_includedir="$basedir/include"
8550 ;;
8551 esac
8552 if test "X$additional_includedir" != "X"; then
8553 if test "X$additional_includedir" != "X/usr/include"; then
8554 haveit=
8555 if test "X$additional_includedir" = "X/usr/local/include"; then
8556 if test -n "$GCC"; then
8557 case $host_os in
8558 linux*) haveit=yes;;
8559 esac
8560 fi
8561 fi
8562 if test -z "$haveit"; then
8563 for x in $CPPFLAGS $INCEXPAT; do
8564
8565 acl_save_prefix="$prefix"
8566 prefix="$acl_final_prefix"
8567 acl_save_exec_prefix="$exec_prefix"
8568 exec_prefix="$acl_final_exec_prefix"
8569 eval x=\"$x\"
8570 exec_prefix="$acl_save_exec_prefix"
8571 prefix="$acl_save_prefix"
8572
8573 if test "X$x" = "X-I$additional_includedir"; then
8574 haveit=yes
8575 break
8576 fi
8577 done
8578 if test -z "$haveit"; then
8579 if test -d "$additional_includedir"; then
8580 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
8581 fi
8582 fi
8583 fi
8584 fi
8585 fi
8586 if test -n "$found_la"; then
8587 save_libdir="$libdir"
8588 case "$found_la" in
8589 */* | *\\*) . "$found_la" ;;
8590 *) . "./$found_la" ;;
8591 esac
8592 libdir="$save_libdir"
8593 for dep in $dependency_libs; do
8594 case "$dep" in
8595 -L*)
8596 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8597 if test "X$additional_libdir" != "X/usr/lib"; then
8598 haveit=
8599 if test "X$additional_libdir" = "X/usr/local/lib"; then
8600 if test -n "$GCC"; then
8601 case $host_os in
8602 linux*) haveit=yes;;
8603 esac
8604 fi
8605 fi
8606 if test -z "$haveit"; then
8607 haveit=
8608 for x in $LDFLAGS $LIBEXPAT; do
8609
8610 acl_save_prefix="$prefix"
8611 prefix="$acl_final_prefix"
8612 acl_save_exec_prefix="$exec_prefix"
8613 exec_prefix="$acl_final_exec_prefix"
8614 eval x=\"$x\"
8615 exec_prefix="$acl_save_exec_prefix"
8616 prefix="$acl_save_prefix"
8617
8618 if test "X$x" = "X-L$additional_libdir"; then
8619 haveit=yes
8620 break
8621 fi
8622 done
8623 if test -z "$haveit"; then
8624 if test -d "$additional_libdir"; then
8625 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
8626 fi
8627 fi
8628 haveit=
8629 for x in $LDFLAGS $LTLIBEXPAT; do
8630
8631 acl_save_prefix="$prefix"
8632 prefix="$acl_final_prefix"
8633 acl_save_exec_prefix="$exec_prefix"
8634 exec_prefix="$acl_final_exec_prefix"
8635 eval x=\"$x\"
8636 exec_prefix="$acl_save_exec_prefix"
8637 prefix="$acl_save_prefix"
8638
8639 if test "X$x" = "X-L$additional_libdir"; then
8640 haveit=yes
8641 break
8642 fi
8643 done
8644 if test -z "$haveit"; then
8645 if test -d "$additional_libdir"; then
8646 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
8647 fi
8648 fi
8649 fi
8650 fi
8651 ;;
8652 -R*)
8653 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8654 if test "$enable_rpath" != no; then
8655 haveit=
8656 for x in $rpathdirs; do
8657 if test "X$x" = "X$dir"; then
8658 haveit=yes
8659 break
8660 fi
8661 done
8662 if test -z "$haveit"; then
8663 rpathdirs="$rpathdirs $dir"
8664 fi
8665 haveit=
8666 for x in $ltrpathdirs; do
8667 if test "X$x" = "X$dir"; then
8668 haveit=yes
8669 break
8670 fi
8671 done
8672 if test -z "$haveit"; then
8673 ltrpathdirs="$ltrpathdirs $dir"
8674 fi
8675 fi
8676 ;;
8677 -l*)
8678 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8679 ;;
8680 *.la)
8681 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8682 ;;
8683 *)
8684 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8685 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8686 ;;
81ecdfbb
RW
8687 esac
8688 done
8689 fi
8690 else
8691 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8692 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8693 fi
8694 fi
8695 fi
8696 done
8697 done
8698 if test "X$rpathdirs" != "X"; then
8699 if test -n "$hardcode_libdir_separator"; then
8700 alldirs=
8701 for found_dir in $rpathdirs; do
8702 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8703 done
8704 acl_save_libdir="$libdir"
8705 libdir="$alldirs"
8706 eval flag=\"$hardcode_libdir_flag_spec\"
8707 libdir="$acl_save_libdir"
8708 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8709 else
8710 for found_dir in $rpathdirs; do
8711 acl_save_libdir="$libdir"
8712 libdir="$found_dir"
8713 eval flag=\"$hardcode_libdir_flag_spec\"
8714 libdir="$acl_save_libdir"
8715 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8716 done
8717 fi
8718 fi
8719 if test "X$ltrpathdirs" != "X"; then
8720 for found_dir in $ltrpathdirs; do
8721 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8722 done
8723 fi
a9322a30
TT
8724
8725
81ecdfbb 8726 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8727
81ecdfbb
RW
8728 for element in $INCEXPAT; do
8729 haveit=
8730 for x in $CPPFLAGS; do
a9322a30 8731
81ecdfbb
RW
8732 acl_save_prefix="$prefix"
8733 prefix="$acl_final_prefix"
8734 acl_save_exec_prefix="$exec_prefix"
8735 exec_prefix="$acl_final_exec_prefix"
8736 eval x=\"$x\"
8737 exec_prefix="$acl_save_exec_prefix"
8738 prefix="$acl_save_prefix"
a8111142 8739
81ecdfbb
RW
8740 if test "X$x" = "X$element"; then
8741 haveit=yes
8742 break
8743 fi
8744 done
8745 if test -z "$haveit"; then
8746 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8747 fi
8748 done
a9322a30
TT
8749
8750
81ecdfbb
RW
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8752$as_echo_n "checking for libexpat... " >&6; }
8753if test "${ac_cv_libexpat+set}" = set; then :
8754 $as_echo_n "(cached) " >&6
bec39cab 8755else
bec39cab 8756
81ecdfbb
RW
8757 ac_save_LIBS="$LIBS"
8758 LIBS="$LIBS $LIBEXPAT"
8759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8760/* end confdefs.h. */
81ecdfbb
RW
8761#include "expat.h"
8762int
8763main ()
8764{
8765XML_Parser p = XML_ParserCreate (0);
8766 ;
8767 return 0;
8768}
bec39cab 8769_ACEOF
81ecdfbb
RW
8770if ac_fn_c_try_link "$LINENO"; then :
8771 ac_cv_libexpat=yes
c906108c 8772else
81ecdfbb 8773 ac_cv_libexpat=no
bec39cab 8774fi
81ecdfbb
RW
8775rm -f core conftest.err conftest.$ac_objext \
8776 conftest$ac_exeext conftest.$ac_ext
8777 LIBS="$ac_save_LIBS"
c906108c 8778
95ca63c4 8779fi
81ecdfbb
RW
8780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8781$as_echo "$ac_cv_libexpat" >&6; }
8782 if test "$ac_cv_libexpat" = yes; then
8783 HAVE_LIBEXPAT=yes
bec39cab 8784
81ecdfbb 8785$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8786
81ecdfbb
RW
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8788$as_echo_n "checking how to link with libexpat... " >&6; }
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8790$as_echo "$LIBEXPAT" >&6; }
8791 else
8792 HAVE_LIBEXPAT=no
8793 CPPFLAGS="$ac_save_CPPFLAGS"
8794 LIBEXPAT=
8795 LTLIBEXPAT=
8796 fi
95ca63c4
CF
8797
8798
8799
7cb9022a
MK
8800
8801
bec39cab 8802
81ecdfbb
RW
8803 if test "$HAVE_LIBEXPAT" != yes; then
8804 if test "$with_expat" = yes; then
8805 as_fn_error "expat is missing or unusable" "$LINENO" 5
8806 else
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8808$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8809 fi
8810 else
8811 save_LIBS=$LIBS
8812 LIBS="$LIBS $LIBEXPAT"
8813 for ac_func in XML_StopParser
8814do :
8815 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8816if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8817 cat >>confdefs.h <<_ACEOF
81ecdfbb 8818#define HAVE_XML_STOPPARSER 1
bec39cab 8819_ACEOF
95ca63c4 8820
bec39cab 8821fi
bec39cab 8822done
95ca63c4 8823
81ecdfbb
RW
8824 LIBS=$save_LIBS
8825 fi
a9322a30
TT
8826fi
8827
d344e670
DE
8828# --------------------- #
8829# Check for libpython. #
8830# --------------------- #
8831
a9322a30 8832
a9322a30
TT
8833
8834
ec685c5e 8835
0c4a4063 8836
81ecdfbb
RW
8837# Check whether --with-python was given.
8838if test "${with_python+set}" = set; then :
8839 withval=$with_python;
bec39cab 8840else
81ecdfbb 8841 with_python=auto
bec39cab 8842fi
bec39cab 8843
81ecdfbb
RW
8844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8845$as_echo_n "checking whether to use python... " >&6; }
8846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8847$as_echo "$with_python" >&6; }
9a156167 8848
81ecdfbb
RW
8849if test "${with_python}" = no; then
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8851$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8852 have_libpython=no
bec39cab 8853else
81ecdfbb 8854 case "${with_python}" in
8c85a4e2 8855 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8856 if test -d ${with_python}; then
8857 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8858 python_prog="${with_python}/bin/python"
0c4a4063 8859 python_prefix=
9c4ea6c5
JB
8860 # If python does not exit ${with_python}/bin, then try in
8861 # ${with_python}. On Windows/MinGW, this is where the Python
8862 # executable is.
8863 if test ! -x "${python_prog}"; then
8864 python_prog="${with_python}/python"
8865 python_prefix=
8866 fi
e7a30f46 8867 if test ! -x "${python_prog}"; then
ec685c5e
DE
8868 # Fall back to gdb 7.0/7.1 behaviour.
8869 python_prog=missing
0c4a4063 8870 python_prefix=${with_python}
ec685c5e 8871 fi
e7a30f46 8872 elif test -x "${with_python}"; then
ec685c5e
DE
8873 # While we can't run python compiled for $host (unless host == build),
8874 # the user could write a script that provides the needed information,
8875 # so we support that.
ec685c5e 8876 python_prog=${with_python}
0c4a4063 8877 python_prefix=
ec685c5e
DE
8878 else
8879 as_fn_error "invalid value for --with-python" "$LINENO" 5
8880 fi
81ecdfbb 8881 ;;
ec685c5e
DE
8882 */*)
8883 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8884 as_fn_error "invalid value for --with-python" "$LINENO" 5
8885 ;;
ec685c5e
DE
8886 *)
8887 # The user has either specified auto, yes, or the name of the python
8888 # program assumed to be in $PATH.
8889 python_prefix=
8890 case "${with_python}" in
8891 yes | auto)
8892 if test ${build} = ${host}; then
8893 # Extract the first word of "python", so it can be a program name with args.
8894set dummy python; ac_word=$2
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8896$as_echo_n "checking for $ac_word... " >&6; }
8897if test "${ac_cv_path_python_prog_path+set}" = set; then :
8898 $as_echo_n "(cached) " >&6
8899else
8900 case $python_prog_path in
8901 [\\/]* | ?:[\\/]*)
8902 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8903 ;;
8904 *)
8905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8906for as_dir in $PATH
8907do
8908 IFS=$as_save_IFS
8909 test -z "$as_dir" && as_dir=.
8910 for ac_exec_ext in '' $ac_executable_extensions; do
8911 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8912 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8914 break 2
8915 fi
8916done
8917 done
8918IFS=$as_save_IFS
8919
8920 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8921 ;;
8922esac
8923fi
8924python_prog_path=$ac_cv_path_python_prog_path
8925if test -n "$python_prog_path"; then
8926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8927$as_echo "$python_prog_path" >&6; }
8928else
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934 if test "${python_prog_path}" = missing; then
8935 python_prog=missing
8936 else
8937 python_prog=${python_prog_path}
8938 fi
8939 else
8940 # Not much we can do except assume the cross-compiler will find the
8941 # right files.
8942 python_prog=missing
8943 fi
8944 ;;
8945 *)
8946 # While we can't run python compiled for $host (unless host == build),
8947 # the user could write a script that provides the needed information,
8948 # so we support that.
8949 python_prog="${with_python}"
8950 # Extract the first word of "${python_prog}", so it can be a program name with args.
8951set dummy ${python_prog}; ac_word=$2
8952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8953$as_echo_n "checking for $ac_word... " >&6; }
8954if test "${ac_cv_path_python_prog_path+set}" = set; then :
8955 $as_echo_n "(cached) " >&6
8956else
8957 case $python_prog_path in
8958 [\\/]* | ?:[\\/]*)
8959 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8960 ;;
8961 *)
8962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8963for as_dir in $PATH
8964do
8965 IFS=$as_save_IFS
8966 test -z "$as_dir" && as_dir=.
8967 for ac_exec_ext in '' $ac_executable_extensions; do
8968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8969 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8971 break 2
8972 fi
8973done
8974 done
8975IFS=$as_save_IFS
8976
8977 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8978 ;;
8979esac
8980fi
8981python_prog_path=$ac_cv_path_python_prog_path
8982if test -n "$python_prog_path"; then
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8984$as_echo "$python_prog_path" >&6; }
8985else
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8987$as_echo "no" >&6; }
8988fi
8989
8990
8991 if test "${python_prog_path}" = missing; then
8992 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8993 fi
8994 ;;
8995 esac
81ecdfbb
RW
8996 esac
8997
ec685c5e 8998 if test "${python_prog}" != missing; then
e7a30f46
DE
8999 # We have a python program to use, but it may be too old.
9000 # Don't flag an error for --with-python=auto (the default).
9001 have_python_config=yes
ec685c5e
DE
9002 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9003 if test $? != 0; then
e7a30f46
DE
9004 have_python_config=failed
9005 if test "${with_python}" != auto; then
9006 as_fn_error "failure running python-config --includes" "$LINENO" 5
9007 fi
ec685c5e
DE
9008 fi
9009 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9010 if test $? != 0; then
e7a30f46
DE
9011 have_python_config=failed
9012 if test "${with_python}" != auto; then
9013 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9014 fi
ec685c5e 9015 fi
0c4a4063
DE
9016 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9017 if test $? != 0; then
e7a30f46
DE
9018 have_python_config=failed
9019 if test "${with_python}" != auto; then
9020 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9021 fi
0c4a4063 9022 fi
ec685c5e 9023 else
ac534cba
JB
9024 # We do not have a python executable we can use to determine where
9025 # to find the Python headers and libs. We cannot guess the include
9026 # path from the python_prefix either, because that include path
9027 # depends on the Python version. So, there is nothing much we can
9028 # do except assume that the compiler will be able to find those files.
9029 python_includes=
9030 python_libs=
0c4a4063 9031 have_python_config=no
ec685c5e 9032 fi
bec39cab 9033
ec685c5e
DE
9034 # If we have python-config, only try the configuration it provides.
9035 # Otherwise fallback on the old way of trying different versions of
9036 # python in turn.
81ecdfbb 9037
ec685c5e
DE
9038 have_libpython=no
9039 if test "${have_python_config}" = yes; then
c1039e3c
JB
9040 # Determine the Python version by extracting "-lpython<version>"
9041 # part of the python_libs. <version> is usually X.Y with X and Y
9042 # being decimal numbers, but can also be XY (seen on Windows).
9043 #
9044 # The extraction is performed using sed with a regular expression.
9045 # Initially, the regexp used was using the '?' quantifier to make
9046 # the dot in the version number optional. Unfortunately, this
9047 # does not work with non-GNU versions of sed because, because of
9048 # what looks like a limitation (the '?' quantifier does not work
9049 # with back-references). We work around this limitation by using
9050 # the '*' quantifier instead. It means that, in theory, we might
9051 # match unexpected version strings such as "-lpython2..7", but
9052 # this seems unlikely in practice. And even if that happens,
9053 # an error will be triggered later on, when checking that version
9054 # number.
ec685c5e 9055 python_version=`echo " ${python_libs} " \
c1039e3c 9056 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9057 case "${python_version}" in
9058 python*)
ec685c5e
DE
9059
9060 version=${python_version}
9061
9062 new_CPPFLAGS=${python_includes}
9063 new_LIBS=${python_libs}
81ecdfbb
RW
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9065$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9066 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9067 save_LIBS=$LIBS
ec685c5e
DE
9068 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9069 LIBS="$LIBS $new_LIBS"
9070 found_usable_python=no
81ecdfbb 9071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9072/* end confdefs.h. */
ac534cba 9073#include "Python.h"
81ecdfbb
RW
9074int
9075main ()
9076{
9077Py_Initialize ();
9078 ;
9079 return 0;
9080}
bec39cab 9081_ACEOF
81ecdfbb 9082if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9083 have_libpython=${version}
9084 found_usable_python=yes
ac534cba
JB
9085 PYTHON_CPPFLAGS=$new_CPPFLAGS
9086 PYTHON_LIBS=$new_LIBS
9a156167 9087fi
81ecdfbb
RW
9088rm -f core conftest.err conftest.$ac_objext \
9089 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9090 CPPFLAGS=$save_CPPFLAGS
9091 LIBS=$save_LIBS
ec685c5e
DE
9092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9093$as_echo "${found_usable_python}" >&6; }
9a156167 9094
0c4a4063
DE
9095 ;;
9096 *)
ec685c5e 9097 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9098 ;;
9099 esac
e7a30f46 9100 elif test "${have_python_config}" != failed; then
ec685c5e 9101 if test "${have_libpython}" = no; then
9a156167 9102
420697bb
TT
9103 version=python2.7
9104
9105 new_CPPFLAGS=${python_includes}
9106 new_LIBS="${python_libs} -lpython2.7"
9107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9108$as_echo_n "checking for ${version}... " >&6; }
9109 save_CPPFLAGS=$CPPFLAGS
9110 save_LIBS=$LIBS
9111 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9112 LIBS="$LIBS $new_LIBS"
9113 found_usable_python=no
9114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9115/* end confdefs.h. */
ac534cba 9116#include "Python.h"
420697bb
TT
9117int
9118main ()
9119{
9120Py_Initialize ();
9121 ;
9122 return 0;
9123}
9124_ACEOF
9125if ac_fn_c_try_link "$LINENO"; then :
9126 have_libpython=${version}
9127 found_usable_python=yes
ac534cba
JB
9128 PYTHON_CPPFLAGS=$new_CPPFLAGS
9129 PYTHON_LIBS=$new_LIBS
420697bb
TT
9130fi
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
420697bb
TT
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9136$as_echo "${found_usable_python}" >&6; }
9137
9138 fi
9139 if test "${have_libpython}" = no; then
9140
ec685c5e
DE
9141 version=python2.6
9142
9143 new_CPPFLAGS=${python_includes}
9144 new_LIBS="${python_libs} -lpython2.6"
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9146$as_echo_n "checking for ${version}... " >&6; }
9147 save_CPPFLAGS=$CPPFLAGS
9148 save_LIBS=$LIBS
9149 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9150 LIBS="$LIBS $new_LIBS"
9151 found_usable_python=no
9152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9153/* end confdefs.h. */
ac534cba 9154#include "Python.h"
ec685c5e
DE
9155int
9156main ()
9157{
9158Py_Initialize ();
9159 ;
9160 return 0;
9161}
9162_ACEOF
9163if ac_fn_c_try_link "$LINENO"; then :
9164 have_libpython=${version}
9165 found_usable_python=yes
ac534cba
JB
9166 PYTHON_CPPFLAGS=$new_CPPFLAGS
9167 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
9168fi
9169rm -f core conftest.err conftest.$ac_objext \
9170 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9171 CPPFLAGS=$save_CPPFLAGS
9172 LIBS=$save_LIBS
ec685c5e
DE
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9174$as_echo "${found_usable_python}" >&6; }
9a156167 9175
81ecdfbb 9176 fi
ec685c5e 9177 if test ${have_libpython} = no; then
9a156167 9178
81ecdfbb 9179 version=python2.5
9a156167 9180
ec685c5e
DE
9181 new_CPPFLAGS=${python_includes}
9182 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9184$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9185 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9186 save_LIBS=$LIBS
ec685c5e
DE
9187 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9188 LIBS="$LIBS $new_LIBS"
9189 found_usable_python=no
81ecdfbb 9190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9191/* end confdefs.h. */
ac534cba 9192#include "Python.h"
81ecdfbb
RW
9193int
9194main ()
9195{
9196Py_Initialize ();
9197 ;
9198 return 0;
9199}
436868fb 9200_ACEOF
81ecdfbb 9201if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9202 have_libpython=${version}
9203 found_usable_python=yes
ac534cba
JB
9204 PYTHON_CPPFLAGS=$new_CPPFLAGS
9205 PYTHON_LIBS=$new_LIBS
436868fb 9206fi
81ecdfbb
RW
9207rm -f core conftest.err conftest.$ac_objext \
9208 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9209 CPPFLAGS=$save_CPPFLAGS
9210 LIBS=$save_LIBS
ec685c5e
DE
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9212$as_echo "${found_usable_python}" >&6; }
a9322a30 9213
81ecdfbb 9214 fi
ec685c5e 9215 if test ${have_libpython} = no; then
a9322a30 9216
81ecdfbb 9217 version=python2.4
a9322a30 9218
ec685c5e
DE
9219 new_CPPFLAGS=${python_includes}
9220 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9222$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9223 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9224 save_LIBS=$LIBS
ec685c5e
DE
9225 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9226 LIBS="$LIBS $new_LIBS"
9227 found_usable_python=no
81ecdfbb 9228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 9229/* end confdefs.h. */
ac534cba 9230#include "Python.h"
a9322a30
TT
9231int
9232main ()
9233{
81ecdfbb 9234Py_Initialize ();
a9322a30
TT
9235 ;
9236 return 0;
9237}
436868fb 9238_ACEOF
81ecdfbb 9239if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9240 have_libpython=${version}
9241 found_usable_python=yes
ac534cba
JB
9242 PYTHON_CPPFLAGS=$new_CPPFLAGS
9243 PYTHON_LIBS=$new_LIBS
436868fb 9244fi
81ecdfbb
RW
9245rm -f core conftest.err conftest.$ac_objext \
9246 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9247 CPPFLAGS=$save_CPPFLAGS
9248 LIBS=$save_LIBS
ec685c5e
DE
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9250$as_echo "${found_usable_python}" >&6; }
81ecdfbb 9251
ec685c5e
DE
9252 fi
9253 fi
9c4ea6c5 9254 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
9255
9256$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
9257
9c4ea6c5 9258 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
9259
9260$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
9261
9c4ea6c5 9262 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
9263
9264$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
9265
9c4ea6c5 9266 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
9267
9268$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
9269
81ecdfbb 9270 fi
ec685c5e
DE
9271
9272 if test "${have_libpython}" = no; then
81ecdfbb
RW
9273 case "${with_python}" in
9274 yes)
9275 as_fn_error "python is missing or unusable" "$LINENO" 5
9276 ;;
9277 auto)
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
9279$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
9280 ;;
9281 *)
9282 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
9283 ;;
9284 esac
0c4a4063
DE
9285 else
9286 if test -n "${python_prefix}"; then
9287
9288cat >>confdefs.h <<_ACEOF
9289#define WITH_PYTHON_PATH "${python_prefix}"
9290_ACEOF
9291
9292
9293 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9294 if test "x$prefix" = xNONE; then
9295 test_prefix=/usr/local
9296 else
9297 test_prefix=$prefix
9298 fi
9299 else
9300 test_prefix=$exec_prefix
9301 fi
9302 value=0
9303 case ${python_prefix} in
9304 "${test_prefix}"|"${test_prefix}/"*|\
9305 '${exec_prefix}'|'${exec_prefix}/'*)
9306 value=1
9307 ;;
9308 esac
9309
9310cat >>confdefs.h <<_ACEOF
9311#define PYTHON_PATH_RELOCATABLE $value
9312_ACEOF
9313
9314
9315 fi
81ecdfbb 9316 fi
436868fb 9317fi
436868fb 9318
ec685c5e 9319if test "${have_libpython}" != no; then
436868fb 9320
81ecdfbb 9321$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 9322
81ecdfbb
RW
9323 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
9324 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
9325 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 9326 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 9327 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 9328
81ecdfbb
RW
9329 # Flags needed to compile Python code (taken from python-config --cflags).
9330 # We cannot call python-config directly because it will output whatever was
9331 # used when compiling the Python interpreter itself, including flags which
9332 # would make the python-related objects be compiled differently from the
9333 # rest of GDB (e.g., -O2 and -fPIC).
9334 if test "${GCC}" = yes; then
9335 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
9336 fi
436868fb 9337
81ecdfbb
RW
9338 if test "x${tentative_python_cflags}" != x; then
9339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
9340$as_echo_n "checking compiler flags for python code... " >&6; }
9341 for flag in ${tentative_python_cflags}; do
9342 # Check that the compiler accepts it
9343 saved_CFLAGS="$CFLAGS"
9344 CFLAGS="$CFLAGS $flag"
9345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9346/* end confdefs.h. */
81ecdfbb 9347
a9322a30
TT
9348int
9349main ()
9350{
a9322a30
TT
9351
9352 ;
9353 return 0;
9354}
bec39cab 9355_ACEOF
81ecdfbb
RW
9356if ac_fn_c_try_compile "$LINENO"; then :
9357 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 9358fi
81ecdfbb
RW
9359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9360 CFLAGS="$saved_CFLAGS"
9361 done
9362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
9363$as_echo "${PYTHON_CFLAGS}" >&6; }
9364 fi
043b6510 9365
c83393b9
JB
9366 # On x64 Windows, Python's include headers, and pyconfig.h in
9367 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
9368 # version of Windows. Unfortunately, MS_WIN64 is only defined if
9369 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
9370 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
9371 # The issue was reported to the Python community, but still isn't
9372 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
9373
043b6510 9374 case "$gdb_host" in
c83393b9
JB
9375 mingw64)
9376 if test "${GCC}" = yes; then
9377 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
9378 fi
9379 ;;
043b6510 9380 esac
a8db4212
YPK
9381
9382 # Note that "python -m threading" cannot be used to check for
9383 # threading support due to a bug in Python 2.7.3
9384 # (http://bugs.python.org/issue15567).
9385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
9386$as_echo_n "checking whether python supports threads... " >&6; }
9387 saved_CPPFLAGS="${CPPFLAGS}"
9388 CPPFLAGS="${PYTHON_CPPFLAGS}"
9389 # Note that the test is reversed so that python_has_threads=yes on
9390 # unexpected failures.
9391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9392/* end confdefs.h. */
9393
9394#include <Python.h>
9395#ifdef WITH_THREAD
9396# error
9397#endif
9398
9399_ACEOF
9400if ac_fn_c_try_cpp "$LINENO"; then :
9401 python_has_threads=no
9402else
9403 python_has_threads=yes
9404fi
9405rm -f conftest.err conftest.$ac_ext
9406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
9407$as_echo "${python_has_threads}" >&6; }
9408 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 9409else
6dddc817
DE
9410 # Even if Python support is not compiled in, we need to have this file
9411 # included so that the "python" command, et.al., still exists.
9412 CONFIG_OBS="$CONFIG_OBS python.o"
9413 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 9414fi
9a156167 9415
ed3ef339
DE
9416
9417
4df42755
DE
9418 if test "${have_libpython}" != no; then
9419 HAVE_PYTHON_TRUE=
9420 HAVE_PYTHON_FALSE='#'
9421else
9422 HAVE_PYTHON_TRUE='#'
9423 HAVE_PYTHON_FALSE=
9424fi
9425
ed3ef339
DE
9426
9427# -------------------- #
9428# Check for libguile. #
9429# -------------------- #
9430
9431
e1402065
DE
9432
9433
9434
9435
9436# Check whether --with-guile was given.
9437if test "${with_guile+set}" = set; then :
9438 withval=$with_guile;
9439else
9440 with_guile=auto
9441fi
9442
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
9444$as_echo_n "checking whether to use guile... " >&6; }
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
9446$as_echo "$with_guile" >&6; }
9447
ed3ef339
DE
9448# Extract the first word of "pkg-config", so it can be a program name with args.
9449set dummy pkg-config; ac_word=$2
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
9453 $as_echo_n "(cached) " >&6
9454else
9455 case $pkg_config_prog_path in
9456 [\\/]* | ?:[\\/]*)
9457 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
9458 ;;
9459 *)
9460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463 IFS=$as_save_IFS
9464 test -z "$as_dir" && as_dir=.
9465 for ac_exec_ext in '' $ac_executable_extensions; do
9466 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9467 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
9468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469 break 2
9470 fi
9471done
9472 done
9473IFS=$as_save_IFS
9474
9475 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
9476 ;;
9477esac
9478fi
9479pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
9480if test -n "$pkg_config_prog_path"; then
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
9482$as_echo "$pkg_config_prog_path" >&6; }
9483else
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
9486fi
9487
9488
9489
214ab2da 9490try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
9491have_libguile=no
9492case "${with_guile}" in
9493no)
9494 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
9495$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
9496 ;;
9497auto)
e1402065
DE
9498 if test "${pkg_config_prog_path}" = "missing"; then
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
9500$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
9501 else
ed3ef339
DE
9502
9503 pkg_config=${pkg_config_prog_path}
9504 guile_version_list=${try_guile_versions}
9505 flag_errors=no
9506
ed3ef339
DE
9507 found_usable_guile=checking
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9509$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9510 for guile_version in ${guile_version_list}; do
9511 ${pkg_config} --exists ${guile_version} 2>/dev/null
9512 if test $? != 0; then
9513 continue
9514 fi
9515 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9516 if test $? != 0; then
9517 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9518 fi
9519 new_LIBS=`${pkg_config} --libs ${guile_version}`
9520 if test $? != 0; then
9521 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9522 fi
9523 found_usable_guile=${guile_version}
9524 break
9525 done
9526 if test "${found_usable_guile}" = "checking"; then
9527 if test "${flag_errors}" = "yes"; then
9528 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9529 else
9530 found_usable_guile=no
9531 fi
9532 fi
9533 if test "${found_usable_guile}" != no; then
9534 save_CPPFLAGS=$CPPFLAGS
9535 save_LIBS=$LIBS
9536 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9537 LIBS="$LIBS $new_LIBS"
9538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9539/* end confdefs.h. */
9540#include "libguile.h"
9541int
9542main ()
9543{
9544scm_init_guile ();
9545 ;
9546 return 0;
9547}
9548_ACEOF
9549if ac_fn_c_try_link "$LINENO"; then :
9550 have_libguile=yes
9551 GUILE_CPPFLAGS=$new_CPPFLAGS
9552 GUILE_LIBS=$new_LIBS
9553else
9554 found_usable_guile=no
9555fi
9556rm -f core conftest.err conftest.$ac_objext \
9557 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9558 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9559if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9560
9561$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9562
9563
9564fi
9565
ed3ef339
DE
9566 CPPFLAGS=$save_CPPFLAGS
9567 LIBS=$save_LIBS
9568 if test "${found_usable_guile}" = no; then
9569 if test "${flag_errors}" = yes; then
9570 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9571$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9572as_fn_error "linking guile version ${guile_version} test program failed
9573See \`config.log' for more details." "$LINENO" 5; }
9574 fi
9575 fi
9576 fi
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9578$as_echo "${found_usable_guile}" >&6; }
9579
e1402065 9580 fi
ed3ef339
DE
9581 ;;
9582yes)
e1402065
DE
9583 if test "${pkg_config_prog_path}" = "missing"; then
9584 as_fn_error "pkg-config not found" "$LINENO" 5
9585 fi
ed3ef339
DE
9586
9587 pkg_config=${pkg_config_prog_path}
9588 guile_version_list=${try_guile_versions}
9589 flag_errors=yes
9590
ed3ef339
DE
9591 found_usable_guile=checking
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9593$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9594 for guile_version in ${guile_version_list}; do
9595 ${pkg_config} --exists ${guile_version} 2>/dev/null
9596 if test $? != 0; then
9597 continue
9598 fi
9599 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9600 if test $? != 0; then
9601 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9602 fi
9603 new_LIBS=`${pkg_config} --libs ${guile_version}`
9604 if test $? != 0; then
9605 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9606 fi
9607 found_usable_guile=${guile_version}
9608 break
9609 done
9610 if test "${found_usable_guile}" = "checking"; then
9611 if test "${flag_errors}" = "yes"; then
9612 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9613 else
9614 found_usable_guile=no
9615 fi
9616 fi
9617 if test "${found_usable_guile}" != no; then
9618 save_CPPFLAGS=$CPPFLAGS
9619 save_LIBS=$LIBS
9620 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9621 LIBS="$LIBS $new_LIBS"
9622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9623/* end confdefs.h. */
9624#include "libguile.h"
9625int
9626main ()
9627{
9628scm_init_guile ();
9629 ;
9630 return 0;
9631}
9632_ACEOF
9633if ac_fn_c_try_link "$LINENO"; then :
9634 have_libguile=yes
9635 GUILE_CPPFLAGS=$new_CPPFLAGS
9636 GUILE_LIBS=$new_LIBS
9637else
9638 found_usable_guile=no
9639fi
9640rm -f core conftest.err conftest.$ac_objext \
9641 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9642 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9643if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9644
9645$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9646
9647
9648fi
9649
ed3ef339
DE
9650 CPPFLAGS=$save_CPPFLAGS
9651 LIBS=$save_LIBS
9652 if test "${found_usable_guile}" = no; then
9653 if test "${flag_errors}" = yes; then
9654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9656as_fn_error "linking guile version ${guile_version} test program failed
9657See \`config.log' for more details." "$LINENO" 5; }
9658 fi
9659 fi
9660 fi
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9662$as_echo "${found_usable_guile}" >&6; }
9663
9664 ;;
9665[\\/]* | ?:[\\/]*)
e1402065 9666 if test -x "${with_guile}"; then
ed3ef339
DE
9667
9668 pkg_config=${with_guile}
9669 guile_version_list=${try_guile_versions}
9670 flag_errors=yes
9671
ed3ef339
DE
9672 found_usable_guile=checking
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9674$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9675 for guile_version in ${guile_version_list}; do
9676 ${pkg_config} --exists ${guile_version} 2>/dev/null
9677 if test $? != 0; then
9678 continue
9679 fi
9680 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9681 if test $? != 0; then
9682 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9683 fi
9684 new_LIBS=`${pkg_config} --libs ${guile_version}`
9685 if test $? != 0; then
9686 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9687 fi
9688 found_usable_guile=${guile_version}
9689 break
9690 done
9691 if test "${found_usable_guile}" = "checking"; then
9692 if test "${flag_errors}" = "yes"; then
9693 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9694 else
9695 found_usable_guile=no
9696 fi
9697 fi
9698 if test "${found_usable_guile}" != no; then
9699 save_CPPFLAGS=$CPPFLAGS
9700 save_LIBS=$LIBS
9701 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9702 LIBS="$LIBS $new_LIBS"
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9704/* end confdefs.h. */
9705#include "libguile.h"
9706int
9707main ()
9708{
9709scm_init_guile ();
9710 ;
9711 return 0;
9712}
9713_ACEOF
9714if ac_fn_c_try_link "$LINENO"; then :
9715 have_libguile=yes
9716 GUILE_CPPFLAGS=$new_CPPFLAGS
9717 GUILE_LIBS=$new_LIBS
9718else
9719 found_usable_guile=no
9720fi
9721rm -f core conftest.err conftest.$ac_objext \
9722 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9723 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9724if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9725
9726$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9727
9728
9729fi
9730
ed3ef339
DE
9731 CPPFLAGS=$save_CPPFLAGS
9732 LIBS=$save_LIBS
9733 if test "${found_usable_guile}" = no; then
9734 if test "${flag_errors}" = yes; then
9735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9737as_fn_error "linking guile version ${guile_version} test program failed
9738See \`config.log' for more details." "$LINENO" 5; }
9739 fi
9740 fi
9741 fi
9742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9743$as_echo "${found_usable_guile}" >&6; }
9744
e1402065
DE
9745 else
9746 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9747 fi
ed3ef339
DE
9748 ;;
9749"" | */*)
9750 # Disallow --with=guile="" and --with-guile=foo/bar.
9751 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9752 ;;
9753*)
9754 # A space separate list of guile versions to try, in order.
e1402065
DE
9755 if test "${pkg_config_prog_path}" = "missing"; then
9756 as_fn_error "pkg-config not found" "$LINENO" 5
9757 fi
ed3ef339
DE
9758
9759 pkg_config=${pkg_config_prog_path}
9760 guile_version_list=${with_guile}
9761 flag_errors=yes
9762
ed3ef339
DE
9763 found_usable_guile=checking
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9765$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9766 for guile_version in ${guile_version_list}; do
9767 ${pkg_config} --exists ${guile_version} 2>/dev/null
9768 if test $? != 0; then
9769 continue
9770 fi
9771 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9772 if test $? != 0; then
9773 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9774 fi
9775 new_LIBS=`${pkg_config} --libs ${guile_version}`
9776 if test $? != 0; then
9777 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9778 fi
9779 found_usable_guile=${guile_version}
9780 break
9781 done
9782 if test "${found_usable_guile}" = "checking"; then
9783 if test "${flag_errors}" = "yes"; then
9784 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9785 else
9786 found_usable_guile=no
9787 fi
9788 fi
9789 if test "${found_usable_guile}" != no; then
9790 save_CPPFLAGS=$CPPFLAGS
9791 save_LIBS=$LIBS
9792 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9793 LIBS="$LIBS $new_LIBS"
9794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9795/* end confdefs.h. */
9796#include "libguile.h"
9797int
9798main ()
9799{
9800scm_init_guile ();
9801 ;
9802 return 0;
9803}
9804_ACEOF
9805if ac_fn_c_try_link "$LINENO"; then :
9806 have_libguile=yes
9807 GUILE_CPPFLAGS=$new_CPPFLAGS
9808 GUILE_LIBS=$new_LIBS
9809else
9810 found_usable_guile=no
9811fi
9812rm -f core conftest.err conftest.$ac_objext \
9813 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
9814 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
9815if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
9816
9817$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
9818
9819
9820fi
9821
ed3ef339
DE
9822 CPPFLAGS=$save_CPPFLAGS
9823 LIBS=$save_LIBS
9824 if test "${found_usable_guile}" = no; then
9825 if test "${flag_errors}" = yes; then
9826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9828as_fn_error "linking guile version ${guile_version} test program failed
9829See \`config.log' for more details." "$LINENO" 5; }
9830 fi
9831 fi
9832 fi
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9834$as_echo "${found_usable_guile}" >&6; }
9835
9836 ;;
9837esac
9838
e76c5d17 9839if test "${have_libguile}" != no; then
d342a0da
DE
9840 case "${with_guile}" in
9841 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9842
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9844$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9845if test "${ac_cv_guild_program_name+set}" = set; then :
9846 $as_echo_n "(cached) " >&6
9847else
d342a0da 9848 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9849
9850 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9851 # the 'guild' and 'bindir' variables. In that case, try to guess
9852 # what the program name is, at the risk of getting it wrong if
9853 # Guile was configured with '--program-suffix' or similar.
9854 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9855 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9856 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9857 fi
9858
9859fi
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9861$as_echo "$ac_cv_guild_program_name" >&6; }
9862
9863 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9864 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9865 fi
9866
9867 GUILD="$ac_cv_guild_program_name"
9868
9869
d342a0da
DE
9870 ;;
9871 *)
9872
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9874$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9875if test "${ac_cv_guild_program_name+set}" = set; then :
9876 $as_echo_n "(cached) " >&6
9877else
9878 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9879
9880 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9881 # the 'guild' and 'bindir' variables. In that case, try to guess
9882 # what the program name is, at the risk of getting it wrong if
9883 # Guile was configured with '--program-suffix' or similar.
9884 if test "x$ac_cv_guild_program_name" = "x"; then
9885 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9886 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9887 fi
9888
9889fi
9890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9891$as_echo "$ac_cv_guild_program_name" >&6; }
9892
9893 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9894 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9895 fi
9896
9897 GUILD="$ac_cv_guild_program_name"
9898
9899
9900 ;;
9901 esac
e76c5d17
DE
9902
9903
9904 if test "$cross_compiling" = no; then
9905 GUILD_TARGET_FLAG=
9906 else
9907 GUILD_TARGET_FLAG="--target=$host"
9908 fi
9909
9910
9911
9912
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9914$as_echo_n "checking whether guild supports this host... " >&6; }
9915if test "${ac_cv_guild_ok+set}" = set; then :
9916 $as_echo_n "(cached) " >&6
9917else
9918 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9919 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9920 ac_cv_guild_ok=yes
9921 else
9922 ac_cv_guild_ok=no
9923 fi
9924fi
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9926$as_echo "$ac_cv_guild_ok" >&6; }
9927
9928 if test "$ac_cv_guild_ok" = no; then
9929 have_libguile=no
9930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9931$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9932 fi
9933fi
9934
ed3ef339
DE
9935if test "${have_libguile}" != no; then
9936
9937$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9938
9939 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9940 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9941 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9942 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9943 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9944
9945 save_LIBS="$LIBS"
9946 save_CPPFLAGS="$CPPFLAGS"
9947 LIBS="$GUILE_LIBS"
9948 CPPFLAGS="$GUILE_CPPFLAGS"
9949 for ac_func in scm_new_smob
9950do :
9951 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9952if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9953 cat >>confdefs.h <<_ACEOF
9954#define HAVE_SCM_NEW_SMOB 1
9955_ACEOF
9956
9957fi
9958done
9959
9960 LIBS="$save_LIBS"
9961 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9962else
9963 # Even if Guile support is not compiled in, we need to have these files
9964 # included.
9965 CONFIG_OBS="$CONFIG_OBS guile.o"
9966 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9967fi
9a156167 9968
ac534cba 9969
4df42755
DE
9970 if test "${have_libguile}" != no; then
9971 HAVE_GUILE_TRUE=
9972 HAVE_GUILE_FALSE='#'
9973else
9974 HAVE_GUILE_TRUE='#'
9975 HAVE_GUILE_FALSE=
9976fi
9977
ac534cba 9978
d344e670
DE
9979# --------------------- #
9980# Check for libmcheck. #
9981# --------------------- #
9982
a8db4212
YPK
9983# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9984# but turn it off if Python is enabled with threads, since -lmcheck is
9985# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9986# and for releases.
17ef446e
PA
9987if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9988 && $development; then
9989 libmcheck_default=yes
9990else
9991 libmcheck_default=no
a8db4212
YPK
9992fi
9993
17ef446e
PA
9994 # Check whether --enable-libmcheck was given.
9995if test "${enable_libmcheck+set}" = set; then :
9996 enableval=$enable_libmcheck; case "${enableval}" in
9997 yes | y) ENABLE_LIBMCHECK="yes" ;;
9998 no | n) ENABLE_LIBMCHECK="no" ;;
9999 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10000 esac
10001fi
10002
10003
10004 if test -z "${ENABLE_LIBMCHECK}"; then
10005 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10006 fi
17ef446e
PA
10007
10008 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10010$as_echo_n "checking for main in -lmcheck... " >&6; }
10011if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10012 $as_echo_n "(cached) " >&6
10013else
10014 ac_check_lib_save_LIBS=$LIBS
10015LIBS="-lmcheck $LIBS"
10016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10017/* end confdefs.h. */
10018
10019
10020int
10021main ()
10022{
10023return main ();
10024 ;
10025 return 0;
10026}
10027_ACEOF
10028if ac_fn_c_try_link "$LINENO"; then :
10029 ac_cv_lib_mcheck_main=yes
10030else
10031 ac_cv_lib_mcheck_main=no
10032fi
10033rm -f core conftest.err conftest.$ac_objext \
10034 conftest$ac_exeext conftest.$ac_ext
10035LIBS=$ac_check_lib_save_LIBS
10036fi
10037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10038$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10039if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10040 cat >>confdefs.h <<_ACEOF
10041#define HAVE_LIBMCHECK 1
10042_ACEOF
10043
10044 LIBS="-lmcheck $LIBS"
10045
10046fi
10047
17ef446e
PA
10048 fi
10049
10050
10051if test "$ENABLE_LIBMCHECK" = "yes" \
10052 -a "${have_libpython}" != "no" \
10053 -a "${python_has_threads}" = "yes" ; then
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10055$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10056fi
10057
58bfce93
MM
10058
10059# Check whether --with-intel_pt was given.
10060if test "${with_intel_pt+set}" = set; then :
10061 withval=$with_intel_pt;
10062else
10063 with_intel_pt=auto
10064fi
10065
10066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10067$as_echo_n "checking whether to use intel pt... " >&6; }
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10069$as_echo "$with_intel_pt" >&6; }
10070
10071if test "${with_intel_pt}" = no; then
bc504a31
PA
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10073$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10074 HAVE_LIBIPT=no
10075else
5599c404
MM
10076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10077/* end confdefs.h. */
10078
10079#include <linux/perf_event.h>
10080#ifndef PERF_ATTR_SIZE_VER5
10081# error
10082#endif
10083
10084_ACEOF
10085if ac_fn_c_try_cpp "$LINENO"; then :
10086 perf_event=yes
10087else
10088 perf_event=no
10089fi
10090rm -f conftest.err conftest.$ac_ext
10091 if test "$perf_event" != yes; then
10092 if test "$with_intel_pt" = yes; then
10093 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10094 else
10095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10096$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10097 fi
10098 fi
10099
58bfce93
MM
10100
10101
10102
10103
10104
10105
10106
10107
10108 use_additional=yes
10109
10110 acl_save_prefix="$prefix"
10111 prefix="$acl_final_prefix"
10112 acl_save_exec_prefix="$exec_prefix"
10113 exec_prefix="$acl_final_exec_prefix"
10114
10115 eval additional_includedir=\"$includedir\"
10116 eval additional_libdir=\"$libdir\"
10117
10118 exec_prefix="$acl_save_exec_prefix"
10119 prefix="$acl_save_prefix"
10120
10121
10122# Check whether --with-libipt-prefix was given.
10123if test "${with_libipt_prefix+set}" = set; then :
10124 withval=$with_libipt_prefix;
10125 if test "X$withval" = "Xno"; then
10126 use_additional=no
10127 else
10128 if test "X$withval" = "X"; then
10129
10130 acl_save_prefix="$prefix"
10131 prefix="$acl_final_prefix"
10132 acl_save_exec_prefix="$exec_prefix"
10133 exec_prefix="$acl_final_exec_prefix"
10134
10135 eval additional_includedir=\"$includedir\"
10136 eval additional_libdir=\"$libdir\"
10137
10138 exec_prefix="$acl_save_exec_prefix"
10139 prefix="$acl_save_prefix"
10140
10141 else
10142 additional_includedir="$withval/include"
10143 additional_libdir="$withval/lib"
10144 fi
10145 fi
10146
10147fi
10148
10149 LIBIPT=
10150 LTLIBIPT=
10151 INCIPT=
10152 rpathdirs=
10153 ltrpathdirs=
10154 names_already_handled=
10155 names_next_round='ipt '
10156 while test -n "$names_next_round"; do
10157 names_this_round="$names_next_round"
10158 names_next_round=
10159 for name in $names_this_round; do
10160 already_handled=
10161 for n in $names_already_handled; do
10162 if test "$n" = "$name"; then
10163 already_handled=yes
10164 break
10165 fi
10166 done
10167 if test -z "$already_handled"; then
10168 names_already_handled="$names_already_handled $name"
10169 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10170 eval value=\"\$HAVE_LIB$uppername\"
10171 if test -n "$value"; then
10172 if test "$value" = yes; then
10173 eval value=\"\$LIB$uppername\"
10174 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
10175 eval value=\"\$LTLIB$uppername\"
10176 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
10177 else
10178 :
10179 fi
10180 else
10181 found_dir=
10182 found_la=
10183 found_so=
10184 found_a=
10185 if test $use_additional = yes; then
10186 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10187 found_dir="$additional_libdir"
10188 found_so="$additional_libdir/lib$name.$shlibext"
10189 if test -f "$additional_libdir/lib$name.la"; then
10190 found_la="$additional_libdir/lib$name.la"
10191 fi
10192 else
10193 if test -f "$additional_libdir/lib$name.$libext"; then
10194 found_dir="$additional_libdir"
10195 found_a="$additional_libdir/lib$name.$libext"
10196 if test -f "$additional_libdir/lib$name.la"; then
10197 found_la="$additional_libdir/lib$name.la"
10198 fi
10199 fi
10200 fi
10201 fi
10202 if test "X$found_dir" = "X"; then
10203 for x in $LDFLAGS $LTLIBIPT; do
10204
10205 acl_save_prefix="$prefix"
10206 prefix="$acl_final_prefix"
10207 acl_save_exec_prefix="$exec_prefix"
10208 exec_prefix="$acl_final_exec_prefix"
10209 eval x=\"$x\"
10210 exec_prefix="$acl_save_exec_prefix"
10211 prefix="$acl_save_prefix"
10212
10213 case "$x" in
10214 -L*)
10215 dir=`echo "X$x" | sed -e 's/^X-L//'`
10216 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10217 found_dir="$dir"
10218 found_so="$dir/lib$name.$shlibext"
10219 if test -f "$dir/lib$name.la"; then
10220 found_la="$dir/lib$name.la"
10221 fi
10222 else
10223 if test -f "$dir/lib$name.$libext"; then
10224 found_dir="$dir"
10225 found_a="$dir/lib$name.$libext"
10226 if test -f "$dir/lib$name.la"; then
10227 found_la="$dir/lib$name.la"
10228 fi
10229 fi
10230 fi
10231 ;;
10232 esac
10233 if test "X$found_dir" != "X"; then
10234 break
10235 fi
10236 done
10237 fi
10238 if test "X$found_dir" != "X"; then
10239 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
10240 if test "X$found_so" != "X"; then
10241 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10242 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10243 else
10244 haveit=
10245 for x in $ltrpathdirs; do
10246 if test "X$x" = "X$found_dir"; then
10247 haveit=yes
10248 break
10249 fi
10250 done
10251 if test -z "$haveit"; then
10252 ltrpathdirs="$ltrpathdirs $found_dir"
10253 fi
10254 if test "$hardcode_direct" = yes; then
10255 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10256 else
10257 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10258 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10259 haveit=
10260 for x in $rpathdirs; do
10261 if test "X$x" = "X$found_dir"; then
10262 haveit=yes
10263 break
10264 fi
10265 done
10266 if test -z "$haveit"; then
10267 rpathdirs="$rpathdirs $found_dir"
10268 fi
10269 else
10270 haveit=
10271 for x in $LDFLAGS $LIBIPT; do
10272
10273 acl_save_prefix="$prefix"
10274 prefix="$acl_final_prefix"
10275 acl_save_exec_prefix="$exec_prefix"
10276 exec_prefix="$acl_final_exec_prefix"
10277 eval x=\"$x\"
10278 exec_prefix="$acl_save_exec_prefix"
10279 prefix="$acl_save_prefix"
10280
10281 if test "X$x" = "X-L$found_dir"; then
10282 haveit=yes
10283 break
10284 fi
10285 done
10286 if test -z "$haveit"; then
10287 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
10288 fi
10289 if test "$hardcode_minus_L" != no; then
10290 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
10291 else
10292 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10293 fi
10294 fi
10295 fi
10296 fi
10297 else
10298 if test "X$found_a" != "X"; then
10299 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
10300 else
10301 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
10302 fi
10303 fi
10304 additional_includedir=
10305 case "$found_dir" in
10306 */lib | */lib/)
10307 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10308 additional_includedir="$basedir/include"
10309 ;;
10310 esac
10311 if test "X$additional_includedir" != "X"; then
10312 if test "X$additional_includedir" != "X/usr/include"; then
10313 haveit=
10314 if test "X$additional_includedir" = "X/usr/local/include"; then
10315 if test -n "$GCC"; then
10316 case $host_os in
10317 linux*) haveit=yes;;
10318 esac
10319 fi
10320 fi
10321 if test -z "$haveit"; then
10322 for x in $CPPFLAGS $INCIPT; do
10323
10324 acl_save_prefix="$prefix"
10325 prefix="$acl_final_prefix"
10326 acl_save_exec_prefix="$exec_prefix"
10327 exec_prefix="$acl_final_exec_prefix"
10328 eval x=\"$x\"
10329 exec_prefix="$acl_save_exec_prefix"
10330 prefix="$acl_save_prefix"
10331
10332 if test "X$x" = "X-I$additional_includedir"; then
10333 haveit=yes
10334 break
10335 fi
10336 done
10337 if test -z "$haveit"; then
10338 if test -d "$additional_includedir"; then
10339 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
10340 fi
10341 fi
10342 fi
10343 fi
10344 fi
10345 if test -n "$found_la"; then
10346 save_libdir="$libdir"
10347 case "$found_la" in
10348 */* | *\\*) . "$found_la" ;;
10349 *) . "./$found_la" ;;
10350 esac
10351 libdir="$save_libdir"
10352 for dep in $dependency_libs; do
10353 case "$dep" in
10354 -L*)
10355 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10356 if test "X$additional_libdir" != "X/usr/lib"; then
10357 haveit=
10358 if test "X$additional_libdir" = "X/usr/local/lib"; then
10359 if test -n "$GCC"; then
10360 case $host_os in
10361 linux*) haveit=yes;;
10362 esac
10363 fi
10364 fi
10365 if test -z "$haveit"; then
10366 haveit=
10367 for x in $LDFLAGS $LIBIPT; do
10368
10369 acl_save_prefix="$prefix"
10370 prefix="$acl_final_prefix"
10371 acl_save_exec_prefix="$exec_prefix"
10372 exec_prefix="$acl_final_exec_prefix"
10373 eval x=\"$x\"
10374 exec_prefix="$acl_save_exec_prefix"
10375 prefix="$acl_save_prefix"
10376
10377 if test "X$x" = "X-L$additional_libdir"; then
10378 haveit=yes
10379 break
10380 fi
10381 done
10382 if test -z "$haveit"; then
10383 if test -d "$additional_libdir"; then
10384 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
10385 fi
10386 fi
10387 haveit=
10388 for x in $LDFLAGS $LTLIBIPT; do
10389
10390 acl_save_prefix="$prefix"
10391 prefix="$acl_final_prefix"
10392 acl_save_exec_prefix="$exec_prefix"
10393 exec_prefix="$acl_final_exec_prefix"
10394 eval x=\"$x\"
10395 exec_prefix="$acl_save_exec_prefix"
10396 prefix="$acl_save_prefix"
10397
10398 if test "X$x" = "X-L$additional_libdir"; then
10399 haveit=yes
10400 break
10401 fi
10402 done
10403 if test -z "$haveit"; then
10404 if test -d "$additional_libdir"; then
10405 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
10406 fi
10407 fi
10408 fi
10409 fi
10410 ;;
10411 -R*)
10412 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10413 if test "$enable_rpath" != no; then
10414 haveit=
10415 for x in $rpathdirs; do
10416 if test "X$x" = "X$dir"; then
10417 haveit=yes
10418 break
10419 fi
10420 done
10421 if test -z "$haveit"; then
10422 rpathdirs="$rpathdirs $dir"
10423 fi
10424 haveit=
10425 for x in $ltrpathdirs; do
10426 if test "X$x" = "X$dir"; then
10427 haveit=yes
10428 break
10429 fi
10430 done
10431 if test -z "$haveit"; then
10432 ltrpathdirs="$ltrpathdirs $dir"
10433 fi
10434 fi
10435 ;;
10436 -l*)
10437 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10438 ;;
10439 *.la)
10440 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10441 ;;
10442 *)
10443 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
10444 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
10445 ;;
10446 esac
10447 done
10448 fi
10449 else
10450 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
10451 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
10452 fi
10453 fi
10454 fi
10455 done
10456 done
10457 if test "X$rpathdirs" != "X"; then
10458 if test -n "$hardcode_libdir_separator"; then
10459 alldirs=
10460 for found_dir in $rpathdirs; do
10461 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10462 done
10463 acl_save_libdir="$libdir"
10464 libdir="$alldirs"
10465 eval flag=\"$hardcode_libdir_flag_spec\"
10466 libdir="$acl_save_libdir"
10467 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10468 else
10469 for found_dir in $rpathdirs; do
10470 acl_save_libdir="$libdir"
10471 libdir="$found_dir"
10472 eval flag=\"$hardcode_libdir_flag_spec\"
10473 libdir="$acl_save_libdir"
10474 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
10475 done
10476 fi
10477 fi
10478 if test "X$ltrpathdirs" != "X"; then
10479 for found_dir in $ltrpathdirs; do
10480 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
10481 done
10482 fi
10483
10484
10485 ac_save_CPPFLAGS="$CPPFLAGS"
10486
10487 for element in $INCIPT; do
10488 haveit=
10489 for x in $CPPFLAGS; do
10490
10491 acl_save_prefix="$prefix"
10492 prefix="$acl_final_prefix"
10493 acl_save_exec_prefix="$exec_prefix"
10494 exec_prefix="$acl_final_exec_prefix"
10495 eval x=\"$x\"
10496 exec_prefix="$acl_save_exec_prefix"
10497 prefix="$acl_save_prefix"
10498
10499 if test "X$x" = "X$element"; then
10500 haveit=yes
10501 break
10502 fi
10503 done
10504 if test -z "$haveit"; then
10505 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10506 fi
10507 done
10508
10509
10510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
10511$as_echo_n "checking for libipt... " >&6; }
10512if test "${ac_cv_libipt+set}" = set; then :
10513 $as_echo_n "(cached) " >&6
10514else
10515
10516 ac_save_LIBS="$LIBS"
10517 LIBS="$LIBS $LIBIPT"
10518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10519/* end confdefs.h. */
10520#include "intel-pt.h"
10521int
10522main ()
10523{
10524pt_insn_alloc_decoder (0);
10525 ;
10526 return 0;
10527}
10528_ACEOF
10529if ac_fn_c_try_link "$LINENO"; then :
10530 ac_cv_libipt=yes
10531else
10532 ac_cv_libipt=no
10533fi
10534rm -f core conftest.err conftest.$ac_objext \
10535 conftest$ac_exeext conftest.$ac_ext
10536 LIBS="$ac_save_LIBS"
10537
10538fi
10539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
10540$as_echo "$ac_cv_libipt" >&6; }
10541 if test "$ac_cv_libipt" = yes; then
10542 HAVE_LIBIPT=yes
10543
10544$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
10545
10546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
10547$as_echo_n "checking how to link with libipt... " >&6; }
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
10549$as_echo "$LIBIPT" >&6; }
10550 else
10551 HAVE_LIBIPT=no
10552 CPPFLAGS="$ac_save_CPPFLAGS"
10553 LIBIPT=
10554 LTLIBIPT=
10555 fi
10556
10557
10558
10559
10560
10561
10562 if test "$HAVE_LIBIPT" != yes; then
10563 if test "$with_intel_pt" = yes; then
10564 as_fn_error "libipt is missing or unusable" "$LINENO" 5
10565 else
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
10567$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
10568 fi
10569 fi
10570fi
10571
81ecdfbb
RW
10572# ------------------------- #
10573# Checks for header files. #
10574# ------------------------- #
c890192f 10575
81ecdfbb
RW
10576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10577$as_echo_n "checking for ANSI C header files... " >&6; }
10578if test "${ac_cv_header_stdc+set}" = set; then :
10579 $as_echo_n "(cached) " >&6
bec39cab 10580else
81ecdfbb 10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10582/* end confdefs.h. */
81ecdfbb
RW
10583#include <stdlib.h>
10584#include <stdarg.h>
10585#include <string.h>
10586#include <float.h>
10587
a9322a30
TT
10588int
10589main ()
10590{
a9322a30
TT
10591
10592 ;
10593 return 0;
10594}
bec39cab 10595_ACEOF
81ecdfbb
RW
10596if ac_fn_c_try_compile "$LINENO"; then :
10597 ac_cv_header_stdc=yes
bec39cab 10598else
81ecdfbb 10599 ac_cv_header_stdc=no
a9322a30 10600fi
81ecdfbb 10601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10602
81ecdfbb
RW
10603if test $ac_cv_header_stdc = yes; then
10604 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10606/* end confdefs.h. */
10607#include <string.h>
bec39cab 10608
81ecdfbb
RW
10609_ACEOF
10610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10611 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 10612
bec39cab 10613else
81ecdfbb
RW
10614 ac_cv_header_stdc=no
10615fi
10616rm -f conftest*
10617
10618fi
10619
10620if test $ac_cv_header_stdc = yes; then
10621 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10623/* end confdefs.h. */
10624#include <stdlib.h>
10625
bec39cab 10626_ACEOF
81ecdfbb
RW
10627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10628 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 10629
81ecdfbb
RW
10630else
10631 ac_cv_header_stdc=no
10632fi
10633rm -f conftest*
bec39cab 10634
bec39cab 10635fi
81ecdfbb
RW
10636
10637if test $ac_cv_header_stdc = yes; then
10638 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10639 if test "$cross_compiling" = yes; then :
10640 :
bec39cab 10641else
81ecdfbb 10642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10643/* end confdefs.h. */
81ecdfbb
RW
10644#include <ctype.h>
10645#include <stdlib.h>
10646#if ((' ' & 0x0FF) == 0x020)
10647# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10648# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10649#else
10650# define ISLOWER(c) \
10651 (('a' <= (c) && (c) <= 'i') \
10652 || ('j' <= (c) && (c) <= 'r') \
10653 || ('s' <= (c) && (c) <= 'z'))
10654# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10655#endif
10656
10657#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
10658int
10659main ()
10660{
81ecdfbb
RW
10661 int i;
10662 for (i = 0; i < 256; i++)
10663 if (XOR (islower (i), ISLOWER (i))
10664 || toupper (i) != TOUPPER (i))
10665 return 2;
a9322a30
TT
10666 return 0;
10667}
bec39cab 10668_ACEOF
81ecdfbb
RW
10669if ac_fn_c_try_run "$LINENO"; then :
10670
bec39cab 10671else
81ecdfbb
RW
10672 ac_cv_header_stdc=no
10673fi
10674rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10675 conftest.$ac_objext conftest.beam conftest.$ac_ext
10676fi
bec39cab 10677
bec39cab 10678fi
a9322a30 10679fi
81ecdfbb
RW
10680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10681$as_echo "$ac_cv_header_stdc" >&6; }
10682if test $ac_cv_header_stdc = yes; then
bec39cab 10683
81ecdfbb 10684$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 10685
81ecdfbb 10686fi
bec39cab 10687
81ecdfbb 10688# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 10689for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 10690 thread_db.h \
0080a2f6 10691 sys/fault.h \
81ecdfbb
RW
10692 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
10693 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
10694 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 10695 termios.h termio.h \
3447c057 10696 sgtty.h elf_hp.h \
9467110b 10697 dlfcn.h
81ecdfbb
RW
10698do :
10699 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10700ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10701eval as_val=\$$as_ac_Header
10702 if test "x$as_val" = x""yes; then :
bec39cab 10703 cat >>confdefs.h <<_ACEOF
81ecdfbb 10704#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10705_ACEOF
c906108c 10706
bec39cab 10707fi
81ecdfbb
RW
10708
10709done
10710
81ecdfbb
RW
10711for ac_header in sys/proc.h
10712do :
10713 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
10714# include <sys/param.h>
10715#endif
c906108c 10716
81ecdfbb
RW
10717"
10718if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 10719 cat >>confdefs.h <<_ACEOF
81ecdfbb 10720#define HAVE_SYS_PROC_H 1
bec39cab 10721_ACEOF
5ee754fc 10722
bec39cab 10723fi
81ecdfbb
RW
10724
10725done
10726
10727for ac_header in sys/user.h
10728do :
10729 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
10730# include <sys/param.h>
a9322a30
TT
10731#endif
10732
81ecdfbb
RW
10733"
10734if test "x$ac_cv_header_sys_user_h" = x""yes; then :
10735 cat >>confdefs.h <<_ACEOF
10736#define HAVE_SYS_USER_H 1
bec39cab 10737_ACEOF
bec39cab 10738
a9322a30 10739fi
bec39cab 10740
81ecdfbb 10741done
5ee754fc 10742
5ee754fc 10743
81ecdfbb
RW
10744# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
10745# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
10746# think that we don't have <curses.h> if we're using GCC.
10747case $host_os in
10748 solaris2.[789])
10749 if test "$GCC" = yes; then
10750
10751$as_echo "#define _MSE_INT_H 1" >>confdefs.h
10752
10753 fi ;;
10754esac
10755for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
10756do :
10757 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10758ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10759eval as_val=\$$as_ac_Header
10760 if test "x$as_val" = x""yes; then :
bec39cab 10761 cat >>confdefs.h <<_ACEOF
81ecdfbb 10762#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10763_ACEOF
5ee754fc
MK
10764
10765fi
10766
81ecdfbb 10767done
bec39cab 10768
81ecdfbb
RW
10769for ac_header in term.h
10770do :
10771 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
10772# include <curses.h>
10773#endif
bec39cab 10774
81ecdfbb
RW
10775"
10776if test "x$ac_cv_header_term_h" = x""yes; then :
10777 cat >>confdefs.h <<_ACEOF
10778#define HAVE_TERM_H 1
a8111142 10779_ACEOF
a8111142 10780
a8111142 10781fi
a8111142 10782
81ecdfbb 10783done
a8111142
TT
10784
10785
81ecdfbb
RW
10786# ------------------------- #
10787# Checks for declarations. #
10788# ------------------------- #
a9322a30 10789
07697489
PA
10790
10791 # Check for presence and size of long long.
10792 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10793if test "x$ac_cv_type_long_long" = x""yes; then :
10794
10795cat >>confdefs.h <<_ACEOF
10796#define HAVE_LONG_LONG 1
10797_ACEOF
10798
10799# The cast to long int works around a bug in the HP C Compiler
10800# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10801# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10802# This bug is HP SR number 8606223364.
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10804$as_echo_n "checking size of long long... " >&6; }
10805if test "${ac_cv_sizeof_long_long+set}" = set; then :
10806 $as_echo_n "(cached) " >&6
10807else
10808 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
10809
10810else
10811 if test "$ac_cv_type_long_long" = yes; then
10812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10814{ as_fn_set_status 77
10815as_fn_error "cannot compute sizeof (long long)
10816See \`config.log' for more details." "$LINENO" 5; }; }
10817 else
10818 ac_cv_sizeof_long_long=0
10819 fi
10820fi
10821
10822fi
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10824$as_echo "$ac_cv_sizeof_long_long" >&6; }
10825
10826
10827
10828cat >>confdefs.h <<_ACEOF
10829#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10830_ACEOF
10831
10832
10833fi
10834
10835
10836 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
10837if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
10838 ac_have_decl=1
10839else
10840 ac_have_decl=0
10841fi
10842
10843cat >>confdefs.h <<_ACEOF
10844#define HAVE_DECL_BASENAME $ac_have_decl
10845_ACEOF
10846ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
10847if test "x$ac_cv_have_decl_ffs" = x""yes; then :
10848 ac_have_decl=1
10849else
10850 ac_have_decl=0
10851fi
10852
10853cat >>confdefs.h <<_ACEOF
10854#define HAVE_DECL_FFS $ac_have_decl
10855_ACEOF
10856ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
10857if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
10858 ac_have_decl=1
10859else
10860 ac_have_decl=0
10861fi
10862
10863cat >>confdefs.h <<_ACEOF
10864#define HAVE_DECL_ASPRINTF $ac_have_decl
10865_ACEOF
10866ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
10867if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
10868 ac_have_decl=1
10869else
10870 ac_have_decl=0
10871fi
10872
10873cat >>confdefs.h <<_ACEOF
10874#define HAVE_DECL_VASPRINTF $ac_have_decl
10875_ACEOF
10876ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10877if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10878 ac_have_decl=1
10879else
10880 ac_have_decl=0
10881fi
10882
10883cat >>confdefs.h <<_ACEOF
10884#define HAVE_DECL_SNPRINTF $ac_have_decl
10885_ACEOF
10886ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
10887if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
10888 ac_have_decl=1
10889else
10890 ac_have_decl=0
10891fi
10892
10893cat >>confdefs.h <<_ACEOF
10894#define HAVE_DECL_VSNPRINTF $ac_have_decl
10895_ACEOF
10896
10897 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
10898if test "x$ac_cv_have_decl_strtol" = x""yes; then :
10899 ac_have_decl=1
10900else
10901 ac_have_decl=0
10902fi
10903
10904cat >>confdefs.h <<_ACEOF
10905#define HAVE_DECL_STRTOL $ac_have_decl
10906_ACEOF
10907ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
10908if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
10909 ac_have_decl=1
10910else
10911 ac_have_decl=0
10912fi
10913
10914cat >>confdefs.h <<_ACEOF
10915#define HAVE_DECL_STRTOUL $ac_have_decl
10916_ACEOF
10917ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
10918if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
10919 ac_have_decl=1
10920else
10921 ac_have_decl=0
10922fi
10923
10924cat >>confdefs.h <<_ACEOF
10925#define HAVE_DECL_STRTOLL $ac_have_decl
10926_ACEOF
10927ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
10928if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
10929 ac_have_decl=1
10930else
10931 ac_have_decl=0
10932fi
10933
10934cat >>confdefs.h <<_ACEOF
10935#define HAVE_DECL_STRTOULL $ac_have_decl
10936_ACEOF
10937
10938 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
10939if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
10940 ac_have_decl=1
10941else
10942 ac_have_decl=0
10943fi
10944
10945cat >>confdefs.h <<_ACEOF
10946#define HAVE_DECL_STRVERSCMP $ac_have_decl
10947_ACEOF
10948
10949
10950
81ecdfbb
RW
10951ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
10952if test "x$ac_cv_have_decl_free" = x""yes; then :
10953 ac_have_decl=1
bec39cab 10954else
81ecdfbb
RW
10955 ac_have_decl=0
10956fi
10957
10958cat >>confdefs.h <<_ACEOF
10959#define HAVE_DECL_FREE $ac_have_decl
bec39cab 10960_ACEOF
81ecdfbb
RW
10961ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
10962if test "x$ac_cv_have_decl_malloc" = x""yes; then :
10963 ac_have_decl=1
10964else
10965 ac_have_decl=0
10966fi
10967
10968cat >>confdefs.h <<_ACEOF
10969#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 10970_ACEOF
81ecdfbb
RW
10971ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
10972if test "x$ac_cv_have_decl_realloc" = x""yes; then :
10973 ac_have_decl=1
bec39cab 10974else
81ecdfbb
RW
10975 ac_have_decl=0
10976fi
bec39cab 10977
81ecdfbb
RW
10978cat >>confdefs.h <<_ACEOF
10979#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 10980_ACEOF
81ecdfbb
RW
10981ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
10982if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
10983 ac_have_decl=1
10984else
10985 ac_have_decl=0
5ee754fc 10986fi
81ecdfbb
RW
10987
10988cat >>confdefs.h <<_ACEOF
10989#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 10990_ACEOF
5ee754fc 10991
5ee754fc 10992
81ecdfbb
RW
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
10994$as_echo_n "checking for LC_MESSAGES... " >&6; }
10995if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
10996 $as_echo_n "(cached) " >&6
bec39cab 10997else
81ecdfbb 10998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10999/* end confdefs.h. */
81ecdfbb 11000#include <locale.h>
a9322a30
TT
11001int
11002main ()
11003{
81ecdfbb 11004return LC_MESSAGES
a9322a30
TT
11005 ;
11006 return 0;
11007}
bec39cab 11008_ACEOF
81ecdfbb
RW
11009if ac_fn_c_try_link "$LINENO"; then :
11010 am_cv_val_LC_MESSAGES=yes
bec39cab 11011else
81ecdfbb
RW
11012 am_cv_val_LC_MESSAGES=no
11013fi
11014rm -f core conftest.err conftest.$ac_objext \
11015 conftest$ac_exeext conftest.$ac_ext
11016fi
11017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11018$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11019 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11020
81ecdfbb
RW
11021$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11022
11023 fi
11024
11025
11026# ----------------------- #
11027# Checks for structures. #
11028# ----------------------- #
11029
11030ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11031if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11032
11033cat >>confdefs.h <<_ACEOF
11034#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11035_ACEOF
7eb368b3 11036
81ecdfbb 11037
7eb368b3 11038fi
81ecdfbb
RW
11039ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11040if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11041
a9322a30
TT
11042cat >>confdefs.h <<_ACEOF
11043#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11044_ACEOF
11045
a9322a30 11046
7eb368b3
NR
11047fi
11048
7eb368b3 11049
a9322a30
TT
11050# ------------------ #
11051# Checks for types. #
11052# ------------------ #
7eb368b3 11053
81ecdfbb 11054ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11055#include <sys/socket.h>
11056
81ecdfbb
RW
11057"
11058if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11059
a9322a30
TT
11060cat >>confdefs.h <<_ACEOF
11061#define HAVE_SOCKLEN_T 1
11062_ACEOF
11063
11064
11065fi
11066
11067
11068# ------------------------------------- #
11069# Checks for compiler characteristics. #
11070# ------------------------------------- #
11071
81ecdfbb
RW
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11073$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11074if test "${ac_cv_c_const+set}" = set; then :
11075 $as_echo_n "(cached) " >&6
a9322a30 11076else
81ecdfbb 11077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11078/* end confdefs.h. */
a9322a30
TT
11079
11080int
11081main ()
11082{
11083/* FIXME: Include the comments suggested by Paul. */
11084#ifndef __cplusplus
11085 /* Ultrix mips cc rejects this. */
11086 typedef int charset[2];
81ecdfbb 11087 const charset cs;
a9322a30 11088 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11089 char const *const *pcpcc;
11090 char **ppc;
a9322a30
TT
11091 /* NEC SVR4.0.2 mips cc rejects this. */
11092 struct point {int x, y;};
11093 static struct point const zero = {0,0};
11094 /* AIX XL C 1.02.0.0 rejects this.
11095 It does not let you subtract one const X* pointer from another in
11096 an arm of an if-expression whose if-part is not a constant
11097 expression */
11098 const char *g = "string";
81ecdfbb 11099 pcpcc = &g + (g ? g-g : 0);
a9322a30 11100 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11101 ++pcpcc;
11102 ppc = (char**) pcpcc;
11103 pcpcc = (char const *const *) ppc;
a9322a30
TT
11104 { /* SCO 3.2v4 cc rejects this. */
11105 char *t;
11106 char const *s = 0 ? (char *) 0 : (char const *) 0;
11107
11108 *t++ = 0;
81ecdfbb 11109 if (s) return 0;
a9322a30
TT
11110 }
11111 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11112 int x[] = {25, 17};
11113 const int *foo = &x[0];
11114 ++foo;
11115 }
11116 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11117 typedef const int *iptr;
11118 iptr p = 0;
11119 ++p;
11120 }
11121 { /* AIX XL C 1.02.0.0 rejects this saying
11122 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11123 struct s { int j; const int *ap[3]; };
11124 struct s *b; b->j = 5;
11125 }
11126 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11127 const int foo = 10;
81ecdfbb 11128 if (!foo) return 0;
a9322a30 11129 }
81ecdfbb 11130 return !cs[0] && !zero.x;
a9322a30
TT
11131#endif
11132
11133 ;
11134 return 0;
11135}
bec39cab 11136_ACEOF
81ecdfbb 11137if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11138 ac_cv_c_const=yes
5ee754fc 11139else
81ecdfbb 11140 ac_cv_c_const=no
5ee754fc 11141fi
81ecdfbb 11142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 11143fi
81ecdfbb
RW
11144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11145$as_echo "$ac_cv_c_const" >&6; }
a9322a30 11146if test $ac_cv_c_const = no; then
bec39cab 11147
81ecdfbb 11148$as_echo "#define const /**/" >>confdefs.h
bec39cab 11149
5ee754fc 11150fi
bec39cab 11151
81ecdfbb
RW
11152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11153$as_echo_n "checking for inline... " >&6; }
11154if test "${ac_cv_c_inline+set}" = set; then :
11155 $as_echo_n "(cached) " >&6
bec39cab 11156else
a9322a30
TT
11157 ac_cv_c_inline=no
11158for ac_kw in inline __inline__ __inline; do
81ecdfbb 11159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11160/* end confdefs.h. */
a9322a30
TT
11161#ifndef __cplusplus
11162typedef int foo_t;
11163static $ac_kw foo_t static_foo () {return 0; }
11164$ac_kw foo_t foo () {return 0; }
11165#endif
11166
bec39cab 11167_ACEOF
81ecdfbb
RW
11168if ac_fn_c_try_compile "$LINENO"; then :
11169 ac_cv_c_inline=$ac_kw
bec39cab 11170fi
81ecdfbb
RW
11171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11172 test "$ac_cv_c_inline" != no && break
a9322a30 11173done
bec39cab 11174
5ee754fc 11175fi
81ecdfbb
RW
11176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11177$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 11178
a9322a30
TT
11179case $ac_cv_c_inline in
11180 inline | yes) ;;
11181 *)
11182 case $ac_cv_c_inline in
11183 no) ac_val=;;
11184 *) ac_val=$ac_cv_c_inline;;
11185 esac
11186 cat >>confdefs.h <<_ACEOF
11187#ifndef __cplusplus
11188#define inline $ac_val
11189#endif
11190_ACEOF
bec39cab
AC
11191 ;;
11192esac
bec39cab 11193
81ecdfbb
RW
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11195$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11196if test "${ac_cv_c_bigendian+set}" = set; then :
11197 $as_echo_n "(cached) " >&6
bec39cab 11198else
81ecdfbb
RW
11199 ac_cv_c_bigendian=unknown
11200 # See if we're dealing with a universal compiler.
11201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11202/* end confdefs.h. */
11203#ifndef __APPLE_CC__
11204 not a universal capable compiler
11205 #endif
11206 typedef int dummy;
11207
11208_ACEOF
11209if ac_fn_c_try_compile "$LINENO"; then :
11210
11211 # Check for potential -arch flags. It is not universal unless
11212 # there are at least two -arch flags with different values.
11213 ac_arch=
11214 ac_prev=
11215 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11216 if test -n "$ac_prev"; then
11217 case $ac_word in
11218 i?86 | x86_64 | ppc | ppc64)
11219 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11220 ac_arch=$ac_word
11221 else
11222 ac_cv_c_bigendian=universal
11223 break
11224 fi
11225 ;;
11226 esac
11227 ac_prev=
11228 elif test "x$ac_word" = "x-arch"; then
11229 ac_prev=arch
11230 fi
11231 done
11232fi
11233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11234 if test $ac_cv_c_bigendian = unknown; then
11235 # See if sys/param.h defines the BYTE_ORDER macro.
11236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11237/* end confdefs.h. */
a9322a30 11238#include <sys/types.h>
81ecdfbb 11239 #include <sys/param.h>
a9322a30
TT
11240
11241int
11242main ()
11243{
81ecdfbb
RW
11244#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11245 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11246 && LITTLE_ENDIAN)
11247 bogus endian macros
11248 #endif
a9322a30
TT
11249
11250 ;
11251 return 0;
11252}
bec39cab 11253_ACEOF
81ecdfbb 11254if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11255 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 11256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11257/* end confdefs.h. */
a9322a30 11258#include <sys/types.h>
81ecdfbb 11259 #include <sys/param.h>
a9322a30
TT
11260
11261int
11262main ()
11263{
11264#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
11265 not big endian
11266 #endif
a9322a30
TT
11267
11268 ;
11269 return 0;
11270}
bec39cab 11271_ACEOF
81ecdfbb 11272if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11273 ac_cv_c_bigendian=yes
5ee754fc 11274else
81ecdfbb 11275 ac_cv_c_bigendian=no
5ee754fc 11276fi
81ecdfbb
RW
11277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11278fi
11279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11280 fi
11281 if test $ac_cv_c_bigendian = unknown; then
11282 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11284/* end confdefs.h. */
11285#include <limits.h>
bec39cab 11286
81ecdfbb
RW
11287int
11288main ()
11289{
11290#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11291 bogus endian macros
11292 #endif
11293
11294 ;
11295 return 0;
11296}
7eb368b3 11297_ACEOF
81ecdfbb
RW
11298if ac_fn_c_try_compile "$LINENO"; then :
11299 # It does; now see whether it defined to _BIG_ENDIAN or not.
11300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 11301/* end confdefs.h. */
81ecdfbb
RW
11302#include <limits.h>
11303
7eb368b3
NR
11304int
11305main ()
11306{
81ecdfbb
RW
11307#ifndef _BIG_ENDIAN
11308 not big endian
11309 #endif
11310
7eb368b3
NR
11311 ;
11312 return 0;
11313}
11314_ACEOF
81ecdfbb 11315if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 11316 ac_cv_c_bigendian=yes
81ecdfbb
RW
11317else
11318 ac_cv_c_bigendian=no
a9322a30 11319fi
81ecdfbb 11320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 11321fi
81ecdfbb
RW
11322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11323 fi
11324 if test $ac_cv_c_bigendian = unknown; then
11325 # Compile a test program.
11326 if test "$cross_compiling" = yes; then :
11327 # Try to guess by grepping values from an object file.
11328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11329/* end confdefs.h. */
11330short int ascii_mm[] =
11331 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11332 short int ascii_ii[] =
11333 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11334 int use_ascii (int i) {
11335 return ascii_mm[i] + ascii_ii[i];
11336 }
11337 short int ebcdic_ii[] =
11338 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11339 short int ebcdic_mm[] =
11340 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11341 int use_ebcdic (int i) {
11342 return ebcdic_mm[i] + ebcdic_ii[i];
11343 }
11344 extern int foo;
7eb368b3 11345
81ecdfbb
RW
11346int
11347main ()
11348{
11349return use_ascii (foo) == use_ebcdic (foo);
11350 ;
11351 return 0;
11352}
11353_ACEOF
11354if ac_fn_c_try_compile "$LINENO"; then :
11355 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11356 ac_cv_c_bigendian=yes
11357 fi
11358 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11359 if test "$ac_cv_c_bigendian" = unknown; then
11360 ac_cv_c_bigendian=no
11361 else
11362 # finding both strings is unlikely to happen, but who knows?
11363 ac_cv_c_bigendian=unknown
11364 fi
11365 fi
7eb368b3 11366fi
81ecdfbb 11367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11368else
81ecdfbb 11369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11370/* end confdefs.h. */
81ecdfbb 11371$ac_includes_default
d3ea6809
MM
11372int
11373main ()
11374{
81ecdfbb
RW
11375
11376 /* Are we little or big endian? From Harbison&Steele. */
11377 union
11378 {
11379 long int l;
11380 char c[sizeof (long int)];
11381 } u;
11382 u.l = 1;
11383 return u.c[sizeof (long int) - 1] == 1;
11384
11385 ;
11386 return 0;
d3ea6809
MM
11387}
11388_ACEOF
81ecdfbb 11389if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11390 ac_cv_c_bigendian=no
d3ea6809 11391else
81ecdfbb 11392 ac_cv_c_bigendian=yes
d3ea6809 11393fi
81ecdfbb
RW
11394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11395 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11396fi
a9322a30 11397
81ecdfbb
RW
11398 fi
11399fi
11400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11401$as_echo "$ac_cv_c_bigendian" >&6; }
11402 case $ac_cv_c_bigendian in #(
11403 yes)
11404 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11405;; #(
11406 no)
11407 ;; #(
11408 universal)
11409
11410$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11411
11412 ;; #(
11413 *)
11414 as_fn_error "unknown endianness
11415 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11416 esac
d3ea6809
MM
11417
11418
a9322a30
TT
11419# ------------------------------ #
11420# Checks for library functions. #
11421# ------------------------------ #
d3ea6809 11422
a9322a30 11423for ac_header in stdlib.h unistd.h
81ecdfbb
RW
11424do :
11425 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11426ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11427eval as_val=\$$as_ac_Header
11428 if test "x$as_val" = x""yes; then :
bec39cab 11429 cat >>confdefs.h <<_ACEOF
81ecdfbb 11430#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11431_ACEOF
b757528f 11432
b757528f 11433fi
bec39cab 11434
a9322a30 11435done
a3828db0 11436
a9322a30 11437for ac_func in getpagesize
81ecdfbb
RW
11438do :
11439 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11440if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 11441 cat >>confdefs.h <<_ACEOF
81ecdfbb 11442#define HAVE_GETPAGESIZE 1
bec39cab 11443_ACEOF
bcb3dc3d 11444
bcb3dc3d
MK
11445fi
11446done
11447
81ecdfbb
RW
11448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
11449$as_echo_n "checking for working mmap... " >&6; }
11450if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
11451 $as_echo_n "(cached) " >&6
a9322a30 11452else
81ecdfbb 11453 if test "$cross_compiling" = yes; then :
a9322a30 11454 ac_cv_func_mmap_fixed_mapped=no
bec39cab 11455else
81ecdfbb 11456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11457/* end confdefs.h. */
a9322a30
TT
11458$ac_includes_default
11459/* malloc might have been renamed as rpl_malloc. */
11460#undef malloc
bec39cab 11461
a9322a30
TT
11462/* Thanks to Mike Haertel and Jim Avera for this test.
11463 Here is a matrix of mmap possibilities:
11464 mmap private not fixed
11465 mmap private fixed at somewhere currently unmapped
11466 mmap private fixed at somewhere already mapped
11467 mmap shared not fixed
11468 mmap shared fixed at somewhere currently unmapped
11469 mmap shared fixed at somewhere already mapped
11470 For private mappings, we should verify that changes cannot be read()
11471 back from the file, nor mmap's back from the file at a different
11472 address. (There have been systems where private was not correctly
11473 implemented like the infamous i386 svr4.0, and systems where the
11474 VM page cache was not coherent with the file system buffer cache
11475 like early versions of FreeBSD and possibly contemporary NetBSD.)
11476 For shared mappings, we should conversely verify that changes get
11477 propagated back to all the places they're supposed to be.
bec39cab 11478
a9322a30
TT
11479 Grep wants private fixed already mapped.
11480 The main things grep needs to know about mmap are:
11481 * does it exist and is it safe to write into the mmap'd area
11482 * how to use it (BSD variants) */
8b9cf735 11483
a9322a30
TT
11484#include <fcntl.h>
11485#include <sys/mman.h>
8b9cf735 11486
81ecdfbb 11487#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 11488char *malloc ();
a3828db0
MK
11489#endif
11490
a9322a30 11491/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 11492#ifndef HAVE_GETPAGESIZE
a9322a30 11493/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 11494# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
11495# define HAVE_SYS_PARAM_H 1
11496# endif
11497
11498# ifdef _SC_PAGESIZE
11499# define getpagesize() sysconf(_SC_PAGESIZE)
11500# else /* no _SC_PAGESIZE */
81ecdfbb 11501# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
11502# include <sys/param.h>
11503# ifdef EXEC_PAGESIZE
11504# define getpagesize() EXEC_PAGESIZE
11505# else /* no EXEC_PAGESIZE */
11506# ifdef NBPG
11507# define getpagesize() NBPG * CLSIZE
11508# ifndef CLSIZE
11509# define CLSIZE 1
11510# endif /* no CLSIZE */
11511# else /* no NBPG */
11512# ifdef NBPC
11513# define getpagesize() NBPC
11514# else /* no NBPC */
11515# ifdef PAGESIZE
11516# define getpagesize() PAGESIZE
11517# endif /* PAGESIZE */
11518# endif /* no NBPC */
11519# endif /* no NBPG */
11520# endif /* no EXEC_PAGESIZE */
11521# else /* no HAVE_SYS_PARAM_H */
11522# define getpagesize() 8192 /* punt totally */
11523# endif /* no HAVE_SYS_PARAM_H */
11524# endif /* no _SC_PAGESIZE */
11525
11526#endif /* no HAVE_GETPAGESIZE */
11527
bec39cab
AC
11528int
11529main ()
11530{
a9322a30
TT
11531 char *data, *data2, *data3;
11532 int i, pagesize;
11533 int fd;
11534
11535 pagesize = getpagesize ();
11536
11537 /* First, make a file with some known garbage in it. */
11538 data = (char *) malloc (pagesize);
11539 if (!data)
81ecdfbb 11540 return 1;
a9322a30
TT
11541 for (i = 0; i < pagesize; ++i)
11542 *(data + i) = rand ();
11543 umask (0);
11544 fd = creat ("conftest.mmap", 0600);
11545 if (fd < 0)
81ecdfbb 11546 return 1;
a9322a30 11547 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 11548 return 1;
a9322a30
TT
11549 close (fd);
11550
11551 /* Next, try to mmap the file at a fixed address which already has
11552 something else allocated at it. If we can, also make sure that
11553 we see the same garbage. */
11554 fd = open ("conftest.mmap", O_RDWR);
11555 if (fd < 0)
81ecdfbb 11556 return 1;
a9322a30
TT
11557 data2 = (char *) malloc (2 * pagesize);
11558 if (!data2)
81ecdfbb
RW
11559 return 1;
11560 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
11561 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11562 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 11563 return 1;
a9322a30
TT
11564 for (i = 0; i < pagesize; ++i)
11565 if (*(data + i) != *(data2 + i))
81ecdfbb 11566 return 1;
a9322a30
TT
11567
11568 /* Finally, make sure that changes to the mapped area do not
11569 percolate back to the file as seen by read(). (This is a bug on
11570 some variants of i386 svr4.0.) */
11571 for (i = 0; i < pagesize; ++i)
11572 *(data2 + i) = *(data2 + i) + 1;
11573 data3 = (char *) malloc (pagesize);
11574 if (!data3)
81ecdfbb 11575 return 1;
a9322a30 11576 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 11577 return 1;
a9322a30
TT
11578 for (i = 0; i < pagesize; ++i)
11579 if (*(data + i) != *(data3 + i))
81ecdfbb 11580 return 1;
a9322a30 11581 close (fd);
81ecdfbb 11582 return 0;
bec39cab
AC
11583}
11584_ACEOF
81ecdfbb 11585if ac_fn_c_try_run "$LINENO"; then :
a9322a30 11586 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 11587else
81ecdfbb 11588 ac_cv_func_mmap_fixed_mapped=no
a3828db0 11589fi
81ecdfbb
RW
11590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11591 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 11592fi
81ecdfbb 11593
a9322a30 11594fi
81ecdfbb
RW
11595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11596$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
11597if test $ac_cv_func_mmap_fixed_mapped = yes; then
11598
81ecdfbb 11599$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 11600
086ec9eb 11601fi
a9322a30 11602rm -f conftest.mmap
a3828db0 11603
81ecdfbb
RW
11604ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11605if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 11606
a9322a30
TT
11607else
11608
11609cat >>confdefs.h <<_ACEOF
11610#define pid_t int
bec39cab 11611_ACEOF
086ec9eb
MK
11612
11613fi
11614
81ecdfbb
RW
11615for ac_header in vfork.h
11616do :
11617 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
11618if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 11619 cat >>confdefs.h <<_ACEOF
81ecdfbb 11620#define HAVE_VFORK_H 1
bec39cab 11621_ACEOF
c906108c
SS
11622
11623fi
a9322a30 11624
a3828db0 11625done
c906108c 11626
a9322a30 11627for ac_func in fork vfork
81ecdfbb
RW
11628do :
11629 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11630ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11631eval as_val=\$$as_ac_var
11632 if test "x$as_val" = x""yes; then :
a3828db0 11633 cat >>confdefs.h <<_ACEOF
81ecdfbb 11634#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 11635_ACEOF
b83266a0 11636
97bf5e38 11637fi
a3828db0 11638done
b83266a0 11639
a9322a30 11640if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
11641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
11642$as_echo_n "checking for working fork... " >&6; }
11643if test "${ac_cv_func_fork_works+set}" = set; then :
11644 $as_echo_n "(cached) " >&6
a9322a30 11645else
81ecdfbb 11646 if test "$cross_compiling" = yes; then :
a9322a30
TT
11647 ac_cv_func_fork_works=cross
11648else
81ecdfbb
RW
11649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11650/* end confdefs.h. */
11651$ac_includes_default
11652int
11653main ()
11654{
11655
11656 /* By Ruediger Kuhlmann. */
11657 return fork () < 0;
11658
11659 ;
11660 return 0;
11661}
a9322a30 11662_ACEOF
81ecdfbb 11663if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11664 ac_cv_func_fork_works=yes
11665else
81ecdfbb 11666 ac_cv_func_fork_works=no
a9322a30 11667fi
81ecdfbb
RW
11668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11669 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11670fi
81ecdfbb 11671
a9322a30 11672fi
81ecdfbb
RW
11673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
11674$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
11675
11676else
11677 ac_cv_func_fork_works=$ac_cv_func_fork
11678fi
11679if test "x$ac_cv_func_fork_works" = xcross; then
11680 case $host in
11681 *-*-amigaos* | *-*-msdosdjgpp*)
11682 # Override, as these systems have only a dummy fork() stub
11683 ac_cv_func_fork_works=no
11684 ;;
11685 *)
11686 ac_cv_func_fork_works=yes
11687 ;;
11688 esac
81ecdfbb
RW
11689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
11690$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11691fi
11692ac_cv_func_vfork_works=$ac_cv_func_vfork
11693if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
11694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
11695$as_echo_n "checking for working vfork... " >&6; }
11696if test "${ac_cv_func_vfork_works+set}" = set; then :
11697 $as_echo_n "(cached) " >&6
a9322a30 11698else
81ecdfbb 11699 if test "$cross_compiling" = yes; then :
a9322a30
TT
11700 ac_cv_func_vfork_works=cross
11701else
81ecdfbb 11702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
11703/* end confdefs.h. */
11704/* Thanks to Paul Eggert for this test. */
81ecdfbb 11705$ac_includes_default
a9322a30 11706#include <sys/wait.h>
81ecdfbb 11707#ifdef HAVE_VFORK_H
a9322a30
TT
11708# include <vfork.h>
11709#endif
11710/* On some sparc systems, changes by the child to local and incoming
11711 argument registers are propagated back to the parent. The compiler
11712 is told about this with #include <vfork.h>, but some compilers
11713 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
11714 static variable whose address is put into a register that is
11715 clobbered by the vfork. */
11716static void
11717#ifdef __cplusplus
11718sparc_address_test (int arg)
11719# else
11720sparc_address_test (arg) int arg;
11721#endif
11722{
11723 static pid_t child;
11724 if (!child) {
11725 child = vfork ();
11726 if (child < 0) {
11727 perror ("vfork");
11728 _exit(2);
11729 }
11730 if (!child) {
11731 arg = getpid();
11732 write(-1, "", 0);
11733 _exit (arg);
11734 }
11735 }
11736}
11737
11738int
11739main ()
11740{
11741 pid_t parent = getpid ();
11742 pid_t child;
11743
11744 sparc_address_test (0);
11745
11746 child = vfork ();
11747
11748 if (child == 0) {
11749 /* Here is another test for sparc vfork register problems. This
11750 test uses lots of local variables, at least as many local
11751 variables as main has allocated so far including compiler
11752 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
11753 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
11754 reuse the register of parent for one of the local variables,
11755 since it will think that parent can't possibly be used any more
11756 in this routine. Assigning to the local variable will thus
11757 munge parent in the parent process. */
11758 pid_t
11759 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11760 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11761 /* Convince the compiler that p..p7 are live; otherwise, it might
11762 use the same hardware register for all 8 local variables. */
11763 if (p != p1 || p != p2 || p != p3 || p != p4
11764 || p != p5 || p != p6 || p != p7)
11765 _exit(1);
11766
11767 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
11768 from child file descriptors. If the child closes a descriptor
11769 before it execs or exits, this munges the parent's descriptor
11770 as well. Test for this by closing stdout in the child. */
11771 _exit(close(fileno(stdout)) != 0);
11772 } else {
11773 int status;
11774 struct stat st;
11775
11776 while (wait(&status) != child)
11777 ;
81ecdfbb 11778 return (
a9322a30
TT
11779 /* Was there some problem with vforking? */
11780 child < 0
11781
11782 /* Did the child fail? (This shouldn't happen.) */
11783 || status
11784
11785 /* Did the vfork/compiler bug occur? */
11786 || parent != getpid()
11787
11788 /* Did the file descriptor bug occur? */
11789 || fstat(fileno(stdout), &st) != 0
11790 );
11791 }
11792}
11793_ACEOF
81ecdfbb 11794if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
11795 ac_cv_func_vfork_works=yes
11796else
81ecdfbb 11797 ac_cv_func_vfork_works=no
a9322a30 11798fi
81ecdfbb
RW
11799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11800 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 11801fi
81ecdfbb 11802
a9322a30 11803fi
81ecdfbb
RW
11804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
11805$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
11806
11807fi;
11808if test "x$ac_cv_func_fork_works" = xcross; then
11809 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
11810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11811$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
11812fi
11813
11814if test "x$ac_cv_func_vfork_works" = xyes; then
11815
81ecdfbb 11816$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
11817
11818else
11819
81ecdfbb 11820$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
11821
11822fi
11823if test "x$ac_cv_func_fork_works" = xyes; then
11824
81ecdfbb 11825$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
11826
11827fi
11828
cdf43629 11829for ac_func in getauxval getrusage getuid getgid \
bdca27a2 11830 pipe poll pread pread64 pwrite resize_term \
7313baad 11831 sbrk setpgid setpgrp setsid \
9467110b 11832 sigaction sigprocmask sigsetmask socketpair \
110ed339 11833 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 11834 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 11835 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
11836do :
11837 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11838ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11839eval as_val=\$$as_ac_var
11840 if test "x$as_val" = x""yes; then :
6c7a06a3 11841 cat >>confdefs.h <<_ACEOF
81ecdfbb 11842#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
11843_ACEOF
11844
11845fi
11846done
11847
11848
81ecdfbb
RW
11849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11850$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11851if test "${am_cv_langinfo_codeset+set}" = set; then :
11852 $as_echo_n "(cached) " >&6
6c7a06a3 11853else
81ecdfbb 11854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
11855/* end confdefs.h. */
11856#include <langinfo.h>
11857int
11858main ()
11859{
11860char* cs = nl_langinfo(CODESET);
bec39cab
AC
11861 ;
11862 return 0;
11863}
11864_ACEOF
81ecdfbb 11865if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 11866 am_cv_langinfo_codeset=yes
a4db0f07 11867else
81ecdfbb 11868 am_cv_langinfo_codeset=no
a4db0f07 11869fi
81ecdfbb
RW
11870rm -f core conftest.err conftest.$ac_objext \
11871 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 11872
a4db0f07 11873fi
81ecdfbb
RW
11874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11875$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
11876 if test $am_cv_langinfo_codeset = yes; then
11877
81ecdfbb 11878$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 11879
6c7a06a3 11880 fi
c906108c 11881
06825bd1 11882
3266f10b
TT
11883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11884$as_echo_n "checking for ANSI C header files... " >&6; }
11885if test "${ac_cv_header_stdc+set}" = set; then :
11886 $as_echo_n "(cached) " >&6
11887else
11888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11889/* end confdefs.h. */
11890#include <stdlib.h>
11891#include <stdarg.h>
11892#include <string.h>
11893#include <float.h>
11894
11895int
11896main ()
11897{
11898
11899 ;
11900 return 0;
11901}
11902_ACEOF
11903if ac_fn_c_try_compile "$LINENO"; then :
11904 ac_cv_header_stdc=yes
11905else
11906 ac_cv_header_stdc=no
11907fi
11908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11909
11910if test $ac_cv_header_stdc = yes; then
11911 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913/* end confdefs.h. */
11914#include <string.h>
11915
11916_ACEOF
11917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11918 $EGREP "memchr" >/dev/null 2>&1; then :
11919
11920else
11921 ac_cv_header_stdc=no
11922fi
11923rm -f conftest*
11924
11925fi
11926
11927if test $ac_cv_header_stdc = yes; then
11928 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11930/* end confdefs.h. */
11931#include <stdlib.h>
11932
11933_ACEOF
11934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11935 $EGREP "free" >/dev/null 2>&1; then :
11936
11937else
11938 ac_cv_header_stdc=no
11939fi
11940rm -f conftest*
11941
11942fi
11943
11944if test $ac_cv_header_stdc = yes; then
11945 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11946 if test "$cross_compiling" = yes; then :
11947 :
11948else
11949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11950/* end confdefs.h. */
11951#include <ctype.h>
11952#include <stdlib.h>
11953#if ((' ' & 0x0FF) == 0x020)
11954# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11955# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11956#else
11957# define ISLOWER(c) \
11958 (('a' <= (c) && (c) <= 'i') \
11959 || ('j' <= (c) && (c) <= 'r') \
11960 || ('s' <= (c) && (c) <= 'z'))
11961# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11962#endif
11963
11964#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11965int
11966main ()
11967{
11968 int i;
11969 for (i = 0; i < 256; i++)
11970 if (XOR (islower (i), ISLOWER (i))
11971 || toupper (i) != TOUPPER (i))
11972 return 2;
11973 return 0;
11974}
11975_ACEOF
11976if ac_fn_c_try_run "$LINENO"; then :
11977
11978else
11979 ac_cv_header_stdc=no
11980fi
11981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11982 conftest.$ac_objext conftest.beam conftest.$ac_ext
11983fi
11984
11985fi
11986fi
11987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11988$as_echo "$ac_cv_header_stdc" >&6; }
11989if test $ac_cv_header_stdc = yes; then
11990
11991$as_echo "#define STDC_HEADERS 1" >>confdefs.h
11992
3266f10b
TT
11993fi
11994
11995 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11996# for constant arguments. Useless!
11997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11998$as_echo_n "checking for working alloca.h... " >&6; }
11999if test "${ac_cv_working_alloca_h+set}" = set; then :
12000 $as_echo_n "(cached) " >&6
12001else
12002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12003/* end confdefs.h. */
12004#include <alloca.h>
12005int
12006main ()
12007{
12008char *p = (char *) alloca (2 * sizeof (int));
12009 if (p) return 0;
12010 ;
12011 return 0;
12012}
12013_ACEOF
12014if ac_fn_c_try_link "$LINENO"; then :
12015 ac_cv_working_alloca_h=yes
12016else
12017 ac_cv_working_alloca_h=no
12018fi
12019rm -f core conftest.err conftest.$ac_objext \
12020 conftest$ac_exeext conftest.$ac_ext
12021fi
12022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12023$as_echo "$ac_cv_working_alloca_h" >&6; }
12024if test $ac_cv_working_alloca_h = yes; then
12025
12026$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12027
12028fi
12029
12030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12031$as_echo_n "checking for alloca... " >&6; }
12032if test "${ac_cv_func_alloca_works+set}" = set; then :
12033 $as_echo_n "(cached) " >&6
12034else
12035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12036/* end confdefs.h. */
12037#ifdef __GNUC__
12038# define alloca __builtin_alloca
12039#else
12040# ifdef _MSC_VER
12041# include <malloc.h>
12042# define alloca _alloca
12043# else
12044# ifdef HAVE_ALLOCA_H
12045# include <alloca.h>
12046# else
12047# ifdef _AIX
12048 #pragma alloca
12049# else
12050# ifndef alloca /* predefined by HP cc +Olibcalls */
12051char *alloca ();
12052# endif
12053# endif
12054# endif
12055# endif
12056#endif
12057
12058int
12059main ()
12060{
12061char *p = (char *) alloca (1);
12062 if (p) return 0;
12063 ;
12064 return 0;
12065}
12066_ACEOF
12067if ac_fn_c_try_link "$LINENO"; then :
12068 ac_cv_func_alloca_works=yes
12069else
12070 ac_cv_func_alloca_works=no
12071fi
12072rm -f core conftest.err conftest.$ac_objext \
12073 conftest$ac_exeext conftest.$ac_ext
12074fi
12075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12076$as_echo "$ac_cv_func_alloca_works" >&6; }
12077
12078if test $ac_cv_func_alloca_works = yes; then
12079
12080$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12081
12082else
12083 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12084# that cause trouble. Some versions do not even contain alloca or
12085# contain a buggy version. If you still want to use their alloca,
12086# use ar to extract alloca.o from them instead of compiling alloca.c.
12087
12088ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12089
12090$as_echo "#define C_ALLOCA 1" >>confdefs.h
12091
12092
12093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12094$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12095if test "${ac_cv_os_cray+set}" = set; then :
12096 $as_echo_n "(cached) " >&6
12097else
12098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12099/* end confdefs.h. */
12100#if defined CRAY && ! defined CRAY2
12101webecray
12102#else
12103wenotbecray
12104#endif
12105
12106_ACEOF
12107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12108 $EGREP "webecray" >/dev/null 2>&1; then :
12109 ac_cv_os_cray=yes
12110else
12111 ac_cv_os_cray=no
12112fi
12113rm -f conftest*
12114
12115fi
12116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12117$as_echo "$ac_cv_os_cray" >&6; }
12118if test $ac_cv_os_cray = yes; then
12119 for ac_func in _getb67 GETB67 getb67; do
12120 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12121ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12122eval as_val=\$$as_ac_var
12123 if test "x$as_val" = x""yes; then :
12124
12125cat >>confdefs.h <<_ACEOF
12126#define CRAY_STACKSEG_END $ac_func
12127_ACEOF
12128
12129 break
12130fi
12131
12132 done
12133fi
12134
12135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12136$as_echo_n "checking stack direction for C alloca... " >&6; }
12137if test "${ac_cv_c_stack_direction+set}" = set; then :
12138 $as_echo_n "(cached) " >&6
12139else
12140 if test "$cross_compiling" = yes; then :
12141 ac_cv_c_stack_direction=0
12142else
12143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12144/* end confdefs.h. */
12145$ac_includes_default
12146int
12147find_stack_direction ()
12148{
12149 static char *addr = 0;
12150 auto char dummy;
12151 if (addr == 0)
12152 {
12153 addr = &dummy;
12154 return find_stack_direction ();
12155 }
12156 else
12157 return (&dummy > addr) ? 1 : -1;
12158}
12159
12160int
12161main ()
12162{
12163 return find_stack_direction () < 0;
12164}
12165_ACEOF
12166if ac_fn_c_try_run "$LINENO"; then :
12167 ac_cv_c_stack_direction=1
12168else
12169 ac_cv_c_stack_direction=-1
12170fi
12171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12172 conftest.$ac_objext conftest.beam conftest.$ac_ext
12173fi
12174
12175fi
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12177$as_echo "$ac_cv_c_stack_direction" >&6; }
12178cat >>confdefs.h <<_ACEOF
12179#define STACK_DIRECTION $ac_cv_c_stack_direction
12180_ACEOF
12181
12182
12183fi
12184
12185
12186
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12188$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12189if test "${am_cv_langinfo_codeset+set}" = set; then :
12190 $as_echo_n "(cached) " >&6
12191else
12192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12193/* end confdefs.h. */
12194#include <langinfo.h>
12195int
12196main ()
12197{
12198char* cs = nl_langinfo(CODESET);
12199 ;
12200 return 0;
12201}
12202_ACEOF
12203if ac_fn_c_try_link "$LINENO"; then :
12204 am_cv_langinfo_codeset=yes
12205else
12206 am_cv_langinfo_codeset=no
12207fi
12208rm -f core conftest.err conftest.$ac_objext \
12209 conftest$ac_exeext conftest.$ac_ext
12210
12211fi
12212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12213$as_echo "$am_cv_langinfo_codeset" >&6; }
12214 if test $am_cv_langinfo_codeset = yes; then
12215
12216$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12217
12218 fi
12219
12220
a3d08894 12221 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
12222do :
12223 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12224ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12225eval as_val=\$$as_ac_Header
12226 if test "x$as_val" = x""yes; then :
12227 cat >>confdefs.h <<_ACEOF
12228#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12229_ACEOF
12230
12231fi
12232
12233done
12234
12235
12236 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
12237do :
12238 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12239ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12240eval as_val=\$$as_ac_var
12241 if test "x$as_val" = x""yes; then :
12242 cat >>confdefs.h <<_ACEOF
12243#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12244_ACEOF
12245
12246fi
12247done
12248
12249
12250 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12251if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12252 ac_have_decl=1
12253else
12254 ac_have_decl=0
12255fi
12256
12257cat >>confdefs.h <<_ACEOF
12258#define HAVE_DECL_STRERROR $ac_have_decl
12259_ACEOF
12260ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
12261if test "x$ac_cv_have_decl_strstr" = x""yes; then :
12262 ac_have_decl=1
12263else
12264 ac_have_decl=0
12265fi
12266
12267cat >>confdefs.h <<_ACEOF
12268#define HAVE_DECL_STRSTR $ac_have_decl
12269_ACEOF
12270
12271
e9bcb658
GB
12272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
12273$as_echo_n "checking for sigsetjmp... " >&6; }
12274if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
12275 $as_echo_n "(cached) " >&6
12276else
12277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12278/* end confdefs.h. */
12279
12280#include <setjmp.h>
12281
12282int
12283main ()
12284{
12285sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
12286 ;
12287 return 0;
12288}
12289_ACEOF
12290if ac_fn_c_try_compile "$LINENO"; then :
12291 gdb_cv_func_sigsetjmp=yes
12292else
12293 gdb_cv_func_sigsetjmp=no
12294fi
12295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12296fi
12297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
12298$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
12299if test $gdb_cv_func_sigsetjmp = yes; then
12300
12301$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
12302
12303fi
12304
3266f10b 12305
54019719
PA
12306# Check the return and argument types of ptrace.
12307
12308
54019719
PA
12309for ac_header in sys/ptrace.h ptrace.h
12310do :
12311 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12312ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12313eval as_val=\$$as_ac_Header
12314 if test "x$as_val" = x""yes; then :
12315 cat >>confdefs.h <<_ACEOF
12316#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12317_ACEOF
12318
12319fi
12320
12321done
12322
12323
a3828db0 12324gdb_ptrace_headers='
4ff70b84 12325#include <sys/types.h>
a3828db0
MK
12326#if HAVE_SYS_PTRACE_H
12327# include <sys/ptrace.h>
12328#endif
12329#if HAVE_UNISTD_H
12330# include <unistd.h>
12331#endif
12332'
12333# There is no point in checking if we don't have a prototype.
9b30624b 12334ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
12335"
12336if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
12337 ac_have_decl=1
06825bd1 12338else
81ecdfbb 12339 ac_have_decl=0
06825bd1 12340fi
06825bd1 12341
a3828db0 12342cat >>confdefs.h <<_ACEOF
81ecdfbb 12343#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 12344_ACEOF
81ecdfbb 12345if test $ac_have_decl = 1; then :
bec39cab 12346
a3828db0 12347else
a3828db0
MK
12348
12349 : ${gdb_cv_func_ptrace_ret='int'}
12350 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
12351
06825bd1
MK
12352fi
12353
064ef605
DJ
12354# Check return type. Varargs (used on GNU/Linux) conflict with the
12355# empty argument list, so check for that explicitly.
81ecdfbb
RW
12356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
12357$as_echo_n "checking return type of ptrace... " >&6; }
12358if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
12359 $as_echo_n "(cached) " >&6
bec39cab 12360else
81ecdfbb 12361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12362/* end confdefs.h. */
a3828db0 12363$gdb_ptrace_headers
bec39cab
AC
12364int
12365main ()
12366{
064ef605
DJ
12367extern long ptrace (enum __ptrace_request, ...);
12368 ;
12369 return 0;
12370}
12371_ACEOF
9b30624b 12372if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
12373 gdb_cv_func_ptrace_ret='long'
12374else
81ecdfbb 12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12376/* end confdefs.h. */
12377$gdb_ptrace_headers
12378int
12379main ()
12380{
a3828db0 12381extern int ptrace ();
bec39cab
AC
12382 ;
12383 return 0;
12384}
12385_ACEOF
9b30624b 12386if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12387 gdb_cv_func_ptrace_ret='int'
70f9f479 12388else
81ecdfbb 12389 gdb_cv_func_ptrace_ret='long'
70f9f479 12390fi
81ecdfbb 12391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 12392fi
81ecdfbb 12393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 12394fi
81ecdfbb
RW
12395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
12396$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 12397
a3828db0
MK
12398cat >>confdefs.h <<_ACEOF
12399#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 12400_ACEOF
70f9f479 12401
a3828db0 12402# Check argument types.
81ecdfbb
RW
12403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
12404$as_echo_n "checking types of arguments for ptrace... " >&6; }
12405if test "${gdb_cv_func_ptrace_args+set}" = set; then :
12406 $as_echo_n "(cached) " >&6
bec39cab 12407else
a3828db0 12408
81ecdfbb 12409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
12410/* end confdefs.h. */
12411$gdb_ptrace_headers
12412int
12413main ()
12414{
12415extern long ptrace (enum __ptrace_request, ...);
12416 ;
12417 return 0;
12418}
12419_ACEOF
9b30624b 12420if ac_fn_c_try_compile "$LINENO"; then :
54019719 12421 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 12422else
064ef605 12423
a3828db0
MK
12424for gdb_arg1 in 'int' 'long'; do
12425 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 12426 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 12427 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12429/* end confdefs.h. */
a3828db0 12430$gdb_ptrace_headers
bec39cab
AC
12431int
12432main ()
12433{
a3828db0
MK
12434
12435extern $gdb_cv_func_ptrace_ret
12436 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
12437
bec39cab
AC
12438 ;
12439 return 0;
12440}
12441_ACEOF
9b30624b 12442if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12443 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
12444 break 4;
5c7f2947 12445fi
81ecdfbb 12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 12447 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 12448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12449/* end confdefs.h. */
a3828db0 12450$gdb_ptrace_headers
bec39cab
AC
12451int
12452main ()
12453{
a3828db0
MK
12454
12455extern $gdb_cv_func_ptrace_ret
12456 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
12457
bec39cab
AC
12458 ;
12459 return 0;
12460}
12461_ACEOF
9b30624b 12462if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
12463
12464gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
12465 break 5;
78434e59 12466fi
81ecdfbb 12467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
12468 done
12469 done
12470 done
12471 done
12472done
12473# Provide a safe default value.
12474: ${gdb_cv_func_ptrace_args='int,int,long,long'}
12475
064ef605 12476fi
81ecdfbb 12477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 12478fi
81ecdfbb
RW
12479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
12480$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
12481ac_save_IFS=$IFS; IFS=','
12482set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
12483IFS=$ac_save_IFS
12484shift
bec39cab 12485
54019719
PA
12486cat >>confdefs.h <<_ACEOF
12487#define PTRACE_TYPE_ARG1 $1
12488_ACEOF
12489
12490
a3828db0
MK
12491cat >>confdefs.h <<_ACEOF
12492#define PTRACE_TYPE_ARG3 $3
12493_ACEOF
12494
96d7229d
LM
12495
12496cat >>confdefs.h <<_ACEOF
12497#define PTRACE_TYPE_ARG4 $4
12498_ACEOF
12499
a3828db0
MK
12500if test -n "$5"; then
12501
12502cat >>confdefs.h <<_ACEOF
12503#define PTRACE_TYPE_ARG5 $5
bec39cab 12504_ACEOF
78434e59
MK
12505
12506fi
12507
54019719 12508
a3828db0 12509if test "$cross_compiling" = no; then
81ecdfbb
RW
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12511$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12512if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12513 $as_echo_n "(cached) " >&6
a3828db0 12514else
81ecdfbb
RW
12515 if test "$cross_compiling" = yes; then :
12516 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 12517else
81ecdfbb 12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12519/* end confdefs.h. */
81ecdfbb 12520$ac_includes_default
bec39cab
AC
12521int
12522main ()
12523{
a3828db0
MK
12524/* If this system has a BSD-style setpgrp which takes arguments,
12525 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12526 exit successfully. */
81ecdfbb 12527 return setpgrp (1,1) != -1;
bec39cab
AC
12528 ;
12529 return 0;
12530}
12531_ACEOF
81ecdfbb 12532if ac_fn_c_try_run "$LINENO"; then :
a3828db0 12533 ac_cv_func_setpgrp_void=no
c906108c 12534else
81ecdfbb 12535 ac_cv_func_setpgrp_void=yes
c906108c 12536fi
81ecdfbb
RW
12537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12538 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12539fi
81ecdfbb 12540
a3828db0 12541fi
81ecdfbb
RW
12542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12543$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
12544if test $ac_cv_func_setpgrp_void = yes; then
12545
81ecdfbb 12546$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
12547
12548fi
a3828db0
MK
12549
12550else
81ecdfbb
RW
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
12552$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
12553if test "${ac_cv_func_setpgrp_void+set}" = set; then :
12554 $as_echo_n "(cached) " >&6
97bf5e38 12555else
81ecdfbb 12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12557/* end confdefs.h. */
a3828db0
MK
12558
12559#include <unistd.h>
12560
bec39cab
AC
12561int
12562main ()
12563{
a3828db0
MK
12564
12565 if (setpgrp(1,1) == -1)
12566 exit (0);
12567 else
12568 exit (1);
12569
bec39cab
AC
12570 ;
12571 return 0;
12572}
12573_ACEOF
81ecdfbb 12574if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12575 ac_cv_func_setpgrp_void=no
c906108c 12576else
81ecdfbb 12577 ac_cv_func_setpgrp_void=yes
c906108c 12578fi
81ecdfbb 12579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12580fi
81ecdfbb
RW
12581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
12582$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 12583if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 12584 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 12585
a3828db0 12586fi
c906108c
SS
12587fi
12588
db1ff28b
JK
12589# Assume we'll default to using the included libiberty regex.
12590gdb_use_included_regex=yes
12591
12592# However, if the system regex is GNU regex, then default to *not*
12593# using the included regex.
12594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
12595$as_echo_n "checking for GNU regex... " >&6; }
12596if test "${gdb_cv_have_gnu_regex+set}" = set; then :
12597 $as_echo_n "(cached) " >&6
12598else
12599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12600/* end confdefs.h. */
12601#include <gnu-versions.h>
12602int
12603main ()
12604{
12605#define REGEX_INTERFACE_VERSION 1
12606#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
12607# error "Version mismatch"
12608#endif
12609 ;
12610 return 0;
12611}
12612_ACEOF
12613if ac_fn_c_try_compile "$LINENO"; then :
12614 gdb_cv_have_gnu_regex=yes
12615else
12616 gdb_cv_have_gnu_regex=no
12617fi
12618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12619fi
12620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
12621$as_echo "$gdb_cv_have_gnu_regex" >&6; }
12622if test $gdb_cv_have_gnu_regex = yes; then
12623 gdb_use_included_regex=no
12624fi
12625
12626
12627# Check whether --with-included-regex was given.
12628if test "${with_included_regex+set}" = set; then :
12629 withval=$with_included_regex; gdb_with_regex=$withval
12630else
12631 gdb_with_regex=$gdb_use_included_regex
12632fi
12633
12634if test "$gdb_with_regex" = yes; then
12635
12636$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
12637
12638fi
12639
81ecdfbb
RW
12640# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
12641ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
12642#include <sys/proc.h>
12643
12644"
12645if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 12646
5c45e068 12647cat >>confdefs.h <<_ACEOF
a3828db0 12648#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 12649_ACEOF
c906108c 12650
5c45e068 12651
97bf5e38 12652fi
c906108c 12653
5c45e068 12654
a3828db0 12655# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
12656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
12657$as_echo_n "checking for struct lwp... " >&6; }
12658if test "${gdb_cv_struct_lwp+set}" = set; then :
12659 $as_echo_n "(cached) " >&6
bec39cab 12660else
81ecdfbb 12661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12662/* end confdefs.h. */
a3828db0
MK
12663#include <sys/param.h>
12664#include <sys/lwp.h>
bec39cab
AC
12665int
12666main ()
12667{
a3828db0 12668struct lwp l;
bec39cab
AC
12669 ;
12670 return 0;
12671}
12672_ACEOF
81ecdfbb 12673if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12674 gdb_cv_struct_lwp=yes
c906108c 12675else
81ecdfbb 12676 gdb_cv_struct_lwp=no
c906108c 12677fi
81ecdfbb 12678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12679fi
81ecdfbb
RW
12680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
12681$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 12682if test $gdb_cv_struct_lwp = yes; then
c906108c 12683
81ecdfbb 12684$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 12685
97bf5e38 12686fi
c906108c 12687
a3828db0 12688# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
12689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
12690$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
12691if test "${gdb_cv_struct_reg+set}" = set; then :
12692 $as_echo_n "(cached) " >&6
bec39cab 12693else
81ecdfbb 12694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12695/* end confdefs.h. */
a3828db0
MK
12696#include <sys/types.h>
12697#include <machine/reg.h>
bec39cab
AC
12698int
12699main ()
12700{
a3828db0 12701struct reg r;
bec39cab
AC
12702 ;
12703 return 0;
12704}
12705_ACEOF
81ecdfbb 12706if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12707 gdb_cv_struct_reg=yes
27ca5dad 12708else
81ecdfbb 12709 gdb_cv_struct_reg=no
27ca5dad 12710fi
81ecdfbb 12711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 12712fi
81ecdfbb
RW
12713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
12714$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 12715if test $gdb_cv_struct_reg = yes; then
bec39cab 12716
81ecdfbb 12717$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
12718
12719fi
97bf5e38 12720
a3828db0
MK
12721# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
12722# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
12723ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
12724#include <machine/reg.h>
81ecdfbb
RW
12725"
12726if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
12727
12728cat >>confdefs.h <<_ACEOF
a3828db0 12729#define HAVE_STRUCT_REG_R_FS 1
bec39cab 12730_ACEOF
3862412b 12731
5c45e068 12732
97bf5e38 12733fi
a6e69c1f
JB
12734ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
12735#include <machine/reg.h>
81ecdfbb
RW
12736"
12737if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
12738
12739cat >>confdefs.h <<_ACEOF
a3828db0 12740#define HAVE_STRUCT_REG_R_GS 1
bec39cab 12741_ACEOF
3862412b 12742
5c45e068 12743
97bf5e38 12744fi
3862412b 12745
5c45e068 12746
6fea9e18
L
12747# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
12748# Older amd64 Linux's don't have the fs_base and gs_base members of
12749# `struct user_regs_struct'.
12750ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
12751"
12752if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
12753
12754cat >>confdefs.h <<_ACEOF
12755#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
12756_ACEOF
12757
12758
12759fi
12760ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
12761"
12762if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
12763
12764cat >>confdefs.h <<_ACEOF
12765#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
12766_ACEOF
12767
12768
12769fi
12770
12771
a3828db0 12772# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
12774$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
12775if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
12776 $as_echo_n "(cached) " >&6
451928c5 12777else
81ecdfbb 12778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12779/* end confdefs.h. */
a3828db0 12780#include <sys/ptrace.h>
bec39cab
AC
12781int
12782main ()
12783{
a3828db0 12784PTRACE_GETREGS;
bec39cab
AC
12785 ;
12786 return 0;
12787}
12788_ACEOF
81ecdfbb 12789if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12790 gdb_cv_have_ptrace_getregs=yes
451928c5 12791else
81ecdfbb 12792 gdb_cv_have_ptrace_getregs=no
451928c5 12793fi
81ecdfbb 12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12795fi
12796
81ecdfbb
RW
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
12798$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 12799if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 12800
81ecdfbb 12801$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 12802
97bf5e38 12803fi
451928c5 12804
a3828db0 12805# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
12806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
12807$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
12808if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
12809 $as_echo_n "(cached) " >&6
451928c5 12810else
81ecdfbb 12811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12812/* end confdefs.h. */
a3828db0 12813#include <sys/ptrace.h>
bec39cab
AC
12814int
12815main ()
12816{
a3828db0 12817PTRACE_GETFPXREGS;
bec39cab
AC
12818 ;
12819 return 0;
12820}
12821_ACEOF
81ecdfbb 12822if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12823 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 12824else
81ecdfbb 12825 gdb_cv_have_ptrace_getfpxregs=no
451928c5 12826fi
81ecdfbb 12827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
12828fi
12829
81ecdfbb
RW
12830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
12831$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 12832if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 12833
81ecdfbb 12834$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 12835
97bf5e38 12836fi
451928c5 12837
a3828db0 12838# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
12840$as_echo_n "checking for PT_GETDBREGS... " >&6; }
12841if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
12842 $as_echo_n "(cached) " >&6
3862412b 12843else
81ecdfbb 12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12845/* end confdefs.h. */
a3828db0
MK
12846#include <sys/types.h>
12847#include <sys/ptrace.h>
bec39cab
AC
12848int
12849main ()
12850{
a3828db0 12851PT_GETDBREGS;
bec39cab
AC
12852 ;
12853 return 0;
12854}
12855_ACEOF
81ecdfbb 12856if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12857 gdb_cv_have_pt_getdbregs=yes
3862412b 12858else
81ecdfbb 12859 gdb_cv_have_pt_getdbregs=no
3862412b 12860fi
81ecdfbb 12861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12862fi
12863
81ecdfbb
RW
12864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
12865$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 12866if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 12867
81ecdfbb 12868$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 12869
97bf5e38 12870fi
3862412b 12871
a3828db0 12872# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
12873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
12874$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
12875if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
12876 $as_echo_n "(cached) " >&6
3862412b 12877else
81ecdfbb 12878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12879/* end confdefs.h. */
a3828db0
MK
12880#include <sys/types.h>
12881#include <sys/ptrace.h>
bec39cab
AC
12882int
12883main ()
12884{
a3828db0 12885PT_GETXMMREGS;
bec39cab
AC
12886 ;
12887 return 0;
12888}
12889_ACEOF
81ecdfbb 12890if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 12891 gdb_cv_have_pt_getxmmregs=yes
3862412b 12892else
81ecdfbb 12893 gdb_cv_have_pt_getxmmregs=no
3862412b 12894fi
81ecdfbb 12895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
12896fi
12897
81ecdfbb
RW
12898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
12899$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 12900if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 12901
81ecdfbb 12902$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 12903
97bf5e38 12904fi
3862412b 12905
6e9567fe
JB
12906# See if <sys/ptrace.h> supports LWP names on FreeBSD
12907# Older FreeBSD versions don't have the pl_tdname member of
12908# `struct ptrace_lwpinfo'.
12909ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
12910"
12911if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
12912
12913cat >>confdefs.h <<_ACEOF
12914#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
12915_ACEOF
12916
12917
12918fi
12919
12920
12921
05b4bd79 12922# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
12923
12924if test "${target}" = "${host}"; then
12925 case "${host}" in
7b00db47 12926 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 12927
81ecdfbb 12928$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
12929
12930 ;;
c162e8c9 12931 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 12932
81ecdfbb 12933$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
12934
12935 ;;
12936 mips-sgi-irix5*)
12937 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 12938
81ecdfbb 12939$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
12940
12941 ;;
12942 esac
12943fi
12944
12945if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
12947$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
12948 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
12949 $as_echo_n "(cached) " >&6
596c9d4b 12950else
81ecdfbb 12951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12952/* end confdefs.h. */
596c9d4b
KB
12953
12954#define _SYSCALL32
d30c5336
JK
12955/* Needed for new procfs interface on sparc-solaris. */
12956#define _STRUCTURED_PROC 1
596c9d4b 12957#include <sys/procfs.h>
bec39cab
AC
12958int
12959main ()
12960{
97bf5e38 12961gregset_t avar
bec39cab
AC
12962 ;
12963 return 0;
12964}
12965_ACEOF
81ecdfbb 12966if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12967 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 12968else
81ecdfbb 12969 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 12970
596c9d4b 12971fi
81ecdfbb 12972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
12973fi
12974
97bf5e38 12975 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 12976
81ecdfbb 12977$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
12978
12979 fi
81ecdfbb
RW
12980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
12981$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 12982
81ecdfbb
RW
12983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
12984$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
12985 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
12986 $as_echo_n "(cached) " >&6
d84dd0c5 12987else
81ecdfbb 12988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12989/* end confdefs.h. */
97bf5e38
MK
12990
12991#define _SYSCALL32
d30c5336
JK
12992/* Needed for new procfs interface on sparc-solaris. */
12993#define _STRUCTURED_PROC 1
d84dd0c5 12994#include <sys/procfs.h>
bec39cab
AC
12995int
12996main ()
12997{
97bf5e38 12998fpregset_t avar
bec39cab
AC
12999 ;
13000 return 0;
13001}
13002_ACEOF
81ecdfbb 13003if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13004 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13005else
81ecdfbb 13006 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13007
d84dd0c5 13008fi
81ecdfbb 13009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13010fi
13011
97bf5e38 13012 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13013
81ecdfbb 13014$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13015
97bf5e38 13016 fi
81ecdfbb
RW
13017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13018$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13019
81ecdfbb
RW
13020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13021$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13022 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13023 $as_echo_n "(cached) " >&6
c906108c 13024else
81ecdfbb 13025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13026/* end confdefs.h. */
c906108c 13027
97bf5e38 13028#define _SYSCALL32
d30c5336
JK
13029/* Needed for new procfs interface on sparc-solaris. */
13030#define _STRUCTURED_PROC 1
97bf5e38 13031#include <sys/procfs.h>
bec39cab
AC
13032int
13033main ()
13034{
97bf5e38 13035prgregset_t avar
bec39cab
AC
13036 ;
13037 return 0;
13038}
13039_ACEOF
81ecdfbb 13040if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13041 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13042else
81ecdfbb 13043 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13044
c906108c 13045fi
81ecdfbb 13046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13047fi
13048
97bf5e38 13049 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13050
81ecdfbb 13051$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13052
97bf5e38 13053 fi
81ecdfbb
RW
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13055$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13056
81ecdfbb
RW
13057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13058$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13059 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13060 $as_echo_n "(cached) " >&6
d45fe813 13061else
81ecdfbb 13062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13063/* end confdefs.h. */
97bf5e38
MK
13064
13065#define _SYSCALL32
d30c5336
JK
13066/* Needed for new procfs interface on sparc-solaris. */
13067#define _STRUCTURED_PROC 1
97bf5e38 13068#include <sys/procfs.h>
bec39cab
AC
13069int
13070main ()
13071{
97bf5e38 13072prfpregset_t avar
bec39cab
AC
13073 ;
13074 return 0;
13075}
13076_ACEOF
81ecdfbb 13077if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13078 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13079else
81ecdfbb 13080 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13081
d45fe813 13082fi
81ecdfbb 13083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13084fi
13085
97bf5e38 13086 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13087
81ecdfbb 13088$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13089
97bf5e38 13090 fi
81ecdfbb
RW
13091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13092$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13093
81ecdfbb
RW
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13095$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13096 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13097 $as_echo_n "(cached) " >&6
d45fe813 13098else
81ecdfbb 13099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13100/* end confdefs.h. */
97bf5e38
MK
13101
13102#define _SYSCALL32
d30c5336
JK
13103/* Needed for new procfs interface on sparc-solaris. */
13104#define _STRUCTURED_PROC 1
97bf5e38 13105#include <sys/procfs.h>
bec39cab
AC
13106int
13107main ()
13108{
97bf5e38 13109prgregset32_t avar
bec39cab
AC
13110 ;
13111 return 0;
13112}
13113_ACEOF
81ecdfbb 13114if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13115 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13116else
81ecdfbb 13117 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13118
d45fe813 13119fi
81ecdfbb 13120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13121fi
13122
97bf5e38 13123 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13124
81ecdfbb 13125$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 13126
97bf5e38 13127 fi
81ecdfbb
RW
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
13129$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 13130
81ecdfbb
RW
13131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
13132$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
13133 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
13134 $as_echo_n "(cached) " >&6
d45fe813 13135else
81ecdfbb 13136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13137/* end confdefs.h. */
97bf5e38 13138
d45fe813 13139#define _SYSCALL32
d30c5336
JK
13140/* Needed for new procfs interface on sparc-solaris. */
13141#define _STRUCTURED_PROC 1
97bf5e38 13142#include <sys/procfs.h>
bec39cab
AC
13143int
13144main ()
13145{
97bf5e38 13146lwpid_t avar
bec39cab
AC
13147 ;
13148 return 0;
13149}
13150_ACEOF
81ecdfbb 13151if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13152 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 13153else
81ecdfbb 13154 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 13155
d45fe813 13156fi
81ecdfbb 13157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13158fi
13159
97bf5e38 13160 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 13161
81ecdfbb 13162$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 13163
97bf5e38 13164 fi
81ecdfbb
RW
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
13166$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 13167
81ecdfbb
RW
13168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
13169$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
13170 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
13171 $as_echo_n "(cached) " >&6
c906108c 13172else
81ecdfbb 13173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13174/* end confdefs.h. */
c906108c 13175
97bf5e38 13176#define _SYSCALL32
d30c5336
JK
13177/* Needed for new procfs interface on sparc-solaris. */
13178#define _STRUCTURED_PROC 1
97bf5e38 13179#include <sys/procfs.h>
bec39cab
AC
13180int
13181main ()
13182{
97bf5e38 13183psaddr_t avar
bec39cab
AC
13184 ;
13185 return 0;
13186}
13187_ACEOF
81ecdfbb 13188if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13189 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 13190else
81ecdfbb 13191 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 13192
c906108c 13193fi
81ecdfbb 13194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13195fi
13196
97bf5e38 13197 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 13198
81ecdfbb 13199$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 13200
97bf5e38 13201 fi
81ecdfbb
RW
13202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
13203$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 13204
81ecdfbb
RW
13205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
13206$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
13207 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
13208 $as_echo_n "(cached) " >&6
c906108c 13209else
81ecdfbb 13210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13211/* end confdefs.h. */
c906108c 13212
97bf5e38 13213#define _SYSCALL32
d30c5336
JK
13214/* Needed for new procfs interface on sparc-solaris. */
13215#define _STRUCTURED_PROC 1
97bf5e38 13216#include <sys/procfs.h>
bec39cab
AC
13217int
13218main ()
13219{
97bf5e38 13220prsysent_t avar
bec39cab
AC
13221 ;
13222 return 0;
13223}
13224_ACEOF
81ecdfbb 13225if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13226 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 13227else
81ecdfbb 13228 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 13229
c906108c 13230fi
81ecdfbb 13231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13232fi
13233
97bf5e38 13234 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 13235
81ecdfbb 13236$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 13237
97bf5e38 13238 fi
81ecdfbb
RW
13239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
13240$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 13241
81ecdfbb
RW
13242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
13243$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
13244 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
13245 $as_echo_n "(cached) " >&6
c906108c 13246else
81ecdfbb 13247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13248/* end confdefs.h. */
c906108c 13249
97bf5e38 13250#define _SYSCALL32
d30c5336
JK
13251/* Needed for new procfs interface on sparc-solaris. */
13252#define _STRUCTURED_PROC 1
97bf5e38 13253#include <sys/procfs.h>
bec39cab
AC
13254int
13255main ()
13256{
97bf5e38 13257pr_sigset_t avar
bec39cab
AC
13258 ;
13259 return 0;
13260}
13261_ACEOF
81ecdfbb 13262if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13263 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 13264else
81ecdfbb 13265 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 13266
c906108c 13267fi
81ecdfbb 13268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13269fi
13270
97bf5e38 13271 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 13272
81ecdfbb 13273$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 13274
97bf5e38 13275 fi
81ecdfbb
RW
13276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
13277$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 13278
81ecdfbb
RW
13279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
13280$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
13281 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
13282 $as_echo_n "(cached) " >&6
c906108c 13283else
81ecdfbb 13284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13285/* end confdefs.h. */
c906108c 13286
97bf5e38 13287#define _SYSCALL32
d30c5336
JK
13288/* Needed for new procfs interface on sparc-solaris. */
13289#define _STRUCTURED_PROC 1
97bf5e38 13290#include <sys/procfs.h>
bec39cab
AC
13291int
13292main ()
13293{
97bf5e38 13294pr_sigaction64_t avar
bec39cab
AC
13295 ;
13296 return 0;
13297}
13298_ACEOF
81ecdfbb 13299if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13300 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 13301else
81ecdfbb 13302 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 13303
c906108c 13304fi
81ecdfbb 13305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13306fi
13307
97bf5e38 13308 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 13309
81ecdfbb 13310$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 13311
97bf5e38 13312 fi
81ecdfbb
RW
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
13314$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 13315
81ecdfbb
RW
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
13317$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
13318 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
13319 $as_echo_n "(cached) " >&6
97bf5e38 13320else
81ecdfbb 13321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13322/* end confdefs.h. */
97bf5e38
MK
13323
13324#define _SYSCALL32
d30c5336
JK
13325/* Needed for new procfs interface on sparc-solaris. */
13326#define _STRUCTURED_PROC 1
97bf5e38 13327#include <sys/procfs.h>
bec39cab
AC
13328int
13329main ()
13330{
97bf5e38 13331pr_siginfo64_t avar
bec39cab
AC
13332 ;
13333 return 0;
13334}
13335_ACEOF
81ecdfbb 13336if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13337 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
13338else
81ecdfbb 13339 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 13340
97bf5e38 13341fi
81ecdfbb 13342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13343fi
c906108c 13344
97bf5e38 13345 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 13346
81ecdfbb 13347$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 13348
97bf5e38 13349 fi
81ecdfbb
RW
13350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
13351$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
13352
13353
97bf5e38
MK
13354
13355
13356
97bf5e38 13357 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
13358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
13359$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
13360 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
13361 $as_echo_n "(cached) " >&6
c906108c 13362else
81ecdfbb 13363 if test "$cross_compiling" = yes; then :
97bf5e38 13364 gdb_cv_prfpregset_t_broken=yes
c906108c 13365else
81ecdfbb 13366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13367/* end confdefs.h. */
97bf5e38
MK
13368#include <sys/procfs.h>
13369 int main ()
13370 {
13371 if (sizeof (prfpregset_t) == sizeof (void *))
13372 return 1;
13373 return 0;
13374 }
bec39cab 13375_ACEOF
81ecdfbb 13376if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13377 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
13378else
13379 gdb_cv_prfpregset_t_broken=yes
c906108c 13380fi
81ecdfbb
RW
13381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13382 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13383fi
81ecdfbb 13384
c906108c
SS
13385fi
13386
81ecdfbb
RW
13387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
13388$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 13389 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 13390
81ecdfbb 13391$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 13392
97bf5e38
MK
13393 fi
13394 fi
c906108c 13395fi
c906108c 13396
bc8bcb4b 13397# Check if the compiler supports the `long long' type.
c906108c 13398
81ecdfbb
RW
13399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
13400$as_echo_n "checking for long long support in compiler... " >&6; }
13401if test "${gdb_cv_c_long_long+set}" = set; then :
13402 $as_echo_n "(cached) " >&6
97bf5e38 13403else
81ecdfbb 13404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13405/* end confdefs.h. */
bc8bcb4b 13406extern long long foo;
bec39cab
AC
13407int
13408main ()
13409{
bc8bcb4b 13410switch (foo & 2) { case 0: return 1; }
bec39cab
AC
13411 ;
13412 return 0;
13413}
13414_ACEOF
81ecdfbb 13415if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
13416 gdb_cv_c_long_long=yes
13417else
81ecdfbb 13418 gdb_cv_c_long_long=no
97bf5e38 13419fi
81ecdfbb 13420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13421fi
81ecdfbb
RW
13422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
13423$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
13424if test $gdb_cv_c_long_long != yes; then
13425 # libdecnumber requires long long.
13426 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
13427fi
13428
bc8bcb4b 13429# Check if the compiler and runtime support printing long longs.
97bf5e38 13430
81ecdfbb
RW
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
13432$as_echo_n "checking for long long support in printf... " >&6; }
13433if test "${gdb_cv_printf_has_long_long+set}" = set; then :
13434 $as_echo_n "(cached) " >&6
97bf5e38 13435else
81ecdfbb 13436 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13437 gdb_cv_printf_has_long_long=no
13438else
81ecdfbb 13439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13440/* end confdefs.h. */
bc8bcb4b
MK
13441$ac_includes_default
13442int
13443main ()
13444{
13445char buf[32];
97bf5e38
MK
13446 long long l = 0;
13447 l = (l << 16) + 0x0123;
13448 l = (l << 16) + 0x4567;
13449 l = (l << 16) + 0x89ab;
13450 l = (l << 16) + 0xcdef;
13451 sprintf (buf, "0x%016llx", l);
13452 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
13453 ;
13454 return 0;
c906108c 13455}
bec39cab 13456_ACEOF
81ecdfbb 13457if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13458 gdb_cv_printf_has_long_long=yes
13459else
81ecdfbb 13460 gdb_cv_printf_has_long_long=no
97bf5e38 13461fi
81ecdfbb
RW
13462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13463 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13464fi
81ecdfbb 13465
97bf5e38 13466fi
81ecdfbb
RW
13467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
13468$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 13469if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 13470
81ecdfbb 13471$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
13472
13473fi
97bf5e38 13474
1a619819
LM
13475# Check if the compiler and runtime support printing decfloats.
13476
81ecdfbb
RW
13477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
13478$as_echo_n "checking for decfloat support in printf... " >&6; }
13479if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
13480 $as_echo_n "(cached) " >&6
1a619819 13481else
81ecdfbb 13482 if test "$cross_compiling" = yes; then :
1a619819
LM
13483 gdb_cv_printf_has_decfloat=no
13484else
81ecdfbb 13485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
13486/* end confdefs.h. */
13487$ac_includes_default
13488int
13489main ()
13490{
13491char buf[64];
13492 _Decimal32 d32 = 1.2345df;
13493 _Decimal64 d64 = 1.2345dd;
13494 _Decimal128 d128 = 1.2345dl;
13495 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
13496 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
13497 ;
13498 return 0;
13499}
13500_ACEOF
81ecdfbb 13501if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
13502 gdb_cv_printf_has_decfloat=yes
13503else
81ecdfbb 13504 gdb_cv_printf_has_decfloat=no
1a619819 13505fi
81ecdfbb
RW
13506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13507 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 13508fi
81ecdfbb 13509
1a619819 13510fi
81ecdfbb
RW
13511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
13512$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
13513if test $gdb_cv_printf_has_decfloat = yes; then
13514
81ecdfbb 13515$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
13516
13517fi
13518
bc8bcb4b
MK
13519# Check if the compiler supports the `long double' type. We can't use
13520# AC_C_LONG_DOUBLE because that one does additional checks on the
13521# constants defined in <float.h> that fail on some systems,
13522# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 13523
81ecdfbb
RW
13524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
13525$as_echo_n "checking for long double support in compiler... " >&6; }
13526if test "${gdb_cv_c_long_double+set}" = set; then :
13527 $as_echo_n "(cached) " >&6
97bf5e38 13528else
81ecdfbb 13529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13530/* end confdefs.h. */
97bf5e38 13531long double foo;
bec39cab 13532_ACEOF
81ecdfbb 13533if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 13534 gdb_cv_c_long_double=yes
97bf5e38 13535else
81ecdfbb 13536 gdb_cv_c_long_double=no
97bf5e38 13537fi
81ecdfbb 13538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 13539fi
81ecdfbb
RW
13540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
13541$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 13542if test $gdb_cv_c_long_double = yes; then
c906108c 13543
81ecdfbb 13544$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13545
13546fi
13547
bc8bcb4b 13548# Check if the compiler and runtime support printing long doubles.
97bf5e38 13549
81ecdfbb
RW
13550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
13551$as_echo_n "checking for long double support in printf... " >&6; }
13552if test "${gdb_cv_printf_has_long_double+set}" = set; then :
13553 $as_echo_n "(cached) " >&6
97bf5e38 13554else
81ecdfbb 13555 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13556 gdb_cv_printf_has_long_double=no
13557else
81ecdfbb 13558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13559/* end confdefs.h. */
bc8bcb4b
MK
13560$ac_includes_default
13561int
13562main ()
13563{
13564char buf[16];
97bf5e38
MK
13565 long double f = 3.141592653;
13566 sprintf (buf, "%Lg", f);
13567 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
13568 ;
13569 return 0;
97bf5e38 13570}
bec39cab 13571_ACEOF
81ecdfbb 13572if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 13573 gdb_cv_printf_has_long_double=yes
c906108c 13574else
81ecdfbb 13575 gdb_cv_printf_has_long_double=no
c906108c 13576fi
81ecdfbb
RW
13577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13578 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 13579fi
81ecdfbb 13580
c906108c 13581fi
81ecdfbb
RW
13582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
13583$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 13584if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 13585
81ecdfbb 13586$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13587
13588fi
97bf5e38 13589
bc8bcb4b 13590# Check if the compiler and runtime support scanning long doubles.
97bf5e38 13591
81ecdfbb
RW
13592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
13593$as_echo_n "checking for long double support in scanf... " >&6; }
13594if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
13595 $as_echo_n "(cached) " >&6
97bf5e38 13596else
81ecdfbb 13597 if test "$cross_compiling" = yes; then :
97bf5e38
MK
13598 gdb_cv_scanf_has_long_double=no
13599else
81ecdfbb 13600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13601/* end confdefs.h. */
bc8bcb4b
MK
13602#include <stdio.h>
13603int
13604main ()
13605{
13606char *buf = "3.141592653";
97bf5e38
MK
13607 long double f = 0;
13608 sscanf (buf, "%Lg", &f);
13609 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
13610 ;
13611 return 0;
97bf5e38 13612}
bec39cab 13613_ACEOF
81ecdfbb 13614if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
13615 gdb_cv_scanf_has_long_double=yes
13616else
81ecdfbb 13617 gdb_cv_scanf_has_long_double=no
97bf5e38 13618fi
81ecdfbb
RW
13619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13620 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13621fi
81ecdfbb 13622
c906108c 13623fi
81ecdfbb
RW
13624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
13625$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 13626if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 13627
81ecdfbb 13628$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
13629
13630fi
c906108c 13631
438013df
AO
13632case ${host_os} in
13633aix*)
81ecdfbb
RW
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
13635$as_echo_n "checking for -bbigtoc option... " >&6; }
13636if test "${gdb_cv_bigtoc+set}" = set; then :
13637 $as_echo_n "(cached) " >&6
438013df 13638else
bec39cab 13639
438013df
AO
13640 SAVE_LDFLAGS=$LDFLAGS
13641
13642 case $GCC in
13643 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
13644 *) gdb_cv_bigtoc=-bbigtoc ;;
13645 esac
13646
13647 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 13648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13649/* end confdefs.h. */
438013df 13650
bec39cab
AC
13651int
13652main ()
13653{
438013df 13654int i;
bec39cab
AC
13655 ;
13656 return 0;
13657}
13658_ACEOF
81ecdfbb 13659if ac_fn_c_try_link "$LINENO"; then :
bec39cab 13660
81ecdfbb
RW
13661else
13662 gdb_cv_bigtoc=
438013df 13663fi
81ecdfbb
RW
13664rm -f core conftest.err conftest.$ac_objext \
13665 conftest$ac_exeext conftest.$ac_ext
ec76baa5 13666 LDFLAGS="${SAVE_LDFLAGS}"
438013df 13667
bec39cab 13668fi
81ecdfbb
RW
13669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
13670$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
13671 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
13672 ;;
13673esac
13674
38f6b338 13675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 13676$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
13677dynamic_list=false
13678if test "${gdb_native}" = yes; then
13679 # The dynamically loaded libthread_db needs access to symbols in the gdb
13680 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
13681 # may not be supported there.
13682 old_LDFLAGS="$LDFLAGS"
13683 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
13684 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
13685 LDFLAGS="$LDFLAGS $RDYNAMIC"
13686 if test "${have_libpython}" = no; then
13687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
13688/* end confdefs.h. */
13689
13690int
13691main ()
13692{
13693
13694 ;
13695 return 0;
13696}
13697_ACEOF
13698if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
13699 dynamic_list=true
13700fi
13701rm -f core conftest.err conftest.$ac_objext \
13702 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
13703 else
13704 # Workaround http://bugs.python.org/issue4434 where static
13705 # libpythonX.Y.a would get its symbols required for
13706 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
13707 # Problem does not happen for the recommended libpythonX.Y.so linkage.
13708 old_CFLAGS="$CFLAGS"
13709 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
13710 old_LIBS="$LIBS"
13711 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 13712 if test "$cross_compiling" = yes; then :
3bebe2f2 13713 true
f6528abd 13714else
3bebe2f2
JK
13715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13716/* end confdefs.h. */
13717#include "${have_libpython}/Python.h"
13718int
13719main ()
13720{
13721int err;
38f6b338
JK
13722 Py_Initialize ();
13723 err = PyRun_SimpleString ("import itertools\n");
13724 Py_Finalize ();
13725 return err == 0 ? 0 : 1;
3bebe2f2
JK
13726 ;
13727 return 0;
13728}
13729_ACEOF
13730if ac_fn_c_try_run "$LINENO"; then :
13731 dynamic_list=true
13732fi
13733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13734 conftest.$ac_objext conftest.beam conftest.$ac_ext
13735fi
13736
8c1fb155 13737 LIBS="$old_LIBS"
38f6b338
JK
13738 CFLAGS="$old_CFLAGS"
13739 fi
13740 LDFLAGS="$old_LDFLAGS"
13741fi
13742if $dynamic_list; then
13743 found="-Wl,--dynamic-list"
13744 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 13745else
38f6b338
JK
13746 found="-rdynamic"
13747 RDYNAMIC="-rdynamic"
f6528abd 13748fi
f6528abd 13749
38f6b338 13750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 13751$as_echo "$found" >&6; }
0407b3f1 13752
f6528abd 13753
0407b3f1 13754if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 13755 case ${host_os} in
c906108c 13756 solaris*)
d92419e5
JB
13757 # See if thread_db library is around for Solaris thread debugging.
13758 # Note that we must explicitly test for version 1 of the library
13759 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
13760 # the same API.
81ecdfbb
RW
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
13762$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 13763 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13765$as_echo "yes" >&6; }
60ca704f 13766
81ecdfbb 13767$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 13768
3483b318 13769 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 13770 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13772$as_echo_n "checking for dlopen in -ldl... " >&6; }
13773if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
13774 $as_echo_n "(cached) " >&6
c906108c 13775else
bec39cab 13776 ac_check_lib_save_LIBS=$LIBS
c906108c 13777LIBS="-ldl $LIBS"
81ecdfbb 13778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
13779/* end confdefs.h. */
13780
81ecdfbb
RW
13781/* Override any GCC internal prototype to avoid an error.
13782 Use char because int might match the return type of a GCC
13783 builtin and then its argument prototype would still apply. */
bec39cab
AC
13784#ifdef __cplusplus
13785extern "C"
13786#endif
bec39cab
AC
13787char dlopen ();
13788int
13789main ()
13790{
81ecdfbb 13791return dlopen ();
bec39cab
AC
13792 ;
13793 return 0;
13794}
13795_ACEOF
81ecdfbb 13796if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
13797 ac_cv_lib_dl_dlopen=yes
13798else
81ecdfbb 13799 ac_cv_lib_dl_dlopen=no
bec39cab 13800fi
81ecdfbb
RW
13801rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
13803LIBS=$ac_check_lib_save_LIBS
13804fi
81ecdfbb
RW
13805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13806$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13807if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
13808 cat >>confdefs.h <<_ACEOF
13809#define HAVE_LIBDL 1
13810_ACEOF
c906108c
SS
13811
13812 LIBS="-ldl $LIBS"
13813
c906108c
SS
13814fi
13815
f6528abd 13816 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
13817 # Sun randomly tweaked the prototypes in <proc_service.h>
13818 # at one point.
81ecdfbb
RW
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
13820$as_echo_n "checking if <proc_service.h> is old... " >&6; }
13821 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
13822 $as_echo_n "(cached) " >&6
c906108c 13823else
bec39cab 13824
81ecdfbb 13825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13826/* end confdefs.h. */
c906108c
SS
13827
13828 #include <proc_service.h>
13829 ps_err_e ps_pdwrite
13830 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 13831
bec39cab
AC
13832int
13833main ()
13834{
13835
13836 ;
13837 return 0;
13838}
13839_ACEOF
81ecdfbb 13840if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
13841 gdb_cv_proc_service_is_old=no
13842else
81ecdfbb 13843 gdb_cv_proc_service_is_old=yes
c906108c 13844fi
81ecdfbb 13845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13846
c906108c
SS
13847fi
13848
81ecdfbb
RW
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
13850$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 13851 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 13852
81ecdfbb 13853$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
13854
13855 fi
13856 else
81ecdfbb
RW
13857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13858$as_echo "no" >&6; }
c906108c
SS
13859 fi
13860 ;;
d92419e5 13861 aix*)
81ecdfbb
RW
13862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
13863$as_echo_n "checking for AiX thread debugging library... " >&6; }
13864 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
13865 $as_echo_n "(cached) " >&6
bec39cab 13866else
81ecdfbb 13867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13868/* end confdefs.h. */
d92419e5 13869#include <sys/pthdebug.h>
bec39cab
AC
13870int
13871main ()
13872{
d92419e5
JB
13873#ifndef PTHDB_VERSION_3
13874 #error
13875 #endif
bec39cab
AC
13876 ;
13877 return 0;
13878}
13879_ACEOF
81ecdfbb 13880if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
13881 gdb_cv_have_aix_thread_debug=yes
13882else
81ecdfbb 13883 gdb_cv_have_aix_thread_debug=no
d92419e5 13884fi
81ecdfbb 13885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
13886fi
13887
81ecdfbb
RW
13888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
13889$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
13890 if test $gdb_cv_have_aix_thread_debug = yes; then
13891 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 13892 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 13893 LIBS="$LIBS -lpthdebug"
d645e32e
JB
13894
13895 # Older versions of AIX do not provide the declaration for
13896 # the getthrds function (it appears that it was introduced
13897 # with AIX 6.x).
13898 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
13899"
13900if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
13901 ac_have_decl=1
13902else
13903 ac_have_decl=0
13904fi
13905
13906cat >>confdefs.h <<_ACEOF
13907#define HAVE_DECL_GETTHRDS $ac_have_decl
13908_ACEOF
13909
d92419e5
JB
13910 fi
13911 ;;
c906108c 13912 esac
bec39cab 13913
c906108c
SS
13914fi
13915
3f47be5c 13916if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
13917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
13918$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
13919if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
13920 $as_echo_n "(cached) " >&6
bec39cab 13921else
81ecdfbb 13922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13923/* end confdefs.h. */
3f47be5c 13924#include <thread_db.h>
bec39cab
AC
13925int
13926main ()
13927{
3f47be5c 13928int i = TD_NOTALLOC;
bec39cab
AC
13929 ;
13930 return 0;
13931}
13932_ACEOF
81ecdfbb 13933if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
13934 gdb_cv_thread_db_h_has_td_notalloc=yes
13935else
81ecdfbb 13936 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 13937
3f47be5c 13938fi
81ecdfbb 13939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 13940
bec39cab 13941fi
81ecdfbb
RW
13942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
13943$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
13944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
13945$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
13946if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
13947 $as_echo_n "(cached) " >&6
59f80f10 13948else
81ecdfbb 13949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13950/* end confdefs.h. */
13951#include <thread_db.h>
13952int
13953main ()
13954{
13955int i = TD_VERSION;
13956 ;
13957 return 0;
13958}
13959_ACEOF
81ecdfbb 13960if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13961 gdb_cv_thread_db_h_has_td_version=yes
13962else
81ecdfbb 13963 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
13964
13965fi
81ecdfbb 13966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13967
13968fi
81ecdfbb
RW
13969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
13970$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
13971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
13972$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
13973if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
13974 $as_echo_n "(cached) " >&6
59f80f10 13975else
81ecdfbb 13976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
13977/* end confdefs.h. */
13978#include <thread_db.h>
13979int
13980main ()
13981{
13982int i = TD_NOTLS;
13983 ;
13984 return 0;
13985}
13986_ACEOF
81ecdfbb 13987if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
13988 gdb_cv_thread_db_h_has_td_notls=yes
13989else
81ecdfbb 13990 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
13991
13992fi
81ecdfbb 13993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
13994
13995fi
81ecdfbb
RW
13996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
13997$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
13998fi
13999if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14000
81ecdfbb 14001$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14002
59f80f10
DJ
14003fi
14004if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14005
81ecdfbb 14006$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14007
14008fi
14009if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14010
81ecdfbb 14011$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14012
3f47be5c
EZ
14013fi
14014
81ecdfbb
RW
14015ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14016"
14017if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14018 ac_have_decl=1
10568435 14019else
81ecdfbb 14020 ac_have_decl=0
10568435 14021fi
10568435
JK
14022
14023cat >>confdefs.h <<_ACEOF
81ecdfbb 14024#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14025_ACEOF
14026
14027
81ecdfbb
RW
14028if test "$cross_compiling" = yes; then :
14029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14030/* end confdefs.h. */
14031#include <sys/personality.h>
14032int
14033main ()
14034{
14035
14036# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14037# define ADDR_NO_RANDOMIZE 0x0040000
14038# endif
14039 /* Test the flag could be set and stays set. */
14040 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14041 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14042 return 1
14043 ;
14044 return 0;
14045}
14046_ACEOF
81ecdfbb 14047if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14048 have_personality=true
14049else
81ecdfbb 14050 have_personality=false
10568435 14051fi
81ecdfbb
RW
14052rm -f core conftest.err conftest.$ac_objext \
14053 conftest$ac_exeext conftest.$ac_ext
10568435 14054else
81ecdfbb 14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14056/* end confdefs.h. */
14057#include <sys/personality.h>
14058int
14059main ()
14060{
14061
14062# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14063# define ADDR_NO_RANDOMIZE 0x0040000
14064# endif
14065 /* Test the flag could be set and stays set. */
14066 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14067 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14068 return 1
14069 ;
14070 return 0;
14071}
14072_ACEOF
81ecdfbb 14073if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14074 have_personality=true
14075else
81ecdfbb 14076 have_personality=false
10568435 14077fi
81ecdfbb
RW
14078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14079 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14080fi
81ecdfbb 14081
10568435
JK
14082if $have_personality
14083then
14084
81ecdfbb 14085$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14086
14087fi
14088
e655c1a2
PA
14089case $host_os in
14090 go32* | *djgpp*)
14091 gdbinit=gdb.ini
14092 ;;
14093 *)
14094 gdbinit=.gdbinit
14095 ;;
14096esac
14097
14098cat >>confdefs.h <<_ACEOF
14099#define GDBINIT "$gdbinit"
14100_ACEOF
14101
14102
fb40c209 14103
f83d8a90
DE
14104# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14105# except that the argument to --with-sysroot is optional.
14106# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14107if test "x$with_sysroot" = xyes; then
14108 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14109fi
bec39cab 14110
81ecdfbb
RW
14111# Check whether --with-sysroot was given.
14112if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14113 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14114else
14115 TARGET_SYSTEM_ROOT=
14116fi
030292b7 14117
030292b7 14118
f83d8a90
DE
14119 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14120 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14121 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
14122 ac_define_dir=`eval echo $ac_define_dir`
030292b7 14123
f83d8a90
DE
14124cat >>confdefs.h <<_ACEOF
14125#define TARGET_SYSTEM_ROOT "$ac_define_dir"
14126_ACEOF
bec39cab 14127
030292b7 14128
b14b1491 14129
f83d8a90
DE
14130
14131 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14132 if test "x$prefix" = xNONE; then
14133 test_prefix=/usr/local
14134 else
14135 test_prefix=$prefix
14136 fi
14137 else
14138 test_prefix=$exec_prefix
14139 fi
14140 value=0
14141 case ${ac_define_dir} in
14142 "${test_prefix}"|"${test_prefix}/"*|\
14143 '${exec_prefix}'|'${exec_prefix}/'*)
14144 value=1
14145 ;;
14146 esac
14147
14148cat >>confdefs.h <<_ACEOF
14149#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
14150_ACEOF
030292b7
DJ
14151
14152
14153
16e7150e 14154
16e7150e 14155
81ecdfbb
RW
14156# Check whether --with-system-gdbinit was given.
14157if test "${with_system_gdbinit+set}" = set; then :
14158 withval=$with_system_gdbinit;
b14b1491
TT
14159 SYSTEM_GDBINIT=$withval
14160else
14161 SYSTEM_GDBINIT=
81ecdfbb
RW
14162fi
14163
16e7150e
JG
14164
14165 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
14166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 14167 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
14168 ac_define_dir=`eval echo $ac_define_dir`
14169
14170cat >>confdefs.h <<_ACEOF
14171#define SYSTEM_GDBINIT "$ac_define_dir"
14172_ACEOF
14173
14174
14175
0c4a4063 14176
b14b1491
TT
14177 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
14178 if test "x$prefix" = xNONE; then
14179 test_prefix=/usr/local
14180 else
14181 test_prefix=$prefix
14182 fi
14183 else
14184 test_prefix=$exec_prefix
14185 fi
14186 value=0
14187 case ${ac_define_dir} in
14188 "${test_prefix}"|"${test_prefix}/"*|\
14189 '${exec_prefix}'|'${exec_prefix}/'*)
14190 value=1
14191 ;;
14192 esac
16e7150e 14193
b14b1491
TT
14194cat >>confdefs.h <<_ACEOF
14195#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
14196_ACEOF
14197
b14b1491 14198
16e7150e 14199
0c4a4063 14200
b835bb52 14201
9b30624b 14202
81ecdfbb
RW
14203# Check whether --enable-werror was given.
14204if test "${enable_werror+set}" = set; then :
14205 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
14206 yes | y) ERROR_ON_WARNING="yes" ;;
14207 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 14208 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 14209 esac
81ecdfbb
RW
14210fi
14211
094a342e 14212
9a084706
PA
14213# Enable -Werror by default when using gcc. Turn it off for releases.
14214if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
14215 ERROR_ON_WARNING=yes
14216fi
14217
14218WERROR_CFLAGS=""
14219if test "${ERROR_ON_WARNING}" = yes ; then
14220 WERROR_CFLAGS="-Werror"
14221fi
14222
3bc3d82a 14223# These options work in either C or C++ modes.
aac331e4 14224build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 14225-Wno-unused -Wunused-value -Wunused-function \
aac331e4
PA
14226-Wno-switch -Wno-char-subscripts \
14227-Wempty-body"
a3b362c4 14228
3bc3d82a
PA
14229# Now add in C and C++ specific options, depending on mode.
14230if test "$enable_build_with_cxx" = "yes"; then
14231 build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
14232-Wno-narrowing"
14233else
aac331e4
PA
14234 build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
14235-Wdeclaration-after-statement -Wmissing-parameter-type \
14236-Wold-style-declaration -Wold-style-definition"
3bc3d82a
PA
14237fi
14238
3526781e
DJ
14239# Enable -Wno-format by default when using gcc on mingw since many
14240# GCC versions complain about %I64.
14241case "${host}" in
14242 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 14243 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
14244esac
14245
81ecdfbb
RW
14246# Check whether --enable-build-warnings was given.
14247if test "${enable_build_warnings+set}" = set; then :
14248 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
14249 yes) ;;
14250 no) build_warnings="-w";;
14251 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14252 build_warnings="${build_warnings} ${t}";;
14253 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14254 build_warnings="${t} ${build_warnings}";;
14255 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14256esac
d4f3574e 14257if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 14258 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 14259fi
81ecdfbb
RW
14260fi
14261# Check whether --enable-gdb-build-warnings was given.
14262if test "${enable_gdb_build_warnings+set}" = set; then :
14263 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
14264 yes) ;;
14265 no) build_warnings="-w";;
14266 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14267 build_warnings="${build_warnings} ${t}";;
14268 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
14269 build_warnings="${t} ${build_warnings}";;
14270 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
14271esac
14272if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
14273 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
14274fi
81ecdfbb 14275fi
3bc3d82a
PA
14276
14277# The set of warnings supported by a C++ compiler is not the same as
14278# of the C compiler.
14279if test "$enable_build_with_cxx" = "yes"; then
14280 ac_ext=cpp
14281ac_cpp='$CXXCPP $CPPFLAGS'
14282ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14283ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14284ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14285
14286fi
14287
81ecdfbb 14288WARN_CFLAGS=""
c906108c
SS
14289if test "x${build_warnings}" != x -a "x$GCC" = xyes
14290then
81ecdfbb
RW
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
14292$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
14293 # Separate out the -Werror flag as some files just cannot be
14294 # compiled with it enabled.
14295 for w in ${build_warnings}; do
7544db95
PA
14296 # GCC does not complain about -Wno-unknown-warning. Invert
14297 # and test -Wunknown-warning instead.
14298 case $w in
14299 -Wno-*)
14300 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
14301 *)
14302 wtest=$w ;;
14303 esac
14304
746a987d
AC
14305 case $w in
14306 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
14307 *)
14308 # Check whether GCC accepts it.
4536bbc6 14309 saved_CFLAGS="$CFLAGS"
7544db95 14310 CFLAGS="$CFLAGS $wtest"
3bc3d82a 14311 saved_CXXFLAGS="$CXXFLAGS"
7544db95 14312 CXXFLAGS="$CXXFLAGS $wtest"
54019719 14313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14314/* end confdefs.h. */
4536bbc6 14315
bec39cab
AC
14316int
14317main ()
14318{
4536bbc6 14319
bec39cab
AC
14320 ;
14321 return 0;
14322}
14323_ACEOF
3bc3d82a 14324if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 14325 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 14326fi
81ecdfbb 14327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 14328 CFLAGS="$saved_CFLAGS"
3bc3d82a 14329 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
14330 esac
14331 done
81ecdfbb
RW
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
14333$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
14334fi
14335
14336
104c1213 14337
3bc3d82a
PA
14338if test "$enable_build_with_cxx" = "yes"; then
14339 ac_ext=c
14340ac_cpp='$CPP $CPPFLAGS'
14341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14343ac_compiler_gnu=$ac_cv_c_compiler_gnu
14344
14345fi
14346
b835bb52 14347
7a292a7a 14348# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
14349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
14350$as_echo_n "checking for cygwin... " >&6; }
14351if test "${gdb_cv_os_cygwin+set}" = set; then :
14352 $as_echo_n "(cached) " >&6
bec39cab 14353else
81ecdfbb 14354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14355/* end confdefs.h. */
7a292a7a
SS
14356
14357#if defined (__CYGWIN__) || defined (__CYGWIN32__)
14358lose
14359#endif
bec39cab 14360_ACEOF
7a292a7a 14361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 14362 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
14363 gdb_cv_os_cygwin=yes
14364else
7a292a7a
SS
14365 gdb_cv_os_cygwin=no
14366fi
14367rm -f conftest*
14368
14369fi
81ecdfbb
RW
14370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
14371$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 14372
aff38e61 14373
3eb25fda 14374SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 14375case ${host} in
95cbc983
AC
14376 *go32* ) SER_HARDWIRE=ser-go32.o ;;
14377 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 14378 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
14379esac
14380
14381
cd0fc7c3
SS
14382# libreadline needs libuser32.a in a cygwin environment
14383WIN32LIBS=
14384if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
14385 WIN32LIBS="-luser32"
14386 case "${target}" in
14387 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
14388 ;;
14389 esac
cd0fc7c3 14390fi
c906108c 14391
b4505029
MM
14392# The ser-tcp.c module requires sockets.
14393case ${host} in
14394 *mingw32*)
14395
81ecdfbb 14396$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
14397
14398 WIN32LIBS="$WIN32LIBS -lws2_32"
14399 ;;
14400esac
14401
7a292a7a 14402
31d99776 14403# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
14404
14405 OLD_CFLAGS=$CFLAGS
14406 OLD_LDFLAGS=$LDFLAGS
14407 OLD_LIBS=$LIBS
14408 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14409 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14410 # always want our bfd.
14411 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14412 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14413 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 14414 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14415 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 14416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
14417$as_echo_n "checking for ELF support in BFD... " >&6; }
14418if test "${gdb_cv_var_elf+set}" = set; then :
14419 $as_echo_n "(cached) " >&6
31d99776 14420else
81ecdfbb 14421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
14422/* end confdefs.h. */
14423#include <stdlib.h>
def63ff0
TT
14424 #include "bfd.h"
14425 #include "elf-bfd.h"
31d99776
DJ
14426
14427int
14428main ()
14429{
def63ff0 14430return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
14431 ;
14432 return 0;
14433}
14434_ACEOF
81ecdfbb 14435if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
14436 gdb_cv_var_elf=yes
14437else
81ecdfbb 14438 gdb_cv_var_elf=no
31d99776 14439fi
81ecdfbb
RW
14440rm -f core conftest.err conftest.$ac_objext \
14441 conftest$ac_exeext conftest.$ac_ext
31d99776 14442fi
81ecdfbb
RW
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
14444$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
14445 CFLAGS=$OLD_CFLAGS
14446 LDFLAGS=$OLD_LDFLAGS
14447 LIBS=$OLD_LIBS
31d99776 14448if test $gdb_cv_var_elf = yes; then
d4777acb 14449 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 14450
81ecdfbb 14451$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 14452
075ff26d
JK
14453 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
14454 if test "$plugins" = "yes"; then
a48b32c0
L
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14456$as_echo_n "checking for library containing dlopen... " >&6; }
14457if test "${ac_cv_search_dlopen+set}" = set; then :
14458 $as_echo_n "(cached) " >&6
14459else
14460 ac_func_search_save_LIBS=$LIBS
14461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14462/* end confdefs.h. */
14463
14464/* Override any GCC internal prototype to avoid an error.
14465 Use char because int might match the return type of a GCC
14466 builtin and then its argument prototype would still apply. */
14467#ifdef __cplusplus
14468extern "C"
14469#endif
14470char dlopen ();
14471int
14472main ()
14473{
14474return dlopen ();
14475 ;
14476 return 0;
14477}
14478_ACEOF
14479for ac_lib in '' dl; do
14480 if test -z "$ac_lib"; then
14481 ac_res="none required"
14482 else
14483 ac_res=-l$ac_lib
14484 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14485 fi
14486 if ac_fn_c_try_link "$LINENO"; then :
14487 ac_cv_search_dlopen=$ac_res
14488fi
14489rm -f core conftest.err conftest.$ac_objext \
14490 conftest$ac_exeext
14491 if test "${ac_cv_search_dlopen+set}" = set; then :
14492 break
14493fi
14494done
14495if test "${ac_cv_search_dlopen+set}" = set; then :
14496
14497else
14498 ac_cv_search_dlopen=no
14499fi
14500rm conftest.$ac_ext
14501LIBS=$ac_func_search_save_LIBS
14502fi
14503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14504$as_echo "$ac_cv_search_dlopen" >&6; }
14505ac_res=$ac_cv_search_dlopen
14506if test "$ac_res" != no; then :
14507 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14508
14509fi
14510
075ff26d 14511 fi
31d99776 14512fi
31d99776 14513
4f05add4
TT
14514# Add macho support to GDB, but only if BFD includes it.
14515
14516 OLD_CFLAGS=$CFLAGS
14517 OLD_LDFLAGS=$LDFLAGS
14518 OLD_LIBS=$LIBS
14519 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
14520 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
14521 # always want our bfd.
14522 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
14523 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
14524 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 14525 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 14526 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
14528$as_echo_n "checking for Mach-O support in BFD... " >&6; }
14529if test "${gdb_cv_var_macho+set}" = set; then :
14530 $as_echo_n "(cached) " >&6
14531else
14532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14533/* end confdefs.h. */
14534#include <stdlib.h>
14535 #include "bfd.h"
14536 #include "mach-o.h"
14537
14538int
14539main ()
14540{
14541return bfd_mach_o_lookup_command (NULL, 0, NULL);
14542 ;
14543 return 0;
14544}
14545_ACEOF
14546if ac_fn_c_try_link "$LINENO"; then :
14547 gdb_cv_var_macho=yes
14548else
14549 gdb_cv_var_macho=no
14550fi
14551rm -f core conftest.err conftest.$ac_objext \
14552 conftest$ac_exeext conftest.$ac_ext
14553fi
14554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
14555$as_echo "$gdb_cv_var_macho" >&6; }
14556 CFLAGS=$OLD_CFLAGS
14557 LDFLAGS=$OLD_LDFLAGS
14558 LIBS=$OLD_LIBS
14559if test $gdb_cv_var_macho = yes; then
14560 CONFIG_OBS="$CONFIG_OBS machoread.o"
14561fi
14562
121ce6e5
DJ
14563# Add any host-specific objects to GDB.
14564CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
14565
608e2dbb
TT
14566# If building on ELF, look for lzma support for embedded compressed debug info.
14567if test $gdb_cv_var_elf = yes; then
14568
14569# Check whether --with-lzma was given.
14570if test "${with_lzma+set}" = set; then :
14571 withval=$with_lzma;
14572else
14573 with_lzma=auto
14574fi
14575
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
14577$as_echo_n "checking whether to use lzma... " >&6; }
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
14579$as_echo "$with_lzma" >&6; }
14580
14581 if test "${with_lzma}" != no; then
14582
14583
14584
14585
14586
14587
14588
14589
14590 use_additional=yes
14591
14592 acl_save_prefix="$prefix"
14593 prefix="$acl_final_prefix"
14594 acl_save_exec_prefix="$exec_prefix"
14595 exec_prefix="$acl_final_exec_prefix"
14596
14597 eval additional_includedir=\"$includedir\"
14598 eval additional_libdir=\"$libdir\"
14599
14600 exec_prefix="$acl_save_exec_prefix"
14601 prefix="$acl_save_prefix"
14602
14603
14604# Check whether --with-liblzma-prefix was given.
14605if test "${with_liblzma_prefix+set}" = set; then :
14606 withval=$with_liblzma_prefix;
14607 if test "X$withval" = "Xno"; then
14608 use_additional=no
14609 else
14610 if test "X$withval" = "X"; then
14611
14612 acl_save_prefix="$prefix"
14613 prefix="$acl_final_prefix"
14614 acl_save_exec_prefix="$exec_prefix"
14615 exec_prefix="$acl_final_exec_prefix"
14616
14617 eval additional_includedir=\"$includedir\"
14618 eval additional_libdir=\"$libdir\"
14619
14620 exec_prefix="$acl_save_exec_prefix"
14621 prefix="$acl_save_prefix"
14622
14623 else
14624 additional_includedir="$withval/include"
14625 additional_libdir="$withval/lib"
14626 fi
14627 fi
14628
14629fi
14630
14631 LIBLZMA=
14632 LTLIBLZMA=
14633 INCLZMA=
14634 rpathdirs=
14635 ltrpathdirs=
14636 names_already_handled=
14637 names_next_round='lzma '
14638 while test -n "$names_next_round"; do
14639 names_this_round="$names_next_round"
14640 names_next_round=
14641 for name in $names_this_round; do
14642 already_handled=
14643 for n in $names_already_handled; do
14644 if test "$n" = "$name"; then
14645 already_handled=yes
14646 break
14647 fi
14648 done
14649 if test -z "$already_handled"; then
14650 names_already_handled="$names_already_handled $name"
14651 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14652 eval value=\"\$HAVE_LIB$uppername\"
14653 if test -n "$value"; then
14654 if test "$value" = yes; then
14655 eval value=\"\$LIB$uppername\"
14656 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
14657 eval value=\"\$LTLIB$uppername\"
14658 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
14659 else
14660 :
14661 fi
14662 else
14663 found_dir=
14664 found_la=
14665 found_so=
14666 found_a=
14667 if test $use_additional = yes; then
14668 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14669 found_dir="$additional_libdir"
14670 found_so="$additional_libdir/lib$name.$shlibext"
14671 if test -f "$additional_libdir/lib$name.la"; then
14672 found_la="$additional_libdir/lib$name.la"
14673 fi
14674 else
14675 if test -f "$additional_libdir/lib$name.$libext"; then
14676 found_dir="$additional_libdir"
14677 found_a="$additional_libdir/lib$name.$libext"
14678 if test -f "$additional_libdir/lib$name.la"; then
14679 found_la="$additional_libdir/lib$name.la"
14680 fi
14681 fi
14682 fi
14683 fi
14684 if test "X$found_dir" = "X"; then
14685 for x in $LDFLAGS $LTLIBLZMA; do
14686
14687 acl_save_prefix="$prefix"
14688 prefix="$acl_final_prefix"
14689 acl_save_exec_prefix="$exec_prefix"
14690 exec_prefix="$acl_final_exec_prefix"
14691 eval x=\"$x\"
14692 exec_prefix="$acl_save_exec_prefix"
14693 prefix="$acl_save_prefix"
14694
14695 case "$x" in
14696 -L*)
14697 dir=`echo "X$x" | sed -e 's/^X-L//'`
14698 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14699 found_dir="$dir"
14700 found_so="$dir/lib$name.$shlibext"
14701 if test -f "$dir/lib$name.la"; then
14702 found_la="$dir/lib$name.la"
14703 fi
14704 else
14705 if test -f "$dir/lib$name.$libext"; then
14706 found_dir="$dir"
14707 found_a="$dir/lib$name.$libext"
14708 if test -f "$dir/lib$name.la"; then
14709 found_la="$dir/lib$name.la"
14710 fi
14711 fi
14712 fi
14713 ;;
14714 esac
14715 if test "X$found_dir" != "X"; then
14716 break
14717 fi
14718 done
14719 fi
14720 if test "X$found_dir" != "X"; then
14721 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
14722 if test "X$found_so" != "X"; then
14723 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14724 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14725 else
14726 haveit=
14727 for x in $ltrpathdirs; do
14728 if test "X$x" = "X$found_dir"; then
14729 haveit=yes
14730 break
14731 fi
14732 done
14733 if test -z "$haveit"; then
14734 ltrpathdirs="$ltrpathdirs $found_dir"
14735 fi
14736 if test "$hardcode_direct" = yes; then
14737 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14738 else
14739 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14740 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14741 haveit=
14742 for x in $rpathdirs; do
14743 if test "X$x" = "X$found_dir"; then
14744 haveit=yes
14745 break
14746 fi
14747 done
14748 if test -z "$haveit"; then
14749 rpathdirs="$rpathdirs $found_dir"
14750 fi
14751 else
14752 haveit=
14753 for x in $LDFLAGS $LIBLZMA; do
14754
14755 acl_save_prefix="$prefix"
14756 prefix="$acl_final_prefix"
14757 acl_save_exec_prefix="$exec_prefix"
14758 exec_prefix="$acl_final_exec_prefix"
14759 eval x=\"$x\"
14760 exec_prefix="$acl_save_exec_prefix"
14761 prefix="$acl_save_prefix"
14762
14763 if test "X$x" = "X-L$found_dir"; then
14764 haveit=yes
14765 break
14766 fi
14767 done
14768 if test -z "$haveit"; then
14769 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
14770 fi
14771 if test "$hardcode_minus_L" != no; then
14772 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
14773 else
14774 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14775 fi
14776 fi
14777 fi
14778 fi
14779 else
14780 if test "X$found_a" != "X"; then
14781 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
14782 else
14783 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
14784 fi
14785 fi
14786 additional_includedir=
14787 case "$found_dir" in
14788 */lib | */lib/)
14789 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14790 additional_includedir="$basedir/include"
14791 ;;
14792 esac
14793 if test "X$additional_includedir" != "X"; then
14794 if test "X$additional_includedir" != "X/usr/include"; then
14795 haveit=
14796 if test "X$additional_includedir" = "X/usr/local/include"; then
14797 if test -n "$GCC"; then
14798 case $host_os in
14799 linux*) haveit=yes;;
14800 esac
14801 fi
14802 fi
14803 if test -z "$haveit"; then
14804 for x in $CPPFLAGS $INCLZMA; do
14805
14806 acl_save_prefix="$prefix"
14807 prefix="$acl_final_prefix"
14808 acl_save_exec_prefix="$exec_prefix"
14809 exec_prefix="$acl_final_exec_prefix"
14810 eval x=\"$x\"
14811 exec_prefix="$acl_save_exec_prefix"
14812 prefix="$acl_save_prefix"
14813
14814 if test "X$x" = "X-I$additional_includedir"; then
14815 haveit=yes
14816 break
14817 fi
14818 done
14819 if test -z "$haveit"; then
14820 if test -d "$additional_includedir"; then
14821 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
14822 fi
14823 fi
14824 fi
14825 fi
14826 fi
14827 if test -n "$found_la"; then
14828 save_libdir="$libdir"
14829 case "$found_la" in
14830 */* | *\\*) . "$found_la" ;;
14831 *) . "./$found_la" ;;
14832 esac
14833 libdir="$save_libdir"
14834 for dep in $dependency_libs; do
14835 case "$dep" in
14836 -L*)
14837 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14838 if test "X$additional_libdir" != "X/usr/lib"; then
14839 haveit=
14840 if test "X$additional_libdir" = "X/usr/local/lib"; then
14841 if test -n "$GCC"; then
14842 case $host_os in
14843 linux*) haveit=yes;;
14844 esac
14845 fi
14846 fi
14847 if test -z "$haveit"; then
14848 haveit=
14849 for x in $LDFLAGS $LIBLZMA; do
14850
14851 acl_save_prefix="$prefix"
14852 prefix="$acl_final_prefix"
14853 acl_save_exec_prefix="$exec_prefix"
14854 exec_prefix="$acl_final_exec_prefix"
14855 eval x=\"$x\"
14856 exec_prefix="$acl_save_exec_prefix"
14857 prefix="$acl_save_prefix"
14858
14859 if test "X$x" = "X-L$additional_libdir"; then
14860 haveit=yes
14861 break
14862 fi
14863 done
14864 if test -z "$haveit"; then
14865 if test -d "$additional_libdir"; then
14866 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
14867 fi
14868 fi
14869 haveit=
14870 for x in $LDFLAGS $LTLIBLZMA; do
14871
14872 acl_save_prefix="$prefix"
14873 prefix="$acl_final_prefix"
14874 acl_save_exec_prefix="$exec_prefix"
14875 exec_prefix="$acl_final_exec_prefix"
14876 eval x=\"$x\"
14877 exec_prefix="$acl_save_exec_prefix"
14878 prefix="$acl_save_prefix"
14879
14880 if test "X$x" = "X-L$additional_libdir"; then
14881 haveit=yes
14882 break
14883 fi
14884 done
14885 if test -z "$haveit"; then
14886 if test -d "$additional_libdir"; then
14887 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
14888 fi
14889 fi
14890 fi
14891 fi
14892 ;;
14893 -R*)
14894 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14895 if test "$enable_rpath" != no; then
14896 haveit=
14897 for x in $rpathdirs; do
14898 if test "X$x" = "X$dir"; then
14899 haveit=yes
14900 break
14901 fi
14902 done
14903 if test -z "$haveit"; then
14904 rpathdirs="$rpathdirs $dir"
14905 fi
14906 haveit=
14907 for x in $ltrpathdirs; do
14908 if test "X$x" = "X$dir"; then
14909 haveit=yes
14910 break
14911 fi
14912 done
14913 if test -z "$haveit"; then
14914 ltrpathdirs="$ltrpathdirs $dir"
14915 fi
14916 fi
14917 ;;
14918 -l*)
14919 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14920 ;;
14921 *.la)
14922 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14923 ;;
14924 *)
14925 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
14926 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
14927 ;;
14928 esac
14929 done
14930 fi
14931 else
14932 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
14933 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
14934 fi
14935 fi
14936 fi
14937 done
14938 done
14939 if test "X$rpathdirs" != "X"; then
14940 if test -n "$hardcode_libdir_separator"; then
14941 alldirs=
14942 for found_dir in $rpathdirs; do
14943 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14944 done
14945 acl_save_libdir="$libdir"
14946 libdir="$alldirs"
14947 eval flag=\"$hardcode_libdir_flag_spec\"
14948 libdir="$acl_save_libdir"
14949 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14950 else
14951 for found_dir in $rpathdirs; do
14952 acl_save_libdir="$libdir"
14953 libdir="$found_dir"
14954 eval flag=\"$hardcode_libdir_flag_spec\"
14955 libdir="$acl_save_libdir"
14956 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
14957 done
14958 fi
14959 fi
14960 if test "X$ltrpathdirs" != "X"; then
14961 for found_dir in $ltrpathdirs; do
14962 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
14963 done
14964 fi
14965
14966
14967 ac_save_CPPFLAGS="$CPPFLAGS"
14968
14969 for element in $INCLZMA; do
14970 haveit=
14971 for x in $CPPFLAGS; do
14972
14973 acl_save_prefix="$prefix"
14974 prefix="$acl_final_prefix"
14975 acl_save_exec_prefix="$exec_prefix"
14976 exec_prefix="$acl_final_exec_prefix"
14977 eval x=\"$x\"
14978 exec_prefix="$acl_save_exec_prefix"
14979 prefix="$acl_save_prefix"
14980
14981 if test "X$x" = "X$element"; then
14982 haveit=yes
14983 break
14984 fi
14985 done
14986 if test -z "$haveit"; then
14987 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14988 fi
14989 done
14990
14991
14992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
14993$as_echo_n "checking for liblzma... " >&6; }
14994if test "${ac_cv_liblzma+set}" = set; then :
14995 $as_echo_n "(cached) " >&6
14996else
14997
14998 ac_save_LIBS="$LIBS"
14999 LIBS="$LIBS $LIBLZMA"
15000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15001/* end confdefs.h. */
15002#include "lzma.h"
15003int
15004main ()
15005{
15006lzma_index_iter iter;
15007 lzma_index_iter_init (&iter, 0);
15008 lzma_mf_is_supported (LZMA_MF_HC3);
15009 ;
15010 return 0;
15011}
15012_ACEOF
15013if ac_fn_c_try_link "$LINENO"; then :
15014 ac_cv_liblzma=yes
15015else
15016 ac_cv_liblzma=no
15017fi
15018rm -f core conftest.err conftest.$ac_objext \
15019 conftest$ac_exeext conftest.$ac_ext
15020 LIBS="$ac_save_LIBS"
15021
15022fi
15023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15024$as_echo "$ac_cv_liblzma" >&6; }
15025 if test "$ac_cv_liblzma" = yes; then
15026 HAVE_LIBLZMA=yes
15027
15028$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15029
15030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15031$as_echo_n "checking how to link with liblzma... " >&6; }
15032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15033$as_echo "$LIBLZMA" >&6; }
15034 else
15035 HAVE_LIBLZMA=no
15036 CPPFLAGS="$ac_save_CPPFLAGS"
15037 LIBLZMA=
15038 LTLIBLZMA=
15039 fi
15040
15041
15042
15043
15044
15045
15046 if test "$HAVE_LIBLZMA" != yes; then
15047 if test "$with_lzma" = yes; then
15048 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15049 fi
15050 fi
15051 fi
15052fi
15053
3fc11d3e
JM
15054LIBGUI="../libgui/src/libgui.a"
15055GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15056
15057
7a292a7a 15058
3fc11d3e
JM
15059WIN32LDAPP=
15060
15061
15062
d91670b9 15063case "${host}" in
686a5eed 15064*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15065 configdir="win"
15066 ;;
15067*)
15068 configdir="unix"
15069 ;;
15070esac
3fc11d3e
JM
15071
15072GDBTKLIBS=
15073if test "${enable_gdbtk}" = "yes"; then
15074
d1c3b63a
KS
15075 # Gdbtk must have an absolute path to srcdir in order to run
15076 # properly when not installed.
15077 here=`pwd`
15078 cd ${srcdir}
15079 GDBTK_SRC_DIR=`pwd`
15080 cd $here
15081
bec39cab 15082
5062cc19
KS
15083 #
15084 # Ok, lets find the tcl configuration
15085 # First, look for one uninstalled.
15086 # the alternative search directory is invoked by --with-tcl
15087 #
3fc11d3e 15088
5062cc19
KS
15089 if test x"${no_tcl}" = x ; then
15090 # we reset no_tcl in case something fails here
15091 no_tcl=true
bec39cab 15092
81ecdfbb
RW
15093# Check whether --with-tcl was given.
15094if test "${with_tcl+set}" = set; then :
15095 withval=$with_tcl; with_tclconfig=${withval}
15096fi
15097
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15099$as_echo_n "checking for Tcl configuration... " >&6; }
15100 if test "${ac_cv_c_tclconfig+set}" = set; then :
15101 $as_echo_n "(cached) " >&6
3fc11d3e 15102else
bec39cab 15103
3fc11d3e 15104
5062cc19
KS
15105 # First check to see if --with-tcl was specified.
15106 case "${host}" in
15107 *-*-cygwin*) platDir="win" ;;
15108 *) platDir="unix" ;;
15109 esac
15110 if test x"${with_tclconfig}" != x ; then
15111 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15112 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15113 else
81ecdfbb 15114 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15115 fi
15116 fi
15117
15118 # then check for a private Tcl installation
15119 if test x"${ac_cv_c_tclconfig}" = x ; then
15120 for i in \
15121 ../tcl \
15122 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15123 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15124 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15125 ../../tcl \
15126 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15127 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15128 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15129 ../../../tcl \
15130 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15131 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
15132 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
15133 if test -f "$i/$platDir/tclConfig.sh" ; then
15134 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15135 break
15136 fi
15137 done
15138 fi
15139
15140 # on Darwin, check in Framework installation locations
15141 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
15142 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15143 `ls -d /Library/Frameworks 2>/dev/null` \
15144 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15145 `ls -d /System/Library/Frameworks 2>/dev/null` \
15146 ; do
15147 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
15148 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
15149 break
15150 fi
15151 done
15152 fi
15153
15154 # check in a few common install locations
15155 if test x"${ac_cv_c_tclconfig}" = x ; then
15156 for i in `ls -d ${libdir} 2>/dev/null` \
15157 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15158 `ls -d ${prefix}/lib 2>/dev/null` \
15159 `ls -d /usr/local/lib 2>/dev/null` \
15160 `ls -d /usr/contrib/lib 2>/dev/null` \
15161 `ls -d /usr/lib 2>/dev/null` \
15162 ; do
15163 if test -f "$i/tclConfig.sh" ; then
15164 ac_cv_c_tclconfig=`(cd $i; pwd)`
15165 break
15166 fi
15167 done
15168 fi
3fc11d3e 15169
5062cc19
KS
15170 # check in a few other private locations
15171 if test x"${ac_cv_c_tclconfig}" = x ; then
15172 for i in \
15173 ${srcdir}/../tcl \
15174 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15175 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
15176 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
15177 if test -f "$i/$platDir/tclConfig.sh" ; then
15178 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
15179 break
15180 fi
15181 done
15182 fi
bec39cab 15183
3fc11d3e
JM
15184fi
15185
5062cc19
KS
15186
15187 if test x"${ac_cv_c_tclconfig}" = x ; then
15188 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
15189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
15190$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
15191 else
15192 no_tcl=
15193 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
15195$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
15196 fi
15197 fi
3fc11d3e 15198
bec39cab 15199
85541719
DE
15200 # If $no_tk is nonempty, then we can't do Tk, and there is no
15201 # point to doing Tcl.
bec39cab 15202
5062cc19
KS
15203 #
15204 # Ok, lets find the tk configuration
15205 # First, look for one uninstalled.
15206 # the alternative search directory is invoked by --with-tk
15207 #
3fc11d3e 15208
5062cc19
KS
15209 if test x"${no_tk}" = x ; then
15210 # we reset no_tk in case something fails here
15211 no_tk=true
bec39cab 15212
81ecdfbb
RW
15213# Check whether --with-tk was given.
15214if test "${with_tk+set}" = set; then :
15215 withval=$with_tk; with_tkconfig=${withval}
15216fi
15217
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
15219$as_echo_n "checking for Tk configuration... " >&6; }
15220 if test "${ac_cv_c_tkconfig+set}" = set; then :
15221 $as_echo_n "(cached) " >&6
bec39cab 15222else
3fc11d3e
JM
15223
15224
5062cc19
KS
15225 # First check to see if --with-tkconfig was specified.
15226 if test x"${with_tkconfig}" != x ; then
15227 if test -f "${with_tkconfig}/tkConfig.sh" ; then
15228 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
15229 else
81ecdfbb 15230 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
15231 fi
15232 fi
3fc11d3e 15233
5062cc19
KS
15234 # then check for a private Tk library
15235 case "${host}" in
15236 *-*-cygwin*) platDir="win" ;;
15237 *) platDir="unix" ;;
15238 esac
15239 if test x"${ac_cv_c_tkconfig}" = x ; then
15240 for i in \
15241 ../tk \
15242 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15243 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
15244 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
15245 ../../tk \
15246 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15247 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
15248 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
15249 ../../../tk \
15250 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15251 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
15252 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
15253 if test -f "$i/$platDir/tkConfig.sh" ; then
15254 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15255 break
15256 fi
15257 done
15258 fi
15259
15260 # on Darwin, check in Framework installation locations
15261 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
15262 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
15263 `ls -d /Library/Frameworks 2>/dev/null` \
15264 `ls -d /Network/Library/Frameworks 2>/dev/null` \
15265 `ls -d /System/Library/Frameworks 2>/dev/null` \
15266 ; do
15267 if test -f "$i/Tk.framework/tkConfig.sh" ; then
15268 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
15269 break
15270 fi
15271 done
15272 fi
15273
15274 # check in a few common install locations
15275 if test x"${ac_cv_c_tkconfig}" = x ; then
15276 for i in `ls -d ${libdir} 2>/dev/null` \
15277 `ls -d ${exec_prefix}/lib 2>/dev/null` \
15278 `ls -d ${prefix}/lib 2>/dev/null` \
15279 `ls -d /usr/local/lib 2>/dev/null` \
15280 `ls -d /usr/contrib/lib 2>/dev/null` \
15281 `ls -d /usr/lib 2>/dev/null` \
15282 ; do
15283 if test -f "$i/tkConfig.sh" ; then
15284 ac_cv_c_tkconfig=`(cd $i; pwd)`
15285 break
15286 fi
15287 done
15288 fi
15289 # check in a few other private locations
15290 if test x"${ac_cv_c_tkconfig}" = x ; then
15291 for i in \
15292 ${srcdir}/../tk \
15293 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
15294 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
15295 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
15296 if test -f "$i/$platDir/tkConfig.sh" ; then
15297 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
15298 break
15299 fi
15300 done
15301 fi
3fc11d3e 15302
3fc11d3e
JM
15303fi
15304
15305
5062cc19
KS
15306 if test x"${ac_cv_c_tkconfig}" = x ; then
15307 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
15308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
15309$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
15310 else
15311 no_tk=
15312 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
15313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
15314$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 15315 fi
3fc11d3e 15316 fi
dd2504ab 15317
dd2504ab 15318
85541719
DE
15319 if test -z "${no_tcl}" -a -z "${no_tk}"; then
15320
81ecdfbb
RW
15321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
15322$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
15323
15324 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
15325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15326$as_echo "loading" >&6; }
85541719
DE
15327 . ${TCL_BIN_DIR}/tclConfig.sh
15328 else
81ecdfbb
RW
15329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
15330$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
15331 fi
15332
15333 # eval is required to do the TCL_DBGX substitution
15334 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
15335 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
15336
15337 # If the TCL_BIN_DIR is the build directory (not the install directory),
15338 # then set the common variable name to the value of the build variables.
15339 # For example, the variable TCL_LIB_SPEC will be set to the value
15340 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
15341 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
15342 # installed and uninstalled version of Tcl.
15343 if test -f "${TCL_BIN_DIR}/Makefile" ; then
15344 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
15345 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
15346 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
15347 elif test "`uname -s`" = "Darwin"; then
15348 # If Tcl was built as a framework, attempt to use the libraries
15349 # from the framework at the given location so that linking works
a68ffae9 15350 # against Tcl.framework installed in an arbitrary location.
85541719
DE
15351 case ${TCL_DEFS} in
15352 *TCL_FRAMEWORK*)
15353 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
15354 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
15355 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
15356 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
15357 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
15358 break
15359 fi
15360 done
15361 fi
15362 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
15363 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
15364 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
15365 fi
15366 ;;
15367 esac
15368 fi
15369
15370 # eval is required to do the TCL_DBGX substitution
15371 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
15372 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
15373 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
15374 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390 # Check for in-tree tcl
15391 here=`pwd`
15392 cd ${srcdir}/..
15393 topdir=`pwd`
15394 cd ${here}
15395
15396 intree="no"
15397 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
15398 intree="yes"
15399 fi
15400
15401 # Find Tcl private headers
15402 if test x"${intree}" = xno; then
15403
81ecdfbb
RW
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
15405$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
15406 private_dir=""
15407 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
15408 if test -f ${dir}/tclInt.h ; then
15409 private_dir=${dir}
15410 fi
15411
15412 if test x"${private_dir}" = x; then
81ecdfbb 15413 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
15414 else
15415 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15417$as_echo "${private_dir}" >&6; }
85541719
DE
15418 fi
15419
15420 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
15421 TCL_LIBRARY="${TCL_LIB_SPEC}"
15422 TCL_DEPS=""
15423 else
15424 # If building tcl in the same src tree, private headers
15425 # are not needed, but we need to be sure to use the right
15426 # headers library
15427 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
15428 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
15429 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
15430 fi
15431
15432
15433
15434
15435
81ecdfbb
RW
15436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
15437$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 15438
5062cc19 15439 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
15440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
15441$as_echo "loading" >&6; }
5062cc19 15442 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 15443 else
81ecdfbb
RW
15444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
15445$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 15446 fi
bec39cab 15447
5062cc19
KS
15448 # eval is required to do the TK_DBGX substitution
15449 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
15450 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
15451
15452 # If the TK_BIN_DIR is the build directory (not the install directory),
15453 # then set the common variable name to the value of the build variables.
15454 # For example, the variable TK_LIB_SPEC will be set to the value
15455 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
15456 # instead of TK_BUILD_LIB_SPEC since it will work with both an
15457 # installed and uninstalled version of Tcl.
85541719 15458 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
15459 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
15460 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
15461 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
15462 elif test "`uname -s`" = "Darwin"; then
15463 # If Tk was built as a framework, attempt to use the libraries
15464 # from the framework at the given location so that linking works
a68ffae9 15465 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
15466 case ${TK_DEFS} in
15467 *TK_FRAMEWORK*)
85541719 15468 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
15469 for i in "`cd ${TK_BIN_DIR}; pwd`" \
15470 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
15471 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
15472 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
15473 break
15474 fi
15475 done
15476 fi
85541719 15477 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
15478 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
15479 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
15480 fi
15481 ;;
15482 esac
3fc11d3e
JM
15483 fi
15484
5062cc19
KS
15485 # eval is required to do the TK_DBGX substitution
15486 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
15487 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
15488 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
15489 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 15490
3fc11d3e
JM
15491
15492
bec39cab
AC
15493
15494
15495
15496
15497
15498
15499
3fc11d3e 15500
3fc11d3e 15501
bec39cab 15502
bec39cab 15503
85541719
DE
15504 # Check for in-tree Tk
15505 intree="no"
15506 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
15507 intree="yes"
15508 fi
3fc11d3e 15509
85541719
DE
15510 # Find Tk private headers
15511 if test x"${intree}" = xno; then
3fc11d3e 15512
81ecdfbb
RW
15513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
15514$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
15515 private_dir=""
15516 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
15517 if test -f ${dir}/tkInt.h; then
15518 private_dir=${dir}
3fc11d3e 15519 fi
bec39cab 15520
5062cc19 15521 if test x"${private_dir}" = x; then
81ecdfbb 15522 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 15523 else
5062cc19 15524 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
15526$as_echo "${private_dir}" >&6; }
3fc11d3e 15527 fi
3fc11d3e 15528
85541719
DE
15529 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
15530 TK_LIBRARY=${TK_LIB_SPEC}
15531 TK_DEPS=""
15532 else
15533 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
15534 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
15535 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
15536 fi
3fc11d3e
JM
15537
15538
3fc11d3e
JM
15539
15540
3fc11d3e 15541
85541719 15542 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 15543
85541719
DE
15544 # Include some libraries that Tcl and Tk want.
15545 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
15546 # Yes, the ordering seems wrong here. But it isn't.
15547 # TK_LIBS is the list of libraries that need to be linked
15548 # after Tcl/Tk. Note that this isn't put into LIBS. If it
15549 # were in LIBS then any link tests after this point would
15550 # try to include things like `$(LIBGUI)', which wouldn't work.
15551 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 15552
85541719
DE
15553 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
15554 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
15555 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
15556 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
15557 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
15558 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
15559 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 15560
85541719
DE
15561 if test x$gdb_cv_os_cygwin = xyes; then
15562 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
15563 WIN32LDAPP="-Wl,--subsystem,console"
15564 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 15565 fi
ffc6a242 15566
81ecdfbb 15567 subdirs="$subdirs gdbtk"
3ace7edb 15568
85541719 15569 fi
3fc11d3e
JM
15570fi
15571
15572
15573
15574
15575
15576
15577
15578
81ecdfbb
RW
15579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15580$as_echo_n "checking for X... " >&6; }
bec39cab 15581
c906108c 15582
81ecdfbb
RW
15583# Check whether --with-x was given.
15584if test "${with_x+set}" = set; then :
15585 withval=$with_x;
15586fi
c906108c
SS
15587
15588# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15589if test "x$with_x" = xno; then
15590 # The user explicitly disabled X.
15591 have_x=disabled
15592else
81ecdfbb
RW
15593 case $x_includes,$x_libraries in #(
15594 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
15595 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15596 $as_echo_n "(cached) " >&6
c906108c
SS
15597else
15598 # One or both of the vars are not set, and there is no cached value.
bec39cab 15599ac_x_includes=no ac_x_libraries=no
81ecdfbb 15600rm -f -r conftest.dir
bec39cab
AC
15601if mkdir conftest.dir; then
15602 cd conftest.dir
bec39cab 15603 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
15604incroot:
15605 @echo incroot='${INCROOT}'
15606usrlibdir:
15607 @echo usrlibdir='${USRLIBDIR}'
15608libdir:
15609 @echo libdir='${LIBDIR}'
15610_ACEOF
15611 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 15612 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
15613 for ac_var in incroot usrlibdir libdir; do
15614 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15615 done
c906108c 15616 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
15617 for ac_extension in a so sl dylib la dll; do
15618 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15619 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 15620 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
15621 fi
15622 done
15623 # Screen out bogus values from the imake configuration. They are
15624 # bogus both because they are the default anyway, and because
15625 # using them would break gcc on systems where it needs fixed includes.
bec39cab 15626 case $ac_im_incroot in
81ecdfbb 15627 /usr/include) ac_x_includes= ;;
bec39cab 15628 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 15629 esac
bec39cab 15630 case $ac_im_usrlibdir in
81ecdfbb 15631 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 15632 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
15633 esac
15634 fi
15635 cd ..
81ecdfbb 15636 rm -f -r conftest.dir
c906108c
SS
15637fi
15638
bec39cab
AC
15639# Standard set of common directories for X headers.
15640# Check X11 before X11Rn because it is often a symlink to the current release.
15641ac_x_header_dirs='
15642/usr/X11/include
81ecdfbb 15643/usr/X11R7/include
bec39cab
AC
15644/usr/X11R6/include
15645/usr/X11R5/include
15646/usr/X11R4/include
15647
15648/usr/include/X11
81ecdfbb 15649/usr/include/X11R7
bec39cab
AC
15650/usr/include/X11R6
15651/usr/include/X11R5
15652/usr/include/X11R4
15653
15654/usr/local/X11/include
81ecdfbb 15655/usr/local/X11R7/include
bec39cab
AC
15656/usr/local/X11R6/include
15657/usr/local/X11R5/include
15658/usr/local/X11R4/include
15659
15660/usr/local/include/X11
81ecdfbb 15661/usr/local/include/X11R7
bec39cab
AC
15662/usr/local/include/X11R6
15663/usr/local/include/X11R5
15664/usr/local/include/X11R4
15665
15666/usr/X386/include
15667/usr/x386/include
15668/usr/XFree86/include/X11
15669
15670/usr/include
15671/usr/local/include
15672/usr/unsupported/include
15673/usr/athena/include
15674/usr/local/x11r5/include
15675/usr/lpp/Xamples/include
15676
15677/usr/openwin/include
15678/usr/openwin/share/include'
15679
15680if test "$ac_x_includes" = no; then
81ecdfbb 15681 # Guess where to find include files, by looking for Xlib.h.
c906108c 15682 # First, try using that file with no special directory specified.
81ecdfbb 15683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15684/* end confdefs.h. */
81ecdfbb 15685#include <X11/Xlib.h>
bec39cab 15686_ACEOF
81ecdfbb 15687if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
15688 # We can compile using X headers with no special include directory.
15689ac_x_includes=
15690else
bec39cab 15691 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 15692 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
15693 ac_x_includes=$ac_dir
15694 break
15695 fi
15696done
c906108c 15697fi
bec39cab
AC
15698rm -f conftest.err conftest.$ac_ext
15699fi # $ac_x_includes = no
c906108c 15700
bec39cab 15701if test "$ac_x_libraries" = no; then
c906108c 15702 # Check for the libraries.
c906108c
SS
15703 # See if we find them without any special options.
15704 # Don't add to $LIBS permanently.
bec39cab 15705 ac_save_LIBS=$LIBS
81ecdfbb
RW
15706 LIBS="-lX11 $LIBS"
15707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15708/* end confdefs.h. */
81ecdfbb 15709#include <X11/Xlib.h>
bec39cab
AC
15710int
15711main ()
15712{
81ecdfbb 15713XrmInitialize ()
bec39cab
AC
15714 ;
15715 return 0;
15716}
15717_ACEOF
81ecdfbb 15718if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15719 LIBS=$ac_save_LIBS
c906108c
SS
15720# We can link X programs with no special library path.
15721ac_x_libraries=
15722else
81ecdfbb
RW
15723 LIBS=$ac_save_LIBS
15724for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 15725do
bec39cab 15726 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
15727 for ac_extension in a so sl dylib la dll; do
15728 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
15729 ac_x_libraries=$ac_dir
15730 break 2
15731 fi
15732 done
15733done
15734fi
81ecdfbb
RW
15735rm -f core conftest.err conftest.$ac_objext \
15736 conftest$ac_exeext conftest.$ac_ext
bec39cab 15737fi # $ac_x_libraries = no
c906108c 15738
81ecdfbb
RW
15739case $ac_x_includes,$ac_x_libraries in #(
15740 no,* | *,no | *\'*)
15741 # Didn't find X, or a directory has "'" in its name.
15742 ac_cv_have_x="have_x=no";; #(
15743 *)
15744 # Record where we found X for the cache.
15745 ac_cv_have_x="have_x=yes\
15746 ac_x_includes='$ac_x_includes'\
15747 ac_x_libraries='$ac_x_libraries'"
15748esac
c906108c 15749fi
81ecdfbb
RW
15750;; #(
15751 *) have_x=yes;;
15752 esac
c906108c
SS
15753 eval "$ac_cv_have_x"
15754fi # $with_x != no
15755
15756if test "$have_x" != yes; then
81ecdfbb
RW
15757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15758$as_echo "$have_x" >&6; }
c906108c
SS
15759 no_x=yes
15760else
15761 # If each of the values was on the command line, it overrides each guess.
15762 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15763 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15764 # Update the cache value to reflect the command line values.
81ecdfbb
RW
15765 ac_cv_have_x="have_x=yes\
15766 ac_x_includes='$x_includes'\
15767 ac_x_libraries='$x_libraries'"
15768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15769$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
15770fi
15771
15772
bec39cab 15773# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 15774# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
15775# This code just checks for a few cases where we'd like to ignore those
15776# definitions, even when they're present in the '.mt' file. These cases
15777# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 15778# not part of the source tree.
7a292a7a 15779#
81ecdfbb
RW
15780# Check whether --enable-sim was given.
15781if test "${enable_sim+set}" = set; then :
15782 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
15783 echo "enableval = ${enableval}";
15784 case "${enableval}" in
15785 yes) ignore_sim=false ;;
15786 no) ignore_sim=true ;;
15787 *) ignore_sim=false ;;
15788 esac
15789else
15790 ignore_sim=false
81ecdfbb
RW
15791fi
15792
7a292a7a
SS
15793
15794if test ! -d "${srcdir}/../sim"; then
15795 ignore_sim=true
15796fi
15797
9b624dbe
UW
15798SIM=
15799SIM_OBS=
15800if test "${ignore_sim}" = "false"; then
15801 if test x"${gdb_sim}" != x ; then
15802 SIM="${gdb_sim}"
15803 SIM_OBS="remote-sim.o"
60ca704f 15804
81ecdfbb 15805$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 15806
976102cd
PA
15807
15808 # Some tdep code should only be compiled in when the ppc sim is
15809 # built. PR sim/13418.
15810 case $target in
15811 powerpc*-*-*)
15812
15813$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
15814
15815 ;;
15816 esac
9b624dbe 15817 fi
7a292a7a
SS
15818fi
15819
15820
15821
c906108c
SS
15822
15823
15824
15825
15826
15827
dfcd3bfb 15828
e56ac5c3
AC
15829
15830
b3a90332
AC
15831
15832
c35f4ffc 15833# List of host floatformats.
bec39cab
AC
15834
15835cat >>confdefs.h <<_ACEOF
c35f4ffc 15836#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 15837_ACEOF
c35f4ffc 15838
bec39cab
AC
15839
15840cat >>confdefs.h <<_ACEOF
c35f4ffc 15841#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
15842_ACEOF
15843
c35f4ffc 15844
bec39cab 15845cat >>confdefs.h <<_ACEOF
c35f4ffc 15846#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 15847_ACEOF
c35f4ffc
AC
15848
15849
c906108c
SS
15850# target_subdir is used by the testsuite to find the target libraries.
15851target_subdir=
15852if test "${host}" != "${target}"; then
15853 target_subdir="${target_alias}/"
15854fi
15855
15856
15857frags=
771b4502 15858if test "${gdb_native}" = "yes"; then
0dad8a66
MK
15859 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
15860 if test ! -f ${host_makefile_frag}; then
81ecdfbb 15861 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
15862 fi
15863 frags="$frags $host_makefile_frag"
15864else
15865 host_makefile_frag=/dev/null
c906108c 15866fi
c906108c 15867
c906108c
SS
15868
15869
15870
771b4502 15871if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
15872# We pick this up from the host configuration file (.mh) because we
15873# do not have a native configuration Makefile fragment.
c906108c
SS
15874nativefile=`sed -n '
15875s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
15876' ${host_makefile_frag}`
c906108c
SS
15877fi
15878
15879
b00a8037 15880if test x"${gdb_osabi}" != x ; then
bec39cab
AC
15881
15882cat >>confdefs.h <<_ACEOF
b00a8037 15883#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 15884_ACEOF
b00a8037
DJ
15885
15886fi
15887
8dcde887 15888# Enable multi-ice-gdb-server.
81ecdfbb
RW
15889# Check whether --enable-multi-ice was given.
15890if test "${enable_multi_ice+set}" = set; then :
15891 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
15892 yes | no)
15893 ;;
81ecdfbb 15894 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 15895 esac
81ecdfbb 15896fi
b4e70030 15897
81ecdfbb
RW
15898if test "x$enable_multi_ice" = xyes; then
15899 subdirs="$subdirs multi-ice"
3ace7edb 15900
a85f51e7
DJ
15901fi
15902
496c0e1b
JB
15903# Check whether --enable-gdbserver was given.
15904if test "${enable_gdbserver+set}" = set; then :
15905 enableval=$enable_gdbserver; case "${enableval}" in
15906 yes| no|auto) ;;
15907 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
15908esac
15909else
15910 enable_gdbserver=auto
15911fi
15912
15913
15914# We only build gdbserver automatically in a native configuration, and
15915# only if the user did not explicitly disable its build.
15916if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
15917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
15918$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 15919 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15921$as_echo "yes" >&6; }
15922 subdirs="$subdirs gdbserver"
3ace7edb 15923
496c0e1b 15924 gdbserver_build_enabled=yes
8dcde887 15925 else
81ecdfbb
RW
15926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15927$as_echo "no" >&6; }
8dcde887
MK
15928 fi
15929fi
15930
496c0e1b
JB
15931# If the user explicitly request the gdbserver to be built, verify that
15932# we were in fact able to enable it.
15933if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
15934 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
15935fi
15936
393fd4c3
YQ
15937# Check for babeltrace and babeltrace-ctf
15938
15939# Check whether --with-babeltrace was given.
15940if test "${with_babeltrace+set}" = set; then :
15941 withval=$with_babeltrace;
15942else
15943 with_babeltrace=auto
15944fi
15945
15946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
15947$as_echo_n "checking whether to use babeltrace... " >&6; }
15948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
15949$as_echo "$with_babeltrace" >&6; }
15950
15951if test "x$with_babeltrace" = "xno"; then
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
15953$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
15954else
15955 # Append -Werror to CFLAGS so that configure can catch the warning
15956 # "assignment from incompatible pointer type", which is related to
15957 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
15958 # in GDB, while babeltrace 1.0.3 is broken.
15959 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
15960 # safe to save and restore CFLAGS here.
15961 saved_CFLAGS=$CFLAGS
15962 CFLAGS="$CFLAGS -Werror"
15963
15964
15965
15966
15967
15968
15969
15970
15971 use_additional=yes
15972
15973 acl_save_prefix="$prefix"
15974 prefix="$acl_final_prefix"
15975 acl_save_exec_prefix="$exec_prefix"
15976 exec_prefix="$acl_final_exec_prefix"
15977
15978 eval additional_includedir=\"$includedir\"
15979 eval additional_libdir=\"$libdir\"
15980
15981 exec_prefix="$acl_save_exec_prefix"
15982 prefix="$acl_save_prefix"
15983
15984
15985# Check whether --with-libbabeltrace-prefix was given.
15986if test "${with_libbabeltrace_prefix+set}" = set; then :
15987 withval=$with_libbabeltrace_prefix;
15988 if test "X$withval" = "Xno"; then
15989 use_additional=no
15990 else
15991 if test "X$withval" = "X"; then
15992
15993 acl_save_prefix="$prefix"
15994 prefix="$acl_final_prefix"
15995 acl_save_exec_prefix="$exec_prefix"
15996 exec_prefix="$acl_final_exec_prefix"
15997
15998 eval additional_includedir=\"$includedir\"
15999 eval additional_libdir=\"$libdir\"
16000
16001 exec_prefix="$acl_save_exec_prefix"
16002 prefix="$acl_save_prefix"
16003
16004 else
16005 additional_includedir="$withval/include"
16006 additional_libdir="$withval/lib"
16007 fi
16008 fi
16009
16010fi
16011
16012 LIBBABELTRACE=
16013 LTLIBBABELTRACE=
16014 INCBABELTRACE=
16015 rpathdirs=
16016 ltrpathdirs=
16017 names_already_handled=
16018 names_next_round='babeltrace babeltrace-ctf'
16019 while test -n "$names_next_round"; do
16020 names_this_round="$names_next_round"
16021 names_next_round=
16022 for name in $names_this_round; do
16023 already_handled=
16024 for n in $names_already_handled; do
16025 if test "$n" = "$name"; then
16026 already_handled=yes
16027 break
16028 fi
16029 done
16030 if test -z "$already_handled"; then
16031 names_already_handled="$names_already_handled $name"
16032 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16033 eval value=\"\$HAVE_LIB$uppername\"
16034 if test -n "$value"; then
16035 if test "$value" = yes; then
16036 eval value=\"\$LIB$uppername\"
16037 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16038 eval value=\"\$LTLIB$uppername\"
16039 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16040 else
16041 :
16042 fi
16043 else
16044 found_dir=
16045 found_la=
16046 found_so=
16047 found_a=
16048 if test $use_additional = yes; then
16049 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16050 found_dir="$additional_libdir"
16051 found_so="$additional_libdir/lib$name.$shlibext"
16052 if test -f "$additional_libdir/lib$name.la"; then
16053 found_la="$additional_libdir/lib$name.la"
16054 fi
16055 else
16056 if test -f "$additional_libdir/lib$name.$libext"; then
16057 found_dir="$additional_libdir"
16058 found_a="$additional_libdir/lib$name.$libext"
16059 if test -f "$additional_libdir/lib$name.la"; then
16060 found_la="$additional_libdir/lib$name.la"
16061 fi
16062 fi
16063 fi
16064 fi
16065 if test "X$found_dir" = "X"; then
16066 for x in $LDFLAGS $LTLIBBABELTRACE; do
16067
16068 acl_save_prefix="$prefix"
16069 prefix="$acl_final_prefix"
16070 acl_save_exec_prefix="$exec_prefix"
16071 exec_prefix="$acl_final_exec_prefix"
16072 eval x=\"$x\"
16073 exec_prefix="$acl_save_exec_prefix"
16074 prefix="$acl_save_prefix"
16075
16076 case "$x" in
16077 -L*)
16078 dir=`echo "X$x" | sed -e 's/^X-L//'`
16079 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16080 found_dir="$dir"
16081 found_so="$dir/lib$name.$shlibext"
16082 if test -f "$dir/lib$name.la"; then
16083 found_la="$dir/lib$name.la"
16084 fi
16085 else
16086 if test -f "$dir/lib$name.$libext"; then
16087 found_dir="$dir"
16088 found_a="$dir/lib$name.$libext"
16089 if test -f "$dir/lib$name.la"; then
16090 found_la="$dir/lib$name.la"
16091 fi
16092 fi
16093 fi
16094 ;;
16095 esac
16096 if test "X$found_dir" != "X"; then
16097 break
16098 fi
16099 done
16100 fi
16101 if test "X$found_dir" != "X"; then
16102 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16103 if test "X$found_so" != "X"; then
16104 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16105 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16106 else
16107 haveit=
16108 for x in $ltrpathdirs; do
16109 if test "X$x" = "X$found_dir"; then
16110 haveit=yes
16111 break
16112 fi
16113 done
16114 if test -z "$haveit"; then
16115 ltrpathdirs="$ltrpathdirs $found_dir"
16116 fi
16117 if test "$hardcode_direct" = yes; then
16118 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16119 else
16120 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16121 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16122 haveit=
16123 for x in $rpathdirs; do
16124 if test "X$x" = "X$found_dir"; then
16125 haveit=yes
16126 break
16127 fi
16128 done
16129 if test -z "$haveit"; then
16130 rpathdirs="$rpathdirs $found_dir"
16131 fi
16132 else
16133 haveit=
16134 for x in $LDFLAGS $LIBBABELTRACE; do
16135
16136 acl_save_prefix="$prefix"
16137 prefix="$acl_final_prefix"
16138 acl_save_exec_prefix="$exec_prefix"
16139 exec_prefix="$acl_final_exec_prefix"
16140 eval x=\"$x\"
16141 exec_prefix="$acl_save_exec_prefix"
16142 prefix="$acl_save_prefix"
16143
16144 if test "X$x" = "X-L$found_dir"; then
16145 haveit=yes
16146 break
16147 fi
16148 done
16149 if test -z "$haveit"; then
16150 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
16151 fi
16152 if test "$hardcode_minus_L" != no; then
16153 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16154 else
16155 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16156 fi
16157 fi
16158 fi
16159 fi
16160 else
16161 if test "X$found_a" != "X"; then
16162 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
16163 else
16164 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
16165 fi
16166 fi
16167 additional_includedir=
16168 case "$found_dir" in
16169 */lib | */lib/)
16170 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16171 additional_includedir="$basedir/include"
16172 ;;
16173 esac
16174 if test "X$additional_includedir" != "X"; then
16175 if test "X$additional_includedir" != "X/usr/include"; then
16176 haveit=
16177 if test "X$additional_includedir" = "X/usr/local/include"; then
16178 if test -n "$GCC"; then
16179 case $host_os in
16180 linux*) haveit=yes;;
16181 esac
16182 fi
16183 fi
16184 if test -z "$haveit"; then
16185 for x in $CPPFLAGS $INCBABELTRACE; do
16186
16187 acl_save_prefix="$prefix"
16188 prefix="$acl_final_prefix"
16189 acl_save_exec_prefix="$exec_prefix"
16190 exec_prefix="$acl_final_exec_prefix"
16191 eval x=\"$x\"
16192 exec_prefix="$acl_save_exec_prefix"
16193 prefix="$acl_save_prefix"
16194
16195 if test "X$x" = "X-I$additional_includedir"; then
16196 haveit=yes
16197 break
16198 fi
16199 done
16200 if test -z "$haveit"; then
16201 if test -d "$additional_includedir"; then
16202 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
16203 fi
16204 fi
16205 fi
16206 fi
16207 fi
16208 if test -n "$found_la"; then
16209 save_libdir="$libdir"
16210 case "$found_la" in
16211 */* | *\\*) . "$found_la" ;;
16212 *) . "./$found_la" ;;
16213 esac
16214 libdir="$save_libdir"
16215 for dep in $dependency_libs; do
16216 case "$dep" in
16217 -L*)
16218 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16219 if test "X$additional_libdir" != "X/usr/lib"; then
16220 haveit=
16221 if test "X$additional_libdir" = "X/usr/local/lib"; then
16222 if test -n "$GCC"; then
16223 case $host_os in
16224 linux*) haveit=yes;;
16225 esac
16226 fi
16227 fi
16228 if test -z "$haveit"; then
16229 haveit=
16230 for x in $LDFLAGS $LIBBABELTRACE; do
16231
16232 acl_save_prefix="$prefix"
16233 prefix="$acl_final_prefix"
16234 acl_save_exec_prefix="$exec_prefix"
16235 exec_prefix="$acl_final_exec_prefix"
16236 eval x=\"$x\"
16237 exec_prefix="$acl_save_exec_prefix"
16238 prefix="$acl_save_prefix"
16239
16240 if test "X$x" = "X-L$additional_libdir"; then
16241 haveit=yes
16242 break
16243 fi
16244 done
16245 if test -z "$haveit"; then
16246 if test -d "$additional_libdir"; then
16247 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
16248 fi
16249 fi
16250 haveit=
16251 for x in $LDFLAGS $LTLIBBABELTRACE; do
16252
16253 acl_save_prefix="$prefix"
16254 prefix="$acl_final_prefix"
16255 acl_save_exec_prefix="$exec_prefix"
16256 exec_prefix="$acl_final_exec_prefix"
16257 eval x=\"$x\"
16258 exec_prefix="$acl_save_exec_prefix"
16259 prefix="$acl_save_prefix"
16260
16261 if test "X$x" = "X-L$additional_libdir"; then
16262 haveit=yes
16263 break
16264 fi
16265 done
16266 if test -z "$haveit"; then
16267 if test -d "$additional_libdir"; then
16268 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
16269 fi
16270 fi
16271 fi
16272 fi
16273 ;;
16274 -R*)
16275 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16276 if test "$enable_rpath" != no; then
16277 haveit=
16278 for x in $rpathdirs; do
16279 if test "X$x" = "X$dir"; then
16280 haveit=yes
16281 break
16282 fi
16283 done
16284 if test -z "$haveit"; then
16285 rpathdirs="$rpathdirs $dir"
16286 fi
16287 haveit=
16288 for x in $ltrpathdirs; do
16289 if test "X$x" = "X$dir"; then
16290 haveit=yes
16291 break
16292 fi
16293 done
16294 if test -z "$haveit"; then
16295 ltrpathdirs="$ltrpathdirs $dir"
16296 fi
16297 fi
16298 ;;
16299 -l*)
16300 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16301 ;;
16302 *.la)
16303 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16304 ;;
16305 *)
16306 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
16307 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
16308 ;;
16309 esac
16310 done
16311 fi
16312 else
16313 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
16314 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
16315 fi
16316 fi
16317 fi
16318 done
16319 done
16320 if test "X$rpathdirs" != "X"; then
16321 if test -n "$hardcode_libdir_separator"; then
16322 alldirs=
16323 for found_dir in $rpathdirs; do
16324 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16325 done
16326 acl_save_libdir="$libdir"
16327 libdir="$alldirs"
16328 eval flag=\"$hardcode_libdir_flag_spec\"
16329 libdir="$acl_save_libdir"
16330 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16331 else
16332 for found_dir in $rpathdirs; do
16333 acl_save_libdir="$libdir"
16334 libdir="$found_dir"
16335 eval flag=\"$hardcode_libdir_flag_spec\"
16336 libdir="$acl_save_libdir"
16337 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
16338 done
16339 fi
16340 fi
16341 if test "X$ltrpathdirs" != "X"; then
16342 for found_dir in $ltrpathdirs; do
16343 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
16344 done
16345 fi
16346
16347
16348 ac_save_CPPFLAGS="$CPPFLAGS"
16349
16350 for element in $INCBABELTRACE; do
16351 haveit=
16352 for x in $CPPFLAGS; do
16353
16354 acl_save_prefix="$prefix"
16355 prefix="$acl_final_prefix"
16356 acl_save_exec_prefix="$exec_prefix"
16357 exec_prefix="$acl_final_exec_prefix"
16358 eval x=\"$x\"
16359 exec_prefix="$acl_save_exec_prefix"
16360 prefix="$acl_save_prefix"
16361
16362 if test "X$x" = "X$element"; then
16363 haveit=yes
16364 break
16365 fi
16366 done
16367 if test -z "$haveit"; then
16368 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16369 fi
16370 done
16371
16372
16373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
16374$as_echo_n "checking for libbabeltrace... " >&6; }
16375if test "${ac_cv_libbabeltrace+set}" = set; then :
16376 $as_echo_n "(cached) " >&6
16377else
16378
16379 ac_save_LIBS="$LIBS"
16380 LIBS="$LIBS $LIBBABELTRACE"
16381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16382/* end confdefs.h. */
16383#include <babeltrace/babeltrace.h>
16384 #include <babeltrace/ctf/events.h>
16385 #include <babeltrace/ctf/iterator.h>
16386int
16387main ()
16388{
16389struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
16390 struct bt_ctf_event *event = NULL;
16391 const struct bt_definition *scope;
16392
2d681be4 16393 pos.type = BT_SEEK_BEGIN;
65c749e7 16394 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
16395 scope = bt_ctf_get_top_level_scope (event,
16396 BT_STREAM_EVENT_HEADER);
16397 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
16398
16399 ;
16400 return 0;
16401}
16402_ACEOF
16403if ac_fn_c_try_link "$LINENO"; then :
16404 ac_cv_libbabeltrace=yes
16405else
16406 ac_cv_libbabeltrace=no
16407fi
16408rm -f core conftest.err conftest.$ac_objext \
16409 conftest$ac_exeext conftest.$ac_ext
16410 LIBS="$ac_save_LIBS"
16411
16412fi
16413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
16414$as_echo "$ac_cv_libbabeltrace" >&6; }
16415 if test "$ac_cv_libbabeltrace" = yes; then
16416 HAVE_LIBBABELTRACE=yes
16417
16418$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
16419
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
16421$as_echo_n "checking how to link with libbabeltrace... " >&6; }
16422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
16423$as_echo "$LIBBABELTRACE" >&6; }
16424 else
16425 HAVE_LIBBABELTRACE=no
16426 CPPFLAGS="$ac_save_CPPFLAGS"
16427 LIBBABELTRACE=
16428 LTLIBBABELTRACE=
16429 fi
16430
16431
16432
16433
16434
16435
16436 CFLAGS=$saved_CFLAGS
16437
16438 if test "$HAVE_LIBBABELTRACE" != yes; then
16439 if test "$with_babeltrace" = yes; then
16440 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
16441 else
16442 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
16443$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
16444 fi
16445 fi
16446fi
16447
db985757 16448# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 16449# to an empty version.
c906108c
SS
16450
16451files=
16452links=
5a2402b8 16453
c906108c
SS
16454rm -f nm.h
16455if test "${nativefile}" != ""; then
0f475e27
AC
16456 case "${nativefile}" in
16457 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
16458 * ) GDB_NM_FILE="${nativefile}"
16459 esac
5a2402b8
AC
16460 files="${files} ${GDB_NM_FILE}"
16461 links="${links} nm.h"
60ca704f
SE
16462
16463cat >>confdefs.h <<_ACEOF
b78960be 16464#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 16465_ACEOF
5a2402b8 16466
c906108c 16467fi
5a2402b8
AC
16468
16469
bec39cab
AC
16470ac_sources="$files"
16471ac_dests="$links"
16472while test -n "$ac_sources"; do
16473 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
16474 set $ac_sources; ac_source=$1; shift; ac_sources=$*
16475 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
16476done
81ecdfbb 16477ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
16478
16479
c906108c
SS
16480
16481
c906108c 16482
81ecdfbb 16483$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 16484
bec39cab 16485
b292c783 16486
f6a88844
JM
16487 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16488 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
16489 if test "x$GDB_TRANSFORM_NAME" = x; then
16490 GDB_TRANSFORM_NAME=gdb
16491 fi
16492
16493
16494
16495 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
16496 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
16497 if test "x$GCORE_TRANSFORM_NAME" = x; then
16498 GCORE_TRANSFORM_NAME=gcore
16499 fi
16500
b292c783
JK
16501
16502ac_config_files="$ac_config_files gcore"
16503
c971b7fa 16504ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 16505
89a34d1b 16506
bec39cab
AC
16507cat >confcache <<\_ACEOF
16508# This file is a shell script that caches the results of configure
16509# tests run on this system so they can be shared between configure
16510# scripts and configure runs, see configure's option --config-cache.
16511# It is not useful on other systems. If it contains results you don't
16512# want to keep, you may remove or edit it.
16513#
16514# config.status only pays attention to the cache file if you give it
16515# the --recheck option to rerun configure.
16516#
16517# `ac_cv_env_foo' variables (set or unset) will be overridden when
16518# loading this file, other *unset* `ac_cv_foo' will be assigned the
16519# following values.
16520
16521_ACEOF
16522
16523# The following way of writing the cache mishandles newlines in values,
16524# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 16525# So, we kill variables containing newlines.
bec39cab
AC
16526# Ultrix sh set writes to stderr and can't be redirected directly,
16527# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
16528(
16529 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16530 eval ac_val=\$$ac_var
16531 case $ac_val in #(
16532 *${as_nl}*)
16533 case $ac_var in #(
16534 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16535$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16536 esac
16537 case $ac_var in #(
16538 _ | IFS | as_nl) ;; #(
16539 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16540 *) { eval $ac_var=; unset $ac_var;} ;;
16541 esac ;;
16542 esac
16543 done
16544
bec39cab 16545 (set) 2>&1 |
81ecdfbb
RW
16546 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16547 *${as_nl}ac_space=\ *)
16548 # `set' does not quote correctly, so add quotes: double-quote
16549 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
16550 sed -n \
16551 "s/'/'\\\\''/g;
16552 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 16553 ;; #(
bec39cab
AC
16554 *)
16555 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 16556 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 16557 ;;
81ecdfbb
RW
16558 esac |
16559 sort
16560) |
bec39cab 16561 sed '
81ecdfbb 16562 /^ac_cv_env_/b end
bec39cab 16563 t clear
81ecdfbb 16564 :clear
bec39cab
AC
16565 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16566 t end
81ecdfbb
RW
16567 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16568 :end' >>confcache
16569if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16570 if test -w "$cache_file"; then
16571 test "x$cache_file" != "x/dev/null" &&
16572 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16573$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
16574 cat confcache >$cache_file
16575 else
81ecdfbb
RW
16576 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16577$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
16578 fi
16579fi
16580rm -f confcache
16581
16582test "x$prefix" = xNONE && prefix=$ac_default_prefix
16583# Let make expand exec_prefix.
16584test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16585
bec39cab
AC
16586DEFS=-DHAVE_CONFIG_H
16587
16588ac_libobjs=
16589ac_ltlibobjs=
16590for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16591 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
16592 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16593 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16594 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16595 # will be set to the directory where LIBOBJS objects are built.
16596 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16597 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
16598done
16599LIBOBJS=$ac_libobjs
16600
16601LTLIBOBJS=$ac_ltlibobjs
16602
16603
85981d60 16604if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
16605 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
16606Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 16607fi
a417dc56 16608if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
16609 as_fn_error "conditional \"GMAKE\" was never defined.
16610Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 16611fi
4df42755
DE
16612if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
16613 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
16614Usually this means the macro was only invoked conditionally." "$LINENO" 5
16615fi
16616if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
16617 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
16618Usually this means the macro was only invoked conditionally." "$LINENO" 5
16619fi
81ecdfbb
RW
16620
16621
bec39cab 16622: ${CONFIG_STATUS=./config.status}
81ecdfbb 16623ac_write_fail=0
bec39cab
AC
16624ac_clean_files_save=$ac_clean_files
16625ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
16626{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16627$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16628as_write_fail=0
16629cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
16630#! $SHELL
16631# Generated by $as_me.
16632# Run this file to recreate the current configuration.
16633# Compiler output produced by configure, useful for debugging
16634# configure, is in config.log if it exists.
16635
16636debug=false
16637ac_cs_recheck=false
16638ac_cs_silent=false
bec39cab 16639
81ecdfbb
RW
16640SHELL=\${CONFIG_SHELL-$SHELL}
16641export SHELL
16642_ASEOF
16643cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16644## -------------------- ##
16645## M4sh Initialization. ##
16646## -------------------- ##
16647
16648# Be more Bourne compatible
16649DUALCASE=1; export DUALCASE # for MKS sh
16650if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
16651 emulate sh
16652 NULLCMD=:
81ecdfbb 16653 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
16654 # is contrary to our usage. Disable this feature.
16655 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
16656 setopt NO_GLOB_SUBST
16657else
16658 case `(set -o) 2>/dev/null` in #(
16659 *posix*) :
16660 set -o posix ;; #(
16661 *) :
16662 ;;
16663esac
bec39cab 16664fi
bec39cab 16665
81ecdfbb
RW
16666
16667as_nl='
16668'
16669export as_nl
16670# Printing a long string crashes Solaris 7 /usr/bin/printf.
16671as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16672as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16673as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16674# Prefer a ksh shell builtin over an external printf program on Solaris,
16675# but without wasting forks for bash or zsh.
16676if test -z "$BASH_VERSION$ZSH_VERSION" \
16677 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16678 as_echo='print -r --'
16679 as_echo_n='print -rn --'
16680elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16681 as_echo='printf %s\n'
16682 as_echo_n='printf %s'
16683else
16684 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16685 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16686 as_echo_n='/usr/ucb/echo -n'
16687 else
16688 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16689 as_echo_n_body='eval
16690 arg=$1;
16691 case $arg in #(
16692 *"$as_nl"*)
16693 expr "X$arg" : "X\\(.*\\)$as_nl";
16694 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16695 esac;
16696 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16697 '
16698 export as_echo_n_body
16699 as_echo_n='sh -c $as_echo_n_body as_echo'
16700 fi
16701 export as_echo_body
16702 as_echo='sh -c $as_echo_body as_echo'
16703fi
16704
16705# The user is always right.
16706if test "${PATH_SEPARATOR+set}" != set; then
16707 PATH_SEPARATOR=:
16708 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16709 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16710 PATH_SEPARATOR=';'
16711 }
bec39cab
AC
16712fi
16713
16714
81ecdfbb
RW
16715# IFS
16716# We need space, tab and new line, in precisely that order. Quoting is
16717# there to prevent editors from complaining about space-tab.
16718# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16719# splitting by setting IFS to empty value.)
16720IFS=" "" $as_nl"
16721
16722# Find who we are. Look in the path if we contain no directory separator.
16723case $0 in #((
16724 *[\\/]* ) as_myself=$0 ;;
16725 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16726for as_dir in $PATH
16727do
16728 IFS=$as_save_IFS
16729 test -z "$as_dir" && as_dir=.
16730 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16731 done
16732IFS=$as_save_IFS
16733
16734 ;;
16735esac
16736# We did not find ourselves, most probably we were run as `sh COMMAND'
16737# in which case we are not to be found in the path.
16738if test "x$as_myself" = x; then
16739 as_myself=$0
16740fi
16741if test ! -f "$as_myself"; then
16742 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16743 exit 1
16744fi
16745
16746# Unset variables that we do not need and which cause bugs (e.g. in
16747# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16748# suppresses any "Segmentation fault" message there. '((' could
16749# trigger a bug in pdksh 5.2.14.
16750for as_var in BASH_ENV ENV MAIL MAILPATH
16751do eval test x\${$as_var+set} = xset \
16752 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16753done
bec39cab
AC
16754PS1='$ '
16755PS2='> '
16756PS4='+ '
16757
16758# NLS nuisances.
81ecdfbb
RW
16759LC_ALL=C
16760export LC_ALL
16761LANGUAGE=C
16762export LANGUAGE
16763
16764# CDPATH.
16765(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16766
16767
16768# as_fn_error ERROR [LINENO LOG_FD]
16769# ---------------------------------
16770# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16771# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16772# script with status $?, using 1 if that was 0.
16773as_fn_error ()
16774{
16775 as_status=$?; test $as_status -eq 0 && as_status=1
16776 if test "$3"; then
16777 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16778 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
16779 fi
16780 $as_echo "$as_me: error: $1" >&2
16781 as_fn_exit $as_status
16782} # as_fn_error
16783
16784
16785# as_fn_set_status STATUS
16786# -----------------------
16787# Set $? to STATUS, without forking.
16788as_fn_set_status ()
16789{
16790 return $1
16791} # as_fn_set_status
16792
16793# as_fn_exit STATUS
16794# -----------------
16795# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16796as_fn_exit ()
16797{
16798 set +e
16799 as_fn_set_status $1
16800 exit $1
16801} # as_fn_exit
16802
16803# as_fn_unset VAR
16804# ---------------
16805# Portably unset VAR.
16806as_fn_unset ()
16807{
16808 { eval $1=; unset $1;}
16809}
16810as_unset=as_fn_unset
16811# as_fn_append VAR VALUE
16812# ----------------------
16813# Append the text in VALUE to the end of the definition contained in VAR. Take
16814# advantage of any shell optimizations that allow amortized linear growth over
16815# repeated appends, instead of the typical quadratic growth present in naive
16816# implementations.
16817if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16818 eval 'as_fn_append ()
16819 {
16820 eval $1+=\$2
16821 }'
16822else
16823 as_fn_append ()
16824 {
16825 eval $1=\$$1\$2
16826 }
16827fi # as_fn_append
16828
16829# as_fn_arith ARG...
16830# ------------------
16831# Perform arithmetic evaluation on the ARGs, and store the result in the
16832# global $as_val. Take advantage of shells that can avoid forks. The arguments
16833# must be portable across $(()) and expr.
16834if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16835 eval 'as_fn_arith ()
16836 {
16837 as_val=$(( $* ))
16838 }'
16839else
16840 as_fn_arith ()
16841 {
16842 as_val=`expr "$@" || test $? -eq 1`
16843 }
16844fi # as_fn_arith
bec39cab 16845
81ecdfbb
RW
16846
16847if expr a : '\(a\)' >/dev/null 2>&1 &&
16848 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
16849 as_expr=expr
16850else
16851 as_expr=false
16852fi
16853
81ecdfbb 16854if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
16855 as_basename=basename
16856else
16857 as_basename=false
16858fi
16859
81ecdfbb
RW
16860if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16861 as_dirname=dirname
16862else
16863 as_dirname=false
16864fi
bec39cab 16865
81ecdfbb 16866as_me=`$as_basename -- "$0" ||
bec39cab
AC
16867$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16868 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
16869 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16870$as_echo X/"$0" |
16871 sed '/^.*\/\([^/][^/]*\)\/*$/{
16872 s//\1/
16873 q
16874 }
16875 /^X\/\(\/\/\)$/{
16876 s//\1/
16877 q
16878 }
16879 /^X\/\(\/\).*/{
16880 s//\1/
16881 q
16882 }
16883 s/.*/./; q'`
b4e70030 16884
b4e70030
JB
16885# Avoid depending upon Character Ranges.
16886as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16887as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16888as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16889as_cr_digits='0123456789'
16890as_cr_alnum=$as_cr_Letters$as_cr_digits
16891
81ecdfbb
RW
16892ECHO_C= ECHO_N= ECHO_T=
16893case `echo -n x` in #(((((
16894-n*)
16895 case `echo 'xy\c'` in
16896 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16897 xy) ECHO_C='\c';;
16898 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16899 ECHO_T=' ';;
16900 esac;;
16901*)
16902 ECHO_N='-n';;
bec39cab
AC
16903esac
16904
81ecdfbb
RW
16905rm -f conf$$ conf$$.exe conf$$.file
16906if test -d conf$$.dir; then
16907 rm -f conf$$.dir/conf$$.file
bec39cab 16908else
81ecdfbb
RW
16909 rm -f conf$$.dir
16910 mkdir conf$$.dir 2>/dev/null
bec39cab 16911fi
81ecdfbb
RW
16912if (echo >conf$$.file) 2>/dev/null; then
16913 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 16914 as_ln_s='ln -s'
81ecdfbb
RW
16915 # ... but there are two gotchas:
16916 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16917 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16918 # In both cases, we have to default to `cp -p'.
16919 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16920 as_ln_s='cp -p'
16921 elif ln conf$$.file conf$$ 2>/dev/null; then
16922 as_ln_s=ln
16923 else
16924 as_ln_s='cp -p'
b4e70030 16925 fi
bec39cab
AC
16926else
16927 as_ln_s='cp -p'
16928fi
81ecdfbb
RW
16929rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16930rmdir conf$$.dir 2>/dev/null
16931
16932
16933# as_fn_mkdir_p
16934# -------------
16935# Create "$as_dir" as a directory, including parents if necessary.
16936as_fn_mkdir_p ()
16937{
16938
16939 case $as_dir in #(
16940 -*) as_dir=./$as_dir;;
16941 esac
16942 test -d "$as_dir" || eval $as_mkdir_p || {
16943 as_dirs=
16944 while :; do
16945 case $as_dir in #(
16946 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16947 *) as_qdir=$as_dir;;
16948 esac
16949 as_dirs="'$as_qdir' $as_dirs"
16950 as_dir=`$as_dirname -- "$as_dir" ||
16951$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16952 X"$as_dir" : 'X\(//\)[^/]' \| \
16953 X"$as_dir" : 'X\(//\)$' \| \
16954 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16955$as_echo X"$as_dir" |
16956 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16957 s//\1/
16958 q
16959 }
16960 /^X\(\/\/\)[^/].*/{
16961 s//\1/
16962 q
16963 }
16964 /^X\(\/\/\)$/{
16965 s//\1/
16966 q
16967 }
16968 /^X\(\/\).*/{
16969 s//\1/
16970 q
16971 }
16972 s/.*/./; q'`
16973 test -d "$as_dir" && break
16974 done
16975 test -z "$as_dirs" || eval "mkdir $as_dirs"
16976 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
16977
bec39cab 16978
81ecdfbb 16979} # as_fn_mkdir_p
bec39cab 16980if mkdir -p . 2>/dev/null; then
81ecdfbb 16981 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
16982else
16983 test -d ./-p && rmdir ./-p
16984 as_mkdir_p=false
16985fi
16986
81ecdfbb
RW
16987if test -x / >/dev/null 2>&1; then
16988 as_test_x='test -x'
16989else
16990 if ls -dL / >/dev/null 2>&1; then
16991 as_ls_L_option=L
16992 else
16993 as_ls_L_option=
16994 fi
16995 as_test_x='
16996 eval sh -c '\''
16997 if test -d "$1"; then
16998 test -d "$1/.";
16999 else
17000 case $1 in #(
17001 -*)set "./$1";;
17002 esac;
17003 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17004 ???[sx]*):;;*)false;;esac;fi
17005 '\'' sh
17006 '
17007fi
17008as_executable_p=$as_test_x
bec39cab
AC
17009
17010# Sed expression to map a string onto a valid CPP name.
17011as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17012
17013# Sed expression to map a string onto a valid variable name.
17014as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17015
17016
bec39cab 17017exec 6>&1
81ecdfbb
RW
17018## ----------------------------------- ##
17019## Main body of $CONFIG_STATUS script. ##
17020## ----------------------------------- ##
17021_ASEOF
17022test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17023
17024cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17025# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17026# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17027# values after options handling.
17028ac_log="
bec39cab 17029This file was extended by $as_me, which was
81ecdfbb 17030generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17031
17032 CONFIG_FILES = $CONFIG_FILES
17033 CONFIG_HEADERS = $CONFIG_HEADERS
17034 CONFIG_LINKS = $CONFIG_LINKS
17035 CONFIG_COMMANDS = $CONFIG_COMMANDS
17036 $ $0 $@
17037
81ecdfbb
RW
17038on `(hostname || uname -n) 2>/dev/null | sed 1q`
17039"
17040
bec39cab
AC
17041_ACEOF
17042
81ecdfbb
RW
17043case $ac_config_files in *"
17044"*) set x $ac_config_files; shift; ac_config_files=$*;;
17045esac
234b45d4 17046
81ecdfbb
RW
17047case $ac_config_headers in *"
17048"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17049esac
b4e70030 17050
b4e70030 17051
81ecdfbb
RW
17052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17053# Files that config.status was made for.
17054config_files="$ac_config_files"
17055config_headers="$ac_config_headers"
17056config_links="$ac_config_links"
17057config_commands="$ac_config_commands"
234b45d4 17058
81ecdfbb 17059_ACEOF
b4e70030 17060
81ecdfbb 17061cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17062ac_cs_usage="\
81ecdfbb
RW
17063\`$as_me' instantiates files and other configuration actions
17064from templates according to the current configuration. Unless the files
17065and actions are specified as TAGs, all are instantiated by default.
234b45d4 17066
81ecdfbb 17067Usage: $0 [OPTION]... [TAG]...
234b45d4 17068
bec39cab 17069 -h, --help print this help, then exit
81ecdfbb
RW
17070 -V, --version print version number and configuration settings, then exit
17071 -q, --quiet, --silent
17072 do not print progress messages
bec39cab
AC
17073 -d, --debug don't remove temporary files
17074 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
17075 --file=FILE[:TEMPLATE]
17076 instantiate the configuration file FILE
17077 --header=FILE[:TEMPLATE]
17078 instantiate the configuration header FILE
234b45d4 17079
bec39cab
AC
17080Configuration files:
17081$config_files
234b45d4 17082
bec39cab
AC
17083Configuration headers:
17084$config_headers
234b45d4 17085
bec39cab
AC
17086Configuration links:
17087$config_links
234b45d4 17088
bec39cab
AC
17089Configuration commands:
17090$config_commands
17091
81ecdfbb 17092Report bugs to the package provider."
b4e70030 17093
81ecdfbb
RW
17094_ACEOF
17095cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
17096ac_cs_version="\\
17097config.status
81ecdfbb
RW
17098configured by $0, generated by GNU Autoconf 2.64,
17099 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 17100
81ecdfbb 17101Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
17102This config.status script is free software; the Free Software Foundation
17103gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
17104
17105ac_pwd='$ac_pwd'
17106srcdir='$srcdir'
17107INSTALL='$INSTALL'
81ecdfbb
RW
17108AWK='$AWK'
17109test -n "\$AWK" || AWK=awk
bec39cab
AC
17110_ACEOF
17111
81ecdfbb
RW
17112cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17113# The default lists apply if the user does not specify any file.
bec39cab
AC
17114ac_need_defaults=:
17115while test $# != 0
17116do
17117 case $1 in
17118 --*=*)
81ecdfbb
RW
17119 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17120 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 17121 ac_shift=:
c906108c 17122 ;;
81ecdfbb 17123 *)
bec39cab
AC
17124 ac_option=$1
17125 ac_optarg=$2
17126 ac_shift=shift
c906108c 17127 ;;
bec39cab 17128 esac
c906108c 17129
bec39cab
AC
17130 case $ac_option in
17131 # Handling of the options.
bec39cab
AC
17132 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17133 ac_cs_recheck=: ;;
81ecdfbb
RW
17134 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17135 $as_echo "$ac_cs_version"; exit ;;
17136 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
17137 debug=: ;;
17138 --file | --fil | --fi | --f )
17139 $ac_shift
81ecdfbb
RW
17140 case $ac_optarg in
17141 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17142 esac
17143 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
17144 ac_need_defaults=false;;
17145 --header | --heade | --head | --hea )
17146 $ac_shift
81ecdfbb
RW
17147 case $ac_optarg in
17148 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17149 esac
17150 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 17151 ac_need_defaults=false;;
81ecdfbb
RW
17152 --he | --h)
17153 # Conflict between --help and --header
17154 as_fn_error "ambiguous option: \`$1'
17155Try \`$0 --help' for more information.";;
17156 --help | --hel | -h )
17157 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
17158 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17159 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17160 ac_cs_silent=: ;;
c906108c 17161
bec39cab 17162 # This is an error.
81ecdfbb
RW
17163 -*) as_fn_error "unrecognized option: \`$1'
17164Try \`$0 --help' for more information." ;;
c906108c 17165
81ecdfbb
RW
17166 *) as_fn_append ac_config_targets " $1"
17167 ac_need_defaults=false ;;
c906108c 17168
bec39cab
AC
17169 esac
17170 shift
17171done
c906108c 17172
bec39cab 17173ac_configure_extra_args=
c906108c 17174
bec39cab
AC
17175if $ac_cs_silent; then
17176 exec 6>/dev/null
17177 ac_configure_extra_args="$ac_configure_extra_args --silent"
17178fi
c906108c 17179
bec39cab 17180_ACEOF
81ecdfbb 17181cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 17182if \$ac_cs_recheck; then
81ecdfbb
RW
17183 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17184 shift
17185 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17186 CONFIG_SHELL='$SHELL'
17187 export CONFIG_SHELL
17188 exec "\$@"
bec39cab
AC
17189fi
17190
17191_ACEOF
81ecdfbb
RW
17192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17193exec 5>>config.log
17194{
17195 echo
17196 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17197## Running $as_me. ##
17198_ASBOX
17199 $as_echo "$ac_log"
17200} >&5
bec39cab 17201
81ecdfbb
RW
17202_ACEOF
17203cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 17204#
81ecdfbb 17205# INIT-COMMANDS
c906108c 17206#
a417dc56 17207ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 17208
bec39cab
AC
17209_ACEOF
17210
81ecdfbb 17211cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 17212
81ecdfbb 17213# Handling of arguments.
bec39cab 17214for ac_config_target in $ac_config_targets
c906108c 17215do
81ecdfbb
RW
17216 case $ac_config_target in
17217 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
17218 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 17219 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 17220 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 17221 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 17222 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 17223 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 17224 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 17225 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
17226
17227 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
17228 esac
17229done
17230
81ecdfbb 17231
bec39cab
AC
17232# If the user did not use the arguments to specify the items to instantiate,
17233# then the envvar interface is used. Set only those that are not.
17234# We use the long form for the default assignment because of an extremely
17235# bizarre bug on SunOS 4.1.3.
17236if $ac_need_defaults; then
17237 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17238 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17239 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17240 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17241fi
17242
b4e70030 17243# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 17244# simply because there is no reason against having it here, and in addition,
b4e70030 17245# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
17246# Hook for its removal unless debugging.
17247# Note that there is a small window in which the directory will not be cleaned:
17248# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
17249$debug ||
17250{
81ecdfbb
RW
17251 tmp=
17252 trap 'exit_status=$?
17253 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17254' 0
17255 trap 'as_fn_exit 1' 1 2 13 15
17256}
17257# Create a (secure) tmp directory for tmp files.
17258
17259{
17260 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17261 test -n "$tmp" && test -d "$tmp"
17262} ||
17263{
17264 tmp=./conf$$-$RANDOM
17265 (umask 077 && mkdir "$tmp")
17266} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
17267
17268# Set up the scripts for CONFIG_FILES section.
17269# No need to generate them if there are no CONFIG_FILES.
17270# This happens for instance with `./config.status config.h'.
17271if test -n "$CONFIG_FILES"; then
17272
17273if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17274 ac_cs_awk_getline=:
17275 ac_cs_awk_pipe_init=
17276 ac_cs_awk_read_file='
17277 while ((getline aline < (F[key])) > 0)
17278 print(aline)
17279 close(F[key])'
17280 ac_cs_awk_pipe_fini=
17281else
17282 ac_cs_awk_getline=false
17283 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17284 ac_cs_awk_read_file='
17285 print "|#_!!_#|"
17286 print "cat " F[key] " &&"
17287 '$ac_cs_awk_pipe_init
17288 # The final `:' finishes the AND list.
17289 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17290fi
17291ac_cr=`echo X | tr X '\015'`
17292# On cygwin, bash can eat \r inside `` if the user requested igncr.
17293# But we know of no other shell where ac_cr would be empty at this
17294# point, so we can use a bashism as a fallback.
17295if test "x$ac_cr" = x; then
17296 eval ac_cr=\$\'\\r\'
17297fi
17298ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17299if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17300 ac_cs_awk_cr='\r'
17301else
17302 ac_cs_awk_cr=$ac_cr
17303fi
17304
17305echo 'BEGIN {' >"$tmp/subs1.awk" &&
17306_ACEOF
17307
17308# Create commands to substitute file output variables.
17309{
17310 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17311 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
17312 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17313 echo "_ACAWK" &&
17314 echo "_ACEOF"
17315} >conf$$files.sh &&
17316. ./conf$$files.sh ||
17317 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17318rm -f conf$$files.sh
17319
17320{
17321 echo "cat >conf$$subs.awk <<_ACEOF" &&
17322 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17323 echo "_ACEOF"
17324} >conf$$subs.sh ||
17325 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17326ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
17327ac_delim='%!_!# '
17328for ac_last_try in false false false false false :; do
17329 . ./conf$$subs.sh ||
17330 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17331
17332 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17333 if test $ac_delim_n = $ac_delim_num; then
17334 break
17335 elif $ac_last_try; then
17336 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
17337 else
17338 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17339 fi
17340done
17341rm -f conf$$subs.sh
17342
17343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17344cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
17345_ACEOF
17346sed -n '
17347h
17348s/^/S["/; s/!.*/"]=/
17349p
17350g
17351s/^[^!]*!//
17352:repl
17353t repl
17354s/'"$ac_delim"'$//
17355t delim
17356:nl
17357h
17358s/\(.\{148\}\).*/\1/
17359t more1
17360s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17361p
17362n
17363b repl
17364:more1
17365s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17366p
17367g
17368s/.\{148\}//
17369t nl
17370:delim
17371h
17372s/\(.\{148\}\).*/\1/
17373t more2
17374s/["\\]/\\&/g; s/^/"/; s/$/"/
17375p
17376b
17377:more2
17378s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17379p
17380g
17381s/.\{148\}//
17382t delim
17383' <conf$$subs.awk | sed '
17384/^[^""]/{
17385 N
17386 s/\n//
17387}
17388' >>$CONFIG_STATUS || ac_write_fail=1
17389rm -f conf$$subs.awk
17390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17391_ACAWK
17392cat >>"\$tmp/subs1.awk" <<_ACAWK &&
17393 for (key in S) S_is_set[key] = 1
17394 FS = "\a"
17395 \$ac_cs_awk_pipe_init
17396}
17397{
17398 line = $ 0
17399 nfields = split(line, field, "@")
17400 substed = 0
17401 len = length(field[1])
17402 for (i = 2; i < nfields; i++) {
17403 key = field[i]
17404 keylen = length(key)
17405 if (S_is_set[key]) {
17406 value = S[key]
17407 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17408 len += length(value) + length(field[++i])
17409 substed = 1
17410 } else
17411 len += 1 + keylen
17412 }
17413 if (nfields == 3 && !substed) {
17414 key = field[2]
17415 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
17416 \$ac_cs_awk_read_file
17417 next
17418 }
17419 }
17420 print line
b4e70030 17421}
81ecdfbb
RW
17422\$ac_cs_awk_pipe_fini
17423_ACAWK
17424_ACEOF
17425cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17426if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17427 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17428else
17429 cat
17430fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
17431 || as_fn_error "could not setup config files machinery" "$LINENO" 5
17432_ACEOF
17433
17434# VPATH may cause trouble with some makes, so we remove $(srcdir),
17435# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17436# trailing colons and then remove the whole line if VPATH becomes empty
17437# (actually we leave an empty line to preserve line numbers).
17438if test "x$srcdir" = x.; then
17439 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17440s/:*\$(srcdir):*/:/
17441s/:*\${srcdir}:*/:/
17442s/:*@srcdir@:*/:/
17443s/^\([^=]*=[ ]*\):*/\1/
17444s/:*$//
17445s/^[^=]*=[ ]*$//
17446}'
17447fi
17448
17449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17450fi # test -n "$CONFIG_FILES"
17451
17452# Set up the scripts for CONFIG_HEADERS section.
17453# No need to generate them if there are no CONFIG_HEADERS.
17454# This happens for instance with `./config.status Makefile'.
17455if test -n "$CONFIG_HEADERS"; then
17456cat >"$tmp/defines.awk" <<\_ACAWK ||
17457BEGIN {
17458_ACEOF
17459
17460# Transform confdefs.h into an awk script `defines.awk', embedded as
17461# here-document in config.status, that substitutes the proper values into
17462# config.h.in to produce config.h.
4e8d927d 17463
81ecdfbb
RW
17464# Create a delimiter string that does not exist in confdefs.h, to ease
17465# handling of long lines.
17466ac_delim='%!_!# '
17467for ac_last_try in false false :; do
17468 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
17469 if test -z "$ac_t"; then
17470 break
17471 elif $ac_last_try; then
17472 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
17473 else
17474 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17475 fi
17476done
4e8d927d 17477
81ecdfbb
RW
17478# For the awk script, D is an array of macro values keyed by name,
17479# likewise P contains macro parameters if any. Preserve backslash
17480# newline sequences.
17481
17482ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17483sed -n '
17484s/.\{148\}/&'"$ac_delim"'/g
17485t rset
17486:rset
17487s/^[ ]*#[ ]*define[ ][ ]*/ /
17488t def
17489d
17490:def
17491s/\\$//
17492t bsnl
17493s/["\\]/\\&/g
17494s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17495D["\1"]=" \3"/p
17496s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17497d
17498:bsnl
17499s/["\\]/\\&/g
17500s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17501D["\1"]=" \3\\\\\\n"\\/p
17502t cont
17503s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17504t cont
17505d
17506:cont
17507n
17508s/.\{148\}/&'"$ac_delim"'/g
17509t clear
17510:clear
17511s/\\$//
17512t bsnlc
17513s/["\\]/\\&/g; s/^/"/; s/$/"/p
17514d
17515:bsnlc
17516s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17517b cont
17518' <confdefs.h | sed '
17519s/'"$ac_delim"'/"\\\
17520"/g' >>$CONFIG_STATUS || ac_write_fail=1
17521
17522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17523 for (key in D) D_is_set[key] = 1
17524 FS = "\a"
17525}
17526/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17527 line = \$ 0
17528 split(line, arg, " ")
17529 if (arg[1] == "#") {
17530 defundef = arg[2]
17531 mac1 = arg[3]
17532 } else {
17533 defundef = substr(arg[1], 2)
17534 mac1 = arg[2]
17535 }
17536 split(mac1, mac2, "(") #)
17537 macro = mac2[1]
17538 prefix = substr(line, 1, index(line, defundef) - 1)
17539 if (D_is_set[macro]) {
17540 # Preserve the white space surrounding the "#".
17541 print prefix "define", macro P[macro] D[macro]
17542 next
17543 } else {
17544 # Replace #undef with comments. This is necessary, for example,
17545 # in the case of _POSIX_SOURCE, which is predefined and required
17546 # on some systems where configure will not decide to define it.
17547 if (defundef == "undef") {
17548 print "/*", prefix defundef, macro, "*/"
17549 next
17550 }
17551 }
b4e70030 17552}
81ecdfbb
RW
17553{ print }
17554_ACAWK
b4e70030 17555_ACEOF
81ecdfbb
RW
17556cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17557 as_fn_error "could not setup config headers machinery" "$LINENO" 5
17558fi # test -n "$CONFIG_HEADERS"
4e8d927d 17559
4e8d927d 17560
81ecdfbb
RW
17561eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17562shift
17563for ac_tag
17564do
17565 case $ac_tag in
17566 :[FHLC]) ac_mode=$ac_tag; continue;;
17567 esac
17568 case $ac_mode$ac_tag in
17569 :[FHL]*:*);;
17570 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
17571 :[FH]-) ac_tag=-:-;;
17572 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17573 esac
17574 ac_save_IFS=$IFS
17575 IFS=:
17576 set x $ac_tag
17577 IFS=$ac_save_IFS
17578 shift
17579 ac_file=$1
17580 shift
4e8d927d 17581
81ecdfbb
RW
17582 case $ac_mode in
17583 :L) ac_source=$1;;
17584 :[FH])
17585 ac_file_inputs=
17586 for ac_f
17587 do
17588 case $ac_f in
17589 -) ac_f="$tmp/stdin";;
17590 *) # Look for the file first in the build tree, then in the source tree
17591 # (if the path is not absolute). The absolute path cannot be DOS-style,
17592 # because $ac_f cannot contain `:'.
17593 test -f "$ac_f" ||
17594 case $ac_f in
17595 [\\/$]*) false;;
17596 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17597 esac ||
17598 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17599 esac
17600 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17601 as_fn_append ac_file_inputs " '$ac_f'"
17602 done
17603
17604 # Let's still pretend it is `configure' which instantiates (i.e., don't
17605 # use $as_me), people would be surprised to read:
17606 # /* config.h. Generated by config.status. */
17607 configure_input='Generated from '`
17608 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17609 `' by configure.'
17610 if test x"$ac_file" != x-; then
17611 configure_input="$ac_file. $configure_input"
17612 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17613$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 17614 fi
81ecdfbb
RW
17615 # Neutralize special characters interpreted by sed in replacement strings.
17616 case $configure_input in #(
17617 *\&* | *\|* | *\\* )
17618 ac_sed_conf_input=`$as_echo "$configure_input" |
17619 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17620 *) ac_sed_conf_input=$configure_input;;
17621 esac
4e8d927d 17622
81ecdfbb
RW
17623 case $ac_tag in
17624 *:-:* | *:-) cat >"$tmp/stdin" \
17625 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
17626 esac
17627 ;;
c906108c
SS
17628 esac
17629
81ecdfbb 17630 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
17631$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17632 X"$ac_file" : 'X\(//\)[^/]' \| \
17633 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
17634 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17635$as_echo X"$ac_file" |
17636 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17637 s//\1/
17638 q
17639 }
17640 /^X\(\/\/\)[^/].*/{
17641 s//\1/
17642 q
17643 }
17644 /^X\(\/\/\)$/{
17645 s//\1/
17646 q
17647 }
17648 /^X\(\/\).*/{
17649 s//\1/
17650 q
17651 }
17652 s/.*/./; q'`
17653 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17654 ac_builddir=.
17655
81ecdfbb
RW
17656case "$ac_dir" in
17657.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17658*)
17659 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17660 # A ".." for each directory in $ac_dir_suffix.
17661 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17662 case $ac_top_builddir_sub in
17663 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17664 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17665 esac ;;
17666esac
17667ac_abs_top_builddir=$ac_pwd
17668ac_abs_builddir=$ac_pwd$ac_dir_suffix
17669# for backward compatibility:
17670ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17671
17672case $srcdir in
81ecdfbb 17673 .) # We are building in place.
bec39cab 17674 ac_srcdir=.
81ecdfbb
RW
17675 ac_top_srcdir=$ac_top_builddir_sub
17676 ac_abs_top_srcdir=$ac_pwd ;;
17677 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17678 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17679 ac_top_srcdir=$srcdir
17680 ac_abs_top_srcdir=$srcdir ;;
17681 *) # Relative name.
17682 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17683 ac_top_srcdir=$ac_top_build_prefix$srcdir
17684 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 17685esac
81ecdfbb 17686ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 17687
c906108c 17688
81ecdfbb
RW
17689 case $ac_mode in
17690 :F)
17691 #
17692 # CONFIG_FILE
17693 #
c906108c 17694
bec39cab
AC
17695 case $INSTALL in
17696 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 17697 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 17698 esac
81ecdfbb 17699_ACEOF
121ce6e5 17700
81ecdfbb
RW
17701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17702# If the template does not know about datarootdir, expand it.
17703# FIXME: This hack should be removed a few years after 2.60.
17704ac_datarootdir_hack=; ac_datarootdir_seen=
17705ac_sed_dataroot='
17706/datarootdir/ {
17707 p
17708 q
17709}
17710/@datadir@/p
17711/@docdir@/p
17712/@infodir@/p
17713/@localedir@/p
17714/@mandir@/p'
17715case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17716*datarootdir*) ac_datarootdir_seen=yes;;
17717*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17719$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17720_ACEOF
17721cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17722 ac_datarootdir_hack='
17723 s&@datadir@&$datadir&g
17724 s&@docdir@&$docdir&g
17725 s&@infodir@&$infodir&g
17726 s&@localedir@&$localedir&g
17727 s&@mandir@&$mandir&g
17728 s&\\\${datarootdir}&$datarootdir&g' ;;
17729esac
4e8d927d 17730_ACEOF
81ecdfbb
RW
17731
17732# Neutralize VPATH when `$srcdir' = `.'.
17733# Shell code in configure.ac might set extrasub.
17734# FIXME: do we really want to maintain this feature?
17735cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17736ac_sed_extra="$ac_vpsub
bec39cab
AC
17737$extrasub
17738_ACEOF
81ecdfbb 17739cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
17740:t
17741/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
17742s|@configure_input@|$ac_sed_conf_input|;t t
17743s&@top_builddir@&$ac_top_builddir_sub&;t t
17744s&@top_build_prefix@&$ac_top_build_prefix&;t t
17745s&@srcdir@&$ac_srcdir&;t t
17746s&@abs_srcdir@&$ac_abs_srcdir&;t t
17747s&@top_srcdir@&$ac_top_srcdir&;t t
17748s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17749s&@builddir@&$ac_builddir&;t t
17750s&@abs_builddir@&$ac_abs_builddir&;t t
17751s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17752s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
17753$ac_datarootdir_hack
17754"
17755eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
17756if $ac_cs_awk_getline; then
17757 $AWK -f "$tmp/subs.awk"
17758else
17759 $AWK -f "$tmp/subs.awk" | $SHELL
17760fi >$tmp/out \
17761 || as_fn_error "could not create $ac_file" "$LINENO" 5
17762
17763test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17764 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
17765 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
17766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17767which seems to be undefined. Please make sure it is defined." >&5
17768$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17769which seems to be undefined. Please make sure it is defined." >&2;}
17770
17771 rm -f "$tmp/stdin"
bec39cab 17772 case $ac_file in
81ecdfbb
RW
17773 -) cat "$tmp/out" && rm -f "$tmp/out";;
17774 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
17775 esac \
17776 || as_fn_error "could not create $ac_file" "$LINENO" 5
17777 ;;
17778 :H)
17779 #
17780 # CONFIG_HEADER
17781 #
bec39cab 17782 if test x"$ac_file" != x-; then
81ecdfbb
RW
17783 {
17784 $as_echo "/* $configure_input */" \
17785 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
17786 } >"$tmp/config.h" \
17787 || as_fn_error "could not create $ac_file" "$LINENO" 5
17788 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
17789 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17790$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 17791 else
81ecdfbb
RW
17792 rm -f "$ac_file"
17793 mv "$tmp/config.h" "$ac_file" \
17794 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
17795 fi
17796 else
81ecdfbb
RW
17797 $as_echo "/* $configure_input */" \
17798 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
17799 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 17800 fi
81ecdfbb
RW
17801 ;;
17802 :L)
17803 #
17804 # CONFIG_LINK
17805 #
c906108c 17806
81ecdfbb
RW
17807 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17808 :
b4e70030 17809 else
81ecdfbb
RW
17810 # Prefer the file from the source tree if names are identical.
17811 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17812 ac_source=$srcdir/$ac_source
17813 fi
b4e70030 17814
81ecdfbb
RW
17815 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17816$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 17817
81ecdfbb
RW
17818 if test ! -r "$ac_source"; then
17819 as_fn_error "$ac_source: file not found" "$LINENO" 5
17820 fi
17821 rm -f "$ac_file"
bec39cab 17822
81ecdfbb
RW
17823 # Try a relative symlink, then a hard link, then a copy.
17824 case $srcdir in
17825 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17826 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17827 esac
17828 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17829 ln "$ac_source" "$ac_file" 2>/dev/null ||
17830 cp -p "$ac_source" "$ac_file" ||
17831 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17832 fi
17833 ;;
17834 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17835$as_echo "$as_me: executing $ac_file commands" >&6;}
17836 ;;
c906108c 17837 esac
b4e70030 17838
bec39cab 17839
81ecdfbb
RW
17840 case $ac_file$ac_mode in
17841 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 17842 "gcore":F) chmod +x gcore ;;
1e94266c
SM
17843 "Makefile":F)
17844case x$CONFIG_HEADERS in
17845xconfig.h:config.in)
17846echo > stamp-h ;;
17847esac
17848 ;;
17849 "gdb-gdb.gdb":F)
17850case x$CONFIG_HEADERS in
17851xconfig.h:config.in)
17852echo > stamp-h ;;
17853esac
17854 ;;
17855 "doc/Makefile":F)
17856case x$CONFIG_HEADERS in
17857xconfig.h:config.in)
17858echo > stamp-h ;;
17859esac
17860 ;;
17861 "data-directory/Makefile":F)
c906108c
SS
17862case x$CONFIG_HEADERS in
17863xconfig.h:config.in)
17864echo > stamp-h ;;
17865esac
bec39cab 17866 ;;
81ecdfbb 17867
bec39cab 17868 esac
81ecdfbb 17869done # for ac_tag
c906108c 17870
bec39cab 17871
81ecdfbb 17872as_fn_exit 0
bec39cab 17873_ACEOF
bec39cab
AC
17874ac_clean_files=$ac_clean_files_save
17875
81ecdfbb
RW
17876test $ac_write_fail = 0 ||
17877 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
17878
bec39cab
AC
17879
17880# configure is writing to config.log, and then calls config.status.
17881# config.status does its own redirection, appending to config.log.
17882# Unfortunately, on DOS this fails, as config.log is still kept open
17883# by configure, so config.status won't be able to write to it; its
17884# output is simply discarded. So we exec the FD to /dev/null,
17885# effectively closing config.log, so it can be properly (re)opened and
17886# appended to by config.status. When coming back to configure, we
17887# need to make the FD available again.
17888if test "$no_create" != yes; then
17889 ac_cs_success=:
17890 ac_config_status_args=
17891 test "$silent" = yes &&
17892 ac_config_status_args="$ac_config_status_args --quiet"
17893 exec 5>/dev/null
17894 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17895 exec 5>>config.log
17896 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17897 # would make configure fail if this is the last instruction.
81ecdfbb 17898 $ac_cs_success || as_fn_exit $?
bec39cab 17899fi
c906108c 17900
bec39cab 17901#
81ecdfbb 17902# CONFIG_SUBDIRS section.
bec39cab 17903#
c906108c
SS
17904if test "$no_recursion" != yes; then
17905
81ecdfbb
RW
17906 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
17907 # so they do not pile up.
c906108c
SS
17908 ac_sub_configure_args=
17909 ac_prev=
fdc59709
PB
17910 eval "set x $ac_configure_args"
17911 shift
17912 for ac_arg
17913 do
c906108c
SS
17914 if test -n "$ac_prev"; then
17915 ac_prev=
17916 continue
17917 fi
bec39cab 17918 case $ac_arg in
c906108c
SS
17919 -cache-file | --cache-file | --cache-fil | --cache-fi \
17920 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17921 ac_prev=cache_file ;;
17922 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
17923 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17924 | --c=*)
17925 ;;
17926 --config-cache | -C)
c906108c
SS
17927 ;;
17928 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17929 ac_prev=srcdir ;;
17930 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17931 ;;
bec39cab
AC
17932 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17933 ac_prev=prefix ;;
17934 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17935 ;;
81ecdfbb
RW
17936 --disable-option-checking)
17937 ;;
fdc59709
PB
17938 *)
17939 case $ac_arg in
81ecdfbb 17940 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17941 esac
81ecdfbb 17942 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
17943 esac
17944 done
17945
bec39cab
AC
17946 # Always prepend --prefix to ensure using the same prefix
17947 # in subdir configurations.
fdc59709
PB
17948 ac_arg="--prefix=$prefix"
17949 case $ac_arg in
81ecdfbb 17950 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 17951 esac
81ecdfbb
RW
17952 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
17953
17954 # Pass --silent
17955 if test "$silent" = yes; then
17956 ac_sub_configure_args="--silent $ac_sub_configure_args"
17957 fi
17958
17959 # Always prepend --disable-option-checking to silence warnings, since
17960 # different subdirs can have different --enable and --with options.
17961 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 17962
b4e70030 17963 ac_popdir=`pwd`
bec39cab 17964 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
17965
17966 # Do not complain, so a configure script can configure whichever
17967 # parts of a large source tree are present.
fdc59709 17968 test -d "$srcdir/$ac_dir" || continue
c906108c 17969
81ecdfbb
RW
17970 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
17971 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
17972 $as_echo "$ac_msg" >&6
17973 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
17974 ac_builddir=.
17975
81ecdfbb
RW
17976case "$ac_dir" in
17977.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17978*)
17979 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17980 # A ".." for each directory in $ac_dir_suffix.
17981 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17982 case $ac_top_builddir_sub in
17983 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17984 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17985 esac ;;
17986esac
17987ac_abs_top_builddir=$ac_pwd
17988ac_abs_builddir=$ac_pwd$ac_dir_suffix
17989# for backward compatibility:
17990ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
17991
17992case $srcdir in
81ecdfbb 17993 .) # We are building in place.
bec39cab 17994 ac_srcdir=.
81ecdfbb
RW
17995 ac_top_srcdir=$ac_top_builddir_sub
17996 ac_abs_top_srcdir=$ac_pwd ;;
17997 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 17998 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
17999 ac_top_srcdir=$srcdir
18000 ac_abs_top_srcdir=$srcdir ;;
18001 *) # Relative name.
18002 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18003 ac_top_srcdir=$ac_top_build_prefix$srcdir
18004 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18005esac
81ecdfbb 18006ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18007
c906108c 18008
fdc59709 18009 cd "$ac_dir"
c906108c
SS
18010
18011 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18012 if test -f "$ac_srcdir/configure.gnu"; then
18013 ac_sub_configure=$ac_srcdir/configure.gnu
18014 elif test -f "$ac_srcdir/configure"; then
18015 ac_sub_configure=$ac_srcdir/configure
18016 elif test -f "$ac_srcdir/configure.in"; then
18017 # This should be Cygnus configure.
18018 ac_sub_configure=$ac_aux_dir/configure
c906108c 18019 else
81ecdfbb
RW
18020 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18021$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18022 ac_sub_configure=
18023 fi
18024
18025 # The recursion is here.
18026 if test -n "$ac_sub_configure"; then
c906108c 18027 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18028 case $cache_file in
18029 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18030 *) # Relative name.
18031 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18032 esac
c906108c 18033
81ecdfbb
RW
18034 { $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
18035$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18036 # The eval makes quoting arguments work.
fdc59709
PB
18037 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18038 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18039 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18040 fi
18041
fdc59709 18042 cd "$ac_popdir"
c906108c
SS
18043 done
18044fi
81ecdfbb
RW
18045if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18047$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18048fi
c906108c 18049
This page took 3.07572 seconds and 4 git commands to generate.