]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
gdb: Disable -Werror for -Wmaybe-uninitialized
[thirdparty/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
e3487908 596XSLTPROC
81ecdfbb 597GDB_NM_FILE
393fd4c3
YQ
598LTLIBBABELTRACE
599LIBBABELTRACE
600HAVE_LIBBABELTRACE
81ecdfbb
RW
601frags
602target_subdir
603CONFIG_UNINSTALL
604CONFIG_INSTALL
605CONFIG_CLEAN
606CONFIG_ALL
607CONFIG_SRCS
608CONFIG_DEPS
609CONFIG_OBS
610PROFILE_CFLAGS
611ENABLE_CFLAGS
612SIM_OBS
613SIM
614XMKMF
615GDBTK_SRC_DIR
616GDBTK_CFLAGS
617GDBTKLIBS
618X_LIBS
619X_LDFLAGS
620X_CFLAGS
621TK_XINCLUDES
622TK_DEPS
623TK_LIBRARY
624TK_INCLUDE
625TK_STUB_LIB_SPEC
626TK_STUB_LIB_FLAG
627TK_STUB_LIB_FILE
628TK_LIB_SPEC
629TK_LIB_FLAG
630TK_LIB_FILE
631TK_SRC_DIR
632TK_BIN_DIR
633TK_VERSION
634TCL_DEPS
635TCL_LIBRARY
636TCL_INCLUDE
637TCL_STUB_LIB_SPEC
638TCL_STUB_LIB_FLAG
639TCL_STUB_LIB_FILE
640TCL_LIB_SPEC
641TCL_LIB_FLAG
642TCL_LIB_FILE
643TCL_SRC_DIR
644TCL_BIN_DIR
645TCL_PATCH_LEVEL
646TCL_VERSION
647WIN32LDAPP
648GUI_CFLAGS_X
649LIBGUI
608e2dbb
TT
650LTLIBLZMA
651LIBLZMA
652HAVE_LIBLZMA
81ecdfbb
RW
653WIN32LIBS
654SER_HARDWIRE
655WERROR_CFLAGS
656WARN_CFLAGS
657SYSTEM_GDBINIT
81ecdfbb
RW
658TARGET_SYSTEM_ROOT
659CONFIG_LDFLAGS
f6528abd 660RDYNAMIC
81ecdfbb 661ALLOCA
58bfce93
MM
662LTLIBIPT
663LIBIPT
664HAVE_LIBIPT
4df42755
DE
665HAVE_GUILE_FALSE
666HAVE_GUILE_TRUE
ed3ef339
DE
667GUILE_LIBS
668GUILE_CPPFLAGS
e76c5d17
DE
669GUILD_TARGET_FLAG
670GUILD
ed3ef339 671pkg_config_prog_path
4df42755
DE
672HAVE_PYTHON_FALSE
673HAVE_PYTHON_TRUE
ac534cba
JB
674PYTHON_LIBS
675PYTHON_CPPFLAGS
81ecdfbb 676PYTHON_CFLAGS
ec685c5e 677python_prog_path
81ecdfbb
RW
678LTLIBEXPAT
679LIBEXPAT
680HAVE_LIBEXPAT
b8e0a31c 681JIT_READER_DIR
f997c383 682TARGET_PTR
39037522 683READLINE_TEXI_INCFLAG
81ecdfbb
RW
684READLINE_CFLAGS
685READLINE_DEPS
686READLINE
016a3251
DD
687LTLIBICONV
688LIBICONV
711a72d3
L
689zlibinc
690zlibdir
81ecdfbb
RW
691MIG
692WINDRES
693DLLTOOL
c971b7fa 694AR
81ecdfbb
RW
695YFLAGS
696YACC
c971b7fa 697RANLIB
81ecdfbb 698LN_S
c971b7fa
PA
699INSTALL_DATA
700INSTALL_SCRIPT
701INSTALL_PROGRAM
702AWK
81ecdfbb
RW
703REPORT_BUGS_TEXI
704REPORT_BUGS_TO
705PKGVERSION
b292c783 706HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
707TARGET_OBS
708subdirs
709GDB_DATADIR
710DEBUGDIR
5048e516
JK
711MAKEINFO_EXTRA_FLAGS
712MAKEINFOFLAGS
713MAKEINFO
81ecdfbb
RW
714PACKAGE
715GNULIB_STDINT_H
81ecdfbb
RW
716CATOBJEXT
717GENCAT
718INSTOBJEXT
719DATADIRNAME
720CATALOGS
721POSUB
722GMSGFMT
723XGETTEXT
724INCINTL
725LIBINTL_DEP
726LIBINTL
727USE_NLS
81ecdfbb
RW
728CCDEPMODE
729DEPDIR
730am__leading_dot
0bcda685
PA
731CXX_DIALECT
732HAVE_CXX11
4869db5e
RM
733INSTALL_STRIP_PROGRAM
734STRIP
735install_sh
81ecdfbb
RW
736target_os
737target_vendor
738target_cpu
739target
740host_os
741host_vendor
742host_cpu
743host
744build_os
745build_vendor
746build_cpu
747build
c971b7fa
PA
748EGREP
749GREP
750CPP
3bc3d82a
PA
751ac_ct_CXX
752CXXFLAGS
753CXX
81ecdfbb
RW
754OBJEXT
755EXEEXT
756ac_ct_CC
757CPPFLAGS
758LDFLAGS
759CFLAGS
760CC
761MAINT
762MAINTAINER_MODE_FALSE
763MAINTAINER_MODE_TRUE
764target_alias
765host_alias
766build_alias
767LIBS
768ECHO_T
769ECHO_N
770ECHO_C
771DEFS
772mandir
773localedir
774libdir
775psdir
776pdfdir
777dvidir
778htmldir
779infodir
780docdir
781oldincludedir
782includedir
783localstatedir
784sharedstatedir
785sysconfdir
786datadir
787datarootdir
788libexecdir
789sbindir
790bindir
791program_transform_name
792prefix
793exec_prefix
794PACKAGE_URL
795PACKAGE_BUGREPORT
796PACKAGE_STRING
797PACKAGE_VERSION
798PACKAGE_TARNAME
799PACKAGE_NAME
800PATH_SEPARATOR
801SHELL'
a4ce5b0d 802ac_subst_files='host_makefile_frag'
81ecdfbb
RW
803ac_user_opts='
804enable_option_checking
805enable_maintainer_mode
da2f07f1
JK
806enable_plugins
807enable_largefile
81ecdfbb
RW
808with_separate_debug_dir
809with_gdb_datadir
810with_relocated_sources
7349ff92 811with_auto_load_dir
bccbefd2 812with_auto_load_safe_path
81ecdfbb
RW
813enable_targets
814enable_64_bit_bfd
815enable_gdbcli
816enable_gdbmi
817enable_tui
818enable_gdbtk
05e7c244 819with_libunwind_ia64
81ecdfbb
RW
820with_curses
821enable_profiling
822with_pkgversion
823with_bugurl
711a72d3 824with_system_zlib
016a3251
DD
825with_gnu_ld
826enable_rpath
81ecdfbb 827with_libiconv_prefix
478aac75 828with_iconv_bin
81ecdfbb 829with_system_readline
b8e0a31c 830with_jit_reader_dir
81ecdfbb 831with_expat
81ecdfbb
RW
832with_libexpat_prefix
833with_python
ed3ef339 834with_guile
a8db4212 835enable_libmcheck
58bfce93
MM
836with_intel_pt
837with_libipt_prefix
81ecdfbb
RW
838with_included_regex
839with_sysroot
840with_system_gdbinit
841enable_werror
842enable_build_warnings
843enable_gdb_build_warnings
608e2dbb
TT
844with_lzma
845with_liblzma_prefix
81ecdfbb
RW
846with_tcl
847with_tk
848with_x
849enable_sim
850enable_multi_ice
496c0e1b 851enable_gdbserver
393fd4c3
YQ
852with_babeltrace
853with_libbabeltrace_prefix
81ecdfbb
RW
854'
855 ac_precious_vars='build_alias
856host_alias
857target_alias
858CC
859CFLAGS
860LDFLAGS
861LIBS
862CPPFLAGS
3bc3d82a
PA
863CXX
864CXXFLAGS
865CCC
81ecdfbb 866CPP
f06e05e0
JK
867MAKEINFO
868MAKEINFOFLAGS
81ecdfbb
RW
869YACC
870YFLAGS
871XMKMF'
5ae98d25 872ac_subdirs_all='testsuite
81ecdfbb
RW
873gdbtk
874multi-ice
875gdbserver'
c906108c
SS
876
877# Initialize some variables set by options.
bec39cab
AC
878ac_init_help=
879ac_init_version=false
81ecdfbb
RW
880ac_unrecognized_opts=
881ac_unrecognized_sep=
c906108c
SS
882# The variables have the same names as the options, with
883# dashes changed to underlines.
bec39cab 884cache_file=/dev/null
c906108c 885exec_prefix=NONE
c906108c 886no_create=
c906108c
SS
887no_recursion=
888prefix=NONE
889program_prefix=NONE
890program_suffix=NONE
891program_transform_name=s,x,x,
892silent=
893site=
894srcdir=
c906108c
SS
895verbose=
896x_includes=NONE
897x_libraries=NONE
bec39cab
AC
898
899# Installation directory options.
900# These are left unexpanded so users can "make install exec_prefix=/foo"
901# and all the variables that are supposed to be based on exec_prefix
902# by default will actually change.
903# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 904# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
905bindir='${exec_prefix}/bin'
906sbindir='${exec_prefix}/sbin'
907libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
908datarootdir='${prefix}/share'
909datadir='${datarootdir}'
c906108c
SS
910sysconfdir='${prefix}/etc'
911sharedstatedir='${prefix}/com'
912localstatedir='${prefix}/var'
c906108c
SS
913includedir='${prefix}/include'
914oldincludedir='/usr/include'
81ecdfbb
RW
915docdir='${datarootdir}/doc/${PACKAGE}'
916infodir='${datarootdir}/info'
917htmldir='${docdir}'
918dvidir='${docdir}'
919pdfdir='${docdir}'
920psdir='${docdir}'
921libdir='${exec_prefix}/lib'
922localedir='${datarootdir}/locale'
923mandir='${datarootdir}/man'
c906108c 924
c906108c 925ac_prev=
81ecdfbb 926ac_dashdash=
c906108c
SS
927for ac_option
928do
c906108c
SS
929 # If the previous option needs an argument, assign it.
930 if test -n "$ac_prev"; then
81ecdfbb 931 eval $ac_prev=\$ac_option
c906108c
SS
932 ac_prev=
933 continue
934 fi
935
81ecdfbb
RW
936 case $ac_option in
937 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
938 *) ac_optarg=yes ;;
939 esac
c906108c
SS
940
941 # Accept the important Cygnus configure options, so we can diagnose typos.
942
81ecdfbb
RW
943 case $ac_dashdash$ac_option in
944 --)
945 ac_dashdash=yes ;;
c906108c
SS
946
947 -bindir | --bindir | --bindi | --bind | --bin | --bi)
948 ac_prev=bindir ;;
949 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 950 bindir=$ac_optarg ;;
c906108c
SS
951
952 -build | --build | --buil | --bui | --bu)
bec39cab 953 ac_prev=build_alias ;;
c906108c 954 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 955 build_alias=$ac_optarg ;;
c906108c
SS
956
957 -cache-file | --cache-file | --cache-fil | --cache-fi \
958 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
959 ac_prev=cache_file ;;
960 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
961 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
962 cache_file=$ac_optarg ;;
963
964 --config-cache | -C)
965 cache_file=config.cache ;;
c906108c 966
81ecdfbb 967 -datadir | --datadir | --datadi | --datad)
c906108c 968 ac_prev=datadir ;;
81ecdfbb 969 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 970 datadir=$ac_optarg ;;
c906108c 971
81ecdfbb
RW
972 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
973 | --dataroo | --dataro | --datar)
974 ac_prev=datarootdir ;;
975 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
976 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
977 datarootdir=$ac_optarg ;;
978
c906108c 979 -disable-* | --disable-*)
81ecdfbb 980 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 981 # Reject names that are not valid shell variable names.
81ecdfbb
RW
982 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
983 as_fn_error "invalid feature name: $ac_useropt"
984 ac_useropt_orig=$ac_useropt
985 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986 case $ac_user_opts in
987 *"
988"enable_$ac_useropt"
989"*) ;;
990 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
991 ac_unrecognized_sep=', ';;
992 esac
993 eval enable_$ac_useropt=no ;;
994
995 -docdir | --docdir | --docdi | --doc | --do)
996 ac_prev=docdir ;;
997 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
998 docdir=$ac_optarg ;;
999
1000 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1001 ac_prev=dvidir ;;
1002 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1003 dvidir=$ac_optarg ;;
c906108c
SS
1004
1005 -enable-* | --enable-*)
81ecdfbb 1006 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1007 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1008 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1009 as_fn_error "invalid feature name: $ac_useropt"
1010 ac_useropt_orig=$ac_useropt
1011 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1012 case $ac_user_opts in
1013 *"
1014"enable_$ac_useropt"
1015"*) ;;
1016 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1017 ac_unrecognized_sep=', ';;
b4e70030 1018 esac
81ecdfbb 1019 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1020
1021 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1022 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1023 | --exec | --exe | --ex)
1024 ac_prev=exec_prefix ;;
1025 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1026 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1027 | --exec=* | --exe=* | --ex=*)
bec39cab 1028 exec_prefix=$ac_optarg ;;
c906108c
SS
1029
1030 -gas | --gas | --ga | --g)
1031 # Obsolete; use --with-gas.
1032 with_gas=yes ;;
1033
bec39cab
AC
1034 -help | --help | --hel | --he | -h)
1035 ac_init_help=long ;;
1036 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1037 ac_init_help=recursive ;;
1038 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1039 ac_init_help=short ;;
c906108c
SS
1040
1041 -host | --host | --hos | --ho)
bec39cab 1042 ac_prev=host_alias ;;
c906108c 1043 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1044 host_alias=$ac_optarg ;;
c906108c 1045
81ecdfbb
RW
1046 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1047 ac_prev=htmldir ;;
1048 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1049 | --ht=*)
1050 htmldir=$ac_optarg ;;
1051
c906108c
SS
1052 -includedir | --includedir | --includedi | --included | --include \
1053 | --includ | --inclu | --incl | --inc)
1054 ac_prev=includedir ;;
1055 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1056 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1057 includedir=$ac_optarg ;;
c906108c
SS
1058
1059 -infodir | --infodir | --infodi | --infod | --info | --inf)
1060 ac_prev=infodir ;;
1061 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1062 infodir=$ac_optarg ;;
c906108c
SS
1063
1064 -libdir | --libdir | --libdi | --libd)
1065 ac_prev=libdir ;;
1066 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1067 libdir=$ac_optarg ;;
c906108c
SS
1068
1069 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1070 | --libexe | --libex | --libe)
1071 ac_prev=libexecdir ;;
1072 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1073 | --libexe=* | --libex=* | --libe=*)
bec39cab 1074 libexecdir=$ac_optarg ;;
c906108c 1075
81ecdfbb
RW
1076 -localedir | --localedir | --localedi | --localed | --locale)
1077 ac_prev=localedir ;;
1078 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1079 localedir=$ac_optarg ;;
1080
c906108c 1081 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1082 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1083 ac_prev=localstatedir ;;
1084 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1085 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1086 localstatedir=$ac_optarg ;;
c906108c
SS
1087
1088 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1089 ac_prev=mandir ;;
1090 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1091 mandir=$ac_optarg ;;
c906108c
SS
1092
1093 -nfp | --nfp | --nf)
1094 # Obsolete; use --without-fp.
1095 with_fp=no ;;
1096
1097 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1098 | --no-cr | --no-c | -n)
c906108c
SS
1099 no_create=yes ;;
1100
1101 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1102 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1103 no_recursion=yes ;;
1104
1105 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1106 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1107 | --oldin | --oldi | --old | --ol | --o)
1108 ac_prev=oldincludedir ;;
1109 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1110 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1111 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1112 oldincludedir=$ac_optarg ;;
c906108c
SS
1113
1114 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1115 ac_prev=prefix ;;
1116 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1117 prefix=$ac_optarg ;;
c906108c
SS
1118
1119 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1120 | --program-pre | --program-pr | --program-p)
1121 ac_prev=program_prefix ;;
1122 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1123 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1124 program_prefix=$ac_optarg ;;
c906108c
SS
1125
1126 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1127 | --program-suf | --program-su | --program-s)
1128 ac_prev=program_suffix ;;
1129 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1130 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1131 program_suffix=$ac_optarg ;;
c906108c
SS
1132
1133 -program-transform-name | --program-transform-name \
1134 | --program-transform-nam | --program-transform-na \
1135 | --program-transform-n | --program-transform- \
1136 | --program-transform | --program-transfor \
1137 | --program-transfo | --program-transf \
1138 | --program-trans | --program-tran \
1139 | --progr-tra | --program-tr | --program-t)
1140 ac_prev=program_transform_name ;;
1141 -program-transform-name=* | --program-transform-name=* \
1142 | --program-transform-nam=* | --program-transform-na=* \
1143 | --program-transform-n=* | --program-transform-=* \
1144 | --program-transform=* | --program-transfor=* \
1145 | --program-transfo=* | --program-transf=* \
1146 | --program-trans=* | --program-tran=* \
1147 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1148 program_transform_name=$ac_optarg ;;
c906108c 1149
81ecdfbb
RW
1150 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1151 ac_prev=pdfdir ;;
1152 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1153 pdfdir=$ac_optarg ;;
1154
1155 -psdir | --psdir | --psdi | --psd | --ps)
1156 ac_prev=psdir ;;
1157 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1158 psdir=$ac_optarg ;;
1159
c906108c
SS
1160 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1161 | -silent | --silent | --silen | --sile | --sil)
1162 silent=yes ;;
1163
1164 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1165 ac_prev=sbindir ;;
1166 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1167 | --sbi=* | --sb=*)
bec39cab 1168 sbindir=$ac_optarg ;;
c906108c
SS
1169
1170 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1171 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1172 | --sharedst | --shareds | --shared | --share | --shar \
1173 | --sha | --sh)
1174 ac_prev=sharedstatedir ;;
1175 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1176 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1177 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1178 | --sha=* | --sh=*)
bec39cab 1179 sharedstatedir=$ac_optarg ;;
c906108c
SS
1180
1181 -site | --site | --sit)
1182 ac_prev=site ;;
1183 -site=* | --site=* | --sit=*)
bec39cab 1184 site=$ac_optarg ;;
3ace7edb 1185
c906108c
SS
1186 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1187 ac_prev=srcdir ;;
1188 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1189 srcdir=$ac_optarg ;;
c906108c
SS
1190
1191 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1192 | --syscon | --sysco | --sysc | --sys | --sy)
1193 ac_prev=sysconfdir ;;
1194 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1195 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1196 sysconfdir=$ac_optarg ;;
c906108c
SS
1197
1198 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1199 ac_prev=target_alias ;;
c906108c 1200 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1201 target_alias=$ac_optarg ;;
c906108c
SS
1202
1203 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1204 verbose=yes ;;
1205
bec39cab
AC
1206 -version | --version | --versio | --versi | --vers | -V)
1207 ac_init_version=: ;;
c906108c
SS
1208
1209 -with-* | --with-*)
81ecdfbb 1210 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1211 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1212 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213 as_fn_error "invalid package name: $ac_useropt"
1214 ac_useropt_orig=$ac_useropt
1215 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216 case $ac_user_opts in
1217 *"
1218"with_$ac_useropt"
1219"*) ;;
1220 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1221 ac_unrecognized_sep=', ';;
b4e70030 1222 esac
81ecdfbb 1223 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1224
1225 -without-* | --without-*)
81ecdfbb 1226 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1227 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1228 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1229 as_fn_error "invalid package name: $ac_useropt"
1230 ac_useropt_orig=$ac_useropt
1231 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1232 case $ac_user_opts in
1233 *"
1234"with_$ac_useropt"
1235"*) ;;
1236 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1237 ac_unrecognized_sep=', ';;
1238 esac
1239 eval with_$ac_useropt=no ;;
c906108c
SS
1240
1241 --x)
1242 # Obsolete; use --with-x.
1243 with_x=yes ;;
1244
1245 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1246 | --x-incl | --x-inc | --x-in | --x-i)
1247 ac_prev=x_includes ;;
1248 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1249 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1250 x_includes=$ac_optarg ;;
c906108c
SS
1251
1252 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1253 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1254 ac_prev=x_libraries ;;
1255 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1256 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1257 x_libraries=$ac_optarg ;;
c906108c 1258
81ecdfbb
RW
1259 -*) as_fn_error "unrecognized option: \`$ac_option'
1260Try \`$0 --help' for more information."
c906108c
SS
1261 ;;
1262
bec39cab
AC
1263 *=*)
1264 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1265 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1266 case $ac_envvar in #(
1267 '' | [0-9]* | *[!_$as_cr_alnum]* )
1268 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1269 esac
1270 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1271 export $ac_envvar ;;
1272
c906108c 1273 *)
bec39cab 1274 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1275 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1276 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1277 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1278 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1279 ;;
1280
1281 esac
1282done
1283
1284if test -n "$ac_prev"; then
bec39cab 1285 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1286 as_fn_error "missing argument to $ac_option"
c906108c 1287fi
c906108c 1288
81ecdfbb
RW
1289if test -n "$ac_unrecognized_opts"; then
1290 case $enable_option_checking in
1291 no) ;;
1292 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1293 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1294 esac
81ecdfbb 1295fi
b4e70030 1296
81ecdfbb
RW
1297# Check all directory arguments for consistency.
1298for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1299 datadir sysconfdir sharedstatedir localstatedir includedir \
1300 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1301 libdir localedir mandir
b4e70030 1302do
81ecdfbb
RW
1303 eval ac_val=\$$ac_var
1304 # Remove trailing slashes.
1305 case $ac_val in
1306 */ )
1307 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1308 eval $ac_var=\$ac_val;;
1309 esac
1310 # Be sure to have absolute directory names.
b4e70030 1311 case $ac_val in
81ecdfbb
RW
1312 [\\/$]* | ?:[\\/]* ) continue;;
1313 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1314 esac
81ecdfbb 1315 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1316done
1317
bec39cab
AC
1318# There might be people who depend on the old broken behavior: `$host'
1319# used to hold the argument of --host etc.
1320# FIXME: To remove some day.
1321build=$build_alias
1322host=$host_alias
1323target=$target_alias
1324
1325# FIXME: To remove some day.
1326if test "x$host_alias" != x; then
1327 if test "x$build_alias" = x; then
1328 cross_compiling=maybe
81ecdfbb 1329 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1330 If a cross compiler is detected then cross compile mode will be used." >&2
1331 elif test "x$build_alias" != "x$host_alias"; then
1332 cross_compiling=yes
1333 fi
1334fi
c906108c 1335
bec39cab
AC
1336ac_tool_prefix=
1337test -n "$host_alias" && ac_tool_prefix=$host_alias-
1338
1339test "$silent" = yes && exec 6>/dev/null
c906108c 1340
c906108c 1341
81ecdfbb
RW
1342ac_pwd=`pwd` && test -n "$ac_pwd" &&
1343ac_ls_di=`ls -di .` &&
1344ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1345 as_fn_error "working directory cannot be determined"
1346test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1347 as_fn_error "pwd does not report name of working directory"
1348
1349
c906108c
SS
1350# Find the source files, if location was not specified.
1351if test -z "$srcdir"; then
1352 ac_srcdir_defaulted=yes
81ecdfbb
RW
1353 # Try the directory containing this script, then the parent directory.
1354 ac_confdir=`$as_dirname -- "$as_myself" ||
1355$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1356 X"$as_myself" : 'X\(//\)[^/]' \| \
1357 X"$as_myself" : 'X\(//\)$' \| \
1358 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1359$as_echo X"$as_myself" |
1360 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\/\)[^/].*/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\/\)$/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\).*/{
1373 s//\1/
1374 q
1375 }
1376 s/.*/./; q'`
c906108c 1377 srcdir=$ac_confdir
81ecdfbb 1378 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1379 srcdir=..
1380 fi
1381else
1382 ac_srcdir_defaulted=no
1383fi
81ecdfbb
RW
1384if test ! -r "$srcdir/$ac_unique_file"; then
1385 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1386 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1387fi
1388ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1389ac_abs_confdir=`(
1390 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1391 pwd)`
1392# When building in place, set srcdir=.
1393if test "$ac_abs_confdir" = "$ac_pwd"; then
1394 srcdir=.
1395fi
1396# Remove unnecessary trailing slashes from srcdir.
1397# Double slashes in file names in object file debugging info
1398# mess up M-x gdb in Emacs.
1399case $srcdir in
1400*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1401esac
1402for ac_var in $ac_precious_vars; do
1403 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1404 eval ac_env_${ac_var}_value=\$${ac_var}
1405 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1406 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1407done
c906108c 1408
bec39cab
AC
1409#
1410# Report the --help message.
1411#
1412if test "$ac_init_help" = "long"; then
1413 # Omit some internal or obsolete options to make the list less imposing.
1414 # This message is too long to be a string in the A/UX 3.1 sh.
1415 cat <<_ACEOF
1416\`configure' configures this package to adapt to many kinds of systems.
1417
1418Usage: $0 [OPTION]... [VAR=VALUE]...
1419
1420To assign environment variables (e.g., CC, CFLAGS...), specify them as
1421VAR=VALUE. See below for descriptions of some of the useful variables.
1422
1423Defaults for the options are specified in brackets.
1424
1425Configuration:
1426 -h, --help display this help and exit
1427 --help=short display options specific to this package
1428 --help=recursive display the short help of all the included packages
1429 -V, --version display version information and exit
1430 -q, --quiet, --silent do not print \`checking...' messages
1431 --cache-file=FILE cache test results in FILE [disabled]
1432 -C, --config-cache alias for \`--cache-file=config.cache'
1433 -n, --no-create do not create output files
1434 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1435
bec39cab
AC
1436Installation directories:
1437 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1438 [$ac_default_prefix]
bec39cab 1439 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1440 [PREFIX]
bec39cab
AC
1441
1442By default, \`make install' will install all the files in
1443\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1444an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1445for instance \`--prefix=\$HOME'.
1446
1447For better control, use the options below.
1448
1449Fine tuning of the installation directories:
81ecdfbb
RW
1450 --bindir=DIR user executables [EPREFIX/bin]
1451 --sbindir=DIR system admin executables [EPREFIX/sbin]
1452 --libexecdir=DIR program executables [EPREFIX/libexec]
1453 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1454 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1455 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1456 --libdir=DIR object code libraries [EPREFIX/lib]
1457 --includedir=DIR C header files [PREFIX/include]
1458 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1459 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1460 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1461 --infodir=DIR info documentation [DATAROOTDIR/info]
1462 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1463 --mandir=DIR man documentation [DATAROOTDIR/man]
1464 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1465 --htmldir=DIR html documentation [DOCDIR]
1466 --dvidir=DIR dvi documentation [DOCDIR]
1467 --pdfdir=DIR pdf documentation [DOCDIR]
1468 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1469_ACEOF
1470
1471 cat <<\_ACEOF
1472
9009e1ae
MR
1473Program names:
1474 --program-prefix=PREFIX prepend PREFIX to installed program names
1475 --program-suffix=SUFFIX append SUFFIX to installed program names
1476 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1477
bec39cab
AC
1478X features:
1479 --x-includes=DIR X include files are in DIR
1480 --x-libraries=DIR X library files are in DIR
1481
1482System types:
1483 --build=BUILD configure for building on BUILD [guessed]
1484 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1485 --target=TARGET configure for building compilers for TARGET [HOST]
1486_ACEOF
1487fi
1488
1489if test -n "$ac_init_help"; then
1490
1491 cat <<\_ACEOF
1492
1493Optional Features:
81ecdfbb 1494 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1495 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1496 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1497 --enable-maintainer-mode enable make rules and dependencies not useful
1498 (and sometimes confusing) to the casual installer
2974be62 1499 --enable-plugins Enable support for plugins
da2f07f1 1500 --disable-largefile omit support for large files
a1220294
TT
1501 --enable-targets=TARGETS
1502 alternative target configurations
c0993dbe 1503 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1504 --disable-gdbcli disable command-line interface (CLI)
1505 --disable-gdbmi disable machine-interface (MI)
1506 --enable-tui enable full-screen terminal user interface (TUI)
1507 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1508 --enable-profiling enable profiling of GDB
3841debe 1509 --disable-rpath do not hardcode runtime library paths
17ef446e 1510 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1511 --enable-werror treat compile warnings as errors
32c1c914 1512 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1513 --enable-gdb-build-warnings
32c1c914 1514 enable GDB specific build-time compiler warnings if
a1220294 1515 gcc is used
32c1c914 1516 --enable-sim link gdb with simulator
bec39cab 1517 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1518 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1519 is auto)
bec39cab
AC
1520
1521Optional Packages:
1522 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1523 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1524 --with-separate-debug-dir=PATH
32c1c914 1525 look for global separate debug info in this path
62e4f60c 1526 [LIBDIR/debug]
b14b1491
TT
1527 --with-gdb-datadir=PATH look for global separate data files in this path
1528 [DATADIR/gdb]
29b0e8a2 1529 --with-relocated-sources=PATH
32c1c914 1530 automatically relocate this path for source files
7349ff92 1531 --with-auto-load-dir=PATH
aff139ff 1532 directories from which to load auto-loaded scripts
1564a261 1533 [$debugdir:$datadir/auto-load]
bccbefd2 1534 --with-auto-load-safe-path=PATH
aff139ff 1535 directories safe to hold auto-loaded files
7349ff92 1536 [--with-auto-load-dir]
bccbefd2
JK
1537 --without-auto-load-safe-path
1538 do not restrict auto-loaded files locations
05e7c244 1539 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1540 --with-curses use the curses library instead of the termcap
1541 library
c16158bc
JM
1542 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1543 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1544 --with-system-zlib use installed libz
016a3251
DD
1545 --with-gnu-ld assume the C compiler uses GNU ld default=no
1546 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1547 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1548 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1549 --with-system-readline use installed readline library
b8e0a31c
SD
1550 --with-jit-reader-dir=PATH
1551 directory to load the JIT readers from
5c39566f 1552 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1553 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1554 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1555 --with-python[=PYTHON] include python support
1556 (auto/yes/no/<python-program>)
ed3ef339
DE
1557 --with-guile[=GUILE] include guile support
1558 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1559 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1560 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1561 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1562 --without-included-regex
1563 don't use included regex; this is the default on
1564 systems with version 2 of the GNU C library (use
1565 with caution on other system)
81ecdfbb 1566 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1567 --with-system-gdbinit=PATH
32c1c914 1568 automatically load a system-wide gdbinit file
608e2dbb
TT
1569 --with-lzma support lzma compression (auto/yes/no)
1570 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1571 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1572 --with-tcl directory containing tcl configuration (tclConfig.sh)
1573 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1574 --with-x use the X Window System
393fd4c3
YQ
1575 --with-babeltrace include babeltrace support (auto/yes/no)
1576 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1577 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1578
1579Some influential environment variables:
1580 CC C compiler command
1581 CFLAGS C compiler flags
1582 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1583 nonstandard directory <lib dir>
81ecdfbb
RW
1584 LIBS libraries to pass to the linker, e.g. -l<library>
1585 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1586 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1587 CXX C++ compiler command
1588 CXXFLAGS C++ compiler flags
bec39cab 1589 CPP C preprocessor
f06e05e0
JK
1590 MAKEINFO Parent configure detects if it is of sufficient version.
1591 MAKEINFOFLAGS
1592 Parameters for MAKEINFO.
81ecdfbb
RW
1593 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1594 the first program found out of: `bison -y', `byacc', `yacc'.
1595 YFLAGS The list of arguments that will be passed by default to $YACC.
1596 This script will default YFLAGS to the empty string to avoid a
1597 default value of `-d' given by some make applications.
1598 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1599
1600Use these variables to override the choices made by `configure' or to help
1601it to find libraries and programs with nonstandard names/locations.
1602
81ecdfbb 1603Report bugs to the package provider.
bec39cab 1604_ACEOF
81ecdfbb 1605ac_status=$?
bec39cab
AC
1606fi
1607
1608if test "$ac_init_help" = "recursive"; then
1609 # If there are subdirs, report their specific --help.
bec39cab 1610 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1611 test -d "$ac_dir" ||
1612 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1613 continue
bec39cab
AC
1614 ac_builddir=.
1615
81ecdfbb
RW
1616case "$ac_dir" in
1617.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1618*)
1619 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1620 # A ".." for each directory in $ac_dir_suffix.
1621 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1622 case $ac_top_builddir_sub in
1623 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1624 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1625 esac ;;
1626esac
1627ac_abs_top_builddir=$ac_pwd
1628ac_abs_builddir=$ac_pwd$ac_dir_suffix
1629# for backward compatibility:
1630ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1631
1632case $srcdir in
81ecdfbb 1633 .) # We are building in place.
bec39cab 1634 ac_srcdir=.
81ecdfbb
RW
1635 ac_top_srcdir=$ac_top_builddir_sub
1636 ac_abs_top_srcdir=$ac_pwd ;;
1637 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1638 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1639 ac_top_srcdir=$srcdir
1640 ac_abs_top_srcdir=$srcdir ;;
1641 *) # Relative name.
1642 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1643 ac_top_srcdir=$ac_top_build_prefix$srcdir
1644 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1645esac
81ecdfbb 1646ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1647
81ecdfbb
RW
1648 cd "$ac_dir" || { ac_status=$?; continue; }
1649 # Check for guested configure.
1650 if test -f "$ac_srcdir/configure.gnu"; then
1651 echo &&
1652 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1653 elif test -f "$ac_srcdir/configure"; then
1654 echo &&
1655 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1656 else
81ecdfbb
RW
1657 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1658 fi || ac_status=$?
1659 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1660 done
1661fi
1662
81ecdfbb 1663test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1664if $ac_init_version; then
1665 cat <<\_ACEOF
81ecdfbb
RW
1666configure
1667generated by GNU Autoconf 2.64
bec39cab 1668
81ecdfbb 1669Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1670This configure script is free software; the Free Software Foundation
1671gives unlimited permission to copy, distribute and modify it.
1672_ACEOF
81ecdfbb 1673 exit
bec39cab 1674fi
bec39cab 1675
81ecdfbb
RW
1676## ------------------------ ##
1677## Autoconf initialization. ##
1678## ------------------------ ##
bec39cab 1679
81ecdfbb
RW
1680# ac_fn_c_try_compile LINENO
1681# --------------------------
1682# Try to compile conftest.$ac_ext, and return whether this succeeded.
1683ac_fn_c_try_compile ()
1684{
1685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1686 rm -f conftest.$ac_objext
1687 if { { ac_try="$ac_compile"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_compile") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } && {
1703 test -z "$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 } && test -s conftest.$ac_objext; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1710
81ecdfbb
RW
1711 ac_retval=1
1712fi
1713 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1714 return $ac_retval
1715
1716} # ac_fn_c_try_compile
1717
3bc3d82a
PA
1718# ac_fn_cxx_try_compile LINENO
1719# ----------------------------
1720# Try to compile conftest.$ac_ext, and return whether this succeeded.
1721ac_fn_cxx_try_compile ()
1722{
1723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724 rm -f conftest.$ac_objext
1725 if { { ac_try="$ac_compile"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_compile") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } && {
1741 test -z "$ac_cxx_werror_flag" ||
1742 test ! -s conftest.err
1743 } && test -s conftest.$ac_objext; then :
1744 ac_retval=0
1745else
1746 $as_echo "$as_me: failed program was:" >&5
1747sed 's/^/| /' conftest.$ac_ext >&5
1748
1749 ac_retval=1
1750fi
1751 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1752 return $ac_retval
1753
1754} # ac_fn_cxx_try_compile
1755
81ecdfbb
RW
1756# ac_fn_c_try_cpp LINENO
1757# ----------------------
1758# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1759ac_fn_c_try_cpp ()
bec39cab 1760{
81ecdfbb
RW
1761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762 if { { ac_try="$ac_cpp conftest.$ac_ext"
1763case "(($ac_try" in
1764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765 *) ac_try_echo=$ac_try;;
1766esac
1767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1768$as_echo "$ac_try_echo"; } >&5
1769 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1770 ac_status=$?
1771 if test -s conftest.err; then
1772 grep -v '^ *+' conftest.err >conftest.er1
1773 cat conftest.er1 >&5
1774 mv -f conftest.er1 conftest.err
1775 fi
1776 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1777 test $ac_status = 0; } >/dev/null && {
1778 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1779 test ! -s conftest.err
1780 }; then :
1781 ac_retval=0
1782else
1783 $as_echo "$as_me: failed program was:" >&5
1784sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1785
81ecdfbb
RW
1786 ac_retval=1
1787fi
1788 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1789 return $ac_retval
bec39cab 1790
81ecdfbb 1791} # ac_fn_c_try_cpp
bec39cab 1792
81ecdfbb
RW
1793# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1794# -------------------------------------------------------
1795# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1796# the include files in INCLUDES and setting the cache variable VAR
1797# accordingly.
1798ac_fn_c_check_header_mongrel ()
1799{
1800 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1801 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1803$as_echo_n "checking for $2... " >&6; }
1804if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1805 $as_echo_n "(cached) " >&6
1806fi
1807eval ac_res=\$$3
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1809$as_echo "$ac_res" >&6; }
1810else
1811 # Is the header compilable?
1812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1813$as_echo_n "checking $2 usability... " >&6; }
1814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1815/* end confdefs.h. */
1816$4
1817#include <$2>
1818_ACEOF
1819if ac_fn_c_try_compile "$LINENO"; then :
1820 ac_header_compiler=yes
1821else
1822 ac_header_compiler=no
1823fi
1824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1826$as_echo "$ac_header_compiler" >&6; }
bec39cab 1827
81ecdfbb
RW
1828# Is the header present?
1829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1830$as_echo_n "checking $2 presence... " >&6; }
1831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833#include <$2>
1834_ACEOF
1835if ac_fn_c_try_cpp "$LINENO"; then :
1836 ac_header_preproc=yes
1837else
1838 ac_header_preproc=no
1839fi
1840rm -f conftest.err conftest.$ac_ext
1841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1842$as_echo "$ac_header_preproc" >&6; }
bec39cab 1843
81ecdfbb
RW
1844# So? What about this header?
1845case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1846 yes:no: )
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1848$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1850$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1851 ;;
1852 no:yes:* )
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1854$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1856$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1858$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1860$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1862$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1863 ;;
1864esac
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1866$as_echo_n "checking for $2... " >&6; }
1867if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1868 $as_echo_n "(cached) " >&6
1869else
1870 eval "$3=\$ac_header_compiler"
1871fi
1872eval ac_res=\$$3
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1874$as_echo "$ac_res" >&6; }
1875fi
1876 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1877
81ecdfbb 1878} # ac_fn_c_check_header_mongrel
bec39cab 1879
81ecdfbb
RW
1880# ac_fn_c_try_run LINENO
1881# ----------------------
1882# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1883# that executables *can* be run.
1884ac_fn_c_try_run ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 if { { ac_try="$ac_link"
1888case "(($ac_try" in
1889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1890 *) ac_try_echo=$ac_try;;
1891esac
1892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1893$as_echo "$ac_try_echo"; } >&5
1894 (eval "$ac_link") 2>&5
1895 ac_status=$?
1896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1898 { { case "(($ac_try" in
1899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900 *) ac_try_echo=$ac_try;;
1901esac
1902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903$as_echo "$ac_try_echo"; } >&5
1904 (eval "$ac_try") 2>&5
1905 ac_status=$?
1906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1907 test $ac_status = 0; }; }; then :
1908 ac_retval=0
1909else
1910 $as_echo "$as_me: program exited with status $ac_status" >&5
1911 $as_echo "$as_me: failed program was:" >&5
1912sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1913
81ecdfbb
RW
1914 ac_retval=$ac_status
1915fi
1916 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1917 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1918 return $ac_retval
bec39cab 1919
81ecdfbb 1920} # ac_fn_c_try_run
bec39cab 1921
81ecdfbb
RW
1922# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1923# -------------------------------------------------------
1924# Tests whether HEADER exists and can be compiled using the include files in
1925# INCLUDES, setting the cache variable VAR accordingly.
1926ac_fn_c_check_header_compile ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
1931if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1932 $as_echo_n "(cached) " >&6
1933else
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$4
1937#include <$2>
bec39cab 1938_ACEOF
81ecdfbb
RW
1939if ac_fn_c_try_compile "$LINENO"; then :
1940 eval "$3=yes"
1941else
1942 eval "$3=no"
1943fi
1944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
1949 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1950
81ecdfbb 1951} # ac_fn_c_check_header_compile
bec39cab 1952
2974be62
AM
1953# ac_fn_c_try_link LINENO
1954# -----------------------
1955# Try to link conftest.$ac_ext, and return whether this succeeded.
1956ac_fn_c_try_link ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 rm -f conftest.$ac_objext conftest$ac_exeext
1960 if { { ac_try="$ac_link"
1961case "(($ac_try" in
1962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1963 *) ac_try_echo=$ac_try;;
1964esac
1965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1966$as_echo "$ac_try_echo"; } >&5
1967 (eval "$ac_link") 2>conftest.err
1968 ac_status=$?
1969 if test -s conftest.err; then
1970 grep -v '^ *+' conftest.err >conftest.er1
1971 cat conftest.er1 >&5
1972 mv -f conftest.er1 conftest.err
1973 fi
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; } && {
1976 test -z "$ac_c_werror_flag" ||
1977 test ! -s conftest.err
1978 } && test -s conftest$ac_exeext && {
1979 test "$cross_compiling" = yes ||
1980 $as_test_x conftest$ac_exeext
1981 }; then :
1982 ac_retval=0
1983else
1984 $as_echo "$as_me: failed program was:" >&5
1985sed 's/^/| /' conftest.$ac_ext >&5
1986
1987 ac_retval=1
1988fi
1989 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1990 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1991 # interfere with the next link command; also delete a directory that is
1992 # left behind by Apple's compiler. We do this before executing the actions.
1993 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1994 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1995 return $ac_retval
1996
1997} # ac_fn_c_try_link
1998
81ecdfbb
RW
1999# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2000# --------------------------------------------
2001# Tries to find the compile-time value of EXPR in a program that includes
2002# INCLUDES, setting VAR accordingly. Returns whether the value could be
2003# computed
2004ac_fn_c_compute_int ()
2005{
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 if test "$cross_compiling" = yes; then
2008 # Depending upon the size, compute the lo and hi bounds.
2009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) >= 0)];
2016test_array [0] = 0
bec39cab 2017
81ecdfbb
RW
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 ac_lo=0 ac_mid=0
2024 while :; do
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h. */
2027$4
2028int
2029main ()
2030{
2031static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2032test_array [0] = 0
bec39cab 2033
81ecdfbb
RW
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 ac_hi=$ac_mid; break
2040else
2041 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2042 if test $ac_lo -le $ac_mid; then
2043 ac_lo= ac_hi=
2044 break
2045 fi
2046 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2047fi
81ecdfbb
RW
2048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049 done
c906108c 2050else
81ecdfbb
RW
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) < 0)];
2058test_array [0] = 0
bec39cab 2059
81ecdfbb
RW
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065 ac_hi=-1 ac_mid=-1
2066 while :; do
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2074test_array [0] = 0
bec39cab 2075
81ecdfbb
RW
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081 ac_lo=$ac_mid; break
2082else
2083 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2084 if test $ac_mid -le $ac_hi; then
2085 ac_lo= ac_hi=
2086 break
2087 fi
2088 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091 done
2092else
2093 ac_lo= ac_hi=
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098# Binary search between lo and hi bounds.
2099while test "x$ac_lo" != "x$ac_hi"; do
2100 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2108test_array [0] = 0
bec39cab 2109
81ecdfbb
RW
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115 ac_hi=$ac_mid
2116else
2117 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120done
2121case $ac_lo in #((
2122?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2123'') ac_retval=1 ;;
2124esac
2125 else
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129static long int longval () { return $2; }
2130static unsigned long int ulongval () { return $2; }
2131#include <stdio.h>
2132#include <stdlib.h>
2133int
2134main ()
2135{
bec39cab 2136
81ecdfbb
RW
2137 FILE *f = fopen ("conftest.val", "w");
2138 if (! f)
2139 return 1;
2140 if (($2) < 0)
2141 {
2142 long int i = longval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%ld", i);
2146 }
2147 else
2148 {
2149 unsigned long int i = ulongval ();
2150 if (i != ($2))
2151 return 1;
2152 fprintf (f, "%lu", i);
2153 }
2154 /* Do not output a trailing newline, as this causes \r\n confusion
2155 on some platforms. */
2156 return ferror (f) || fclose (f) != 0;
bec39cab 2157
81ecdfbb
RW
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_run "$LINENO"; then :
2163 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2164else
2165 ac_retval=1
2166fi
2167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2168 conftest.$ac_objext conftest.beam conftest.$ac_ext
2169rm -f conftest.val
bec39cab 2170
81ecdfbb
RW
2171 fi
2172 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2173 return $ac_retval
bec39cab 2174
81ecdfbb 2175} # ac_fn_c_compute_int
bec39cab 2176
55a8c076
YQ
2177# ac_fn_c_check_func LINENO FUNC VAR
2178# ----------------------------------
2179# Tests whether FUNC exists, setting the cache variable VAR accordingly
2180ac_fn_c_check_func ()
81ecdfbb
RW
2181{
2182 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2184$as_echo_n "checking for $2... " >&6; }
2185if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2186 $as_echo_n "(cached) " >&6
2187else
81ecdfbb
RW
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
55a8c076
YQ
2190/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2192#define $2 innocuous_$2
2193
2194/* System header to define __stub macros and hopefully few prototypes,
2195 which can conflict with char $2 (); below.
2196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2197 <limits.h> exists even on freestanding compilers. */
2198
2199#ifdef __STDC__
2200# include <limits.h>
2201#else
2202# include <assert.h>
2203#endif
2204
2205#undef $2
2206
2207/* Override any GCC internal prototype to avoid an error.
2208 Use char because int might match the return type of a GCC
2209 builtin and then its argument prototype would still apply. */
2210#ifdef __cplusplus
2211extern "C"
2212#endif
2213char $2 ();
2214/* The GNU C library defines this for functions which it implements
2215 to always fail with ENOSYS. Some functions are actually named
2216 something starting with __ and the normal name is an alias. */
2217#if defined __stub_$2 || defined __stub___$2
2218choke me
2219#endif
2220
2221int
2222main ()
2223{
2224return $2 ();
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_link "$LINENO"; then :
2230 eval "$3=yes"
2231else
2232 eval "$3=no"
2233fi
2234rm -f core conftest.err conftest.$ac_objext \
2235 conftest$ac_exeext conftest.$ac_ext
2236fi
2237eval ac_res=\$$3
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239$as_echo "$ac_res" >&6; }
2240 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2241
2242} # ac_fn_c_check_func
2243
07697489
PA
2244# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2245# -------------------------------------------
2246# Tests whether TYPE exists after having included INCLUDES, setting cache
2247# variable VAR accordingly.
2248ac_fn_c_check_type ()
2249{
2250 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2252$as_echo_n "checking for $2... " >&6; }
2253if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2254 $as_echo_n "(cached) " >&6
2255else
2256 eval "$3=no"
2257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258/* end confdefs.h. */
2259$4
2260int
2261main ()
2262{
2263if (sizeof ($2))
2264 return 0;
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h. */
2272$4
2273int
2274main ()
2275{
2276if (sizeof (($2)))
2277 return 0;
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_compile "$LINENO"; then :
2283
2284else
2285 eval "$3=yes"
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291eval ac_res=\$$3
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293$as_echo "$ac_res" >&6; }
2294 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2295
2296} # ac_fn_c_check_type
2297
770d76d7
PA
2298# ac_fn_c_check_decl LINENO SYMBOL VAR
2299# ------------------------------------
2300# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2301ac_fn_c_check_decl ()
2302{
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304 as_decl_name=`echo $2|sed 's/ *(.*//'`
2305 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2307$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2308if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$4
2314int
2315main ()
2316{
2317#ifndef $as_decl_name
2318#ifdef __cplusplus
2319 (void) $as_decl_use;
2320#else
2321 (void) $as_decl_name;
2322#endif
2323#endif
2324
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_compile "$LINENO"; then :
2330 eval "$3=yes"
2331else
2332 eval "$3=no"
2333fi
2334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335fi
2336eval ac_res=\$$3
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338$as_echo "$ac_res" >&6; }
2339 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2340
2341} # ac_fn_c_check_decl
2342
55a8c076
YQ
2343# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2344# ----------------------------------------------------
2345# Tries to find if the field MEMBER exists in type AGGR, after including
2346# INCLUDES, setting cache variable VAR accordingly.
2347ac_fn_c_check_member ()
2348{
2349 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2351$as_echo_n "checking for $2.$3... " >&6; }
2352if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2353 $as_echo_n "(cached) " >&6
2354else
2355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h. */
2357$5
2358int
2359main ()
2360{
2361static $2 ac_aggr;
2362if (ac_aggr.$3)
2363return 0;
2364 ;
2365 return 0;
2366}
2367_ACEOF
2368if ac_fn_c_try_compile "$LINENO"; then :
2369 eval "$4=yes"
2370else
2371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h. */
2373$5
2374int
2375main ()
2376{
2377static $2 ac_aggr;
2378if (sizeof ac_aggr.$3)
2379return 0;
2380 ;
2381 return 0;
2382}
2383_ACEOF
2384if ac_fn_c_try_compile "$LINENO"; then :
2385 eval "$4=yes"
2386else
2387 eval "$4=no"
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392fi
2393eval ac_res=\$$4
2394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2395$as_echo "$ac_res" >&6; }
2396 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2397
2398} # ac_fn_c_check_member
81ecdfbb
RW
2399cat >config.log <<_ACEOF
2400This file contains any messages produced by compilers while
2401running configure, to aid debugging if configure makes a mistake.
d5af19ba 2402
81ecdfbb
RW
2403It was created by $as_me, which was
2404generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2405
81ecdfbb 2406 $ $0 $@
413ccac7 2407
81ecdfbb
RW
2408_ACEOF
2409exec 5>>config.log
2410{
2411cat <<_ASUNAME
2412## --------- ##
2413## Platform. ##
2414## --------- ##
413ccac7 2415
81ecdfbb
RW
2416hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2417uname -m = `(uname -m) 2>/dev/null || echo unknown`
2418uname -r = `(uname -r) 2>/dev/null || echo unknown`
2419uname -s = `(uname -s) 2>/dev/null || echo unknown`
2420uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2421
81ecdfbb
RW
2422/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2423/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2424
81ecdfbb
RW
2425/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2426/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2427/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2428/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2429/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2430/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2431/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2432
81ecdfbb 2433_ASUNAME
bec39cab 2434
bec39cab
AC
2435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2436for as_dir in $PATH
2437do
2438 IFS=$as_save_IFS
2439 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2440 $as_echo "PATH: $as_dir"
2441 done
2442IFS=$as_save_IFS
bec39cab 2443
81ecdfbb 2444} >&5
bec39cab 2445
81ecdfbb 2446cat >&5 <<_ACEOF
bec39cab 2447
bec39cab 2448
81ecdfbb
RW
2449## ----------- ##
2450## Core tests. ##
2451## ----------- ##
2452
2453_ACEOF
2454
2455
2456# Keep a trace of the command line.
2457# Strip out --no-create and --no-recursion so they do not pile up.
2458# Strip out --silent because we don't want to record it for future runs.
2459# Also quote any args containing shell meta-characters.
2460# Make two passes to allow for proper duplicate-argument suppression.
2461ac_configure_args=
2462ac_configure_args0=
2463ac_configure_args1=
2464ac_must_keep_next=false
2465for ac_pass in 1 2
2466do
2467 for ac_arg
2468 do
2469 case $ac_arg in
2470 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2471 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2472 | -silent | --silent | --silen | --sile | --sil)
2473 continue ;;
2474 *\'*)
2475 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2476 esac
2477 case $ac_pass in
2478 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2479 2)
2480 as_fn_append ac_configure_args1 " '$ac_arg'"
2481 if test $ac_must_keep_next = true; then
2482 ac_must_keep_next=false # Got value, back to normal.
2483 else
2484 case $ac_arg in
2485 *=* | --config-cache | -C | -disable-* | --disable-* \
2486 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2487 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2488 | -with-* | --with-* | -without-* | --without-* | --x)
2489 case "$ac_configure_args0 " in
2490 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2491 esac
2492 ;;
2493 -* ) ac_must_keep_next=true ;;
2494 esac
2495 fi
2496 as_fn_append ac_configure_args " '$ac_arg'"
2497 ;;
2498 esac
2499 done
2500done
2501{ ac_configure_args0=; unset ac_configure_args0;}
2502{ ac_configure_args1=; unset ac_configure_args1;}
2503
2504# When interrupted or exit'd, cleanup temporary files, and complete
2505# config.log. We remove comments because anyway the quotes in there
2506# would cause problems or look ugly.
2507# WARNING: Use '\'' to represent an apostrophe within the trap.
2508# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2509trap 'exit_status=$?
2510 # Save into config.log some information that might help in debugging.
2511 {
2512 echo
2513
2514 cat <<\_ASBOX
2515## ---------------- ##
2516## Cache variables. ##
2517## ---------------- ##
2518_ASBOX
2519 echo
2520 # The following way of writing the cache mishandles newlines in values,
2521(
2522 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2523 eval ac_val=\$$ac_var
2524 case $ac_val in #(
2525 *${as_nl}*)
2526 case $ac_var in #(
2527 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2528$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2529 esac
2530 case $ac_var in #(
2531 _ | IFS | as_nl) ;; #(
2532 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2533 *) { eval $ac_var=; unset $ac_var;} ;;
2534 esac ;;
2535 esac
2536 done
2537 (set) 2>&1 |
2538 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2539 *${as_nl}ac_space=\ *)
2540 sed -n \
2541 "s/'\''/'\''\\\\'\'''\''/g;
2542 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2543 ;; #(
2544 *)
2545 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2546 ;;
2547 esac |
2548 sort
2549)
2550 echo
2551
2552 cat <<\_ASBOX
2553## ----------------- ##
2554## Output variables. ##
2555## ----------------- ##
2556_ASBOX
2557 echo
2558 for ac_var in $ac_subst_vars
2559 do
2560 eval ac_val=\$$ac_var
2561 case $ac_val in
2562 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2563 esac
2564 $as_echo "$ac_var='\''$ac_val'\''"
2565 done | sort
2566 echo
2567
2568 if test -n "$ac_subst_files"; then
2569 cat <<\_ASBOX
2570## ------------------- ##
2571## File substitutions. ##
2572## ------------------- ##
2573_ASBOX
2574 echo
2575 for ac_var in $ac_subst_files
2576 do
2577 eval ac_val=\$$ac_var
2578 case $ac_val in
2579 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2580 esac
2581 $as_echo "$ac_var='\''$ac_val'\''"
2582 done | sort
2583 echo
2584 fi
2585
2586 if test -s confdefs.h; then
2587 cat <<\_ASBOX
2588## ----------- ##
2589## confdefs.h. ##
2590## ----------- ##
2591_ASBOX
2592 echo
2593 cat confdefs.h
2594 echo
2595 fi
2596 test "$ac_signal" != 0 &&
2597 $as_echo "$as_me: caught signal $ac_signal"
2598 $as_echo "$as_me: exit $exit_status"
2599 } >&5
2600 rm -f core *.core core.conftest.* &&
2601 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2602 exit $exit_status
2603' 0
2604for ac_signal in 1 2 13 15; do
2605 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2606done
2607ac_signal=0
2608
2609# confdefs.h avoids OS command line length limits that DEFS can exceed.
2610rm -f -r conftest* confdefs.h
2611
2612$as_echo "/* confdefs.h */" > confdefs.h
2613
2614# Predefined preprocessor variables.
2615
2616cat >>confdefs.h <<_ACEOF
2617#define PACKAGE_NAME "$PACKAGE_NAME"
2618_ACEOF
2619
2620cat >>confdefs.h <<_ACEOF
2621#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2622_ACEOF
2623
2624cat >>confdefs.h <<_ACEOF
2625#define PACKAGE_VERSION "$PACKAGE_VERSION"
2626_ACEOF
2627
2628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_STRING "$PACKAGE_STRING"
2630_ACEOF
2631
2632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2634_ACEOF
2635
2636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_URL "$PACKAGE_URL"
2638_ACEOF
2639
2640
2641# Let the site file select an alternate cache file if it wants to.
2642# Prefer an explicitly selected file to automatically selected ones.
2643ac_site_file1=NONE
2644ac_site_file2=NONE
2645if test -n "$CONFIG_SITE"; then
2646 ac_site_file1=$CONFIG_SITE
2647elif test "x$prefix" != xNONE; then
2648 ac_site_file1=$prefix/share/config.site
2649 ac_site_file2=$prefix/etc/config.site
2650else
2651 ac_site_file1=$ac_default_prefix/share/config.site
2652 ac_site_file2=$ac_default_prefix/etc/config.site
2653fi
2654for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2655do
2656 test "x$ac_site_file" = xNONE && continue
2657 if test -r "$ac_site_file"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2659$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2660 sed 's/^/| /' "$ac_site_file" >&5
2661 . "$ac_site_file"
2662 fi
2663done
2664
2665if test -r "$cache_file"; then
2666 # Some versions of bash will fail to source /dev/null (special
2667 # files actually), so we avoid doing that.
2668 if test -f "$cache_file"; then
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2670$as_echo "$as_me: loading cache $cache_file" >&6;}
2671 case $cache_file in
2672 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2673 *) . "./$cache_file";;
2674 esac
2675 fi
2676else
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2678$as_echo "$as_me: creating cache $cache_file" >&6;}
2679 >$cache_file
bec39cab
AC
2680fi
2681
81ecdfbb
RW
2682# Check that the precious variables saved in the cache have kept the same
2683# value.
2684ac_cache_corrupted=false
2685for ac_var in $ac_precious_vars; do
2686 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2687 eval ac_new_set=\$ac_env_${ac_var}_set
2688 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2689 eval ac_new_val=\$ac_env_${ac_var}_value
2690 case $ac_old_set,$ac_new_set in
2691 set,)
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2693$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2694 ac_cache_corrupted=: ;;
2695 ,set)
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2697$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2698 ac_cache_corrupted=: ;;
2699 ,);;
2700 *)
2701 if test "x$ac_old_val" != "x$ac_new_val"; then
2702 # differences in whitespace do not lead to failure.
2703 ac_old_val_w=`echo x $ac_old_val`
2704 ac_new_val_w=`echo x $ac_new_val`
2705 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2707$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2708 ac_cache_corrupted=:
2709 else
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2711$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2712 eval $ac_var=\$ac_old_val
2713 fi
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2715$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2717$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2718 fi;;
2719 esac
2720 # Pass precious variables to config.status.
2721 if test "$ac_new_set" = set; then
2722 case $ac_new_val in
2723 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2724 *) ac_arg=$ac_var=$ac_new_val ;;
2725 esac
2726 case " $ac_configure_args " in
2727 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2728 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2729 esac
2730 fi
2731done
2732if $ac_cache_corrupted; then
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2736$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2737 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2738fi
2739## -------------------- ##
2740## Main body of script. ##
2741## -------------------- ##
2742
2743ac_ext=c
2744ac_cpp='$CPP $CPPFLAGS'
2745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2747ac_compiler_gnu=$ac_cv_c_compiler_gnu
2748
2749
2750
2751
2752
2753ac_config_headers="$ac_config_headers config.h:config.in"
2754
2755
2756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2757$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2758 # Check whether --enable-maintainer-mode was given.
2759if test "${enable_maintainer_mode+set}" = set; then :
2760 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2761else
2762 USE_MAINTAINER_MODE=no
2763fi
2764
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2766$as_echo "$USE_MAINTAINER_MODE" >&6; }
2767 if test $USE_MAINTAINER_MODE = yes; then
2768 MAINTAINER_MODE_TRUE=
2769 MAINTAINER_MODE_FALSE='#'
2770else
2771 MAINTAINER_MODE_TRUE='#'
2772 MAINTAINER_MODE_FALSE=
2773fi
2774
2775 MAINT=$MAINTAINER_MODE_TRUE
2776
2777
2778
17ef446e 2779# Set the 'development' global.
270c9937 2780. $srcdir/../bfd/development.sh
f5f1cdb6 2781
81ecdfbb
RW
2782ac_ext=c
2783ac_cpp='$CPP $CPPFLAGS'
2784ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2785ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2786ac_compiler_gnu=$ac_cv_c_compiler_gnu
2787if test -n "$ac_tool_prefix"; then
2788 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2789set dummy ${ac_tool_prefix}gcc; ac_word=$2
2790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2791$as_echo_n "checking for $ac_word... " >&6; }
2792if test "${ac_cv_prog_CC+set}" = set; then :
2793 $as_echo_n "(cached) " >&6
c906108c
SS
2794else
2795 if test -n "$CC"; then
2796 ac_cv_prog_CC="$CC" # Let the user override the test.
2797else
bec39cab
AC
2798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2799for as_dir in $PATH
2800do
2801 IFS=$as_save_IFS
2802 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2803 for ac_exec_ext in '' $ac_executable_extensions; do
2804 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2805 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2807 break 2
2808 fi
2809done
81ecdfbb
RW
2810 done
2811IFS=$as_save_IFS
bec39cab 2812
c906108c
SS
2813fi
2814fi
bec39cab 2815CC=$ac_cv_prog_CC
c906108c 2816if test -n "$CC"; then
81ecdfbb
RW
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2818$as_echo "$CC" >&6; }
c906108c 2819else
81ecdfbb
RW
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2821$as_echo "no" >&6; }
c906108c
SS
2822fi
2823
81ecdfbb 2824
b4e70030
JB
2825fi
2826if test -z "$ac_cv_prog_CC"; then
2827 ac_ct_CC=$CC
81ecdfbb
RW
2828 # Extract the first word of "gcc", so it can be a program name with args.
2829set dummy gcc; ac_word=$2
2830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2831$as_echo_n "checking for $ac_word... " >&6; }
2832if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2833 $as_echo_n "(cached) " >&6
b4e70030
JB
2834else
2835 if test -n "$ac_ct_CC"; then
2836 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2837else
2838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2839for as_dir in $PATH
2840do
2841 IFS=$as_save_IFS
2842 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2843 for ac_exec_ext in '' $ac_executable_extensions; do
2844 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2845 ac_cv_prog_ac_ct_CC="gcc"
2846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2847 break 2
4e8d927d 2848 fi
b4e70030 2849done
81ecdfbb
RW
2850 done
2851IFS=$as_save_IFS
b4e70030
JB
2852
2853fi
2854fi
2855ac_ct_CC=$ac_cv_prog_ac_ct_CC
2856if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2858$as_echo "$ac_ct_CC" >&6; }
b4e70030 2859else
81ecdfbb
RW
2860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2861$as_echo "no" >&6; }
b4e70030
JB
2862fi
2863
81ecdfbb
RW
2864 if test "x$ac_ct_CC" = x; then
2865 CC=""
2866 else
2867 case $cross_compiling:$ac_tool_warned in
2868yes:)
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2871ac_tool_warned=yes ;;
2872esac
2873 CC=$ac_ct_CC
2874 fi
b4e70030
JB
2875else
2876 CC="$ac_cv_prog_CC"
2877fi
2878
c906108c 2879if test -z "$CC"; then
81ecdfbb
RW
2880 if test -n "$ac_tool_prefix"; then
2881 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2882set dummy ${ac_tool_prefix}cc; ac_word=$2
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884$as_echo_n "checking for $ac_word... " >&6; }
2885if test "${ac_cv_prog_CC+set}" = set; then :
2886 $as_echo_n "(cached) " >&6
c906108c
SS
2887else
2888 if test -n "$CC"; then
2889 ac_cv_prog_CC="$CC" # Let the user override the test.
2890else
bec39cab
AC
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2896 for ac_exec_ext in '' $ac_executable_extensions; do
2897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2898 ac_cv_prog_CC="${ac_tool_prefix}cc"
2899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2900 break 2
2901 fi
2902done
81ecdfbb
RW
2903 done
2904IFS=$as_save_IFS
2905
2906fi
2907fi
2908CC=$ac_cv_prog_CC
2909if test -n "$CC"; then
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911$as_echo "$CC" >&6; }
2912else
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
2915fi
2916
2917
2918 fi
2919fi
2920if test -z "$CC"; then
2921 # Extract the first word of "cc", so it can be a program name with args.
2922set dummy cc; ac_word=$2
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2924$as_echo_n "checking for $ac_word... " >&6; }
2925if test "${ac_cv_prog_CC+set}" = set; then :
2926 $as_echo_n "(cached) " >&6
2927else
2928 if test -n "$CC"; then
2929 ac_cv_prog_CC="$CC" # Let the user override the test.
2930else
2931 ac_prog_rejected=no
2932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2933for as_dir in $PATH
2934do
2935 IFS=$as_save_IFS
2936 test -z "$as_dir" && as_dir=.
2937 for ac_exec_ext in '' $ac_executable_extensions; do
2938 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2939 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2940 ac_prog_rejected=yes
2941 continue
2942 fi
2943 ac_cv_prog_CC="cc"
2944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2945 break 2
2946 fi
2947done
2948 done
2949IFS=$as_save_IFS
bec39cab 2950
c906108c
SS
2951if test $ac_prog_rejected = yes; then
2952 # We found a bogon in the path, so make sure we never use it.
2953 set dummy $ac_cv_prog_CC
2954 shift
bec39cab 2955 if test $# != 0; then
c906108c
SS
2956 # We chose a different compiler from the bogus one.
2957 # However, it has the same basename, so the bogon will be chosen
2958 # first if we set CC to just the basename; use the full file name.
2959 shift
bec39cab 2960 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2961 fi
2962fi
2963fi
2964fi
bec39cab 2965CC=$ac_cv_prog_CC
c906108c 2966if test -n "$CC"; then
81ecdfbb
RW
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2968$as_echo "$CC" >&6; }
c906108c 2969else
81ecdfbb
RW
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2971$as_echo "no" >&6; }
c906108c
SS
2972fi
2973
81ecdfbb 2974
bec39cab
AC
2975fi
2976if test -z "$CC"; then
2977 if test -n "$ac_tool_prefix"; then
81ecdfbb 2978 for ac_prog in cl.exe
bec39cab
AC
2979 do
2980 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2981set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2983$as_echo_n "checking for $ac_word... " >&6; }
2984if test "${ac_cv_prog_CC+set}" = set; then :
2985 $as_echo_n "(cached) " >&6
c906108c
SS
2986else
2987 if test -n "$CC"; then
2988 ac_cv_prog_CC="$CC" # Let the user override the test.
2989else
bec39cab
AC
2990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2991for as_dir in $PATH
2992do
2993 IFS=$as_save_IFS
2994 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2995 for ac_exec_ext in '' $ac_executable_extensions; do
2996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2997 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2999 break 2
3000 fi
3001done
81ecdfbb
RW
3002 done
3003IFS=$as_save_IFS
bec39cab 3004
c906108c
SS
3005fi
3006fi
bec39cab 3007CC=$ac_cv_prog_CC
c906108c 3008if test -n "$CC"; then
81ecdfbb
RW
3009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3010$as_echo "$CC" >&6; }
c906108c 3011else
81ecdfbb
RW
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3013$as_echo "no" >&6; }
c906108c 3014fi
bec39cab 3015
81ecdfbb 3016
bec39cab
AC
3017 test -n "$CC" && break
3018 done
3019fi
3020if test -z "$CC"; then
3021 ac_ct_CC=$CC
81ecdfbb 3022 for ac_prog in cl.exe
bec39cab
AC
3023do
3024 # Extract the first word of "$ac_prog", so it can be a program name with args.
3025set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3027$as_echo_n "checking for $ac_word... " >&6; }
3028if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3029 $as_echo_n "(cached) " >&6
bec39cab
AC
3030else
3031 if test -n "$ac_ct_CC"; then
3032 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3033else
3034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3035for as_dir in $PATH
3036do
3037 IFS=$as_save_IFS
3038 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3039 for ac_exec_ext in '' $ac_executable_extensions; do
3040 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3041 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3043 break 2
c906108c 3044 fi
bec39cab 3045done
81ecdfbb
RW
3046 done
3047IFS=$as_save_IFS
bec39cab
AC
3048
3049fi
3050fi
3051ac_ct_CC=$ac_cv_prog_ac_ct_CC
3052if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3054$as_echo "$ac_ct_CC" >&6; }
bec39cab 3055else
81ecdfbb
RW
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3057$as_echo "no" >&6; }
c906108c
SS
3058fi
3059
81ecdfbb 3060
bec39cab
AC
3061 test -n "$ac_ct_CC" && break
3062done
c906108c 3063
81ecdfbb
RW
3064 if test "x$ac_ct_CC" = x; then
3065 CC=""
3066 else
3067 case $cross_compiling:$ac_tool_warned in
3068yes:)
3069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3071ac_tool_warned=yes ;;
3072esac
3073 CC=$ac_ct_CC
3074 fi
bec39cab
AC
3075fi
3076
3077fi
3078
3079
81ecdfbb
RW
3080test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3082as_fn_error "no acceptable C compiler found in \$PATH
3083See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3084
3085# Provide some information about the compiler.
81ecdfbb
RW
3086$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3087set X $ac_compile
3088ac_compiler=$2
3089for ac_option in --version -v -V -qversion; do
3090 { { ac_try="$ac_compiler $ac_option >&5"
3091case "(($ac_try" in
3092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3093 *) ac_try_echo=$ac_try;;
3094esac
3095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3096$as_echo "$ac_try_echo"; } >&5
3097 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3098 ac_status=$?
81ecdfbb
RW
3099 if test -s conftest.err; then
3100 sed '10a\
3101... rest of stderr output deleted ...
3102 10q' conftest.err >conftest.er1
3103 cat conftest.er1 >&5
3104 rm -f conftest.er1 conftest.err
3105 fi
3106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3107 test $ac_status = 0; }
3108done
bec39cab 3109
81ecdfbb 3110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3111/* end confdefs.h. */
3112
3113int
3114main ()
3115{
3116
3117 ;
3118 return 0;
3119}
3120_ACEOF
3121ac_clean_files_save=$ac_clean_files
81ecdfbb 3122ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3123# Try to create an executable without -o first, disregard a.out.
3124# It will help us diagnose broken compilers, and finding out an intuition
3125# of exeext.
81ecdfbb
RW
3126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3127$as_echo_n "checking for C compiler default output file name... " >&6; }
3128ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3129
3130# The possible output files:
3131ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3132
3133ac_rmfiles=
3134for ac_file in $ac_files
3135do
3136 case $ac_file in
3137 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3138 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3139 esac
3140done
3141rm -f $ac_rmfiles
3142
3143if { { ac_try="$ac_link_default"
3144case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147esac
3148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3149$as_echo "$ac_try_echo"; } >&5
3150 (eval "$ac_link_default") 2>&5
3151 ac_status=$?
3152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3153 test $ac_status = 0; }; then :
3154 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3155# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3156# in a Makefile. We should not override ac_cv_exeext if it was cached,
3157# so that the user can short-circuit this test for compilers unknown to
3158# Autoconf.
3159for ac_file in $ac_files ''
bec39cab
AC
3160do
3161 test -f "$ac_file" || continue
3162 case $ac_file in
81ecdfbb 3163 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3164 ;;
3165 [ab].out )
3166 # We found the default executable, but exeext='' is most
3167 # certainly right.
3168 break;;
3169 *.* )
81ecdfbb
RW
3170 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3171 then :; else
3172 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3173 fi
3174 # We set ac_cv_exeext here because the later test for it is not
3175 # safe: cross compilers may not add the suffix if given an `-o'
3176 # argument, so we may need to know it at that point already.
3177 # Even if this section looks crufty: it has the advantage of
3178 # actually working.
b4e70030
JB
3179 break;;
3180 * )
3181 break;;
bec39cab
AC
3182 esac
3183done
81ecdfbb
RW
3184test "$ac_cv_exeext" = no && ac_cv_exeext=
3185
bec39cab 3186else
81ecdfbb
RW
3187 ac_file=''
3188fi
3189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3190$as_echo "$ac_file" >&6; }
3191if test -z "$ac_file"; then :
3192 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3193sed 's/^/| /' conftest.$ac_ext >&5
3194
81ecdfbb
RW
3195{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3197{ as_fn_set_status 77
3198as_fn_error "C compiler cannot create executables
3199See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3200fi
b4e70030 3201ac_exeext=$ac_cv_exeext
b4e70030 3202
81ecdfbb 3203# Check that the compiler produces executables we can run. If not, either
bec39cab 3204# the compiler is broken, or we cross compile.
81ecdfbb
RW
3205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3206$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3207# If not cross compiling, check that we can run a simple program.
3208if test "$cross_compiling" != yes; then
3209 if { ac_try='./$ac_file'
81ecdfbb
RW
3210 { { case "(($ac_try" in
3211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3212 *) ac_try_echo=$ac_try;;
3213esac
3214eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3215$as_echo "$ac_try_echo"; } >&5
3216 (eval "$ac_try") 2>&5
bec39cab 3217 ac_status=$?
81ecdfbb
RW
3218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3219 test $ac_status = 0; }; }; then
bec39cab 3220 cross_compiling=no
c906108c 3221 else
bec39cab
AC
3222 if test "$cross_compiling" = maybe; then
3223 cross_compiling=yes
3224 else
81ecdfbb
RW
3225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3226$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3227as_fn_error "cannot run C compiled programs.
bec39cab 3228If you meant to cross compile, use \`--host'.
81ecdfbb 3229See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3230 fi
c906108c 3231 fi
bec39cab 3232fi
81ecdfbb
RW
3233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3234$as_echo "yes" >&6; }
bec39cab 3235
81ecdfbb 3236rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3237ac_clean_files=$ac_clean_files_save
81ecdfbb 3238# Check that the compiler produces executables we can run. If not, either
b4e70030 3239# the compiler is broken, or we cross compile.
81ecdfbb
RW
3240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3241$as_echo_n "checking whether we are cross compiling... " >&6; }
3242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3243$as_echo "$cross_compiling" >&6; }
3244
3245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3246$as_echo_n "checking for suffix of executables... " >&6; }
3247if { { ac_try="$ac_link"
3248case "(($ac_try" in
3249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3250 *) ac_try_echo=$ac_try;;
3251esac
3252eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3253$as_echo "$ac_try_echo"; } >&5
3254 (eval "$ac_link") 2>&5
bec39cab 3255 ac_status=$?
81ecdfbb
RW
3256 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3257 test $ac_status = 0; }; then :
b4e70030
JB
3258 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3259# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3260# work properly (i.e., refer to `conftest.exe'), while it won't with
3261# `rm'.
3262for ac_file in conftest.exe conftest conftest.*; do
3263 test -f "$ac_file" || continue
3264 case $ac_file in
81ecdfbb 3265 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3266 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3267 break;;
3268 * ) break;;
3269 esac
3270done
c906108c 3271else
81ecdfbb
RW
3272 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3273$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3274as_fn_error "cannot compute suffix of executables: cannot compile and link
3275See \`config.log' for more details." "$LINENO" 5; }
c906108c 3276fi
b4e70030 3277rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3279$as_echo "$ac_cv_exeext" >&6; }
c906108c 3280
b4e70030 3281rm -f conftest.$ac_ext
bec39cab
AC
3282EXEEXT=$ac_cv_exeext
3283ac_exeext=$EXEEXT
81ecdfbb
RW
3284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3285$as_echo_n "checking for suffix of object files... " >&6; }
3286if test "${ac_cv_objext+set}" = set; then :
3287 $as_echo_n "(cached) " >&6
bec39cab 3288else
81ecdfbb 3289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3290/* end confdefs.h. */
3291
3292int
3293main ()
3294{
3295
3296 ;
3297 return 0;
3298}
3299_ACEOF
3300rm -f conftest.o conftest.obj
81ecdfbb
RW
3301if { { ac_try="$ac_compile"
3302case "(($ac_try" in
3303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3304 *) ac_try_echo=$ac_try;;
3305esac
3306eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3307$as_echo "$ac_try_echo"; } >&5
3308 (eval "$ac_compile") 2>&5
3309 ac_status=$?
3310 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3311 test $ac_status = 0; }; then :
3312 for ac_file in conftest.o conftest.obj conftest.*; do
3313 test -f "$ac_file" || continue;
bec39cab 3314 case $ac_file in
81ecdfbb 3315 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3316 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3317 break;;
3318 esac
3319done
c906108c 3320else
81ecdfbb 3321 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3322sed 's/^/| /' conftest.$ac_ext >&5
3323
81ecdfbb
RW
3324{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3326as_fn_error "cannot compute suffix of object files: cannot compile
3327See \`config.log' for more details." "$LINENO" 5; }
c906108c 3328fi
b4e70030 3329rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3330fi
81ecdfbb
RW
3331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3332$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3333OBJEXT=$ac_cv_objext
3334ac_objext=$OBJEXT
81ecdfbb
RW
3335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3336$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3337if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3338 $as_echo_n "(cached) " >&6
c906108c 3339else
81ecdfbb 3340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3341/* end confdefs.h. */
3342
3343int
3344main ()
3345{
3346#ifndef __GNUC__
3347 choke me
3348#endif
3349
3350 ;
3351 return 0;
3352}
3353_ACEOF
81ecdfbb 3354if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3355 ac_compiler_gnu=yes
3356else
81ecdfbb 3357 ac_compiler_gnu=no
bec39cab 3358fi
81ecdfbb 3359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3360ac_cv_c_compiler_gnu=$ac_compiler_gnu
3361
3362fi
81ecdfbb
RW
3363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3364$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3365if test $ac_compiler_gnu = yes; then
3366 GCC=yes
3367else
3368 GCC=
3369fi
bec39cab
AC
3370ac_test_CFLAGS=${CFLAGS+set}
3371ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3373$as_echo_n "checking whether $CC accepts -g... " >&6; }
3374if test "${ac_cv_prog_cc_g+set}" = set; then :
3375 $as_echo_n "(cached) " >&6
bec39cab 3376else
81ecdfbb
RW
3377 ac_save_c_werror_flag=$ac_c_werror_flag
3378 ac_c_werror_flag=yes
3379 ac_cv_prog_cc_g=no
3380 CFLAGS="-g"
3381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3382/* end confdefs.h. */
3383
3384int
3385main ()
3386{
3387
3388 ;
3389 return 0;
3390}
3391_ACEOF
81ecdfbb 3392if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3393 ac_cv_prog_cc_g=yes
3394else
81ecdfbb
RW
3395 CFLAGS=""
3396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3397/* end confdefs.h. */
3398
3399int
3400main ()
3401{
3402
3403 ;
3404 return 0;
3405}
3406_ACEOF
3407if ac_fn_c_try_compile "$LINENO"; then :
3408
3409else
3410 ac_c_werror_flag=$ac_save_c_werror_flag
3411 CFLAGS="-g"
3412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3413/* end confdefs.h. */
3414
3415int
3416main ()
3417{
c906108c 3418
81ecdfbb
RW
3419 ;
3420 return 0;
3421}
3422_ACEOF
3423if ac_fn_c_try_compile "$LINENO"; then :
3424 ac_cv_prog_cc_g=yes
3425fi
3426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3427fi
3428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3429fi
81ecdfbb
RW
3430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3431 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3432fi
81ecdfbb
RW
3433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3434$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3435if test "$ac_test_CFLAGS" = set; then
bec39cab 3436 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3437elif test $ac_cv_prog_cc_g = yes; then
3438 if test "$GCC" = yes; then
3439 CFLAGS="-g -O2"
3440 else
3441 CFLAGS="-g"
3442 fi
3443else
3444 if test "$GCC" = yes; then
3445 CFLAGS="-O2"
3446 else
3447 CFLAGS=
3448 fi
3449fi
81ecdfbb
RW
3450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3451$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3452if test "${ac_cv_prog_cc_c89+set}" = set; then :
3453 $as_echo_n "(cached) " >&6
bec39cab 3454else
81ecdfbb 3455 ac_cv_prog_cc_c89=no
bec39cab 3456ac_save_CC=$CC
81ecdfbb 3457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3458/* end confdefs.h. */
c906108c
SS
3459#include <stdarg.h>
3460#include <stdio.h>
3461#include <sys/types.h>
3462#include <sys/stat.h>
3463/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3464struct buf { int x; };
3465FILE * (*rcsopen) (struct buf *, struct stat *, int);
3466static char *e (p, i)
3467 char **p;
3468 int i;
3469{
3470 return p[i];
3471}
3472static char *f (char * (*g) (char **, int), char **p, ...)
3473{
3474 char *s;
3475 va_list v;
3476 va_start (v,p);
3477 s = g (p, va_arg (v,int));
3478 va_end (v);
3479 return s;
3480}
bec39cab
AC
3481
3482/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3483 function prototypes and stuff, but not '\xHH' hex character constants.
3484 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3485 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3486 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3487 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3488 that's true only with -std. */
bec39cab
AC
3489int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3490
81ecdfbb
RW
3491/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3492 inside strings and character constants. */
3493#define FOO(x) 'x'
3494int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3495
c906108c
SS
3496int test (int i, double x);
3497struct s1 {int (*f) (int a);};
3498struct s2 {int (*f) (double a);};
3499int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3500int argc;
3501char **argv;
bec39cab
AC
3502int
3503main ()
3504{
c906108c 3505return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3506 ;
3507 return 0;
3508}
3509_ACEOF
81ecdfbb
RW
3510for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3511 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3512do
3513 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3514 if ac_fn_c_try_compile "$LINENO"; then :
3515 ac_cv_prog_cc_c89=$ac_arg
c906108c 3516fi
81ecdfbb
RW
3517rm -f core conftest.err conftest.$ac_objext
3518 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3519done
81ecdfbb 3520rm -f conftest.$ac_ext
bec39cab 3521CC=$ac_save_CC
c906108c
SS
3522
3523fi
81ecdfbb
RW
3524# AC_CACHE_VAL
3525case "x$ac_cv_prog_cc_c89" in
3526 x)
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3528$as_echo "none needed" >&6; } ;;
3529 xno)
3530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3531$as_echo "unsupported" >&6; } ;;
bec39cab 3532 *)
81ecdfbb
RW
3533 CC="$CC $ac_cv_prog_cc_c89"
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3535$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3536esac
81ecdfbb 3537if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3538
b4e70030
JB
3539fi
3540
bec39cab
AC
3541ac_ext=c
3542ac_cpp='$CPP $CPPFLAGS'
3543ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3544ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3545ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3546
3bc3d82a
PA
3547ac_ext=cpp
3548ac_cpp='$CXXCPP $CPPFLAGS'
3549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3552if test -z "$CXX"; then
3553 if test -n "$CCC"; then
3554 CXX=$CCC
3555 else
3556 if test -n "$ac_tool_prefix"; then
3557 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3558 do
3559 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3560set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3562$as_echo_n "checking for $ac_word... " >&6; }
3563if test "${ac_cv_prog_CXX+set}" = set; then :
3564 $as_echo_n "(cached) " >&6
3565else
3566 if test -n "$CXX"; then
3567 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3568else
3569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3570for as_dir in $PATH
3571do
3572 IFS=$as_save_IFS
3573 test -z "$as_dir" && as_dir=.
3574 for ac_exec_ext in '' $ac_executable_extensions; do
3575 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3576 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3578 break 2
3579 fi
3580done
3581 done
3582IFS=$as_save_IFS
3583
3584fi
3585fi
3586CXX=$ac_cv_prog_CXX
3587if test -n "$CXX"; then
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3589$as_echo "$CXX" >&6; }
3590else
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3592$as_echo "no" >&6; }
3593fi
3594
3595
3596 test -n "$CXX" && break
3597 done
3598fi
3599if test -z "$CXX"; then
3600 ac_ct_CXX=$CXX
3601 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3602do
3603 # Extract the first word of "$ac_prog", so it can be a program name with args.
3604set dummy $ac_prog; ac_word=$2
3605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3606$as_echo_n "checking for $ac_word... " >&6; }
3607if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3608 $as_echo_n "(cached) " >&6
3609else
3610 if test -n "$ac_ct_CXX"; then
3611 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3612else
3613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614for as_dir in $PATH
3615do
3616 IFS=$as_save_IFS
3617 test -z "$as_dir" && as_dir=.
3618 for ac_exec_ext in '' $ac_executable_extensions; do
3619 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3620 ac_cv_prog_ac_ct_CXX="$ac_prog"
3621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3622 break 2
3623 fi
3624done
3625 done
3626IFS=$as_save_IFS
3627
3628fi
3629fi
3630ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3631if test -n "$ac_ct_CXX"; then
3632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3633$as_echo "$ac_ct_CXX" >&6; }
3634else
3635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3636$as_echo "no" >&6; }
3637fi
3638
3639
3640 test -n "$ac_ct_CXX" && break
3641done
3642
3643 if test "x$ac_ct_CXX" = x; then
3644 CXX="g++"
3645 else
3646 case $cross_compiling:$ac_tool_warned in
3647yes:)
3648{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3649$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3650ac_tool_warned=yes ;;
3651esac
3652 CXX=$ac_ct_CXX
3653 fi
3654fi
3655
3656 fi
3657fi
3658# Provide some information about the compiler.
3659$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3660set X $ac_compile
3661ac_compiler=$2
3662for ac_option in --version -v -V -qversion; do
3663 { { ac_try="$ac_compiler $ac_option >&5"
3664case "(($ac_try" in
3665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666 *) ac_try_echo=$ac_try;;
3667esac
3668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3669$as_echo "$ac_try_echo"; } >&5
3670 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3671 ac_status=$?
3672 if test -s conftest.err; then
3673 sed '10a\
3674... rest of stderr output deleted ...
3675 10q' conftest.err >conftest.er1
3676 cat conftest.er1 >&5
3677 rm -f conftest.er1 conftest.err
3678 fi
3679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3680 test $ac_status = 0; }
3681done
3682
3683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3684$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3685if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3686 $as_echo_n "(cached) " >&6
3687else
3688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3689/* end confdefs.h. */
3690
3691int
3692main ()
3693{
3694#ifndef __GNUC__
3695 choke me
3696#endif
3697
3698 ;
3699 return 0;
3700}
3701_ACEOF
3702if ac_fn_cxx_try_compile "$LINENO"; then :
3703 ac_compiler_gnu=yes
3704else
3705 ac_compiler_gnu=no
3706fi
3707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3708ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3709
3710fi
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3712$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3713if test $ac_compiler_gnu = yes; then
3714 GXX=yes
3715else
3716 GXX=
3717fi
3718ac_test_CXXFLAGS=${CXXFLAGS+set}
3719ac_save_CXXFLAGS=$CXXFLAGS
3720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3721$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3722if test "${ac_cv_prog_cxx_g+set}" = set; then :
3723 $as_echo_n "(cached) " >&6
3724else
3725 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3726 ac_cxx_werror_flag=yes
3727 ac_cv_prog_cxx_g=no
3728 CXXFLAGS="-g"
3729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3730/* end confdefs.h. */
3731
3732int
3733main ()
3734{
3735
3736 ;
3737 return 0;
3738}
3739_ACEOF
3740if ac_fn_cxx_try_compile "$LINENO"; then :
3741 ac_cv_prog_cxx_g=yes
3742else
3743 CXXFLAGS=""
3744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3745/* end confdefs.h. */
3746
3747int
3748main ()
3749{
3750
3751 ;
3752 return 0;
3753}
3754_ACEOF
3755if ac_fn_cxx_try_compile "$LINENO"; then :
3756
3757else
3758 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3759 CXXFLAGS="-g"
3760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3761/* end confdefs.h. */
3762
3763int
3764main ()
3765{
3766
3767 ;
3768 return 0;
3769}
3770_ACEOF
3771if ac_fn_cxx_try_compile "$LINENO"; then :
3772 ac_cv_prog_cxx_g=yes
3773fi
3774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3775fi
3776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3777fi
3778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3779 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3780fi
3781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3782$as_echo "$ac_cv_prog_cxx_g" >&6; }
3783if test "$ac_test_CXXFLAGS" = set; then
3784 CXXFLAGS=$ac_save_CXXFLAGS
3785elif test $ac_cv_prog_cxx_g = yes; then
3786 if test "$GXX" = yes; then
3787 CXXFLAGS="-g -O2"
3788 else
3789 CXXFLAGS="-g"
3790 fi
3791else
3792 if test "$GXX" = yes; then
3793 CXXFLAGS="-O2"
3794 else
3795 CXXFLAGS=
3796 fi
3797fi
3798ac_ext=c
3799ac_cpp='$CPP $CPPFLAGS'
3800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3802ac_compiler_gnu=$ac_cv_c_compiler_gnu
3803
3804
60ca704f 3805
bec39cab
AC
3806ac_ext=c
3807ac_cpp='$CPP $CPPFLAGS'
3808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3810ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3812$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3813# On Suns, sometimes $CPP names a directory.
3814if test -n "$CPP" && test -d "$CPP"; then
3815 CPP=
8bb2c122 3816fi
bec39cab 3817if test -z "$CPP"; then
81ecdfbb
RW
3818 if test "${ac_cv_prog_CPP+set}" = set; then :
3819 $as_echo_n "(cached) " >&6
bec39cab
AC
3820else
3821 # Double quotes because CPP needs to be expanded
3822 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3823 do
3824 ac_preproc_ok=false
3825for ac_c_preproc_warn_flag in '' yes
3826do
3827 # Use a header file that comes with gcc, so configuring glibc
3828 # with a fresh cross-compiler works.
3829 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3830 # <limits.h> exists even on freestanding compilers.
3831 # On the NeXT, cc -E runs the code through the compiler's parser,
3832 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3834/* end confdefs.h. */
3835#ifdef __STDC__
3836# include <limits.h>
3837#else
3838# include <assert.h>
3839#endif
3840 Syntax error
3841_ACEOF
81ecdfbb 3842if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3843
81ecdfbb 3844else
bec39cab
AC
3845 # Broken: fails on valid input.
3846continue
3847fi
3848rm -f conftest.err conftest.$ac_ext
3849
81ecdfbb 3850 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3851 # can be detected and how.
81ecdfbb 3852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3853/* end confdefs.h. */
3854#include <ac_nonexistent.h>
3855_ACEOF
81ecdfbb 3856if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3857 # Broken: success on invalid input.
3858continue
8bb2c122 3859else
bec39cab
AC
3860 # Passes both tests.
3861ac_preproc_ok=:
3862break
8bb2c122 3863fi
bec39cab 3864rm -f conftest.err conftest.$ac_ext
8bb2c122 3865
bec39cab
AC
3866done
3867# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3868rm -f conftest.err conftest.$ac_ext
81ecdfbb 3869if $ac_preproc_ok; then :
bec39cab
AC
3870 break
3871fi
8bb2c122 3872
bec39cab
AC
3873 done
3874 ac_cv_prog_CPP=$CPP
ddc9cd0f 3875
c906108c 3876fi
bec39cab
AC
3877 CPP=$ac_cv_prog_CPP
3878else
3879 ac_cv_prog_CPP=$CPP
c906108c 3880fi
81ecdfbb
RW
3881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3882$as_echo "$CPP" >&6; }
bec39cab
AC
3883ac_preproc_ok=false
3884for ac_c_preproc_warn_flag in '' yes
3885do
3886 # Use a header file that comes with gcc, so configuring glibc
3887 # with a fresh cross-compiler works.
3888 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3889 # <limits.h> exists even on freestanding compilers.
3890 # On the NeXT, cc -E runs the code through the compiler's parser,
3891 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3893/* end confdefs.h. */
3894#ifdef __STDC__
3895# include <limits.h>
3896#else
3897# include <assert.h>
3898#endif
3899 Syntax error
3900_ACEOF
81ecdfbb 3901if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3902
81ecdfbb 3903else
bec39cab
AC
3904 # Broken: fails on valid input.
3905continue
3906fi
3907rm -f conftest.err conftest.$ac_ext
3908
81ecdfbb 3909 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3910 # can be detected and how.
81ecdfbb 3911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3912/* end confdefs.h. */
3913#include <ac_nonexistent.h>
3914_ACEOF
81ecdfbb 3915if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3916 # Broken: success on invalid input.
3917continue
c906108c 3918else
bec39cab
AC
3919 # Passes both tests.
3920ac_preproc_ok=:
3921break
c906108c 3922fi
bec39cab 3923rm -f conftest.err conftest.$ac_ext
c906108c 3924
bec39cab
AC
3925done
3926# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3927rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3928if $ac_preproc_ok; then :
3929
c906108c 3930else
81ecdfbb
RW
3931 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3933as_fn_error "C preprocessor \"$CPP\" fails sanity check
3934See \`config.log' for more details." "$LINENO" 5; }
c906108c 3935fi
c906108c 3936
bec39cab
AC
3937ac_ext=c
3938ac_cpp='$CPP $CPPFLAGS'
3939ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3940ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3941ac_compiler_gnu=$ac_cv_c_compiler_gnu
3942
3943
81ecdfbb
RW
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3945$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3946if test "${ac_cv_path_GREP+set}" = set; then :
3947 $as_echo_n "(cached) " >&6
4e8d927d 3948else
81ecdfbb
RW
3949 if test -z "$GREP"; then
3950 ac_path_GREP_found=false
3951 # Loop through the user's path and test for each of PROGNAME-LIST
3952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3954do
3955 IFS=$as_save_IFS
3956 test -z "$as_dir" && as_dir=.
3957 for ac_prog in grep ggrep; do
3958 for ac_exec_ext in '' $ac_executable_extensions; do
3959 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3960 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3961# Check for GNU ac_path_GREP and select it if it is found.
3962 # Check for GNU $ac_path_GREP
3963case `"$ac_path_GREP" --version 2>&1` in
3964*GNU*)
3965 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3966*)
3967 ac_count=0
3968 $as_echo_n 0123456789 >"conftest.in"
3969 while :
3970 do
3971 cat "conftest.in" "conftest.in" >"conftest.tmp"
3972 mv "conftest.tmp" "conftest.in"
3973 cp "conftest.in" "conftest.nl"
3974 $as_echo 'GREP' >> "conftest.nl"
3975 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3976 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3977 as_fn_arith $ac_count + 1 && ac_count=$as_val
3978 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3979 # Best one so far, save it but keep looking for a better one
3980 ac_cv_path_GREP="$ac_path_GREP"
3981 ac_path_GREP_max=$ac_count
bec39cab 3982 fi
81ecdfbb
RW
3983 # 10*(2^10) chars as input seems more than enough
3984 test $ac_count -gt 10 && break
3985 done
3986 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3987esac
bec39cab 3988
81ecdfbb
RW
3989 $ac_path_GREP_found && break 3
3990 done
3991 done
3992 done
3993IFS=$as_save_IFS
3994 if test -z "$ac_cv_path_GREP"; then
3995 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3996 fi
c906108c 3997else
81ecdfbb 3998 ac_cv_path_GREP=$GREP
c906108c 3999fi
c906108c 4000
81ecdfbb
RW
4001fi
4002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4003$as_echo "$ac_cv_path_GREP" >&6; }
4004 GREP="$ac_cv_path_GREP"
c906108c 4005
c906108c 4006
81ecdfbb
RW
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4008$as_echo_n "checking for egrep... " >&6; }
4009if test "${ac_cv_path_EGREP+set}" = set; then :
4010 $as_echo_n "(cached) " >&6
783e057b 4011else
81ecdfbb
RW
4012 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4013 then ac_cv_path_EGREP="$GREP -E"
4014 else
4015 if test -z "$EGREP"; then
4016 ac_path_EGREP_found=false
4017 # Loop through the user's path and test for each of PROGNAME-LIST
4018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4019for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4020do
4021 IFS=$as_save_IFS
4022 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4023 for ac_prog in egrep; do
4024 for ac_exec_ext in '' $ac_executable_extensions; do
4025 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4026 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4027# Check for GNU ac_path_EGREP and select it if it is found.
4028 # Check for GNU $ac_path_EGREP
4029case `"$ac_path_EGREP" --version 2>&1` in
4030*GNU*)
4031 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4032*)
4033 ac_count=0
4034 $as_echo_n 0123456789 >"conftest.in"
4035 while :
4036 do
4037 cat "conftest.in" "conftest.in" >"conftest.tmp"
4038 mv "conftest.tmp" "conftest.in"
4039 cp "conftest.in" "conftest.nl"
4040 $as_echo 'EGREP' >> "conftest.nl"
4041 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4042 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4043 as_fn_arith $ac_count + 1 && ac_count=$as_val
4044 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4045 # Best one so far, save it but keep looking for a better one
4046 ac_cv_path_EGREP="$ac_path_EGREP"
4047 ac_path_EGREP_max=$ac_count
4048 fi
4049 # 10*(2^10) chars as input seems more than enough
4050 test $ac_count -gt 10 && break
4051 done
4052 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4053esac
bec39cab 4054
81ecdfbb
RW
4055 $ac_path_EGREP_found && break 3
4056 done
4057 done
4058 done
4059IFS=$as_save_IFS
4060 if test -z "$ac_cv_path_EGREP"; then
4061 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4062 fi
783e057b 4063else
81ecdfbb 4064 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4065fi
4066
81ecdfbb 4067 fi
783e057b 4068fi
81ecdfbb
RW
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4070$as_echo "$ac_cv_path_EGREP" >&6; }
4071 EGREP="$ac_cv_path_EGREP"
4072
783e057b 4073
81ecdfbb
RW
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4075$as_echo_n "checking for ANSI C header files... " >&6; }
4076if test "${ac_cv_header_stdc+set}" = set; then :
4077 $as_echo_n "(cached) " >&6
783e057b 4078else
81ecdfbb 4079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4080/* end confdefs.h. */
783e057b 4081#include <stdlib.h>
bec39cab 4082#include <stdarg.h>
783e057b
DJ
4083#include <string.h>
4084#include <float.h>
c906108c 4085
bec39cab
AC
4086int
4087main ()
4088{
c906108c 4089
bec39cab
AC
4090 ;
4091 return 0;
4092}
4093_ACEOF
81ecdfbb 4094if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4095 ac_cv_header_stdc=yes
c906108c 4096else
81ecdfbb 4097 ac_cv_header_stdc=no
c906108c 4098fi
81ecdfbb 4099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4100
783e057b
DJ
4101if test $ac_cv_header_stdc = yes; then
4102 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4104/* end confdefs.h. */
4105#include <string.h>
c906108c 4106
783e057b
DJ
4107_ACEOF
4108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4109 $EGREP "memchr" >/dev/null 2>&1; then :
4110
c906108c 4111else
783e057b 4112 ac_cv_header_stdc=no
c906108c 4113fi
783e057b 4114rm -f conftest*
c906108c
SS
4115
4116fi
4117
783e057b
DJ
4118if test $ac_cv_header_stdc = yes; then
4119 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4121/* end confdefs.h. */
4122#include <stdlib.h>
bec39cab 4123
783e057b
DJ
4124_ACEOF
4125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4126 $EGREP "free" >/dev/null 2>&1; then :
4127
bec39cab 4128else
783e057b 4129 ac_cv_header_stdc=no
bec39cab 4130fi
783e057b 4131rm -f conftest*
bec39cab
AC
4132
4133fi
bec39cab 4134
783e057b
DJ
4135if test $ac_cv_header_stdc = yes; then
4136 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4137 if test "$cross_compiling" = yes; then :
783e057b 4138 :
bec39cab 4139else
81ecdfbb 4140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4141/* end confdefs.h. */
4142#include <ctype.h>
81ecdfbb 4143#include <stdlib.h>
783e057b
DJ
4144#if ((' ' & 0x0FF) == 0x020)
4145# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4146# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4147#else
4148# define ISLOWER(c) \
4149 (('a' <= (c) && (c) <= 'i') \
4150 || ('j' <= (c) && (c) <= 'r') \
4151 || ('s' <= (c) && (c) <= 'z'))
4152# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4153#endif
4154
4155#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4156int
4157main ()
4158{
4159 int i;
4160 for (i = 0; i < 256; i++)
4161 if (XOR (islower (i), ISLOWER (i))
4162 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4163 return 2;
4164 return 0;
783e057b
DJ
4165}
4166_ACEOF
81ecdfbb 4167if ac_fn_c_try_run "$LINENO"; then :
783e057b 4168
81ecdfbb
RW
4169else
4170 ac_cv_header_stdc=no
783e057b 4171fi
81ecdfbb
RW
4172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4173 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4174fi
81ecdfbb 4175
783e057b
DJ
4176fi
4177fi
81ecdfbb
RW
4178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4179$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4180if test $ac_cv_header_stdc = yes; then
4181
81ecdfbb 4182$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4183
4184fi
4185
4186# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4187for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4188 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4189do :
4190 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4191ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4192"
4193eval as_val=\$$as_ac_Header
4194 if test "x$as_val" = x""yes; then :
783e057b 4195 cat >>confdefs.h <<_ACEOF
81ecdfbb 4196#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4197_ACEOF
4198
4199fi
4200
4201done
4202
4203
4204
81ecdfbb
RW
4205 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4206if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4207 MINIX=yes
4208else
4209 MINIX=
4210fi
4211
4212
4213 if test "$MINIX" = yes; then
4214
81ecdfbb 4215$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4216
4217
81ecdfbb 4218$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4219
4220
81ecdfbb 4221$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4222
4223 fi
4224
4225
81ecdfbb
RW
4226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4227$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4228if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4229 $as_echo_n "(cached) " >&6
783e057b 4230else
81ecdfbb 4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4232/* end confdefs.h. */
4233
c971b7fa
PA
4234# define __EXTENSIONS__ 1
4235 $ac_includes_default
783e057b
DJ
4236int
4237main ()
4238{
4239
4240 ;
4241 return 0;
4242}
4243_ACEOF
81ecdfbb 4244if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4245 ac_cv_safe_to_define___extensions__=yes
4246else
81ecdfbb 4247 ac_cv_safe_to_define___extensions__=no
783e057b 4248fi
81ecdfbb 4249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4250fi
81ecdfbb
RW
4251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4252$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4253 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4254 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4255
81ecdfbb 4256 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4257
81ecdfbb 4258 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4259
81ecdfbb 4260 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4261
81ecdfbb 4262 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4263
4264
c971b7fa
PA
4265ac_aux_dir=
4266for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4267 for ac_t in install-sh install.sh shtool; do
4268 if test -f "$ac_dir/$ac_t"; then
4269 ac_aux_dir=$ac_dir
4270 ac_install_sh="$ac_aux_dir/$ac_t -c"
4271 break 2
4272 fi
4273 done
4274done
4275if test -z "$ac_aux_dir"; then
4276 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4277fi
770d76d7 4278
c971b7fa
PA
4279# These three variables are undocumented and unsupported,
4280# and are intended to be withdrawn in a future Autoconf release.
4281# They can cause serious problems if a builder's source tree is in a directory
4282# whose full name contains unusual characters.
4283ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4284ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4285ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4286
770d76d7 4287
c971b7fa
PA
4288# Make sure we can run config.sub.
4289$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4290 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4291
c971b7fa
PA
4292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4293$as_echo_n "checking build system type... " >&6; }
4294if test "${ac_cv_build+set}" = set; then :
4295 $as_echo_n "(cached) " >&6
770d76d7 4296else
c971b7fa
PA
4297 ac_build_alias=$build_alias
4298test "x$ac_build_alias" = x &&
4299 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4300test "x$ac_build_alias" = x &&
4301 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4302ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4303 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4304
770d76d7 4305fi
c971b7fa
PA
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4307$as_echo "$ac_cv_build" >&6; }
4308case $ac_cv_build in
4309*-*-*) ;;
4310*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4311esac
c971b7fa
PA
4312build=$ac_cv_build
4313ac_save_IFS=$IFS; IFS='-'
4314set x $ac_cv_build
4315shift
4316build_cpu=$1
4317build_vendor=$2
4318shift; shift
4319# Remember, the first character of IFS is used to create $*,
4320# except with old shells:
4321build_os=$*
4322IFS=$ac_save_IFS
4323case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4324
4325
c971b7fa
PA
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4327$as_echo_n "checking host system type... " >&6; }
4328if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4329 $as_echo_n "(cached) " >&6
4330else
c971b7fa
PA
4331 if test "x$host_alias" = x; then
4332 ac_cv_host=$ac_cv_build
81ecdfbb 4333else
c971b7fa
PA
4334 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4335 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4336fi
81ecdfbb
RW
4337
4338fi
c971b7fa
PA
4339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4340$as_echo "$ac_cv_host" >&6; }
4341case $ac_cv_host in
4342*-*-*) ;;
4343*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4344esac
c971b7fa
PA
4345host=$ac_cv_host
4346ac_save_IFS=$IFS; IFS='-'
4347set x $ac_cv_host
4348shift
4349host_cpu=$1
4350host_vendor=$2
4351shift; shift
4352# Remember, the first character of IFS is used to create $*,
4353# except with old shells:
4354host_os=$*
4355IFS=$ac_save_IFS
4356case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4357
4358
4359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4360$as_echo_n "checking target system type... " >&6; }
4361if test "${ac_cv_target+set}" = set; then :
4362 $as_echo_n "(cached) " >&6
4363else
4364 if test "x$target_alias" = x; then
4365 ac_cv_target=$ac_cv_host
4366else
4367 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4368 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4369fi
4370
4371fi
4372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4373$as_echo "$ac_cv_target" >&6; }
4374case $ac_cv_target in
4375*-*-*) ;;
4376*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4377esac
4378target=$ac_cv_target
4379ac_save_IFS=$IFS; IFS='-'
4380set x $ac_cv_target
4381shift
4382target_cpu=$1
4383target_vendor=$2
4384shift; shift
4385# Remember, the first character of IFS is used to create $*,
4386# except with old shells:
4387target_os=$*
4388IFS=$ac_save_IFS
4389case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4390
4391
4392# The aliases save the names the user supplied, while $host etc.
4393# will get canonicalized.
4394test -n "$target_alias" &&
4395 test "$program_prefix$program_suffix$program_transform_name" = \
4396 NONENONEs,x,x, &&
4397 program_prefix=${target_alias}-
4398
4399# The tests for host and target for $enable_largefile require
4400# canonical names.
4401
4402
81ecdfbb 4403
da2f07f1
JK
4404# As the $enable_largefile decision depends on --enable-plugins we must set it
4405# even in directories otherwise not depending on the $plugins option.
4406
4407
2974be62
AM
4408 maybe_plugins=no
4409 for ac_header in dlfcn.h
4410do :
4411 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4412"
4413if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4414 cat >>confdefs.h <<_ACEOF
4415#define HAVE_DLFCN_H 1
4416_ACEOF
4417 maybe_plugins=yes
4418fi
4419
4420done
4421
4422 for ac_header in windows.h
4423do :
4424 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4425"
4426if test "x$ac_cv_header_windows_h" = x""yes; then :
4427 cat >>confdefs.h <<_ACEOF
4428#define HAVE_WINDOWS_H 1
4429_ACEOF
4430 maybe_plugins=yes
4431fi
4432
4433done
4434
4435
4436 # Check whether --enable-plugins was given.
da2f07f1
JK
4437if test "${enable_plugins+set}" = set; then :
4438 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4439 no) plugins=no ;;
4440 *) plugins=yes
4441 if test "$maybe_plugins" != "yes" ; then
4442 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4443 fi ;;
4444 esac
da2f07f1 4445else
2974be62
AM
4446 plugins=$maybe_plugins
4447
da2f07f1
JK
4448fi
4449
2974be62
AM
4450 if test "$plugins" = "yes"; then
4451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4452$as_echo_n "checking for library containing dlopen... " >&6; }
4453if test "${ac_cv_search_dlopen+set}" = set; then :
4454 $as_echo_n "(cached) " >&6
4455else
4456 ac_func_search_save_LIBS=$LIBS
4457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458/* end confdefs.h. */
4459
4460/* Override any GCC internal prototype to avoid an error.
4461 Use char because int might match the return type of a GCC
4462 builtin and then its argument prototype would still apply. */
4463#ifdef __cplusplus
4464extern "C"
4465#endif
4466char dlopen ();
4467int
4468main ()
4469{
4470return dlopen ();
4471 ;
4472 return 0;
4473}
4474_ACEOF
4475for ac_lib in '' dl; do
4476 if test -z "$ac_lib"; then
4477 ac_res="none required"
4478 else
4479 ac_res=-l$ac_lib
4480 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4481 fi
4482 if ac_fn_c_try_link "$LINENO"; then :
4483 ac_cv_search_dlopen=$ac_res
4484fi
4485rm -f core conftest.err conftest.$ac_objext \
4486 conftest$ac_exeext
4487 if test "${ac_cv_search_dlopen+set}" = set; then :
4488 break
4489fi
4490done
4491if test "${ac_cv_search_dlopen+set}" = set; then :
4492
4493else
4494 ac_cv_search_dlopen=no
4495fi
4496rm conftest.$ac_ext
4497LIBS=$ac_func_search_save_LIBS
4498fi
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4500$as_echo "$ac_cv_search_dlopen" >&6; }
4501ac_res=$ac_cv_search_dlopen
4502if test "$ac_res" != no; then :
4503 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4504
4505fi
4506
4507 fi
da2f07f1
JK
4508
4509
4510case "${host}" in
4511 sparc-*-solaris*|i[3-7]86-*-solaris*)
4512 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4513 # are mutually exclusive; and without procfs support, the bfd/ elf module
4514 # cannot provide certain routines such as elfcore_write_prpsinfo
4515 # or elfcore_write_prstatus. So unless the user explicitly requested
4516 # large-file support through the --enable-largefile switch, disable
4517 # large-file support in favor of procfs support.
4518 test "${target}" = "${host}" -a "x$plugins" = xno \
4519 && : ${enable_largefile="no"}
4520 ;;
4521esac
4522
4523# Check whether --enable-largefile was given.
4524if test "${enable_largefile+set}" = set; then :
4525 enableval=$enable_largefile;
4526fi
4527
4528if test "$enable_largefile" != no; then
4529
4530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4531$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4532if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4533 $as_echo_n "(cached) " >&6
4534else
4535 ac_cv_sys_largefile_CC=no
4536 if test "$GCC" != yes; then
4537 ac_save_CC=$CC
4538 while :; do
4539 # IRIX 6.2 and later do not support large files by default,
4540 # so use the C compiler's -n32 option if that helps.
4541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4542/* end confdefs.h. */
4543#include <sys/types.h>
4544 /* Check that off_t can represent 2**63 - 1 correctly.
4545 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4546 since some C++ compilers masquerading as C compilers
4547 incorrectly reject 9223372036854775807. */
4548#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4549 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4550 && LARGE_OFF_T % 2147483647 == 1)
4551 ? 1 : -1];
4552int
4553main ()
4554{
4555
4556 ;
4557 return 0;
4558}
4559_ACEOF
4560 if ac_fn_c_try_compile "$LINENO"; then :
4561 break
4562fi
4563rm -f core conftest.err conftest.$ac_objext
4564 CC="$CC -n32"
4565 if ac_fn_c_try_compile "$LINENO"; then :
4566 ac_cv_sys_largefile_CC=' -n32'; break
4567fi
4568rm -f core conftest.err conftest.$ac_objext
4569 break
4570 done
4571 CC=$ac_save_CC
4572 rm -f conftest.$ac_ext
4573 fi
4574fi
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4576$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4577 if test "$ac_cv_sys_largefile_CC" != no; then
4578 CC=$CC$ac_cv_sys_largefile_CC
4579 fi
4580
4581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4582$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4583if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 while :; do
4587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588/* end confdefs.h. */
4589#include <sys/types.h>
4590 /* Check that off_t can represent 2**63 - 1 correctly.
4591 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4592 since some C++ compilers masquerading as C compilers
4593 incorrectly reject 9223372036854775807. */
4594#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4595 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4596 && LARGE_OFF_T % 2147483647 == 1)
4597 ? 1 : -1];
4598int
4599main ()
4600{
4601
4602 ;
4603 return 0;
4604}
4605_ACEOF
4606if ac_fn_c_try_compile "$LINENO"; then :
4607 ac_cv_sys_file_offset_bits=no; break
4608fi
4609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611/* end confdefs.h. */
4612#define _FILE_OFFSET_BITS 64
4613#include <sys/types.h>
4614 /* Check that off_t can represent 2**63 - 1 correctly.
4615 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4616 since some C++ compilers masquerading as C compilers
4617 incorrectly reject 9223372036854775807. */
4618#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4619 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4620 && LARGE_OFF_T % 2147483647 == 1)
4621 ? 1 : -1];
4622int
4623main ()
4624{
4625
4626 ;
4627 return 0;
4628}
4629_ACEOF
4630if ac_fn_c_try_compile "$LINENO"; then :
4631 ac_cv_sys_file_offset_bits=64; break
4632fi
4633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4634 ac_cv_sys_file_offset_bits=unknown
4635 break
4636done
4637fi
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4639$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4640case $ac_cv_sys_file_offset_bits in #(
4641 no | unknown) ;;
4642 *)
4643cat >>confdefs.h <<_ACEOF
4644#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4645_ACEOF
4646;;
4647esac
4648rm -rf conftest*
4649 if test $ac_cv_sys_file_offset_bits = unknown; then
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4651$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4652if test "${ac_cv_sys_large_files+set}" = set; then :
4653 $as_echo_n "(cached) " >&6
4654else
4655 while :; do
4656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4657/* end confdefs.h. */
4658#include <sys/types.h>
4659 /* Check that off_t can represent 2**63 - 1 correctly.
4660 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4661 since some C++ compilers masquerading as C compilers
4662 incorrectly reject 9223372036854775807. */
4663#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4664 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4665 && LARGE_OFF_T % 2147483647 == 1)
4666 ? 1 : -1];
4667int
4668main ()
4669{
4670
4671 ;
4672 return 0;
4673}
4674_ACEOF
4675if ac_fn_c_try_compile "$LINENO"; then :
4676 ac_cv_sys_large_files=no; break
4677fi
4678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680/* end confdefs.h. */
4681#define _LARGE_FILES 1
4682#include <sys/types.h>
4683 /* Check that off_t can represent 2**63 - 1 correctly.
4684 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4685 since some C++ compilers masquerading as C compilers
4686 incorrectly reject 9223372036854775807. */
4687#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4688 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4689 && LARGE_OFF_T % 2147483647 == 1)
4690 ? 1 : -1];
4691int
4692main ()
4693{
4694
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_compile "$LINENO"; then :
4700 ac_cv_sys_large_files=1; break
4701fi
4702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4703 ac_cv_sys_large_files=unknown
4704 break
4705done
4706fi
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4708$as_echo "$ac_cv_sys_large_files" >&6; }
4709case $ac_cv_sys_large_files in #(
4710 no | unknown) ;;
4711 *)
4712cat >>confdefs.h <<_ACEOF
4713#define _LARGE_FILES $ac_cv_sys_large_files
4714_ACEOF
4715;;
4716esac
4717rm -rf conftest*
4718 fi
4719fi
4720
4721
4722
81ecdfbb
RW
4723
4724
4725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4726$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4727if test "${am_cv_prog_cc_stdc+set}" = set; then :
4728 $as_echo_n "(cached) " >&6
4729else
4730 am_cv_prog_cc_stdc=no
4731ac_save_CC="$CC"
4732# Don't try gcc -ansi; that turns off useful extensions and
4733# breaks some systems' header files.
4734# AIX -qlanglvl=ansi
4735# Ultrix and OSF/1 -std1
4736# HP-UX 10.20 and later -Ae
4737# HP-UX older versions -Aa -D_HPUX_SOURCE
4738# SVR4 -Xc -D__EXTENSIONS__
4739for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4740do
783e057b 4741 CC="$ac_save_CC $ac_arg"
81ecdfbb 4742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4743/* end confdefs.h. */
4744#include <stdarg.h>
4745#include <stdio.h>
4746#include <sys/types.h>
4747#include <sys/stat.h>
4748/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4749struct buf { int x; };
4750FILE * (*rcsopen) (struct buf *, struct stat *, int);
4751static char *e (p, i)
4752 char **p;
4753 int i;
4754{
4755 return p[i];
4756}
4757static char *f (char * (*g) (char **, int), char **p, ...)
4758{
4759 char *s;
4760 va_list v;
4761 va_start (v,p);
4762 s = g (p, va_arg (v,int));
4763 va_end (v);
4764 return s;
4765}
4766int test (int i, double x);
4767struct s1 {int (*f) (int a);};
4768struct s2 {int (*f) (double a);};
4769int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4770int argc;
4771char **argv;
4772
4773int
4774main ()
4775{
4776
4777return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4778
4779 ;
4780 return 0;
4781}
4782_ACEOF
81ecdfbb 4783if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4784 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4785fi
81ecdfbb 4786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4787done
4788CC="$ac_save_CC"
4789
4790fi
4791
4792if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4794$as_echo "none needed" >&6; }
783e057b 4795else
81ecdfbb
RW
4796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4797$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4798fi
4799case "x$am_cv_prog_cc_stdc" in
4800 x|xno) ;;
4801 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4802esac
4803
4869db5e
RM
4804# expand $ac_aux_dir to an absolute path
4805am_aux_dir=`cd $ac_aux_dir && pwd`
4806
4807if test x"${install_sh}" != xset; then
4808 case $am_aux_dir in
4809 *\ * | *\ *)
4810 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4811 *)
4812 install_sh="\${SHELL} $am_aux_dir/install-sh"
4813 esac
4814fi
4815
4816# Installed binaries are usually stripped using `strip' when the user
4817# run `make install-strip'. However `strip' might not be the right
4818# tool to use in cross-compilation environments, therefore Automake
4819# will honor the `STRIP' environment variable to overrule this program.
4820if test "$cross_compiling" != no; then
4821 if test -n "$ac_tool_prefix"; then
4822 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4823set dummy ${ac_tool_prefix}strip; ac_word=$2
4824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
4826if test "${ac_cv_prog_STRIP+set}" = set; then :
4827 $as_echo_n "(cached) " >&6
4828else
4829 if test -n "$STRIP"; then
4830 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4831else
4832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in $PATH
4834do
4835 IFS=$as_save_IFS
4836 test -z "$as_dir" && as_dir=.
4837 for ac_exec_ext in '' $ac_executable_extensions; do
4838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4839 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4841 break 2
4842 fi
4843done
4844 done
4845IFS=$as_save_IFS
4846
4847fi
4848fi
4849STRIP=$ac_cv_prog_STRIP
4850if test -n "$STRIP"; then
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4852$as_echo "$STRIP" >&6; }
4853else
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
4856fi
4857
4858
4859fi
4860if test -z "$ac_cv_prog_STRIP"; then
4861 ac_ct_STRIP=$STRIP
4862 # Extract the first word of "strip", so it can be a program name with args.
4863set dummy strip; ac_word=$2
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865$as_echo_n "checking for $ac_word... " >&6; }
4866if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4867 $as_echo_n "(cached) " >&6
4868else
4869 if test -n "$ac_ct_STRIP"; then
4870 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4871else
4872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in $PATH
4874do
4875 IFS=$as_save_IFS
4876 test -z "$as_dir" && as_dir=.
4877 for ac_exec_ext in '' $ac_executable_extensions; do
4878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4879 ac_cv_prog_ac_ct_STRIP="strip"
4880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881 break 2
4882 fi
4883done
4884 done
4885IFS=$as_save_IFS
4886
4887fi
4888fi
4889ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4890if test -n "$ac_ct_STRIP"; then
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4892$as_echo "$ac_ct_STRIP" >&6; }
4893else
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895$as_echo "no" >&6; }
4896fi
4897
4898 if test "x$ac_ct_STRIP" = x; then
4899 STRIP=":"
4900 else
4901 case $cross_compiling:$ac_tool_warned in
4902yes:)
4903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4905ac_tool_warned=yes ;;
4906esac
4907 STRIP=$ac_ct_STRIP
4908 fi
4909else
4910 STRIP="$ac_cv_prog_STRIP"
4911fi
4912
4913fi
4914INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4915
783e057b
DJ
4916
4917ac_aux_dir=
81ecdfbb
RW
4918for ac_dir in .. "$srcdir"/..; do
4919 for ac_t in install-sh install.sh shtool; do
4920 if test -f "$ac_dir/$ac_t"; then
4921 ac_aux_dir=$ac_dir
4922 ac_install_sh="$ac_aux_dir/$ac_t -c"
4923 break 2
4924 fi
4925 done
783e057b
DJ
4926done
4927if test -z "$ac_aux_dir"; then
81ecdfbb 4928 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4929fi
81ecdfbb
RW
4930
4931# These three variables are undocumented and unsupported,
4932# and are intended to be withdrawn in a future Autoconf release.
4933# They can cause serious problems if a builder's source tree is in a directory
4934# whose full name contains unusual characters.
4935ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4936ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4937ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4938
783e057b 4939
783e057b 4940
9009e1ae
MR
4941test "$program_prefix" != NONE &&
4942 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4943# Use a double $ so make ignores it.
4944test "$program_suffix" != NONE &&
4945 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4946# Double any \ or $.
4947# By default was `s,x,x', remove it if useless.
4948ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4949program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4950
81ecdfbb 4951
0bcda685
PA
4952# We require a C++11 compiler. Check if one is available, and if
4953# necessary, set CXX_DIALECT to some -std=xxx switch.
4954
4955 ax_cxx_compile_cxx11_required=true
4956 ac_ext=cpp
4957ac_cpp='$CXXCPP $CPPFLAGS'
4958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4961 CXX_DIALECT=""
4962 ac_success=no
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4964$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4965if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4966 $as_echo_n "(cached) " >&6
4967else
4968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4969/* end confdefs.h. */
4970
4971
4972// If the compiler admits that it is not ready for C++11, why torture it?
4973// Hopefully, this will speed up the test.
4974
4975#ifndef __cplusplus
4976
4977#error "This is not a C++ compiler"
4978
4979#elif __cplusplus < 201103L
4980
4981#error "This is not a C++11 compiler"
4982
4983#else
4984
4985namespace cxx11
4986{
4987
4988 namespace test_static_assert
4989 {
4990
4991 template <typename T>
4992 struct check
4993 {
4994 static_assert(sizeof(int) <= sizeof(T), "not big enough");
4995 };
4996
4997 }
4998
4999 namespace test_final_override
5000 {
5001
5002 struct Base
5003 {
5004 virtual void f() {}
5005 };
5006
5007 struct Derived : public Base
5008 {
5009 virtual void f() override {}
5010 };
5011
5012 }
5013
5014 namespace test_double_right_angle_brackets
5015 {
5016
5017 template < typename T >
5018 struct check {};
5019
5020 typedef check<void> single_type;
5021 typedef check<check<void>> double_type;
5022 typedef check<check<check<void>>> triple_type;
5023 typedef check<check<check<check<void>>>> quadruple_type;
5024
5025 }
5026
5027 namespace test_decltype
5028 {
5029
5030 int
5031 f()
5032 {
5033 int a = 1;
5034 decltype(a) b = 2;
5035 return a + b;
5036 }
5037
5038 }
5039
5040 namespace test_type_deduction
5041 {
5042
5043 template < typename T1, typename T2 >
5044 struct is_same
5045 {
5046 static const bool value = false;
5047 };
5048
5049 template < typename T >
5050 struct is_same<T, T>
5051 {
5052 static const bool value = true;
5053 };
5054
5055 template < typename T1, typename T2 >
5056 auto
5057 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5058 {
5059 return a1 + a2;
5060 }
5061
5062 int
5063 test(const int c, volatile int v)
5064 {
5065 static_assert(is_same<int, decltype(0)>::value == true, "");
5066 static_assert(is_same<int, decltype(c)>::value == false, "");
5067 static_assert(is_same<int, decltype(v)>::value == false, "");
5068 auto ac = c;
5069 auto av = v;
5070 auto sumi = ac + av + 'x';
5071 auto sumf = ac + av + 1.0;
5072 static_assert(is_same<int, decltype(ac)>::value == true, "");
5073 static_assert(is_same<int, decltype(av)>::value == true, "");
5074 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5075 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5076 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5077 return (sumf > 0.0) ? sumi : add(c, v);
5078 }
5079
5080 }
5081
5082 namespace test_noexcept
5083 {
5084
5085 int f() { return 0; }
5086 int g() noexcept { return 0; }
5087
5088 static_assert(noexcept(f()) == false, "");
5089 static_assert(noexcept(g()) == true, "");
5090
5091 }
5092
5093 namespace test_constexpr
5094 {
5095
5096 template < typename CharT >
5097 unsigned long constexpr
5098 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5099 {
5100 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5101 }
5102
5103 template < typename CharT >
5104 unsigned long constexpr
5105 strlen_c(const CharT *const s) noexcept
5106 {
5107 return strlen_c_r(s, 0UL);
5108 }
5109
5110 static_assert(strlen_c("") == 0UL, "");
5111 static_assert(strlen_c("1") == 1UL, "");
5112 static_assert(strlen_c("example") == 7UL, "");
5113 static_assert(strlen_c("another\0example") == 7UL, "");
5114
5115 }
5116
5117 namespace test_rvalue_references
5118 {
5119
5120 template < int N >
5121 struct answer
5122 {
5123 static constexpr int value = N;
5124 };
5125
5126 answer<1> f(int&) { return answer<1>(); }
5127 answer<2> f(const int&) { return answer<2>(); }
5128 answer<3> f(int&&) { return answer<3>(); }
5129
5130 void
5131 test()
5132 {
5133 int i = 0;
5134 const int c = 0;
5135 static_assert(decltype(f(i))::value == 1, "");
5136 static_assert(decltype(f(c))::value == 2, "");
5137 static_assert(decltype(f(0))::value == 3, "");
5138 }
5139
5140 }
5141
5142 namespace test_uniform_initialization
5143 {
5144
5145 struct test
5146 {
5147 static const int zero {};
5148 static const int one {1};
5149 };
5150
5151 static_assert(test::zero == 0, "");
5152 static_assert(test::one == 1, "");
5153
5154 }
5155
5156 namespace test_lambdas
5157 {
5158
5159 void
5160 test1()
5161 {
5162 auto lambda1 = [](){};
5163 auto lambda2 = lambda1;
5164 lambda1();
5165 lambda2();
5166 }
5167
5168 int
5169 test2()
5170 {
5171 auto a = [](int i, int j){ return i + j; }(1, 2);
5172 auto b = []() -> int { return '0'; }();
5173 auto c = [=](){ return a + b; }();
5174 auto d = [&](){ return c; }();
5175 auto e = [a, &b](int x) mutable {
5176 const auto identity = [](int y){ return y; };
5177 for (auto i = 0; i < a; ++i)
5178 a += b--;
5179 return x + identity(a + b);
5180 }(0);
5181 return a + b + c + d + e;
5182 }
5183
5184 int
5185 test3()
5186 {
5187 const auto nullary = [](){ return 0; };
5188 const auto unary = [](int x){ return x; };
5189 using nullary_t = decltype(nullary);
5190 using unary_t = decltype(unary);
5191 const auto higher1st = [](nullary_t f){ return f(); };
5192 const auto higher2nd = [unary](nullary_t f1){
5193 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5194 };
5195 return higher1st(nullary) + higher2nd(nullary)(unary);
5196 }
5197
5198 }
5199
5200 namespace test_variadic_templates
5201 {
5202
5203 template <int...>
5204 struct sum;
5205
5206 template <int N0, int... N1toN>
5207 struct sum<N0, N1toN...>
5208 {
5209 static constexpr auto value = N0 + sum<N1toN...>::value;
5210 };
5211
5212 template <>
5213 struct sum<>
5214 {
5215 static constexpr auto value = 0;
5216 };
5217
5218 static_assert(sum<>::value == 0, "");
5219 static_assert(sum<1>::value == 1, "");
5220 static_assert(sum<23>::value == 23, "");
5221 static_assert(sum<1, 2>::value == 3, "");
5222 static_assert(sum<5, 5, 11>::value == 21, "");
5223 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5224
5225 }
5226
5227 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5228 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5229 // because of this.
5230 namespace test_template_alias_sfinae
5231 {
5232
5233 struct foo {};
5234
5235 template<typename T>
5236 using member = typename T::member_type;
5237
5238 template<typename T>
5239 void func(...) {}
5240
5241 template<typename T>
5242 void func(member<T>*) {}
5243
5244 void test();
5245
5246 void test() { func<foo>(0); }
5247
5248 }
5249
5250} // namespace cxx11
5251
5252#endif // __cplusplus >= 201103L
5253
5254
5255
5256_ACEOF
5257if ac_fn_cxx_try_compile "$LINENO"; then :
5258 ax_cv_cxx_compile_cxx11=yes
5259else
5260 ax_cv_cxx_compile_cxx11=no
5261fi
5262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5263fi
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5265$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5266 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5267 ac_success=yes
5268 fi
5269
5270 if test x$ac_success = xno; then
5271 for switch in -std=gnu++11 -std=gnu++0x; do
5272 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5274$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5275if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5276 $as_echo_n "(cached) " >&6
5277else
5278 ac_save_CXX="$CXX"
5279 CXX="$CXX $switch"
5280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5281/* end confdefs.h. */
5282
5283
5284// If the compiler admits that it is not ready for C++11, why torture it?
5285// Hopefully, this will speed up the test.
5286
5287#ifndef __cplusplus
5288
5289#error "This is not a C++ compiler"
5290
5291#elif __cplusplus < 201103L
5292
5293#error "This is not a C++11 compiler"
5294
5295#else
5296
5297namespace cxx11
5298{
5299
5300 namespace test_static_assert
5301 {
5302
5303 template <typename T>
5304 struct check
5305 {
5306 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5307 };
5308
5309 }
5310
5311 namespace test_final_override
5312 {
5313
5314 struct Base
5315 {
5316 virtual void f() {}
5317 };
5318
5319 struct Derived : public Base
5320 {
5321 virtual void f() override {}
5322 };
5323
5324 }
5325
5326 namespace test_double_right_angle_brackets
5327 {
5328
5329 template < typename T >
5330 struct check {};
5331
5332 typedef check<void> single_type;
5333 typedef check<check<void>> double_type;
5334 typedef check<check<check<void>>> triple_type;
5335 typedef check<check<check<check<void>>>> quadruple_type;
5336
5337 }
5338
5339 namespace test_decltype
5340 {
5341
5342 int
5343 f()
5344 {
5345 int a = 1;
5346 decltype(a) b = 2;
5347 return a + b;
5348 }
5349
5350 }
5351
5352 namespace test_type_deduction
5353 {
5354
5355 template < typename T1, typename T2 >
5356 struct is_same
5357 {
5358 static const bool value = false;
5359 };
5360
5361 template < typename T >
5362 struct is_same<T, T>
5363 {
5364 static const bool value = true;
5365 };
5366
5367 template < typename T1, typename T2 >
5368 auto
5369 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5370 {
5371 return a1 + a2;
5372 }
5373
5374 int
5375 test(const int c, volatile int v)
5376 {
5377 static_assert(is_same<int, decltype(0)>::value == true, "");
5378 static_assert(is_same<int, decltype(c)>::value == false, "");
5379 static_assert(is_same<int, decltype(v)>::value == false, "");
5380 auto ac = c;
5381 auto av = v;
5382 auto sumi = ac + av + 'x';
5383 auto sumf = ac + av + 1.0;
5384 static_assert(is_same<int, decltype(ac)>::value == true, "");
5385 static_assert(is_same<int, decltype(av)>::value == true, "");
5386 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5387 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5388 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5389 return (sumf > 0.0) ? sumi : add(c, v);
5390 }
5391
5392 }
5393
5394 namespace test_noexcept
5395 {
5396
5397 int f() { return 0; }
5398 int g() noexcept { return 0; }
5399
5400 static_assert(noexcept(f()) == false, "");
5401 static_assert(noexcept(g()) == true, "");
5402
5403 }
5404
5405 namespace test_constexpr
5406 {
5407
5408 template < typename CharT >
5409 unsigned long constexpr
5410 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5411 {
5412 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5413 }
5414
5415 template < typename CharT >
5416 unsigned long constexpr
5417 strlen_c(const CharT *const s) noexcept
5418 {
5419 return strlen_c_r(s, 0UL);
5420 }
5421
5422 static_assert(strlen_c("") == 0UL, "");
5423 static_assert(strlen_c("1") == 1UL, "");
5424 static_assert(strlen_c("example") == 7UL, "");
5425 static_assert(strlen_c("another\0example") == 7UL, "");
5426
5427 }
5428
5429 namespace test_rvalue_references
5430 {
5431
5432 template < int N >
5433 struct answer
5434 {
5435 static constexpr int value = N;
5436 };
5437
5438 answer<1> f(int&) { return answer<1>(); }
5439 answer<2> f(const int&) { return answer<2>(); }
5440 answer<3> f(int&&) { return answer<3>(); }
5441
5442 void
5443 test()
5444 {
5445 int i = 0;
5446 const int c = 0;
5447 static_assert(decltype(f(i))::value == 1, "");
5448 static_assert(decltype(f(c))::value == 2, "");
5449 static_assert(decltype(f(0))::value == 3, "");
5450 }
5451
5452 }
5453
5454 namespace test_uniform_initialization
5455 {
5456
5457 struct test
5458 {
5459 static const int zero {};
5460 static const int one {1};
5461 };
5462
5463 static_assert(test::zero == 0, "");
5464 static_assert(test::one == 1, "");
5465
5466 }
5467
5468 namespace test_lambdas
5469 {
5470
5471 void
5472 test1()
5473 {
5474 auto lambda1 = [](){};
5475 auto lambda2 = lambda1;
5476 lambda1();
5477 lambda2();
5478 }
5479
5480 int
5481 test2()
5482 {
5483 auto a = [](int i, int j){ return i + j; }(1, 2);
5484 auto b = []() -> int { return '0'; }();
5485 auto c = [=](){ return a + b; }();
5486 auto d = [&](){ return c; }();
5487 auto e = [a, &b](int x) mutable {
5488 const auto identity = [](int y){ return y; };
5489 for (auto i = 0; i < a; ++i)
5490 a += b--;
5491 return x + identity(a + b);
5492 }(0);
5493 return a + b + c + d + e;
5494 }
5495
5496 int
5497 test3()
5498 {
5499 const auto nullary = [](){ return 0; };
5500 const auto unary = [](int x){ return x; };
5501 using nullary_t = decltype(nullary);
5502 using unary_t = decltype(unary);
5503 const auto higher1st = [](nullary_t f){ return f(); };
5504 const auto higher2nd = [unary](nullary_t f1){
5505 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5506 };
5507 return higher1st(nullary) + higher2nd(nullary)(unary);
5508 }
5509
5510 }
5511
5512 namespace test_variadic_templates
5513 {
5514
5515 template <int...>
5516 struct sum;
5517
5518 template <int N0, int... N1toN>
5519 struct sum<N0, N1toN...>
5520 {
5521 static constexpr auto value = N0 + sum<N1toN...>::value;
5522 };
5523
5524 template <>
5525 struct sum<>
5526 {
5527 static constexpr auto value = 0;
5528 };
5529
5530 static_assert(sum<>::value == 0, "");
5531 static_assert(sum<1>::value == 1, "");
5532 static_assert(sum<23>::value == 23, "");
5533 static_assert(sum<1, 2>::value == 3, "");
5534 static_assert(sum<5, 5, 11>::value == 21, "");
5535 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5536
5537 }
5538
5539 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5540 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5541 // because of this.
5542 namespace test_template_alias_sfinae
5543 {
5544
5545 struct foo {};
5546
5547 template<typename T>
5548 using member = typename T::member_type;
5549
5550 template<typename T>
5551 void func(...) {}
5552
5553 template<typename T>
5554 void func(member<T>*) {}
5555
5556 void test();
5557
5558 void test() { func<foo>(0); }
5559
5560 }
5561
5562} // namespace cxx11
5563
5564#endif // __cplusplus >= 201103L
5565
5566
5567
5568_ACEOF
5569if ac_fn_cxx_try_compile "$LINENO"; then :
5570 eval $cachevar=yes
5571else
5572 eval $cachevar=no
5573fi
5574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5575 CXX="$ac_save_CXX"
5576fi
5577eval ac_res=\$$cachevar
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5579$as_echo "$ac_res" >&6; }
5580 if eval test x\$$cachevar = xyes; then
5581 CXX_DIALECT="$switch"
5582 ac_success=yes
5583 break
5584 fi
5585 done
5586 fi
5587
5588 if test x$ac_success = xno; then
5589 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5590 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5592$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5593if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5594 $as_echo_n "(cached) " >&6
5595else
5596 ac_save_CXX="$CXX"
5597 CXX="$CXX $switch"
5598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5599/* end confdefs.h. */
5600
5601
5602// If the compiler admits that it is not ready for C++11, why torture it?
5603// Hopefully, this will speed up the test.
5604
5605#ifndef __cplusplus
5606
5607#error "This is not a C++ compiler"
5608
5609#elif __cplusplus < 201103L
5610
5611#error "This is not a C++11 compiler"
5612
5613#else
5614
5615namespace cxx11
5616{
5617
5618 namespace test_static_assert
5619 {
5620
5621 template <typename T>
5622 struct check
5623 {
5624 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5625 };
5626
5627 }
5628
5629 namespace test_final_override
5630 {
5631
5632 struct Base
5633 {
5634 virtual void f() {}
5635 };
5636
5637 struct Derived : public Base
5638 {
5639 virtual void f() override {}
5640 };
5641
5642 }
5643
5644 namespace test_double_right_angle_brackets
5645 {
5646
5647 template < typename T >
5648 struct check {};
5649
5650 typedef check<void> single_type;
5651 typedef check<check<void>> double_type;
5652 typedef check<check<check<void>>> triple_type;
5653 typedef check<check<check<check<void>>>> quadruple_type;
5654
5655 }
5656
5657 namespace test_decltype
5658 {
5659
5660 int
5661 f()
5662 {
5663 int a = 1;
5664 decltype(a) b = 2;
5665 return a + b;
5666 }
5667
5668 }
5669
5670 namespace test_type_deduction
5671 {
5672
5673 template < typename T1, typename T2 >
5674 struct is_same
5675 {
5676 static const bool value = false;
5677 };
5678
5679 template < typename T >
5680 struct is_same<T, T>
5681 {
5682 static const bool value = true;
5683 };
5684
5685 template < typename T1, typename T2 >
5686 auto
5687 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5688 {
5689 return a1 + a2;
5690 }
5691
5692 int
5693 test(const int c, volatile int v)
5694 {
5695 static_assert(is_same<int, decltype(0)>::value == true, "");
5696 static_assert(is_same<int, decltype(c)>::value == false, "");
5697 static_assert(is_same<int, decltype(v)>::value == false, "");
5698 auto ac = c;
5699 auto av = v;
5700 auto sumi = ac + av + 'x';
5701 auto sumf = ac + av + 1.0;
5702 static_assert(is_same<int, decltype(ac)>::value == true, "");
5703 static_assert(is_same<int, decltype(av)>::value == true, "");
5704 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5705 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5706 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5707 return (sumf > 0.0) ? sumi : add(c, v);
5708 }
5709
5710 }
5711
5712 namespace test_noexcept
5713 {
5714
5715 int f() { return 0; }
5716 int g() noexcept { return 0; }
5717
5718 static_assert(noexcept(f()) == false, "");
5719 static_assert(noexcept(g()) == true, "");
5720
5721 }
5722
5723 namespace test_constexpr
5724 {
5725
5726 template < typename CharT >
5727 unsigned long constexpr
5728 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5729 {
5730 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5731 }
5732
5733 template < typename CharT >
5734 unsigned long constexpr
5735 strlen_c(const CharT *const s) noexcept
5736 {
5737 return strlen_c_r(s, 0UL);
5738 }
5739
5740 static_assert(strlen_c("") == 0UL, "");
5741 static_assert(strlen_c("1") == 1UL, "");
5742 static_assert(strlen_c("example") == 7UL, "");
5743 static_assert(strlen_c("another\0example") == 7UL, "");
5744
5745 }
5746
5747 namespace test_rvalue_references
5748 {
5749
5750 template < int N >
5751 struct answer
5752 {
5753 static constexpr int value = N;
5754 };
5755
5756 answer<1> f(int&) { return answer<1>(); }
5757 answer<2> f(const int&) { return answer<2>(); }
5758 answer<3> f(int&&) { return answer<3>(); }
5759
5760 void
5761 test()
5762 {
5763 int i = 0;
5764 const int c = 0;
5765 static_assert(decltype(f(i))::value == 1, "");
5766 static_assert(decltype(f(c))::value == 2, "");
5767 static_assert(decltype(f(0))::value == 3, "");
5768 }
5769
5770 }
5771
5772 namespace test_uniform_initialization
5773 {
5774
5775 struct test
5776 {
5777 static const int zero {};
5778 static const int one {1};
5779 };
5780
5781 static_assert(test::zero == 0, "");
5782 static_assert(test::one == 1, "");
5783
5784 }
5785
5786 namespace test_lambdas
5787 {
5788
5789 void
5790 test1()
5791 {
5792 auto lambda1 = [](){};
5793 auto lambda2 = lambda1;
5794 lambda1();
5795 lambda2();
5796 }
5797
5798 int
5799 test2()
5800 {
5801 auto a = [](int i, int j){ return i + j; }(1, 2);
5802 auto b = []() -> int { return '0'; }();
5803 auto c = [=](){ return a + b; }();
5804 auto d = [&](){ return c; }();
5805 auto e = [a, &b](int x) mutable {
5806 const auto identity = [](int y){ return y; };
5807 for (auto i = 0; i < a; ++i)
5808 a += b--;
5809 return x + identity(a + b);
5810 }(0);
5811 return a + b + c + d + e;
5812 }
5813
5814 int
5815 test3()
5816 {
5817 const auto nullary = [](){ return 0; };
5818 const auto unary = [](int x){ return x; };
5819 using nullary_t = decltype(nullary);
5820 using unary_t = decltype(unary);
5821 const auto higher1st = [](nullary_t f){ return f(); };
5822 const auto higher2nd = [unary](nullary_t f1){
5823 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5824 };
5825 return higher1st(nullary) + higher2nd(nullary)(unary);
5826 }
5827
5828 }
5829
5830 namespace test_variadic_templates
5831 {
5832
5833 template <int...>
5834 struct sum;
5835
5836 template <int N0, int... N1toN>
5837 struct sum<N0, N1toN...>
5838 {
5839 static constexpr auto value = N0 + sum<N1toN...>::value;
5840 };
5841
5842 template <>
5843 struct sum<>
5844 {
5845 static constexpr auto value = 0;
5846 };
5847
5848 static_assert(sum<>::value == 0, "");
5849 static_assert(sum<1>::value == 1, "");
5850 static_assert(sum<23>::value == 23, "");
5851 static_assert(sum<1, 2>::value == 3, "");
5852 static_assert(sum<5, 5, 11>::value == 21, "");
5853 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5854
5855 }
5856
5857 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5858 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5859 // because of this.
5860 namespace test_template_alias_sfinae
5861 {
5862
5863 struct foo {};
5864
5865 template<typename T>
5866 using member = typename T::member_type;
5867
5868 template<typename T>
5869 void func(...) {}
5870
5871 template<typename T>
5872 void func(member<T>*) {}
5873
5874 void test();
5875
5876 void test() { func<foo>(0); }
5877
5878 }
5879
5880} // namespace cxx11
5881
5882#endif // __cplusplus >= 201103L
5883
5884
5885
5886_ACEOF
5887if ac_fn_cxx_try_compile "$LINENO"; then :
5888 eval $cachevar=yes
5889else
5890 eval $cachevar=no
5891fi
5892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5893 CXX="$ac_save_CXX"
5894fi
5895eval ac_res=\$$cachevar
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5897$as_echo "$ac_res" >&6; }
5898 if eval test x\$$cachevar = xyes; then
5899 CXX_DIALECT="$switch"
5900 ac_success=yes
5901 break
5902 fi
5903 done
5904 fi
5905 ac_ext=c
5906ac_cpp='$CPP $CPPFLAGS'
5907ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5908ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5909ac_compiler_gnu=$ac_cv_c_compiler_gnu
5910
5911 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5912 if test x$ac_success = xno; then
5913 as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5914 fi
5915 fi
5916 if test x$ac_success = xno; then
5917 HAVE_CXX11=0
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5919$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5920 else
5921 HAVE_CXX11=1
5922
5923$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5924
5925 fi
5926
5927
5928
5929
a417dc56
RW
5930# Dependency checking.
5931rm -rf .tst 2>/dev/null
5932mkdir .tst 2>/dev/null
5933if test -d .tst; then
5934 am__leading_dot=.
5935else
5936 am__leading_dot=_
5937fi
5938rmdir .tst 2>/dev/null
5939
5940DEPDIR="${am__leading_dot}deps"
5941
81ecdfbb 5942ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5943
5944
5945depcc="$CC" am_compiler_list=
5946
5947am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5949$as_echo_n "checking dependency style of $depcc... " >&6; }
5950if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5951 $as_echo_n "(cached) " >&6
a417dc56
RW
5952else
5953 if test -f "$am_depcomp"; then
5954 # We make a subdir and do the tests there. Otherwise we can end up
5955 # making bogus files that we don't know about and never remove. For
5956 # instance it was reported that on HP-UX the gcc test will end up
5957 # making a dummy file named `D' -- because `-MD' means `put the output
5958 # in D'.
5959 mkdir conftest.dir
5960 # Copy depcomp to subdir because otherwise we won't find it if we're
5961 # using a relative directory.
5962 cp "$am_depcomp" conftest.dir
5963 cd conftest.dir
5964 # We will build objects and dependencies in a subdirectory because
5965 # it helps to detect inapplicable dependency modes. For instance
5966 # both Tru64's cc and ICC support -MD to output dependencies as a
5967 # side effect of compilation, but ICC will put the dependencies in
5968 # the current directory while Tru64 will put them in the object
5969 # directory.
5970 mkdir sub
5971
5972 am_cv_CC_dependencies_compiler_type=none
5973 if test "$am_compiler_list" = ""; then
5974 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5975 fi
5976 for depmode in $am_compiler_list; do
5977 if test $depmode = none; then break; fi
5978
81ecdfbb 5979 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5980 # Setup a source with many dependencies, because some compilers
5981 # like to wrap large dependency lists on column 80 (with \), and
5982 # we should not choose a depcomp mode which is confused by this.
5983 #
5984 # We need to recreate these files for each test, as the compiler may
5985 # overwrite some of them when testing with obscure command lines.
5986 # This happens at least with the AIX C compiler.
5987 : > sub/conftest.c
5988 for i in 1 2 3 4 5 6; do
5989 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5990 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5991 # Solaris 8's {/usr,}/bin/sh.
5992 touch sub/conftst$i.h
5993 done
5994 echo "include sub/conftest.Po" > confmf
5995
5996 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5997 # mode. It turns out that the SunPro C++ compiler does not properly
5998 # handle `-M -o', and we need to detect this.
5999 depcmd="depmode=$depmode \
6000 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6001 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6002 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6003 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6004 if env $depcmd > conftest.err 2>&1 &&
6005 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6006 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6007 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6008 # icc doesn't choke on unknown options, it will just issue warnings
6009 # or remarks (even with -Werror). So we grep stderr for any message
6010 # that says an option was ignored or not supported.
6011 # When given -MP, icc 7.0 and 7.1 complain thusly:
6012 # icc: Command line warning: ignoring option '-M'; no argument required
6013 # The diagnosis changed in icc 8.0:
6014 # icc: Command line remark: option '-MP' not supported
6015 if (grep 'ignoring option' conftest.err ||
6016 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6017 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6018 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6019 break
6020 fi
6021 fi
81ecdfbb 6022 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6023 sed -e 's/^/| /' < conftest.err >&5
6024 done
6025
6026 cd ..
6027 rm -rf conftest.dir
6028else
6029 am_cv_CC_dependencies_compiler_type=none
6030fi
6031
6032fi
81ecdfbb
RW
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6034$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6035if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 6036then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6037else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6038
6039fi
6040
6041
648d586d
JB
6042gnulib_extra_configure_args=
6043# If large-file support is disabled, make sure gnulib does the same.
6044if test "$enable_largefile" = no; then
6045gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6046fi
6047
c971b7fa
PA
6048# Configure gnulib. We need to build gnulib under some other
6049# directory not "gnulib", to avoid the problem of both GDB and
6050# GDBserver wanting to build it in the same directory, when building
6051# in the source dir.
783e057b 6052
c971b7fa
PA
6053 in_src="gnulib"
6054 in_build="build-gnulib"
648d586d 6055 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6056
6057 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6058 # so they do not pile up.
6059 ac_sub_configure_args=
6060 ac_prev=
6061 eval "set x $ac_configure_args"
6062 shift
6063 for ac_arg
6064 do
6065 if test -n "$ac_prev"; then
6066 ac_prev=
6067 continue
6068 fi
6069 case $ac_arg in
6070 -cache-file | --cache-file | --cache-fil | --cache-fi \
6071 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6072 ac_prev=cache_file ;;
6073 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6074 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6075 | --c=*)
6076 ;;
6077 --config-cache | -C)
6078 ;;
6079 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6080 ac_prev=srcdir ;;
6081 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6082 ;;
6083 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6084 ac_prev=prefix ;;
6085 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6086 ;;
6087 --disable-option-checking)
6088 ;;
6089 *)
6090 case $ac_arg in
6091 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6092 esac
6093 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6094 esac
6095 done
6096
6097 # Always prepend --prefix to ensure using the same prefix
6098 # in subdir configurations.
6099 ac_arg="--prefix=$prefix"
6100 case $ac_arg in
6101 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6102 esac
6103 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6104
6105 # Pass --silent
6106 if test "$silent" = yes; then
6107 ac_sub_configure_args="--silent $ac_sub_configure_args"
6108 fi
6109
6110 # Always prepend --disable-option-checking to silence warnings, since
6111 # different subdirs can have different --enable and --with options.
6112 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6113
6114 ac_popdir=`pwd`
6115 ac_dir=$in_build
6116
6117 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6118 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6119 $as_echo "$ac_msg" >&6
6120 as_dir="$ac_dir"; as_fn_mkdir_p
6121
38ea300a
PA
6122 case $srcdir in
6123 [\\/]* | ?:[\\/]* )
6124 ac_srcdir=$srcdir/$in_src ;;
6125 *) # Relative name.
6126 ac_srcdir=../$srcdir/$in_src ;;
6127 esac
c971b7fa
PA
6128
6129 cd "$ac_dir"
6130
6131 ac_sub_configure=$ac_srcdir/configure
6132
6133 # Make the cache file name correct relative to the subdirectory.
6134 case $cache_file in
6135 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6136 *) # Relative name.
6137 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6138 esac
6139
648d586d
JB
6140 if test -n "$in_extra_args"; then
6141 # Add the extra args at the end.
6142 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6143 fi
6144
c971b7fa
PA
6145 { $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
6146$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6147 # The eval makes quoting arguments work.
6148 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6149 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6150 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6151
6152 cd "$ac_popdir"
783e057b 6153
c971b7fa
PA
6154
6155
6156CONFIG_OBS=
6157CONFIG_DEPS=
6158CONFIG_SRCS=
6159ENABLE_CFLAGS=
6160
6161CONFIG_ALL=
6162CONFIG_CLEAN=
6163CONFIG_INSTALL=
6164CONFIG_UNINSTALL=
6165
6166# If we haven't got the data from the intl directory,
6167# assume NLS is disabled.
6168USE_NLS=no
6169LIBINTL=
6170LIBINTL_DEP=
6171INCINTL=
6172XGETTEXT=
6173GMSGFMT=
6174POSUB=
783e057b
DJ
6175
6176if test -f ../intl/config.intl; then
6177 . ../intl/config.intl
6178fi
81ecdfbb
RW
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6180$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6181if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183$as_echo "no" >&6; }
783e057b 6184else
81ecdfbb
RW
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6186$as_echo "yes" >&6; }
783e057b 6187
81ecdfbb 6188$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6189
6190
81ecdfbb
RW
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6192$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6193 # Look for .po and .gmo files in the source directory.
6194 CATALOGS=
6195 XLINGUAS=
6196 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6197 # If there aren't any .gmo files the shell will give us the
6198 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6199 # weeded out.
6200 case "$cat" in *\**)
6201 continue;;
6202 esac
6203 # The quadruple backslash is collapsed to a double backslash
6204 # by the backticks, then collapsed again by the double quotes,
6205 # leaving us with one backslash in the sed expression (right
6206 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6207 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6208 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6209 # The user is allowed to set LINGUAS to a list of languages to
6210 # install catalogs for. If it's empty that means "all of them."
6211 if test "x$LINGUAS" = x; then
6212 CATALOGS="$CATALOGS $cat"
6213 XLINGUAS="$XLINGUAS $lang"
6214 else
6215 case "$LINGUAS" in *$lang*)
6216 CATALOGS="$CATALOGS $cat"
6217 XLINGUAS="$XLINGUAS $lang"
6218 ;;
6219 esac
e28b3332
DJ
6220 fi
6221 done
c971b7fa
PA
6222 LINGUAS="$XLINGUAS"
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6224$as_echo "$LINGUAS" >&6; }
6225
6226
6227 DATADIRNAME=share
6228
6229 INSTOBJEXT=.mo
6230
6231 GENCAT=gencat
6232
6233 CATOBJEXT=.gmo
e28b3332 6234
e28b3332
DJ
6235fi
6236
c971b7fa
PA
6237localedir='${datadir}/locale'
6238
6239
6240if test x"$USE_NLS" = xyes; then
6241 CONFIG_ALL="$CONFIG_ALL all-po"
6242 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6243 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6244 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6245fi
e28b3332 6246
c971b7fa
PA
6247GNULIB=build-gnulib/import
6248
6249# For Makefile dependencies.
6250GNULIB_STDINT_H=
6251if test x"$STDINT_H" != x; then
6252 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6253fi
6254
6255
c971b7fa
PA
6256PACKAGE=gdb
6257
6258cat >>confdefs.h <<_ACEOF
6259#define PACKAGE "$PACKAGE"
6260_ACEOF
6261
6262
6263
6264# We never need to detect it in this sub-configure.
6265# But preserve it for config.status --recheck.
6266
6267
6268
6269MAKEINFO_EXTRA_FLAGS=""
6270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6271$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6272if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6273 $as_echo_n "(cached) " >&6
6274else
6275 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6276 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6277 gdb_cv_have_makeinfo_click=yes
6278 else
6279 gdb_cv_have_makeinfo_click=no
6280 fi
6281fi
6282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6283$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6284if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6285 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6286fi
e28b3332
DJ
6287
6288
bec39cab
AC
6289
6290
81ecdfbb
RW
6291# Check whether --with-separate-debug-dir was given.
6292if test "${with_separate_debug_dir+set}" = set; then :
6293 withval=$with_separate_debug_dir;
b14b1491
TT
6294 DEBUGDIR=$withval
6295else
6296 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6297fi
6298
20e95c23 6299
783e057b
DJ
6300 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6301 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6302 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6303 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6304
783e057b
DJ
6305cat >>confdefs.h <<_ACEOF
6306#define DEBUGDIR "$ac_define_dir"
20e95c23 6307_ACEOF
20e95c23 6308
20e95c23 6309
20e95c23 6310
0c4a4063 6311
b14b1491
TT
6312 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6313 if test "x$prefix" = xNONE; then
6314 test_prefix=/usr/local
6315 else
6316 test_prefix=$prefix
6317 fi
783e057b 6318 else
b14b1491 6319 test_prefix=$exec_prefix
783e057b 6320 fi
b14b1491
TT
6321 value=0
6322 case ${ac_define_dir} in
6323 "${test_prefix}"|"${test_prefix}/"*|\
6324 '${exec_prefix}'|'${exec_prefix}/'*)
6325 value=1
6326 ;;
6327 esac
6328
6329cat >>confdefs.h <<_ACEOF
6330#define DEBUGDIR_RELOCATABLE $value
6331_ACEOF
6332
6333
6334
0c4a4063 6335
f83d8a90
DE
6336# We can't pass paths as command line arguments.
6337# Mingw32 tries to be clever and will convert the paths for us.
6338# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6339# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6340# This breaks GDB's relocatable path conversions since paths passed in
6341# config.h would not get so translated, the path prefixes no longer match.
6342
6343 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6344 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6345 ac_define_dir=`eval echo $bindir`
6346 ac_define_dir=`eval echo $ac_define_dir`
6347
6348cat >>confdefs.h <<_ACEOF
6349#define BINDIR "$ac_define_dir"
6350_ACEOF
6351
6352
6353
b14b1491
TT
6354# GDB's datadir relocation
6355
6356
6357
81ecdfbb
RW
6358# Check whether --with-gdb-datadir was given.
6359if test "${with_gdb_datadir+set}" = set; then :
6360 withval=$with_gdb_datadir;
b14b1491 6361 GDB_DATADIR=$withval
20e95c23 6362else
b14b1491 6363 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6364fi
6365
20e95c23 6366
b14b1491
TT
6367 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6368 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6369 ac_define_dir=`eval echo $GDB_DATADIR`
6370 ac_define_dir=`eval echo $ac_define_dir`
6371
6372cat >>confdefs.h <<_ACEOF
6373#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6374_ACEOF
6375
b14b1491
TT
6376
6377
0c4a4063 6378
b14b1491
TT
6379 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6380 if test "x$prefix" = xNONE; then
6381 test_prefix=/usr/local
6382 else
6383 test_prefix=$prefix
6384 fi
6385 else
6386 test_prefix=$exec_prefix
6387 fi
6388 value=0
6389 case ${ac_define_dir} in
6390 "${test_prefix}"|"${test_prefix}/"*|\
6391 '${exec_prefix}'|'${exec_prefix}/'*)
6392 value=1
6393 ;;
6394 esac
6395
6396cat >>confdefs.h <<_ACEOF
6397#define GDB_DATADIR_RELOCATABLE $value
6398_ACEOF
6399
6400
783e057b 6401
20e95c23 6402
0c4a4063 6403
81ecdfbb
RW
6404# Check whether --with-relocated-sources was given.
6405if test "${with_relocated_sources+set}" = set; then :
6406 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6407
6408 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6409 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6410 ac_define_dir=`eval echo $reloc_srcdir`
6411 ac_define_dir=`eval echo $ac_define_dir`
6412
6413cat >>confdefs.h <<_ACEOF
6414#define RELOC_SRCDIR "$ac_define_dir"
6415_ACEOF
6416
6417
6418
81ecdfbb
RW
6419fi
6420
29b0e8a2 6421
7349ff92
JK
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6423$as_echo_n "checking for default auto-load directory... " >&6; }
6424
6425# Check whether --with-auto-load-dir was given.
6426if test "${with_auto_load_dir+set}" = set; then :
6427 withval=$with_auto_load_dir;
6428else
1564a261 6429 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6430fi
6431
1564a261 6432escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6433
6434 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6435 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6436 ac_define_dir=`eval echo $escape_dir`
6437 ac_define_dir=`eval echo $ac_define_dir`
6438
6439cat >>confdefs.h <<_ACEOF
6440#define AUTO_LOAD_DIR "$ac_define_dir"
6441_ACEOF
6442
6443
6444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6445$as_echo "$with_auto_load_dir" >&6; }
6446
bccbefd2
JK
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6448$as_echo_n "checking for default auto-load safe-path... " >&6; }
6449
6450# Check whether --with-auto-load-safe-path was given.
6451if test "${with_auto_load_safe_path+set}" = set; then :
6452 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6453 with_auto_load_safe_path="/"
6454 fi
bccbefd2 6455else
7349ff92 6456 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6457fi
6458
1564a261 6459escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6460
6461 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6462 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6463 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6464 ac_define_dir=`eval echo $ac_define_dir`
6465
6466cat >>confdefs.h <<_ACEOF
6dea1fbd 6467#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6468_ACEOF
6469
6470
6471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6472$as_echo "$with_auto_load_safe_path" >&6; }
6473
29b0e8a2 6474
20e95c23 6475
5ae98d25 6476subdirs="$subdirs testsuite"
20e95c23
DJ
6477
6478
783e057b 6479# Check whether to support alternative target configurations
81ecdfbb
RW
6480# Check whether --enable-targets was given.
6481if test "${enable_targets+set}" = set; then :
6482 enableval=$enable_targets; case "${enableval}" in
6483 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6484 ;;
6485 no) enable_targets= ;;
6486 *) enable_targets=$enableval ;;
6487esac
81ecdfbb
RW
6488fi
6489
20e95c23 6490
783e057b 6491# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6492# Check whether --enable-64-bit-bfd was given.
6493if test "${enable_64_bit_bfd+set}" = set; then :
6494 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6495 yes) want64=true ;;
6496 no) want64=false ;;
81ecdfbb 6497 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6498esac
6499else
6500 want64=false
81ecdfbb
RW
6501fi
6502
783e057b
DJ
6503# Provide defaults for some variables set by the per-host and per-target
6504# configuration.
6505gdb_host_obs=posix-hdep.o
20e95c23 6506
783e057b
DJ
6507if test "${target}" = "${host}"; then
6508 gdb_native=yes
6509else
6510 gdb_native=no
6511fi
20e95c23 6512
783e057b 6513. $srcdir/configure.host
20e95c23 6514
fb23d554
SDJ
6515# Add in the common host objects.
6516. $srcdir/common/common.host
6517gdb_host_obs="$gdb_host_obs $common_host_obs"
6518
783e057b 6519# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6520
783e057b
DJ
6521TARGET_OBS=
6522all_targets=
b292c783 6523HAVE_NATIVE_GCORE_TARGET=
20e95c23 6524
783e057b 6525for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6526do
783e057b
DJ
6527 if test "$targ_alias" = "all"; then
6528 all_targets=true
6529 else
6530 # Canonicalize the secondary target names.
6531 result=`$ac_config_sub $targ_alias 2>/dev/null`
6532 if test -n "$result"; then
6533 targ=$result
6534 else
6535 targ=$targ_alias
6536 fi
20e95c23 6537
783e057b 6538 . ${srcdir}/configure.tgt
20e95c23 6539
bf307134
JB
6540 if test -z "${gdb_target_obs}"; then :
6541 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6542fi
6543
783e057b
DJ
6544 # Target-specific object files
6545 for i in ${gdb_target_obs}; do
6546 case " $TARGET_OBS " in
6547 *" ${i} "*) ;;
6548 *)
6549 TARGET_OBS="$TARGET_OBS ${i}"
6550 ;;
6551 esac
6552 done
20e95c23 6553
783e057b
DJ
6554 # Check whether this target needs 64-bit CORE_ADDR
6555 if test x${want64} = xfalse; then
6556 . ${srcdir}/../bfd/config.bfd
6557 fi
b292c783
JK
6558
6559 # Check whether this target is native and supports gcore.
6560 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6561 && $gdb_have_gcore; then
6562 HAVE_NATIVE_GCORE_TARGET=1
6563 fi
783e057b 6564 fi
20e95c23
DJ
6565done
6566
783e057b
DJ
6567if test x${all_targets} = xtrue; then
6568
6569 # We want all 64-bit targets if we either:
6570 # - run on a 64-bit host or
6571 # - already require 64-bit support for some other target or
6572 # - the --enable-64-bit-bfd option was supplied
6573 # Otherwise we only support all 32-bit targets.
6574 #
6575 # NOTE: This test must be in sync with the corresponding
6576 # tests in BFD!
20e95c23 6577
783e057b 6578 if test x${want64} = xfalse; then
81ecdfbb
RW
6579 # The cast to long int works around a bug in the HP C Compiler
6580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6582# This bug is HP SR number 8606223364.
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6584$as_echo_n "checking size of long... " >&6; }
6585if test "${ac_cv_sizeof_long+set}" = set; then :
6586 $as_echo_n "(cached) " >&6
c0993dbe 6587else
81ecdfbb 6588 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6589
81ecdfbb
RW
6590else
6591 if test "$ac_cv_type_long" = yes; then
6592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6594{ as_fn_set_status 77
6595as_fn_error "cannot compute sizeof (long)
6596See \`config.log' for more details." "$LINENO" 5; }; }
6597 else
6598 ac_cv_sizeof_long=0
6599 fi
c0993dbe 6600fi
81ecdfbb 6601
c0993dbe 6602fi
81ecdfbb
RW
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6604$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6605
c0993dbe 6606
c0993dbe 6607
c0993dbe
UW
6608cat >>confdefs.h <<_ACEOF
6609#define SIZEOF_LONG $ac_cv_sizeof_long
6610_ACEOF
6611
6612
6613 if test "x${ac_cv_sizeof_long}" = "x8"; then
6614 want64=true
6615 fi
6616 fi
6617 if test x${want64} = xtrue; then
6618 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6619 else
6620 TARGET_OBS='$(ALL_TARGET_OBS)'
6621 fi
6622fi
6623
6624
6625
b292c783 6626
c0993dbe
UW
6627# For other settings, only the main target counts.
6628gdb_sim=
6629gdb_osabi=
6630build_gdbserver=
6631targ=$target; . ${srcdir}/configure.tgt
6632
6633# Fetch the default architecture and default target vector from BFD.
6634targ=$target; . $srcdir/../bfd/config.bfd
6635
6636# We only want the first architecture, so strip off the others if
6637# there is more than one.
6638targ_archs=`echo $targ_archs | sed 's/ .*//'`
6639
6640if test "x$targ_archs" != x; then
6641
6642cat >>confdefs.h <<_ACEOF
6643#define DEFAULT_BFD_ARCH $targ_archs
6644_ACEOF
6645
6646fi
6647if test "x$targ_defvec" != x; then
6648
6649cat >>confdefs.h <<_ACEOF
6650#define DEFAULT_BFD_VEC $targ_defvec
6651_ACEOF
6652
6653fi
6654
c0993dbe
UW
6655# The CLI cannot be disabled yet, but may be in the future.
6656
6657# Enable CLI.
81ecdfbb
RW
6658# Check whether --enable-gdbcli was given.
6659if test "${enable_gdbcli+set}" = set; then :
6660 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
6661 yes)
6662 ;;
6663 no)
81ecdfbb 6664 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 6665 *)
81ecdfbb 6666 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
6667 esac
6668else
6669 enable_gdbcli=yes
81ecdfbb
RW
6670fi
6671
c0993dbe
UW
6672if test x"$enable_gdbcli" = xyes; then
6673 if test -d $srcdir/cli; then
6674 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6675 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6676 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6677 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6678 fi
6679fi
6680
6681# Enable MI.
81ecdfbb
RW
6682# Check whether --enable-gdbmi was given.
6683if test "${enable_gdbmi+set}" = set; then :
6684 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6685 yes | no)
6686 ;;
6687 *)
81ecdfbb 6688 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6689 esac
6690else
6691 enable_gdbmi=yes
81ecdfbb
RW
6692fi
6693
c0993dbe
UW
6694if test x"$enable_gdbmi" = xyes; then
6695 if test -d $srcdir/mi; then
6696 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6697 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6698 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6699 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6700 fi
6701fi
6702
6703# Enable TUI.
81ecdfbb
RW
6704# Check whether --enable-tui was given.
6705if test "${enable_tui+set}" = set; then :
6706 enableval=$enable_tui; case $enableval in
3ca64bd3 6707 yes | no | auto)
c0993dbe
UW
6708 ;;
6709 *)
81ecdfbb 6710 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6711 esac
6712else
3ca64bd3 6713 enable_tui=auto
81ecdfbb
RW
6714fi
6715
c0993dbe
UW
6716
6717# Enable gdbtk.
81ecdfbb
RW
6718# Check whether --enable-gdbtk was given.
6719if test "${enable_gdbtk+set}" = set; then :
6720 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6721 yes | no)
6722 ;;
6723 *)
81ecdfbb 6724 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6725 esac
6726else
5062cc19 6727 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6728 enable_gdbtk=yes
6729 else
6730 enable_gdbtk=no
6731 fi
81ecdfbb
RW
6732fi
6733
c0993dbe
UW
6734# We unconditionally disable gdbtk tests on selected platforms.
6735case $host_os in
6736 go32* | windows*)
81ecdfbb
RW
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6738$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6739 enable_gdbtk=no ;;
6740esac
6741
05e7c244 6742# Libunwind support for ia64.
bec39cab 6743
05e7c244
JK
6744
6745# Check whether --with-libunwind-ia64 was given.
6746if test "${with_libunwind_ia64+set}" = set; then :
6747 withval=$with_libunwind_ia64;
bec39cab 6748else
05e7c244
JK
6749 with_libunwind_ia64=auto
6750fi
bec39cab 6751
05e7c244
JK
6752
6753# Backward compatibility option.
6754if test "${with_libunwind+set}" = set; then
6755 if test x"$with_libunwind_ia64" != xauto; then
6756 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6757 fi
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6759$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6760 with_libunwind_ia64="$with_libunwind"
6761fi
6762
6763case "$with_libunwind_ia64" in
6764 yes | no)
6765 ;;
6766 auto)
6767 for ac_header in libunwind-ia64.h
81ecdfbb 6768do :
b54a8fd7
PA
6769 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6770if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6771 cat >>confdefs.h <<_ACEOF
b54a8fd7 6772#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6773_ACEOF
6774
6775fi
6776
6777done
6778
05e7c244
JK
6779 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6780 ;;
6781 *)
6782 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6783 ;;
6784esac
bec39cab 6785
05e7c244 6786if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6787 for ac_header in libunwind-ia64.h
81ecdfbb 6788do :
b54a8fd7
PA
6789 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6790if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6791 cat >>confdefs.h <<_ACEOF
b54a8fd7 6792#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6793_ACEOF
6794
6795fi
6796
6797done
6798
05e7c244
JK
6799 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6800 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6801 fi
6802 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6803 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6804 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6805fi
6806
cb01cfba
JB
6807opt_curses=no
6808
81ecdfbb
RW
6809# Check whether --with-curses was given.
6810if test "${with_curses+set}" = set; then :
6811 withval=$with_curses; opt_curses=$withval
6812fi
6813
cb01cfba 6814
76a39ba7 6815prefer_curses=no
cb01cfba 6816if test "$opt_curses" = "yes"; then
76a39ba7 6817 prefer_curses=yes
cb01cfba
JB
6818fi
6819
a9322a30 6820# Profiling support.
81ecdfbb
RW
6821# Check whether --enable-profiling was given.
6822if test "${enable_profiling+set}" = set; then :
6823 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6824 yes | no)
6825 ;;
6826 *)
81ecdfbb 6827 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6828 esac
6829else
6830 enable_profiling=no
81ecdfbb 6831fi
bec39cab 6832
a9322a30
TT
6833
6834for ac_func in monstartup _mcleanup
81ecdfbb
RW
6835do :
6836 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6837ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6838eval as_val=\$$as_ac_var
6839 if test "x$as_val" = x""yes; then :
6840 cat >>confdefs.h <<_ACEOF
6841#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6842_ACEOF
a9322a30 6843
81ecdfbb
RW
6844fi
6845done
a9322a30 6846
81ecdfbb
RW
6847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6848$as_echo_n "checking for _etext... " >&6; }
6849if test "${ac_cv_var__etext+set}" = set; then :
6850 $as_echo_n "(cached) " >&6
6851else
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853/* end confdefs.h. */
6854#include <stdlib.h>
6855extern char _etext;
a9322a30
TT
6856
6857int
6858main ()
6859{
6860free (&_etext);
6861 ;
6862 return 0;
6863}
bec39cab 6864_ACEOF
81ecdfbb 6865if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6866 ac_cv_var__etext=yes
bec39cab 6867else
81ecdfbb 6868 ac_cv_var__etext=no
bec39cab 6869fi
81ecdfbb
RW
6870rm -f core conftest.err conftest.$ac_objext \
6871 conftest$ac_exeext conftest.$ac_ext
bec39cab 6872fi
81ecdfbb
RW
6873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6874$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6875if test $ac_cv_var__etext = yes; then
60ca704f 6876
81ecdfbb 6877$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6878
bec39cab 6879fi
81ecdfbb
RW
6880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6881$as_echo_n "checking for etext... " >&6; }
6882if test "${ac_cv_var_etext+set}" = set; then :
6883 $as_echo_n "(cached) " >&6
bec39cab 6884else
81ecdfbb 6885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6886/* end confdefs.h. */
a9322a30
TT
6887#include <stdlib.h>
6888extern char etext;
bec39cab
AC
6889
6890int
6891main ()
6892{
a9322a30 6893free (&etext);
bec39cab
AC
6894 ;
6895 return 0;
6896}
6897_ACEOF
81ecdfbb 6898if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6899 ac_cv_var_etext=yes
bec39cab 6900else
81ecdfbb 6901 ac_cv_var_etext=no
bec39cab 6902fi
81ecdfbb
RW
6903rm -f core conftest.err conftest.$ac_objext \
6904 conftest$ac_exeext conftest.$ac_ext
bec39cab 6905fi
81ecdfbb
RW
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6907$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6908if test $ac_cv_var_etext = yes; then
6909
81ecdfbb 6910$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6911
6912fi
a9322a30
TT
6913if test "$enable_profiling" = yes ; then
6914 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6915 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6916 fi
6917 PROFILE_CFLAGS=-pg
6918 OLD_CFLAGS="$CFLAGS"
6919 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6920
81ecdfbb
RW
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6922$as_echo_n "checking whether $CC supports -pg... " >&6; }
6923if test "${ac_cv_cc_supports_pg+set}" = set; then :
6924 $as_echo_n "(cached) " >&6
bec39cab 6925else
81ecdfbb 6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6927/* end confdefs.h. */
bec39cab
AC
6928
6929int
6930main ()
6931{
a9322a30 6932int x;
bec39cab
AC
6933 ;
6934 return 0;
6935}
6936_ACEOF
81ecdfbb 6937if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6938 ac_cv_cc_supports_pg=yes
bec39cab 6939else
81ecdfbb 6940 ac_cv_cc_supports_pg=no
bec39cab 6941fi
81ecdfbb 6942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6943fi
81ecdfbb
RW
6944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6945$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6946
a9322a30 6947 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6948 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6949 fi
bec39cab 6950
a9322a30 6951 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6952fi
6953
c16158bc
JM
6954
6955
81ecdfbb
RW
6956# Check whether --with-pkgversion was given.
6957if test "${with_pkgversion+set}" = set; then :
6958 withval=$with_pkgversion; case "$withval" in
6959 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6960 no) PKGVERSION= ;;
6961 *) PKGVERSION="($withval) " ;;
6962 esac
6963else
6964 PKGVERSION="(GDB) "
6965
81ecdfbb 6966fi
c16158bc
JM
6967
6968
6969
6970
81ecdfbb
RW
6971
6972# Check whether --with-bugurl was given.
6973if test "${with_bugurl+set}" = set; then :
6974 withval=$with_bugurl; case "$withval" in
6975 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6976 no) BUGURL=
6977 ;;
6978 *) BUGURL="$withval"
6979 ;;
6980 esac
6981else
6982 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6983
81ecdfbb
RW
6984fi
6985
c16158bc
JM
6986 case ${BUGURL} in
6987 "")
6988 REPORT_BUGS_TO=
6989 REPORT_BUGS_TEXI=
6990 ;;
6991 *)
6992 REPORT_BUGS_TO="<$BUGURL>"
6993 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
6994 ;;
6995 esac;
6996
6997
6998
6999
7000cat >>confdefs.h <<_ACEOF
7001#define PKGVERSION "$PKGVERSION"
7002_ACEOF
7003
7004
7005cat >>confdefs.h <<_ACEOF
7006#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7007_ACEOF
7008
7009
bec39cab
AC
7010# --------------------- #
7011# Checks for programs. #
7012# --------------------- #
7013
7014for ac_prog in gawk mawk nawk awk
7015do
7016 # Extract the first word of "$ac_prog", so it can be a program name with args.
7017set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7019$as_echo_n "checking for $ac_word... " >&6; }
7020if test "${ac_cv_prog_AWK+set}" = set; then :
7021 $as_echo_n "(cached) " >&6
bec39cab
AC
7022else
7023 if test -n "$AWK"; then
7024 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7025else
7026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027for as_dir in $PATH
7028do
7029 IFS=$as_save_IFS
7030 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7031 for ac_exec_ext in '' $ac_executable_extensions; do
7032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7033 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7035 break 2
7036 fi
7037done
81ecdfbb
RW
7038 done
7039IFS=$as_save_IFS
bec39cab
AC
7040
7041fi
7042fi
7043AWK=$ac_cv_prog_AWK
7044if test -n "$AWK"; then
81ecdfbb
RW
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7046$as_echo "$AWK" >&6; }
bec39cab 7047else
81ecdfbb
RW
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7049$as_echo "no" >&6; }
bec39cab
AC
7050fi
7051
bec39cab 7052
81ecdfbb 7053 test -n "$AWK" && break
bec39cab
AC
7054done
7055
c971b7fa
PA
7056# Find a good install program. We prefer a C program (faster),
7057# so one script is as good as another. But avoid the broken or
7058# incompatible versions:
7059# SysV /etc/install, /usr/sbin/install
7060# SunOS /usr/etc/install
7061# IRIX /sbin/install
7062# AIX /bin/install
7063# AmigaOS /C/install, which installs bootblocks on floppy discs
7064# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7065# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7066# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7067# OS/2's system install, which has a completely different semantic
7068# ./install, which can be erroneously created by make from ./install.sh.
7069# Reject install programs that cannot install multiple files.
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7071$as_echo_n "checking for a BSD-compatible install... " >&6; }
7072if test -z "$INSTALL"; then
7073if test "${ac_cv_path_install+set}" = set; then :
7074 $as_echo_n "(cached) " >&6
7075else
7076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7077for as_dir in $PATH
7078do
7079 IFS=$as_save_IFS
7080 test -z "$as_dir" && as_dir=.
7081 # Account for people who put trailing slashes in PATH elements.
7082case $as_dir/ in #((
7083 ./ | .// | /[cC]/* | \
7084 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7085 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7086 /usr/ucb/* ) ;;
7087 *)
7088 # OSF1 and SCO ODT 3.0 have their own names for install.
7089 # Don't use installbsd from OSF since it installs stuff as root
7090 # by default.
7091 for ac_prog in ginstall scoinst install; do
7092 for ac_exec_ext in '' $ac_executable_extensions; do
7093 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7094 if test $ac_prog = install &&
7095 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7096 # AIX install. It has an incompatible calling convention.
7097 :
7098 elif test $ac_prog = install &&
7099 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7100 # program-specific install script used by HP pwplus--don't use.
7101 :
7102 else
7103 rm -rf conftest.one conftest.two conftest.dir
7104 echo one > conftest.one
7105 echo two > conftest.two
7106 mkdir conftest.dir
7107 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7108 test -s conftest.one && test -s conftest.two &&
7109 test -s conftest.dir/conftest.one &&
7110 test -s conftest.dir/conftest.two
7111 then
7112 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7113 break 3
7114 fi
7115 fi
7116 fi
7117 done
7118 done
7119 ;;
7120esac
7121
7122 done
7123IFS=$as_save_IFS
7124
7125rm -rf conftest.one conftest.two conftest.dir
7126
7127fi
7128 if test "${ac_cv_path_install+set}" = set; then
7129 INSTALL=$ac_cv_path_install
7130 else
7131 # As a last resort, use the slow shell script. Don't cache a
7132 # value for INSTALL within a source directory, because that will
7133 # break other packages using the cache if that directory is
7134 # removed, or if the value is a relative name.
7135 INSTALL=$ac_install_sh
7136 fi
7137fi
7138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7139$as_echo "$INSTALL" >&6; }
7140
7141# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7142# It thinks the first close brace ends the variable substitution.
7143test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7144
7145test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7146
7147test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7148
81ecdfbb
RW
7149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7150$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7151LN_S=$as_ln_s
7152if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7154$as_echo "yes" >&6; }
bec39cab 7155else
81ecdfbb
RW
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7157$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7158fi
7159
7160if test -n "$ac_tool_prefix"; then
7161 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7162set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7164$as_echo_n "checking for $ac_word... " >&6; }
7165if test "${ac_cv_prog_RANLIB+set}" = set; then :
7166 $as_echo_n "(cached) " >&6
bec39cab
AC
7167else
7168 if test -n "$RANLIB"; then
7169 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7170else
7171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172for as_dir in $PATH
7173do
7174 IFS=$as_save_IFS
7175 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7176 for ac_exec_ext in '' $ac_executable_extensions; do
7177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7178 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7180 break 2
7181 fi
7182done
81ecdfbb
RW
7183 done
7184IFS=$as_save_IFS
bec39cab
AC
7185
7186fi
7187fi
7188RANLIB=$ac_cv_prog_RANLIB
7189if test -n "$RANLIB"; then
81ecdfbb
RW
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7191$as_echo "$RANLIB" >&6; }
bec39cab 7192else
81ecdfbb
RW
7193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7194$as_echo "no" >&6; }
bec39cab
AC
7195fi
7196
81ecdfbb 7197
bec39cab
AC
7198fi
7199if test -z "$ac_cv_prog_RANLIB"; then
7200 ac_ct_RANLIB=$RANLIB
7201 # Extract the first word of "ranlib", so it can be a program name with args.
7202set dummy ranlib; ac_word=$2
81ecdfbb
RW
7203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7204$as_echo_n "checking for $ac_word... " >&6; }
7205if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7206 $as_echo_n "(cached) " >&6
bec39cab
AC
7207else
7208 if test -n "$ac_ct_RANLIB"; then
7209 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7210else
7211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212for as_dir in $PATH
7213do
7214 IFS=$as_save_IFS
7215 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7216 for ac_exec_ext in '' $ac_executable_extensions; do
7217 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7218 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7220 break 2
7221 fi
7222done
81ecdfbb
RW
7223 done
7224IFS=$as_save_IFS
bec39cab 7225
bec39cab
AC
7226fi
7227fi
7228ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7229if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7231$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7232else
81ecdfbb
RW
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7234$as_echo "no" >&6; }
bec39cab
AC
7235fi
7236
81ecdfbb
RW
7237 if test "x$ac_ct_RANLIB" = x; then
7238 RANLIB=":"
7239 else
7240 case $cross_compiling:$ac_tool_warned in
7241yes:)
7242{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7243$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7244ac_tool_warned=yes ;;
7245esac
7246 RANLIB=$ac_ct_RANLIB
7247 fi
bec39cab
AC
7248else
7249 RANLIB="$ac_cv_prog_RANLIB"
7250fi
7251
7252for ac_prog in 'bison -y' byacc
7253do
7254 # Extract the first word of "$ac_prog", so it can be a program name with args.
7255set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7257$as_echo_n "checking for $ac_word... " >&6; }
7258if test "${ac_cv_prog_YACC+set}" = set; then :
7259 $as_echo_n "(cached) " >&6
bec39cab
AC
7260else
7261 if test -n "$YACC"; then
7262 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7263else
7264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7265for as_dir in $PATH
7266do
7267 IFS=$as_save_IFS
7268 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7269 for ac_exec_ext in '' $ac_executable_extensions; do
7270 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7271 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7273 break 2
7274 fi
7275done
81ecdfbb
RW
7276 done
7277IFS=$as_save_IFS
bec39cab
AC
7278
7279fi
7280fi
7281YACC=$ac_cv_prog_YACC
7282if test -n "$YACC"; then
81ecdfbb
RW
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7284$as_echo "$YACC" >&6; }
bec39cab 7285else
81ecdfbb
RW
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287$as_echo "no" >&6; }
bec39cab
AC
7288fi
7289
81ecdfbb 7290
bec39cab
AC
7291 test -n "$YACC" && break
7292done
7293test -n "$YACC" || YACC="yacc"
7294
7295
7296if test -n "$ac_tool_prefix"; then
7297 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7298set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7300$as_echo_n "checking for $ac_word... " >&6; }
7301if test "${ac_cv_prog_AR+set}" = set; then :
7302 $as_echo_n "(cached) " >&6
bec39cab
AC
7303else
7304 if test -n "$AR"; then
7305 ac_cv_prog_AR="$AR" # Let the user override the test.
7306else
7307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7308for as_dir in $PATH
7309do
7310 IFS=$as_save_IFS
7311 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7312 for ac_exec_ext in '' $ac_executable_extensions; do
7313 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7314 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7315 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7316 break 2
7317 fi
7318done
81ecdfbb
RW
7319 done
7320IFS=$as_save_IFS
bec39cab
AC
7321
7322fi
7323fi
7324AR=$ac_cv_prog_AR
7325if test -n "$AR"; then
81ecdfbb
RW
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7327$as_echo "$AR" >&6; }
bec39cab 7328else
81ecdfbb
RW
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7330$as_echo "no" >&6; }
bec39cab
AC
7331fi
7332
81ecdfbb 7333
bec39cab
AC
7334fi
7335if test -z "$ac_cv_prog_AR"; then
7336 ac_ct_AR=$AR
7337 # Extract the first word of "ar", so it can be a program name with args.
7338set dummy ar; ac_word=$2
81ecdfbb
RW
7339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7340$as_echo_n "checking for $ac_word... " >&6; }
7341if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7342 $as_echo_n "(cached) " >&6
bec39cab
AC
7343else
7344 if test -n "$ac_ct_AR"; then
7345 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7346else
7347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7348for as_dir in $PATH
7349do
7350 IFS=$as_save_IFS
7351 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7352 for ac_exec_ext in '' $ac_executable_extensions; do
7353 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7354 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7356 break 2
7357 fi
7358done
81ecdfbb
RW
7359 done
7360IFS=$as_save_IFS
bec39cab
AC
7361
7362fi
7363fi
7364ac_ct_AR=$ac_cv_prog_ac_ct_AR
7365if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7367$as_echo "$ac_ct_AR" >&6; }
bec39cab 7368else
81ecdfbb
RW
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7370$as_echo "no" >&6; }
bec39cab
AC
7371fi
7372
81ecdfbb
RW
7373 if test "x$ac_ct_AR" = x; then
7374 AR=""
7375 else
7376 case $cross_compiling:$ac_tool_warned in
7377yes:)
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7379$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7380ac_tool_warned=yes ;;
7381esac
7382 AR=$ac_ct_AR
7383 fi
bec39cab
AC
7384else
7385 AR="$ac_cv_prog_AR"
7386fi
7387
7388if test -n "$ac_tool_prefix"; then
7389 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7390set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7392$as_echo_n "checking for $ac_word... " >&6; }
7393if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7394 $as_echo_n "(cached) " >&6
bec39cab
AC
7395else
7396 if test -n "$DLLTOOL"; then
7397 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7398else
7399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402 IFS=$as_save_IFS
7403 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7404 for ac_exec_ext in '' $ac_executable_extensions; do
7405 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7406 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7408 break 2
7409 fi
7410done
81ecdfbb
RW
7411 done
7412IFS=$as_save_IFS
bec39cab
AC
7413
7414fi
7415fi
7416DLLTOOL=$ac_cv_prog_DLLTOOL
7417if test -n "$DLLTOOL"; then
81ecdfbb
RW
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7419$as_echo "$DLLTOOL" >&6; }
bec39cab 7420else
81ecdfbb
RW
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422$as_echo "no" >&6; }
bec39cab
AC
7423fi
7424
81ecdfbb 7425
bec39cab
AC
7426fi
7427if test -z "$ac_cv_prog_DLLTOOL"; then
7428 ac_ct_DLLTOOL=$DLLTOOL
7429 # Extract the first word of "dlltool", so it can be a program name with args.
7430set dummy dlltool; ac_word=$2
81ecdfbb
RW
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
7433if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7434 $as_echo_n "(cached) " >&6
bec39cab
AC
7435else
7436 if test -n "$ac_ct_DLLTOOL"; then
7437 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7438else
7439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440for as_dir in $PATH
7441do
7442 IFS=$as_save_IFS
7443 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7444 for ac_exec_ext in '' $ac_executable_extensions; do
7445 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7446 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7448 break 2
7449 fi
7450done
81ecdfbb
RW
7451 done
7452IFS=$as_save_IFS
bec39cab
AC
7453
7454fi
7455fi
7456ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7457if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7459$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7460else
81ecdfbb
RW
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
bec39cab
AC
7463fi
7464
81ecdfbb
RW
7465 if test "x$ac_ct_DLLTOOL" = x; then
7466 DLLTOOL=""
7467 else
7468 case $cross_compiling:$ac_tool_warned in
7469yes:)
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7472ac_tool_warned=yes ;;
7473esac
7474 DLLTOOL=$ac_ct_DLLTOOL
7475 fi
bec39cab
AC
7476else
7477 DLLTOOL="$ac_cv_prog_DLLTOOL"
7478fi
7479
7480if test -n "$ac_tool_prefix"; then
7481 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7482set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7484$as_echo_n "checking for $ac_word... " >&6; }
7485if test "${ac_cv_prog_WINDRES+set}" = set; then :
7486 $as_echo_n "(cached) " >&6
bec39cab
AC
7487else
7488 if test -n "$WINDRES"; then
7489 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7490else
7491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492for as_dir in $PATH
7493do
7494 IFS=$as_save_IFS
7495 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7496 for ac_exec_ext in '' $ac_executable_extensions; do
7497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7498 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7500 break 2
7501 fi
7502done
81ecdfbb
RW
7503 done
7504IFS=$as_save_IFS
bec39cab
AC
7505
7506fi
7507fi
7508WINDRES=$ac_cv_prog_WINDRES
7509if test -n "$WINDRES"; then
81ecdfbb
RW
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7511$as_echo "$WINDRES" >&6; }
bec39cab 7512else
81ecdfbb
RW
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514$as_echo "no" >&6; }
bec39cab
AC
7515fi
7516
81ecdfbb 7517
bec39cab
AC
7518fi
7519if test -z "$ac_cv_prog_WINDRES"; then
7520 ac_ct_WINDRES=$WINDRES
7521 # Extract the first word of "windres", so it can be a program name with args.
7522set dummy windres; ac_word=$2
81ecdfbb
RW
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
7525if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7526 $as_echo_n "(cached) " >&6
bec39cab
AC
7527else
7528 if test -n "$ac_ct_WINDRES"; then
7529 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7530else
7531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7532for as_dir in $PATH
7533do
7534 IFS=$as_save_IFS
7535 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7536 for ac_exec_ext in '' $ac_executable_extensions; do
7537 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7538 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7540 break 2
7541 fi
7542done
81ecdfbb
RW
7543 done
7544IFS=$as_save_IFS
bec39cab
AC
7545
7546fi
7547fi
7548ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7549if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7551$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7552else
81ecdfbb
RW
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
c906108c 7555fi
bec39cab 7556
81ecdfbb
RW
7557 if test "x$ac_ct_WINDRES" = x; then
7558 WINDRES=""
7559 else
7560 case $cross_compiling:$ac_tool_warned in
7561yes:)
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7563$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7564ac_tool_warned=yes ;;
7565esac
7566 WINDRES=$ac_ct_WINDRES
7567 fi
c906108c 7568else
bec39cab 7569 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7570fi
7571
bec39cab 7572
036c3acb
TS
7573case $host_os in
7574 gnu*)
7575 # Needed for GNU Hurd hosts.
7576 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7577 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7578set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7580$as_echo_n "checking for $ac_word... " >&6; }
7581if test "${ac_cv_prog_MIG+set}" = set; then :
7582 $as_echo_n "(cached) " >&6
c906108c 7583else
bec39cab
AC
7584 if test -n "$MIG"; then
7585 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7586else
7587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590 IFS=$as_save_IFS
7591 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7592 for ac_exec_ext in '' $ac_executable_extensions; do
7593 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7594 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7595 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7596 break 2
7597 fi
7598done
81ecdfbb
RW
7599 done
7600IFS=$as_save_IFS
bec39cab 7601
c906108c 7602fi
bec39cab
AC
7603fi
7604MIG=$ac_cv_prog_MIG
7605if test -n "$MIG"; then
81ecdfbb
RW
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7607$as_echo "$MIG" >&6; }
c906108c 7608else
81ecdfbb
RW
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7610$as_echo "no" >&6; }
c906108c
SS
7611fi
7612
81ecdfbb 7613
bec39cab
AC
7614fi
7615if test -z "$ac_cv_prog_MIG"; then
7616 ac_ct_MIG=$MIG
7617 # Extract the first word of "mig", so it can be a program name with args.
7618set dummy mig; ac_word=$2
81ecdfbb
RW
7619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7620$as_echo_n "checking for $ac_word... " >&6; }
7621if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7622 $as_echo_n "(cached) " >&6
bec39cab
AC
7623else
7624 if test -n "$ac_ct_MIG"; then
7625 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7626else
7627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7628for as_dir in $PATH
7629do
7630 IFS=$as_save_IFS
7631 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7632 for ac_exec_ext in '' $ac_executable_extensions; do
7633 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7634 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7636 break 2
7637 fi
7638done
81ecdfbb
RW
7639 done
7640IFS=$as_save_IFS
c906108c 7641
bec39cab
AC
7642fi
7643fi
7644ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7645if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7647$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7648else
81ecdfbb
RW
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7650$as_echo "no" >&6; }
bec39cab 7651fi
c906108c 7652
81ecdfbb
RW
7653 if test "x$ac_ct_MIG" = x; then
7654 MIG=""
7655 else
7656 case $cross_compiling:$ac_tool_warned in
7657yes:)
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7660ac_tool_warned=yes ;;
7661esac
7662 MIG=$ac_ct_MIG
7663 fi
bec39cab
AC
7664else
7665 MIG="$ac_cv_prog_MIG"
7666fi
c906108c 7667
036c3acb
TS
7668 if test x"$MIG" = x; then
7669 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7670 fi
7671 ;;
7672esac
c906108c 7673
bec39cab
AC
7674# ---------------------- #
7675# Checks for libraries. #
7676# ---------------------- #
c906108c 7677
bec39cab 7678# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7680$as_echo_n "checking for main in -lm... " >&6; }
7681if test "${ac_cv_lib_m_main+set}" = set; then :
7682 $as_echo_n "(cached) " >&6
bec39cab
AC
7683else
7684 ac_check_lib_save_LIBS=$LIBS
7685LIBS="-lm $LIBS"
81ecdfbb 7686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7687/* end confdefs.h. */
c906108c 7688
c906108c 7689
bec39cab
AC
7690int
7691main ()
7692{
81ecdfbb 7693return main ();
bec39cab
AC
7694 ;
7695 return 0;
7696}
7697_ACEOF
81ecdfbb 7698if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7699 ac_cv_lib_m_main=yes
7700else
81ecdfbb 7701 ac_cv_lib_m_main=no
bec39cab 7702fi
81ecdfbb
RW
7703rm -f core conftest.err conftest.$ac_objext \
7704 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7705LIBS=$ac_check_lib_save_LIBS
7706fi
81ecdfbb
RW
7707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7708$as_echo "$ac_cv_lib_m_main" >&6; }
7709if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7710 cat >>confdefs.h <<_ACEOF
7711#define HAVE_LIBM 1
7712_ACEOF
7713
7714 LIBS="-lm $LIBS"
c906108c 7715
c906108c 7716fi
bec39cab
AC
7717
7718
7719# We need to link with -lw to get `wctype' on Solaris before Solaris
7720# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
7721# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
7722# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
7723ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
7724if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 7725
c906108c 7726else
81ecdfbb
RW
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
7728$as_echo_n "checking for wctype in -lw... " >&6; }
7729if test "${ac_cv_lib_w_wctype+set}" = set; then :
7730 $as_echo_n "(cached) " >&6
bec39cab
AC
7731else
7732 ac_check_lib_save_LIBS=$LIBS
7733LIBS="-lw $LIBS"
81ecdfbb 7734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7735/* end confdefs.h. */
c906108c 7736
81ecdfbb
RW
7737/* Override any GCC internal prototype to avoid an error.
7738 Use char because int might match the return type of a GCC
7739 builtin and then its argument prototype would still apply. */
bec39cab
AC
7740#ifdef __cplusplus
7741extern "C"
7742#endif
bec39cab
AC
7743char wctype ();
7744int
7745main ()
7746{
81ecdfbb 7747return wctype ();
bec39cab
AC
7748 ;
7749 return 0;
7750}
7751_ACEOF
81ecdfbb 7752if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7753 ac_cv_lib_w_wctype=yes
7754else
81ecdfbb 7755 ac_cv_lib_w_wctype=no
bec39cab 7756fi
81ecdfbb
RW
7757rm -f core conftest.err conftest.$ac_objext \
7758 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7759LIBS=$ac_check_lib_save_LIBS
7760fi
81ecdfbb
RW
7761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
7762$as_echo "$ac_cv_lib_w_wctype" >&6; }
7763if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
7764 cat >>confdefs.h <<_ACEOF
7765#define HAVE_LIBW 1
7766_ACEOF
c906108c 7767
bec39cab 7768 LIBS="-lw $LIBS"
c906108c 7769
bec39cab 7770fi
c906108c 7771
bec39cab 7772fi
c906108c 7773
ddc9cd0f 7774
bec39cab 7775# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7777$as_echo_n "checking for library containing gethostbyname... " >&6; }
7778if test "${ac_cv_search_gethostbyname+set}" = set; then :
7779 $as_echo_n "(cached) " >&6
bec39cab
AC
7780else
7781 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7783/* end confdefs.h. */
ddc9cd0f 7784
81ecdfbb
RW
7785/* Override any GCC internal prototype to avoid an error.
7786 Use char because int might match the return type of a GCC
7787 builtin and then its argument prototype would still apply. */
bec39cab
AC
7788#ifdef __cplusplus
7789extern "C"
7790#endif
bec39cab
AC
7791char gethostbyname ();
7792int
7793main ()
7794{
81ecdfbb 7795return gethostbyname ();
bec39cab
AC
7796 ;
7797 return 0;
7798}
7799_ACEOF
81ecdfbb
RW
7800for ac_lib in '' nsl; do
7801 if test -z "$ac_lib"; then
7802 ac_res="none required"
7803 else
7804 ac_res=-l$ac_lib
b4e70030 7805 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7806 fi
7807 if ac_fn_c_try_link "$LINENO"; then :
7808 ac_cv_search_gethostbyname=$ac_res
7809fi
7810rm -f core conftest.err conftest.$ac_objext \
7811 conftest$ac_exeext
7812 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7813 break
7814fi
7815done
7816if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7817
bec39cab 7818else
81ecdfbb 7819 ac_cv_search_gethostbyname=no
bec39cab 7820fi
81ecdfbb 7821rm conftest.$ac_ext
bec39cab
AC
7822LIBS=$ac_func_search_save_LIBS
7823fi
81ecdfbb
RW
7824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7825$as_echo "$ac_cv_search_gethostbyname" >&6; }
7826ac_res=$ac_cv_search_gethostbyname
7827if test "$ac_res" != no; then :
7828 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7829
bec39cab 7830fi
96baa820 7831
c906108c 7832
b4e70030 7833# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7835$as_echo_n "checking for library containing socketpair... " >&6; }
7836if test "${ac_cv_search_socketpair+set}" = set; then :
7837 $as_echo_n "(cached) " >&6
b4e70030
JB
7838else
7839 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7841/* end confdefs.h. */
7842
81ecdfbb
RW
7843/* Override any GCC internal prototype to avoid an error.
7844 Use char because int might match the return type of a GCC
7845 builtin and then its argument prototype would still apply. */
b4e70030
JB
7846#ifdef __cplusplus
7847extern "C"
7848#endif
b4e70030
JB
7849char socketpair ();
7850int
7851main ()
7852{
81ecdfbb 7853return socketpair ();
b4e70030
JB
7854 ;
7855 return 0;
7856}
7857_ACEOF
81ecdfbb
RW
7858for ac_lib in '' socket; do
7859 if test -z "$ac_lib"; then
7860 ac_res="none required"
7861 else
7862 ac_res=-l$ac_lib
b4e70030 7863 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7864 fi
7865 if ac_fn_c_try_link "$LINENO"; then :
7866 ac_cv_search_socketpair=$ac_res
7867fi
7868rm -f core conftest.err conftest.$ac_objext \
7869 conftest$ac_exeext
7870 if test "${ac_cv_search_socketpair+set}" = set; then :
7871 break
7872fi
7873done
7874if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7875
b4e70030 7876else
81ecdfbb 7877 ac_cv_search_socketpair=no
b4e70030 7878fi
81ecdfbb 7879rm conftest.$ac_ext
b4e70030
JB
7880LIBS=$ac_func_search_save_LIBS
7881fi
81ecdfbb
RW
7882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7883$as_echo "$ac_cv_search_socketpair" >&6; }
7884ac_res=$ac_cv_search_socketpair
7885if test "$ac_res" != no; then :
7886 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7887
7888fi
7889
7890
233a11ab 7891# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7892
711a72d3 7893 # Use the system's zlib library.
39f3de7c
L
7894 zlibdir="-L\$(top_builddir)/../zlib"
7895 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7896
711a72d3
L
7897# Check whether --with-system-zlib was given.
7898if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7899 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7900 zlibdir=
7901 zlibinc=
7902 fi
b040ad30 7903
233a11ab 7904fi
233a11ab 7905
233a11ab 7906
233a11ab 7907
b040ad30 7908
233a11ab 7909
25268153 7910# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7911# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7913$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7914if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7915 $as_echo_n "(cached) " >&6
7916else
7917 ac_func_search_save_LIBS=$LIBS
7918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7919/* end confdefs.h. */
7920
7921/* Override any GCC internal prototype to avoid an error.
7922 Use char because int might match the return type of a GCC
7923 builtin and then its argument prototype would still apply. */
7924#ifdef __cplusplus
7925extern "C"
7926#endif
7927char kinfo_getvmmap ();
7928int
7929main ()
7930{
7931return kinfo_getvmmap ();
7932 ;
7933 return 0;
7934}
7935_ACEOF
37773e78 7936for ac_lib in '' util util-freebsd; do
25268153
JB
7937 if test -z "$ac_lib"; then
7938 ac_res="none required"
7939 else
7940 ac_res=-l$ac_lib
7941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7942 fi
7943 if ac_fn_c_try_link "$LINENO"; then :
7944 ac_cv_search_kinfo_getvmmap=$ac_res
7945fi
7946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext
7948 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7949 break
7950fi
7951done
7952if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7953
7954else
7955 ac_cv_search_kinfo_getvmmap=no
7956fi
7957rm conftest.$ac_ext
7958LIBS=$ac_func_search_save_LIBS
7959fi
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7961$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7962ac_res=$ac_cv_search_kinfo_getvmmap
7963if test "$ac_res" != no; then :
7964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7965
7966$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7967
7968fi
7969
7970
77f120bf 7971
016a3251
DD
7972 if test "X$prefix" = "XNONE"; then
7973 acl_final_prefix="$ac_default_prefix"
7974 else
7975 acl_final_prefix="$prefix"
7976 fi
7977 if test "X$exec_prefix" = "XNONE"; then
7978 acl_final_exec_prefix='${prefix}'
7979 else
7980 acl_final_exec_prefix="$exec_prefix"
7981 fi
7982 acl_save_prefix="$prefix"
7983 prefix="$acl_final_prefix"
7984 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7985 prefix="$acl_save_prefix"
7986
7987
7988# Check whether --with-gnu-ld was given.
7989if test "${with_gnu_ld+set}" = set; then :
7990 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7991else
7992 with_gnu_ld=no
7993fi
7994
7995# Prepare PATH_SEPARATOR.
7996# The user is always right.
7997if test "${PATH_SEPARATOR+set}" != set; then
7998 echo "#! /bin/sh" >conf$$.sh
7999 echo "exit 0" >>conf$$.sh
8000 chmod +x conf$$.sh
8001 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8002 PATH_SEPARATOR=';'
8003 else
8004 PATH_SEPARATOR=:
8005 fi
8006 rm -f conf$$.sh
8007fi
8008ac_prog=ld
8009if test "$GCC" = yes; then
8010 # Check if gcc -print-prog-name=ld gives a path.
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8012$as_echo_n "checking for ld used by GCC... " >&6; }
8013 case $host in
8014 *-*-mingw*)
8015 # gcc leaves a trailing carriage return which upsets mingw
8016 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8017 *)
8018 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8019 esac
8020 case $ac_prog in
8021 # Accept absolute paths.
8022 [\\/]* | [A-Za-z]:[\\/]*)
8023 re_direlt='/[^/][^/]*/\.\./'
8024 # Canonicalize the path of ld
8025 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8026 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8027 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8028 done
8029 test -z "$LD" && LD="$ac_prog"
8030 ;;
8031 "")
8032 # If it fails, then pretend we aren't using GCC.
8033 ac_prog=ld
8034 ;;
8035 *)
8036 # If it is relative, then search for the first ld in PATH.
8037 with_gnu_ld=unknown
8038 ;;
8039 esac
8040elif test "$with_gnu_ld" = yes; then
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8042$as_echo_n "checking for GNU ld... " >&6; }
8043else
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8045$as_echo_n "checking for non-GNU ld... " >&6; }
8046fi
8047if test "${acl_cv_path_LD+set}" = set; then :
8048 $as_echo_n "(cached) " >&6
8049else
8050 if test -z "$LD"; then
8051 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8052 for ac_dir in $PATH; do
8053 test -z "$ac_dir" && ac_dir=.
8054 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8055 acl_cv_path_LD="$ac_dir/$ac_prog"
8056 # Check to see if the program is GNU ld. I'd rather use --version,
8057 # but apparently some GNU ld's only accept -v.
8058 # Break only if it was the GNU/non-GNU ld that we prefer.
8059 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8060 test "$with_gnu_ld" != no && break
8061 else
8062 test "$with_gnu_ld" != yes && break
8063 fi
8064 fi
8065 done
8066 IFS="$ac_save_ifs"
8067else
8068 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8069fi
8070fi
8071
8072LD="$acl_cv_path_LD"
8073if test -n "$LD"; then
8074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8075$as_echo "$LD" >&6; }
8076else
8077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8078$as_echo "no" >&6; }
8079fi
8080test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8082$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8083if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8084 $as_echo_n "(cached) " >&6
8085else
8086 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8087if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8088 acl_cv_prog_gnu_ld=yes
8089else
8090 acl_cv_prog_gnu_ld=no
8091fi
8092fi
8093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8094$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8095with_gnu_ld=$acl_cv_prog_gnu_ld
8096
8097
8098
8099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8100$as_echo_n "checking for shared library run path origin... " >&6; }
8101if test "${acl_cv_rpath+set}" = set; then :
8102 $as_echo_n "(cached) " >&6
8103else
8104
8105 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8106 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8107 . ./conftest.sh
8108 rm -f ./conftest.sh
8109 acl_cv_rpath=done
8110
8111fi
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8113$as_echo "$acl_cv_rpath" >&6; }
8114 wl="$acl_cv_wl"
8115 libext="$acl_cv_libext"
8116 shlibext="$acl_cv_shlibext"
8117 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8118 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8119 hardcode_direct="$acl_cv_hardcode_direct"
8120 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8121 # Check whether --enable-rpath was given.
8122if test "${enable_rpath+set}" = set; then :
8123 enableval=$enable_rpath; :
8124else
8125 enable_rpath=yes
8126fi
8127
8128
8129
8130
8131
8132
8133
8134
8135 use_additional=yes
8136
8137 acl_save_prefix="$prefix"
8138 prefix="$acl_final_prefix"
8139 acl_save_exec_prefix="$exec_prefix"
8140 exec_prefix="$acl_final_exec_prefix"
8141
8142 eval additional_includedir=\"$includedir\"
8143 eval additional_libdir=\"$libdir\"
8144
8145 exec_prefix="$acl_save_exec_prefix"
8146 prefix="$acl_save_prefix"
77f120bf 8147
6c7a06a3 8148
81ecdfbb
RW
8149# Check whether --with-libiconv-prefix was given.
8150if test "${with_libiconv_prefix+set}" = set; then :
8151 withval=$with_libiconv_prefix;
016a3251
DD
8152 if test "X$withval" = "Xno"; then
8153 use_additional=no
8154 else
8155 if test "X$withval" = "X"; then
8156
8157 acl_save_prefix="$prefix"
8158 prefix="$acl_final_prefix"
8159 acl_save_exec_prefix="$exec_prefix"
8160 exec_prefix="$acl_final_exec_prefix"
8161
8162 eval additional_includedir=\"$includedir\"
8163 eval additional_libdir=\"$libdir\"
8164
8165 exec_prefix="$acl_save_exec_prefix"
8166 prefix="$acl_save_prefix"
8167
8168 else
8169 additional_includedir="$withval/include"
8170 additional_libdir="$withval/lib"
8171 fi
8172 fi
6c7a06a3 8173
81ecdfbb
RW
8174fi
8175
016a3251
DD
8176 LIBICONV=
8177 LTLIBICONV=
8178 INCICONV=
8179 rpathdirs=
8180 ltrpathdirs=
8181 names_already_handled=
8182 names_next_round='iconv '
8183 while test -n "$names_next_round"; do
8184 names_this_round="$names_next_round"
8185 names_next_round=
8186 for name in $names_this_round; do
8187 already_handled=
8188 for n in $names_already_handled; do
8189 if test "$n" = "$name"; then
8190 already_handled=yes
8191 break
8192 fi
8193 done
8194 if test -z "$already_handled"; then
8195 names_already_handled="$names_already_handled $name"
8196 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8197 eval value=\"\$HAVE_LIB$uppername\"
8198 if test -n "$value"; then
8199 if test "$value" = yes; then
8200 eval value=\"\$LIB$uppername\"
8201 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8202 eval value=\"\$LTLIB$uppername\"
8203 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8204 else
8205 :
8206 fi
8207 else
8208 found_dir=
8209 found_la=
8210 found_so=
8211 found_a=
8212 if test $use_additional = yes; then
8213 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8214 found_dir="$additional_libdir"
8215 found_so="$additional_libdir/lib$name.$shlibext"
8216 if test -f "$additional_libdir/lib$name.la"; then
8217 found_la="$additional_libdir/lib$name.la"
8218 fi
8219 else
8220 if test -f "$additional_libdir/lib$name.$libext"; then
8221 found_dir="$additional_libdir"
8222 found_a="$additional_libdir/lib$name.$libext"
8223 if test -f "$additional_libdir/lib$name.la"; then
8224 found_la="$additional_libdir/lib$name.la"
8225 fi
8226 fi
8227 fi
8228 fi
8229 if test "X$found_dir" = "X"; then
8230 for x in $LDFLAGS $LTLIBICONV; do
8231
8232 acl_save_prefix="$prefix"
8233 prefix="$acl_final_prefix"
8234 acl_save_exec_prefix="$exec_prefix"
8235 exec_prefix="$acl_final_exec_prefix"
8236 eval x=\"$x\"
8237 exec_prefix="$acl_save_exec_prefix"
8238 prefix="$acl_save_prefix"
8239
8240 case "$x" in
8241 -L*)
8242 dir=`echo "X$x" | sed -e 's/^X-L//'`
8243 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8244 found_dir="$dir"
8245 found_so="$dir/lib$name.$shlibext"
8246 if test -f "$dir/lib$name.la"; then
8247 found_la="$dir/lib$name.la"
8248 fi
8249 else
8250 if test -f "$dir/lib$name.$libext"; then
8251 found_dir="$dir"
8252 found_a="$dir/lib$name.$libext"
8253 if test -f "$dir/lib$name.la"; then
8254 found_la="$dir/lib$name.la"
8255 fi
8256 fi
8257 fi
8258 ;;
8259 esac
8260 if test "X$found_dir" != "X"; then
8261 break
8262 fi
8263 done
8264 fi
8265 if test "X$found_dir" != "X"; then
8266 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8267 if test "X$found_so" != "X"; then
8268 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8269 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8270 else
8271 haveit=
8272 for x in $ltrpathdirs; do
8273 if test "X$x" = "X$found_dir"; then
8274 haveit=yes
8275 break
8276 fi
8277 done
8278 if test -z "$haveit"; then
8279 ltrpathdirs="$ltrpathdirs $found_dir"
8280 fi
8281 if test "$hardcode_direct" = yes; then
8282 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8283 else
8284 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8285 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8286 haveit=
8287 for x in $rpathdirs; do
8288 if test "X$x" = "X$found_dir"; then
8289 haveit=yes
8290 break
8291 fi
8292 done
8293 if test -z "$haveit"; then
8294 rpathdirs="$rpathdirs $found_dir"
8295 fi
8296 else
8297 haveit=
8298 for x in $LDFLAGS $LIBICONV; do
8299
8300 acl_save_prefix="$prefix"
8301 prefix="$acl_final_prefix"
8302 acl_save_exec_prefix="$exec_prefix"
8303 exec_prefix="$acl_final_exec_prefix"
8304 eval x=\"$x\"
8305 exec_prefix="$acl_save_exec_prefix"
8306 prefix="$acl_save_prefix"
8307
8308 if test "X$x" = "X-L$found_dir"; then
8309 haveit=yes
8310 break
8311 fi
8312 done
8313 if test -z "$haveit"; then
8314 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8315 fi
8316 if test "$hardcode_minus_L" != no; then
8317 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8318 else
8319 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8320 fi
8321 fi
8322 fi
8323 fi
8324 else
8325 if test "X$found_a" != "X"; then
8326 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8327 else
8328 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8329 fi
8330 fi
8331 additional_includedir=
8332 case "$found_dir" in
8333 */lib | */lib/)
8334 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8335 additional_includedir="$basedir/include"
8336 ;;
8337 esac
8338 if test "X$additional_includedir" != "X"; then
8339 if test "X$additional_includedir" != "X/usr/include"; then
8340 haveit=
8341 if test "X$additional_includedir" = "X/usr/local/include"; then
8342 if test -n "$GCC"; then
8343 case $host_os in
8344 linux*) haveit=yes;;
8345 esac
8346 fi
8347 fi
8348 if test -z "$haveit"; then
8349 for x in $CPPFLAGS $INCICONV; do
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 eval x=\"$x\"
8356 exec_prefix="$acl_save_exec_prefix"
8357 prefix="$acl_save_prefix"
8358
8359 if test "X$x" = "X-I$additional_includedir"; then
8360 haveit=yes
8361 break
8362 fi
8363 done
8364 if test -z "$haveit"; then
8365 if test -d "$additional_includedir"; then
8366 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8367 fi
8368 fi
8369 fi
8370 fi
8371 fi
8372 if test -n "$found_la"; then
8373 save_libdir="$libdir"
8374 case "$found_la" in
8375 */* | *\\*) . "$found_la" ;;
8376 *) . "./$found_la" ;;
8377 esac
8378 libdir="$save_libdir"
8379 for dep in $dependency_libs; do
8380 case "$dep" in
8381 -L*)
8382 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8383 if test "X$additional_libdir" != "X/usr/lib"; then
8384 haveit=
8385 if test "X$additional_libdir" = "X/usr/local/lib"; then
8386 if test -n "$GCC"; then
8387 case $host_os in
8388 linux*) haveit=yes;;
8389 esac
8390 fi
8391 fi
8392 if test -z "$haveit"; then
8393 haveit=
8394 for x in $LDFLAGS $LIBICONV; do
8395
8396 acl_save_prefix="$prefix"
8397 prefix="$acl_final_prefix"
8398 acl_save_exec_prefix="$exec_prefix"
8399 exec_prefix="$acl_final_exec_prefix"
8400 eval x=\"$x\"
8401 exec_prefix="$acl_save_exec_prefix"
8402 prefix="$acl_save_prefix"
8403
8404 if test "X$x" = "X-L$additional_libdir"; then
8405 haveit=yes
8406 break
8407 fi
8408 done
8409 if test -z "$haveit"; then
8410 if test -d "$additional_libdir"; then
8411 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8412 fi
8413 fi
8414 haveit=
8415 for x in $LDFLAGS $LTLIBICONV; do
8416
8417 acl_save_prefix="$prefix"
8418 prefix="$acl_final_prefix"
8419 acl_save_exec_prefix="$exec_prefix"
8420 exec_prefix="$acl_final_exec_prefix"
8421 eval x=\"$x\"
8422 exec_prefix="$acl_save_exec_prefix"
8423 prefix="$acl_save_prefix"
8424
8425 if test "X$x" = "X-L$additional_libdir"; then
8426 haveit=yes
8427 break
8428 fi
8429 done
8430 if test -z "$haveit"; then
8431 if test -d "$additional_libdir"; then
8432 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8433 fi
8434 fi
8435 fi
8436 fi
8437 ;;
8438 -R*)
8439 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8440 if test "$enable_rpath" != no; then
8441 haveit=
8442 for x in $rpathdirs; do
8443 if test "X$x" = "X$dir"; then
8444 haveit=yes
8445 break
8446 fi
8447 done
8448 if test -z "$haveit"; then
8449 rpathdirs="$rpathdirs $dir"
8450 fi
8451 haveit=
8452 for x in $ltrpathdirs; do
8453 if test "X$x" = "X$dir"; then
8454 haveit=yes
8455 break
8456 fi
8457 done
8458 if test -z "$haveit"; then
8459 ltrpathdirs="$ltrpathdirs $dir"
8460 fi
8461 fi
8462 ;;
8463 -l*)
8464 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8465 ;;
8466 *.la)
8467 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8468 ;;
8469 *)
8470 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8471 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8472 ;;
8473 esac
8474 done
8475 fi
8476 else
8477 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8478 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8479 fi
8480 fi
8481 fi
8482 done
8483 done
8484 if test "X$rpathdirs" != "X"; then
8485 if test -n "$hardcode_libdir_separator"; then
8486 alldirs=
8487 for found_dir in $rpathdirs; do
8488 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8489 done
8490 acl_save_libdir="$libdir"
8491 libdir="$alldirs"
8492 eval flag=\"$hardcode_libdir_flag_spec\"
8493 libdir="$acl_save_libdir"
8494 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8495 else
8496 for found_dir in $rpathdirs; do
8497 acl_save_libdir="$libdir"
8498 libdir="$found_dir"
8499 eval flag=\"$hardcode_libdir_flag_spec\"
8500 libdir="$acl_save_libdir"
8501 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8502 done
8503 fi
8504 fi
8505 if test "X$ltrpathdirs" != "X"; then
8506 for found_dir in $ltrpathdirs; do
8507 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8508 done
8509 fi
8510
8511
8512
8513
8514
6c7a06a3 8515
6c7a06a3 8516
81ecdfbb
RW
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8518$as_echo_n "checking for iconv... " >&6; }
8519if test "${am_cv_func_iconv+set}" = set; then :
8520 $as_echo_n "(cached) " >&6
d542061a 8521else
6c7a06a3
TT
8522
8523 am_cv_func_iconv="no, consider installing GNU libiconv"
8524 am_cv_lib_iconv=no
016a3251
DD
8525 am_save_CPPFLAGS="$CPPFLAGS"
8526 CPPFLAGS="$CPPFLAGS $INCICONV"
8527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8528/* end confdefs.h. */
6c7a06a3
TT
8529#include <stdlib.h>
8530#include <iconv.h>
d542061a
UW
8531int
8532main ()
8533{
6c7a06a3 8534iconv_t cd = iconv_open("","");
016a3251
DD
8535 iconv(cd,NULL,NULL,NULL,NULL);
8536 iconv_close(cd);
d542061a
UW
8537 ;
8538 return 0;
8539}
8540_ACEOF
81ecdfbb 8541if ac_fn_c_try_link "$LINENO"; then :
016a3251 8542 am_cv_func_iconv=yes
d542061a 8543fi
81ecdfbb
RW
8544rm -f core conftest.err conftest.$ac_objext \
8545 conftest$ac_exeext conftest.$ac_ext
016a3251 8546 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8547
016a3251
DD
8548 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8549 for _libs in .libs _libs; do
8550 am_save_CPPFLAGS="$CPPFLAGS"
8551 am_save_LIBS="$LIBS"
8552 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8553 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8555/* end confdefs.h. */
6c7a06a3
TT
8556#include <stdlib.h>
8557#include <iconv.h>
d542061a
UW
8558int
8559main ()
8560{
6c7a06a3 8561iconv_t cd = iconv_open("","");
016a3251
DD
8562 iconv(cd,NULL,NULL,NULL,NULL);
8563 iconv_close(cd);
d542061a
UW
8564 ;
8565 return 0;
8566}
8567_ACEOF
81ecdfbb 8568if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8569 INCICONV="-I../libiconv/include"
8570 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8571 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8572 am_cv_lib_iconv=yes
8573 am_cv_func_iconv=yes
d542061a 8574fi
81ecdfbb
RW
8575rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8577 CPPFLAGS="$am_save_CPPFLAGS"
8578 LIBS="$am_save_LIBS"
8579 if test "$am_cv_func_iconv" = "yes"; then
8580 break
8581 fi
8582 done
77f120bf 8583 fi
94ae1714 8584
4edb1e84 8585 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8586 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8587 am_save_LIBS="$LIBS"
016a3251
DD
8588 CPPFLAGS="$LIBS $INCICONV"
8589 LIBS="$LIBS $LIBICONV"
81ecdfbb 8590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8591/* end confdefs.h. */
6c7a06a3
TT
8592#include <stdlib.h>
8593#include <iconv.h>
bec39cab
AC
8594int
8595main ()
8596{
6c7a06a3
TT
8597iconv_t cd = iconv_open("","");
8598 iconv(cd,NULL,NULL,NULL,NULL);
8599 iconv_close(cd);
bec39cab
AC
8600 ;
8601 return 0;
8602}
8603_ACEOF
81ecdfbb 8604if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8605 am_cv_lib_iconv=yes
6c7a06a3 8606 am_cv_func_iconv=yes
627af7ea 8607fi
81ecdfbb
RW
8608rm -f core conftest.err conftest.$ac_objext \
8609 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8610 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8611 LIBS="$am_save_LIBS"
6c7a06a3
TT
8612 fi
8613
8614fi
81ecdfbb
RW
8615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8616$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8617 if test "$am_cv_func_iconv" = yes; then
8618
8619$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8620
016a3251 8621 fi
fc3b640d 8622 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8623
8624 for element in $INCICONV; do
8625 haveit=
8626 for x in $CPPFLAGS; do
8627
8628 acl_save_prefix="$prefix"
8629 prefix="$acl_final_prefix"
8630 acl_save_exec_prefix="$exec_prefix"
8631 exec_prefix="$acl_final_exec_prefix"
8632 eval x=\"$x\"
8633 exec_prefix="$acl_save_exec_prefix"
8634 prefix="$acl_save_prefix"
8635
8636 if test "X$x" = "X$element"; then
8637 haveit=yes
8638 break
8639 fi
8640 done
8641 if test -z "$haveit"; then
8642 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8643 fi
8644 done
8645
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8647$as_echo_n "checking how to link with libiconv... " >&6; }
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8649$as_echo "$LIBICONV" >&6; }
94ae1714 8650 else
016a3251
DD
8651 LIBICONV=
8652 LTLIBICONV=
fc3b640d 8653 fi
94ae1714 8654
6c7a06a3 8655
6c7a06a3 8656
016a3251 8657 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8659$as_echo_n "checking for iconv declaration... " >&6; }
8660 if test "${am_cv_proto_iconv+set}" = set; then :
8661 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8662else
8663
81ecdfbb 8664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8665/* end confdefs.h. */
8666
6c7a06a3
TT
8667#include <stdlib.h>
8668#include <iconv.h>
8669extern
b4e70030 8670#ifdef __cplusplus
6c7a06a3 8671"C"
b4e70030 8672#endif
6c7a06a3
TT
8673#if defined(__STDC__) || defined(__cplusplus)
8674size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8675#else
8676size_t iconv();
8677#endif
8678
b4e70030
JB
8679int
8680main ()
8681{
6c7a06a3 8682
b4e70030
JB
8683 ;
8684 return 0;
8685}
8686_ACEOF
81ecdfbb 8687if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8688 am_cv_proto_iconv_arg1=""
4e8d927d 8689else
81ecdfbb 8690 am_cv_proto_iconv_arg1="const"
b4e70030 8691fi
81ecdfbb 8692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8693 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);"
8694fi
8695
8696 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8698 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8699$as_echo "${ac_t:-
8700 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8701
8702cat >>confdefs.h <<_ACEOF
8703#define ICONV_CONST $am_cv_proto_iconv_arg1
8704_ACEOF
8705
8706 fi
6c7a06a3
TT
8707
8708
478aac75
DE
8709# GDB may fork/exec the iconv program to get the list of supported character
8710# sets. Allow the user to specify where to find it.
8711# There are several factors affecting the choice of option name:
8712# - There is already --with-libiconv-prefix but we can't use it, it specifies
8713# the build-time location of libiconv files.
8714# - The program we need to find is iconv, which comes with glibc. The user
8715# doesn't necessarily have libiconv installed. Therefore naming this
8716# --with-libiconv-foo feels wrong.
8717# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8718# defined to work on directories not files (though it really doesn't know
8719# the difference).
8720# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8721# with --with-libiconv-prefix.
8722# Putting these together is why the option name is --with-iconv-bin.
8723
8724
8725# Check whether --with-iconv-bin was given.
8726if test "${with_iconv_bin+set}" = set; then :
8727 withval=$with_iconv_bin; iconv_bin="${withval}"
8728
8729cat >>confdefs.h <<_ACEOF
8730#define ICONV_BIN "${iconv_bin}"
8731_ACEOF
8732
8733
8734 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8735 if test "x$prefix" = xNONE; then
8736 test_prefix=/usr/local
8737 else
8738 test_prefix=$prefix
8739 fi
8740 else
8741 test_prefix=$exec_prefix
8742 fi
8743 value=0
8744 case ${iconv_bin} in
8745 "${test_prefix}"|"${test_prefix}/"*|\
8746 '${exec_prefix}'|'${exec_prefix}/'*)
8747 value=1
8748 ;;
8749 esac
8750
8751cat >>confdefs.h <<_ACEOF
8752#define ICONV_BIN_RELOCATABLE $value
8753_ACEOF
8754
8755
8756
8757fi
8758
8759
cb01cfba 8760# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8761if test x"$enable_tui" != xno; then
cb01cfba
JB
8762 prefer_curses=yes
8763fi
8764
8765curses_found=no
8766if test x"$prefer_curses" = xyes; then
8767 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8768 # curses library because the latter might not provide all the
8769 # functionality we need. However, this leads to problems on systems
8770 # where the linker searches /usr/local/lib, but the compiler doesn't
8771 # search /usr/local/include, if ncurses is installed in /usr/local. A
8772 # default installation of ncurses on alpha*-dec-osf* will lead to such
8773 # a situation.
81ecdfbb
RW
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8775$as_echo_n "checking for library containing waddstr... " >&6; }
8776if test "${ac_cv_search_waddstr+set}" = set; then :
8777 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8778else
8779 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8781/* end confdefs.h. */
8782
81ecdfbb
RW
8783/* Override any GCC internal prototype to avoid an error.
8784 Use char because int might match the return type of a GCC
8785 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8786#ifdef __cplusplus
8787extern "C"
8788#endif
6c7a06a3
TT
8789char waddstr ();
8790int
8791main ()
8792{
81ecdfbb 8793return waddstr ();
6c7a06a3
TT
8794 ;
8795 return 0;
8796}
8797_ACEOF
81ecdfbb
RW
8798for ac_lib in '' ncurses cursesX curses; do
8799 if test -z "$ac_lib"; then
8800 ac_res="none required"
8801 else
8802 ac_res=-l$ac_lib
8803 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8804 fi
8805 if ac_fn_c_try_link "$LINENO"; then :
8806 ac_cv_search_waddstr=$ac_res
8807fi
8808rm -f core conftest.err conftest.$ac_objext \
8809 conftest$ac_exeext
8810 if test "${ac_cv_search_waddstr+set}" = set; then :
8811 break
8812fi
8813done
8814if test "${ac_cv_search_waddstr+set}" = set; then :
8815
6c7a06a3 8816else
81ecdfbb
RW
8817 ac_cv_search_waddstr=no
8818fi
8819rm conftest.$ac_ext
8820LIBS=$ac_func_search_save_LIBS
8821fi
8822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8823$as_echo "$ac_cv_search_waddstr" >&6; }
8824ac_res=$ac_cv_search_waddstr
8825if test "$ac_res" != no; then :
8826 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8827
8828fi
8829
8830
cb01cfba
JB
8831 if test "$ac_cv_search_waddstr" != no; then
8832 curses_found=yes
8833 fi
8834fi
8835
8836# Check whether we should enable the TUI, but only do so if we really
8837# can.
8838if test x"$enable_tui" != xno; then
8839 if test -d $srcdir/tui; then
8840 if test "$curses_found" != no; then
6c7a06a3
TT
8841 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8842 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8843 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8844 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8845 else
8846 if test x"$enable_tui" = xyes; then
81ecdfbb 8847 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8848 else
81ecdfbb
RW
8849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8850$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8851 fi
8852 fi
8853 fi
8854fi
8855
8856# Since GDB uses Readline, we need termcap functionality. In many
8857# cases this will be provided by the curses library, but some systems
96fe4562 8858# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8859
8860case $host_os in
8861 cygwin*)
8862 if test -d $srcdir/libtermcap; then
8863 LIBS="../libtermcap/libtermcap.a $LIBS"
8864 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8865 fi ;;
8866 go32* | *djgpp*)
8867 ac_cv_search_tgetent="none required"
8868 ;;
6c7a06a3
TT
8869esac
8870
8871# These are the libraries checked by Readline.
81ecdfbb
RW
8872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8873$as_echo_n "checking for library containing tgetent... " >&6; }
8874if test "${ac_cv_search_tgetent+set}" = set; then :
8875 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8876else
8877 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8879/* end confdefs.h. */
8880
81ecdfbb
RW
8881/* Override any GCC internal prototype to avoid an error.
8882 Use char because int might match the return type of a GCC
8883 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8884#ifdef __cplusplus
8885extern "C"
8886#endif
6c7a06a3
TT
8887char tgetent ();
8888int
8889main ()
8890{
81ecdfbb 8891return tgetent ();
6c7a06a3
TT
8892 ;
8893 return 0;
8894}
8895_ACEOF
81ecdfbb
RW
8896for ac_lib in '' termcap tinfo curses ncurses; do
8897 if test -z "$ac_lib"; then
8898 ac_res="none required"
8899 else
8900 ac_res=-l$ac_lib
6c7a06a3 8901 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8902 fi
8903 if ac_fn_c_try_link "$LINENO"; then :
8904 ac_cv_search_tgetent=$ac_res
8905fi
8906rm -f core conftest.err conftest.$ac_objext \
8907 conftest$ac_exeext
8908 if test "${ac_cv_search_tgetent+set}" = set; then :
8909 break
8910fi
8911done
8912if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8913
6c7a06a3 8914else
81ecdfbb 8915 ac_cv_search_tgetent=no
6c7a06a3 8916fi
81ecdfbb 8917rm conftest.$ac_ext
6c7a06a3
TT
8918LIBS=$ac_func_search_save_LIBS
8919fi
81ecdfbb
RW
8920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8921$as_echo "$ac_cv_search_tgetent" >&6; }
8922ac_res=$ac_cv_search_tgetent
8923if test "$ac_res" != no; then :
8924 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8925
06825bd1
MK
8926fi
8927
06825bd1 8928
bec39cab 8929if test "$ac_cv_search_tgetent" = no; then
7a85168d 8930 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8931fi
8932
3841debe 8933
81ecdfbb
RW
8934# Check whether --with-system-readline was given.
8935if test "${with_system_readline+set}" = set; then :
8936 withval=$with_system_readline;
8937fi
6a30b0a5 8938
6a30b0a5
AS
8939
8940if test "$with_system_readline" = yes; then
8941 READLINE=-lreadline
8942 READLINE_DEPS=
8943 READLINE_CFLAGS=
39037522 8944 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8945else
8946 READLINE='$(READLINE_DIR)/libreadline.a'
8947 READLINE_DEPS='$(READLINE)'
8948 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8949 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8950fi
8951
8952
8953
8954
8955
f997c383
SD
8956# Generate jit-reader.h
8957
8958# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8959TARGET_PTR=
8960
8961# The cast to long int works around a bug in the HP C Compiler
8962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8964# This bug is HP SR number 8606223364.
8965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8966$as_echo_n "checking size of unsigned long long... " >&6; }
8967if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8968 $as_echo_n "(cached) " >&6
8969else
8970 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8971
8972else
8973 if test "$ac_cv_type_unsigned_long_long" = yes; then
8974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8976{ as_fn_set_status 77
8977as_fn_error "cannot compute sizeof (unsigned long long)
8978See \`config.log' for more details." "$LINENO" 5; }; }
8979 else
8980 ac_cv_sizeof_unsigned_long_long=0
8981 fi
8982fi
8983
8984fi
8985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
8986$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
8987
8988
8989
8990cat >>confdefs.h <<_ACEOF
8991#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
8992_ACEOF
8993
8994
8995# The cast to long int works around a bug in the HP C Compiler
8996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8998# This bug is HP SR number 8606223364.
8999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9000$as_echo_n "checking size of unsigned long... " >&6; }
9001if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9002 $as_echo_n "(cached) " >&6
9003else
9004 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9005
9006else
9007 if test "$ac_cv_type_unsigned_long" = yes; then
9008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9010{ as_fn_set_status 77
9011as_fn_error "cannot compute sizeof (unsigned long)
9012See \`config.log' for more details." "$LINENO" 5; }; }
9013 else
9014 ac_cv_sizeof_unsigned_long=0
9015 fi
9016fi
9017
9018fi
9019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9020$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9021
9022
9023
9024cat >>confdefs.h <<_ACEOF
9025#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9026_ACEOF
9027
9028
9029# The cast to long int works around a bug in the HP C Compiler
9030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9032# This bug is HP SR number 8606223364.
9033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9034$as_echo_n "checking size of unsigned __int128... " >&6; }
9035if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9036 $as_echo_n "(cached) " >&6
9037else
9038 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9039
9040else
9041 if test "$ac_cv_type_unsigned___int128" = yes; then
9042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9044{ as_fn_set_status 77
9045as_fn_error "cannot compute sizeof (unsigned __int128)
9046See \`config.log' for more details." "$LINENO" 5; }; }
9047 else
9048 ac_cv_sizeof_unsigned___int128=0
9049 fi
9050fi
9051
9052fi
9053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9054$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9055
9056
9057
9058cat >>confdefs.h <<_ACEOF
9059#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9060_ACEOF
9061
9062
9063
9064if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9065 TARGET_PTR="unsigned long"
9066elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9067 TARGET_PTR="unsigned long long"
9068elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9069 TARGET_PTR="unsigned __int128"
9070else
9071 TARGET_PTR="unsigned long"
9072fi
9073
9074
9075ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9076
9077
a2d08b9e
SD
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9079$as_echo_n "checking for library containing dlopen... " >&6; }
9080if test "${ac_cv_search_dlopen+set}" = set; then :
9081 $as_echo_n "(cached) " >&6
9082else
9083 ac_func_search_save_LIBS=$LIBS
9084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9085/* end confdefs.h. */
9086
9087/* Override any GCC internal prototype to avoid an error.
9088 Use char because int might match the return type of a GCC
9089 builtin and then its argument prototype would still apply. */
9090#ifdef __cplusplus
9091extern "C"
9092#endif
9093char dlopen ();
9094int
9095main ()
9096{
9097return dlopen ();
9098 ;
9099 return 0;
9100}
9101_ACEOF
9102for ac_lib in '' dl; do
9103 if test -z "$ac_lib"; then
9104 ac_res="none required"
9105 else
9106 ac_res=-l$ac_lib
9107 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9108 fi
9109 if ac_fn_c_try_link "$LINENO"; then :
9110 ac_cv_search_dlopen=$ac_res
9111fi
9112rm -f core conftest.err conftest.$ac_objext \
9113 conftest$ac_exeext
9114 if test "${ac_cv_search_dlopen+set}" = set; then :
9115 break
9116fi
9117done
9118if test "${ac_cv_search_dlopen+set}" = set; then :
9119
9120else
9121 ac_cv_search_dlopen=no
9122fi
9123rm conftest.$ac_ext
9124LIBS=$ac_func_search_save_LIBS
9125fi
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9127$as_echo "$ac_cv_search_dlopen" >&6; }
9128ac_res=$ac_cv_search_dlopen
9129if test "$ac_res" != no; then :
9130 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9131
9132fi
9133
9134
39037522 9135
b8e0a31c
SD
9136
9137# Check whether --with-jit-reader-dir was given.
9138if test "${with_jit_reader_dir+set}" = set; then :
9139 withval=$with_jit_reader_dir;
9140 JIT_READER_DIR=$withval
9141else
9142 JIT_READER_DIR=${libdir}/gdb
9143fi
9144
9145
9146 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9147 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9148 ac_define_dir=`eval echo $JIT_READER_DIR`
9149 ac_define_dir=`eval echo $ac_define_dir`
9150
9151cat >>confdefs.h <<_ACEOF
9152#define JIT_READER_DIR "$ac_define_dir"
9153_ACEOF
9154
9155
9156
9157
9158 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9159 if test "x$prefix" = xNONE; then
9160 test_prefix=/usr/local
9161 else
9162 test_prefix=$prefix
9163 fi
9164 else
9165 test_prefix=$exec_prefix
9166 fi
9167 value=0
9168 case ${ac_define_dir} in
9169 "${test_prefix}"|"${test_prefix}/"*|\
9170 '${exec_prefix}'|'${exec_prefix}/'*)
9171 value=1
9172 ;;
9173 esac
9174
9175cat >>confdefs.h <<_ACEOF
9176#define JIT_READER_DIR_RELOCATABLE $value
9177_ACEOF
9178
9179
9180
9181
9182
81ecdfbb
RW
9183# Check whether --with-expat was given.
9184if test "${with_expat+set}" = set; then :
9185 withval=$with_expat;
5c39566f
DJ
9186else
9187 with_expat=auto
81ecdfbb
RW
9188fi
9189
9190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9191$as_echo_n "checking whether to use expat... " >&6; }
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9193$as_echo "$with_expat" >&6; }
5c39566f
DJ
9194
9195if test "${with_expat}" = no; then
81ecdfbb
RW
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9197$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9198 HAVE_LIBEXPAT=no
9199else
9200
3841debe
DJ
9201
9202
9203
9204
9205
9206
9207
9208 use_additional=yes
9209
9210 acl_save_prefix="$prefix"
9211 prefix="$acl_final_prefix"
9212 acl_save_exec_prefix="$exec_prefix"
9213 exec_prefix="$acl_final_exec_prefix"
9214
9215 eval additional_includedir=\"$includedir\"
9216 eval additional_libdir=\"$libdir\"
9217
9218 exec_prefix="$acl_save_exec_prefix"
9219 prefix="$acl_save_prefix"
9220
9221
81ecdfbb
RW
9222# Check whether --with-libexpat-prefix was given.
9223if test "${with_libexpat_prefix+set}" = set; then :
9224 withval=$with_libexpat_prefix;
3841debe
DJ
9225 if test "X$withval" = "Xno"; then
9226 use_additional=no
9227 else
9228 if test "X$withval" = "X"; then
9229
9230 acl_save_prefix="$prefix"
9231 prefix="$acl_final_prefix"
9232 acl_save_exec_prefix="$exec_prefix"
9233 exec_prefix="$acl_final_exec_prefix"
9234
9235 eval additional_includedir=\"$includedir\"
9236 eval additional_libdir=\"$libdir\"
9237
9238 exec_prefix="$acl_save_exec_prefix"
9239 prefix="$acl_save_prefix"
9240
9241 else
9242 additional_includedir="$withval/include"
9243 additional_libdir="$withval/lib"
9244 fi
9245 fi
9246
81ecdfbb
RW
9247fi
9248
3841debe
DJ
9249 LIBEXPAT=
9250 LTLIBEXPAT=
9251 INCEXPAT=
9252 rpathdirs=
9253 ltrpathdirs=
9254 names_already_handled=
9255 names_next_round='expat '
9256 while test -n "$names_next_round"; do
9257 names_this_round="$names_next_round"
9258 names_next_round=
9259 for name in $names_this_round; do
9260 already_handled=
9261 for n in $names_already_handled; do
9262 if test "$n" = "$name"; then
9263 already_handled=yes
9264 break
9265 fi
9266 done
9267 if test -z "$already_handled"; then
9268 names_already_handled="$names_already_handled $name"
9269 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9270 eval value=\"\$HAVE_LIB$uppername\"
9271 if test -n "$value"; then
9272 if test "$value" = yes; then
9273 eval value=\"\$LIB$uppername\"
9274 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9275 eval value=\"\$LTLIB$uppername\"
9276 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9277 else
9278 :
9279 fi
9280 else
9281 found_dir=
9282 found_la=
9283 found_so=
9284 found_a=
9285 if test $use_additional = yes; then
9286 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9287 found_dir="$additional_libdir"
9288 found_so="$additional_libdir/lib$name.$shlibext"
9289 if test -f "$additional_libdir/lib$name.la"; then
9290 found_la="$additional_libdir/lib$name.la"
9291 fi
9292 else
9293 if test -f "$additional_libdir/lib$name.$libext"; then
9294 found_dir="$additional_libdir"
9295 found_a="$additional_libdir/lib$name.$libext"
9296 if test -f "$additional_libdir/lib$name.la"; then
9297 found_la="$additional_libdir/lib$name.la"
9298 fi
9299 fi
9300 fi
9301 fi
9302 if test "X$found_dir" = "X"; then
9303 for x in $LDFLAGS $LTLIBEXPAT; do
9304
9305 acl_save_prefix="$prefix"
9306 prefix="$acl_final_prefix"
9307 acl_save_exec_prefix="$exec_prefix"
9308 exec_prefix="$acl_final_exec_prefix"
9309 eval x=\"$x\"
9310 exec_prefix="$acl_save_exec_prefix"
9311 prefix="$acl_save_prefix"
9312
9313 case "$x" in
9314 -L*)
9315 dir=`echo "X$x" | sed -e 's/^X-L//'`
9316 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9317 found_dir="$dir"
9318 found_so="$dir/lib$name.$shlibext"
9319 if test -f "$dir/lib$name.la"; then
9320 found_la="$dir/lib$name.la"
9321 fi
9322 else
9323 if test -f "$dir/lib$name.$libext"; then
9324 found_dir="$dir"
9325 found_a="$dir/lib$name.$libext"
9326 if test -f "$dir/lib$name.la"; then
9327 found_la="$dir/lib$name.la"
9328 fi
9329 fi
9330 fi
9331 ;;
9332 esac
9333 if test "X$found_dir" != "X"; then
9334 break
9335 fi
9336 done
9337 fi
9338 if test "X$found_dir" != "X"; then
9339 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9340 if test "X$found_so" != "X"; then
9341 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9342 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9343 else
9344 haveit=
9345 for x in $ltrpathdirs; do
9346 if test "X$x" = "X$found_dir"; then
9347 haveit=yes
9348 break
9349 fi
9350 done
9351 if test -z "$haveit"; then
9352 ltrpathdirs="$ltrpathdirs $found_dir"
9353 fi
9354 if test "$hardcode_direct" = yes; then
9355 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9356 else
9357 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9358 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9359 haveit=
9360 for x in $rpathdirs; do
9361 if test "X$x" = "X$found_dir"; then
9362 haveit=yes
9363 break
9364 fi
9365 done
9366 if test -z "$haveit"; then
9367 rpathdirs="$rpathdirs $found_dir"
9368 fi
9369 else
9370 haveit=
9371 for x in $LDFLAGS $LIBEXPAT; do
9372
9373 acl_save_prefix="$prefix"
9374 prefix="$acl_final_prefix"
9375 acl_save_exec_prefix="$exec_prefix"
9376 exec_prefix="$acl_final_exec_prefix"
9377 eval x=\"$x\"
9378 exec_prefix="$acl_save_exec_prefix"
9379 prefix="$acl_save_prefix"
9380
9381 if test "X$x" = "X-L$found_dir"; then
9382 haveit=yes
9383 break
9384 fi
9385 done
9386 if test -z "$haveit"; then
9387 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9388 fi
9389 if test "$hardcode_minus_L" != no; then
9390 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9391 else
9392 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9393 fi
9394 fi
9395 fi
9396 fi
9397 else
9398 if test "X$found_a" != "X"; then
9399 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9400 else
9401 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9402 fi
9403 fi
9404 additional_includedir=
9405 case "$found_dir" in
9406 */lib | */lib/)
9407 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9408 additional_includedir="$basedir/include"
9409 ;;
9410 esac
9411 if test "X$additional_includedir" != "X"; then
9412 if test "X$additional_includedir" != "X/usr/include"; then
9413 haveit=
9414 if test "X$additional_includedir" = "X/usr/local/include"; then
9415 if test -n "$GCC"; then
9416 case $host_os in
9417 linux*) haveit=yes;;
9418 esac
9419 fi
9420 fi
9421 if test -z "$haveit"; then
9422 for x in $CPPFLAGS $INCEXPAT; do
9423
9424 acl_save_prefix="$prefix"
9425 prefix="$acl_final_prefix"
9426 acl_save_exec_prefix="$exec_prefix"
9427 exec_prefix="$acl_final_exec_prefix"
9428 eval x=\"$x\"
9429 exec_prefix="$acl_save_exec_prefix"
9430 prefix="$acl_save_prefix"
9431
9432 if test "X$x" = "X-I$additional_includedir"; then
9433 haveit=yes
9434 break
9435 fi
9436 done
9437 if test -z "$haveit"; then
9438 if test -d "$additional_includedir"; then
9439 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9440 fi
9441 fi
9442 fi
9443 fi
9444 fi
9445 if test -n "$found_la"; then
9446 save_libdir="$libdir"
9447 case "$found_la" in
9448 */* | *\\*) . "$found_la" ;;
9449 *) . "./$found_la" ;;
9450 esac
9451 libdir="$save_libdir"
9452 for dep in $dependency_libs; do
9453 case "$dep" in
9454 -L*)
9455 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9456 if test "X$additional_libdir" != "X/usr/lib"; then
9457 haveit=
9458 if test "X$additional_libdir" = "X/usr/local/lib"; then
9459 if test -n "$GCC"; then
9460 case $host_os in
9461 linux*) haveit=yes;;
9462 esac
9463 fi
9464 fi
9465 if test -z "$haveit"; then
9466 haveit=
9467 for x in $LDFLAGS $LIBEXPAT; do
9468
9469 acl_save_prefix="$prefix"
9470 prefix="$acl_final_prefix"
9471 acl_save_exec_prefix="$exec_prefix"
9472 exec_prefix="$acl_final_exec_prefix"
9473 eval x=\"$x\"
9474 exec_prefix="$acl_save_exec_prefix"
9475 prefix="$acl_save_prefix"
9476
9477 if test "X$x" = "X-L$additional_libdir"; then
9478 haveit=yes
9479 break
9480 fi
9481 done
9482 if test -z "$haveit"; then
9483 if test -d "$additional_libdir"; then
9484 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9485 fi
9486 fi
9487 haveit=
9488 for x in $LDFLAGS $LTLIBEXPAT; do
9489
9490 acl_save_prefix="$prefix"
9491 prefix="$acl_final_prefix"
9492 acl_save_exec_prefix="$exec_prefix"
9493 exec_prefix="$acl_final_exec_prefix"
9494 eval x=\"$x\"
9495 exec_prefix="$acl_save_exec_prefix"
9496 prefix="$acl_save_prefix"
9497
9498 if test "X$x" = "X-L$additional_libdir"; then
9499 haveit=yes
9500 break
9501 fi
9502 done
9503 if test -z "$haveit"; then
9504 if test -d "$additional_libdir"; then
9505 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9506 fi
9507 fi
9508 fi
9509 fi
9510 ;;
9511 -R*)
9512 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9513 if test "$enable_rpath" != no; then
9514 haveit=
9515 for x in $rpathdirs; do
9516 if test "X$x" = "X$dir"; then
9517 haveit=yes
9518 break
9519 fi
9520 done
9521 if test -z "$haveit"; then
9522 rpathdirs="$rpathdirs $dir"
9523 fi
9524 haveit=
9525 for x in $ltrpathdirs; do
9526 if test "X$x" = "X$dir"; then
9527 haveit=yes
9528 break
9529 fi
9530 done
9531 if test -z "$haveit"; then
9532 ltrpathdirs="$ltrpathdirs $dir"
9533 fi
9534 fi
9535 ;;
9536 -l*)
9537 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9538 ;;
9539 *.la)
9540 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9541 ;;
9542 *)
9543 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9544 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9545 ;;
81ecdfbb
RW
9546 esac
9547 done
9548 fi
9549 else
9550 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9551 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9552 fi
9553 fi
9554 fi
9555 done
9556 done
9557 if test "X$rpathdirs" != "X"; then
9558 if test -n "$hardcode_libdir_separator"; then
9559 alldirs=
9560 for found_dir in $rpathdirs; do
9561 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9562 done
9563 acl_save_libdir="$libdir"
9564 libdir="$alldirs"
9565 eval flag=\"$hardcode_libdir_flag_spec\"
9566 libdir="$acl_save_libdir"
9567 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9568 else
9569 for found_dir in $rpathdirs; do
9570 acl_save_libdir="$libdir"
9571 libdir="$found_dir"
9572 eval flag=\"$hardcode_libdir_flag_spec\"
9573 libdir="$acl_save_libdir"
9574 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9575 done
9576 fi
9577 fi
9578 if test "X$ltrpathdirs" != "X"; then
9579 for found_dir in $ltrpathdirs; do
9580 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9581 done
9582 fi
a9322a30
TT
9583
9584
81ecdfbb 9585 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9586
81ecdfbb
RW
9587 for element in $INCEXPAT; do
9588 haveit=
9589 for x in $CPPFLAGS; do
a9322a30 9590
81ecdfbb
RW
9591 acl_save_prefix="$prefix"
9592 prefix="$acl_final_prefix"
9593 acl_save_exec_prefix="$exec_prefix"
9594 exec_prefix="$acl_final_exec_prefix"
9595 eval x=\"$x\"
9596 exec_prefix="$acl_save_exec_prefix"
9597 prefix="$acl_save_prefix"
a8111142 9598
81ecdfbb
RW
9599 if test "X$x" = "X$element"; then
9600 haveit=yes
9601 break
9602 fi
9603 done
9604 if test -z "$haveit"; then
9605 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9606 fi
9607 done
a9322a30
TT
9608
9609
81ecdfbb
RW
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9611$as_echo_n "checking for libexpat... " >&6; }
9612if test "${ac_cv_libexpat+set}" = set; then :
9613 $as_echo_n "(cached) " >&6
bec39cab 9614else
bec39cab 9615
81ecdfbb
RW
9616 ac_save_LIBS="$LIBS"
9617 LIBS="$LIBS $LIBEXPAT"
9618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9619/* end confdefs.h. */
81ecdfbb
RW
9620#include "expat.h"
9621int
9622main ()
9623{
9624XML_Parser p = XML_ParserCreate (0);
9625 ;
9626 return 0;
9627}
bec39cab 9628_ACEOF
81ecdfbb
RW
9629if ac_fn_c_try_link "$LINENO"; then :
9630 ac_cv_libexpat=yes
c906108c 9631else
81ecdfbb 9632 ac_cv_libexpat=no
bec39cab 9633fi
81ecdfbb
RW
9634rm -f core conftest.err conftest.$ac_objext \
9635 conftest$ac_exeext conftest.$ac_ext
9636 LIBS="$ac_save_LIBS"
c906108c 9637
95ca63c4 9638fi
81ecdfbb
RW
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9640$as_echo "$ac_cv_libexpat" >&6; }
9641 if test "$ac_cv_libexpat" = yes; then
9642 HAVE_LIBEXPAT=yes
bec39cab 9643
81ecdfbb 9644$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9645
81ecdfbb
RW
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9647$as_echo_n "checking how to link with libexpat... " >&6; }
9648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9649$as_echo "$LIBEXPAT" >&6; }
9650 else
9651 HAVE_LIBEXPAT=no
9652 CPPFLAGS="$ac_save_CPPFLAGS"
9653 LIBEXPAT=
9654 LTLIBEXPAT=
9655 fi
95ca63c4
CF
9656
9657
9658
7cb9022a
MK
9659
9660
bec39cab 9661
81ecdfbb
RW
9662 if test "$HAVE_LIBEXPAT" != yes; then
9663 if test "$with_expat" = yes; then
9664 as_fn_error "expat is missing or unusable" "$LINENO" 5
9665 else
9666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9667$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9668 fi
9669 else
9670 save_LIBS=$LIBS
9671 LIBS="$LIBS $LIBEXPAT"
9672 for ac_func in XML_StopParser
9673do :
9674 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9675if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9676 cat >>confdefs.h <<_ACEOF
81ecdfbb 9677#define HAVE_XML_STOPPARSER 1
bec39cab 9678_ACEOF
95ca63c4 9679
bec39cab 9680fi
bec39cab 9681done
95ca63c4 9682
81ecdfbb
RW
9683 LIBS=$save_LIBS
9684 fi
a9322a30
TT
9685fi
9686
d344e670
DE
9687# --------------------- #
9688# Check for libpython. #
9689# --------------------- #
9690
a9322a30 9691
a9322a30
TT
9692
9693
ec685c5e 9694
0c4a4063 9695
81ecdfbb
RW
9696# Check whether --with-python was given.
9697if test "${with_python+set}" = set; then :
9698 withval=$with_python;
bec39cab 9699else
81ecdfbb 9700 with_python=auto
bec39cab 9701fi
bec39cab 9702
81ecdfbb
RW
9703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9704$as_echo_n "checking whether to use python... " >&6; }
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9706$as_echo "$with_python" >&6; }
9a156167 9707
81ecdfbb
RW
9708if test "${with_python}" = no; then
9709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9710$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9711 have_libpython=no
bec39cab 9712else
81ecdfbb 9713 case "${with_python}" in
8c85a4e2 9714 [\\/]* | ?:[\\/]*)
ec685c5e
DE
9715 if test -d ${with_python}; then
9716 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 9717 python_prog="${with_python}/bin/python"
0c4a4063 9718 python_prefix=
9c4ea6c5
JB
9719 # If python does not exit ${with_python}/bin, then try in
9720 # ${with_python}. On Windows/MinGW, this is where the Python
9721 # executable is.
9722 if test ! -x "${python_prog}"; then
9723 python_prog="${with_python}/python"
9724 python_prefix=
9725 fi
e7a30f46 9726 if test ! -x "${python_prog}"; then
ec685c5e
DE
9727 # Fall back to gdb 7.0/7.1 behaviour.
9728 python_prog=missing
0c4a4063 9729 python_prefix=${with_python}
ec685c5e 9730 fi
e7a30f46 9731 elif test -x "${with_python}"; then
ec685c5e
DE
9732 # While we can't run python compiled for $host (unless host == build),
9733 # the user could write a script that provides the needed information,
9734 # so we support that.
ec685c5e 9735 python_prog=${with_python}
0c4a4063 9736 python_prefix=
ec685c5e
DE
9737 else
9738 as_fn_error "invalid value for --with-python" "$LINENO" 5
9739 fi
81ecdfbb 9740 ;;
ec685c5e
DE
9741 */*)
9742 # Disallow --with-python=foo/bar.
81ecdfbb
RW
9743 as_fn_error "invalid value for --with-python" "$LINENO" 5
9744 ;;
ec685c5e
DE
9745 *)
9746 # The user has either specified auto, yes, or the name of the python
9747 # program assumed to be in $PATH.
9748 python_prefix=
9749 case "${with_python}" in
9750 yes | auto)
9751 if test ${build} = ${host}; then
9752 # Extract the first word of "python", so it can be a program name with args.
9753set dummy python; ac_word=$2
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9755$as_echo_n "checking for $ac_word... " >&6; }
9756if test "${ac_cv_path_python_prog_path+set}" = set; then :
9757 $as_echo_n "(cached) " >&6
9758else
9759 case $python_prog_path in
9760 [\\/]* | ?:[\\/]*)
9761 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9762 ;;
9763 *)
9764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9765for as_dir in $PATH
9766do
9767 IFS=$as_save_IFS
9768 test -z "$as_dir" && as_dir=.
9769 for ac_exec_ext in '' $ac_executable_extensions; do
9770 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9771 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9773 break 2
9774 fi
9775done
9776 done
9777IFS=$as_save_IFS
9778
9779 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9780 ;;
9781esac
9782fi
9783python_prog_path=$ac_cv_path_python_prog_path
9784if test -n "$python_prog_path"; then
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9786$as_echo "$python_prog_path" >&6; }
9787else
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790fi
9791
9792
9793 if test "${python_prog_path}" = missing; then
9794 python_prog=missing
9795 else
9796 python_prog=${python_prog_path}
9797 fi
9798 else
9799 # Not much we can do except assume the cross-compiler will find the
9800 # right files.
9801 python_prog=missing
9802 fi
9803 ;;
9804 *)
9805 # While we can't run python compiled for $host (unless host == build),
9806 # the user could write a script that provides the needed information,
9807 # so we support that.
9808 python_prog="${with_python}"
9809 # Extract the first word of "${python_prog}", so it can be a program name with args.
9810set dummy ${python_prog}; ac_word=$2
9811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9812$as_echo_n "checking for $ac_word... " >&6; }
9813if test "${ac_cv_path_python_prog_path+set}" = set; then :
9814 $as_echo_n "(cached) " >&6
9815else
9816 case $python_prog_path in
9817 [\\/]* | ?:[\\/]*)
9818 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9819 ;;
9820 *)
9821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9822for as_dir in $PATH
9823do
9824 IFS=$as_save_IFS
9825 test -z "$as_dir" && as_dir=.
9826 for ac_exec_ext in '' $ac_executable_extensions; do
9827 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9828 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9830 break 2
9831 fi
9832done
9833 done
9834IFS=$as_save_IFS
9835
9836 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9837 ;;
9838esac
9839fi
9840python_prog_path=$ac_cv_path_python_prog_path
9841if test -n "$python_prog_path"; then
9842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9843$as_echo "$python_prog_path" >&6; }
9844else
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846$as_echo "no" >&6; }
9847fi
9848
9849
9850 if test "${python_prog_path}" = missing; then
9851 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9852 fi
9853 ;;
9854 esac
81ecdfbb
RW
9855 esac
9856
ec685c5e 9857 if test "${python_prog}" != missing; then
e7a30f46
DE
9858 # We have a python program to use, but it may be too old.
9859 # Don't flag an error for --with-python=auto (the default).
9860 have_python_config=yes
ec685c5e
DE
9861 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9862 if test $? != 0; then
e7a30f46
DE
9863 have_python_config=failed
9864 if test "${with_python}" != auto; then
9865 as_fn_error "failure running python-config --includes" "$LINENO" 5
9866 fi
ec685c5e
DE
9867 fi
9868 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9869 if test $? != 0; then
e7a30f46
DE
9870 have_python_config=failed
9871 if test "${with_python}" != auto; then
9872 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9873 fi
ec685c5e 9874 fi
0c4a4063
DE
9875 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9876 if test $? != 0; then
e7a30f46
DE
9877 have_python_config=failed
9878 if test "${with_python}" != auto; then
9879 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9880 fi
0c4a4063 9881 fi
ec685c5e 9882 else
ac534cba
JB
9883 # We do not have a python executable we can use to determine where
9884 # to find the Python headers and libs. We cannot guess the include
9885 # path from the python_prefix either, because that include path
9886 # depends on the Python version. So, there is nothing much we can
9887 # do except assume that the compiler will be able to find those files.
9888 python_includes=
9889 python_libs=
0c4a4063 9890 have_python_config=no
ec685c5e 9891 fi
bec39cab 9892
ec685c5e
DE
9893 # If we have python-config, only try the configuration it provides.
9894 # Otherwise fallback on the old way of trying different versions of
9895 # python in turn.
81ecdfbb 9896
ec685c5e
DE
9897 have_libpython=no
9898 if test "${have_python_config}" = yes; then
c1039e3c
JB
9899 # Determine the Python version by extracting "-lpython<version>"
9900 # part of the python_libs. <version> is usually X.Y with X and Y
9901 # being decimal numbers, but can also be XY (seen on Windows).
9902 #
9903 # The extraction is performed using sed with a regular expression.
9904 # Initially, the regexp used was using the '?' quantifier to make
9905 # the dot in the version number optional. Unfortunately, this
9906 # does not work with non-GNU versions of sed because, because of
9907 # what looks like a limitation (the '?' quantifier does not work
9908 # with back-references). We work around this limitation by using
9909 # the '*' quantifier instead. It means that, in theory, we might
9910 # match unexpected version strings such as "-lpython2..7", but
9911 # this seems unlikely in practice. And even if that happens,
9912 # an error will be triggered later on, when checking that version
9913 # number.
ec685c5e 9914 python_version=`echo " ${python_libs} " \
c1039e3c 9915 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
9916 case "${python_version}" in
9917 python*)
ec685c5e
DE
9918
9919 version=${python_version}
9920
9921 new_CPPFLAGS=${python_includes}
9922 new_LIBS=${python_libs}
81ecdfbb
RW
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9924$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 9925 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 9926 save_LIBS=$LIBS
ec685c5e
DE
9927 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9928 LIBS="$LIBS $new_LIBS"
9929 found_usable_python=no
81ecdfbb 9930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9931/* end confdefs.h. */
ac534cba 9932#include "Python.h"
81ecdfbb
RW
9933int
9934main ()
9935{
9936Py_Initialize ();
9937 ;
9938 return 0;
9939}
bec39cab 9940_ACEOF
81ecdfbb 9941if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
9942 have_libpython=${version}
9943 found_usable_python=yes
ac534cba
JB
9944 PYTHON_CPPFLAGS=$new_CPPFLAGS
9945 PYTHON_LIBS=$new_LIBS
9a156167 9946fi
81ecdfbb
RW
9947rm -f core conftest.err conftest.$ac_objext \
9948 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9949 CPPFLAGS=$save_CPPFLAGS
9950 LIBS=$save_LIBS
ec685c5e
DE
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9952$as_echo "${found_usable_python}" >&6; }
9a156167 9953
0c4a4063
DE
9954 ;;
9955 *)
ec685c5e 9956 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
9957 ;;
9958 esac
e7a30f46 9959 elif test "${have_python_config}" != failed; then
ec685c5e 9960 if test "${have_libpython}" = no; then
9a156167 9961
420697bb
TT
9962 version=python2.7
9963
9964 new_CPPFLAGS=${python_includes}
9965 new_LIBS="${python_libs} -lpython2.7"
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
9967$as_echo_n "checking for ${version}... " >&6; }
9968 save_CPPFLAGS=$CPPFLAGS
9969 save_LIBS=$LIBS
9970 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9971 LIBS="$LIBS $new_LIBS"
9972 found_usable_python=no
9973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9974/* end confdefs.h. */
ac534cba 9975#include "Python.h"
420697bb
TT
9976int
9977main ()
9978{
9979Py_Initialize ();
9980 ;
9981 return 0;
9982}
9983_ACEOF
9984if ac_fn_c_try_link "$LINENO"; then :
9985 have_libpython=${version}
9986 found_usable_python=yes
ac534cba
JB
9987 PYTHON_CPPFLAGS=$new_CPPFLAGS
9988 PYTHON_LIBS=$new_LIBS
420697bb
TT
9989fi
9990rm -f core conftest.err conftest.$ac_objext \
9991 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
9992 CPPFLAGS=$save_CPPFLAGS
9993 LIBS=$save_LIBS
420697bb
TT
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
9995$as_echo "${found_usable_python}" >&6; }
9996
9997 fi
9998 if test "${have_libpython}" = no; then
9999
ec685c5e
DE
10000 version=python2.6
10001
10002 new_CPPFLAGS=${python_includes}
10003 new_LIBS="${python_libs} -lpython2.6"
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10005$as_echo_n "checking for ${version}... " >&6; }
10006 save_CPPFLAGS=$CPPFLAGS
10007 save_LIBS=$LIBS
10008 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10009 LIBS="$LIBS $new_LIBS"
10010 found_usable_python=no
10011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10012/* end confdefs.h. */
ac534cba 10013#include "Python.h"
ec685c5e
DE
10014int
10015main ()
10016{
10017Py_Initialize ();
10018 ;
10019 return 0;
10020}
10021_ACEOF
10022if ac_fn_c_try_link "$LINENO"; then :
10023 have_libpython=${version}
10024 found_usable_python=yes
ac534cba
JB
10025 PYTHON_CPPFLAGS=$new_CPPFLAGS
10026 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10027fi
10028rm -f core conftest.err conftest.$ac_objext \
10029 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10030 CPPFLAGS=$save_CPPFLAGS
10031 LIBS=$save_LIBS
ec685c5e
DE
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10033$as_echo "${found_usable_python}" >&6; }
9a156167 10034
81ecdfbb 10035 fi
ec685c5e 10036 if test ${have_libpython} = no; then
9a156167 10037
81ecdfbb 10038 version=python2.5
9a156167 10039
ec685c5e
DE
10040 new_CPPFLAGS=${python_includes}
10041 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10043$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10044 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10045 save_LIBS=$LIBS
ec685c5e
DE
10046 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10047 LIBS="$LIBS $new_LIBS"
10048 found_usable_python=no
81ecdfbb 10049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10050/* end confdefs.h. */
ac534cba 10051#include "Python.h"
81ecdfbb
RW
10052int
10053main ()
10054{
10055Py_Initialize ();
10056 ;
10057 return 0;
10058}
436868fb 10059_ACEOF
81ecdfbb 10060if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10061 have_libpython=${version}
10062 found_usable_python=yes
ac534cba
JB
10063 PYTHON_CPPFLAGS=$new_CPPFLAGS
10064 PYTHON_LIBS=$new_LIBS
436868fb 10065fi
81ecdfbb
RW
10066rm -f core conftest.err conftest.$ac_objext \
10067 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10068 CPPFLAGS=$save_CPPFLAGS
10069 LIBS=$save_LIBS
ec685c5e
DE
10070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10071$as_echo "${found_usable_python}" >&6; }
a9322a30 10072
81ecdfbb 10073 fi
ec685c5e 10074 if test ${have_libpython} = no; then
a9322a30 10075
81ecdfbb 10076 version=python2.4
a9322a30 10077
ec685c5e
DE
10078 new_CPPFLAGS=${python_includes}
10079 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10081$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10082 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10083 save_LIBS=$LIBS
ec685c5e
DE
10084 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10085 LIBS="$LIBS $new_LIBS"
10086 found_usable_python=no
81ecdfbb 10087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10088/* end confdefs.h. */
ac534cba 10089#include "Python.h"
a9322a30
TT
10090int
10091main ()
10092{
81ecdfbb 10093Py_Initialize ();
a9322a30
TT
10094 ;
10095 return 0;
10096}
436868fb 10097_ACEOF
81ecdfbb 10098if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10099 have_libpython=${version}
10100 found_usable_python=yes
ac534cba
JB
10101 PYTHON_CPPFLAGS=$new_CPPFLAGS
10102 PYTHON_LIBS=$new_LIBS
436868fb 10103fi
81ecdfbb
RW
10104rm -f core conftest.err conftest.$ac_objext \
10105 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10106 CPPFLAGS=$save_CPPFLAGS
10107 LIBS=$save_LIBS
ec685c5e
DE
10108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10109$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10110
ec685c5e
DE
10111 fi
10112 fi
9c4ea6c5 10113 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10114
10115$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10116
9c4ea6c5 10117 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10118
10119$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10120
9c4ea6c5 10121 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10122
10123$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10124
9c4ea6c5 10125 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10126
10127$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10128
81ecdfbb 10129 fi
ec685c5e
DE
10130
10131 if test "${have_libpython}" = no; then
81ecdfbb
RW
10132 case "${with_python}" in
10133 yes)
10134 as_fn_error "python is missing or unusable" "$LINENO" 5
10135 ;;
10136 auto)
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10138$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10139 ;;
10140 *)
10141 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10142 ;;
10143 esac
0c4a4063
DE
10144 else
10145 if test -n "${python_prefix}"; then
10146
10147cat >>confdefs.h <<_ACEOF
10148#define WITH_PYTHON_PATH "${python_prefix}"
10149_ACEOF
10150
10151
10152 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10153 if test "x$prefix" = xNONE; then
10154 test_prefix=/usr/local
10155 else
10156 test_prefix=$prefix
10157 fi
10158 else
10159 test_prefix=$exec_prefix
10160 fi
10161 value=0
10162 case ${python_prefix} in
10163 "${test_prefix}"|"${test_prefix}/"*|\
10164 '${exec_prefix}'|'${exec_prefix}/'*)
10165 value=1
10166 ;;
10167 esac
10168
10169cat >>confdefs.h <<_ACEOF
10170#define PYTHON_PATH_RELOCATABLE $value
10171_ACEOF
10172
10173
10174 fi
81ecdfbb 10175 fi
436868fb 10176fi
436868fb 10177
ec685c5e 10178if test "${have_libpython}" != no; then
436868fb 10179
81ecdfbb 10180$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10181
81ecdfbb
RW
10182 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10183 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10184 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10185 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10186 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10187
81ecdfbb
RW
10188 # Flags needed to compile Python code (taken from python-config --cflags).
10189 # We cannot call python-config directly because it will output whatever was
10190 # used when compiling the Python interpreter itself, including flags which
10191 # would make the python-related objects be compiled differently from the
10192 # rest of GDB (e.g., -O2 and -fPIC).
10193 if test "${GCC}" = yes; then
10194 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10195 fi
436868fb 10196
81ecdfbb
RW
10197 if test "x${tentative_python_cflags}" != x; then
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10199$as_echo_n "checking compiler flags for python code... " >&6; }
10200 for flag in ${tentative_python_cflags}; do
10201 # Check that the compiler accepts it
10202 saved_CFLAGS="$CFLAGS"
10203 CFLAGS="$CFLAGS $flag"
10204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10205/* end confdefs.h. */
81ecdfbb 10206
a9322a30
TT
10207int
10208main ()
10209{
a9322a30
TT
10210
10211 ;
10212 return 0;
10213}
bec39cab 10214_ACEOF
81ecdfbb
RW
10215if ac_fn_c_try_compile "$LINENO"; then :
10216 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10217fi
81ecdfbb
RW
10218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10219 CFLAGS="$saved_CFLAGS"
10220 done
10221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10222$as_echo "${PYTHON_CFLAGS}" >&6; }
10223 fi
043b6510 10224
c83393b9
JB
10225 # On x64 Windows, Python's include headers, and pyconfig.h in
10226 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10227 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10228 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10229 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10230 # The issue was reported to the Python community, but still isn't
10231 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10232
043b6510 10233 case "$gdb_host" in
c83393b9
JB
10234 mingw64)
10235 if test "${GCC}" = yes; then
10236 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10237 fi
10238 ;;
043b6510 10239 esac
a8db4212
YPK
10240
10241 # Note that "python -m threading" cannot be used to check for
10242 # threading support due to a bug in Python 2.7.3
10243 # (http://bugs.python.org/issue15567).
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10245$as_echo_n "checking whether python supports threads... " >&6; }
10246 saved_CPPFLAGS="${CPPFLAGS}"
10247 CPPFLAGS="${PYTHON_CPPFLAGS}"
10248 # Note that the test is reversed so that python_has_threads=yes on
10249 # unexpected failures.
10250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10251/* end confdefs.h. */
10252
10253#include <Python.h>
10254#ifdef WITH_THREAD
10255# error
10256#endif
10257
10258_ACEOF
10259if ac_fn_c_try_cpp "$LINENO"; then :
10260 python_has_threads=no
10261else
10262 python_has_threads=yes
10263fi
10264rm -f conftest.err conftest.$ac_ext
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10266$as_echo "${python_has_threads}" >&6; }
10267 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10268else
6dddc817
DE
10269 # Even if Python support is not compiled in, we need to have this file
10270 # included so that the "python" command, et.al., still exists.
10271 CONFIG_OBS="$CONFIG_OBS python.o"
10272 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10273fi
9a156167 10274
a4a1c157
PA
10275# Work around Python http://bugs.python.org/issue10112. See also
10276# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10277# no effect. Note that the only test after this that uses Python is
10278# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10279# run without -export-dynamic too.
10280PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10281
10282
ed3ef339
DE
10283
10284
4df42755
DE
10285 if test "${have_libpython}" != no; then
10286 HAVE_PYTHON_TRUE=
10287 HAVE_PYTHON_FALSE='#'
10288else
10289 HAVE_PYTHON_TRUE='#'
10290 HAVE_PYTHON_FALSE=
10291fi
10292
ed3ef339
DE
10293
10294# -------------------- #
10295# Check for libguile. #
10296# -------------------- #
10297
10298
e1402065
DE
10299
10300
10301
10302
10303# Check whether --with-guile was given.
10304if test "${with_guile+set}" = set; then :
10305 withval=$with_guile;
10306else
10307 with_guile=auto
10308fi
10309
10310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10311$as_echo_n "checking whether to use guile... " >&6; }
10312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10313$as_echo "$with_guile" >&6; }
10314
ed3ef339
DE
10315# Extract the first word of "pkg-config", so it can be a program name with args.
10316set dummy pkg-config; ac_word=$2
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318$as_echo_n "checking for $ac_word... " >&6; }
10319if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10320 $as_echo_n "(cached) " >&6
10321else
10322 case $pkg_config_prog_path in
10323 [\\/]* | ?:[\\/]*)
10324 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10325 ;;
10326 *)
10327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330 IFS=$as_save_IFS
10331 test -z "$as_dir" && as_dir=.
10332 for ac_exec_ext in '' $ac_executable_extensions; do
10333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10334 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336 break 2
10337 fi
10338done
10339 done
10340IFS=$as_save_IFS
10341
10342 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10343 ;;
10344esac
10345fi
10346pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10347if test -n "$pkg_config_prog_path"; then
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10349$as_echo "$pkg_config_prog_path" >&6; }
10350else
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10352$as_echo "no" >&6; }
10353fi
10354
10355
10356
214ab2da 10357try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
10358have_libguile=no
10359case "${with_guile}" in
10360no)
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10362$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10363 ;;
10364auto)
e1402065
DE
10365 if test "${pkg_config_prog_path}" = "missing"; then
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10367$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10368 else
ed3ef339
DE
10369
10370 pkg_config=${pkg_config_prog_path}
10371 guile_version_list=${try_guile_versions}
10372 flag_errors=no
10373
ed3ef339
DE
10374 found_usable_guile=checking
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10376$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10377 for guile_version in ${guile_version_list}; do
10378 ${pkg_config} --exists ${guile_version} 2>/dev/null
10379 if test $? != 0; then
10380 continue
10381 fi
10382 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10383 if test $? != 0; then
10384 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10385 fi
10386 new_LIBS=`${pkg_config} --libs ${guile_version}`
10387 if test $? != 0; then
10388 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10389 fi
10390 found_usable_guile=${guile_version}
10391 break
10392 done
10393 if test "${found_usable_guile}" = "checking"; then
10394 if test "${flag_errors}" = "yes"; then
10395 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10396 else
10397 found_usable_guile=no
10398 fi
10399 fi
10400 if test "${found_usable_guile}" != no; then
10401 save_CPPFLAGS=$CPPFLAGS
10402 save_LIBS=$LIBS
10403 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10404 LIBS="$LIBS $new_LIBS"
10405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10406/* end confdefs.h. */
10407#include "libguile.h"
10408int
10409main ()
10410{
10411scm_init_guile ();
10412 ;
10413 return 0;
10414}
10415_ACEOF
10416if ac_fn_c_try_link "$LINENO"; then :
10417 have_libguile=yes
10418 GUILE_CPPFLAGS=$new_CPPFLAGS
10419 GUILE_LIBS=$new_LIBS
10420else
10421 found_usable_guile=no
10422fi
10423rm -f core conftest.err conftest.$ac_objext \
10424 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10425 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10426if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10427
10428$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10429
10430
10431fi
10432
ed3ef339
DE
10433 CPPFLAGS=$save_CPPFLAGS
10434 LIBS=$save_LIBS
10435 if test "${found_usable_guile}" = no; then
10436 if test "${flag_errors}" = yes; then
10437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10439as_fn_error "linking guile version ${guile_version} test program failed
10440See \`config.log' for more details." "$LINENO" 5; }
10441 fi
10442 fi
10443 fi
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10445$as_echo "${found_usable_guile}" >&6; }
10446
e1402065 10447 fi
ed3ef339
DE
10448 ;;
10449yes)
e1402065
DE
10450 if test "${pkg_config_prog_path}" = "missing"; then
10451 as_fn_error "pkg-config not found" "$LINENO" 5
10452 fi
ed3ef339
DE
10453
10454 pkg_config=${pkg_config_prog_path}
10455 guile_version_list=${try_guile_versions}
10456 flag_errors=yes
10457
ed3ef339
DE
10458 found_usable_guile=checking
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10460$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10461 for guile_version in ${guile_version_list}; do
10462 ${pkg_config} --exists ${guile_version} 2>/dev/null
10463 if test $? != 0; then
10464 continue
10465 fi
10466 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10467 if test $? != 0; then
10468 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10469 fi
10470 new_LIBS=`${pkg_config} --libs ${guile_version}`
10471 if test $? != 0; then
10472 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10473 fi
10474 found_usable_guile=${guile_version}
10475 break
10476 done
10477 if test "${found_usable_guile}" = "checking"; then
10478 if test "${flag_errors}" = "yes"; then
10479 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10480 else
10481 found_usable_guile=no
10482 fi
10483 fi
10484 if test "${found_usable_guile}" != no; then
10485 save_CPPFLAGS=$CPPFLAGS
10486 save_LIBS=$LIBS
10487 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10488 LIBS="$LIBS $new_LIBS"
10489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10490/* end confdefs.h. */
10491#include "libguile.h"
10492int
10493main ()
10494{
10495scm_init_guile ();
10496 ;
10497 return 0;
10498}
10499_ACEOF
10500if ac_fn_c_try_link "$LINENO"; then :
10501 have_libguile=yes
10502 GUILE_CPPFLAGS=$new_CPPFLAGS
10503 GUILE_LIBS=$new_LIBS
10504else
10505 found_usable_guile=no
10506fi
10507rm -f core conftest.err conftest.$ac_objext \
10508 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10509 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10510if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10511
10512$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10513
10514
10515fi
10516
ed3ef339
DE
10517 CPPFLAGS=$save_CPPFLAGS
10518 LIBS=$save_LIBS
10519 if test "${found_usable_guile}" = no; then
10520 if test "${flag_errors}" = yes; then
10521 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10523as_fn_error "linking guile version ${guile_version} test program failed
10524See \`config.log' for more details." "$LINENO" 5; }
10525 fi
10526 fi
10527 fi
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10529$as_echo "${found_usable_guile}" >&6; }
10530
10531 ;;
10532[\\/]* | ?:[\\/]*)
e1402065 10533 if test -x "${with_guile}"; then
ed3ef339
DE
10534
10535 pkg_config=${with_guile}
10536 guile_version_list=${try_guile_versions}
10537 flag_errors=yes
10538
ed3ef339
DE
10539 found_usable_guile=checking
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10541$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10542 for guile_version in ${guile_version_list}; do
10543 ${pkg_config} --exists ${guile_version} 2>/dev/null
10544 if test $? != 0; then
10545 continue
10546 fi
10547 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10548 if test $? != 0; then
10549 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10550 fi
10551 new_LIBS=`${pkg_config} --libs ${guile_version}`
10552 if test $? != 0; then
10553 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10554 fi
10555 found_usable_guile=${guile_version}
10556 break
10557 done
10558 if test "${found_usable_guile}" = "checking"; then
10559 if test "${flag_errors}" = "yes"; then
10560 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10561 else
10562 found_usable_guile=no
10563 fi
10564 fi
10565 if test "${found_usable_guile}" != no; then
10566 save_CPPFLAGS=$CPPFLAGS
10567 save_LIBS=$LIBS
10568 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10569 LIBS="$LIBS $new_LIBS"
10570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10571/* end confdefs.h. */
10572#include "libguile.h"
10573int
10574main ()
10575{
10576scm_init_guile ();
10577 ;
10578 return 0;
10579}
10580_ACEOF
10581if ac_fn_c_try_link "$LINENO"; then :
10582 have_libguile=yes
10583 GUILE_CPPFLAGS=$new_CPPFLAGS
10584 GUILE_LIBS=$new_LIBS
10585else
10586 found_usable_guile=no
10587fi
10588rm -f core conftest.err conftest.$ac_objext \
10589 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10590 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10591if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10592
10593$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10594
10595
10596fi
10597
ed3ef339
DE
10598 CPPFLAGS=$save_CPPFLAGS
10599 LIBS=$save_LIBS
10600 if test "${found_usable_guile}" = no; then
10601 if test "${flag_errors}" = yes; then
10602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10604as_fn_error "linking guile version ${guile_version} test program failed
10605See \`config.log' for more details." "$LINENO" 5; }
10606 fi
10607 fi
10608 fi
10609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10610$as_echo "${found_usable_guile}" >&6; }
10611
e1402065
DE
10612 else
10613 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
10614 fi
ed3ef339
DE
10615 ;;
10616"" | */*)
10617 # Disallow --with=guile="" and --with-guile=foo/bar.
10618 as_fn_error "invalid value for --with-guile" "$LINENO" 5
10619 ;;
10620*)
10621 # A space separate list of guile versions to try, in order.
e1402065
DE
10622 if test "${pkg_config_prog_path}" = "missing"; then
10623 as_fn_error "pkg-config not found" "$LINENO" 5
10624 fi
ed3ef339
DE
10625
10626 pkg_config=${pkg_config_prog_path}
10627 guile_version_list=${with_guile}
10628 flag_errors=yes
10629
ed3ef339
DE
10630 found_usable_guile=checking
10631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10632$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10633 for guile_version in ${guile_version_list}; do
10634 ${pkg_config} --exists ${guile_version} 2>/dev/null
10635 if test $? != 0; then
10636 continue
10637 fi
10638 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10639 if test $? != 0; then
10640 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10641 fi
10642 new_LIBS=`${pkg_config} --libs ${guile_version}`
10643 if test $? != 0; then
10644 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10645 fi
10646 found_usable_guile=${guile_version}
10647 break
10648 done
10649 if test "${found_usable_guile}" = "checking"; then
10650 if test "${flag_errors}" = "yes"; then
10651 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10652 else
10653 found_usable_guile=no
10654 fi
10655 fi
10656 if test "${found_usable_guile}" != no; then
10657 save_CPPFLAGS=$CPPFLAGS
10658 save_LIBS=$LIBS
10659 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10660 LIBS="$LIBS $new_LIBS"
10661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10662/* end confdefs.h. */
10663#include "libguile.h"
10664int
10665main ()
10666{
10667scm_init_guile ();
10668 ;
10669 return 0;
10670}
10671_ACEOF
10672if ac_fn_c_try_link "$LINENO"; then :
10673 have_libguile=yes
10674 GUILE_CPPFLAGS=$new_CPPFLAGS
10675 GUILE_LIBS=$new_LIBS
10676else
10677 found_usable_guile=no
10678fi
10679rm -f core conftest.err conftest.$ac_objext \
10680 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10681 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10682if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10683
10684$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10685
10686
10687fi
10688
ed3ef339
DE
10689 CPPFLAGS=$save_CPPFLAGS
10690 LIBS=$save_LIBS
10691 if test "${found_usable_guile}" = no; then
10692 if test "${flag_errors}" = yes; then
10693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10695as_fn_error "linking guile version ${guile_version} test program failed
10696See \`config.log' for more details." "$LINENO" 5; }
10697 fi
10698 fi
10699 fi
10700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10701$as_echo "${found_usable_guile}" >&6; }
10702
10703 ;;
10704esac
10705
e76c5d17 10706if test "${have_libguile}" != no; then
d342a0da
DE
10707 case "${with_guile}" in
10708 [\\/]* | ?:[\\/]*)
e76c5d17
DE
10709
10710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10711$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10712if test "${ac_cv_guild_program_name+set}" = set; then :
10713 $as_echo_n "(cached) " >&6
10714else
d342a0da 10715 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
10716
10717 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10718 # the 'guild' and 'bindir' variables. In that case, try to guess
10719 # what the program name is, at the risk of getting it wrong if
10720 # Guile was configured with '--program-suffix' or similar.
10721 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 10722 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
10723 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10724 fi
10725
10726fi
10727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10728$as_echo "$ac_cv_guild_program_name" >&6; }
10729
10730 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10731 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10732 fi
10733
10734 GUILD="$ac_cv_guild_program_name"
10735
10736
d342a0da
DE
10737 ;;
10738 *)
10739
10740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10741$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10742if test "${ac_cv_guild_program_name+set}" = set; then :
10743 $as_echo_n "(cached) " >&6
10744else
10745 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
10746
10747 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10748 # the 'guild' and 'bindir' variables. In that case, try to guess
10749 # what the program name is, at the risk of getting it wrong if
10750 # Guile was configured with '--program-suffix' or similar.
10751 if test "x$ac_cv_guild_program_name" = "x"; then
10752 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
10753 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10754 fi
10755
10756fi
10757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10758$as_echo "$ac_cv_guild_program_name" >&6; }
10759
10760 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10761 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10762 fi
10763
10764 GUILD="$ac_cv_guild_program_name"
10765
10766
10767 ;;
10768 esac
e76c5d17
DE
10769
10770
10771 if test "$cross_compiling" = no; then
10772 GUILD_TARGET_FLAG=
10773 else
10774 GUILD_TARGET_FLAG="--target=$host"
10775 fi
10776
10777
10778
10779
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
10781$as_echo_n "checking whether guild supports this host... " >&6; }
10782if test "${ac_cv_guild_ok+set}" = set; then :
10783 $as_echo_n "(cached) " >&6
10784else
10785 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
10786 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
10787 ac_cv_guild_ok=yes
10788 else
10789 ac_cv_guild_ok=no
10790 fi
10791fi
10792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
10793$as_echo "$ac_cv_guild_ok" >&6; }
10794
10795 if test "$ac_cv_guild_ok" = no; then
10796 have_libguile=no
10797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
10798$as_echo "$as_me: WARNING: disabling guile support" >&2;}
10799 fi
10800fi
10801
ed3ef339
DE
10802if test "${have_libguile}" != no; then
10803
10804$as_echo "#define HAVE_GUILE 1" >>confdefs.h
10805
10806 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
10807 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
10808 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
10809 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
10810 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
10811
10812 save_LIBS="$LIBS"
10813 save_CPPFLAGS="$CPPFLAGS"
10814 LIBS="$GUILE_LIBS"
10815 CPPFLAGS="$GUILE_CPPFLAGS"
10816 for ac_func in scm_new_smob
10817do :
10818 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
10819if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
10820 cat >>confdefs.h <<_ACEOF
10821#define HAVE_SCM_NEW_SMOB 1
10822_ACEOF
10823
10824fi
10825done
10826
10827 LIBS="$save_LIBS"
10828 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10829else
10830 # Even if Guile support is not compiled in, we need to have these files
10831 # included.
10832 CONFIG_OBS="$CONFIG_OBS guile.o"
10833 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10834fi
9a156167 10835
ac534cba 10836
4df42755
DE
10837 if test "${have_libguile}" != no; then
10838 HAVE_GUILE_TRUE=
10839 HAVE_GUILE_FALSE='#'
10840else
10841 HAVE_GUILE_TRUE='#'
10842 HAVE_GUILE_FALSE=
10843fi
10844
ac534cba 10845
d344e670
DE
10846# --------------------- #
10847# Check for libmcheck. #
10848# --------------------- #
10849
a8db4212
YPK
10850# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10851# but turn it off if Python is enabled with threads, since -lmcheck is
10852# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10853# and for releases.
17ef446e
PA
10854if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10855 && $development; then
10856 libmcheck_default=yes
10857else
10858 libmcheck_default=no
a8db4212
YPK
10859fi
10860
17ef446e
PA
10861 # Check whether --enable-libmcheck was given.
10862if test "${enable_libmcheck+set}" = set; then :
10863 enableval=$enable_libmcheck; case "${enableval}" in
10864 yes | y) ENABLE_LIBMCHECK="yes" ;;
10865 no | n) ENABLE_LIBMCHECK="no" ;;
10866 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10867 esac
10868fi
10869
10870
10871 if test -z "${ENABLE_LIBMCHECK}"; then
10872 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10873 fi
17ef446e
PA
10874
10875 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10877$as_echo_n "checking for main in -lmcheck... " >&6; }
10878if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10879 $as_echo_n "(cached) " >&6
10880else
10881 ac_check_lib_save_LIBS=$LIBS
10882LIBS="-lmcheck $LIBS"
10883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10884/* end confdefs.h. */
10885
10886
10887int
10888main ()
10889{
10890return main ();
10891 ;
10892 return 0;
10893}
10894_ACEOF
10895if ac_fn_c_try_link "$LINENO"; then :
10896 ac_cv_lib_mcheck_main=yes
10897else
10898 ac_cv_lib_mcheck_main=no
10899fi
10900rm -f core conftest.err conftest.$ac_objext \
10901 conftest$ac_exeext conftest.$ac_ext
10902LIBS=$ac_check_lib_save_LIBS
10903fi
10904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10905$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10906if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
10907 cat >>confdefs.h <<_ACEOF
10908#define HAVE_LIBMCHECK 1
10909_ACEOF
10910
10911 LIBS="-lmcheck $LIBS"
10912
10913fi
10914
17ef446e
PA
10915 fi
10916
10917
10918if test "$ENABLE_LIBMCHECK" = "yes" \
10919 -a "${have_libpython}" != "no" \
10920 -a "${python_has_threads}" = "yes" ; then
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
10922$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
10923fi
10924
58bfce93
MM
10925
10926# Check whether --with-intel_pt was given.
10927if test "${with_intel_pt+set}" = set; then :
10928 withval=$with_intel_pt;
10929else
10930 with_intel_pt=auto
10931fi
10932
10933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
10934$as_echo_n "checking whether to use intel pt... " >&6; }
10935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
10936$as_echo "$with_intel_pt" >&6; }
10937
10938if test "${with_intel_pt}" = no; then
bc504a31
PA
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
10940$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
10941 HAVE_LIBIPT=no
10942else
5599c404
MM
10943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10944/* end confdefs.h. */
10945
10946#include <linux/perf_event.h>
10947#ifndef PERF_ATTR_SIZE_VER5
10948# error
10949#endif
10950
10951_ACEOF
10952if ac_fn_c_try_cpp "$LINENO"; then :
10953 perf_event=yes
10954else
10955 perf_event=no
10956fi
10957rm -f conftest.err conftest.$ac_ext
10958 if test "$perf_event" != yes; then
10959 if test "$with_intel_pt" = yes; then
10960 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
10961 else
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
10963$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
10964 fi
10965 fi
10966
58bfce93
MM
10967
10968
10969
10970
10971
10972
10973
10974
10975 use_additional=yes
10976
10977 acl_save_prefix="$prefix"
10978 prefix="$acl_final_prefix"
10979 acl_save_exec_prefix="$exec_prefix"
10980 exec_prefix="$acl_final_exec_prefix"
10981
10982 eval additional_includedir=\"$includedir\"
10983 eval additional_libdir=\"$libdir\"
10984
10985 exec_prefix="$acl_save_exec_prefix"
10986 prefix="$acl_save_prefix"
10987
10988
10989# Check whether --with-libipt-prefix was given.
10990if test "${with_libipt_prefix+set}" = set; then :
10991 withval=$with_libipt_prefix;
10992 if test "X$withval" = "Xno"; then
10993 use_additional=no
10994 else
10995 if test "X$withval" = "X"; then
10996
10997 acl_save_prefix="$prefix"
10998 prefix="$acl_final_prefix"
10999 acl_save_exec_prefix="$exec_prefix"
11000 exec_prefix="$acl_final_exec_prefix"
11001
11002 eval additional_includedir=\"$includedir\"
11003 eval additional_libdir=\"$libdir\"
11004
11005 exec_prefix="$acl_save_exec_prefix"
11006 prefix="$acl_save_prefix"
11007
11008 else
11009 additional_includedir="$withval/include"
11010 additional_libdir="$withval/lib"
11011 fi
11012 fi
11013
11014fi
11015
11016 LIBIPT=
11017 LTLIBIPT=
11018 INCIPT=
11019 rpathdirs=
11020 ltrpathdirs=
11021 names_already_handled=
11022 names_next_round='ipt '
11023 while test -n "$names_next_round"; do
11024 names_this_round="$names_next_round"
11025 names_next_round=
11026 for name in $names_this_round; do
11027 already_handled=
11028 for n in $names_already_handled; do
11029 if test "$n" = "$name"; then
11030 already_handled=yes
11031 break
11032 fi
11033 done
11034 if test -z "$already_handled"; then
11035 names_already_handled="$names_already_handled $name"
11036 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11037 eval value=\"\$HAVE_LIB$uppername\"
11038 if test -n "$value"; then
11039 if test "$value" = yes; then
11040 eval value=\"\$LIB$uppername\"
11041 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11042 eval value=\"\$LTLIB$uppername\"
11043 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11044 else
11045 :
11046 fi
11047 else
11048 found_dir=
11049 found_la=
11050 found_so=
11051 found_a=
11052 if test $use_additional = yes; then
11053 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11054 found_dir="$additional_libdir"
11055 found_so="$additional_libdir/lib$name.$shlibext"
11056 if test -f "$additional_libdir/lib$name.la"; then
11057 found_la="$additional_libdir/lib$name.la"
11058 fi
11059 else
11060 if test -f "$additional_libdir/lib$name.$libext"; then
11061 found_dir="$additional_libdir"
11062 found_a="$additional_libdir/lib$name.$libext"
11063 if test -f "$additional_libdir/lib$name.la"; then
11064 found_la="$additional_libdir/lib$name.la"
11065 fi
11066 fi
11067 fi
11068 fi
11069 if test "X$found_dir" = "X"; then
11070 for x in $LDFLAGS $LTLIBIPT; do
11071
11072 acl_save_prefix="$prefix"
11073 prefix="$acl_final_prefix"
11074 acl_save_exec_prefix="$exec_prefix"
11075 exec_prefix="$acl_final_exec_prefix"
11076 eval x=\"$x\"
11077 exec_prefix="$acl_save_exec_prefix"
11078 prefix="$acl_save_prefix"
11079
11080 case "$x" in
11081 -L*)
11082 dir=`echo "X$x" | sed -e 's/^X-L//'`
11083 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11084 found_dir="$dir"
11085 found_so="$dir/lib$name.$shlibext"
11086 if test -f "$dir/lib$name.la"; then
11087 found_la="$dir/lib$name.la"
11088 fi
11089 else
11090 if test -f "$dir/lib$name.$libext"; then
11091 found_dir="$dir"
11092 found_a="$dir/lib$name.$libext"
11093 if test -f "$dir/lib$name.la"; then
11094 found_la="$dir/lib$name.la"
11095 fi
11096 fi
11097 fi
11098 ;;
11099 esac
11100 if test "X$found_dir" != "X"; then
11101 break
11102 fi
11103 done
11104 fi
11105 if test "X$found_dir" != "X"; then
11106 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11107 if test "X$found_so" != "X"; then
11108 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11109 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11110 else
11111 haveit=
11112 for x in $ltrpathdirs; do
11113 if test "X$x" = "X$found_dir"; then
11114 haveit=yes
11115 break
11116 fi
11117 done
11118 if test -z "$haveit"; then
11119 ltrpathdirs="$ltrpathdirs $found_dir"
11120 fi
11121 if test "$hardcode_direct" = yes; then
11122 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11123 else
11124 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11125 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11126 haveit=
11127 for x in $rpathdirs; do
11128 if test "X$x" = "X$found_dir"; then
11129 haveit=yes
11130 break
11131 fi
11132 done
11133 if test -z "$haveit"; then
11134 rpathdirs="$rpathdirs $found_dir"
11135 fi
11136 else
11137 haveit=
11138 for x in $LDFLAGS $LIBIPT; do
11139
11140 acl_save_prefix="$prefix"
11141 prefix="$acl_final_prefix"
11142 acl_save_exec_prefix="$exec_prefix"
11143 exec_prefix="$acl_final_exec_prefix"
11144 eval x=\"$x\"
11145 exec_prefix="$acl_save_exec_prefix"
11146 prefix="$acl_save_prefix"
11147
11148 if test "X$x" = "X-L$found_dir"; then
11149 haveit=yes
11150 break
11151 fi
11152 done
11153 if test -z "$haveit"; then
11154 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11155 fi
11156 if test "$hardcode_minus_L" != no; then
11157 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11158 else
11159 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11160 fi
11161 fi
11162 fi
11163 fi
11164 else
11165 if test "X$found_a" != "X"; then
11166 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11167 else
11168 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11169 fi
11170 fi
11171 additional_includedir=
11172 case "$found_dir" in
11173 */lib | */lib/)
11174 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11175 additional_includedir="$basedir/include"
11176 ;;
11177 esac
11178 if test "X$additional_includedir" != "X"; then
11179 if test "X$additional_includedir" != "X/usr/include"; then
11180 haveit=
11181 if test "X$additional_includedir" = "X/usr/local/include"; then
11182 if test -n "$GCC"; then
11183 case $host_os in
11184 linux*) haveit=yes;;
11185 esac
11186 fi
11187 fi
11188 if test -z "$haveit"; then
11189 for x in $CPPFLAGS $INCIPT; do
11190
11191 acl_save_prefix="$prefix"
11192 prefix="$acl_final_prefix"
11193 acl_save_exec_prefix="$exec_prefix"
11194 exec_prefix="$acl_final_exec_prefix"
11195 eval x=\"$x\"
11196 exec_prefix="$acl_save_exec_prefix"
11197 prefix="$acl_save_prefix"
11198
11199 if test "X$x" = "X-I$additional_includedir"; then
11200 haveit=yes
11201 break
11202 fi
11203 done
11204 if test -z "$haveit"; then
11205 if test -d "$additional_includedir"; then
11206 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11207 fi
11208 fi
11209 fi
11210 fi
11211 fi
11212 if test -n "$found_la"; then
11213 save_libdir="$libdir"
11214 case "$found_la" in
11215 */* | *\\*) . "$found_la" ;;
11216 *) . "./$found_la" ;;
11217 esac
11218 libdir="$save_libdir"
11219 for dep in $dependency_libs; do
11220 case "$dep" in
11221 -L*)
11222 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11223 if test "X$additional_libdir" != "X/usr/lib"; then
11224 haveit=
11225 if test "X$additional_libdir" = "X/usr/local/lib"; then
11226 if test -n "$GCC"; then
11227 case $host_os in
11228 linux*) haveit=yes;;
11229 esac
11230 fi
11231 fi
11232 if test -z "$haveit"; then
11233 haveit=
11234 for x in $LDFLAGS $LIBIPT; do
11235
11236 acl_save_prefix="$prefix"
11237 prefix="$acl_final_prefix"
11238 acl_save_exec_prefix="$exec_prefix"
11239 exec_prefix="$acl_final_exec_prefix"
11240 eval x=\"$x\"
11241 exec_prefix="$acl_save_exec_prefix"
11242 prefix="$acl_save_prefix"
11243
11244 if test "X$x" = "X-L$additional_libdir"; then
11245 haveit=yes
11246 break
11247 fi
11248 done
11249 if test -z "$haveit"; then
11250 if test -d "$additional_libdir"; then
11251 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11252 fi
11253 fi
11254 haveit=
11255 for x in $LDFLAGS $LTLIBIPT; do
11256
11257 acl_save_prefix="$prefix"
11258 prefix="$acl_final_prefix"
11259 acl_save_exec_prefix="$exec_prefix"
11260 exec_prefix="$acl_final_exec_prefix"
11261 eval x=\"$x\"
11262 exec_prefix="$acl_save_exec_prefix"
11263 prefix="$acl_save_prefix"
11264
11265 if test "X$x" = "X-L$additional_libdir"; then
11266 haveit=yes
11267 break
11268 fi
11269 done
11270 if test -z "$haveit"; then
11271 if test -d "$additional_libdir"; then
11272 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11273 fi
11274 fi
11275 fi
11276 fi
11277 ;;
11278 -R*)
11279 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11280 if test "$enable_rpath" != no; then
11281 haveit=
11282 for x in $rpathdirs; do
11283 if test "X$x" = "X$dir"; then
11284 haveit=yes
11285 break
11286 fi
11287 done
11288 if test -z "$haveit"; then
11289 rpathdirs="$rpathdirs $dir"
11290 fi
11291 haveit=
11292 for x in $ltrpathdirs; do
11293 if test "X$x" = "X$dir"; then
11294 haveit=yes
11295 break
11296 fi
11297 done
11298 if test -z "$haveit"; then
11299 ltrpathdirs="$ltrpathdirs $dir"
11300 fi
11301 fi
11302 ;;
11303 -l*)
11304 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11305 ;;
11306 *.la)
11307 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11308 ;;
11309 *)
11310 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11311 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11312 ;;
11313 esac
11314 done
11315 fi
11316 else
11317 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11318 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11319 fi
11320 fi
11321 fi
11322 done
11323 done
11324 if test "X$rpathdirs" != "X"; then
11325 if test -n "$hardcode_libdir_separator"; then
11326 alldirs=
11327 for found_dir in $rpathdirs; do
11328 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11329 done
11330 acl_save_libdir="$libdir"
11331 libdir="$alldirs"
11332 eval flag=\"$hardcode_libdir_flag_spec\"
11333 libdir="$acl_save_libdir"
11334 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11335 else
11336 for found_dir in $rpathdirs; do
11337 acl_save_libdir="$libdir"
11338 libdir="$found_dir"
11339 eval flag=\"$hardcode_libdir_flag_spec\"
11340 libdir="$acl_save_libdir"
11341 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11342 done
11343 fi
11344 fi
11345 if test "X$ltrpathdirs" != "X"; then
11346 for found_dir in $ltrpathdirs; do
11347 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11348 done
11349 fi
11350
11351
11352 ac_save_CPPFLAGS="$CPPFLAGS"
11353
11354 for element in $INCIPT; do
11355 haveit=
11356 for x in $CPPFLAGS; do
11357
11358 acl_save_prefix="$prefix"
11359 prefix="$acl_final_prefix"
11360 acl_save_exec_prefix="$exec_prefix"
11361 exec_prefix="$acl_final_exec_prefix"
11362 eval x=\"$x\"
11363 exec_prefix="$acl_save_exec_prefix"
11364 prefix="$acl_save_prefix"
11365
11366 if test "X$x" = "X$element"; then
11367 haveit=yes
11368 break
11369 fi
11370 done
11371 if test -z "$haveit"; then
11372 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11373 fi
11374 done
11375
11376
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11378$as_echo_n "checking for libipt... " >&6; }
11379if test "${ac_cv_libipt+set}" = set; then :
11380 $as_echo_n "(cached) " >&6
11381else
11382
11383 ac_save_LIBS="$LIBS"
11384 LIBS="$LIBS $LIBIPT"
11385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11386/* end confdefs.h. */
11387#include "intel-pt.h"
11388int
11389main ()
11390{
11391pt_insn_alloc_decoder (0);
11392 ;
11393 return 0;
11394}
11395_ACEOF
11396if ac_fn_c_try_link "$LINENO"; then :
11397 ac_cv_libipt=yes
11398else
11399 ac_cv_libipt=no
11400fi
11401rm -f core conftest.err conftest.$ac_objext \
11402 conftest$ac_exeext conftest.$ac_ext
11403 LIBS="$ac_save_LIBS"
11404
11405fi
11406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11407$as_echo "$ac_cv_libipt" >&6; }
11408 if test "$ac_cv_libipt" = yes; then
11409 HAVE_LIBIPT=yes
11410
11411$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11412
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11414$as_echo_n "checking how to link with libipt... " >&6; }
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11416$as_echo "$LIBIPT" >&6; }
11417 else
11418 HAVE_LIBIPT=no
11419 CPPFLAGS="$ac_save_CPPFLAGS"
11420 LIBIPT=
11421 LTLIBIPT=
11422 fi
11423
11424
11425
11426
11427
11428
11429 if test "$HAVE_LIBIPT" != yes; then
11430 if test "$with_intel_pt" = yes; then
11431 as_fn_error "libipt is missing or unusable" "$LINENO" 5
11432 else
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11434$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11435 fi
11436 fi
11437fi
11438
81ecdfbb
RW
11439# ------------------------- #
11440# Checks for header files. #
11441# ------------------------- #
c890192f 11442
81ecdfbb
RW
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11444$as_echo_n "checking for ANSI C header files... " >&6; }
11445if test "${ac_cv_header_stdc+set}" = set; then :
11446 $as_echo_n "(cached) " >&6
bec39cab 11447else
81ecdfbb 11448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11449/* end confdefs.h. */
81ecdfbb
RW
11450#include <stdlib.h>
11451#include <stdarg.h>
11452#include <string.h>
11453#include <float.h>
11454
a9322a30
TT
11455int
11456main ()
11457{
a9322a30
TT
11458
11459 ;
11460 return 0;
11461}
bec39cab 11462_ACEOF
81ecdfbb
RW
11463if ac_fn_c_try_compile "$LINENO"; then :
11464 ac_cv_header_stdc=yes
bec39cab 11465else
81ecdfbb 11466 ac_cv_header_stdc=no
a9322a30 11467fi
81ecdfbb 11468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11469
81ecdfbb
RW
11470if test $ac_cv_header_stdc = yes; then
11471 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473/* end confdefs.h. */
11474#include <string.h>
bec39cab 11475
81ecdfbb
RW
11476_ACEOF
11477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11478 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11479
bec39cab 11480else
81ecdfbb
RW
11481 ac_cv_header_stdc=no
11482fi
11483rm -f conftest*
11484
11485fi
11486
11487if test $ac_cv_header_stdc = yes; then
11488 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11490/* end confdefs.h. */
11491#include <stdlib.h>
11492
bec39cab 11493_ACEOF
81ecdfbb
RW
11494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11495 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11496
81ecdfbb
RW
11497else
11498 ac_cv_header_stdc=no
11499fi
11500rm -f conftest*
bec39cab 11501
bec39cab 11502fi
81ecdfbb
RW
11503
11504if test $ac_cv_header_stdc = yes; then
11505 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11506 if test "$cross_compiling" = yes; then :
11507 :
bec39cab 11508else
81ecdfbb 11509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11510/* end confdefs.h. */
81ecdfbb
RW
11511#include <ctype.h>
11512#include <stdlib.h>
11513#if ((' ' & 0x0FF) == 0x020)
11514# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11515# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11516#else
11517# define ISLOWER(c) \
11518 (('a' <= (c) && (c) <= 'i') \
11519 || ('j' <= (c) && (c) <= 'r') \
11520 || ('s' <= (c) && (c) <= 'z'))
11521# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11522#endif
11523
11524#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11525int
11526main ()
11527{
81ecdfbb
RW
11528 int i;
11529 for (i = 0; i < 256; i++)
11530 if (XOR (islower (i), ISLOWER (i))
11531 || toupper (i) != TOUPPER (i))
11532 return 2;
a9322a30
TT
11533 return 0;
11534}
bec39cab 11535_ACEOF
81ecdfbb
RW
11536if ac_fn_c_try_run "$LINENO"; then :
11537
bec39cab 11538else
81ecdfbb
RW
11539 ac_cv_header_stdc=no
11540fi
11541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11542 conftest.$ac_objext conftest.beam conftest.$ac_ext
11543fi
bec39cab 11544
bec39cab 11545fi
a9322a30 11546fi
81ecdfbb
RW
11547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11548$as_echo "$ac_cv_header_stdc" >&6; }
11549if test $ac_cv_header_stdc = yes; then
bec39cab 11550
81ecdfbb 11551$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11552
81ecdfbb 11553fi
bec39cab 11554
81ecdfbb 11555# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 11556for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 11557 thread_db.h \
0080a2f6 11558 sys/fault.h \
81ecdfbb
RW
11559 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11560 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11561 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 11562 termios.h termio.h \
3447c057 11563 sgtty.h elf_hp.h \
9467110b 11564 dlfcn.h
81ecdfbb
RW
11565do :
11566 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11567ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11568eval as_val=\$$as_ac_Header
11569 if test "x$as_val" = x""yes; then :
bec39cab 11570 cat >>confdefs.h <<_ACEOF
81ecdfbb 11571#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11572_ACEOF
c906108c 11573
bec39cab 11574fi
81ecdfbb
RW
11575
11576done
11577
81ecdfbb
RW
11578for ac_header in sys/proc.h
11579do :
11580 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11581# include <sys/param.h>
11582#endif
c906108c 11583
81ecdfbb
RW
11584"
11585if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11586 cat >>confdefs.h <<_ACEOF
81ecdfbb 11587#define HAVE_SYS_PROC_H 1
bec39cab 11588_ACEOF
5ee754fc 11589
bec39cab 11590fi
81ecdfbb
RW
11591
11592done
11593
11594for ac_header in sys/user.h
11595do :
11596 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11597# include <sys/param.h>
a9322a30
TT
11598#endif
11599
81ecdfbb
RW
11600"
11601if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11602 cat >>confdefs.h <<_ACEOF
11603#define HAVE_SYS_USER_H 1
bec39cab 11604_ACEOF
bec39cab 11605
a9322a30 11606fi
bec39cab 11607
81ecdfbb 11608done
5ee754fc 11609
5ee754fc 11610
81ecdfbb
RW
11611# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11612# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11613# think that we don't have <curses.h> if we're using GCC.
11614case $host_os in
11615 solaris2.[789])
11616 if test "$GCC" = yes; then
11617
11618$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11619
11620 fi ;;
11621esac
11622for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11623do :
11624 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11625ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11626eval as_val=\$$as_ac_Header
11627 if test "x$as_val" = x""yes; then :
bec39cab 11628 cat >>confdefs.h <<_ACEOF
81ecdfbb 11629#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11630_ACEOF
5ee754fc
MK
11631
11632fi
11633
81ecdfbb 11634done
bec39cab 11635
81ecdfbb
RW
11636for ac_header in term.h
11637do :
11638 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11639# include <curses.h>
11640#endif
bec39cab 11641
81ecdfbb
RW
11642"
11643if test "x$ac_cv_header_term_h" = x""yes; then :
11644 cat >>confdefs.h <<_ACEOF
11645#define HAVE_TERM_H 1
a8111142 11646_ACEOF
a8111142 11647
a8111142 11648fi
a8111142 11649
81ecdfbb 11650done
a8111142
TT
11651
11652
81ecdfbb
RW
11653# ------------------------- #
11654# Checks for declarations. #
11655# ------------------------- #
a9322a30 11656
07697489
PA
11657
11658 # Check for presence and size of long long.
11659 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11660if test "x$ac_cv_type_long_long" = x""yes; then :
11661
11662cat >>confdefs.h <<_ACEOF
11663#define HAVE_LONG_LONG 1
11664_ACEOF
11665
11666# The cast to long int works around a bug in the HP C Compiler
11667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11669# This bug is HP SR number 8606223364.
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11671$as_echo_n "checking size of long long... " >&6; }
11672if test "${ac_cv_sizeof_long_long+set}" = set; then :
11673 $as_echo_n "(cached) " >&6
11674else
11675 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11676
11677else
11678 if test "$ac_cv_type_long_long" = yes; then
11679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11681{ as_fn_set_status 77
11682as_fn_error "cannot compute sizeof (long long)
11683See \`config.log' for more details." "$LINENO" 5; }; }
11684 else
11685 ac_cv_sizeof_long_long=0
11686 fi
11687fi
11688
11689fi
11690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11691$as_echo "$ac_cv_sizeof_long_long" >&6; }
11692
11693
11694
11695cat >>confdefs.h <<_ACEOF
11696#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11697_ACEOF
11698
11699
11700fi
11701
11702
11703 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
11704if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
11705 ac_have_decl=1
11706else
11707 ac_have_decl=0
11708fi
11709
11710cat >>confdefs.h <<_ACEOF
11711#define HAVE_DECL_BASENAME $ac_have_decl
11712_ACEOF
11713ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11714if test "x$ac_cv_have_decl_ffs" = x""yes; then :
11715 ac_have_decl=1
11716else
11717 ac_have_decl=0
11718fi
11719
11720cat >>confdefs.h <<_ACEOF
11721#define HAVE_DECL_FFS $ac_have_decl
11722_ACEOF
11723ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11724if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
11725 ac_have_decl=1
11726else
11727 ac_have_decl=0
11728fi
11729
11730cat >>confdefs.h <<_ACEOF
11731#define HAVE_DECL_ASPRINTF $ac_have_decl
11732_ACEOF
11733ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11734if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
11735 ac_have_decl=1
11736else
11737 ac_have_decl=0
11738fi
11739
11740cat >>confdefs.h <<_ACEOF
11741#define HAVE_DECL_VASPRINTF $ac_have_decl
11742_ACEOF
11743ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11744if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11745 ac_have_decl=1
11746else
11747 ac_have_decl=0
11748fi
11749
11750cat >>confdefs.h <<_ACEOF
11751#define HAVE_DECL_SNPRINTF $ac_have_decl
11752_ACEOF
11753ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11754if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11755 ac_have_decl=1
11756else
11757 ac_have_decl=0
11758fi
11759
11760cat >>confdefs.h <<_ACEOF
11761#define HAVE_DECL_VSNPRINTF $ac_have_decl
11762_ACEOF
11763
11764 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11765if test "x$ac_cv_have_decl_strtol" = x""yes; then :
11766 ac_have_decl=1
11767else
11768 ac_have_decl=0
11769fi
11770
11771cat >>confdefs.h <<_ACEOF
11772#define HAVE_DECL_STRTOL $ac_have_decl
11773_ACEOF
11774ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11775if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
11776 ac_have_decl=1
11777else
11778 ac_have_decl=0
11779fi
11780
11781cat >>confdefs.h <<_ACEOF
11782#define HAVE_DECL_STRTOUL $ac_have_decl
11783_ACEOF
11784ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11785if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
11786 ac_have_decl=1
11787else
11788 ac_have_decl=0
11789fi
11790
11791cat >>confdefs.h <<_ACEOF
11792#define HAVE_DECL_STRTOLL $ac_have_decl
11793_ACEOF
11794ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11795if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
11796 ac_have_decl=1
11797else
11798 ac_have_decl=0
11799fi
11800
11801cat >>confdefs.h <<_ACEOF
11802#define HAVE_DECL_STRTOULL $ac_have_decl
11803_ACEOF
11804
11805 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11806if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
11807 ac_have_decl=1
11808else
11809 ac_have_decl=0
11810fi
11811
11812cat >>confdefs.h <<_ACEOF
11813#define HAVE_DECL_STRVERSCMP $ac_have_decl
11814_ACEOF
11815
11816
11817
81ecdfbb
RW
11818ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11819if test "x$ac_cv_have_decl_free" = x""yes; then :
11820 ac_have_decl=1
bec39cab 11821else
81ecdfbb
RW
11822 ac_have_decl=0
11823fi
11824
11825cat >>confdefs.h <<_ACEOF
11826#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11827_ACEOF
81ecdfbb
RW
11828ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11829if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11830 ac_have_decl=1
11831else
11832 ac_have_decl=0
11833fi
11834
11835cat >>confdefs.h <<_ACEOF
11836#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11837_ACEOF
81ecdfbb
RW
11838ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11839if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11840 ac_have_decl=1
bec39cab 11841else
81ecdfbb
RW
11842 ac_have_decl=0
11843fi
bec39cab 11844
81ecdfbb
RW
11845cat >>confdefs.h <<_ACEOF
11846#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11847_ACEOF
81ecdfbb
RW
11848ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11849if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11850 ac_have_decl=1
11851else
11852 ac_have_decl=0
5ee754fc 11853fi
81ecdfbb
RW
11854
11855cat >>confdefs.h <<_ACEOF
11856#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11857_ACEOF
5ee754fc 11858
5ee754fc 11859
81ecdfbb
RW
11860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11861$as_echo_n "checking for LC_MESSAGES... " >&6; }
11862if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11863 $as_echo_n "(cached) " >&6
bec39cab 11864else
81ecdfbb 11865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11866/* end confdefs.h. */
81ecdfbb 11867#include <locale.h>
a9322a30
TT
11868int
11869main ()
11870{
81ecdfbb 11871return LC_MESSAGES
a9322a30
TT
11872 ;
11873 return 0;
11874}
bec39cab 11875_ACEOF
81ecdfbb
RW
11876if ac_fn_c_try_link "$LINENO"; then :
11877 am_cv_val_LC_MESSAGES=yes
bec39cab 11878else
81ecdfbb
RW
11879 am_cv_val_LC_MESSAGES=no
11880fi
11881rm -f core conftest.err conftest.$ac_objext \
11882 conftest$ac_exeext conftest.$ac_ext
11883fi
11884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11885$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11886 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11887
81ecdfbb
RW
11888$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11889
11890 fi
11891
11892
11893# ----------------------- #
11894# Checks for structures. #
11895# ----------------------- #
11896
11897ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11898if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11899
11900cat >>confdefs.h <<_ACEOF
11901#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11902_ACEOF
7eb368b3 11903
81ecdfbb 11904
7eb368b3 11905fi
81ecdfbb
RW
11906ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
11907if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 11908
a9322a30
TT
11909cat >>confdefs.h <<_ACEOF
11910#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
11911_ACEOF
11912
a9322a30 11913
7eb368b3
NR
11914fi
11915
7eb368b3 11916
a9322a30
TT
11917# ------------------ #
11918# Checks for types. #
11919# ------------------ #
7eb368b3 11920
81ecdfbb 11921ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
11922#include <sys/socket.h>
11923
81ecdfbb
RW
11924"
11925if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 11926
a9322a30
TT
11927cat >>confdefs.h <<_ACEOF
11928#define HAVE_SOCKLEN_T 1
11929_ACEOF
11930
11931
11932fi
11933
11934
11935# ------------------------------------- #
11936# Checks for compiler characteristics. #
11937# ------------------------------------- #
11938
81ecdfbb
RW
11939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11940$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11941if test "${ac_cv_c_const+set}" = set; then :
11942 $as_echo_n "(cached) " >&6
a9322a30 11943else
81ecdfbb 11944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11945/* end confdefs.h. */
a9322a30
TT
11946
11947int
11948main ()
11949{
11950/* FIXME: Include the comments suggested by Paul. */
11951#ifndef __cplusplus
11952 /* Ultrix mips cc rejects this. */
11953 typedef int charset[2];
81ecdfbb 11954 const charset cs;
a9322a30 11955 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
11956 char const *const *pcpcc;
11957 char **ppc;
a9322a30
TT
11958 /* NEC SVR4.0.2 mips cc rejects this. */
11959 struct point {int x, y;};
11960 static struct point const zero = {0,0};
11961 /* AIX XL C 1.02.0.0 rejects this.
11962 It does not let you subtract one const X* pointer from another in
11963 an arm of an if-expression whose if-part is not a constant
11964 expression */
11965 const char *g = "string";
81ecdfbb 11966 pcpcc = &g + (g ? g-g : 0);
a9322a30 11967 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
11968 ++pcpcc;
11969 ppc = (char**) pcpcc;
11970 pcpcc = (char const *const *) ppc;
a9322a30
TT
11971 { /* SCO 3.2v4 cc rejects this. */
11972 char *t;
11973 char const *s = 0 ? (char *) 0 : (char const *) 0;
11974
11975 *t++ = 0;
81ecdfbb 11976 if (s) return 0;
a9322a30
TT
11977 }
11978 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11979 int x[] = {25, 17};
11980 const int *foo = &x[0];
11981 ++foo;
11982 }
11983 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11984 typedef const int *iptr;
11985 iptr p = 0;
11986 ++p;
11987 }
11988 { /* AIX XL C 1.02.0.0 rejects this saying
11989 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11990 struct s { int j; const int *ap[3]; };
11991 struct s *b; b->j = 5;
11992 }
11993 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11994 const int foo = 10;
81ecdfbb 11995 if (!foo) return 0;
a9322a30 11996 }
81ecdfbb 11997 return !cs[0] && !zero.x;
a9322a30
TT
11998#endif
11999
12000 ;
12001 return 0;
12002}
bec39cab 12003_ACEOF
81ecdfbb 12004if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12005 ac_cv_c_const=yes
5ee754fc 12006else
81ecdfbb 12007 ac_cv_c_const=no
5ee754fc 12008fi
81ecdfbb 12009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12010fi
81ecdfbb
RW
12011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12012$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12013if test $ac_cv_c_const = no; then
bec39cab 12014
81ecdfbb 12015$as_echo "#define const /**/" >>confdefs.h
bec39cab 12016
5ee754fc 12017fi
bec39cab 12018
81ecdfbb
RW
12019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12020$as_echo_n "checking for inline... " >&6; }
12021if test "${ac_cv_c_inline+set}" = set; then :
12022 $as_echo_n "(cached) " >&6
bec39cab 12023else
a9322a30
TT
12024 ac_cv_c_inline=no
12025for ac_kw in inline __inline__ __inline; do
81ecdfbb 12026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12027/* end confdefs.h. */
a9322a30
TT
12028#ifndef __cplusplus
12029typedef int foo_t;
12030static $ac_kw foo_t static_foo () {return 0; }
12031$ac_kw foo_t foo () {return 0; }
12032#endif
12033
bec39cab 12034_ACEOF
81ecdfbb
RW
12035if ac_fn_c_try_compile "$LINENO"; then :
12036 ac_cv_c_inline=$ac_kw
bec39cab 12037fi
81ecdfbb
RW
12038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12039 test "$ac_cv_c_inline" != no && break
a9322a30 12040done
bec39cab 12041
5ee754fc 12042fi
81ecdfbb
RW
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12044$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12045
a9322a30
TT
12046case $ac_cv_c_inline in
12047 inline | yes) ;;
12048 *)
12049 case $ac_cv_c_inline in
12050 no) ac_val=;;
12051 *) ac_val=$ac_cv_c_inline;;
12052 esac
12053 cat >>confdefs.h <<_ACEOF
12054#ifndef __cplusplus
12055#define inline $ac_val
12056#endif
12057_ACEOF
bec39cab
AC
12058 ;;
12059esac
bec39cab 12060
81ecdfbb
RW
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12062$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12063if test "${ac_cv_c_bigendian+set}" = set; then :
12064 $as_echo_n "(cached) " >&6
bec39cab 12065else
81ecdfbb
RW
12066 ac_cv_c_bigendian=unknown
12067 # See if we're dealing with a universal compiler.
12068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12069/* end confdefs.h. */
12070#ifndef __APPLE_CC__
12071 not a universal capable compiler
12072 #endif
12073 typedef int dummy;
12074
12075_ACEOF
12076if ac_fn_c_try_compile "$LINENO"; then :
12077
12078 # Check for potential -arch flags. It is not universal unless
12079 # there are at least two -arch flags with different values.
12080 ac_arch=
12081 ac_prev=
12082 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12083 if test -n "$ac_prev"; then
12084 case $ac_word in
12085 i?86 | x86_64 | ppc | ppc64)
12086 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12087 ac_arch=$ac_word
12088 else
12089 ac_cv_c_bigendian=universal
12090 break
12091 fi
12092 ;;
12093 esac
12094 ac_prev=
12095 elif test "x$ac_word" = "x-arch"; then
12096 ac_prev=arch
12097 fi
12098 done
12099fi
12100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12101 if test $ac_cv_c_bigendian = unknown; then
12102 # See if sys/param.h defines the BYTE_ORDER macro.
12103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12104/* end confdefs.h. */
a9322a30 12105#include <sys/types.h>
81ecdfbb 12106 #include <sys/param.h>
a9322a30
TT
12107
12108int
12109main ()
12110{
81ecdfbb
RW
12111#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12112 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12113 && LITTLE_ENDIAN)
12114 bogus endian macros
12115 #endif
a9322a30
TT
12116
12117 ;
12118 return 0;
12119}
bec39cab 12120_ACEOF
81ecdfbb 12121if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12122 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12124/* end confdefs.h. */
a9322a30 12125#include <sys/types.h>
81ecdfbb 12126 #include <sys/param.h>
a9322a30
TT
12127
12128int
12129main ()
12130{
12131#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12132 not big endian
12133 #endif
a9322a30
TT
12134
12135 ;
12136 return 0;
12137}
bec39cab 12138_ACEOF
81ecdfbb 12139if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12140 ac_cv_c_bigendian=yes
5ee754fc 12141else
81ecdfbb 12142 ac_cv_c_bigendian=no
5ee754fc 12143fi
81ecdfbb
RW
12144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12145fi
12146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12147 fi
12148 if test $ac_cv_c_bigendian = unknown; then
12149 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12151/* end confdefs.h. */
12152#include <limits.h>
bec39cab 12153
81ecdfbb
RW
12154int
12155main ()
12156{
12157#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12158 bogus endian macros
12159 #endif
12160
12161 ;
12162 return 0;
12163}
7eb368b3 12164_ACEOF
81ecdfbb
RW
12165if ac_fn_c_try_compile "$LINENO"; then :
12166 # It does; now see whether it defined to _BIG_ENDIAN or not.
12167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12168/* end confdefs.h. */
81ecdfbb
RW
12169#include <limits.h>
12170
7eb368b3
NR
12171int
12172main ()
12173{
81ecdfbb
RW
12174#ifndef _BIG_ENDIAN
12175 not big endian
12176 #endif
12177
7eb368b3
NR
12178 ;
12179 return 0;
12180}
12181_ACEOF
81ecdfbb 12182if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12183 ac_cv_c_bigendian=yes
81ecdfbb
RW
12184else
12185 ac_cv_c_bigendian=no
a9322a30 12186fi
81ecdfbb 12187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12188fi
81ecdfbb
RW
12189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12190 fi
12191 if test $ac_cv_c_bigendian = unknown; then
12192 # Compile a test program.
12193 if test "$cross_compiling" = yes; then :
12194 # Try to guess by grepping values from an object file.
12195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12196/* end confdefs.h. */
12197short int ascii_mm[] =
12198 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12199 short int ascii_ii[] =
12200 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12201 int use_ascii (int i) {
12202 return ascii_mm[i] + ascii_ii[i];
12203 }
12204 short int ebcdic_ii[] =
12205 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12206 short int ebcdic_mm[] =
12207 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12208 int use_ebcdic (int i) {
12209 return ebcdic_mm[i] + ebcdic_ii[i];
12210 }
12211 extern int foo;
7eb368b3 12212
81ecdfbb
RW
12213int
12214main ()
12215{
12216return use_ascii (foo) == use_ebcdic (foo);
12217 ;
12218 return 0;
12219}
12220_ACEOF
12221if ac_fn_c_try_compile "$LINENO"; then :
12222 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12223 ac_cv_c_bigendian=yes
12224 fi
12225 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12226 if test "$ac_cv_c_bigendian" = unknown; then
12227 ac_cv_c_bigendian=no
12228 else
12229 # finding both strings is unlikely to happen, but who knows?
12230 ac_cv_c_bigendian=unknown
12231 fi
12232 fi
7eb368b3 12233fi
81ecdfbb 12234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12235else
81ecdfbb 12236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12237/* end confdefs.h. */
81ecdfbb 12238$ac_includes_default
d3ea6809
MM
12239int
12240main ()
12241{
81ecdfbb
RW
12242
12243 /* Are we little or big endian? From Harbison&Steele. */
12244 union
12245 {
12246 long int l;
12247 char c[sizeof (long int)];
12248 } u;
12249 u.l = 1;
12250 return u.c[sizeof (long int) - 1] == 1;
12251
12252 ;
12253 return 0;
d3ea6809
MM
12254}
12255_ACEOF
81ecdfbb 12256if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12257 ac_cv_c_bigendian=no
d3ea6809 12258else
81ecdfbb 12259 ac_cv_c_bigendian=yes
d3ea6809 12260fi
81ecdfbb
RW
12261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12262 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12263fi
a9322a30 12264
81ecdfbb
RW
12265 fi
12266fi
12267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12268$as_echo "$ac_cv_c_bigendian" >&6; }
12269 case $ac_cv_c_bigendian in #(
12270 yes)
12271 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12272;; #(
12273 no)
12274 ;; #(
12275 universal)
12276
12277$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12278
12279 ;; #(
12280 *)
12281 as_fn_error "unknown endianness
12282 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12283 esac
d3ea6809
MM
12284
12285
a9322a30
TT
12286# ------------------------------ #
12287# Checks for library functions. #
12288# ------------------------------ #
d3ea6809 12289
a9322a30 12290for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12291do :
12292 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12293ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12294eval as_val=\$$as_ac_Header
12295 if test "x$as_val" = x""yes; then :
bec39cab 12296 cat >>confdefs.h <<_ACEOF
81ecdfbb 12297#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12298_ACEOF
b757528f 12299
b757528f 12300fi
bec39cab 12301
a9322a30 12302done
a3828db0 12303
a9322a30 12304for ac_func in getpagesize
81ecdfbb
RW
12305do :
12306 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12307if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12308 cat >>confdefs.h <<_ACEOF
81ecdfbb 12309#define HAVE_GETPAGESIZE 1
bec39cab 12310_ACEOF
bcb3dc3d 12311
bcb3dc3d
MK
12312fi
12313done
12314
81ecdfbb
RW
12315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12316$as_echo_n "checking for working mmap... " >&6; }
12317if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12318 $as_echo_n "(cached) " >&6
a9322a30 12319else
81ecdfbb 12320 if test "$cross_compiling" = yes; then :
a9322a30 12321 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12322else
81ecdfbb 12323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12324/* end confdefs.h. */
a9322a30
TT
12325$ac_includes_default
12326/* malloc might have been renamed as rpl_malloc. */
12327#undef malloc
bec39cab 12328
a9322a30
TT
12329/* Thanks to Mike Haertel and Jim Avera for this test.
12330 Here is a matrix of mmap possibilities:
12331 mmap private not fixed
12332 mmap private fixed at somewhere currently unmapped
12333 mmap private fixed at somewhere already mapped
12334 mmap shared not fixed
12335 mmap shared fixed at somewhere currently unmapped
12336 mmap shared fixed at somewhere already mapped
12337 For private mappings, we should verify that changes cannot be read()
12338 back from the file, nor mmap's back from the file at a different
12339 address. (There have been systems where private was not correctly
12340 implemented like the infamous i386 svr4.0, and systems where the
12341 VM page cache was not coherent with the file system buffer cache
12342 like early versions of FreeBSD and possibly contemporary NetBSD.)
12343 For shared mappings, we should conversely verify that changes get
12344 propagated back to all the places they're supposed to be.
bec39cab 12345
a9322a30
TT
12346 Grep wants private fixed already mapped.
12347 The main things grep needs to know about mmap are:
12348 * does it exist and is it safe to write into the mmap'd area
12349 * how to use it (BSD variants) */
8b9cf735 12350
a9322a30
TT
12351#include <fcntl.h>
12352#include <sys/mman.h>
8b9cf735 12353
81ecdfbb 12354#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12355char *malloc ();
a3828db0
MK
12356#endif
12357
a9322a30 12358/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12359#ifndef HAVE_GETPAGESIZE
a9322a30 12360/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12361# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12362# define HAVE_SYS_PARAM_H 1
12363# endif
12364
12365# ifdef _SC_PAGESIZE
12366# define getpagesize() sysconf(_SC_PAGESIZE)
12367# else /* no _SC_PAGESIZE */
81ecdfbb 12368# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12369# include <sys/param.h>
12370# ifdef EXEC_PAGESIZE
12371# define getpagesize() EXEC_PAGESIZE
12372# else /* no EXEC_PAGESIZE */
12373# ifdef NBPG
12374# define getpagesize() NBPG * CLSIZE
12375# ifndef CLSIZE
12376# define CLSIZE 1
12377# endif /* no CLSIZE */
12378# else /* no NBPG */
12379# ifdef NBPC
12380# define getpagesize() NBPC
12381# else /* no NBPC */
12382# ifdef PAGESIZE
12383# define getpagesize() PAGESIZE
12384# endif /* PAGESIZE */
12385# endif /* no NBPC */
12386# endif /* no NBPG */
12387# endif /* no EXEC_PAGESIZE */
12388# else /* no HAVE_SYS_PARAM_H */
12389# define getpagesize() 8192 /* punt totally */
12390# endif /* no HAVE_SYS_PARAM_H */
12391# endif /* no _SC_PAGESIZE */
12392
12393#endif /* no HAVE_GETPAGESIZE */
12394
bec39cab
AC
12395int
12396main ()
12397{
a9322a30
TT
12398 char *data, *data2, *data3;
12399 int i, pagesize;
12400 int fd;
12401
12402 pagesize = getpagesize ();
12403
12404 /* First, make a file with some known garbage in it. */
12405 data = (char *) malloc (pagesize);
12406 if (!data)
81ecdfbb 12407 return 1;
a9322a30
TT
12408 for (i = 0; i < pagesize; ++i)
12409 *(data + i) = rand ();
12410 umask (0);
12411 fd = creat ("conftest.mmap", 0600);
12412 if (fd < 0)
81ecdfbb 12413 return 1;
a9322a30 12414 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12415 return 1;
a9322a30
TT
12416 close (fd);
12417
12418 /* Next, try to mmap the file at a fixed address which already has
12419 something else allocated at it. If we can, also make sure that
12420 we see the same garbage. */
12421 fd = open ("conftest.mmap", O_RDWR);
12422 if (fd < 0)
81ecdfbb 12423 return 1;
a9322a30
TT
12424 data2 = (char *) malloc (2 * pagesize);
12425 if (!data2)
81ecdfbb
RW
12426 return 1;
12427 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12428 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12429 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12430 return 1;
a9322a30
TT
12431 for (i = 0; i < pagesize; ++i)
12432 if (*(data + i) != *(data2 + i))
81ecdfbb 12433 return 1;
a9322a30
TT
12434
12435 /* Finally, make sure that changes to the mapped area do not
12436 percolate back to the file as seen by read(). (This is a bug on
12437 some variants of i386 svr4.0.) */
12438 for (i = 0; i < pagesize; ++i)
12439 *(data2 + i) = *(data2 + i) + 1;
12440 data3 = (char *) malloc (pagesize);
12441 if (!data3)
81ecdfbb 12442 return 1;
a9322a30 12443 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12444 return 1;
a9322a30
TT
12445 for (i = 0; i < pagesize; ++i)
12446 if (*(data + i) != *(data3 + i))
81ecdfbb 12447 return 1;
a9322a30 12448 close (fd);
81ecdfbb 12449 return 0;
bec39cab
AC
12450}
12451_ACEOF
81ecdfbb 12452if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12453 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12454else
81ecdfbb 12455 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12456fi
81ecdfbb
RW
12457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12458 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12459fi
81ecdfbb 12460
a9322a30 12461fi
81ecdfbb
RW
12462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12463$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12464if test $ac_cv_func_mmap_fixed_mapped = yes; then
12465
81ecdfbb 12466$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12467
086ec9eb 12468fi
a9322a30 12469rm -f conftest.mmap
a3828db0 12470
81ecdfbb
RW
12471ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12472if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12473
a9322a30
TT
12474else
12475
12476cat >>confdefs.h <<_ACEOF
12477#define pid_t int
bec39cab 12478_ACEOF
086ec9eb
MK
12479
12480fi
12481
81ecdfbb
RW
12482for ac_header in vfork.h
12483do :
12484 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12485if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12486 cat >>confdefs.h <<_ACEOF
81ecdfbb 12487#define HAVE_VFORK_H 1
bec39cab 12488_ACEOF
c906108c
SS
12489
12490fi
a9322a30 12491
a3828db0 12492done
c906108c 12493
a9322a30 12494for ac_func in fork vfork
81ecdfbb
RW
12495do :
12496 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12497ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12498eval as_val=\$$as_ac_var
12499 if test "x$as_val" = x""yes; then :
a3828db0 12500 cat >>confdefs.h <<_ACEOF
81ecdfbb 12501#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12502_ACEOF
b83266a0 12503
97bf5e38 12504fi
a3828db0 12505done
b83266a0 12506
a9322a30 12507if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12509$as_echo_n "checking for working fork... " >&6; }
12510if test "${ac_cv_func_fork_works+set}" = set; then :
12511 $as_echo_n "(cached) " >&6
a9322a30 12512else
81ecdfbb 12513 if test "$cross_compiling" = yes; then :
a9322a30
TT
12514 ac_cv_func_fork_works=cross
12515else
81ecdfbb
RW
12516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517/* end confdefs.h. */
12518$ac_includes_default
12519int
12520main ()
12521{
12522
12523 /* By Ruediger Kuhlmann. */
12524 return fork () < 0;
12525
12526 ;
12527 return 0;
12528}
a9322a30 12529_ACEOF
81ecdfbb 12530if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12531 ac_cv_func_fork_works=yes
12532else
81ecdfbb 12533 ac_cv_func_fork_works=no
a9322a30 12534fi
81ecdfbb
RW
12535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12536 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12537fi
81ecdfbb 12538
a9322a30 12539fi
81ecdfbb
RW
12540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12541$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12542
12543else
12544 ac_cv_func_fork_works=$ac_cv_func_fork
12545fi
12546if test "x$ac_cv_func_fork_works" = xcross; then
12547 case $host in
12548 *-*-amigaos* | *-*-msdosdjgpp*)
12549 # Override, as these systems have only a dummy fork() stub
12550 ac_cv_func_fork_works=no
12551 ;;
12552 *)
12553 ac_cv_func_fork_works=yes
12554 ;;
12555 esac
81ecdfbb
RW
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12557$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12558fi
12559ac_cv_func_vfork_works=$ac_cv_func_vfork
12560if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12562$as_echo_n "checking for working vfork... " >&6; }
12563if test "${ac_cv_func_vfork_works+set}" = set; then :
12564 $as_echo_n "(cached) " >&6
a9322a30 12565else
81ecdfbb 12566 if test "$cross_compiling" = yes; then :
a9322a30
TT
12567 ac_cv_func_vfork_works=cross
12568else
81ecdfbb 12569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12570/* end confdefs.h. */
12571/* Thanks to Paul Eggert for this test. */
81ecdfbb 12572$ac_includes_default
a9322a30 12573#include <sys/wait.h>
81ecdfbb 12574#ifdef HAVE_VFORK_H
a9322a30
TT
12575# include <vfork.h>
12576#endif
12577/* On some sparc systems, changes by the child to local and incoming
12578 argument registers are propagated back to the parent. The compiler
12579 is told about this with #include <vfork.h>, but some compilers
12580 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12581 static variable whose address is put into a register that is
12582 clobbered by the vfork. */
12583static void
12584#ifdef __cplusplus
12585sparc_address_test (int arg)
12586# else
12587sparc_address_test (arg) int arg;
12588#endif
12589{
12590 static pid_t child;
12591 if (!child) {
12592 child = vfork ();
12593 if (child < 0) {
12594 perror ("vfork");
12595 _exit(2);
12596 }
12597 if (!child) {
12598 arg = getpid();
12599 write(-1, "", 0);
12600 _exit (arg);
12601 }
12602 }
12603}
12604
12605int
12606main ()
12607{
12608 pid_t parent = getpid ();
12609 pid_t child;
12610
12611 sparc_address_test (0);
12612
12613 child = vfork ();
12614
12615 if (child == 0) {
12616 /* Here is another test for sparc vfork register problems. This
12617 test uses lots of local variables, at least as many local
12618 variables as main has allocated so far including compiler
12619 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12620 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12621 reuse the register of parent for one of the local variables,
12622 since it will think that parent can't possibly be used any more
12623 in this routine. Assigning to the local variable will thus
12624 munge parent in the parent process. */
12625 pid_t
12626 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12627 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12628 /* Convince the compiler that p..p7 are live; otherwise, it might
12629 use the same hardware register for all 8 local variables. */
12630 if (p != p1 || p != p2 || p != p3 || p != p4
12631 || p != p5 || p != p6 || p != p7)
12632 _exit(1);
12633
12634 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12635 from child file descriptors. If the child closes a descriptor
12636 before it execs or exits, this munges the parent's descriptor
12637 as well. Test for this by closing stdout in the child. */
12638 _exit(close(fileno(stdout)) != 0);
12639 } else {
12640 int status;
12641 struct stat st;
12642
12643 while (wait(&status) != child)
12644 ;
81ecdfbb 12645 return (
a9322a30
TT
12646 /* Was there some problem with vforking? */
12647 child < 0
12648
12649 /* Did the child fail? (This shouldn't happen.) */
12650 || status
12651
12652 /* Did the vfork/compiler bug occur? */
12653 || parent != getpid()
12654
12655 /* Did the file descriptor bug occur? */
12656 || fstat(fileno(stdout), &st) != 0
12657 );
12658 }
12659}
12660_ACEOF
81ecdfbb 12661if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12662 ac_cv_func_vfork_works=yes
12663else
81ecdfbb 12664 ac_cv_func_vfork_works=no
a9322a30 12665fi
81ecdfbb
RW
12666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12667 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12668fi
81ecdfbb 12669
a9322a30 12670fi
81ecdfbb
RW
12671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12672$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12673
12674fi;
12675if test "x$ac_cv_func_fork_works" = xcross; then
12676 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12678$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12679fi
12680
12681if test "x$ac_cv_func_vfork_works" = xyes; then
12682
81ecdfbb 12683$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12684
12685else
12686
81ecdfbb 12687$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12688
12689fi
12690if test "x$ac_cv_func_fork_works" = xyes; then
12691
81ecdfbb 12692$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12693
12694fi
12695
cdf43629 12696for ac_func in getauxval getrusage getuid getgid \
bdca27a2 12697 pipe poll pread pread64 pwrite resize_term \
7313baad 12698 sbrk setpgid setpgrp setsid \
9467110b 12699 sigaction sigprocmask sigsetmask socketpair \
110ed339 12700 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 12701 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 12702 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
12703do :
12704 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12705ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12706eval as_val=\$$as_ac_var
12707 if test "x$as_val" = x""yes; then :
6c7a06a3 12708 cat >>confdefs.h <<_ACEOF
81ecdfbb 12709#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12710_ACEOF
12711
12712fi
12713done
12714
12715
81ecdfbb
RW
12716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12717$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12718if test "${am_cv_langinfo_codeset+set}" = set; then :
12719 $as_echo_n "(cached) " >&6
6c7a06a3 12720else
81ecdfbb 12721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12722/* end confdefs.h. */
12723#include <langinfo.h>
12724int
12725main ()
12726{
12727char* cs = nl_langinfo(CODESET);
bec39cab
AC
12728 ;
12729 return 0;
12730}
12731_ACEOF
81ecdfbb 12732if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12733 am_cv_langinfo_codeset=yes
a4db0f07 12734else
81ecdfbb 12735 am_cv_langinfo_codeset=no
a4db0f07 12736fi
81ecdfbb
RW
12737rm -f core conftest.err conftest.$ac_objext \
12738 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12739
a4db0f07 12740fi
81ecdfbb
RW
12741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12742$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12743 if test $am_cv_langinfo_codeset = yes; then
12744
81ecdfbb 12745$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12746
6c7a06a3 12747 fi
c906108c 12748
06825bd1 12749
3266f10b
TT
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12751$as_echo_n "checking for ANSI C header files... " >&6; }
12752if test "${ac_cv_header_stdc+set}" = set; then :
12753 $as_echo_n "(cached) " >&6
12754else
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756/* end confdefs.h. */
12757#include <stdlib.h>
12758#include <stdarg.h>
12759#include <string.h>
12760#include <float.h>
12761
12762int
12763main ()
12764{
12765
12766 ;
12767 return 0;
12768}
12769_ACEOF
12770if ac_fn_c_try_compile "$LINENO"; then :
12771 ac_cv_header_stdc=yes
12772else
12773 ac_cv_header_stdc=no
12774fi
12775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12776
12777if test $ac_cv_header_stdc = yes; then
12778 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12780/* end confdefs.h. */
12781#include <string.h>
12782
12783_ACEOF
12784if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12785 $EGREP "memchr" >/dev/null 2>&1; then :
12786
12787else
12788 ac_cv_header_stdc=no
12789fi
12790rm -f conftest*
12791
12792fi
12793
12794if test $ac_cv_header_stdc = yes; then
12795 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797/* end confdefs.h. */
12798#include <stdlib.h>
12799
12800_ACEOF
12801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12802 $EGREP "free" >/dev/null 2>&1; then :
12803
12804else
12805 ac_cv_header_stdc=no
12806fi
12807rm -f conftest*
12808
12809fi
12810
12811if test $ac_cv_header_stdc = yes; then
12812 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12813 if test "$cross_compiling" = yes; then :
12814 :
12815else
12816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12817/* end confdefs.h. */
12818#include <ctype.h>
12819#include <stdlib.h>
12820#if ((' ' & 0x0FF) == 0x020)
12821# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12822# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12823#else
12824# define ISLOWER(c) \
12825 (('a' <= (c) && (c) <= 'i') \
12826 || ('j' <= (c) && (c) <= 'r') \
12827 || ('s' <= (c) && (c) <= 'z'))
12828# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12829#endif
12830
12831#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12832int
12833main ()
12834{
12835 int i;
12836 for (i = 0; i < 256; i++)
12837 if (XOR (islower (i), ISLOWER (i))
12838 || toupper (i) != TOUPPER (i))
12839 return 2;
12840 return 0;
12841}
12842_ACEOF
12843if ac_fn_c_try_run "$LINENO"; then :
12844
12845else
12846 ac_cv_header_stdc=no
12847fi
12848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12849 conftest.$ac_objext conftest.beam conftest.$ac_ext
12850fi
12851
12852fi
12853fi
12854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12855$as_echo "$ac_cv_header_stdc" >&6; }
12856if test $ac_cv_header_stdc = yes; then
12857
12858$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12859
3266f10b
TT
12860fi
12861
12862 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12863# for constant arguments. Useless!
12864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12865$as_echo_n "checking for working alloca.h... " >&6; }
12866if test "${ac_cv_working_alloca_h+set}" = set; then :
12867 $as_echo_n "(cached) " >&6
12868else
12869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12870/* end confdefs.h. */
12871#include <alloca.h>
12872int
12873main ()
12874{
12875char *p = (char *) alloca (2 * sizeof (int));
12876 if (p) return 0;
12877 ;
12878 return 0;
12879}
12880_ACEOF
12881if ac_fn_c_try_link "$LINENO"; then :
12882 ac_cv_working_alloca_h=yes
12883else
12884 ac_cv_working_alloca_h=no
12885fi
12886rm -f core conftest.err conftest.$ac_objext \
12887 conftest$ac_exeext conftest.$ac_ext
12888fi
12889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12890$as_echo "$ac_cv_working_alloca_h" >&6; }
12891if test $ac_cv_working_alloca_h = yes; then
12892
12893$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12894
12895fi
12896
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12898$as_echo_n "checking for alloca... " >&6; }
12899if test "${ac_cv_func_alloca_works+set}" = set; then :
12900 $as_echo_n "(cached) " >&6
12901else
12902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12903/* end confdefs.h. */
12904#ifdef __GNUC__
12905# define alloca __builtin_alloca
12906#else
12907# ifdef _MSC_VER
12908# include <malloc.h>
12909# define alloca _alloca
12910# else
12911# ifdef HAVE_ALLOCA_H
12912# include <alloca.h>
12913# else
12914# ifdef _AIX
12915 #pragma alloca
12916# else
12917# ifndef alloca /* predefined by HP cc +Olibcalls */
12918char *alloca ();
12919# endif
12920# endif
12921# endif
12922# endif
12923#endif
12924
12925int
12926main ()
12927{
12928char *p = (char *) alloca (1);
12929 if (p) return 0;
12930 ;
12931 return 0;
12932}
12933_ACEOF
12934if ac_fn_c_try_link "$LINENO"; then :
12935 ac_cv_func_alloca_works=yes
12936else
12937 ac_cv_func_alloca_works=no
12938fi
12939rm -f core conftest.err conftest.$ac_objext \
12940 conftest$ac_exeext conftest.$ac_ext
12941fi
12942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12943$as_echo "$ac_cv_func_alloca_works" >&6; }
12944
12945if test $ac_cv_func_alloca_works = yes; then
12946
12947$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12948
12949else
12950 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12951# that cause trouble. Some versions do not even contain alloca or
12952# contain a buggy version. If you still want to use their alloca,
12953# use ar to extract alloca.o from them instead of compiling alloca.c.
12954
12955ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12956
12957$as_echo "#define C_ALLOCA 1" >>confdefs.h
12958
12959
12960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12961$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12962if test "${ac_cv_os_cray+set}" = set; then :
12963 $as_echo_n "(cached) " >&6
12964else
12965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966/* end confdefs.h. */
12967#if defined CRAY && ! defined CRAY2
12968webecray
12969#else
12970wenotbecray
12971#endif
12972
12973_ACEOF
12974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12975 $EGREP "webecray" >/dev/null 2>&1; then :
12976 ac_cv_os_cray=yes
12977else
12978 ac_cv_os_cray=no
12979fi
12980rm -f conftest*
12981
12982fi
12983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12984$as_echo "$ac_cv_os_cray" >&6; }
12985if test $ac_cv_os_cray = yes; then
12986 for ac_func in _getb67 GETB67 getb67; do
12987 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12988ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12989eval as_val=\$$as_ac_var
12990 if test "x$as_val" = x""yes; then :
12991
12992cat >>confdefs.h <<_ACEOF
12993#define CRAY_STACKSEG_END $ac_func
12994_ACEOF
12995
12996 break
12997fi
12998
12999 done
13000fi
13001
13002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13003$as_echo_n "checking stack direction for C alloca... " >&6; }
13004if test "${ac_cv_c_stack_direction+set}" = set; then :
13005 $as_echo_n "(cached) " >&6
13006else
13007 if test "$cross_compiling" = yes; then :
13008 ac_cv_c_stack_direction=0
13009else
13010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13011/* end confdefs.h. */
13012$ac_includes_default
13013int
13014find_stack_direction ()
13015{
13016 static char *addr = 0;
13017 auto char dummy;
13018 if (addr == 0)
13019 {
13020 addr = &dummy;
13021 return find_stack_direction ();
13022 }
13023 else
13024 return (&dummy > addr) ? 1 : -1;
13025}
13026
13027int
13028main ()
13029{
13030 return find_stack_direction () < 0;
13031}
13032_ACEOF
13033if ac_fn_c_try_run "$LINENO"; then :
13034 ac_cv_c_stack_direction=1
13035else
13036 ac_cv_c_stack_direction=-1
13037fi
13038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13039 conftest.$ac_objext conftest.beam conftest.$ac_ext
13040fi
13041
13042fi
13043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13044$as_echo "$ac_cv_c_stack_direction" >&6; }
13045cat >>confdefs.h <<_ACEOF
13046#define STACK_DIRECTION $ac_cv_c_stack_direction
13047_ACEOF
13048
13049
13050fi
13051
13052
13053
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13055$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13056if test "${am_cv_langinfo_codeset+set}" = set; then :
13057 $as_echo_n "(cached) " >&6
13058else
13059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13060/* end confdefs.h. */
13061#include <langinfo.h>
13062int
13063main ()
13064{
13065char* cs = nl_langinfo(CODESET);
13066 ;
13067 return 0;
13068}
13069_ACEOF
13070if ac_fn_c_try_link "$LINENO"; then :
13071 am_cv_langinfo_codeset=yes
13072else
13073 am_cv_langinfo_codeset=no
13074fi
13075rm -f core conftest.err conftest.$ac_objext \
13076 conftest$ac_exeext conftest.$ac_ext
13077
13078fi
13079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13080$as_echo "$am_cv_langinfo_codeset" >&6; }
13081 if test $am_cv_langinfo_codeset = yes; then
13082
13083$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13084
13085 fi
13086
13087
c94fee56 13088 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 termios.h termio.h sgtty.h
3266f10b
TT
13089do :
13090 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13091ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13092eval as_val=\$$as_ac_Header
13093 if test "x$as_val" = x""yes; then :
13094 cat >>confdefs.h <<_ACEOF
13095#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13096_ACEOF
13097
13098fi
13099
13100done
13101
13102
f348d89a 13103 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13104do :
13105 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13106ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13107eval as_val=\$$as_ac_var
13108 if test "x$as_val" = x""yes; then :
13109 cat >>confdefs.h <<_ACEOF
13110#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13111_ACEOF
13112
13113fi
13114done
13115
13116
13117 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13118if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13119 ac_have_decl=1
13120else
13121 ac_have_decl=0
13122fi
13123
13124cat >>confdefs.h <<_ACEOF
13125#define HAVE_DECL_STRERROR $ac_have_decl
13126_ACEOF
13127ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13128if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13129 ac_have_decl=1
13130else
13131 ac_have_decl=0
13132fi
13133
13134cat >>confdefs.h <<_ACEOF
13135#define HAVE_DECL_STRSTR $ac_have_decl
13136_ACEOF
13137
13138
e9bcb658
GB
13139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13140$as_echo_n "checking for sigsetjmp... " >&6; }
13141if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13142 $as_echo_n "(cached) " >&6
13143else
13144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13145/* end confdefs.h. */
13146
13147#include <setjmp.h>
13148
13149int
13150main ()
13151{
13152sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13153 ;
13154 return 0;
13155}
13156_ACEOF
13157if ac_fn_c_try_compile "$LINENO"; then :
13158 gdb_cv_func_sigsetjmp=yes
13159else
13160 gdb_cv_func_sigsetjmp=no
13161fi
13162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13163fi
13164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13165$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13166if test $gdb_cv_func_sigsetjmp = yes; then
13167
13168$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13169
13170fi
13171
3266f10b 13172
54019719
PA
13173# Check the return and argument types of ptrace.
13174
13175
54019719
PA
13176for ac_header in sys/ptrace.h ptrace.h
13177do :
13178 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13179ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13180eval as_val=\$$as_ac_Header
13181 if test "x$as_val" = x""yes; then :
13182 cat >>confdefs.h <<_ACEOF
13183#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13184_ACEOF
13185
13186fi
13187
13188done
13189
13190
a3828db0 13191gdb_ptrace_headers='
4ff70b84 13192#include <sys/types.h>
a3828db0
MK
13193#if HAVE_SYS_PTRACE_H
13194# include <sys/ptrace.h>
13195#endif
13196#if HAVE_UNISTD_H
13197# include <unistd.h>
13198#endif
13199'
13200# There is no point in checking if we don't have a prototype.
9b30624b 13201ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
13202"
13203if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13204 ac_have_decl=1
06825bd1 13205else
81ecdfbb 13206 ac_have_decl=0
06825bd1 13207fi
06825bd1 13208
a3828db0 13209cat >>confdefs.h <<_ACEOF
81ecdfbb 13210#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13211_ACEOF
81ecdfbb 13212if test $ac_have_decl = 1; then :
bec39cab 13213
a3828db0 13214else
a3828db0
MK
13215
13216 : ${gdb_cv_func_ptrace_ret='int'}
13217 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13218
06825bd1
MK
13219fi
13220
064ef605
DJ
13221# Check return type. Varargs (used on GNU/Linux) conflict with the
13222# empty argument list, so check for that explicitly.
81ecdfbb
RW
13223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13224$as_echo_n "checking return type of ptrace... " >&6; }
13225if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13226 $as_echo_n "(cached) " >&6
bec39cab 13227else
81ecdfbb 13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13229/* end confdefs.h. */
a3828db0 13230$gdb_ptrace_headers
bec39cab
AC
13231int
13232main ()
13233{
064ef605
DJ
13234extern long ptrace (enum __ptrace_request, ...);
13235 ;
13236 return 0;
13237}
13238_ACEOF
9b30624b 13239if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13240 gdb_cv_func_ptrace_ret='long'
13241else
81ecdfbb 13242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13243/* end confdefs.h. */
13244$gdb_ptrace_headers
13245int
13246main ()
13247{
a3828db0 13248extern int ptrace ();
bec39cab
AC
13249 ;
13250 return 0;
13251}
13252_ACEOF
9b30624b 13253if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13254 gdb_cv_func_ptrace_ret='int'
70f9f479 13255else
81ecdfbb 13256 gdb_cv_func_ptrace_ret='long'
70f9f479 13257fi
81ecdfbb 13258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13259fi
81ecdfbb 13260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13261fi
81ecdfbb
RW
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13263$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13264
a3828db0
MK
13265cat >>confdefs.h <<_ACEOF
13266#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13267_ACEOF
70f9f479 13268
a3828db0 13269# Check argument types.
81ecdfbb
RW
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13271$as_echo_n "checking types of arguments for ptrace... " >&6; }
13272if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13273 $as_echo_n "(cached) " >&6
bec39cab 13274else
a3828db0 13275
81ecdfbb 13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13277/* end confdefs.h. */
13278$gdb_ptrace_headers
13279int
13280main ()
13281{
13282extern long ptrace (enum __ptrace_request, ...);
13283 ;
13284 return 0;
13285}
13286_ACEOF
9b30624b 13287if ac_fn_c_try_compile "$LINENO"; then :
54019719 13288 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13289else
064ef605 13290
a3828db0
MK
13291for gdb_arg1 in 'int' 'long'; do
13292 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13293 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13294 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13296/* end confdefs.h. */
a3828db0 13297$gdb_ptrace_headers
bec39cab
AC
13298int
13299main ()
13300{
a3828db0
MK
13301
13302extern $gdb_cv_func_ptrace_ret
13303 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13304
bec39cab
AC
13305 ;
13306 return 0;
13307}
13308_ACEOF
9b30624b 13309if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13310 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13311 break 4;
5c7f2947 13312fi
81ecdfbb 13313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13314 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13316/* end confdefs.h. */
a3828db0 13317$gdb_ptrace_headers
bec39cab
AC
13318int
13319main ()
13320{
a3828db0
MK
13321
13322extern $gdb_cv_func_ptrace_ret
13323 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13324
bec39cab
AC
13325 ;
13326 return 0;
13327}
13328_ACEOF
9b30624b 13329if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13330
13331gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13332 break 5;
78434e59 13333fi
81ecdfbb 13334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13335 done
13336 done
13337 done
13338 done
13339done
13340# Provide a safe default value.
13341: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13342
064ef605 13343fi
81ecdfbb 13344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13345fi
81ecdfbb
RW
13346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13347$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13348ac_save_IFS=$IFS; IFS=','
13349set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13350IFS=$ac_save_IFS
13351shift
bec39cab 13352
54019719
PA
13353cat >>confdefs.h <<_ACEOF
13354#define PTRACE_TYPE_ARG1 $1
13355_ACEOF
13356
13357
a3828db0
MK
13358cat >>confdefs.h <<_ACEOF
13359#define PTRACE_TYPE_ARG3 $3
13360_ACEOF
13361
96d7229d
LM
13362
13363cat >>confdefs.h <<_ACEOF
13364#define PTRACE_TYPE_ARG4 $4
13365_ACEOF
13366
a3828db0
MK
13367if test -n "$5"; then
13368
13369cat >>confdefs.h <<_ACEOF
13370#define PTRACE_TYPE_ARG5 $5
bec39cab 13371_ACEOF
78434e59
MK
13372
13373fi
13374
54019719 13375
a3828db0 13376if test "$cross_compiling" = no; then
81ecdfbb
RW
13377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13378$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13379if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13380 $as_echo_n "(cached) " >&6
a3828db0 13381else
81ecdfbb
RW
13382 if test "$cross_compiling" = yes; then :
13383 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13384else
81ecdfbb 13385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13386/* end confdefs.h. */
81ecdfbb 13387$ac_includes_default
bec39cab
AC
13388int
13389main ()
13390{
a3828db0
MK
13391/* If this system has a BSD-style setpgrp which takes arguments,
13392 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13393 exit successfully. */
81ecdfbb 13394 return setpgrp (1,1) != -1;
bec39cab
AC
13395 ;
13396 return 0;
13397}
13398_ACEOF
81ecdfbb 13399if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13400 ac_cv_func_setpgrp_void=no
c906108c 13401else
81ecdfbb 13402 ac_cv_func_setpgrp_void=yes
c906108c 13403fi
81ecdfbb
RW
13404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13405 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13406fi
81ecdfbb 13407
a3828db0 13408fi
81ecdfbb
RW
13409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13410$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13411if test $ac_cv_func_setpgrp_void = yes; then
13412
81ecdfbb 13413$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13414
13415fi
a3828db0
MK
13416
13417else
81ecdfbb
RW
13418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13419$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13420if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13421 $as_echo_n "(cached) " >&6
97bf5e38 13422else
81ecdfbb 13423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13424/* end confdefs.h. */
a3828db0
MK
13425
13426#include <unistd.h>
13427
bec39cab
AC
13428int
13429main ()
13430{
a3828db0
MK
13431
13432 if (setpgrp(1,1) == -1)
13433 exit (0);
13434 else
13435 exit (1);
13436
bec39cab
AC
13437 ;
13438 return 0;
13439}
13440_ACEOF
81ecdfbb 13441if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13442 ac_cv_func_setpgrp_void=no
c906108c 13443else
81ecdfbb 13444 ac_cv_func_setpgrp_void=yes
c906108c 13445fi
81ecdfbb 13446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13447fi
81ecdfbb
RW
13448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13449$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13450if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13451 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13452
a3828db0 13453fi
c906108c
SS
13454fi
13455
db1ff28b
JK
13456# Assume we'll default to using the included libiberty regex.
13457gdb_use_included_regex=yes
13458
13459# However, if the system regex is GNU regex, then default to *not*
13460# using the included regex.
13461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13462$as_echo_n "checking for GNU regex... " >&6; }
13463if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13464 $as_echo_n "(cached) " >&6
13465else
13466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13467/* end confdefs.h. */
13468#include <gnu-versions.h>
13469int
13470main ()
13471{
13472#define REGEX_INTERFACE_VERSION 1
13473#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13474# error "Version mismatch"
13475#endif
13476 ;
13477 return 0;
13478}
13479_ACEOF
13480if ac_fn_c_try_compile "$LINENO"; then :
13481 gdb_cv_have_gnu_regex=yes
13482else
13483 gdb_cv_have_gnu_regex=no
13484fi
13485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13486fi
13487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13488$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13489if test $gdb_cv_have_gnu_regex = yes; then
13490 gdb_use_included_regex=no
13491fi
13492
13493
13494# Check whether --with-included-regex was given.
13495if test "${with_included_regex+set}" = set; then :
13496 withval=$with_included_regex; gdb_with_regex=$withval
13497else
13498 gdb_with_regex=$gdb_use_included_regex
13499fi
13500
13501if test "$gdb_with_regex" = yes; then
13502
13503$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13504
13505fi
13506
81ecdfbb
RW
13507# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13508ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13509#include <sys/proc.h>
13510
13511"
13512if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13513
5c45e068 13514cat >>confdefs.h <<_ACEOF
a3828db0 13515#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13516_ACEOF
c906108c 13517
5c45e068 13518
97bf5e38 13519fi
c906108c 13520
5c45e068 13521
a3828db0 13522# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13524$as_echo_n "checking for struct lwp... " >&6; }
13525if test "${gdb_cv_struct_lwp+set}" = set; then :
13526 $as_echo_n "(cached) " >&6
bec39cab 13527else
81ecdfbb 13528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13529/* end confdefs.h. */
a3828db0
MK
13530#include <sys/param.h>
13531#include <sys/lwp.h>
bec39cab
AC
13532int
13533main ()
13534{
a3828db0 13535struct lwp l;
bec39cab
AC
13536 ;
13537 return 0;
13538}
13539_ACEOF
81ecdfbb 13540if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13541 gdb_cv_struct_lwp=yes
c906108c 13542else
81ecdfbb 13543 gdb_cv_struct_lwp=no
c906108c 13544fi
81ecdfbb 13545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13546fi
81ecdfbb
RW
13547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13548$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13549if test $gdb_cv_struct_lwp = yes; then
c906108c 13550
81ecdfbb 13551$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13552
97bf5e38 13553fi
c906108c 13554
a3828db0 13555# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13557$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13558if test "${gdb_cv_struct_reg+set}" = set; then :
13559 $as_echo_n "(cached) " >&6
bec39cab 13560else
81ecdfbb 13561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13562/* end confdefs.h. */
a3828db0
MK
13563#include <sys/types.h>
13564#include <machine/reg.h>
bec39cab
AC
13565int
13566main ()
13567{
a3828db0 13568struct reg r;
bec39cab
AC
13569 ;
13570 return 0;
13571}
13572_ACEOF
81ecdfbb 13573if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13574 gdb_cv_struct_reg=yes
27ca5dad 13575else
81ecdfbb 13576 gdb_cv_struct_reg=no
27ca5dad 13577fi
81ecdfbb 13578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13579fi
81ecdfbb
RW
13580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13581$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13582if test $gdb_cv_struct_reg = yes; then
bec39cab 13583
81ecdfbb 13584$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13585
13586fi
97bf5e38 13587
a3828db0
MK
13588# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13589# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
13590ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13591#include <machine/reg.h>
81ecdfbb
RW
13592"
13593if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13594
13595cat >>confdefs.h <<_ACEOF
a3828db0 13596#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13597_ACEOF
3862412b 13598
5c45e068 13599
97bf5e38 13600fi
a6e69c1f
JB
13601ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13602#include <machine/reg.h>
81ecdfbb
RW
13603"
13604if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13605
13606cat >>confdefs.h <<_ACEOF
a3828db0 13607#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13608_ACEOF
3862412b 13609
5c45e068 13610
97bf5e38 13611fi
3862412b 13612
5c45e068 13613
6fea9e18
L
13614# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
13615# Older amd64 Linux's don't have the fs_base and gs_base members of
13616# `struct user_regs_struct'.
13617ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
13618"
13619if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
13620
13621cat >>confdefs.h <<_ACEOF
13622#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
13623_ACEOF
13624
13625
13626fi
13627ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
13628"
13629if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
13630
13631cat >>confdefs.h <<_ACEOF
13632#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
13633_ACEOF
13634
13635
13636fi
13637
13638
a3828db0 13639# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13641$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13642if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13643 $as_echo_n "(cached) " >&6
451928c5 13644else
81ecdfbb 13645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13646/* end confdefs.h. */
a3828db0 13647#include <sys/ptrace.h>
bec39cab
AC
13648int
13649main ()
13650{
a3828db0 13651PTRACE_GETREGS;
bec39cab
AC
13652 ;
13653 return 0;
13654}
13655_ACEOF
81ecdfbb 13656if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13657 gdb_cv_have_ptrace_getregs=yes
451928c5 13658else
81ecdfbb 13659 gdb_cv_have_ptrace_getregs=no
451928c5 13660fi
81ecdfbb 13661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13662fi
13663
81ecdfbb
RW
13664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13665$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13666if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13667
81ecdfbb 13668$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13669
97bf5e38 13670fi
451928c5 13671
a3828db0 13672# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13674$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13675if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13676 $as_echo_n "(cached) " >&6
451928c5 13677else
81ecdfbb 13678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13679/* end confdefs.h. */
a3828db0 13680#include <sys/ptrace.h>
bec39cab
AC
13681int
13682main ()
13683{
a3828db0 13684PTRACE_GETFPXREGS;
bec39cab
AC
13685 ;
13686 return 0;
13687}
13688_ACEOF
81ecdfbb 13689if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13690 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13691else
81ecdfbb 13692 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13693fi
81ecdfbb 13694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13695fi
13696
81ecdfbb
RW
13697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13698$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13699if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13700
81ecdfbb 13701$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13702
97bf5e38 13703fi
451928c5 13704
a3828db0 13705# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13707$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13708if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13709 $as_echo_n "(cached) " >&6
3862412b 13710else
81ecdfbb 13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13712/* end confdefs.h. */
a3828db0
MK
13713#include <sys/types.h>
13714#include <sys/ptrace.h>
bec39cab
AC
13715int
13716main ()
13717{
a3828db0 13718PT_GETDBREGS;
bec39cab
AC
13719 ;
13720 return 0;
13721}
13722_ACEOF
81ecdfbb 13723if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13724 gdb_cv_have_pt_getdbregs=yes
3862412b 13725else
81ecdfbb 13726 gdb_cv_have_pt_getdbregs=no
3862412b 13727fi
81ecdfbb 13728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13729fi
13730
81ecdfbb
RW
13731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13732$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13733if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13734
81ecdfbb 13735$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13736
97bf5e38 13737fi
3862412b 13738
a3828db0 13739# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13741$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13742if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13743 $as_echo_n "(cached) " >&6
3862412b 13744else
81ecdfbb 13745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13746/* end confdefs.h. */
a3828db0
MK
13747#include <sys/types.h>
13748#include <sys/ptrace.h>
bec39cab
AC
13749int
13750main ()
13751{
a3828db0 13752PT_GETXMMREGS;
bec39cab
AC
13753 ;
13754 return 0;
13755}
13756_ACEOF
81ecdfbb 13757if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13758 gdb_cv_have_pt_getxmmregs=yes
3862412b 13759else
81ecdfbb 13760 gdb_cv_have_pt_getxmmregs=no
3862412b 13761fi
81ecdfbb 13762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13763fi
13764
81ecdfbb
RW
13765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13766$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13767if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13768
81ecdfbb 13769$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13770
97bf5e38 13771fi
3862412b 13772
6e9567fe
JB
13773# See if <sys/ptrace.h> supports LWP names on FreeBSD
13774# Older FreeBSD versions don't have the pl_tdname member of
13775# `struct ptrace_lwpinfo'.
13776ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
13777"
13778if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
13779
13780cat >>confdefs.h <<_ACEOF
13781#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
13782_ACEOF
13783
13784
13785fi
13786
13787
e6cdd38e
JB
13788# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
13789# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
13790# FreeBSD 10.3.
13791ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
13792"
13793if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
13794
13795cat >>confdefs.h <<_ACEOF
13796#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
13797_ACEOF
13798
13799
13800fi
13801
6e9567fe 13802
05b4bd79 13803# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
13804
13805if test "${target}" = "${host}"; then
13806 case "${host}" in
7b00db47 13807 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 13808
81ecdfbb 13809$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13810
13811 ;;
c162e8c9 13812 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13813
81ecdfbb 13814$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f 13815
97bf5e38
MK
13816 ;;
13817 esac
13818fi
13819
13820if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13822$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13823 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13824 $as_echo_n "(cached) " >&6
596c9d4b 13825else
81ecdfbb 13826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13827/* end confdefs.h. */
596c9d4b
KB
13828
13829#define _SYSCALL32
d30c5336
JK
13830/* Needed for new procfs interface on sparc-solaris. */
13831#define _STRUCTURED_PROC 1
596c9d4b 13832#include <sys/procfs.h>
bec39cab
AC
13833int
13834main ()
13835{
97bf5e38 13836gregset_t avar
bec39cab
AC
13837 ;
13838 return 0;
13839}
13840_ACEOF
81ecdfbb 13841if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13842 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13843else
81ecdfbb 13844 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13845
596c9d4b 13846fi
81ecdfbb 13847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13848fi
13849
97bf5e38 13850 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13851
81ecdfbb 13852$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13853
13854 fi
81ecdfbb
RW
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13856$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13857
81ecdfbb
RW
13858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13859$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13860 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13861 $as_echo_n "(cached) " >&6
d84dd0c5 13862else
81ecdfbb 13863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13864/* end confdefs.h. */
97bf5e38
MK
13865
13866#define _SYSCALL32
d30c5336
JK
13867/* Needed for new procfs interface on sparc-solaris. */
13868#define _STRUCTURED_PROC 1
d84dd0c5 13869#include <sys/procfs.h>
bec39cab
AC
13870int
13871main ()
13872{
97bf5e38 13873fpregset_t avar
bec39cab
AC
13874 ;
13875 return 0;
13876}
13877_ACEOF
81ecdfbb 13878if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13879 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13880else
81ecdfbb 13881 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13882
d84dd0c5 13883fi
81ecdfbb 13884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13885fi
13886
97bf5e38 13887 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13888
81ecdfbb 13889$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13890
97bf5e38 13891 fi
81ecdfbb
RW
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13893$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13894
81ecdfbb
RW
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13896$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13897 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13898 $as_echo_n "(cached) " >&6
c906108c 13899else
81ecdfbb 13900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13901/* end confdefs.h. */
c906108c 13902
97bf5e38 13903#define _SYSCALL32
d30c5336
JK
13904/* Needed for new procfs interface on sparc-solaris. */
13905#define _STRUCTURED_PROC 1
97bf5e38 13906#include <sys/procfs.h>
bec39cab
AC
13907int
13908main ()
13909{
97bf5e38 13910prgregset_t avar
bec39cab
AC
13911 ;
13912 return 0;
13913}
13914_ACEOF
81ecdfbb 13915if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13916 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 13917else
81ecdfbb 13918 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 13919
c906108c 13920fi
81ecdfbb 13921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
13922fi
13923
97bf5e38 13924 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 13925
81ecdfbb 13926$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 13927
97bf5e38 13928 fi
81ecdfbb
RW
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
13930$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 13931
81ecdfbb
RW
13932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
13933$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
13934 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
13935 $as_echo_n "(cached) " >&6
d45fe813 13936else
81ecdfbb 13937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13938/* end confdefs.h. */
97bf5e38
MK
13939
13940#define _SYSCALL32
d30c5336
JK
13941/* Needed for new procfs interface on sparc-solaris. */
13942#define _STRUCTURED_PROC 1
97bf5e38 13943#include <sys/procfs.h>
bec39cab
AC
13944int
13945main ()
13946{
97bf5e38 13947prfpregset_t avar
bec39cab
AC
13948 ;
13949 return 0;
13950}
13951_ACEOF
81ecdfbb 13952if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13953 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 13954else
81ecdfbb 13955 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 13956
d45fe813 13957fi
81ecdfbb 13958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13959fi
13960
97bf5e38 13961 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 13962
81ecdfbb 13963$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 13964
97bf5e38 13965 fi
81ecdfbb
RW
13966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
13967$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 13968
81ecdfbb
RW
13969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
13970$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
13971 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
13972 $as_echo_n "(cached) " >&6
d45fe813 13973else
81ecdfbb 13974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13975/* end confdefs.h. */
97bf5e38
MK
13976
13977#define _SYSCALL32
d30c5336
JK
13978/* Needed for new procfs interface on sparc-solaris. */
13979#define _STRUCTURED_PROC 1
97bf5e38 13980#include <sys/procfs.h>
bec39cab
AC
13981int
13982main ()
13983{
97bf5e38 13984prgregset32_t avar
bec39cab
AC
13985 ;
13986 return 0;
13987}
13988_ACEOF
81ecdfbb 13989if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13990 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 13991else
81ecdfbb 13992 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 13993
d45fe813 13994fi
81ecdfbb 13995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
13996fi
13997
97bf5e38 13998 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 13999
81ecdfbb 14000$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14001
97bf5e38 14002 fi
81ecdfbb
RW
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14004$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14005
81ecdfbb
RW
14006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14007$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14008 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
14009 $as_echo_n "(cached) " >&6
d45fe813 14010else
81ecdfbb 14011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14012/* end confdefs.h. */
97bf5e38 14013
d45fe813 14014#define _SYSCALL32
d30c5336
JK
14015/* Needed for new procfs interface on sparc-solaris. */
14016#define _STRUCTURED_PROC 1
97bf5e38 14017#include <sys/procfs.h>
bec39cab
AC
14018int
14019main ()
14020{
97bf5e38 14021lwpid_t avar
bec39cab
AC
14022 ;
14023 return 0;
14024}
14025_ACEOF
81ecdfbb 14026if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14027 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14028else
81ecdfbb 14029 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14030
d45fe813 14031fi
81ecdfbb 14032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14033fi
14034
97bf5e38 14035 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14036
81ecdfbb 14037$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14038
97bf5e38 14039 fi
81ecdfbb
RW
14040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14041$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14042
81ecdfbb
RW
14043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14044$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14045 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14046 $as_echo_n "(cached) " >&6
c906108c 14047else
81ecdfbb 14048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14049/* end confdefs.h. */
c906108c 14050
97bf5e38 14051#define _SYSCALL32
d30c5336
JK
14052/* Needed for new procfs interface on sparc-solaris. */
14053#define _STRUCTURED_PROC 1
97bf5e38 14054#include <sys/procfs.h>
bec39cab
AC
14055int
14056main ()
14057{
97bf5e38 14058psaddr_t avar
bec39cab
AC
14059 ;
14060 return 0;
14061}
14062_ACEOF
81ecdfbb 14063if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14064 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14065else
81ecdfbb 14066 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14067
c906108c 14068fi
81ecdfbb 14069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14070fi
14071
97bf5e38 14072 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14073
81ecdfbb 14074$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14075
97bf5e38 14076 fi
81ecdfbb
RW
14077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14078$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14079
81ecdfbb
RW
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14081$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14082 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14083 $as_echo_n "(cached) " >&6
c906108c 14084else
81ecdfbb 14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14086/* end confdefs.h. */
c906108c 14087
97bf5e38 14088#define _SYSCALL32
d30c5336
JK
14089/* Needed for new procfs interface on sparc-solaris. */
14090#define _STRUCTURED_PROC 1
97bf5e38 14091#include <sys/procfs.h>
bec39cab
AC
14092int
14093main ()
14094{
97bf5e38 14095prsysent_t avar
bec39cab
AC
14096 ;
14097 return 0;
14098}
14099_ACEOF
81ecdfbb 14100if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14101 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 14102else
81ecdfbb 14103 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 14104
c906108c 14105fi
81ecdfbb 14106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14107fi
14108
97bf5e38 14109 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 14110
81ecdfbb 14111$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 14112
97bf5e38 14113 fi
81ecdfbb
RW
14114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14115$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 14116
81ecdfbb
RW
14117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14118$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14119 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14120 $as_echo_n "(cached) " >&6
c906108c 14121else
81ecdfbb 14122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14123/* end confdefs.h. */
c906108c 14124
97bf5e38 14125#define _SYSCALL32
d30c5336
JK
14126/* Needed for new procfs interface on sparc-solaris. */
14127#define _STRUCTURED_PROC 1
97bf5e38 14128#include <sys/procfs.h>
bec39cab
AC
14129int
14130main ()
14131{
97bf5e38 14132pr_sigset_t avar
bec39cab
AC
14133 ;
14134 return 0;
14135}
14136_ACEOF
81ecdfbb 14137if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14138 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 14139else
81ecdfbb 14140 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 14141
c906108c 14142fi
81ecdfbb 14143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14144fi
14145
97bf5e38 14146 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 14147
81ecdfbb 14148$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 14149
97bf5e38 14150 fi
81ecdfbb
RW
14151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14152$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 14153
81ecdfbb
RW
14154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14155$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14156 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14157 $as_echo_n "(cached) " >&6
c906108c 14158else
81ecdfbb 14159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14160/* end confdefs.h. */
c906108c 14161
97bf5e38 14162#define _SYSCALL32
d30c5336
JK
14163/* Needed for new procfs interface on sparc-solaris. */
14164#define _STRUCTURED_PROC 1
97bf5e38 14165#include <sys/procfs.h>
bec39cab
AC
14166int
14167main ()
14168{
97bf5e38 14169pr_sigaction64_t avar
bec39cab
AC
14170 ;
14171 return 0;
14172}
14173_ACEOF
81ecdfbb 14174if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14175 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 14176else
81ecdfbb 14177 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 14178
c906108c 14179fi
81ecdfbb 14180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14181fi
14182
97bf5e38 14183 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 14184
81ecdfbb 14185$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 14186
97bf5e38 14187 fi
81ecdfbb
RW
14188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14189$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14190
81ecdfbb
RW
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14192$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14193 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14194 $as_echo_n "(cached) " >&6
97bf5e38 14195else
81ecdfbb 14196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14197/* end confdefs.h. */
97bf5e38
MK
14198
14199#define _SYSCALL32
d30c5336
JK
14200/* Needed for new procfs interface on sparc-solaris. */
14201#define _STRUCTURED_PROC 1
97bf5e38 14202#include <sys/procfs.h>
bec39cab
AC
14203int
14204main ()
14205{
97bf5e38 14206pr_siginfo64_t avar
bec39cab
AC
14207 ;
14208 return 0;
14209}
14210_ACEOF
81ecdfbb 14211if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14212 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14213else
81ecdfbb 14214 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14215
97bf5e38 14216fi
81ecdfbb 14217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14218fi
c906108c 14219
97bf5e38 14220 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14221
81ecdfbb 14222$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14223
97bf5e38 14224 fi
81ecdfbb
RW
14225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14226$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14227
14228
97bf5e38
MK
14229
14230
14231
97bf5e38 14232 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14234$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14235 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14236 $as_echo_n "(cached) " >&6
c906108c 14237else
81ecdfbb 14238 if test "$cross_compiling" = yes; then :
97bf5e38 14239 gdb_cv_prfpregset_t_broken=yes
c906108c 14240else
81ecdfbb 14241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14242/* end confdefs.h. */
97bf5e38
MK
14243#include <sys/procfs.h>
14244 int main ()
14245 {
14246 if (sizeof (prfpregset_t) == sizeof (void *))
14247 return 1;
14248 return 0;
14249 }
bec39cab 14250_ACEOF
81ecdfbb 14251if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14252 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14253else
14254 gdb_cv_prfpregset_t_broken=yes
c906108c 14255fi
81ecdfbb
RW
14256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14257 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14258fi
81ecdfbb 14259
c906108c
SS
14260fi
14261
81ecdfbb
RW
14262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14263$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14264 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14265
81ecdfbb 14266$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14267
97bf5e38
MK
14268 fi
14269 fi
c906108c 14270fi
c906108c 14271
bc8bcb4b 14272# Check if the compiler supports the `long long' type.
c906108c 14273
81ecdfbb
RW
14274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14275$as_echo_n "checking for long long support in compiler... " >&6; }
14276if test "${gdb_cv_c_long_long+set}" = set; then :
14277 $as_echo_n "(cached) " >&6
97bf5e38 14278else
81ecdfbb 14279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14280/* end confdefs.h. */
bc8bcb4b 14281extern long long foo;
bec39cab
AC
14282int
14283main ()
14284{
bc8bcb4b 14285switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14286 ;
14287 return 0;
14288}
14289_ACEOF
81ecdfbb 14290if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14291 gdb_cv_c_long_long=yes
14292else
81ecdfbb 14293 gdb_cv_c_long_long=no
97bf5e38 14294fi
81ecdfbb 14295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14296fi
81ecdfbb
RW
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14298$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14299if test $gdb_cv_c_long_long != yes; then
14300 # libdecnumber requires long long.
14301 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14302fi
14303
bc8bcb4b 14304# Check if the compiler and runtime support printing long longs.
97bf5e38 14305
81ecdfbb
RW
14306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14307$as_echo_n "checking for long long support in printf... " >&6; }
14308if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14309 $as_echo_n "(cached) " >&6
97bf5e38 14310else
81ecdfbb 14311 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14312 gdb_cv_printf_has_long_long=no
14313else
81ecdfbb 14314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14315/* end confdefs.h. */
bc8bcb4b
MK
14316$ac_includes_default
14317int
14318main ()
14319{
14320char buf[32];
97bf5e38
MK
14321 long long l = 0;
14322 l = (l << 16) + 0x0123;
14323 l = (l << 16) + 0x4567;
14324 l = (l << 16) + 0x89ab;
14325 l = (l << 16) + 0xcdef;
14326 sprintf (buf, "0x%016llx", l);
14327 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14328 ;
14329 return 0;
c906108c 14330}
bec39cab 14331_ACEOF
81ecdfbb 14332if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14333 gdb_cv_printf_has_long_long=yes
14334else
81ecdfbb 14335 gdb_cv_printf_has_long_long=no
97bf5e38 14336fi
81ecdfbb
RW
14337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14338 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14339fi
81ecdfbb 14340
97bf5e38 14341fi
81ecdfbb
RW
14342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14343$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14344if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14345
81ecdfbb 14346$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14347
14348fi
97bf5e38 14349
1a619819
LM
14350# Check if the compiler and runtime support printing decfloats.
14351
81ecdfbb
RW
14352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14353$as_echo_n "checking for decfloat support in printf... " >&6; }
14354if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14355 $as_echo_n "(cached) " >&6
1a619819 14356else
81ecdfbb 14357 if test "$cross_compiling" = yes; then :
1a619819
LM
14358 gdb_cv_printf_has_decfloat=no
14359else
81ecdfbb 14360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14361/* end confdefs.h. */
14362$ac_includes_default
14363int
14364main ()
14365{
14366char buf[64];
14367 _Decimal32 d32 = 1.2345df;
14368 _Decimal64 d64 = 1.2345dd;
14369 _Decimal128 d128 = 1.2345dl;
14370 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14371 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14372 ;
14373 return 0;
14374}
14375_ACEOF
81ecdfbb 14376if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14377 gdb_cv_printf_has_decfloat=yes
14378else
81ecdfbb 14379 gdb_cv_printf_has_decfloat=no
1a619819 14380fi
81ecdfbb
RW
14381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14382 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14383fi
81ecdfbb 14384
1a619819 14385fi
81ecdfbb
RW
14386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14387$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14388if test $gdb_cv_printf_has_decfloat = yes; then
14389
81ecdfbb 14390$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14391
14392fi
14393
bc8bcb4b
MK
14394# Check if the compiler supports the `long double' type. We can't use
14395# AC_C_LONG_DOUBLE because that one does additional checks on the
14396# constants defined in <float.h> that fail on some systems,
14397# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14398
81ecdfbb
RW
14399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14400$as_echo_n "checking for long double support in compiler... " >&6; }
14401if test "${gdb_cv_c_long_double+set}" = set; then :
14402 $as_echo_n "(cached) " >&6
97bf5e38 14403else
81ecdfbb 14404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14405/* end confdefs.h. */
97bf5e38 14406long double foo;
bec39cab 14407_ACEOF
81ecdfbb 14408if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14409 gdb_cv_c_long_double=yes
97bf5e38 14410else
81ecdfbb 14411 gdb_cv_c_long_double=no
97bf5e38 14412fi
81ecdfbb 14413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14414fi
81ecdfbb
RW
14415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14416$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14417if test $gdb_cv_c_long_double = yes; then
c906108c 14418
81ecdfbb 14419$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14420
14421fi
14422
bc8bcb4b 14423# Check if the compiler and runtime support printing long doubles.
97bf5e38 14424
81ecdfbb
RW
14425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14426$as_echo_n "checking for long double support in printf... " >&6; }
14427if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14428 $as_echo_n "(cached) " >&6
97bf5e38 14429else
81ecdfbb 14430 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14431 gdb_cv_printf_has_long_double=no
14432else
81ecdfbb 14433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14434/* end confdefs.h. */
bc8bcb4b
MK
14435$ac_includes_default
14436int
14437main ()
14438{
14439char buf[16];
97bf5e38
MK
14440 long double f = 3.141592653;
14441 sprintf (buf, "%Lg", f);
14442 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14443 ;
14444 return 0;
97bf5e38 14445}
bec39cab 14446_ACEOF
81ecdfbb 14447if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14448 gdb_cv_printf_has_long_double=yes
c906108c 14449else
81ecdfbb 14450 gdb_cv_printf_has_long_double=no
c906108c 14451fi
81ecdfbb
RW
14452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14453 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14454fi
81ecdfbb 14455
c906108c 14456fi
81ecdfbb
RW
14457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14458$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14459if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14460
81ecdfbb 14461$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14462
14463fi
97bf5e38 14464
bc8bcb4b 14465# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14466
81ecdfbb
RW
14467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14468$as_echo_n "checking for long double support in scanf... " >&6; }
14469if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14470 $as_echo_n "(cached) " >&6
97bf5e38 14471else
81ecdfbb 14472 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14473 gdb_cv_scanf_has_long_double=no
14474else
81ecdfbb 14475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14476/* end confdefs.h. */
bc8bcb4b
MK
14477#include <stdio.h>
14478int
14479main ()
14480{
14481char *buf = "3.141592653";
97bf5e38
MK
14482 long double f = 0;
14483 sscanf (buf, "%Lg", &f);
14484 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14485 ;
14486 return 0;
97bf5e38 14487}
bec39cab 14488_ACEOF
81ecdfbb 14489if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14490 gdb_cv_scanf_has_long_double=yes
14491else
81ecdfbb 14492 gdb_cv_scanf_has_long_double=no
97bf5e38 14493fi
81ecdfbb
RW
14494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14495 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14496fi
81ecdfbb 14497
c906108c 14498fi
81ecdfbb
RW
14499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14500$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14501if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14502
81ecdfbb 14503$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14504
14505fi
c906108c 14506
438013df
AO
14507case ${host_os} in
14508aix*)
81ecdfbb
RW
14509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14510$as_echo_n "checking for -bbigtoc option... " >&6; }
14511if test "${gdb_cv_bigtoc+set}" = set; then :
14512 $as_echo_n "(cached) " >&6
438013df 14513else
bec39cab 14514
438013df
AO
14515 SAVE_LDFLAGS=$LDFLAGS
14516
14517 case $GCC in
14518 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14519 *) gdb_cv_bigtoc=-bbigtoc ;;
14520 esac
14521
14522 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14524/* end confdefs.h. */
438013df 14525
bec39cab
AC
14526int
14527main ()
14528{
438013df 14529int i;
bec39cab
AC
14530 ;
14531 return 0;
14532}
14533_ACEOF
81ecdfbb 14534if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14535
81ecdfbb
RW
14536else
14537 gdb_cv_bigtoc=
438013df 14538fi
81ecdfbb
RW
14539rm -f core conftest.err conftest.$ac_objext \
14540 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14541 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14542
bec39cab 14543fi
81ecdfbb
RW
14544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14545$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14546 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14547 ;;
14548esac
14549
38f6b338 14550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14551$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14552dynamic_list=false
14553if test "${gdb_native}" = yes; then
14554 # The dynamically loaded libthread_db needs access to symbols in the gdb
14555 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14556 # may not be supported there.
14557 old_LDFLAGS="$LDFLAGS"
14558 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14559 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14560 LDFLAGS="$LDFLAGS $RDYNAMIC"
14561 if test "${have_libpython}" = no; then
14562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14563/* end confdefs.h. */
14564
14565int
14566main ()
14567{
14568
14569 ;
14570 return 0;
14571}
14572_ACEOF
14573if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14574 dynamic_list=true
14575fi
14576rm -f core conftest.err conftest.$ac_objext \
14577 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14578 else
14579 # Workaround http://bugs.python.org/issue4434 where static
14580 # libpythonX.Y.a would get its symbols required for
14581 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14582 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14583
14584 # Note the workaround for Python
14585 # http://bugs.python.org/issue10112 earlier has removed
14586 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14587 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14588 # always pass.
38f6b338
JK
14589 old_CFLAGS="$CFLAGS"
14590 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14591 old_LIBS="$LIBS"
14592 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14593 old_CPPFLAGS="$CPPFLAGS"
14594 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14595 if test "$cross_compiling" = yes; then :
3bebe2f2 14596 true
f6528abd 14597else
3bebe2f2
JK
14598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14599/* end confdefs.h. */
1b4f615e 14600#include "Python.h"
3bebe2f2
JK
14601int
14602main ()
14603{
14604int err;
38f6b338
JK
14605 Py_Initialize ();
14606 err = PyRun_SimpleString ("import itertools\n");
14607 Py_Finalize ();
14608 return err == 0 ? 0 : 1;
3bebe2f2
JK
14609 ;
14610 return 0;
14611}
14612_ACEOF
14613if ac_fn_c_try_run "$LINENO"; then :
14614 dynamic_list=true
14615fi
14616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14617 conftest.$ac_objext conftest.beam conftest.$ac_ext
14618fi
14619
8c1fb155 14620 LIBS="$old_LIBS"
38f6b338 14621 CFLAGS="$old_CFLAGS"
1b4f615e 14622 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14623 fi
14624 LDFLAGS="$old_LDFLAGS"
14625fi
14626if $dynamic_list; then
14627 found="-Wl,--dynamic-list"
14628 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14629else
38f6b338
JK
14630 found="-rdynamic"
14631 RDYNAMIC="-rdynamic"
f6528abd 14632fi
f6528abd 14633
38f6b338 14634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14635$as_echo "$found" >&6; }
0407b3f1 14636
f6528abd 14637
0407b3f1 14638if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14639 case ${host_os} in
c906108c 14640 solaris*)
d92419e5
JB
14641 # See if thread_db library is around for Solaris thread debugging.
14642 # Note that we must explicitly test for version 1 of the library
14643 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14644 # the same API.
81ecdfbb
RW
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14646$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14647 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14649$as_echo "yes" >&6; }
60ca704f 14650
81ecdfbb 14651$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14652
3483b318 14653 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14654 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14656$as_echo_n "checking for dlopen in -ldl... " >&6; }
14657if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14658 $as_echo_n "(cached) " >&6
c906108c 14659else
bec39cab 14660 ac_check_lib_save_LIBS=$LIBS
c906108c 14661LIBS="-ldl $LIBS"
81ecdfbb 14662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14663/* end confdefs.h. */
14664
81ecdfbb
RW
14665/* Override any GCC internal prototype to avoid an error.
14666 Use char because int might match the return type of a GCC
14667 builtin and then its argument prototype would still apply. */
bec39cab
AC
14668#ifdef __cplusplus
14669extern "C"
14670#endif
bec39cab
AC
14671char dlopen ();
14672int
14673main ()
14674{
81ecdfbb 14675return dlopen ();
bec39cab
AC
14676 ;
14677 return 0;
14678}
14679_ACEOF
81ecdfbb 14680if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14681 ac_cv_lib_dl_dlopen=yes
14682else
81ecdfbb 14683 ac_cv_lib_dl_dlopen=no
bec39cab 14684fi
81ecdfbb
RW
14685rm -f core conftest.err conftest.$ac_objext \
14686 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14687LIBS=$ac_check_lib_save_LIBS
14688fi
81ecdfbb
RW
14689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14690$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14691if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14692 cat >>confdefs.h <<_ACEOF
14693#define HAVE_LIBDL 1
14694_ACEOF
c906108c
SS
14695
14696 LIBS="-ldl $LIBS"
14697
c906108c
SS
14698fi
14699
f6528abd 14700 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14701 # Sun randomly tweaked the prototypes in <proc_service.h>
14702 # at one point.
81ecdfbb
RW
14703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14704$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14705 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14706 $as_echo_n "(cached) " >&6
c906108c 14707else
bec39cab 14708
81ecdfbb 14709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14710/* end confdefs.h. */
c906108c
SS
14711
14712 #include <proc_service.h>
14713 ps_err_e ps_pdwrite
14714 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14715
bec39cab
AC
14716int
14717main ()
14718{
14719
14720 ;
14721 return 0;
14722}
14723_ACEOF
81ecdfbb 14724if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14725 gdb_cv_proc_service_is_old=no
14726else
81ecdfbb 14727 gdb_cv_proc_service_is_old=yes
c906108c 14728fi
81ecdfbb 14729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14730
c906108c
SS
14731fi
14732
81ecdfbb
RW
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14734$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14735 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14736
81ecdfbb 14737$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14738
14739 fi
14740 else
81ecdfbb
RW
14741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14742$as_echo "no" >&6; }
c906108c
SS
14743 fi
14744 ;;
d92419e5 14745 aix*)
81ecdfbb
RW
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14747$as_echo_n "checking for AiX thread debugging library... " >&6; }
14748 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14749 $as_echo_n "(cached) " >&6
bec39cab 14750else
81ecdfbb 14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14752/* end confdefs.h. */
d92419e5 14753#include <sys/pthdebug.h>
bec39cab
AC
14754int
14755main ()
14756{
d92419e5
JB
14757#ifndef PTHDB_VERSION_3
14758 #error
14759 #endif
bec39cab
AC
14760 ;
14761 return 0;
14762}
14763_ACEOF
81ecdfbb 14764if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14765 gdb_cv_have_aix_thread_debug=yes
14766else
81ecdfbb 14767 gdb_cv_have_aix_thread_debug=no
d92419e5 14768fi
81ecdfbb 14769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14770fi
14771
81ecdfbb
RW
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14773$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14774 if test $gdb_cv_have_aix_thread_debug = yes; then
14775 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14776 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14777 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14778
14779 # Older versions of AIX do not provide the declaration for
14780 # the getthrds function (it appears that it was introduced
14781 # with AIX 6.x).
14782 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14783"
14784if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14785 ac_have_decl=1
14786else
14787 ac_have_decl=0
14788fi
14789
14790cat >>confdefs.h <<_ACEOF
14791#define HAVE_DECL_GETTHRDS $ac_have_decl
14792_ACEOF
14793
d92419e5
JB
14794 fi
14795 ;;
c906108c 14796 esac
bec39cab 14797
c906108c
SS
14798fi
14799
3f47be5c 14800if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14802$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14803if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14804 $as_echo_n "(cached) " >&6
bec39cab 14805else
81ecdfbb 14806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14807/* end confdefs.h. */
3f47be5c 14808#include <thread_db.h>
bec39cab
AC
14809int
14810main ()
14811{
3f47be5c 14812int i = TD_NOTALLOC;
bec39cab
AC
14813 ;
14814 return 0;
14815}
14816_ACEOF
81ecdfbb 14817if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14818 gdb_cv_thread_db_h_has_td_notalloc=yes
14819else
81ecdfbb 14820 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14821
3f47be5c 14822fi
81ecdfbb 14823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14824
bec39cab 14825fi
81ecdfbb
RW
14826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14827$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14829$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14830if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14831 $as_echo_n "(cached) " >&6
59f80f10 14832else
81ecdfbb 14833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14834/* end confdefs.h. */
14835#include <thread_db.h>
14836int
14837main ()
14838{
14839int i = TD_VERSION;
14840 ;
14841 return 0;
14842}
14843_ACEOF
81ecdfbb 14844if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14845 gdb_cv_thread_db_h_has_td_version=yes
14846else
81ecdfbb 14847 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14848
14849fi
81ecdfbb 14850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14851
14852fi
81ecdfbb
RW
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14854$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14856$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14857if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14858 $as_echo_n "(cached) " >&6
59f80f10 14859else
81ecdfbb 14860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14861/* end confdefs.h. */
14862#include <thread_db.h>
14863int
14864main ()
14865{
14866int i = TD_NOTLS;
14867 ;
14868 return 0;
14869}
14870_ACEOF
81ecdfbb 14871if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14872 gdb_cv_thread_db_h_has_td_notls=yes
14873else
81ecdfbb 14874 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14875
14876fi
81ecdfbb 14877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14878
14879fi
81ecdfbb
RW
14880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14881$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14882fi
14883if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14884
81ecdfbb 14885$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14886
59f80f10
DJ
14887fi
14888if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14889
81ecdfbb 14890$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14891
14892fi
14893if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14894
81ecdfbb 14895$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14896
3f47be5c
EZ
14897fi
14898
81ecdfbb
RW
14899ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14900"
14901if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14902 ac_have_decl=1
10568435 14903else
81ecdfbb 14904 ac_have_decl=0
10568435 14905fi
10568435
JK
14906
14907cat >>confdefs.h <<_ACEOF
81ecdfbb 14908#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
14909_ACEOF
14910
14911
81ecdfbb
RW
14912if test "$cross_compiling" = yes; then :
14913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14914/* end confdefs.h. */
14915#include <sys/personality.h>
14916int
14917main ()
14918{
14919
14920# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14921# define ADDR_NO_RANDOMIZE 0x0040000
14922# endif
14923 /* Test the flag could be set and stays set. */
14924 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14925 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14926 return 1
14927 ;
14928 return 0;
14929}
14930_ACEOF
81ecdfbb 14931if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
14932 have_personality=true
14933else
81ecdfbb 14934 have_personality=false
10568435 14935fi
81ecdfbb
RW
14936rm -f core conftest.err conftest.$ac_objext \
14937 conftest$ac_exeext conftest.$ac_ext
10568435 14938else
81ecdfbb 14939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
14940/* end confdefs.h. */
14941#include <sys/personality.h>
14942int
14943main ()
14944{
14945
14946# if !HAVE_DECL_ADDR_NO_RANDOMIZE
14947# define ADDR_NO_RANDOMIZE 0x0040000
14948# endif
14949 /* Test the flag could be set and stays set. */
14950 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
14951 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
14952 return 1
14953 ;
14954 return 0;
14955}
14956_ACEOF
81ecdfbb 14957if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
14958 have_personality=true
14959else
81ecdfbb 14960 have_personality=false
10568435 14961fi
81ecdfbb
RW
14962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14963 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 14964fi
81ecdfbb 14965
10568435
JK
14966if $have_personality
14967then
14968
81ecdfbb 14969$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
14970
14971fi
14972
e655c1a2
PA
14973case $host_os in
14974 go32* | *djgpp*)
14975 gdbinit=gdb.ini
14976 ;;
14977 *)
14978 gdbinit=.gdbinit
14979 ;;
14980esac
14981
14982cat >>confdefs.h <<_ACEOF
14983#define GDBINIT "$gdbinit"
14984_ACEOF
14985
14986
fb40c209 14987
f83d8a90
DE
14988# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
14989# except that the argument to --with-sysroot is optional.
14990# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
14991if test "x$with_sysroot" = xyes; then
14992 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
14993fi
bec39cab 14994
81ecdfbb
RW
14995# Check whether --with-sysroot was given.
14996if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
14997 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
14998else
14999 TARGET_SYSTEM_ROOT=
15000fi
030292b7 15001
030292b7 15002
f83d8a90
DE
15003 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15004 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15005 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15006 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15007
f83d8a90
DE
15008cat >>confdefs.h <<_ACEOF
15009#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15010_ACEOF
bec39cab 15011
030292b7 15012
b14b1491 15013
f83d8a90
DE
15014
15015 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15016 if test "x$prefix" = xNONE; then
15017 test_prefix=/usr/local
15018 else
15019 test_prefix=$prefix
15020 fi
15021 else
15022 test_prefix=$exec_prefix
15023 fi
15024 value=0
15025 case ${ac_define_dir} in
15026 "${test_prefix}"|"${test_prefix}/"*|\
15027 '${exec_prefix}'|'${exec_prefix}/'*)
15028 value=1
15029 ;;
15030 esac
15031
15032cat >>confdefs.h <<_ACEOF
15033#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15034_ACEOF
030292b7
DJ
15035
15036
15037
16e7150e 15038
16e7150e 15039
81ecdfbb
RW
15040# Check whether --with-system-gdbinit was given.
15041if test "${with_system_gdbinit+set}" = set; then :
15042 withval=$with_system_gdbinit;
b14b1491
TT
15043 SYSTEM_GDBINIT=$withval
15044else
15045 SYSTEM_GDBINIT=
81ecdfbb
RW
15046fi
15047
16e7150e
JG
15048
15049 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15050 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15051 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15052 ac_define_dir=`eval echo $ac_define_dir`
15053
15054cat >>confdefs.h <<_ACEOF
15055#define SYSTEM_GDBINIT "$ac_define_dir"
15056_ACEOF
15057
15058
15059
0c4a4063 15060
b14b1491
TT
15061 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15062 if test "x$prefix" = xNONE; then
15063 test_prefix=/usr/local
15064 else
15065 test_prefix=$prefix
15066 fi
15067 else
15068 test_prefix=$exec_prefix
15069 fi
15070 value=0
15071 case ${ac_define_dir} in
15072 "${test_prefix}"|"${test_prefix}/"*|\
15073 '${exec_prefix}'|'${exec_prefix}/'*)
15074 value=1
15075 ;;
15076 esac
16e7150e 15077
b14b1491
TT
15078cat >>confdefs.h <<_ACEOF
15079#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15080_ACEOF
15081
b14b1491 15082
16e7150e 15083
0c4a4063 15084
b835bb52 15085
81ecdfbb
RW
15086# Check whether --enable-werror was given.
15087if test "${enable_werror+set}" = set; then :
15088 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15089 yes | y) ERROR_ON_WARNING="yes" ;;
15090 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15091 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15092 esac
81ecdfbb
RW
15093fi
15094
094a342e 15095
9a084706
PA
15096# Enable -Werror by default when using gcc. Turn it off for releases.
15097if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15098 ERROR_ON_WARNING=yes
15099fi
15100
15101WERROR_CFLAGS=""
15102if test "${ERROR_ON_WARNING}" = yes ; then
15103 WERROR_CFLAGS="-Werror"
15104fi
15105
cf6de44d 15106# The options we'll try to enable.
aac331e4 15107build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 15108-Wno-unused -Wunused-value -Wunused-function \
aac331e4 15109-Wno-switch -Wno-char-subscripts \
cf6de44d 15110-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
e13cb306 15111-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized"
3bc3d82a 15112
3526781e
DJ
15113# Enable -Wno-format by default when using gcc on mingw since many
15114# GCC versions complain about %I64.
15115case "${host}" in
15116 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 15117 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15118esac
15119
81ecdfbb
RW
15120# Check whether --enable-build-warnings was given.
15121if test "${enable_build_warnings+set}" = set; then :
15122 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15123 yes) ;;
15124 no) build_warnings="-w";;
15125 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15126 build_warnings="${build_warnings} ${t}";;
15127 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15128 build_warnings="${t} ${build_warnings}";;
15129 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15130esac
d4f3574e 15131if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15132 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15133fi
81ecdfbb
RW
15134fi
15135# Check whether --enable-gdb-build-warnings was given.
15136if test "${enable_gdb_build_warnings+set}" = set; then :
15137 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15138 yes) ;;
15139 no) build_warnings="-w";;
15140 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15141 build_warnings="${build_warnings} ${t}";;
15142 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15143 build_warnings="${t} ${build_warnings}";;
15144 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15145esac
15146if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15147 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15148fi
81ecdfbb 15149fi
3bc3d82a
PA
15150
15151# The set of warnings supported by a C++ compiler is not the same as
15152# of the C compiler.
cf6de44d 15153ac_ext=cpp
3bc3d82a
PA
15154ac_cpp='$CXXCPP $CPPFLAGS'
15155ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15156ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15157ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15158
3bc3d82a 15159
81ecdfbb 15160WARN_CFLAGS=""
c906108c
SS
15161if test "x${build_warnings}" != x -a "x$GCC" = xyes
15162then
81ecdfbb
RW
15163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15164$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15165 # Separate out the -Werror flag as some files just cannot be
15166 # compiled with it enabled.
15167 for w in ${build_warnings}; do
7544db95
PA
15168 # GCC does not complain about -Wno-unknown-warning. Invert
15169 # and test -Wunknown-warning instead.
15170 case $w in
15171 -Wno-*)
15172 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15173 *)
15174 wtest=$w ;;
15175 esac
15176
746a987d
AC
15177 case $w in
15178 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15179 *)
15180 # Check whether GCC accepts it.
4536bbc6 15181 saved_CFLAGS="$CFLAGS"
7544db95 15182 CFLAGS="$CFLAGS $wtest"
3bc3d82a 15183 saved_CXXFLAGS="$CXXFLAGS"
7544db95 15184 CXXFLAGS="$CXXFLAGS $wtest"
54019719 15185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15186/* end confdefs.h. */
4536bbc6 15187
bec39cab
AC
15188int
15189main ()
15190{
4536bbc6 15191
bec39cab
AC
15192 ;
15193 return 0;
15194}
15195_ACEOF
3bc3d82a 15196if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15197 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15198fi
81ecdfbb 15199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15200 CFLAGS="$saved_CFLAGS"
3bc3d82a 15201 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15202 esac
15203 done
81ecdfbb
RW
15204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15205$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15206fi
15207
15208
104c1213 15209
cf6de44d 15210ac_ext=c
3bc3d82a
PA
15211ac_cpp='$CPP $CPPFLAGS'
15212ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15213ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15214ac_compiler_gnu=$ac_cv_c_compiler_gnu
15215
3bc3d82a 15216
b835bb52 15217
7a292a7a 15218# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15220$as_echo_n "checking for cygwin... " >&6; }
15221if test "${gdb_cv_os_cygwin+set}" = set; then :
15222 $as_echo_n "(cached) " >&6
bec39cab 15223else
81ecdfbb 15224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15225/* end confdefs.h. */
7a292a7a
SS
15226
15227#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15228lose
15229#endif
bec39cab 15230_ACEOF
7a292a7a 15231if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15232 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15233 gdb_cv_os_cygwin=yes
15234else
7a292a7a
SS
15235 gdb_cv_os_cygwin=no
15236fi
15237rm -f conftest*
15238
15239fi
81ecdfbb
RW
15240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15241$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15242
aff38e61 15243
3eb25fda 15244SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15245case ${host} in
95cbc983
AC
15246 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15247 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15248 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15249esac
15250
15251
cd0fc7c3
SS
15252# libreadline needs libuser32.a in a cygwin environment
15253WIN32LIBS=
15254if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15255 WIN32LIBS="-luser32"
15256 case "${target}" in
15257 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15258 ;;
15259 esac
cd0fc7c3 15260fi
c906108c 15261
b4505029
MM
15262# The ser-tcp.c module requires sockets.
15263case ${host} in
15264 *mingw32*)
15265
81ecdfbb 15266$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15267
15268 WIN32LIBS="$WIN32LIBS -lws2_32"
15269 ;;
15270esac
15271
7a292a7a 15272
31d99776 15273# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15274
15275 OLD_CFLAGS=$CFLAGS
15276 OLD_LDFLAGS=$LDFLAGS
15277 OLD_LIBS=$LIBS
15278 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15279 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15280 # always want our bfd.
15281 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15282 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15283 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15284 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15285 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
15287$as_echo_n "checking for ELF support in BFD... " >&6; }
15288if test "${gdb_cv_var_elf+set}" = set; then :
15289 $as_echo_n "(cached) " >&6
31d99776 15290else
81ecdfbb 15291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15292/* end confdefs.h. */
15293#include <stdlib.h>
def63ff0
TT
15294 #include "bfd.h"
15295 #include "elf-bfd.h"
31d99776
DJ
15296
15297int
15298main ()
15299{
def63ff0 15300return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15301 ;
15302 return 0;
15303}
15304_ACEOF
81ecdfbb 15305if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15306 gdb_cv_var_elf=yes
15307else
81ecdfbb 15308 gdb_cv_var_elf=no
31d99776 15309fi
81ecdfbb
RW
15310rm -f core conftest.err conftest.$ac_objext \
15311 conftest$ac_exeext conftest.$ac_ext
31d99776 15312fi
81ecdfbb
RW
15313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15314$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15315 CFLAGS=$OLD_CFLAGS
15316 LDFLAGS=$OLD_LDFLAGS
15317 LIBS=$OLD_LIBS
31d99776 15318if test $gdb_cv_var_elf = yes; then
d4777acb 15319 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15320
81ecdfbb 15321$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15322
075ff26d
JK
15323 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15324 if test "$plugins" = "yes"; then
a48b32c0
L
15325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15326$as_echo_n "checking for library containing dlopen... " >&6; }
15327if test "${ac_cv_search_dlopen+set}" = set; then :
15328 $as_echo_n "(cached) " >&6
15329else
15330 ac_func_search_save_LIBS=$LIBS
15331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15332/* end confdefs.h. */
15333
15334/* Override any GCC internal prototype to avoid an error.
15335 Use char because int might match the return type of a GCC
15336 builtin and then its argument prototype would still apply. */
15337#ifdef __cplusplus
15338extern "C"
15339#endif
15340char dlopen ();
15341int
15342main ()
15343{
15344return dlopen ();
15345 ;
15346 return 0;
15347}
15348_ACEOF
15349for ac_lib in '' dl; do
15350 if test -z "$ac_lib"; then
15351 ac_res="none required"
15352 else
15353 ac_res=-l$ac_lib
15354 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15355 fi
15356 if ac_fn_c_try_link "$LINENO"; then :
15357 ac_cv_search_dlopen=$ac_res
15358fi
15359rm -f core conftest.err conftest.$ac_objext \
15360 conftest$ac_exeext
15361 if test "${ac_cv_search_dlopen+set}" = set; then :
15362 break
15363fi
15364done
15365if test "${ac_cv_search_dlopen+set}" = set; then :
15366
15367else
15368 ac_cv_search_dlopen=no
15369fi
15370rm conftest.$ac_ext
15371LIBS=$ac_func_search_save_LIBS
15372fi
15373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15374$as_echo "$ac_cv_search_dlopen" >&6; }
15375ac_res=$ac_cv_search_dlopen
15376if test "$ac_res" != no; then :
15377 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15378
15379fi
15380
075ff26d 15381 fi
31d99776 15382fi
31d99776 15383
4f05add4
TT
15384# Add macho support to GDB, but only if BFD includes it.
15385
15386 OLD_CFLAGS=$CFLAGS
15387 OLD_LDFLAGS=$LDFLAGS
15388 OLD_LIBS=$LIBS
15389 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15390 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15391 # always want our bfd.
15392 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15393 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15394 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15395 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15396 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15398$as_echo_n "checking for Mach-O support in BFD... " >&6; }
15399if test "${gdb_cv_var_macho+set}" = set; then :
15400 $as_echo_n "(cached) " >&6
15401else
15402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15403/* end confdefs.h. */
15404#include <stdlib.h>
15405 #include "bfd.h"
15406 #include "mach-o.h"
15407
15408int
15409main ()
15410{
15411return bfd_mach_o_lookup_command (NULL, 0, NULL);
15412 ;
15413 return 0;
15414}
15415_ACEOF
15416if ac_fn_c_try_link "$LINENO"; then :
15417 gdb_cv_var_macho=yes
15418else
15419 gdb_cv_var_macho=no
15420fi
15421rm -f core conftest.err conftest.$ac_objext \
15422 conftest$ac_exeext conftest.$ac_ext
15423fi
15424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15425$as_echo "$gdb_cv_var_macho" >&6; }
15426 CFLAGS=$OLD_CFLAGS
15427 LDFLAGS=$OLD_LDFLAGS
15428 LIBS=$OLD_LIBS
15429if test $gdb_cv_var_macho = yes; then
15430 CONFIG_OBS="$CONFIG_OBS machoread.o"
15431fi
15432
121ce6e5
DJ
15433# Add any host-specific objects to GDB.
15434CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15435
608e2dbb
TT
15436# If building on ELF, look for lzma support for embedded compressed debug info.
15437if test $gdb_cv_var_elf = yes; then
15438
15439# Check whether --with-lzma was given.
15440if test "${with_lzma+set}" = set; then :
15441 withval=$with_lzma;
15442else
15443 with_lzma=auto
15444fi
15445
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15447$as_echo_n "checking whether to use lzma... " >&6; }
15448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15449$as_echo "$with_lzma" >&6; }
15450
15451 if test "${with_lzma}" != no; then
15452
15453
15454
15455
15456
15457
15458
15459
15460 use_additional=yes
15461
15462 acl_save_prefix="$prefix"
15463 prefix="$acl_final_prefix"
15464 acl_save_exec_prefix="$exec_prefix"
15465 exec_prefix="$acl_final_exec_prefix"
15466
15467 eval additional_includedir=\"$includedir\"
15468 eval additional_libdir=\"$libdir\"
15469
15470 exec_prefix="$acl_save_exec_prefix"
15471 prefix="$acl_save_prefix"
15472
15473
15474# Check whether --with-liblzma-prefix was given.
15475if test "${with_liblzma_prefix+set}" = set; then :
15476 withval=$with_liblzma_prefix;
15477 if test "X$withval" = "Xno"; then
15478 use_additional=no
15479 else
15480 if test "X$withval" = "X"; then
15481
15482 acl_save_prefix="$prefix"
15483 prefix="$acl_final_prefix"
15484 acl_save_exec_prefix="$exec_prefix"
15485 exec_prefix="$acl_final_exec_prefix"
15486
15487 eval additional_includedir=\"$includedir\"
15488 eval additional_libdir=\"$libdir\"
15489
15490 exec_prefix="$acl_save_exec_prefix"
15491 prefix="$acl_save_prefix"
15492
15493 else
15494 additional_includedir="$withval/include"
15495 additional_libdir="$withval/lib"
15496 fi
15497 fi
15498
15499fi
15500
15501 LIBLZMA=
15502 LTLIBLZMA=
15503 INCLZMA=
15504 rpathdirs=
15505 ltrpathdirs=
15506 names_already_handled=
15507 names_next_round='lzma '
15508 while test -n "$names_next_round"; do
15509 names_this_round="$names_next_round"
15510 names_next_round=
15511 for name in $names_this_round; do
15512 already_handled=
15513 for n in $names_already_handled; do
15514 if test "$n" = "$name"; then
15515 already_handled=yes
15516 break
15517 fi
15518 done
15519 if test -z "$already_handled"; then
15520 names_already_handled="$names_already_handled $name"
15521 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15522 eval value=\"\$HAVE_LIB$uppername\"
15523 if test -n "$value"; then
15524 if test "$value" = yes; then
15525 eval value=\"\$LIB$uppername\"
15526 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15527 eval value=\"\$LTLIB$uppername\"
15528 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15529 else
15530 :
15531 fi
15532 else
15533 found_dir=
15534 found_la=
15535 found_so=
15536 found_a=
15537 if test $use_additional = yes; then
15538 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15539 found_dir="$additional_libdir"
15540 found_so="$additional_libdir/lib$name.$shlibext"
15541 if test -f "$additional_libdir/lib$name.la"; then
15542 found_la="$additional_libdir/lib$name.la"
15543 fi
15544 else
15545 if test -f "$additional_libdir/lib$name.$libext"; then
15546 found_dir="$additional_libdir"
15547 found_a="$additional_libdir/lib$name.$libext"
15548 if test -f "$additional_libdir/lib$name.la"; then
15549 found_la="$additional_libdir/lib$name.la"
15550 fi
15551 fi
15552 fi
15553 fi
15554 if test "X$found_dir" = "X"; then
15555 for x in $LDFLAGS $LTLIBLZMA; do
15556
15557 acl_save_prefix="$prefix"
15558 prefix="$acl_final_prefix"
15559 acl_save_exec_prefix="$exec_prefix"
15560 exec_prefix="$acl_final_exec_prefix"
15561 eval x=\"$x\"
15562 exec_prefix="$acl_save_exec_prefix"
15563 prefix="$acl_save_prefix"
15564
15565 case "$x" in
15566 -L*)
15567 dir=`echo "X$x" | sed -e 's/^X-L//'`
15568 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15569 found_dir="$dir"
15570 found_so="$dir/lib$name.$shlibext"
15571 if test -f "$dir/lib$name.la"; then
15572 found_la="$dir/lib$name.la"
15573 fi
15574 else
15575 if test -f "$dir/lib$name.$libext"; then
15576 found_dir="$dir"
15577 found_a="$dir/lib$name.$libext"
15578 if test -f "$dir/lib$name.la"; then
15579 found_la="$dir/lib$name.la"
15580 fi
15581 fi
15582 fi
15583 ;;
15584 esac
15585 if test "X$found_dir" != "X"; then
15586 break
15587 fi
15588 done
15589 fi
15590 if test "X$found_dir" != "X"; then
15591 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15592 if test "X$found_so" != "X"; then
15593 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15594 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15595 else
15596 haveit=
15597 for x in $ltrpathdirs; do
15598 if test "X$x" = "X$found_dir"; then
15599 haveit=yes
15600 break
15601 fi
15602 done
15603 if test -z "$haveit"; then
15604 ltrpathdirs="$ltrpathdirs $found_dir"
15605 fi
15606 if test "$hardcode_direct" = yes; then
15607 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15608 else
15609 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15610 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15611 haveit=
15612 for x in $rpathdirs; do
15613 if test "X$x" = "X$found_dir"; then
15614 haveit=yes
15615 break
15616 fi
15617 done
15618 if test -z "$haveit"; then
15619 rpathdirs="$rpathdirs $found_dir"
15620 fi
15621 else
15622 haveit=
15623 for x in $LDFLAGS $LIBLZMA; do
15624
15625 acl_save_prefix="$prefix"
15626 prefix="$acl_final_prefix"
15627 acl_save_exec_prefix="$exec_prefix"
15628 exec_prefix="$acl_final_exec_prefix"
15629 eval x=\"$x\"
15630 exec_prefix="$acl_save_exec_prefix"
15631 prefix="$acl_save_prefix"
15632
15633 if test "X$x" = "X-L$found_dir"; then
15634 haveit=yes
15635 break
15636 fi
15637 done
15638 if test -z "$haveit"; then
15639 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15640 fi
15641 if test "$hardcode_minus_L" != no; then
15642 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15643 else
15644 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15645 fi
15646 fi
15647 fi
15648 fi
15649 else
15650 if test "X$found_a" != "X"; then
15651 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15652 else
15653 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15654 fi
15655 fi
15656 additional_includedir=
15657 case "$found_dir" in
15658 */lib | */lib/)
15659 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15660 additional_includedir="$basedir/include"
15661 ;;
15662 esac
15663 if test "X$additional_includedir" != "X"; then
15664 if test "X$additional_includedir" != "X/usr/include"; then
15665 haveit=
15666 if test "X$additional_includedir" = "X/usr/local/include"; then
15667 if test -n "$GCC"; then
15668 case $host_os in
15669 linux*) haveit=yes;;
15670 esac
15671 fi
15672 fi
15673 if test -z "$haveit"; then
15674 for x in $CPPFLAGS $INCLZMA; do
15675
15676 acl_save_prefix="$prefix"
15677 prefix="$acl_final_prefix"
15678 acl_save_exec_prefix="$exec_prefix"
15679 exec_prefix="$acl_final_exec_prefix"
15680 eval x=\"$x\"
15681 exec_prefix="$acl_save_exec_prefix"
15682 prefix="$acl_save_prefix"
15683
15684 if test "X$x" = "X-I$additional_includedir"; then
15685 haveit=yes
15686 break
15687 fi
15688 done
15689 if test -z "$haveit"; then
15690 if test -d "$additional_includedir"; then
15691 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15692 fi
15693 fi
15694 fi
15695 fi
15696 fi
15697 if test -n "$found_la"; then
15698 save_libdir="$libdir"
15699 case "$found_la" in
15700 */* | *\\*) . "$found_la" ;;
15701 *) . "./$found_la" ;;
15702 esac
15703 libdir="$save_libdir"
15704 for dep in $dependency_libs; do
15705 case "$dep" in
15706 -L*)
15707 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15708 if test "X$additional_libdir" != "X/usr/lib"; then
15709 haveit=
15710 if test "X$additional_libdir" = "X/usr/local/lib"; then
15711 if test -n "$GCC"; then
15712 case $host_os in
15713 linux*) haveit=yes;;
15714 esac
15715 fi
15716 fi
15717 if test -z "$haveit"; then
15718 haveit=
15719 for x in $LDFLAGS $LIBLZMA; do
15720
15721 acl_save_prefix="$prefix"
15722 prefix="$acl_final_prefix"
15723 acl_save_exec_prefix="$exec_prefix"
15724 exec_prefix="$acl_final_exec_prefix"
15725 eval x=\"$x\"
15726 exec_prefix="$acl_save_exec_prefix"
15727 prefix="$acl_save_prefix"
15728
15729 if test "X$x" = "X-L$additional_libdir"; then
15730 haveit=yes
15731 break
15732 fi
15733 done
15734 if test -z "$haveit"; then
15735 if test -d "$additional_libdir"; then
15736 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15737 fi
15738 fi
15739 haveit=
15740 for x in $LDFLAGS $LTLIBLZMA; do
15741
15742 acl_save_prefix="$prefix"
15743 prefix="$acl_final_prefix"
15744 acl_save_exec_prefix="$exec_prefix"
15745 exec_prefix="$acl_final_exec_prefix"
15746 eval x=\"$x\"
15747 exec_prefix="$acl_save_exec_prefix"
15748 prefix="$acl_save_prefix"
15749
15750 if test "X$x" = "X-L$additional_libdir"; then
15751 haveit=yes
15752 break
15753 fi
15754 done
15755 if test -z "$haveit"; then
15756 if test -d "$additional_libdir"; then
15757 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
15758 fi
15759 fi
15760 fi
15761 fi
15762 ;;
15763 -R*)
15764 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15765 if test "$enable_rpath" != no; then
15766 haveit=
15767 for x in $rpathdirs; do
15768 if test "X$x" = "X$dir"; then
15769 haveit=yes
15770 break
15771 fi
15772 done
15773 if test -z "$haveit"; then
15774 rpathdirs="$rpathdirs $dir"
15775 fi
15776 haveit=
15777 for x in $ltrpathdirs; do
15778 if test "X$x" = "X$dir"; then
15779 haveit=yes
15780 break
15781 fi
15782 done
15783 if test -z "$haveit"; then
15784 ltrpathdirs="$ltrpathdirs $dir"
15785 fi
15786 fi
15787 ;;
15788 -l*)
15789 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15790 ;;
15791 *.la)
15792 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15793 ;;
15794 *)
15795 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15796 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15797 ;;
15798 esac
15799 done
15800 fi
15801 else
15802 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15803 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15804 fi
15805 fi
15806 fi
15807 done
15808 done
15809 if test "X$rpathdirs" != "X"; then
15810 if test -n "$hardcode_libdir_separator"; then
15811 alldirs=
15812 for found_dir in $rpathdirs; do
15813 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15814 done
15815 acl_save_libdir="$libdir"
15816 libdir="$alldirs"
15817 eval flag=\"$hardcode_libdir_flag_spec\"
15818 libdir="$acl_save_libdir"
15819 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15820 else
15821 for found_dir in $rpathdirs; do
15822 acl_save_libdir="$libdir"
15823 libdir="$found_dir"
15824 eval flag=\"$hardcode_libdir_flag_spec\"
15825 libdir="$acl_save_libdir"
15826 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15827 done
15828 fi
15829 fi
15830 if test "X$ltrpathdirs" != "X"; then
15831 for found_dir in $ltrpathdirs; do
15832 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15833 done
15834 fi
15835
15836
15837 ac_save_CPPFLAGS="$CPPFLAGS"
15838
15839 for element in $INCLZMA; do
15840 haveit=
15841 for x in $CPPFLAGS; do
15842
15843 acl_save_prefix="$prefix"
15844 prefix="$acl_final_prefix"
15845 acl_save_exec_prefix="$exec_prefix"
15846 exec_prefix="$acl_final_exec_prefix"
15847 eval x=\"$x\"
15848 exec_prefix="$acl_save_exec_prefix"
15849 prefix="$acl_save_prefix"
15850
15851 if test "X$x" = "X$element"; then
15852 haveit=yes
15853 break
15854 fi
15855 done
15856 if test -z "$haveit"; then
15857 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15858 fi
15859 done
15860
15861
15862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15863$as_echo_n "checking for liblzma... " >&6; }
15864if test "${ac_cv_liblzma+set}" = set; then :
15865 $as_echo_n "(cached) " >&6
15866else
15867
15868 ac_save_LIBS="$LIBS"
15869 LIBS="$LIBS $LIBLZMA"
15870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15871/* end confdefs.h. */
15872#include "lzma.h"
15873int
15874main ()
15875{
15876lzma_index_iter iter;
15877 lzma_index_iter_init (&iter, 0);
15878 lzma_mf_is_supported (LZMA_MF_HC3);
15879 ;
15880 return 0;
15881}
15882_ACEOF
15883if ac_fn_c_try_link "$LINENO"; then :
15884 ac_cv_liblzma=yes
15885else
15886 ac_cv_liblzma=no
15887fi
15888rm -f core conftest.err conftest.$ac_objext \
15889 conftest$ac_exeext conftest.$ac_ext
15890 LIBS="$ac_save_LIBS"
15891
15892fi
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15894$as_echo "$ac_cv_liblzma" >&6; }
15895 if test "$ac_cv_liblzma" = yes; then
15896 HAVE_LIBLZMA=yes
15897
15898$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15899
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15901$as_echo_n "checking how to link with liblzma... " >&6; }
15902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15903$as_echo "$LIBLZMA" >&6; }
15904 else
15905 HAVE_LIBLZMA=no
15906 CPPFLAGS="$ac_save_CPPFLAGS"
15907 LIBLZMA=
15908 LTLIBLZMA=
15909 fi
15910
15911
15912
15913
15914
15915
15916 if test "$HAVE_LIBLZMA" != yes; then
15917 if test "$with_lzma" = yes; then
15918 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
15919 fi
15920 fi
15921 fi
15922fi
15923
3fc11d3e
JM
15924LIBGUI="../libgui/src/libgui.a"
15925GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
15926
15927
7a292a7a 15928
3fc11d3e
JM
15929WIN32LDAPP=
15930
15931
15932
d91670b9 15933case "${host}" in
686a5eed 15934*-*-cygwin* | *-*-mingw* )
d91670b9
CV
15935 configdir="win"
15936 ;;
15937*)
15938 configdir="unix"
15939 ;;
15940esac
3fc11d3e
JM
15941
15942GDBTKLIBS=
15943if test "${enable_gdbtk}" = "yes"; then
15944
d1c3b63a
KS
15945 # Gdbtk must have an absolute path to srcdir in order to run
15946 # properly when not installed.
15947 here=`pwd`
15948 cd ${srcdir}
15949 GDBTK_SRC_DIR=`pwd`
15950 cd $here
15951
bec39cab 15952
5062cc19
KS
15953 #
15954 # Ok, lets find the tcl configuration
15955 # First, look for one uninstalled.
15956 # the alternative search directory is invoked by --with-tcl
15957 #
3fc11d3e 15958
5062cc19
KS
15959 if test x"${no_tcl}" = x ; then
15960 # we reset no_tcl in case something fails here
15961 no_tcl=true
bec39cab 15962
81ecdfbb
RW
15963# Check whether --with-tcl was given.
15964if test "${with_tcl+set}" = set; then :
15965 withval=$with_tcl; with_tclconfig=${withval}
15966fi
15967
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
15969$as_echo_n "checking for Tcl configuration... " >&6; }
15970 if test "${ac_cv_c_tclconfig+set}" = set; then :
15971 $as_echo_n "(cached) " >&6
3fc11d3e 15972else
bec39cab 15973
3fc11d3e 15974
5062cc19
KS
15975 # First check to see if --with-tcl was specified.
15976 case "${host}" in
15977 *-*-cygwin*) platDir="win" ;;
15978 *) platDir="unix" ;;
15979 esac
15980 if test x"${with_tclconfig}" != x ; then
15981 if test -f "${with_tclconfig}/tclConfig.sh" ; then
15982 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
15983 else
81ecdfbb 15984 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
15985 fi
15986 fi
15987
15988 # then check for a private Tcl installation
15989 if test x"${ac_cv_c_tclconfig}" = x ; then
15990 for i in \
15991 ../tcl \
15992 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15993 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
15994 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
15995 ../../tcl \
15996 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
15997 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
15998 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
15999 ../../../tcl \
16000 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16001 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16002 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16003 if test -f "$i/$platDir/tclConfig.sh" ; then
16004 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16005 break
16006 fi
16007 done
16008 fi
16009
16010 # on Darwin, check in Framework installation locations
16011 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16012 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16013 `ls -d /Library/Frameworks 2>/dev/null` \
16014 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16015 `ls -d /System/Library/Frameworks 2>/dev/null` \
16016 ; do
16017 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16018 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16019 break
16020 fi
16021 done
16022 fi
16023
16024 # check in a few common install locations
16025 if test x"${ac_cv_c_tclconfig}" = x ; then
16026 for i in `ls -d ${libdir} 2>/dev/null` \
16027 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16028 `ls -d ${prefix}/lib 2>/dev/null` \
16029 `ls -d /usr/local/lib 2>/dev/null` \
16030 `ls -d /usr/contrib/lib 2>/dev/null` \
16031 `ls -d /usr/lib 2>/dev/null` \
16032 ; do
16033 if test -f "$i/tclConfig.sh" ; then
16034 ac_cv_c_tclconfig=`(cd $i; pwd)`
16035 break
16036 fi
16037 done
16038 fi
3fc11d3e 16039
5062cc19
KS
16040 # check in a few other private locations
16041 if test x"${ac_cv_c_tclconfig}" = x ; then
16042 for i in \
16043 ${srcdir}/../tcl \
16044 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16045 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16046 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16047 if test -f "$i/$platDir/tclConfig.sh" ; then
16048 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16049 break
16050 fi
16051 done
16052 fi
bec39cab 16053
3fc11d3e
JM
16054fi
16055
5062cc19
KS
16056
16057 if test x"${ac_cv_c_tclconfig}" = x ; then
16058 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16060$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16061 else
16062 no_tcl=
16063 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16065$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16066 fi
16067 fi
3fc11d3e 16068
bec39cab 16069
85541719
DE
16070 # If $no_tk is nonempty, then we can't do Tk, and there is no
16071 # point to doing Tcl.
bec39cab 16072
5062cc19
KS
16073 #
16074 # Ok, lets find the tk configuration
16075 # First, look for one uninstalled.
16076 # the alternative search directory is invoked by --with-tk
16077 #
3fc11d3e 16078
5062cc19
KS
16079 if test x"${no_tk}" = x ; then
16080 # we reset no_tk in case something fails here
16081 no_tk=true
bec39cab 16082
81ecdfbb
RW
16083# Check whether --with-tk was given.
16084if test "${with_tk+set}" = set; then :
16085 withval=$with_tk; with_tkconfig=${withval}
16086fi
16087
16088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16089$as_echo_n "checking for Tk configuration... " >&6; }
16090 if test "${ac_cv_c_tkconfig+set}" = set; then :
16091 $as_echo_n "(cached) " >&6
bec39cab 16092else
3fc11d3e
JM
16093
16094
5062cc19
KS
16095 # First check to see if --with-tkconfig was specified.
16096 if test x"${with_tkconfig}" != x ; then
16097 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16098 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16099 else
81ecdfbb 16100 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16101 fi
16102 fi
3fc11d3e 16103
5062cc19
KS
16104 # then check for a private Tk library
16105 case "${host}" in
16106 *-*-cygwin*) platDir="win" ;;
16107 *) platDir="unix" ;;
16108 esac
16109 if test x"${ac_cv_c_tkconfig}" = x ; then
16110 for i in \
16111 ../tk \
16112 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16113 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16114 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16115 ../../tk \
16116 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16117 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16118 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16119 ../../../tk \
16120 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16121 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16122 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16123 if test -f "$i/$platDir/tkConfig.sh" ; then
16124 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16125 break
16126 fi
16127 done
16128 fi
16129
16130 # on Darwin, check in Framework installation locations
16131 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16132 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16133 `ls -d /Library/Frameworks 2>/dev/null` \
16134 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16135 `ls -d /System/Library/Frameworks 2>/dev/null` \
16136 ; do
16137 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16138 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16139 break
16140 fi
16141 done
16142 fi
16143
16144 # check in a few common install locations
16145 if test x"${ac_cv_c_tkconfig}" = x ; then
16146 for i in `ls -d ${libdir} 2>/dev/null` \
16147 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16148 `ls -d ${prefix}/lib 2>/dev/null` \
16149 `ls -d /usr/local/lib 2>/dev/null` \
16150 `ls -d /usr/contrib/lib 2>/dev/null` \
16151 `ls -d /usr/lib 2>/dev/null` \
16152 ; do
16153 if test -f "$i/tkConfig.sh" ; then
16154 ac_cv_c_tkconfig=`(cd $i; pwd)`
16155 break
16156 fi
16157 done
16158 fi
16159 # check in a few other private locations
16160 if test x"${ac_cv_c_tkconfig}" = x ; then
16161 for i in \
16162 ${srcdir}/../tk \
16163 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16164 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16165 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16166 if test -f "$i/$platDir/tkConfig.sh" ; then
16167 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16168 break
16169 fi
16170 done
16171 fi
3fc11d3e 16172
3fc11d3e
JM
16173fi
16174
16175
5062cc19
KS
16176 if test x"${ac_cv_c_tkconfig}" = x ; then
16177 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16178 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16179$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16180 else
16181 no_tk=
16182 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16184$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16185 fi
3fc11d3e 16186 fi
dd2504ab 16187
dd2504ab 16188
85541719
DE
16189 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16190
81ecdfbb
RW
16191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16192$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16193
16194 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16196$as_echo "loading" >&6; }
85541719
DE
16197 . ${TCL_BIN_DIR}/tclConfig.sh
16198 else
81ecdfbb
RW
16199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16200$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16201 fi
16202
16203 # eval is required to do the TCL_DBGX substitution
16204 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16205 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16206
16207 # If the TCL_BIN_DIR is the build directory (not the install directory),
16208 # then set the common variable name to the value of the build variables.
16209 # For example, the variable TCL_LIB_SPEC will be set to the value
16210 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16211 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16212 # installed and uninstalled version of Tcl.
16213 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16214 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16215 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16216 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16217 elif test "`uname -s`" = "Darwin"; then
16218 # If Tcl was built as a framework, attempt to use the libraries
16219 # from the framework at the given location so that linking works
a68ffae9 16220 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16221 case ${TCL_DEFS} in
16222 *TCL_FRAMEWORK*)
16223 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16224 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16225 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16226 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16227 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16228 break
16229 fi
16230 done
16231 fi
16232 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16233 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16234 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16235 fi
16236 ;;
16237 esac
16238 fi
16239
16240 # eval is required to do the TCL_DBGX substitution
16241 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16242 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16243 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16244 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260 # Check for in-tree tcl
16261 here=`pwd`
16262 cd ${srcdir}/..
16263 topdir=`pwd`
16264 cd ${here}
16265
16266 intree="no"
16267 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16268 intree="yes"
16269 fi
16270
16271 # Find Tcl private headers
16272 if test x"${intree}" = xno; then
16273
81ecdfbb
RW
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16275$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16276 private_dir=""
16277 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16278 if test -f ${dir}/tclInt.h ; then
16279 private_dir=${dir}
16280 fi
16281
16282 if test x"${private_dir}" = x; then
81ecdfbb 16283 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16284 else
16285 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16287$as_echo "${private_dir}" >&6; }
85541719
DE
16288 fi
16289
16290 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16291 TCL_LIBRARY="${TCL_LIB_SPEC}"
16292 TCL_DEPS=""
16293 else
16294 # If building tcl in the same src tree, private headers
16295 # are not needed, but we need to be sure to use the right
16296 # headers library
16297 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16298 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16299 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16300 fi
16301
16302
16303
16304
16305
81ecdfbb
RW
16306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16307$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16308
5062cc19 16309 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16311$as_echo "loading" >&6; }
5062cc19 16312 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16313 else
81ecdfbb
RW
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16315$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16316 fi
bec39cab 16317
5062cc19
KS
16318 # eval is required to do the TK_DBGX substitution
16319 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16320 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16321
16322 # If the TK_BIN_DIR is the build directory (not the install directory),
16323 # then set the common variable name to the value of the build variables.
16324 # For example, the variable TK_LIB_SPEC will be set to the value
16325 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16326 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16327 # installed and uninstalled version of Tcl.
85541719 16328 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16329 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16330 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16331 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16332 elif test "`uname -s`" = "Darwin"; then
16333 # If Tk was built as a framework, attempt to use the libraries
16334 # from the framework at the given location so that linking works
a68ffae9 16335 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16336 case ${TK_DEFS} in
16337 *TK_FRAMEWORK*)
85541719 16338 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16339 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16340 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16341 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16342 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16343 break
16344 fi
16345 done
16346 fi
85541719 16347 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16348 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16349 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16350 fi
16351 ;;
16352 esac
3fc11d3e
JM
16353 fi
16354
5062cc19
KS
16355 # eval is required to do the TK_DBGX substitution
16356 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16357 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16358 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16359 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16360
3fc11d3e
JM
16361
16362
bec39cab
AC
16363
16364
16365
16366
16367
16368
16369
3fc11d3e 16370
3fc11d3e 16371
bec39cab 16372
bec39cab 16373
85541719
DE
16374 # Check for in-tree Tk
16375 intree="no"
16376 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16377 intree="yes"
16378 fi
3fc11d3e 16379
85541719
DE
16380 # Find Tk private headers
16381 if test x"${intree}" = xno; then
3fc11d3e 16382
81ecdfbb
RW
16383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16384$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16385 private_dir=""
16386 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16387 if test -f ${dir}/tkInt.h; then
16388 private_dir=${dir}
3fc11d3e 16389 fi
bec39cab 16390
5062cc19 16391 if test x"${private_dir}" = x; then
81ecdfbb 16392 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16393 else
5062cc19 16394 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16396$as_echo "${private_dir}" >&6; }
3fc11d3e 16397 fi
3fc11d3e 16398
85541719
DE
16399 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16400 TK_LIBRARY=${TK_LIB_SPEC}
16401 TK_DEPS=""
16402 else
16403 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16404 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16405 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16406 fi
3fc11d3e
JM
16407
16408
3fc11d3e
JM
16409
16410
3fc11d3e 16411
85541719 16412 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16413
85541719
DE
16414 # Include some libraries that Tcl and Tk want.
16415 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16416 # Yes, the ordering seems wrong here. But it isn't.
16417 # TK_LIBS is the list of libraries that need to be linked
16418 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16419 # were in LIBS then any link tests after this point would
16420 # try to include things like `$(LIBGUI)', which wouldn't work.
16421 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16422
85541719
DE
16423 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16424 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16425 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16426 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16427 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16428 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16429 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16430
85541719
DE
16431 if test x$gdb_cv_os_cygwin = xyes; then
16432 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16433 WIN32LDAPP="-Wl,--subsystem,console"
16434 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16435 fi
ffc6a242 16436
81ecdfbb 16437 subdirs="$subdirs gdbtk"
3ace7edb 16438
85541719 16439 fi
3fc11d3e
JM
16440fi
16441
16442
16443
16444
16445
16446
16447
16448
81ecdfbb
RW
16449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16450$as_echo_n "checking for X... " >&6; }
bec39cab 16451
c906108c 16452
81ecdfbb
RW
16453# Check whether --with-x was given.
16454if test "${with_x+set}" = set; then :
16455 withval=$with_x;
16456fi
c906108c
SS
16457
16458# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16459if test "x$with_x" = xno; then
16460 # The user explicitly disabled X.
16461 have_x=disabled
16462else
81ecdfbb
RW
16463 case $x_includes,$x_libraries in #(
16464 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16465 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16466 $as_echo_n "(cached) " >&6
c906108c
SS
16467else
16468 # One or both of the vars are not set, and there is no cached value.
bec39cab 16469ac_x_includes=no ac_x_libraries=no
81ecdfbb 16470rm -f -r conftest.dir
bec39cab
AC
16471if mkdir conftest.dir; then
16472 cd conftest.dir
bec39cab 16473 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16474incroot:
16475 @echo incroot='${INCROOT}'
16476usrlibdir:
16477 @echo usrlibdir='${USRLIBDIR}'
16478libdir:
16479 @echo libdir='${LIBDIR}'
16480_ACEOF
16481 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 16482 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
16483 for ac_var in incroot usrlibdir libdir; do
16484 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16485 done
c906108c 16486 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16487 for ac_extension in a so sl dylib la dll; do
16488 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16489 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16490 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16491 fi
16492 done
16493 # Screen out bogus values from the imake configuration. They are
16494 # bogus both because they are the default anyway, and because
16495 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16496 case $ac_im_incroot in
81ecdfbb 16497 /usr/include) ac_x_includes= ;;
bec39cab 16498 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16499 esac
bec39cab 16500 case $ac_im_usrlibdir in
81ecdfbb 16501 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16502 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16503 esac
16504 fi
16505 cd ..
81ecdfbb 16506 rm -f -r conftest.dir
c906108c
SS
16507fi
16508
bec39cab
AC
16509# Standard set of common directories for X headers.
16510# Check X11 before X11Rn because it is often a symlink to the current release.
16511ac_x_header_dirs='
16512/usr/X11/include
81ecdfbb 16513/usr/X11R7/include
bec39cab
AC
16514/usr/X11R6/include
16515/usr/X11R5/include
16516/usr/X11R4/include
16517
16518/usr/include/X11
81ecdfbb 16519/usr/include/X11R7
bec39cab
AC
16520/usr/include/X11R6
16521/usr/include/X11R5
16522/usr/include/X11R4
16523
16524/usr/local/X11/include
81ecdfbb 16525/usr/local/X11R7/include
bec39cab
AC
16526/usr/local/X11R6/include
16527/usr/local/X11R5/include
16528/usr/local/X11R4/include
16529
16530/usr/local/include/X11
81ecdfbb 16531/usr/local/include/X11R7
bec39cab
AC
16532/usr/local/include/X11R6
16533/usr/local/include/X11R5
16534/usr/local/include/X11R4
16535
16536/usr/X386/include
16537/usr/x386/include
16538/usr/XFree86/include/X11
16539
16540/usr/include
16541/usr/local/include
16542/usr/unsupported/include
16543/usr/athena/include
16544/usr/local/x11r5/include
16545/usr/lpp/Xamples/include
16546
16547/usr/openwin/include
16548/usr/openwin/share/include'
16549
16550if test "$ac_x_includes" = no; then
81ecdfbb 16551 # Guess where to find include files, by looking for Xlib.h.
c906108c 16552 # First, try using that file with no special directory specified.
81ecdfbb 16553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16554/* end confdefs.h. */
81ecdfbb 16555#include <X11/Xlib.h>
bec39cab 16556_ACEOF
81ecdfbb 16557if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16558 # We can compile using X headers with no special include directory.
16559ac_x_includes=
16560else
bec39cab 16561 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16562 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16563 ac_x_includes=$ac_dir
16564 break
16565 fi
16566done
c906108c 16567fi
bec39cab
AC
16568rm -f conftest.err conftest.$ac_ext
16569fi # $ac_x_includes = no
c906108c 16570
bec39cab 16571if test "$ac_x_libraries" = no; then
c906108c 16572 # Check for the libraries.
c906108c
SS
16573 # See if we find them without any special options.
16574 # Don't add to $LIBS permanently.
bec39cab 16575 ac_save_LIBS=$LIBS
81ecdfbb
RW
16576 LIBS="-lX11 $LIBS"
16577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16578/* end confdefs.h. */
81ecdfbb 16579#include <X11/Xlib.h>
bec39cab
AC
16580int
16581main ()
16582{
81ecdfbb 16583XrmInitialize ()
bec39cab
AC
16584 ;
16585 return 0;
16586}
16587_ACEOF
81ecdfbb 16588if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16589 LIBS=$ac_save_LIBS
c906108c
SS
16590# We can link X programs with no special library path.
16591ac_x_libraries=
16592else
81ecdfbb
RW
16593 LIBS=$ac_save_LIBS
16594for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16595do
bec39cab 16596 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16597 for ac_extension in a so sl dylib la dll; do
16598 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16599 ac_x_libraries=$ac_dir
16600 break 2
16601 fi
16602 done
16603done
16604fi
81ecdfbb
RW
16605rm -f core conftest.err conftest.$ac_objext \
16606 conftest$ac_exeext conftest.$ac_ext
bec39cab 16607fi # $ac_x_libraries = no
c906108c 16608
81ecdfbb
RW
16609case $ac_x_includes,$ac_x_libraries in #(
16610 no,* | *,no | *\'*)
16611 # Didn't find X, or a directory has "'" in its name.
16612 ac_cv_have_x="have_x=no";; #(
16613 *)
16614 # Record where we found X for the cache.
16615 ac_cv_have_x="have_x=yes\
16616 ac_x_includes='$ac_x_includes'\
16617 ac_x_libraries='$ac_x_libraries'"
16618esac
c906108c 16619fi
81ecdfbb
RW
16620;; #(
16621 *) have_x=yes;;
16622 esac
c906108c
SS
16623 eval "$ac_cv_have_x"
16624fi # $with_x != no
16625
16626if test "$have_x" != yes; then
81ecdfbb
RW
16627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16628$as_echo "$have_x" >&6; }
c906108c
SS
16629 no_x=yes
16630else
16631 # If each of the values was on the command line, it overrides each guess.
16632 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16633 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16634 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16635 ac_cv_have_x="have_x=yes\
16636 ac_x_includes='$x_includes'\
16637 ac_x_libraries='$x_libraries'"
16638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16639$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16640fi
16641
16642
bec39cab 16643# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16644# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16645# This code just checks for a few cases where we'd like to ignore those
16646# definitions, even when they're present in the '.mt' file. These cases
16647# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16648# not part of the source tree.
7a292a7a 16649#
81ecdfbb
RW
16650# Check whether --enable-sim was given.
16651if test "${enable_sim+set}" = set; then :
16652 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16653 echo "enableval = ${enableval}";
16654 case "${enableval}" in
16655 yes) ignore_sim=false ;;
16656 no) ignore_sim=true ;;
16657 *) ignore_sim=false ;;
16658 esac
16659else
16660 ignore_sim=false
81ecdfbb
RW
16661fi
16662
7a292a7a
SS
16663
16664if test ! -d "${srcdir}/../sim"; then
16665 ignore_sim=true
16666fi
16667
9b624dbe
UW
16668SIM=
16669SIM_OBS=
16670if test "${ignore_sim}" = "false"; then
16671 if test x"${gdb_sim}" != x ; then
16672 SIM="${gdb_sim}"
16673 SIM_OBS="remote-sim.o"
60ca704f 16674
81ecdfbb 16675$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16676
976102cd
PA
16677
16678 # Some tdep code should only be compiled in when the ppc sim is
16679 # built. PR sim/13418.
16680 case $target in
16681 powerpc*-*-*)
16682
16683$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16684
16685 ;;
16686 esac
9b624dbe 16687 fi
7a292a7a
SS
16688fi
16689
16690
16691
c906108c
SS
16692
16693
16694
16695
16696
16697
dfcd3bfb 16698
e56ac5c3
AC
16699
16700
b3a90332
AC
16701
16702
c35f4ffc 16703# List of host floatformats.
bec39cab
AC
16704
16705cat >>confdefs.h <<_ACEOF
c35f4ffc 16706#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16707_ACEOF
c35f4ffc 16708
bec39cab
AC
16709
16710cat >>confdefs.h <<_ACEOF
c35f4ffc 16711#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16712_ACEOF
16713
c35f4ffc 16714
bec39cab 16715cat >>confdefs.h <<_ACEOF
c35f4ffc 16716#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16717_ACEOF
c35f4ffc
AC
16718
16719
c906108c
SS
16720# target_subdir is used by the testsuite to find the target libraries.
16721target_subdir=
16722if test "${host}" != "${target}"; then
16723 target_subdir="${target_alias}/"
16724fi
16725
16726
16727frags=
771b4502 16728if test "${gdb_native}" = "yes"; then
0dad8a66
MK
16729 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16730 if test ! -f ${host_makefile_frag}; then
81ecdfbb 16731 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
16732 fi
16733 frags="$frags $host_makefile_frag"
16734else
16735 host_makefile_frag=/dev/null
c906108c 16736fi
c906108c 16737
c906108c
SS
16738
16739
16740
771b4502 16741if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
16742# We pick this up from the host configuration file (.mh) because we
16743# do not have a native configuration Makefile fragment.
c906108c
SS
16744nativefile=`sed -n '
16745s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
16746' ${host_makefile_frag}`
c906108c
SS
16747fi
16748
16749
b00a8037 16750if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16751
16752cat >>confdefs.h <<_ACEOF
b00a8037 16753#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16754_ACEOF
b00a8037
DJ
16755
16756fi
16757
8dcde887 16758# Enable multi-ice-gdb-server.
81ecdfbb
RW
16759# Check whether --enable-multi-ice was given.
16760if test "${enable_multi_ice+set}" = set; then :
16761 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16762 yes | no)
16763 ;;
81ecdfbb 16764 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16765 esac
81ecdfbb 16766fi
b4e70030 16767
81ecdfbb
RW
16768if test "x$enable_multi_ice" = xyes; then
16769 subdirs="$subdirs multi-ice"
3ace7edb 16770
a85f51e7
DJ
16771fi
16772
496c0e1b
JB
16773# Check whether --enable-gdbserver was given.
16774if test "${enable_gdbserver+set}" = set; then :
16775 enableval=$enable_gdbserver; case "${enableval}" in
16776 yes| no|auto) ;;
16777 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16778esac
16779else
16780 enable_gdbserver=auto
16781fi
16782
16783
16784# We only build gdbserver automatically in a native configuration, and
16785# only if the user did not explicitly disable its build.
16786if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16788$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16789 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16791$as_echo "yes" >&6; }
16792 subdirs="$subdirs gdbserver"
3ace7edb 16793
496c0e1b 16794 gdbserver_build_enabled=yes
8dcde887 16795 else
81ecdfbb
RW
16796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16797$as_echo "no" >&6; }
8dcde887
MK
16798 fi
16799fi
16800
496c0e1b
JB
16801# If the user explicitly request the gdbserver to be built, verify that
16802# we were in fact able to enable it.
16803if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16804 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16805fi
16806
393fd4c3
YQ
16807# Check for babeltrace and babeltrace-ctf
16808
16809# Check whether --with-babeltrace was given.
16810if test "${with_babeltrace+set}" = set; then :
16811 withval=$with_babeltrace;
16812else
16813 with_babeltrace=auto
16814fi
16815
16816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16817$as_echo_n "checking whether to use babeltrace... " >&6; }
16818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16819$as_echo "$with_babeltrace" >&6; }
16820
16821if test "x$with_babeltrace" = "xno"; then
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16823$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16824else
16825 # Append -Werror to CFLAGS so that configure can catch the warning
16826 # "assignment from incompatible pointer type", which is related to
16827 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16828 # in GDB, while babeltrace 1.0.3 is broken.
16829 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16830 # safe to save and restore CFLAGS here.
16831 saved_CFLAGS=$CFLAGS
16832 CFLAGS="$CFLAGS -Werror"
16833
16834
16835
16836
16837
16838
16839
16840
16841 use_additional=yes
16842
16843 acl_save_prefix="$prefix"
16844 prefix="$acl_final_prefix"
16845 acl_save_exec_prefix="$exec_prefix"
16846 exec_prefix="$acl_final_exec_prefix"
16847
16848 eval additional_includedir=\"$includedir\"
16849 eval additional_libdir=\"$libdir\"
16850
16851 exec_prefix="$acl_save_exec_prefix"
16852 prefix="$acl_save_prefix"
16853
16854
16855# Check whether --with-libbabeltrace-prefix was given.
16856if test "${with_libbabeltrace_prefix+set}" = set; then :
16857 withval=$with_libbabeltrace_prefix;
16858 if test "X$withval" = "Xno"; then
16859 use_additional=no
16860 else
16861 if test "X$withval" = "X"; then
16862
16863 acl_save_prefix="$prefix"
16864 prefix="$acl_final_prefix"
16865 acl_save_exec_prefix="$exec_prefix"
16866 exec_prefix="$acl_final_exec_prefix"
16867
16868 eval additional_includedir=\"$includedir\"
16869 eval additional_libdir=\"$libdir\"
16870
16871 exec_prefix="$acl_save_exec_prefix"
16872 prefix="$acl_save_prefix"
16873
16874 else
16875 additional_includedir="$withval/include"
16876 additional_libdir="$withval/lib"
16877 fi
16878 fi
16879
16880fi
16881
16882 LIBBABELTRACE=
16883 LTLIBBABELTRACE=
16884 INCBABELTRACE=
16885 rpathdirs=
16886 ltrpathdirs=
16887 names_already_handled=
16888 names_next_round='babeltrace babeltrace-ctf'
16889 while test -n "$names_next_round"; do
16890 names_this_round="$names_next_round"
16891 names_next_round=
16892 for name in $names_this_round; do
16893 already_handled=
16894 for n in $names_already_handled; do
16895 if test "$n" = "$name"; then
16896 already_handled=yes
16897 break
16898 fi
16899 done
16900 if test -z "$already_handled"; then
16901 names_already_handled="$names_already_handled $name"
16902 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16903 eval value=\"\$HAVE_LIB$uppername\"
16904 if test -n "$value"; then
16905 if test "$value" = yes; then
16906 eval value=\"\$LIB$uppername\"
16907 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
16908 eval value=\"\$LTLIB$uppername\"
16909 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
16910 else
16911 :
16912 fi
16913 else
16914 found_dir=
16915 found_la=
16916 found_so=
16917 found_a=
16918 if test $use_additional = yes; then
16919 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16920 found_dir="$additional_libdir"
16921 found_so="$additional_libdir/lib$name.$shlibext"
16922 if test -f "$additional_libdir/lib$name.la"; then
16923 found_la="$additional_libdir/lib$name.la"
16924 fi
16925 else
16926 if test -f "$additional_libdir/lib$name.$libext"; then
16927 found_dir="$additional_libdir"
16928 found_a="$additional_libdir/lib$name.$libext"
16929 if test -f "$additional_libdir/lib$name.la"; then
16930 found_la="$additional_libdir/lib$name.la"
16931 fi
16932 fi
16933 fi
16934 fi
16935 if test "X$found_dir" = "X"; then
16936 for x in $LDFLAGS $LTLIBBABELTRACE; do
16937
16938 acl_save_prefix="$prefix"
16939 prefix="$acl_final_prefix"
16940 acl_save_exec_prefix="$exec_prefix"
16941 exec_prefix="$acl_final_exec_prefix"
16942 eval x=\"$x\"
16943 exec_prefix="$acl_save_exec_prefix"
16944 prefix="$acl_save_prefix"
16945
16946 case "$x" in
16947 -L*)
16948 dir=`echo "X$x" | sed -e 's/^X-L//'`
16949 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16950 found_dir="$dir"
16951 found_so="$dir/lib$name.$shlibext"
16952 if test -f "$dir/lib$name.la"; then
16953 found_la="$dir/lib$name.la"
16954 fi
16955 else
16956 if test -f "$dir/lib$name.$libext"; then
16957 found_dir="$dir"
16958 found_a="$dir/lib$name.$libext"
16959 if test -f "$dir/lib$name.la"; then
16960 found_la="$dir/lib$name.la"
16961 fi
16962 fi
16963 fi
16964 ;;
16965 esac
16966 if test "X$found_dir" != "X"; then
16967 break
16968 fi
16969 done
16970 fi
16971 if test "X$found_dir" != "X"; then
16972 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
16973 if test "X$found_so" != "X"; then
16974 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16975 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16976 else
16977 haveit=
16978 for x in $ltrpathdirs; do
16979 if test "X$x" = "X$found_dir"; then
16980 haveit=yes
16981 break
16982 fi
16983 done
16984 if test -z "$haveit"; then
16985 ltrpathdirs="$ltrpathdirs $found_dir"
16986 fi
16987 if test "$hardcode_direct" = yes; then
16988 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16989 else
16990 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16991 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
16992 haveit=
16993 for x in $rpathdirs; do
16994 if test "X$x" = "X$found_dir"; then
16995 haveit=yes
16996 break
16997 fi
16998 done
16999 if test -z "$haveit"; then
17000 rpathdirs="$rpathdirs $found_dir"
17001 fi
17002 else
17003 haveit=
17004 for x in $LDFLAGS $LIBBABELTRACE; do
17005
17006 acl_save_prefix="$prefix"
17007 prefix="$acl_final_prefix"
17008 acl_save_exec_prefix="$exec_prefix"
17009 exec_prefix="$acl_final_exec_prefix"
17010 eval x=\"$x\"
17011 exec_prefix="$acl_save_exec_prefix"
17012 prefix="$acl_save_prefix"
17013
17014 if test "X$x" = "X-L$found_dir"; then
17015 haveit=yes
17016 break
17017 fi
17018 done
17019 if test -z "$haveit"; then
17020 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17021 fi
17022 if test "$hardcode_minus_L" != no; then
17023 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17024 else
17025 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17026 fi
17027 fi
17028 fi
17029 fi
17030 else
17031 if test "X$found_a" != "X"; then
17032 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17033 else
17034 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17035 fi
17036 fi
17037 additional_includedir=
17038 case "$found_dir" in
17039 */lib | */lib/)
17040 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17041 additional_includedir="$basedir/include"
17042 ;;
17043 esac
17044 if test "X$additional_includedir" != "X"; then
17045 if test "X$additional_includedir" != "X/usr/include"; then
17046 haveit=
17047 if test "X$additional_includedir" = "X/usr/local/include"; then
17048 if test -n "$GCC"; then
17049 case $host_os in
17050 linux*) haveit=yes;;
17051 esac
17052 fi
17053 fi
17054 if test -z "$haveit"; then
17055 for x in $CPPFLAGS $INCBABELTRACE; do
17056
17057 acl_save_prefix="$prefix"
17058 prefix="$acl_final_prefix"
17059 acl_save_exec_prefix="$exec_prefix"
17060 exec_prefix="$acl_final_exec_prefix"
17061 eval x=\"$x\"
17062 exec_prefix="$acl_save_exec_prefix"
17063 prefix="$acl_save_prefix"
17064
17065 if test "X$x" = "X-I$additional_includedir"; then
17066 haveit=yes
17067 break
17068 fi
17069 done
17070 if test -z "$haveit"; then
17071 if test -d "$additional_includedir"; then
17072 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17073 fi
17074 fi
17075 fi
17076 fi
17077 fi
17078 if test -n "$found_la"; then
17079 save_libdir="$libdir"
17080 case "$found_la" in
17081 */* | *\\*) . "$found_la" ;;
17082 *) . "./$found_la" ;;
17083 esac
17084 libdir="$save_libdir"
17085 for dep in $dependency_libs; do
17086 case "$dep" in
17087 -L*)
17088 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17089 if test "X$additional_libdir" != "X/usr/lib"; then
17090 haveit=
17091 if test "X$additional_libdir" = "X/usr/local/lib"; then
17092 if test -n "$GCC"; then
17093 case $host_os in
17094 linux*) haveit=yes;;
17095 esac
17096 fi
17097 fi
17098 if test -z "$haveit"; then
17099 haveit=
17100 for x in $LDFLAGS $LIBBABELTRACE; do
17101
17102 acl_save_prefix="$prefix"
17103 prefix="$acl_final_prefix"
17104 acl_save_exec_prefix="$exec_prefix"
17105 exec_prefix="$acl_final_exec_prefix"
17106 eval x=\"$x\"
17107 exec_prefix="$acl_save_exec_prefix"
17108 prefix="$acl_save_prefix"
17109
17110 if test "X$x" = "X-L$additional_libdir"; then
17111 haveit=yes
17112 break
17113 fi
17114 done
17115 if test -z "$haveit"; then
17116 if test -d "$additional_libdir"; then
17117 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17118 fi
17119 fi
17120 haveit=
17121 for x in $LDFLAGS $LTLIBBABELTRACE; do
17122
17123 acl_save_prefix="$prefix"
17124 prefix="$acl_final_prefix"
17125 acl_save_exec_prefix="$exec_prefix"
17126 exec_prefix="$acl_final_exec_prefix"
17127 eval x=\"$x\"
17128 exec_prefix="$acl_save_exec_prefix"
17129 prefix="$acl_save_prefix"
17130
17131 if test "X$x" = "X-L$additional_libdir"; then
17132 haveit=yes
17133 break
17134 fi
17135 done
17136 if test -z "$haveit"; then
17137 if test -d "$additional_libdir"; then
17138 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17139 fi
17140 fi
17141 fi
17142 fi
17143 ;;
17144 -R*)
17145 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17146 if test "$enable_rpath" != no; then
17147 haveit=
17148 for x in $rpathdirs; do
17149 if test "X$x" = "X$dir"; then
17150 haveit=yes
17151 break
17152 fi
17153 done
17154 if test -z "$haveit"; then
17155 rpathdirs="$rpathdirs $dir"
17156 fi
17157 haveit=
17158 for x in $ltrpathdirs; do
17159 if test "X$x" = "X$dir"; then
17160 haveit=yes
17161 break
17162 fi
17163 done
17164 if test -z "$haveit"; then
17165 ltrpathdirs="$ltrpathdirs $dir"
17166 fi
17167 fi
17168 ;;
17169 -l*)
17170 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17171 ;;
17172 *.la)
17173 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17174 ;;
17175 *)
17176 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17177 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17178 ;;
17179 esac
17180 done
17181 fi
17182 else
17183 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17184 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17185 fi
17186 fi
17187 fi
17188 done
17189 done
17190 if test "X$rpathdirs" != "X"; then
17191 if test -n "$hardcode_libdir_separator"; then
17192 alldirs=
17193 for found_dir in $rpathdirs; do
17194 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17195 done
17196 acl_save_libdir="$libdir"
17197 libdir="$alldirs"
17198 eval flag=\"$hardcode_libdir_flag_spec\"
17199 libdir="$acl_save_libdir"
17200 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17201 else
17202 for found_dir in $rpathdirs; do
17203 acl_save_libdir="$libdir"
17204 libdir="$found_dir"
17205 eval flag=\"$hardcode_libdir_flag_spec\"
17206 libdir="$acl_save_libdir"
17207 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17208 done
17209 fi
17210 fi
17211 if test "X$ltrpathdirs" != "X"; then
17212 for found_dir in $ltrpathdirs; do
17213 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17214 done
17215 fi
17216
17217
17218 ac_save_CPPFLAGS="$CPPFLAGS"
17219
17220 for element in $INCBABELTRACE; do
17221 haveit=
17222 for x in $CPPFLAGS; do
17223
17224 acl_save_prefix="$prefix"
17225 prefix="$acl_final_prefix"
17226 acl_save_exec_prefix="$exec_prefix"
17227 exec_prefix="$acl_final_exec_prefix"
17228 eval x=\"$x\"
17229 exec_prefix="$acl_save_exec_prefix"
17230 prefix="$acl_save_prefix"
17231
17232 if test "X$x" = "X$element"; then
17233 haveit=yes
17234 break
17235 fi
17236 done
17237 if test -z "$haveit"; then
17238 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17239 fi
17240 done
17241
17242
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17244$as_echo_n "checking for libbabeltrace... " >&6; }
17245if test "${ac_cv_libbabeltrace+set}" = set; then :
17246 $as_echo_n "(cached) " >&6
17247else
17248
17249 ac_save_LIBS="$LIBS"
17250 LIBS="$LIBS $LIBBABELTRACE"
17251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17252/* end confdefs.h. */
17253#include <babeltrace/babeltrace.h>
17254 #include <babeltrace/ctf/events.h>
17255 #include <babeltrace/ctf/iterator.h>
17256int
17257main ()
17258{
17259struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17260 struct bt_ctf_event *event = NULL;
17261 const struct bt_definition *scope;
17262
13cdc2af 17263 pos->type = BT_SEEK_BEGIN;
65c749e7 17264 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17265 scope = bt_ctf_get_top_level_scope (event,
17266 BT_STREAM_EVENT_HEADER);
17267 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17268
17269 ;
17270 return 0;
17271}
17272_ACEOF
17273if ac_fn_c_try_link "$LINENO"; then :
17274 ac_cv_libbabeltrace=yes
17275else
17276 ac_cv_libbabeltrace=no
17277fi
17278rm -f core conftest.err conftest.$ac_objext \
17279 conftest$ac_exeext conftest.$ac_ext
17280 LIBS="$ac_save_LIBS"
17281
17282fi
17283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17284$as_echo "$ac_cv_libbabeltrace" >&6; }
17285 if test "$ac_cv_libbabeltrace" = yes; then
17286 HAVE_LIBBABELTRACE=yes
17287
17288$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17289
17290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17291$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17293$as_echo "$LIBBABELTRACE" >&6; }
17294 else
17295 HAVE_LIBBABELTRACE=no
17296 CPPFLAGS="$ac_save_CPPFLAGS"
17297 LIBBABELTRACE=
17298 LTLIBBABELTRACE=
17299 fi
17300
17301
17302
17303
17304
17305
17306 CFLAGS=$saved_CFLAGS
17307
17308 if test "$HAVE_LIBBABELTRACE" != yes; then
17309 if test "$with_babeltrace" = yes; then
17310 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17311 else
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17313$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17314 fi
17315 fi
17316fi
17317
db985757 17318# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 17319# to an empty version.
c906108c
SS
17320
17321files=
17322links=
5a2402b8 17323
c906108c
SS
17324rm -f nm.h
17325if test "${nativefile}" != ""; then
0f475e27
AC
17326 case "${nativefile}" in
17327 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17328 * ) GDB_NM_FILE="${nativefile}"
17329 esac
5a2402b8
AC
17330 files="${files} ${GDB_NM_FILE}"
17331 links="${links} nm.h"
60ca704f
SE
17332
17333cat >>confdefs.h <<_ACEOF
b78960be 17334#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17335_ACEOF
5a2402b8 17336
c906108c 17337fi
5a2402b8
AC
17338
17339
e3487908
GKB
17340for ac_prog in xsltproc
17341do
17342 # Extract the first word of "$ac_prog", so it can be a program name with args.
17343set dummy $ac_prog; ac_word=$2
17344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17345$as_echo_n "checking for $ac_word... " >&6; }
17346if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17347 $as_echo_n "(cached) " >&6
17348else
17349 case $XSLTPROC in
17350 [\\/]* | ?:[\\/]*)
17351 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17352 ;;
17353 *)
17354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17355for as_dir in $PATH
17356do
17357 IFS=$as_save_IFS
17358 test -z "$as_dir" && as_dir=.
17359 for ac_exec_ext in '' $ac_executable_extensions; do
17360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17361 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17363 break 2
17364 fi
17365done
17366 done
17367IFS=$as_save_IFS
17368
17369 ;;
17370esac
17371fi
17372XSLTPROC=$ac_cv_path_XSLTPROC
17373if test -n "$XSLTPROC"; then
17374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17375$as_echo "$XSLTPROC" >&6; }
17376else
17377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17378$as_echo "no" >&6; }
17379fi
17380
17381
17382 test -n "$XSLTPROC" && break
17383done
17384test -n "$XSLTPROC" || XSLTPROC="missing"
17385
17386if test "x$USE_MAINTAINER_MODE" = xyes; then
17387 if test "${XSLTPROC}" = missing; then
17388 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
17389 fi
17390fi
17391
17392
bec39cab
AC
17393ac_sources="$files"
17394ac_dests="$links"
17395while test -n "$ac_sources"; do
17396 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17397 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17398 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17399done
81ecdfbb 17400ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17401
17402
c906108c
SS
17403
17404
c906108c 17405
81ecdfbb 17406$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17407
bec39cab 17408
dcd1f979
TT
17409if $development; then
17410
17411$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17412
07e253aa
PA
17413 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS)"
17414 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS)"
dcd1f979
TT
17415fi
17416
b292c783 17417
f6a88844
JM
17418 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17419 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17420 if test "x$GDB_TRANSFORM_NAME" = x; then
17421 GDB_TRANSFORM_NAME=gdb
17422 fi
17423
17424
17425
17426 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17427 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17428 if test "x$GCORE_TRANSFORM_NAME" = x; then
17429 GCORE_TRANSFORM_NAME=gcore
17430 fi
17431
b292c783
JK
17432
17433ac_config_files="$ac_config_files gcore"
17434
c971b7fa 17435ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 17436
89a34d1b 17437
bec39cab
AC
17438cat >confcache <<\_ACEOF
17439# This file is a shell script that caches the results of configure
17440# tests run on this system so they can be shared between configure
17441# scripts and configure runs, see configure's option --config-cache.
17442# It is not useful on other systems. If it contains results you don't
17443# want to keep, you may remove or edit it.
17444#
17445# config.status only pays attention to the cache file if you give it
17446# the --recheck option to rerun configure.
17447#
17448# `ac_cv_env_foo' variables (set or unset) will be overridden when
17449# loading this file, other *unset* `ac_cv_foo' will be assigned the
17450# following values.
17451
17452_ACEOF
17453
17454# The following way of writing the cache mishandles newlines in values,
17455# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17456# So, we kill variables containing newlines.
bec39cab
AC
17457# Ultrix sh set writes to stderr and can't be redirected directly,
17458# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17459(
17460 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17461 eval ac_val=\$$ac_var
17462 case $ac_val in #(
17463 *${as_nl}*)
17464 case $ac_var in #(
17465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17467 esac
17468 case $ac_var in #(
17469 _ | IFS | as_nl) ;; #(
17470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17471 *) { eval $ac_var=; unset $ac_var;} ;;
17472 esac ;;
17473 esac
17474 done
17475
bec39cab 17476 (set) 2>&1 |
81ecdfbb
RW
17477 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17478 *${as_nl}ac_space=\ *)
17479 # `set' does not quote correctly, so add quotes: double-quote
17480 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17481 sed -n \
17482 "s/'/'\\\\''/g;
17483 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17484 ;; #(
bec39cab
AC
17485 *)
17486 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17487 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17488 ;;
81ecdfbb
RW
17489 esac |
17490 sort
17491) |
bec39cab 17492 sed '
81ecdfbb 17493 /^ac_cv_env_/b end
bec39cab 17494 t clear
81ecdfbb 17495 :clear
bec39cab
AC
17496 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17497 t end
81ecdfbb
RW
17498 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17499 :end' >>confcache
17500if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17501 if test -w "$cache_file"; then
17502 test "x$cache_file" != "x/dev/null" &&
17503 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17504$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
17505 cat confcache >$cache_file
17506 else
81ecdfbb
RW
17507 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17508$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17509 fi
17510fi
17511rm -f confcache
17512
17513test "x$prefix" = xNONE && prefix=$ac_default_prefix
17514# Let make expand exec_prefix.
17515test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17516
bec39cab
AC
17517DEFS=-DHAVE_CONFIG_H
17518
17519ac_libobjs=
17520ac_ltlibobjs=
17521for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17522 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17523 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17524 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17525 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17526 # will be set to the directory where LIBOBJS objects are built.
17527 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17528 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17529done
17530LIBOBJS=$ac_libobjs
17531
17532LTLIBOBJS=$ac_ltlibobjs
17533
17534
85981d60 17535if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
17536 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17537Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17538fi
4df42755
DE
17539if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17540 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17541Usually this means the macro was only invoked conditionally." "$LINENO" 5
17542fi
17543if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17544 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17545Usually this means the macro was only invoked conditionally." "$LINENO" 5
17546fi
81ecdfbb
RW
17547
17548
bec39cab 17549: ${CONFIG_STATUS=./config.status}
81ecdfbb 17550ac_write_fail=0
bec39cab
AC
17551ac_clean_files_save=$ac_clean_files
17552ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17553{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17554$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17555as_write_fail=0
17556cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17557#! $SHELL
17558# Generated by $as_me.
17559# Run this file to recreate the current configuration.
17560# Compiler output produced by configure, useful for debugging
17561# configure, is in config.log if it exists.
17562
17563debug=false
17564ac_cs_recheck=false
17565ac_cs_silent=false
bec39cab 17566
81ecdfbb
RW
17567SHELL=\${CONFIG_SHELL-$SHELL}
17568export SHELL
17569_ASEOF
17570cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17571## -------------------- ##
17572## M4sh Initialization. ##
17573## -------------------- ##
17574
17575# Be more Bourne compatible
17576DUALCASE=1; export DUALCASE # for MKS sh
17577if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17578 emulate sh
17579 NULLCMD=:
81ecdfbb 17580 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17581 # is contrary to our usage. Disable this feature.
17582 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17583 setopt NO_GLOB_SUBST
17584else
17585 case `(set -o) 2>/dev/null` in #(
17586 *posix*) :
17587 set -o posix ;; #(
17588 *) :
17589 ;;
17590esac
bec39cab 17591fi
bec39cab 17592
81ecdfbb
RW
17593
17594as_nl='
17595'
17596export as_nl
17597# Printing a long string crashes Solaris 7 /usr/bin/printf.
17598as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17599as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17600as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17601# Prefer a ksh shell builtin over an external printf program on Solaris,
17602# but without wasting forks for bash or zsh.
17603if test -z "$BASH_VERSION$ZSH_VERSION" \
17604 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17605 as_echo='print -r --'
17606 as_echo_n='print -rn --'
17607elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17608 as_echo='printf %s\n'
17609 as_echo_n='printf %s'
17610else
17611 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17612 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17613 as_echo_n='/usr/ucb/echo -n'
17614 else
17615 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17616 as_echo_n_body='eval
17617 arg=$1;
17618 case $arg in #(
17619 *"$as_nl"*)
17620 expr "X$arg" : "X\\(.*\\)$as_nl";
17621 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17622 esac;
17623 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17624 '
17625 export as_echo_n_body
17626 as_echo_n='sh -c $as_echo_n_body as_echo'
17627 fi
17628 export as_echo_body
17629 as_echo='sh -c $as_echo_body as_echo'
17630fi
17631
17632# The user is always right.
17633if test "${PATH_SEPARATOR+set}" != set; then
17634 PATH_SEPARATOR=:
17635 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17636 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17637 PATH_SEPARATOR=';'
17638 }
bec39cab
AC
17639fi
17640
17641
81ecdfbb
RW
17642# IFS
17643# We need space, tab and new line, in precisely that order. Quoting is
17644# there to prevent editors from complaining about space-tab.
17645# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17646# splitting by setting IFS to empty value.)
17647IFS=" "" $as_nl"
17648
17649# Find who we are. Look in the path if we contain no directory separator.
17650case $0 in #((
17651 *[\\/]* ) as_myself=$0 ;;
17652 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17653for as_dir in $PATH
17654do
17655 IFS=$as_save_IFS
17656 test -z "$as_dir" && as_dir=.
17657 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17658 done
17659IFS=$as_save_IFS
17660
17661 ;;
17662esac
17663# We did not find ourselves, most probably we were run as `sh COMMAND'
17664# in which case we are not to be found in the path.
17665if test "x$as_myself" = x; then
17666 as_myself=$0
17667fi
17668if test ! -f "$as_myself"; then
17669 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17670 exit 1
17671fi
17672
17673# Unset variables that we do not need and which cause bugs (e.g. in
17674# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17675# suppresses any "Segmentation fault" message there. '((' could
17676# trigger a bug in pdksh 5.2.14.
17677for as_var in BASH_ENV ENV MAIL MAILPATH
17678do eval test x\${$as_var+set} = xset \
17679 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17680done
bec39cab
AC
17681PS1='$ '
17682PS2='> '
17683PS4='+ '
17684
17685# NLS nuisances.
81ecdfbb
RW
17686LC_ALL=C
17687export LC_ALL
17688LANGUAGE=C
17689export LANGUAGE
17690
17691# CDPATH.
17692(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17693
17694
17695# as_fn_error ERROR [LINENO LOG_FD]
17696# ---------------------------------
17697# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17698# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17699# script with status $?, using 1 if that was 0.
17700as_fn_error ()
17701{
17702 as_status=$?; test $as_status -eq 0 && as_status=1
17703 if test "$3"; then
17704 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17705 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17706 fi
17707 $as_echo "$as_me: error: $1" >&2
17708 as_fn_exit $as_status
17709} # as_fn_error
17710
17711
17712# as_fn_set_status STATUS
17713# -----------------------
17714# Set $? to STATUS, without forking.
17715as_fn_set_status ()
17716{
17717 return $1
17718} # as_fn_set_status
17719
17720# as_fn_exit STATUS
17721# -----------------
17722# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17723as_fn_exit ()
17724{
17725 set +e
17726 as_fn_set_status $1
17727 exit $1
17728} # as_fn_exit
17729
17730# as_fn_unset VAR
17731# ---------------
17732# Portably unset VAR.
17733as_fn_unset ()
17734{
17735 { eval $1=; unset $1;}
17736}
17737as_unset=as_fn_unset
17738# as_fn_append VAR VALUE
17739# ----------------------
17740# Append the text in VALUE to the end of the definition contained in VAR. Take
17741# advantage of any shell optimizations that allow amortized linear growth over
17742# repeated appends, instead of the typical quadratic growth present in naive
17743# implementations.
17744if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17745 eval 'as_fn_append ()
17746 {
17747 eval $1+=\$2
17748 }'
17749else
17750 as_fn_append ()
17751 {
17752 eval $1=\$$1\$2
17753 }
17754fi # as_fn_append
17755
17756# as_fn_arith ARG...
17757# ------------------
17758# Perform arithmetic evaluation on the ARGs, and store the result in the
17759# global $as_val. Take advantage of shells that can avoid forks. The arguments
17760# must be portable across $(()) and expr.
17761if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17762 eval 'as_fn_arith ()
17763 {
17764 as_val=$(( $* ))
17765 }'
17766else
17767 as_fn_arith ()
17768 {
17769 as_val=`expr "$@" || test $? -eq 1`
17770 }
17771fi # as_fn_arith
bec39cab 17772
81ecdfbb
RW
17773
17774if expr a : '\(a\)' >/dev/null 2>&1 &&
17775 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
17776 as_expr=expr
17777else
17778 as_expr=false
17779fi
17780
81ecdfbb 17781if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
17782 as_basename=basename
17783else
17784 as_basename=false
17785fi
17786
81ecdfbb
RW
17787if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17788 as_dirname=dirname
17789else
17790 as_dirname=false
17791fi
bec39cab 17792
81ecdfbb 17793as_me=`$as_basename -- "$0" ||
bec39cab
AC
17794$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17795 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
17796 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17797$as_echo X/"$0" |
17798 sed '/^.*\/\([^/][^/]*\)\/*$/{
17799 s//\1/
17800 q
17801 }
17802 /^X\/\(\/\/\)$/{
17803 s//\1/
17804 q
17805 }
17806 /^X\/\(\/\).*/{
17807 s//\1/
17808 q
17809 }
17810 s/.*/./; q'`
b4e70030 17811
b4e70030
JB
17812# Avoid depending upon Character Ranges.
17813as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17814as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17815as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17816as_cr_digits='0123456789'
17817as_cr_alnum=$as_cr_Letters$as_cr_digits
17818
81ecdfbb
RW
17819ECHO_C= ECHO_N= ECHO_T=
17820case `echo -n x` in #(((((
17821-n*)
17822 case `echo 'xy\c'` in
17823 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17824 xy) ECHO_C='\c';;
17825 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17826 ECHO_T=' ';;
17827 esac;;
17828*)
17829 ECHO_N='-n';;
bec39cab
AC
17830esac
17831
81ecdfbb
RW
17832rm -f conf$$ conf$$.exe conf$$.file
17833if test -d conf$$.dir; then
17834 rm -f conf$$.dir/conf$$.file
bec39cab 17835else
81ecdfbb
RW
17836 rm -f conf$$.dir
17837 mkdir conf$$.dir 2>/dev/null
bec39cab 17838fi
81ecdfbb
RW
17839if (echo >conf$$.file) 2>/dev/null; then
17840 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 17841 as_ln_s='ln -s'
81ecdfbb
RW
17842 # ... but there are two gotchas:
17843 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17844 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17845 # In both cases, we have to default to `cp -p'.
17846 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17847 as_ln_s='cp -p'
17848 elif ln conf$$.file conf$$ 2>/dev/null; then
17849 as_ln_s=ln
17850 else
17851 as_ln_s='cp -p'
b4e70030 17852 fi
bec39cab
AC
17853else
17854 as_ln_s='cp -p'
17855fi
81ecdfbb
RW
17856rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17857rmdir conf$$.dir 2>/dev/null
17858
17859
17860# as_fn_mkdir_p
17861# -------------
17862# Create "$as_dir" as a directory, including parents if necessary.
17863as_fn_mkdir_p ()
17864{
17865
17866 case $as_dir in #(
17867 -*) as_dir=./$as_dir;;
17868 esac
17869 test -d "$as_dir" || eval $as_mkdir_p || {
17870 as_dirs=
17871 while :; do
17872 case $as_dir in #(
17873 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17874 *) as_qdir=$as_dir;;
17875 esac
17876 as_dirs="'$as_qdir' $as_dirs"
17877 as_dir=`$as_dirname -- "$as_dir" ||
17878$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17879 X"$as_dir" : 'X\(//\)[^/]' \| \
17880 X"$as_dir" : 'X\(//\)$' \| \
17881 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17882$as_echo X"$as_dir" |
17883 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17884 s//\1/
17885 q
17886 }
17887 /^X\(\/\/\)[^/].*/{
17888 s//\1/
17889 q
17890 }
17891 /^X\(\/\/\)$/{
17892 s//\1/
17893 q
17894 }
17895 /^X\(\/\).*/{
17896 s//\1/
17897 q
17898 }
17899 s/.*/./; q'`
17900 test -d "$as_dir" && break
17901 done
17902 test -z "$as_dirs" || eval "mkdir $as_dirs"
17903 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17904
bec39cab 17905
81ecdfbb 17906} # as_fn_mkdir_p
bec39cab 17907if mkdir -p . 2>/dev/null; then
81ecdfbb 17908 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
17909else
17910 test -d ./-p && rmdir ./-p
17911 as_mkdir_p=false
17912fi
17913
81ecdfbb
RW
17914if test -x / >/dev/null 2>&1; then
17915 as_test_x='test -x'
17916else
17917 if ls -dL / >/dev/null 2>&1; then
17918 as_ls_L_option=L
17919 else
17920 as_ls_L_option=
17921 fi
17922 as_test_x='
17923 eval sh -c '\''
17924 if test -d "$1"; then
17925 test -d "$1/.";
17926 else
17927 case $1 in #(
17928 -*)set "./$1";;
17929 esac;
17930 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17931 ???[sx]*):;;*)false;;esac;fi
17932 '\'' sh
17933 '
17934fi
17935as_executable_p=$as_test_x
bec39cab
AC
17936
17937# Sed expression to map a string onto a valid CPP name.
17938as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17939
17940# Sed expression to map a string onto a valid variable name.
17941as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17942
17943
bec39cab 17944exec 6>&1
81ecdfbb
RW
17945## ----------------------------------- ##
17946## Main body of $CONFIG_STATUS script. ##
17947## ----------------------------------- ##
17948_ASEOF
17949test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17950
17951cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17952# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 17953# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
17954# values after options handling.
17955ac_log="
bec39cab 17956This file was extended by $as_me, which was
81ecdfbb 17957generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
17958
17959 CONFIG_FILES = $CONFIG_FILES
17960 CONFIG_HEADERS = $CONFIG_HEADERS
17961 CONFIG_LINKS = $CONFIG_LINKS
17962 CONFIG_COMMANDS = $CONFIG_COMMANDS
17963 $ $0 $@
17964
81ecdfbb
RW
17965on `(hostname || uname -n) 2>/dev/null | sed 1q`
17966"
17967
bec39cab
AC
17968_ACEOF
17969
81ecdfbb
RW
17970case $ac_config_files in *"
17971"*) set x $ac_config_files; shift; ac_config_files=$*;;
17972esac
234b45d4 17973
81ecdfbb
RW
17974case $ac_config_headers in *"
17975"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17976esac
b4e70030 17977
b4e70030 17978
81ecdfbb
RW
17979cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17980# Files that config.status was made for.
17981config_files="$ac_config_files"
17982config_headers="$ac_config_headers"
17983config_links="$ac_config_links"
17984config_commands="$ac_config_commands"
234b45d4 17985
81ecdfbb 17986_ACEOF
b4e70030 17987
81ecdfbb 17988cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 17989ac_cs_usage="\
81ecdfbb
RW
17990\`$as_me' instantiates files and other configuration actions
17991from templates according to the current configuration. Unless the files
17992and actions are specified as TAGs, all are instantiated by default.
234b45d4 17993
81ecdfbb 17994Usage: $0 [OPTION]... [TAG]...
234b45d4 17995
bec39cab 17996 -h, --help print this help, then exit
81ecdfbb
RW
17997 -V, --version print version number and configuration settings, then exit
17998 -q, --quiet, --silent
17999 do not print progress messages
bec39cab
AC
18000 -d, --debug don't remove temporary files
18001 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18002 --file=FILE[:TEMPLATE]
18003 instantiate the configuration file FILE
18004 --header=FILE[:TEMPLATE]
18005 instantiate the configuration header FILE
234b45d4 18006
bec39cab
AC
18007Configuration files:
18008$config_files
234b45d4 18009
bec39cab
AC
18010Configuration headers:
18011$config_headers
234b45d4 18012
bec39cab
AC
18013Configuration links:
18014$config_links
234b45d4 18015
bec39cab
AC
18016Configuration commands:
18017$config_commands
18018
81ecdfbb 18019Report bugs to the package provider."
b4e70030 18020
81ecdfbb
RW
18021_ACEOF
18022cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
18023ac_cs_version="\\
18024config.status
81ecdfbb
RW
18025configured by $0, generated by GNU Autoconf 2.64,
18026 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 18027
81ecdfbb 18028Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
18029This config.status script is free software; the Free Software Foundation
18030gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18031
18032ac_pwd='$ac_pwd'
18033srcdir='$srcdir'
18034INSTALL='$INSTALL'
81ecdfbb
RW
18035AWK='$AWK'
18036test -n "\$AWK" || AWK=awk
bec39cab
AC
18037_ACEOF
18038
81ecdfbb
RW
18039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18040# The default lists apply if the user does not specify any file.
bec39cab
AC
18041ac_need_defaults=:
18042while test $# != 0
18043do
18044 case $1 in
18045 --*=*)
81ecdfbb
RW
18046 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18047 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18048 ac_shift=:
c906108c 18049 ;;
81ecdfbb 18050 *)
bec39cab
AC
18051 ac_option=$1
18052 ac_optarg=$2
18053 ac_shift=shift
c906108c 18054 ;;
bec39cab 18055 esac
c906108c 18056
bec39cab
AC
18057 case $ac_option in
18058 # Handling of the options.
bec39cab
AC
18059 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18060 ac_cs_recheck=: ;;
81ecdfbb
RW
18061 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18062 $as_echo "$ac_cs_version"; exit ;;
18063 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18064 debug=: ;;
18065 --file | --fil | --fi | --f )
18066 $ac_shift
81ecdfbb
RW
18067 case $ac_optarg in
18068 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18069 esac
18070 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18071 ac_need_defaults=false;;
18072 --header | --heade | --head | --hea )
18073 $ac_shift
81ecdfbb
RW
18074 case $ac_optarg in
18075 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18076 esac
18077 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18078 ac_need_defaults=false;;
81ecdfbb
RW
18079 --he | --h)
18080 # Conflict between --help and --header
18081 as_fn_error "ambiguous option: \`$1'
18082Try \`$0 --help' for more information.";;
18083 --help | --hel | -h )
18084 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18085 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18086 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18087 ac_cs_silent=: ;;
c906108c 18088
bec39cab 18089 # This is an error.
81ecdfbb
RW
18090 -*) as_fn_error "unrecognized option: \`$1'
18091Try \`$0 --help' for more information." ;;
c906108c 18092
81ecdfbb
RW
18093 *) as_fn_append ac_config_targets " $1"
18094 ac_need_defaults=false ;;
c906108c 18095
bec39cab
AC
18096 esac
18097 shift
18098done
c906108c 18099
bec39cab 18100ac_configure_extra_args=
c906108c 18101
bec39cab
AC
18102if $ac_cs_silent; then
18103 exec 6>/dev/null
18104 ac_configure_extra_args="$ac_configure_extra_args --silent"
18105fi
c906108c 18106
bec39cab 18107_ACEOF
81ecdfbb 18108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18109if \$ac_cs_recheck; then
81ecdfbb
RW
18110 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18111 shift
18112 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18113 CONFIG_SHELL='$SHELL'
18114 export CONFIG_SHELL
18115 exec "\$@"
bec39cab
AC
18116fi
18117
18118_ACEOF
81ecdfbb
RW
18119cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18120exec 5>>config.log
18121{
18122 echo
18123 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18124## Running $as_me. ##
18125_ASBOX
18126 $as_echo "$ac_log"
18127} >&5
bec39cab 18128
81ecdfbb
RW
18129_ACEOF
18130cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18131#
81ecdfbb 18132# INIT-COMMANDS
c906108c 18133#
a417dc56 18134ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18135
bec39cab
AC
18136_ACEOF
18137
81ecdfbb 18138cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18139
81ecdfbb 18140# Handling of arguments.
bec39cab 18141for ac_config_target in $ac_config_targets
c906108c 18142do
81ecdfbb
RW
18143 case $ac_config_target in
18144 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18145 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18146 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18147 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18148 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18149 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18150 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 18151 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18152 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
18153
18154 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18155 esac
18156done
18157
81ecdfbb 18158
bec39cab
AC
18159# If the user did not use the arguments to specify the items to instantiate,
18160# then the envvar interface is used. Set only those that are not.
18161# We use the long form for the default assignment because of an extremely
18162# bizarre bug on SunOS 4.1.3.
18163if $ac_need_defaults; then
18164 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18165 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18166 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18167 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18168fi
18169
b4e70030 18170# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18171# simply because there is no reason against having it here, and in addition,
b4e70030 18172# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18173# Hook for its removal unless debugging.
18174# Note that there is a small window in which the directory will not be cleaned:
18175# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18176$debug ||
18177{
81ecdfbb
RW
18178 tmp=
18179 trap 'exit_status=$?
18180 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18181' 0
18182 trap 'as_fn_exit 1' 1 2 13 15
18183}
18184# Create a (secure) tmp directory for tmp files.
18185
18186{
18187 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18188 test -n "$tmp" && test -d "$tmp"
18189} ||
18190{
18191 tmp=./conf$$-$RANDOM
18192 (umask 077 && mkdir "$tmp")
18193} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18194
18195# Set up the scripts for CONFIG_FILES section.
18196# No need to generate them if there are no CONFIG_FILES.
18197# This happens for instance with `./config.status config.h'.
18198if test -n "$CONFIG_FILES"; then
18199
18200if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18201 ac_cs_awk_getline=:
18202 ac_cs_awk_pipe_init=
18203 ac_cs_awk_read_file='
18204 while ((getline aline < (F[key])) > 0)
18205 print(aline)
18206 close(F[key])'
18207 ac_cs_awk_pipe_fini=
18208else
18209 ac_cs_awk_getline=false
18210 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18211 ac_cs_awk_read_file='
18212 print "|#_!!_#|"
18213 print "cat " F[key] " &&"
18214 '$ac_cs_awk_pipe_init
18215 # The final `:' finishes the AND list.
18216 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18217fi
18218ac_cr=`echo X | tr X '\015'`
18219# On cygwin, bash can eat \r inside `` if the user requested igncr.
18220# But we know of no other shell where ac_cr would be empty at this
18221# point, so we can use a bashism as a fallback.
18222if test "x$ac_cr" = x; then
18223 eval ac_cr=\$\'\\r\'
18224fi
18225ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18226if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18227 ac_cs_awk_cr='\r'
18228else
18229 ac_cs_awk_cr=$ac_cr
18230fi
18231
18232echo 'BEGIN {' >"$tmp/subs1.awk" &&
18233_ACEOF
18234
18235# Create commands to substitute file output variables.
18236{
18237 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18238 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18239 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18240 echo "_ACAWK" &&
18241 echo "_ACEOF"
18242} >conf$$files.sh &&
18243. ./conf$$files.sh ||
18244 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18245rm -f conf$$files.sh
18246
18247{
18248 echo "cat >conf$$subs.awk <<_ACEOF" &&
18249 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18250 echo "_ACEOF"
18251} >conf$$subs.sh ||
18252 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18253ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18254ac_delim='%!_!# '
18255for ac_last_try in false false false false false :; do
18256 . ./conf$$subs.sh ||
18257 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18258
18259 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18260 if test $ac_delim_n = $ac_delim_num; then
18261 break
18262 elif $ac_last_try; then
18263 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18264 else
18265 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18266 fi
18267done
18268rm -f conf$$subs.sh
18269
18270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18271cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18272_ACEOF
18273sed -n '
18274h
18275s/^/S["/; s/!.*/"]=/
18276p
18277g
18278s/^[^!]*!//
18279:repl
18280t repl
18281s/'"$ac_delim"'$//
18282t delim
18283:nl
18284h
18285s/\(.\{148\}\).*/\1/
18286t more1
18287s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18288p
18289n
18290b repl
18291:more1
18292s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18293p
18294g
18295s/.\{148\}//
18296t nl
18297:delim
18298h
18299s/\(.\{148\}\).*/\1/
18300t more2
18301s/["\\]/\\&/g; s/^/"/; s/$/"/
18302p
18303b
18304:more2
18305s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18306p
18307g
18308s/.\{148\}//
18309t delim
18310' <conf$$subs.awk | sed '
18311/^[^""]/{
18312 N
18313 s/\n//
18314}
18315' >>$CONFIG_STATUS || ac_write_fail=1
18316rm -f conf$$subs.awk
18317cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18318_ACAWK
18319cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18320 for (key in S) S_is_set[key] = 1
18321 FS = "\a"
18322 \$ac_cs_awk_pipe_init
18323}
18324{
18325 line = $ 0
18326 nfields = split(line, field, "@")
18327 substed = 0
18328 len = length(field[1])
18329 for (i = 2; i < nfields; i++) {
18330 key = field[i]
18331 keylen = length(key)
18332 if (S_is_set[key]) {
18333 value = S[key]
18334 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18335 len += length(value) + length(field[++i])
18336 substed = 1
18337 } else
18338 len += 1 + keylen
18339 }
18340 if (nfields == 3 && !substed) {
18341 key = field[2]
18342 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18343 \$ac_cs_awk_read_file
18344 next
18345 }
18346 }
18347 print line
b4e70030 18348}
81ecdfbb
RW
18349\$ac_cs_awk_pipe_fini
18350_ACAWK
18351_ACEOF
18352cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18353if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18354 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18355else
18356 cat
18357fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18358 || as_fn_error "could not setup config files machinery" "$LINENO" 5
18359_ACEOF
18360
18361# VPATH may cause trouble with some makes, so we remove $(srcdir),
18362# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18363# trailing colons and then remove the whole line if VPATH becomes empty
18364# (actually we leave an empty line to preserve line numbers).
18365if test "x$srcdir" = x.; then
18366 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18367s/:*\$(srcdir):*/:/
18368s/:*\${srcdir}:*/:/
18369s/:*@srcdir@:*/:/
18370s/^\([^=]*=[ ]*\):*/\1/
18371s/:*$//
18372s/^[^=]*=[ ]*$//
18373}'
18374fi
18375
18376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18377fi # test -n "$CONFIG_FILES"
18378
18379# Set up the scripts for CONFIG_HEADERS section.
18380# No need to generate them if there are no CONFIG_HEADERS.
18381# This happens for instance with `./config.status Makefile'.
18382if test -n "$CONFIG_HEADERS"; then
18383cat >"$tmp/defines.awk" <<\_ACAWK ||
18384BEGIN {
18385_ACEOF
18386
18387# Transform confdefs.h into an awk script `defines.awk', embedded as
18388# here-document in config.status, that substitutes the proper values into
18389# config.h.in to produce config.h.
4e8d927d 18390
81ecdfbb
RW
18391# Create a delimiter string that does not exist in confdefs.h, to ease
18392# handling of long lines.
18393ac_delim='%!_!# '
18394for ac_last_try in false false :; do
18395 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18396 if test -z "$ac_t"; then
18397 break
18398 elif $ac_last_try; then
18399 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18400 else
18401 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18402 fi
18403done
4e8d927d 18404
81ecdfbb
RW
18405# For the awk script, D is an array of macro values keyed by name,
18406# likewise P contains macro parameters if any. Preserve backslash
18407# newline sequences.
18408
18409ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18410sed -n '
18411s/.\{148\}/&'"$ac_delim"'/g
18412t rset
18413:rset
18414s/^[ ]*#[ ]*define[ ][ ]*/ /
18415t def
18416d
18417:def
18418s/\\$//
18419t bsnl
18420s/["\\]/\\&/g
18421s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18422D["\1"]=" \3"/p
18423s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18424d
18425:bsnl
18426s/["\\]/\\&/g
18427s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18428D["\1"]=" \3\\\\\\n"\\/p
18429t cont
18430s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18431t cont
18432d
18433:cont
18434n
18435s/.\{148\}/&'"$ac_delim"'/g
18436t clear
18437:clear
18438s/\\$//
18439t bsnlc
18440s/["\\]/\\&/g; s/^/"/; s/$/"/p
18441d
18442:bsnlc
18443s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18444b cont
18445' <confdefs.h | sed '
18446s/'"$ac_delim"'/"\\\
18447"/g' >>$CONFIG_STATUS || ac_write_fail=1
18448
18449cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18450 for (key in D) D_is_set[key] = 1
18451 FS = "\a"
18452}
18453/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18454 line = \$ 0
18455 split(line, arg, " ")
18456 if (arg[1] == "#") {
18457 defundef = arg[2]
18458 mac1 = arg[3]
18459 } else {
18460 defundef = substr(arg[1], 2)
18461 mac1 = arg[2]
18462 }
18463 split(mac1, mac2, "(") #)
18464 macro = mac2[1]
18465 prefix = substr(line, 1, index(line, defundef) - 1)
18466 if (D_is_set[macro]) {
18467 # Preserve the white space surrounding the "#".
18468 print prefix "define", macro P[macro] D[macro]
18469 next
18470 } else {
18471 # Replace #undef with comments. This is necessary, for example,
18472 # in the case of _POSIX_SOURCE, which is predefined and required
18473 # on some systems where configure will not decide to define it.
18474 if (defundef == "undef") {
18475 print "/*", prefix defundef, macro, "*/"
18476 next
18477 }
18478 }
b4e70030 18479}
81ecdfbb
RW
18480{ print }
18481_ACAWK
b4e70030 18482_ACEOF
81ecdfbb
RW
18483cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18484 as_fn_error "could not setup config headers machinery" "$LINENO" 5
18485fi # test -n "$CONFIG_HEADERS"
4e8d927d 18486
4e8d927d 18487
81ecdfbb
RW
18488eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18489shift
18490for ac_tag
18491do
18492 case $ac_tag in
18493 :[FHLC]) ac_mode=$ac_tag; continue;;
18494 esac
18495 case $ac_mode$ac_tag in
18496 :[FHL]*:*);;
18497 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18498 :[FH]-) ac_tag=-:-;;
18499 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18500 esac
18501 ac_save_IFS=$IFS
18502 IFS=:
18503 set x $ac_tag
18504 IFS=$ac_save_IFS
18505 shift
18506 ac_file=$1
18507 shift
4e8d927d 18508
81ecdfbb
RW
18509 case $ac_mode in
18510 :L) ac_source=$1;;
18511 :[FH])
18512 ac_file_inputs=
18513 for ac_f
18514 do
18515 case $ac_f in
18516 -) ac_f="$tmp/stdin";;
18517 *) # Look for the file first in the build tree, then in the source tree
18518 # (if the path is not absolute). The absolute path cannot be DOS-style,
18519 # because $ac_f cannot contain `:'.
18520 test -f "$ac_f" ||
18521 case $ac_f in
18522 [\\/$]*) false;;
18523 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18524 esac ||
18525 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18526 esac
18527 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18528 as_fn_append ac_file_inputs " '$ac_f'"
18529 done
18530
18531 # Let's still pretend it is `configure' which instantiates (i.e., don't
18532 # use $as_me), people would be surprised to read:
18533 # /* config.h. Generated by config.status. */
18534 configure_input='Generated from '`
18535 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18536 `' by configure.'
18537 if test x"$ac_file" != x-; then
18538 configure_input="$ac_file. $configure_input"
18539 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18540$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18541 fi
81ecdfbb
RW
18542 # Neutralize special characters interpreted by sed in replacement strings.
18543 case $configure_input in #(
18544 *\&* | *\|* | *\\* )
18545 ac_sed_conf_input=`$as_echo "$configure_input" |
18546 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18547 *) ac_sed_conf_input=$configure_input;;
18548 esac
4e8d927d 18549
81ecdfbb
RW
18550 case $ac_tag in
18551 *:-:* | *:-) cat >"$tmp/stdin" \
18552 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18553 esac
18554 ;;
c906108c
SS
18555 esac
18556
81ecdfbb 18557 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18558$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18559 X"$ac_file" : 'X\(//\)[^/]' \| \
18560 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18561 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18562$as_echo X"$ac_file" |
18563 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18564 s//\1/
18565 q
18566 }
18567 /^X\(\/\/\)[^/].*/{
18568 s//\1/
18569 q
18570 }
18571 /^X\(\/\/\)$/{
18572 s//\1/
18573 q
18574 }
18575 /^X\(\/\).*/{
18576 s//\1/
18577 q
18578 }
18579 s/.*/./; q'`
18580 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18581 ac_builddir=.
18582
81ecdfbb
RW
18583case "$ac_dir" in
18584.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18585*)
18586 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18587 # A ".." for each directory in $ac_dir_suffix.
18588 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18589 case $ac_top_builddir_sub in
18590 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18591 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18592 esac ;;
18593esac
18594ac_abs_top_builddir=$ac_pwd
18595ac_abs_builddir=$ac_pwd$ac_dir_suffix
18596# for backward compatibility:
18597ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18598
18599case $srcdir in
81ecdfbb 18600 .) # We are building in place.
bec39cab 18601 ac_srcdir=.
81ecdfbb
RW
18602 ac_top_srcdir=$ac_top_builddir_sub
18603 ac_abs_top_srcdir=$ac_pwd ;;
18604 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18605 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18606 ac_top_srcdir=$srcdir
18607 ac_abs_top_srcdir=$srcdir ;;
18608 *) # Relative name.
18609 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18610 ac_top_srcdir=$ac_top_build_prefix$srcdir
18611 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18612esac
81ecdfbb 18613ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18614
c906108c 18615
81ecdfbb
RW
18616 case $ac_mode in
18617 :F)
18618 #
18619 # CONFIG_FILE
18620 #
c906108c 18621
bec39cab
AC
18622 case $INSTALL in
18623 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18624 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18625 esac
81ecdfbb 18626_ACEOF
121ce6e5 18627
81ecdfbb
RW
18628cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18629# If the template does not know about datarootdir, expand it.
18630# FIXME: This hack should be removed a few years after 2.60.
18631ac_datarootdir_hack=; ac_datarootdir_seen=
18632ac_sed_dataroot='
18633/datarootdir/ {
18634 p
18635 q
18636}
18637/@datadir@/p
18638/@docdir@/p
18639/@infodir@/p
18640/@localedir@/p
18641/@mandir@/p'
18642case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18643*datarootdir*) ac_datarootdir_seen=yes;;
18644*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18646$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18647_ACEOF
18648cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18649 ac_datarootdir_hack='
18650 s&@datadir@&$datadir&g
18651 s&@docdir@&$docdir&g
18652 s&@infodir@&$infodir&g
18653 s&@localedir@&$localedir&g
18654 s&@mandir@&$mandir&g
18655 s&\\\${datarootdir}&$datarootdir&g' ;;
18656esac
4e8d927d 18657_ACEOF
81ecdfbb
RW
18658
18659# Neutralize VPATH when `$srcdir' = `.'.
18660# Shell code in configure.ac might set extrasub.
18661# FIXME: do we really want to maintain this feature?
18662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18663ac_sed_extra="$ac_vpsub
bec39cab
AC
18664$extrasub
18665_ACEOF
81ecdfbb 18666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18667:t
18668/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18669s|@configure_input@|$ac_sed_conf_input|;t t
18670s&@top_builddir@&$ac_top_builddir_sub&;t t
18671s&@top_build_prefix@&$ac_top_build_prefix&;t t
18672s&@srcdir@&$ac_srcdir&;t t
18673s&@abs_srcdir@&$ac_abs_srcdir&;t t
18674s&@top_srcdir@&$ac_top_srcdir&;t t
18675s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18676s&@builddir@&$ac_builddir&;t t
18677s&@abs_builddir@&$ac_abs_builddir&;t t
18678s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18679s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
18680$ac_datarootdir_hack
18681"
18682eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18683if $ac_cs_awk_getline; then
18684 $AWK -f "$tmp/subs.awk"
18685else
18686 $AWK -f "$tmp/subs.awk" | $SHELL
18687fi >$tmp/out \
18688 || as_fn_error "could not create $ac_file" "$LINENO" 5
18689
18690test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18691 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18692 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18693 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18694which seems to be undefined. Please make sure it is defined." >&5
18695$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18696which seems to be undefined. Please make sure it is defined." >&2;}
18697
18698 rm -f "$tmp/stdin"
bec39cab 18699 case $ac_file in
81ecdfbb
RW
18700 -) cat "$tmp/out" && rm -f "$tmp/out";;
18701 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18702 esac \
18703 || as_fn_error "could not create $ac_file" "$LINENO" 5
18704 ;;
18705 :H)
18706 #
18707 # CONFIG_HEADER
18708 #
bec39cab 18709 if test x"$ac_file" != x-; then
81ecdfbb
RW
18710 {
18711 $as_echo "/* $configure_input */" \
18712 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18713 } >"$tmp/config.h" \
18714 || as_fn_error "could not create $ac_file" "$LINENO" 5
18715 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18716 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18717$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18718 else
81ecdfbb
RW
18719 rm -f "$ac_file"
18720 mv "$tmp/config.h" "$ac_file" \
18721 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18722 fi
18723 else
81ecdfbb
RW
18724 $as_echo "/* $configure_input */" \
18725 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18726 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 18727 fi
81ecdfbb
RW
18728 ;;
18729 :L)
18730 #
18731 # CONFIG_LINK
18732 #
c906108c 18733
81ecdfbb
RW
18734 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18735 :
b4e70030 18736 else
81ecdfbb
RW
18737 # Prefer the file from the source tree if names are identical.
18738 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18739 ac_source=$srcdir/$ac_source
18740 fi
b4e70030 18741
81ecdfbb
RW
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18743$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 18744
81ecdfbb
RW
18745 if test ! -r "$ac_source"; then
18746 as_fn_error "$ac_source: file not found" "$LINENO" 5
18747 fi
18748 rm -f "$ac_file"
bec39cab 18749
81ecdfbb
RW
18750 # Try a relative symlink, then a hard link, then a copy.
18751 case $srcdir in
18752 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18753 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18754 esac
18755 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18756 ln "$ac_source" "$ac_file" 2>/dev/null ||
18757 cp -p "$ac_source" "$ac_file" ||
18758 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18759 fi
18760 ;;
18761 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18762$as_echo "$as_me: executing $ac_file commands" >&6;}
18763 ;;
c906108c 18764 esac
b4e70030 18765
bec39cab 18766
81ecdfbb
RW
18767 case $ac_file$ac_mode in
18768 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 18769 "gcore":F) chmod +x gcore ;;
1e94266c
SM
18770 "Makefile":F)
18771case x$CONFIG_HEADERS in
18772xconfig.h:config.in)
18773echo > stamp-h ;;
18774esac
18775 ;;
18776 "gdb-gdb.gdb":F)
18777case x$CONFIG_HEADERS in
18778xconfig.h:config.in)
18779echo > stamp-h ;;
18780esac
18781 ;;
18782 "doc/Makefile":F)
18783case x$CONFIG_HEADERS in
18784xconfig.h:config.in)
18785echo > stamp-h ;;
18786esac
18787 ;;
18788 "data-directory/Makefile":F)
c906108c
SS
18789case x$CONFIG_HEADERS in
18790xconfig.h:config.in)
18791echo > stamp-h ;;
18792esac
bec39cab 18793 ;;
81ecdfbb 18794
bec39cab 18795 esac
81ecdfbb 18796done # for ac_tag
c906108c 18797
bec39cab 18798
81ecdfbb 18799as_fn_exit 0
bec39cab 18800_ACEOF
bec39cab
AC
18801ac_clean_files=$ac_clean_files_save
18802
81ecdfbb
RW
18803test $ac_write_fail = 0 ||
18804 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
18805
bec39cab
AC
18806
18807# configure is writing to config.log, and then calls config.status.
18808# config.status does its own redirection, appending to config.log.
18809# Unfortunately, on DOS this fails, as config.log is still kept open
18810# by configure, so config.status won't be able to write to it; its
18811# output is simply discarded. So we exec the FD to /dev/null,
18812# effectively closing config.log, so it can be properly (re)opened and
18813# appended to by config.status. When coming back to configure, we
18814# need to make the FD available again.
18815if test "$no_create" != yes; then
18816 ac_cs_success=:
18817 ac_config_status_args=
18818 test "$silent" = yes &&
18819 ac_config_status_args="$ac_config_status_args --quiet"
18820 exec 5>/dev/null
18821 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18822 exec 5>>config.log
18823 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18824 # would make configure fail if this is the last instruction.
81ecdfbb 18825 $ac_cs_success || as_fn_exit $?
bec39cab 18826fi
c906108c 18827
bec39cab 18828#
81ecdfbb 18829# CONFIG_SUBDIRS section.
bec39cab 18830#
c906108c
SS
18831if test "$no_recursion" != yes; then
18832
81ecdfbb
RW
18833 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18834 # so they do not pile up.
c906108c
SS
18835 ac_sub_configure_args=
18836 ac_prev=
fdc59709
PB
18837 eval "set x $ac_configure_args"
18838 shift
18839 for ac_arg
18840 do
c906108c
SS
18841 if test -n "$ac_prev"; then
18842 ac_prev=
18843 continue
18844 fi
bec39cab 18845 case $ac_arg in
c906108c
SS
18846 -cache-file | --cache-file | --cache-fil | --cache-fi \
18847 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18848 ac_prev=cache_file ;;
18849 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
18850 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18851 | --c=*)
18852 ;;
18853 --config-cache | -C)
c906108c
SS
18854 ;;
18855 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18856 ac_prev=srcdir ;;
18857 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18858 ;;
bec39cab
AC
18859 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18860 ac_prev=prefix ;;
18861 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18862 ;;
81ecdfbb
RW
18863 --disable-option-checking)
18864 ;;
fdc59709
PB
18865 *)
18866 case $ac_arg in
81ecdfbb 18867 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18868 esac
81ecdfbb 18869 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18870 esac
18871 done
18872
bec39cab
AC
18873 # Always prepend --prefix to ensure using the same prefix
18874 # in subdir configurations.
fdc59709
PB
18875 ac_arg="--prefix=$prefix"
18876 case $ac_arg in
81ecdfbb 18877 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18878 esac
81ecdfbb
RW
18879 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18880
18881 # Pass --silent
18882 if test "$silent" = yes; then
18883 ac_sub_configure_args="--silent $ac_sub_configure_args"
18884 fi
18885
18886 # Always prepend --disable-option-checking to silence warnings, since
18887 # different subdirs can have different --enable and --with options.
18888 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18889
b4e70030 18890 ac_popdir=`pwd`
bec39cab 18891 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18892
18893 # Do not complain, so a configure script can configure whichever
18894 # parts of a large source tree are present.
fdc59709 18895 test -d "$srcdir/$ac_dir" || continue
c906108c 18896
81ecdfbb
RW
18897 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18898 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18899 $as_echo "$ac_msg" >&6
18900 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18901 ac_builddir=.
18902
81ecdfbb
RW
18903case "$ac_dir" in
18904.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18905*)
18906 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18907 # A ".." for each directory in $ac_dir_suffix.
18908 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18909 case $ac_top_builddir_sub in
18910 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18911 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18912 esac ;;
18913esac
18914ac_abs_top_builddir=$ac_pwd
18915ac_abs_builddir=$ac_pwd$ac_dir_suffix
18916# for backward compatibility:
18917ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18918
18919case $srcdir in
81ecdfbb 18920 .) # We are building in place.
bec39cab 18921 ac_srcdir=.
81ecdfbb
RW
18922 ac_top_srcdir=$ac_top_builddir_sub
18923 ac_abs_top_srcdir=$ac_pwd ;;
18924 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18925 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18926 ac_top_srcdir=$srcdir
18927 ac_abs_top_srcdir=$srcdir ;;
18928 *) # Relative name.
18929 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18930 ac_top_srcdir=$ac_top_build_prefix$srcdir
18931 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18932esac
81ecdfbb 18933ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 18934
c906108c 18935
fdc59709 18936 cd "$ac_dir"
c906108c
SS
18937
18938 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
18939 if test -f "$ac_srcdir/configure.gnu"; then
18940 ac_sub_configure=$ac_srcdir/configure.gnu
18941 elif test -f "$ac_srcdir/configure"; then
18942 ac_sub_configure=$ac_srcdir/configure
18943 elif test -f "$ac_srcdir/configure.in"; then
18944 # This should be Cygnus configure.
18945 ac_sub_configure=$ac_aux_dir/configure
c906108c 18946 else
81ecdfbb
RW
18947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
18948$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
18949 ac_sub_configure=
18950 fi
18951
18952 # The recursion is here.
18953 if test -n "$ac_sub_configure"; then
c906108c 18954 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
18955 case $cache_file in
18956 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
18957 *) # Relative name.
18958 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 18959 esac
c906108c 18960
81ecdfbb
RW
18961 { $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
18962$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 18963 # The eval makes quoting arguments work.
fdc59709
PB
18964 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
18965 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 18966 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
18967 fi
18968
fdc59709 18969 cd "$ac_popdir"
c906108c
SS
18970 done
18971fi
81ecdfbb
RW
18972if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18974$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18975fi
c906108c 18976