Make gdb.mi/user-selected-context-sync.exp use proc_with_prefix
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
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
728SET_MAKE
729GMAKE_FALSE
730GMAKE_TRUE
731MAKE
732CCDEPMODE
733DEPDIR
734am__leading_dot
0bcda685
PA
735CXX_DIALECT
736HAVE_CXX11
4869db5e
RM
737INSTALL_STRIP_PROGRAM
738STRIP
739install_sh
81ecdfbb
RW
740target_os
741target_vendor
742target_cpu
743target
744host_os
745host_vendor
746host_cpu
747host
748build_os
749build_vendor
750build_cpu
751build
c971b7fa
PA
752EGREP
753GREP
754CPP
3bc3d82a
PA
755ac_ct_CXX
756CXXFLAGS
757CXX
81ecdfbb
RW
758OBJEXT
759EXEEXT
760ac_ct_CC
761CPPFLAGS
762LDFLAGS
763CFLAGS
764CC
765MAINT
766MAINTAINER_MODE_FALSE
767MAINTAINER_MODE_TRUE
768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
a4ce5b0d 806ac_subst_files='host_makefile_frag'
81ecdfbb
RW
807ac_user_opts='
808enable_option_checking
809enable_maintainer_mode
da2f07f1
JK
810enable_plugins
811enable_largefile
81ecdfbb
RW
812with_separate_debug_dir
813with_gdb_datadir
814with_relocated_sources
7349ff92 815with_auto_load_dir
bccbefd2 816with_auto_load_safe_path
81ecdfbb
RW
817enable_targets
818enable_64_bit_bfd
819enable_gdbcli
820enable_gdbmi
821enable_tui
822enable_gdbtk
05e7c244 823with_libunwind_ia64
81ecdfbb
RW
824with_curses
825enable_profiling
826with_pkgversion
827with_bugurl
711a72d3 828with_system_zlib
016a3251
DD
829with_gnu_ld
830enable_rpath
81ecdfbb 831with_libiconv_prefix
478aac75 832with_iconv_bin
81ecdfbb 833with_system_readline
b8e0a31c 834with_jit_reader_dir
81ecdfbb 835with_expat
81ecdfbb
RW
836with_libexpat_prefix
837with_python
ed3ef339 838with_guile
a8db4212 839enable_libmcheck
58bfce93
MM
840with_intel_pt
841with_libipt_prefix
81ecdfbb
RW
842with_included_regex
843with_sysroot
844with_system_gdbinit
845enable_werror
846enable_build_warnings
847enable_gdb_build_warnings
608e2dbb
TT
848with_lzma
849with_liblzma_prefix
81ecdfbb
RW
850with_tcl
851with_tk
852with_x
853enable_sim
854enable_multi_ice
496c0e1b 855enable_gdbserver
393fd4c3
YQ
856with_babeltrace
857with_libbabeltrace_prefix
81ecdfbb
RW
858'
859 ac_precious_vars='build_alias
860host_alias
861target_alias
862CC
863CFLAGS
864LDFLAGS
865LIBS
866CPPFLAGS
3bc3d82a
PA
867CXX
868CXXFLAGS
869CCC
81ecdfbb 870CPP
f06e05e0
JK
871MAKEINFO
872MAKEINFOFLAGS
81ecdfbb
RW
873YACC
874YFLAGS
875XMKMF'
5ae98d25 876ac_subdirs_all='testsuite
81ecdfbb
RW
877gdbtk
878multi-ice
879gdbserver'
c906108c
SS
880
881# Initialize some variables set by options.
bec39cab
AC
882ac_init_help=
883ac_init_version=false
81ecdfbb
RW
884ac_unrecognized_opts=
885ac_unrecognized_sep=
c906108c
SS
886# The variables have the same names as the options, with
887# dashes changed to underlines.
bec39cab 888cache_file=/dev/null
c906108c 889exec_prefix=NONE
c906108c 890no_create=
c906108c
SS
891no_recursion=
892prefix=NONE
893program_prefix=NONE
894program_suffix=NONE
895program_transform_name=s,x,x,
896silent=
897site=
898srcdir=
c906108c
SS
899verbose=
900x_includes=NONE
901x_libraries=NONE
bec39cab
AC
902
903# Installation directory options.
904# These are left unexpanded so users can "make install exec_prefix=/foo"
905# and all the variables that are supposed to be based on exec_prefix
906# by default will actually change.
907# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 908# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
909bindir='${exec_prefix}/bin'
910sbindir='${exec_prefix}/sbin'
911libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
912datarootdir='${prefix}/share'
913datadir='${datarootdir}'
c906108c
SS
914sysconfdir='${prefix}/etc'
915sharedstatedir='${prefix}/com'
916localstatedir='${prefix}/var'
c906108c
SS
917includedir='${prefix}/include'
918oldincludedir='/usr/include'
81ecdfbb
RW
919docdir='${datarootdir}/doc/${PACKAGE}'
920infodir='${datarootdir}/info'
921htmldir='${docdir}'
922dvidir='${docdir}'
923pdfdir='${docdir}'
924psdir='${docdir}'
925libdir='${exec_prefix}/lib'
926localedir='${datarootdir}/locale'
927mandir='${datarootdir}/man'
c906108c 928
c906108c 929ac_prev=
81ecdfbb 930ac_dashdash=
c906108c
SS
931for ac_option
932do
c906108c
SS
933 # If the previous option needs an argument, assign it.
934 if test -n "$ac_prev"; then
81ecdfbb 935 eval $ac_prev=\$ac_option
c906108c
SS
936 ac_prev=
937 continue
938 fi
939
81ecdfbb
RW
940 case $ac_option in
941 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
942 *) ac_optarg=yes ;;
943 esac
c906108c
SS
944
945 # Accept the important Cygnus configure options, so we can diagnose typos.
946
81ecdfbb
RW
947 case $ac_dashdash$ac_option in
948 --)
949 ac_dashdash=yes ;;
c906108c
SS
950
951 -bindir | --bindir | --bindi | --bind | --bin | --bi)
952 ac_prev=bindir ;;
953 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 954 bindir=$ac_optarg ;;
c906108c
SS
955
956 -build | --build | --buil | --bui | --bu)
bec39cab 957 ac_prev=build_alias ;;
c906108c 958 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 959 build_alias=$ac_optarg ;;
c906108c
SS
960
961 -cache-file | --cache-file | --cache-fil | --cache-fi \
962 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963 ac_prev=cache_file ;;
964 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
966 cache_file=$ac_optarg ;;
967
968 --config-cache | -C)
969 cache_file=config.cache ;;
c906108c 970
81ecdfbb 971 -datadir | --datadir | --datadi | --datad)
c906108c 972 ac_prev=datadir ;;
81ecdfbb 973 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 974 datadir=$ac_optarg ;;
c906108c 975
81ecdfbb
RW
976 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977 | --dataroo | --dataro | --datar)
978 ac_prev=datarootdir ;;
979 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981 datarootdir=$ac_optarg ;;
982
c906108c 983 -disable-* | --disable-*)
81ecdfbb 984 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 985 # Reject names that are not valid shell variable names.
81ecdfbb
RW
986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
987 as_fn_error "invalid feature name: $ac_useropt"
988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=no ;;
998
999 -docdir | --docdir | --docdi | --doc | --do)
1000 ac_prev=docdir ;;
1001 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1002 docdir=$ac_optarg ;;
1003
1004 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1005 ac_prev=dvidir ;;
1006 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1007 dvidir=$ac_optarg ;;
c906108c
SS
1008
1009 -enable-* | --enable-*)
81ecdfbb 1010 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1011 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1012 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1013 as_fn_error "invalid feature name: $ac_useropt"
1014 ac_useropt_orig=$ac_useropt
1015 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1016 case $ac_user_opts in
1017 *"
1018"enable_$ac_useropt"
1019"*) ;;
1020 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1021 ac_unrecognized_sep=', ';;
b4e70030 1022 esac
81ecdfbb 1023 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1024
1025 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1026 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1027 | --exec | --exe | --ex)
1028 ac_prev=exec_prefix ;;
1029 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1030 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1031 | --exec=* | --exe=* | --ex=*)
bec39cab 1032 exec_prefix=$ac_optarg ;;
c906108c
SS
1033
1034 -gas | --gas | --ga | --g)
1035 # Obsolete; use --with-gas.
1036 with_gas=yes ;;
1037
bec39cab
AC
1038 -help | --help | --hel | --he | -h)
1039 ac_init_help=long ;;
1040 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1041 ac_init_help=recursive ;;
1042 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1043 ac_init_help=short ;;
c906108c
SS
1044
1045 -host | --host | --hos | --ho)
bec39cab 1046 ac_prev=host_alias ;;
c906108c 1047 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1048 host_alias=$ac_optarg ;;
c906108c 1049
81ecdfbb
RW
1050 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1051 ac_prev=htmldir ;;
1052 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1053 | --ht=*)
1054 htmldir=$ac_optarg ;;
1055
c906108c
SS
1056 -includedir | --includedir | --includedi | --included | --include \
1057 | --includ | --inclu | --incl | --inc)
1058 ac_prev=includedir ;;
1059 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1060 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1061 includedir=$ac_optarg ;;
c906108c
SS
1062
1063 -infodir | --infodir | --infodi | --infod | --info | --inf)
1064 ac_prev=infodir ;;
1065 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1066 infodir=$ac_optarg ;;
c906108c
SS
1067
1068 -libdir | --libdir | --libdi | --libd)
1069 ac_prev=libdir ;;
1070 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1071 libdir=$ac_optarg ;;
c906108c
SS
1072
1073 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1074 | --libexe | --libex | --libe)
1075 ac_prev=libexecdir ;;
1076 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1077 | --libexe=* | --libex=* | --libe=*)
bec39cab 1078 libexecdir=$ac_optarg ;;
c906108c 1079
81ecdfbb
RW
1080 -localedir | --localedir | --localedi | --localed | --locale)
1081 ac_prev=localedir ;;
1082 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1083 localedir=$ac_optarg ;;
1084
c906108c 1085 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1086 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1087 ac_prev=localstatedir ;;
1088 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1089 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1090 localstatedir=$ac_optarg ;;
c906108c
SS
1091
1092 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1093 ac_prev=mandir ;;
1094 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1095 mandir=$ac_optarg ;;
c906108c
SS
1096
1097 -nfp | --nfp | --nf)
1098 # Obsolete; use --without-fp.
1099 with_fp=no ;;
1100
1101 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1102 | --no-cr | --no-c | -n)
c906108c
SS
1103 no_create=yes ;;
1104
1105 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1106 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1107 no_recursion=yes ;;
1108
1109 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1110 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1111 | --oldin | --oldi | --old | --ol | --o)
1112 ac_prev=oldincludedir ;;
1113 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1114 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1115 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1116 oldincludedir=$ac_optarg ;;
c906108c
SS
1117
1118 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1119 ac_prev=prefix ;;
1120 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1121 prefix=$ac_optarg ;;
c906108c
SS
1122
1123 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1124 | --program-pre | --program-pr | --program-p)
1125 ac_prev=program_prefix ;;
1126 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1127 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1128 program_prefix=$ac_optarg ;;
c906108c
SS
1129
1130 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1131 | --program-suf | --program-su | --program-s)
1132 ac_prev=program_suffix ;;
1133 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1134 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1135 program_suffix=$ac_optarg ;;
c906108c
SS
1136
1137 -program-transform-name | --program-transform-name \
1138 | --program-transform-nam | --program-transform-na \
1139 | --program-transform-n | --program-transform- \
1140 | --program-transform | --program-transfor \
1141 | --program-transfo | --program-transf \
1142 | --program-trans | --program-tran \
1143 | --progr-tra | --program-tr | --program-t)
1144 ac_prev=program_transform_name ;;
1145 -program-transform-name=* | --program-transform-name=* \
1146 | --program-transform-nam=* | --program-transform-na=* \
1147 | --program-transform-n=* | --program-transform-=* \
1148 | --program-transform=* | --program-transfor=* \
1149 | --program-transfo=* | --program-transf=* \
1150 | --program-trans=* | --program-tran=* \
1151 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1152 program_transform_name=$ac_optarg ;;
c906108c 1153
81ecdfbb
RW
1154 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1155 ac_prev=pdfdir ;;
1156 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1157 pdfdir=$ac_optarg ;;
1158
1159 -psdir | --psdir | --psdi | --psd | --ps)
1160 ac_prev=psdir ;;
1161 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1162 psdir=$ac_optarg ;;
1163
c906108c
SS
1164 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1165 | -silent | --silent | --silen | --sile | --sil)
1166 silent=yes ;;
1167
1168 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1169 ac_prev=sbindir ;;
1170 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1171 | --sbi=* | --sb=*)
bec39cab 1172 sbindir=$ac_optarg ;;
c906108c
SS
1173
1174 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1175 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1176 | --sharedst | --shareds | --shared | --share | --shar \
1177 | --sha | --sh)
1178 ac_prev=sharedstatedir ;;
1179 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1180 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1181 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1182 | --sha=* | --sh=*)
bec39cab 1183 sharedstatedir=$ac_optarg ;;
c906108c
SS
1184
1185 -site | --site | --sit)
1186 ac_prev=site ;;
1187 -site=* | --site=* | --sit=*)
bec39cab 1188 site=$ac_optarg ;;
3ace7edb 1189
c906108c
SS
1190 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1191 ac_prev=srcdir ;;
1192 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1193 srcdir=$ac_optarg ;;
c906108c
SS
1194
1195 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1196 | --syscon | --sysco | --sysc | --sys | --sy)
1197 ac_prev=sysconfdir ;;
1198 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1199 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1200 sysconfdir=$ac_optarg ;;
c906108c
SS
1201
1202 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1203 ac_prev=target_alias ;;
c906108c 1204 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1205 target_alias=$ac_optarg ;;
c906108c
SS
1206
1207 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1208 verbose=yes ;;
1209
bec39cab
AC
1210 -version | --version | --versio | --versi | --vers | -V)
1211 ac_init_version=: ;;
c906108c
SS
1212
1213 -with-* | --with-*)
81ecdfbb 1214 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1215 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1217 as_fn_error "invalid package name: $ac_useropt"
1218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
b4e70030 1226 esac
81ecdfbb 1227 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1228
1229 -without-* | --without-*)
81ecdfbb 1230 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1231 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1232 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233 as_fn_error "invalid package name: $ac_useropt"
1234 ac_useropt_orig=$ac_useropt
1235 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236 case $ac_user_opts in
1237 *"
1238"with_$ac_useropt"
1239"*) ;;
1240 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1241 ac_unrecognized_sep=', ';;
1242 esac
1243 eval with_$ac_useropt=no ;;
c906108c
SS
1244
1245 --x)
1246 # Obsolete; use --with-x.
1247 with_x=yes ;;
1248
1249 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1250 | --x-incl | --x-inc | --x-in | --x-i)
1251 ac_prev=x_includes ;;
1252 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1253 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1254 x_includes=$ac_optarg ;;
c906108c
SS
1255
1256 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1257 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1258 ac_prev=x_libraries ;;
1259 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1260 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1261 x_libraries=$ac_optarg ;;
c906108c 1262
81ecdfbb
RW
1263 -*) as_fn_error "unrecognized option: \`$ac_option'
1264Try \`$0 --help' for more information."
c906108c
SS
1265 ;;
1266
bec39cab
AC
1267 *=*)
1268 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1269 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1270 case $ac_envvar in #(
1271 '' | [0-9]* | *[!_$as_cr_alnum]* )
1272 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1273 esac
1274 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1275 export $ac_envvar ;;
1276
c906108c 1277 *)
bec39cab 1278 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1279 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1280 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1281 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1282 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1283 ;;
1284
1285 esac
1286done
1287
1288if test -n "$ac_prev"; then
bec39cab 1289 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1290 as_fn_error "missing argument to $ac_option"
c906108c 1291fi
c906108c 1292
81ecdfbb
RW
1293if test -n "$ac_unrecognized_opts"; then
1294 case $enable_option_checking in
1295 no) ;;
1296 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1297 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1298 esac
81ecdfbb 1299fi
b4e70030 1300
81ecdfbb
RW
1301# Check all directory arguments for consistency.
1302for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1303 datadir sysconfdir sharedstatedir localstatedir includedir \
1304 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1305 libdir localedir mandir
b4e70030 1306do
81ecdfbb
RW
1307 eval ac_val=\$$ac_var
1308 # Remove trailing slashes.
1309 case $ac_val in
1310 */ )
1311 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1312 eval $ac_var=\$ac_val;;
1313 esac
1314 # Be sure to have absolute directory names.
b4e70030 1315 case $ac_val in
81ecdfbb
RW
1316 [\\/$]* | ?:[\\/]* ) continue;;
1317 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1318 esac
81ecdfbb 1319 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1320done
1321
bec39cab
AC
1322# There might be people who depend on the old broken behavior: `$host'
1323# used to hold the argument of --host etc.
1324# FIXME: To remove some day.
1325build=$build_alias
1326host=$host_alias
1327target=$target_alias
1328
1329# FIXME: To remove some day.
1330if test "x$host_alias" != x; then
1331 if test "x$build_alias" = x; then
1332 cross_compiling=maybe
81ecdfbb 1333 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1334 If a cross compiler is detected then cross compile mode will be used." >&2
1335 elif test "x$build_alias" != "x$host_alias"; then
1336 cross_compiling=yes
1337 fi
1338fi
c906108c 1339
bec39cab
AC
1340ac_tool_prefix=
1341test -n "$host_alias" && ac_tool_prefix=$host_alias-
1342
1343test "$silent" = yes && exec 6>/dev/null
c906108c 1344
c906108c 1345
81ecdfbb
RW
1346ac_pwd=`pwd` && test -n "$ac_pwd" &&
1347ac_ls_di=`ls -di .` &&
1348ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1349 as_fn_error "working directory cannot be determined"
1350test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1351 as_fn_error "pwd does not report name of working directory"
1352
1353
c906108c
SS
1354# Find the source files, if location was not specified.
1355if test -z "$srcdir"; then
1356 ac_srcdir_defaulted=yes
81ecdfbb
RW
1357 # Try the directory containing this script, then the parent directory.
1358 ac_confdir=`$as_dirname -- "$as_myself" ||
1359$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1360 X"$as_myself" : 'X\(//\)[^/]' \| \
1361 X"$as_myself" : 'X\(//\)$' \| \
1362 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1363$as_echo X"$as_myself" |
1364 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1365 s//\1/
1366 q
1367 }
1368 /^X\(\/\/\)[^/].*/{
1369 s//\1/
1370 q
1371 }
1372 /^X\(\/\/\)$/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\).*/{
1377 s//\1/
1378 q
1379 }
1380 s/.*/./; q'`
c906108c 1381 srcdir=$ac_confdir
81ecdfbb 1382 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1383 srcdir=..
1384 fi
1385else
1386 ac_srcdir_defaulted=no
1387fi
81ecdfbb
RW
1388if test ! -r "$srcdir/$ac_unique_file"; then
1389 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1390 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1391fi
1392ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1393ac_abs_confdir=`(
1394 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1395 pwd)`
1396# When building in place, set srcdir=.
1397if test "$ac_abs_confdir" = "$ac_pwd"; then
1398 srcdir=.
1399fi
1400# Remove unnecessary trailing slashes from srcdir.
1401# Double slashes in file names in object file debugging info
1402# mess up M-x gdb in Emacs.
1403case $srcdir in
1404*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1405esac
1406for ac_var in $ac_precious_vars; do
1407 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1408 eval ac_env_${ac_var}_value=\$${ac_var}
1409 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1410 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1411done
c906108c 1412
bec39cab
AC
1413#
1414# Report the --help message.
1415#
1416if test "$ac_init_help" = "long"; then
1417 # Omit some internal or obsolete options to make the list less imposing.
1418 # This message is too long to be a string in the A/UX 3.1 sh.
1419 cat <<_ACEOF
1420\`configure' configures this package to adapt to many kinds of systems.
1421
1422Usage: $0 [OPTION]... [VAR=VALUE]...
1423
1424To assign environment variables (e.g., CC, CFLAGS...), specify them as
1425VAR=VALUE. See below for descriptions of some of the useful variables.
1426
1427Defaults for the options are specified in brackets.
1428
1429Configuration:
1430 -h, --help display this help and exit
1431 --help=short display options specific to this package
1432 --help=recursive display the short help of all the included packages
1433 -V, --version display version information and exit
1434 -q, --quiet, --silent do not print \`checking...' messages
1435 --cache-file=FILE cache test results in FILE [disabled]
1436 -C, --config-cache alias for \`--cache-file=config.cache'
1437 -n, --no-create do not create output files
1438 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1439
bec39cab
AC
1440Installation directories:
1441 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1442 [$ac_default_prefix]
bec39cab 1443 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1444 [PREFIX]
bec39cab
AC
1445
1446By default, \`make install' will install all the files in
1447\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1448an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1449for instance \`--prefix=\$HOME'.
1450
1451For better control, use the options below.
1452
1453Fine tuning of the installation directories:
81ecdfbb
RW
1454 --bindir=DIR user executables [EPREFIX/bin]
1455 --sbindir=DIR system admin executables [EPREFIX/sbin]
1456 --libexecdir=DIR program executables [EPREFIX/libexec]
1457 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1458 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1459 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1460 --libdir=DIR object code libraries [EPREFIX/lib]
1461 --includedir=DIR C header files [PREFIX/include]
1462 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1463 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1464 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1465 --infodir=DIR info documentation [DATAROOTDIR/info]
1466 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1467 --mandir=DIR man documentation [DATAROOTDIR/man]
1468 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1469 --htmldir=DIR html documentation [DOCDIR]
1470 --dvidir=DIR dvi documentation [DOCDIR]
1471 --pdfdir=DIR pdf documentation [DOCDIR]
1472 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1473_ACEOF
1474
1475 cat <<\_ACEOF
1476
9009e1ae
MR
1477Program names:
1478 --program-prefix=PREFIX prepend PREFIX to installed program names
1479 --program-suffix=SUFFIX append SUFFIX to installed program names
1480 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1481
bec39cab
AC
1482X features:
1483 --x-includes=DIR X include files are in DIR
1484 --x-libraries=DIR X library files are in DIR
1485
1486System types:
1487 --build=BUILD configure for building on BUILD [guessed]
1488 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1489 --target=TARGET configure for building compilers for TARGET [HOST]
1490_ACEOF
1491fi
1492
1493if test -n "$ac_init_help"; then
1494
1495 cat <<\_ACEOF
1496
1497Optional Features:
81ecdfbb 1498 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1499 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1500 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1501 --enable-maintainer-mode enable make rules and dependencies not useful
1502 (and sometimes confusing) to the casual installer
2974be62 1503 --enable-plugins Enable support for plugins
da2f07f1 1504 --disable-largefile omit support for large files
a1220294
TT
1505 --enable-targets=TARGETS
1506 alternative target configurations
c0993dbe 1507 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1508 --disable-gdbcli disable command-line interface (CLI)
1509 --disable-gdbmi disable machine-interface (MI)
1510 --enable-tui enable full-screen terminal user interface (TUI)
1511 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1512 --enable-profiling enable profiling of GDB
3841debe 1513 --disable-rpath do not hardcode runtime library paths
17ef446e 1514 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1515 --enable-werror treat compile warnings as errors
32c1c914 1516 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1517 --enable-gdb-build-warnings
32c1c914 1518 enable GDB specific build-time compiler warnings if
a1220294 1519 gcc is used
32c1c914 1520 --enable-sim link gdb with simulator
bec39cab 1521 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1522 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1523 is auto)
bec39cab
AC
1524
1525Optional Packages:
1526 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1527 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1528 --with-separate-debug-dir=PATH
32c1c914 1529 look for global separate debug info in this path
62e4f60c 1530 [LIBDIR/debug]
b14b1491
TT
1531 --with-gdb-datadir=PATH look for global separate data files in this path
1532 [DATADIR/gdb]
29b0e8a2 1533 --with-relocated-sources=PATH
32c1c914 1534 automatically relocate this path for source files
7349ff92 1535 --with-auto-load-dir=PATH
aff139ff 1536 directories from which to load auto-loaded scripts
1564a261 1537 [$debugdir:$datadir/auto-load]
bccbefd2 1538 --with-auto-load-safe-path=PATH
aff139ff 1539 directories safe to hold auto-loaded files
7349ff92 1540 [--with-auto-load-dir]
bccbefd2
JK
1541 --without-auto-load-safe-path
1542 do not restrict auto-loaded files locations
05e7c244 1543 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1544 --with-curses use the curses library instead of the termcap
1545 library
c16158bc
JM
1546 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1547 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1548 --with-system-zlib use installed libz
016a3251
DD
1549 --with-gnu-ld assume the C compiler uses GNU ld default=no
1550 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1551 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1552 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1553 --with-system-readline use installed readline library
b8e0a31c
SD
1554 --with-jit-reader-dir=PATH
1555 directory to load the JIT readers from
5c39566f 1556 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1557 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1558 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1559 --with-python[=PYTHON] include python support
1560 (auto/yes/no/<python-program>)
ed3ef339
DE
1561 --with-guile[=GUILE] include guile support
1562 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1563 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1564 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1565 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1566 --without-included-regex
1567 don't use included regex; this is the default on
1568 systems with version 2 of the GNU C library (use
1569 with caution on other system)
81ecdfbb 1570 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1571 --with-system-gdbinit=PATH
32c1c914 1572 automatically load a system-wide gdbinit file
608e2dbb
TT
1573 --with-lzma support lzma compression (auto/yes/no)
1574 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1575 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1576 --with-tcl directory containing tcl configuration (tclConfig.sh)
1577 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1578 --with-x use the X Window System
393fd4c3
YQ
1579 --with-babeltrace include babeltrace support (auto/yes/no)
1580 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1581 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1582
1583Some influential environment variables:
1584 CC C compiler command
1585 CFLAGS C compiler flags
1586 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1587 nonstandard directory <lib dir>
81ecdfbb
RW
1588 LIBS libraries to pass to the linker, e.g. -l<library>
1589 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1590 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1591 CXX C++ compiler command
1592 CXXFLAGS C++ compiler flags
bec39cab 1593 CPP C preprocessor
f06e05e0
JK
1594 MAKEINFO Parent configure detects if it is of sufficient version.
1595 MAKEINFOFLAGS
1596 Parameters for MAKEINFO.
81ecdfbb
RW
1597 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1598 the first program found out of: `bison -y', `byacc', `yacc'.
1599 YFLAGS The list of arguments that will be passed by default to $YACC.
1600 This script will default YFLAGS to the empty string to avoid a
1601 default value of `-d' given by some make applications.
1602 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1603
1604Use these variables to override the choices made by `configure' or to help
1605it to find libraries and programs with nonstandard names/locations.
1606
81ecdfbb 1607Report bugs to the package provider.
bec39cab 1608_ACEOF
81ecdfbb 1609ac_status=$?
bec39cab
AC
1610fi
1611
1612if test "$ac_init_help" = "recursive"; then
1613 # If there are subdirs, report their specific --help.
bec39cab 1614 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1615 test -d "$ac_dir" ||
1616 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1617 continue
bec39cab
AC
1618 ac_builddir=.
1619
81ecdfbb
RW
1620case "$ac_dir" in
1621.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1622*)
1623 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1624 # A ".." for each directory in $ac_dir_suffix.
1625 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1626 case $ac_top_builddir_sub in
1627 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1628 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1629 esac ;;
1630esac
1631ac_abs_top_builddir=$ac_pwd
1632ac_abs_builddir=$ac_pwd$ac_dir_suffix
1633# for backward compatibility:
1634ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1635
1636case $srcdir in
81ecdfbb 1637 .) # We are building in place.
bec39cab 1638 ac_srcdir=.
81ecdfbb
RW
1639 ac_top_srcdir=$ac_top_builddir_sub
1640 ac_abs_top_srcdir=$ac_pwd ;;
1641 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1642 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1643 ac_top_srcdir=$srcdir
1644 ac_abs_top_srcdir=$srcdir ;;
1645 *) # Relative name.
1646 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1647 ac_top_srcdir=$ac_top_build_prefix$srcdir
1648 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1649esac
81ecdfbb 1650ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1651
81ecdfbb
RW
1652 cd "$ac_dir" || { ac_status=$?; continue; }
1653 # Check for guested configure.
1654 if test -f "$ac_srcdir/configure.gnu"; then
1655 echo &&
1656 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1657 elif test -f "$ac_srcdir/configure"; then
1658 echo &&
1659 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1660 else
81ecdfbb
RW
1661 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1662 fi || ac_status=$?
1663 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1664 done
1665fi
1666
81ecdfbb 1667test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1668if $ac_init_version; then
1669 cat <<\_ACEOF
81ecdfbb
RW
1670configure
1671generated by GNU Autoconf 2.64
bec39cab 1672
81ecdfbb 1673Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1674This configure script is free software; the Free Software Foundation
1675gives unlimited permission to copy, distribute and modify it.
1676_ACEOF
81ecdfbb 1677 exit
bec39cab 1678fi
bec39cab 1679
81ecdfbb
RW
1680## ------------------------ ##
1681## Autoconf initialization. ##
1682## ------------------------ ##
bec39cab 1683
81ecdfbb
RW
1684# ac_fn_c_try_compile LINENO
1685# --------------------------
1686# Try to compile conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_compile ()
1688{
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 rm -f conftest.$ac_objext
1691 if { { ac_try="$ac_compile"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_compile") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } && {
1707 test -z "$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 } && test -s conftest.$ac_objext; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1714
81ecdfbb
RW
1715 ac_retval=1
1716fi
1717 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1718 return $ac_retval
1719
1720} # ac_fn_c_try_compile
1721
3bc3d82a
PA
1722# ac_fn_cxx_try_compile LINENO
1723# ----------------------------
1724# Try to compile conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_cxx_try_compile ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext
1729 if { { ac_try="$ac_compile"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_compile") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } && {
1745 test -z "$ac_cxx_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest.$ac_objext; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1756 return $ac_retval
1757
1758} # ac_fn_cxx_try_compile
1759
81ecdfbb
RW
1760# ac_fn_c_try_cpp LINENO
1761# ----------------------
1762# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_cpp ()
bec39cab 1764{
81ecdfbb
RW
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 if { { ac_try="$ac_cpp conftest.$ac_ext"
1767case "(($ac_try" in
1768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769 *) ac_try_echo=$ac_try;;
1770esac
1771eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772$as_echo "$ac_try_echo"; } >&5
1773 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1774 ac_status=$?
1775 if test -s conftest.err; then
1776 grep -v '^ *+' conftest.err >conftest.er1
1777 cat conftest.er1 >&5
1778 mv -f conftest.er1 conftest.err
1779 fi
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } >/dev/null && {
1782 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1783 test ! -s conftest.err
1784 }; then :
1785 ac_retval=0
1786else
1787 $as_echo "$as_me: failed program was:" >&5
1788sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1789
81ecdfbb
RW
1790 ac_retval=1
1791fi
1792 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1793 return $ac_retval
bec39cab 1794
81ecdfbb 1795} # ac_fn_c_try_cpp
bec39cab 1796
81ecdfbb
RW
1797# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1798# -------------------------------------------------------
1799# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1800# the include files in INCLUDES and setting the cache variable VAR
1801# accordingly.
1802ac_fn_c_check_header_mongrel ()
1803{
1804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1807$as_echo_n "checking for $2... " >&6; }
1808if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1809 $as_echo_n "(cached) " >&6
1810fi
1811eval ac_res=\$$3
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1813$as_echo "$ac_res" >&6; }
1814else
1815 # Is the header compilable?
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1817$as_echo_n "checking $2 usability... " >&6; }
1818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821#include <$2>
1822_ACEOF
1823if ac_fn_c_try_compile "$LINENO"; then :
1824 ac_header_compiler=yes
1825else
1826 ac_header_compiler=no
1827fi
1828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1830$as_echo "$ac_header_compiler" >&6; }
bec39cab 1831
81ecdfbb
RW
1832# Is the header present?
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1834$as_echo_n "checking $2 presence... " >&6; }
1835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837#include <$2>
1838_ACEOF
1839if ac_fn_c_try_cpp "$LINENO"; then :
1840 ac_header_preproc=yes
1841else
1842 ac_header_preproc=no
1843fi
1844rm -f conftest.err conftest.$ac_ext
1845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1846$as_echo "$ac_header_preproc" >&6; }
bec39cab 1847
81ecdfbb
RW
1848# So? What about this header?
1849case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1850 yes:no: )
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1852$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1855 ;;
1856 no:yes:* )
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1858$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1860$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1862$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1864$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1866$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1867 ;;
1868esac
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
1871if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1872 $as_echo_n "(cached) " >&6
1873else
1874 eval "$3=\$ac_header_compiler"
1875fi
1876eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
1879fi
1880 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1881
81ecdfbb 1882} # ac_fn_c_check_header_mongrel
bec39cab 1883
81ecdfbb
RW
1884# ac_fn_c_try_run LINENO
1885# ----------------------
1886# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1887# that executables *can* be run.
1888ac_fn_c_try_run ()
1889{
1890 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1891 if { { ac_try="$ac_link"
1892case "(($ac_try" in
1893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1894 *) ac_try_echo=$ac_try;;
1895esac
1896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1897$as_echo "$ac_try_echo"; } >&5
1898 (eval "$ac_link") 2>&5
1899 ac_status=$?
1900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1902 { { case "(($ac_try" in
1903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1904 *) ac_try_echo=$ac_try;;
1905esac
1906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1907$as_echo "$ac_try_echo"; } >&5
1908 (eval "$ac_try") 2>&5
1909 ac_status=$?
1910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1911 test $ac_status = 0; }; }; then :
1912 ac_retval=0
1913else
1914 $as_echo "$as_me: program exited with status $ac_status" >&5
1915 $as_echo "$as_me: failed program was:" >&5
1916sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1917
81ecdfbb
RW
1918 ac_retval=$ac_status
1919fi
1920 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1921 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1922 return $ac_retval
bec39cab 1923
81ecdfbb 1924} # ac_fn_c_try_run
bec39cab 1925
81ecdfbb
RW
1926# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1927# -------------------------------------------------------
1928# Tests whether HEADER exists and can be compiled using the include files in
1929# INCLUDES, setting the cache variable VAR accordingly.
1930ac_fn_c_check_header_compile ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
1935if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1936 $as_echo_n "(cached) " >&6
1937else
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941#include <$2>
bec39cab 1942_ACEOF
81ecdfbb
RW
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 eval "$3=yes"
1945else
1946 eval "$3=no"
1947fi
1948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949fi
1950eval ac_res=\$$3
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952$as_echo "$ac_res" >&6; }
1953 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1954
81ecdfbb 1955} # ac_fn_c_check_header_compile
bec39cab 1956
2974be62
AM
1957# ac_fn_c_try_link LINENO
1958# -----------------------
1959# Try to link conftest.$ac_ext, and return whether this succeeded.
1960ac_fn_c_try_link ()
1961{
1962 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963 rm -f conftest.$ac_objext conftest$ac_exeext
1964 if { { ac_try="$ac_link"
1965case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_link") 2>conftest.err
1972 ac_status=$?
1973 if test -s conftest.err; then
1974 grep -v '^ *+' conftest.err >conftest.er1
1975 cat conftest.er1 >&5
1976 mv -f conftest.er1 conftest.err
1977 fi
1978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979 test $ac_status = 0; } && {
1980 test -z "$ac_c_werror_flag" ||
1981 test ! -s conftest.err
1982 } && test -s conftest$ac_exeext && {
1983 test "$cross_compiling" = yes ||
1984 $as_test_x conftest$ac_exeext
1985 }; then :
1986 ac_retval=0
1987else
1988 $as_echo "$as_me: failed program was:" >&5
1989sed 's/^/| /' conftest.$ac_ext >&5
1990
1991 ac_retval=1
1992fi
1993 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1994 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1995 # interfere with the next link command; also delete a directory that is
1996 # left behind by Apple's compiler. We do this before executing the actions.
1997 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1998 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1999 return $ac_retval
2000
2001} # ac_fn_c_try_link
2002
81ecdfbb
RW
2003# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2004# --------------------------------------------
2005# Tries to find the compile-time value of EXPR in a program that includes
2006# INCLUDES, setting VAR accordingly. Returns whether the value could be
2007# computed
2008ac_fn_c_compute_int ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if test "$cross_compiling" = yes; then
2012 # Depending upon the size, compute the lo and hi bounds.
2013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) >= 0)];
2020test_array [0] = 0
bec39cab 2021
81ecdfbb
RW
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_lo=0 ac_mid=0
2028 while :; do
2029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h. */
2031$4
2032int
2033main ()
2034{
2035static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2036test_array [0] = 0
bec39cab 2037
81ecdfbb
RW
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"; then :
2043 ac_hi=$ac_mid; break
2044else
2045 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2046 if test $ac_lo -le $ac_mid; then
2047 ac_lo= ac_hi=
2048 break
2049 fi
2050 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2051fi
81ecdfbb
RW
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053 done
c906108c 2054else
81ecdfbb
RW
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) < 0)];
2062test_array [0] = 0
bec39cab 2063
81ecdfbb
RW
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_hi=-1 ac_mid=-1
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2078test_array [0] = 0
bec39cab 2079
81ecdfbb
RW
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_lo=$ac_mid; break
2086else
2087 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2088 if test $ac_mid -le $ac_hi; then
2089 ac_lo= ac_hi=
2090 break
2091 fi
2092 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 done
2096else
2097 ac_lo= ac_hi=
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102# Binary search between lo and hi bounds.
2103while test "x$ac_lo" != "x$ac_hi"; do
2104 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2112test_array [0] = 0
bec39cab 2113
81ecdfbb
RW
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
bec39cab 2140
81ecdfbb
RW
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
bec39cab 2161
81ecdfbb
RW
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
bec39cab 2174
81ecdfbb
RW
2175 fi
2176 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2177 return $ac_retval
bec39cab 2178
81ecdfbb 2179} # ac_fn_c_compute_int
bec39cab 2180
55a8c076
YQ
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
81ecdfbb
RW
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
2189if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2190 $as_echo_n "(cached) " >&6
2191else
81ecdfbb
RW
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
55a8c076
YQ
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
2244 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2245
2246} # ac_fn_c_check_func
2247
07697489
PA
2248# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2249# -------------------------------------------
2250# Tests whether TYPE exists after having included INCLUDES, setting cache
2251# variable VAR accordingly.
2252ac_fn_c_check_type ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2256$as_echo_n "checking for $2... " >&6; }
2257if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2258 $as_echo_n "(cached) " >&6
2259else
2260 eval "$3=no"
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$4
2264int
2265main ()
2266{
2267if (sizeof ($2))
2268 return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$4
2277int
2278main ()
2279{
2280if (sizeof (($2)))
2281 return 0;
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
2287
2288else
2289 eval "$3=yes"
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295eval ac_res=\$$3
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
2298 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2299
2300} # ac_fn_c_check_type
2301
770d76d7
PA
2302# ac_fn_c_check_decl LINENO SYMBOL VAR
2303# ------------------------------------
2304# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2305ac_fn_c_check_decl ()
2306{
2307 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308 as_decl_name=`echo $2|sed 's/ *(.*//'`
2309 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2311$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2312if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2313 $as_echo_n "(cached) " >&6
2314else
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$4
2318int
2319main ()
2320{
2321#ifndef $as_decl_name
2322#ifdef __cplusplus
2323 (void) $as_decl_use;
2324#else
2325 (void) $as_decl_name;
2326#endif
2327#endif
2328
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$3=yes"
2335else
2336 eval "$3=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340eval ac_res=\$$3
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2342$as_echo "$ac_res" >&6; }
2343 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2344
2345} # ac_fn_c_check_decl
2346
55a8c076
YQ
2347# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2348# ----------------------------------------------------
2349# Tries to find if the field MEMBER exists in type AGGR, after including
2350# INCLUDES, setting cache variable VAR accordingly.
2351ac_fn_c_check_member ()
2352{
2353 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2355$as_echo_n "checking for $2.$3... " >&6; }
2356if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2357 $as_echo_n "(cached) " >&6
2358else
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h. */
2361$5
2362int
2363main ()
2364{
2365static $2 ac_aggr;
2366if (ac_aggr.$3)
2367return 0;
2368 ;
2369 return 0;
2370}
2371_ACEOF
2372if ac_fn_c_try_compile "$LINENO"; then :
2373 eval "$4=yes"
2374else
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$5
2378int
2379main ()
2380{
2381static $2 ac_aggr;
2382if (sizeof ac_aggr.$3)
2383return 0;
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$4=yes"
2390else
2391 eval "$4=no"
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396fi
2397eval ac_res=\$$4
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399$as_echo "$ac_res" >&6; }
2400 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2401
2402} # ac_fn_c_check_member
81ecdfbb
RW
2403cat >config.log <<_ACEOF
2404This file contains any messages produced by compilers while
2405running configure, to aid debugging if configure makes a mistake.
d5af19ba 2406
81ecdfbb
RW
2407It was created by $as_me, which was
2408generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2409
81ecdfbb 2410 $ $0 $@
413ccac7 2411
81ecdfbb
RW
2412_ACEOF
2413exec 5>>config.log
2414{
2415cat <<_ASUNAME
2416## --------- ##
2417## Platform. ##
2418## --------- ##
413ccac7 2419
81ecdfbb
RW
2420hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2421uname -m = `(uname -m) 2>/dev/null || echo unknown`
2422uname -r = `(uname -r) 2>/dev/null || echo unknown`
2423uname -s = `(uname -s) 2>/dev/null || echo unknown`
2424uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2425
81ecdfbb
RW
2426/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2427/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2428
81ecdfbb
RW
2429/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2430/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2431/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2432/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2433/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2434/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2435/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2436
81ecdfbb 2437_ASUNAME
bec39cab 2438
bec39cab
AC
2439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2440for as_dir in $PATH
2441do
2442 IFS=$as_save_IFS
2443 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2444 $as_echo "PATH: $as_dir"
2445 done
2446IFS=$as_save_IFS
bec39cab 2447
81ecdfbb 2448} >&5
bec39cab 2449
81ecdfbb 2450cat >&5 <<_ACEOF
bec39cab 2451
bec39cab 2452
81ecdfbb
RW
2453## ----------- ##
2454## Core tests. ##
2455## ----------- ##
2456
2457_ACEOF
2458
2459
2460# Keep a trace of the command line.
2461# Strip out --no-create and --no-recursion so they do not pile up.
2462# Strip out --silent because we don't want to record it for future runs.
2463# Also quote any args containing shell meta-characters.
2464# Make two passes to allow for proper duplicate-argument suppression.
2465ac_configure_args=
2466ac_configure_args0=
2467ac_configure_args1=
2468ac_must_keep_next=false
2469for ac_pass in 1 2
2470do
2471 for ac_arg
2472 do
2473 case $ac_arg in
2474 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2475 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2476 | -silent | --silent | --silen | --sile | --sil)
2477 continue ;;
2478 *\'*)
2479 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2480 esac
2481 case $ac_pass in
2482 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2483 2)
2484 as_fn_append ac_configure_args1 " '$ac_arg'"
2485 if test $ac_must_keep_next = true; then
2486 ac_must_keep_next=false # Got value, back to normal.
2487 else
2488 case $ac_arg in
2489 *=* | --config-cache | -C | -disable-* | --disable-* \
2490 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2491 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2492 | -with-* | --with-* | -without-* | --without-* | --x)
2493 case "$ac_configure_args0 " in
2494 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2495 esac
2496 ;;
2497 -* ) ac_must_keep_next=true ;;
2498 esac
2499 fi
2500 as_fn_append ac_configure_args " '$ac_arg'"
2501 ;;
2502 esac
2503 done
2504done
2505{ ac_configure_args0=; unset ac_configure_args0;}
2506{ ac_configure_args1=; unset ac_configure_args1;}
2507
2508# When interrupted or exit'd, cleanup temporary files, and complete
2509# config.log. We remove comments because anyway the quotes in there
2510# would cause problems or look ugly.
2511# WARNING: Use '\'' to represent an apostrophe within the trap.
2512# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2513trap 'exit_status=$?
2514 # Save into config.log some information that might help in debugging.
2515 {
2516 echo
2517
2518 cat <<\_ASBOX
2519## ---------------- ##
2520## Cache variables. ##
2521## ---------------- ##
2522_ASBOX
2523 echo
2524 # The following way of writing the cache mishandles newlines in values,
2525(
2526 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2527 eval ac_val=\$$ac_var
2528 case $ac_val in #(
2529 *${as_nl}*)
2530 case $ac_var in #(
2531 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2532$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2533 esac
2534 case $ac_var in #(
2535 _ | IFS | as_nl) ;; #(
2536 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2537 *) { eval $ac_var=; unset $ac_var;} ;;
2538 esac ;;
2539 esac
2540 done
2541 (set) 2>&1 |
2542 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2543 *${as_nl}ac_space=\ *)
2544 sed -n \
2545 "s/'\''/'\''\\\\'\'''\''/g;
2546 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2547 ;; #(
2548 *)
2549 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2550 ;;
2551 esac |
2552 sort
2553)
2554 echo
2555
2556 cat <<\_ASBOX
2557## ----------------- ##
2558## Output variables. ##
2559## ----------------- ##
2560_ASBOX
2561 echo
2562 for ac_var in $ac_subst_vars
2563 do
2564 eval ac_val=\$$ac_var
2565 case $ac_val in
2566 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2567 esac
2568 $as_echo "$ac_var='\''$ac_val'\''"
2569 done | sort
2570 echo
2571
2572 if test -n "$ac_subst_files"; then
2573 cat <<\_ASBOX
2574## ------------------- ##
2575## File substitutions. ##
2576## ------------------- ##
2577_ASBOX
2578 echo
2579 for ac_var in $ac_subst_files
2580 do
2581 eval ac_val=\$$ac_var
2582 case $ac_val in
2583 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2584 esac
2585 $as_echo "$ac_var='\''$ac_val'\''"
2586 done | sort
2587 echo
2588 fi
2589
2590 if test -s confdefs.h; then
2591 cat <<\_ASBOX
2592## ----------- ##
2593## confdefs.h. ##
2594## ----------- ##
2595_ASBOX
2596 echo
2597 cat confdefs.h
2598 echo
2599 fi
2600 test "$ac_signal" != 0 &&
2601 $as_echo "$as_me: caught signal $ac_signal"
2602 $as_echo "$as_me: exit $exit_status"
2603 } >&5
2604 rm -f core *.core core.conftest.* &&
2605 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2606 exit $exit_status
2607' 0
2608for ac_signal in 1 2 13 15; do
2609 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2610done
2611ac_signal=0
2612
2613# confdefs.h avoids OS command line length limits that DEFS can exceed.
2614rm -f -r conftest* confdefs.h
2615
2616$as_echo "/* confdefs.h */" > confdefs.h
2617
2618# Predefined preprocessor variables.
2619
2620cat >>confdefs.h <<_ACEOF
2621#define PACKAGE_NAME "$PACKAGE_NAME"
2622_ACEOF
2623
2624cat >>confdefs.h <<_ACEOF
2625#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2626_ACEOF
2627
2628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_VERSION "$PACKAGE_VERSION"
2630_ACEOF
2631
2632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_STRING "$PACKAGE_STRING"
2634_ACEOF
2635
2636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2638_ACEOF
2639
2640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_URL "$PACKAGE_URL"
2642_ACEOF
2643
2644
2645# Let the site file select an alternate cache file if it wants to.
2646# Prefer an explicitly selected file to automatically selected ones.
2647ac_site_file1=NONE
2648ac_site_file2=NONE
2649if test -n "$CONFIG_SITE"; then
2650 ac_site_file1=$CONFIG_SITE
2651elif test "x$prefix" != xNONE; then
2652 ac_site_file1=$prefix/share/config.site
2653 ac_site_file2=$prefix/etc/config.site
2654else
2655 ac_site_file1=$ac_default_prefix/share/config.site
2656 ac_site_file2=$ac_default_prefix/etc/config.site
2657fi
2658for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2659do
2660 test "x$ac_site_file" = xNONE && continue
2661 if test -r "$ac_site_file"; then
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2663$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2664 sed 's/^/| /' "$ac_site_file" >&5
2665 . "$ac_site_file"
2666 fi
2667done
2668
2669if test -r "$cache_file"; then
2670 # Some versions of bash will fail to source /dev/null (special
2671 # files actually), so we avoid doing that.
2672 if test -f "$cache_file"; then
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2674$as_echo "$as_me: loading cache $cache_file" >&6;}
2675 case $cache_file in
2676 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2677 *) . "./$cache_file";;
2678 esac
2679 fi
2680else
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2682$as_echo "$as_me: creating cache $cache_file" >&6;}
2683 >$cache_file
bec39cab
AC
2684fi
2685
81ecdfbb
RW
2686# Check that the precious variables saved in the cache have kept the same
2687# value.
2688ac_cache_corrupted=false
2689for ac_var in $ac_precious_vars; do
2690 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2691 eval ac_new_set=\$ac_env_${ac_var}_set
2692 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2693 eval ac_new_val=\$ac_env_${ac_var}_value
2694 case $ac_old_set,$ac_new_set in
2695 set,)
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2697$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2698 ac_cache_corrupted=: ;;
2699 ,set)
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2701$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2702 ac_cache_corrupted=: ;;
2703 ,);;
2704 *)
2705 if test "x$ac_old_val" != "x$ac_new_val"; then
2706 # differences in whitespace do not lead to failure.
2707 ac_old_val_w=`echo x $ac_old_val`
2708 ac_new_val_w=`echo x $ac_new_val`
2709 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2711$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2712 ac_cache_corrupted=:
2713 else
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2715$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2716 eval $ac_var=\$ac_old_val
2717 fi
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2719$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2721$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2722 fi;;
2723 esac
2724 # Pass precious variables to config.status.
2725 if test "$ac_new_set" = set; then
2726 case $ac_new_val in
2727 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2728 *) ac_arg=$ac_var=$ac_new_val ;;
2729 esac
2730 case " $ac_configure_args " in
2731 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2732 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2733 esac
2734 fi
2735done
2736if $ac_cache_corrupted; then
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2740$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2741 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2742fi
2743## -------------------- ##
2744## Main body of script. ##
2745## -------------------- ##
2746
2747ac_ext=c
2748ac_cpp='$CPP $CPPFLAGS'
2749ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2750ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2751ac_compiler_gnu=$ac_cv_c_compiler_gnu
2752
2753
2754
2755
2756
2757ac_config_headers="$ac_config_headers config.h:config.in"
2758
2759
2760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2761$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2762 # Check whether --enable-maintainer-mode was given.
2763if test "${enable_maintainer_mode+set}" = set; then :
2764 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2765else
2766 USE_MAINTAINER_MODE=no
2767fi
2768
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2770$as_echo "$USE_MAINTAINER_MODE" >&6; }
2771 if test $USE_MAINTAINER_MODE = yes; then
2772 MAINTAINER_MODE_TRUE=
2773 MAINTAINER_MODE_FALSE='#'
2774else
2775 MAINTAINER_MODE_TRUE='#'
2776 MAINTAINER_MODE_FALSE=
2777fi
2778
2779 MAINT=$MAINTAINER_MODE_TRUE
2780
2781
2782
17ef446e 2783# Set the 'development' global.
270c9937 2784. $srcdir/../bfd/development.sh
f5f1cdb6 2785
81ecdfbb
RW
2786ac_ext=c
2787ac_cpp='$CPP $CPPFLAGS'
2788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2790ac_compiler_gnu=$ac_cv_c_compiler_gnu
2791if test -n "$ac_tool_prefix"; then
2792 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2793set dummy ${ac_tool_prefix}gcc; ac_word=$2
2794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2795$as_echo_n "checking for $ac_word... " >&6; }
2796if test "${ac_cv_prog_CC+set}" = set; then :
2797 $as_echo_n "(cached) " >&6
c906108c
SS
2798else
2799 if test -n "$CC"; then
2800 ac_cv_prog_CC="$CC" # Let the user override the test.
2801else
bec39cab
AC
2802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2803for as_dir in $PATH
2804do
2805 IFS=$as_save_IFS
2806 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2807 for ac_exec_ext in '' $ac_executable_extensions; do
2808 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2809 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2811 break 2
2812 fi
2813done
81ecdfbb
RW
2814 done
2815IFS=$as_save_IFS
bec39cab 2816
c906108c
SS
2817fi
2818fi
bec39cab 2819CC=$ac_cv_prog_CC
c906108c 2820if test -n "$CC"; then
81ecdfbb
RW
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2822$as_echo "$CC" >&6; }
c906108c 2823else
81ecdfbb
RW
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2825$as_echo "no" >&6; }
c906108c
SS
2826fi
2827
81ecdfbb 2828
b4e70030
JB
2829fi
2830if test -z "$ac_cv_prog_CC"; then
2831 ac_ct_CC=$CC
81ecdfbb
RW
2832 # Extract the first word of "gcc", so it can be a program name with args.
2833set dummy gcc; ac_word=$2
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2835$as_echo_n "checking for $ac_word... " >&6; }
2836if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2837 $as_echo_n "(cached) " >&6
b4e70030
JB
2838else
2839 if test -n "$ac_ct_CC"; then
2840 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2841else
2842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2843for as_dir in $PATH
2844do
2845 IFS=$as_save_IFS
2846 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2847 for ac_exec_ext in '' $ac_executable_extensions; do
2848 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2849 ac_cv_prog_ac_ct_CC="gcc"
2850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2851 break 2
4e8d927d 2852 fi
b4e70030 2853done
81ecdfbb
RW
2854 done
2855IFS=$as_save_IFS
b4e70030
JB
2856
2857fi
2858fi
2859ac_ct_CC=$ac_cv_prog_ac_ct_CC
2860if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2862$as_echo "$ac_ct_CC" >&6; }
b4e70030 2863else
81ecdfbb
RW
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2865$as_echo "no" >&6; }
b4e70030
JB
2866fi
2867
81ecdfbb
RW
2868 if test "x$ac_ct_CC" = x; then
2869 CC=""
2870 else
2871 case $cross_compiling:$ac_tool_warned in
2872yes:)
2873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2875ac_tool_warned=yes ;;
2876esac
2877 CC=$ac_ct_CC
2878 fi
b4e70030
JB
2879else
2880 CC="$ac_cv_prog_CC"
2881fi
2882
c906108c 2883if test -z "$CC"; then
81ecdfbb
RW
2884 if test -n "$ac_tool_prefix"; then
2885 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2886set dummy ${ac_tool_prefix}cc; ac_word=$2
2887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2888$as_echo_n "checking for $ac_word... " >&6; }
2889if test "${ac_cv_prog_CC+set}" = set; then :
2890 $as_echo_n "(cached) " >&6
c906108c
SS
2891else
2892 if test -n "$CC"; then
2893 ac_cv_prog_CC="$CC" # Let the user override the test.
2894else
bec39cab
AC
2895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2896for as_dir in $PATH
2897do
2898 IFS=$as_save_IFS
2899 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2900 for ac_exec_ext in '' $ac_executable_extensions; do
2901 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2902 ac_cv_prog_CC="${ac_tool_prefix}cc"
2903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2904 break 2
2905 fi
2906done
81ecdfbb
RW
2907 done
2908IFS=$as_save_IFS
2909
2910fi
2911fi
2912CC=$ac_cv_prog_CC
2913if test -n "$CC"; then
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2915$as_echo "$CC" >&6; }
2916else
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2918$as_echo "no" >&6; }
2919fi
2920
2921
2922 fi
2923fi
2924if test -z "$CC"; then
2925 # Extract the first word of "cc", so it can be a program name with args.
2926set dummy cc; ac_word=$2
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2928$as_echo_n "checking for $ac_word... " >&6; }
2929if test "${ac_cv_prog_CC+set}" = set; then :
2930 $as_echo_n "(cached) " >&6
2931else
2932 if test -n "$CC"; then
2933 ac_cv_prog_CC="$CC" # Let the user override the test.
2934else
2935 ac_prog_rejected=no
2936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2937for as_dir in $PATH
2938do
2939 IFS=$as_save_IFS
2940 test -z "$as_dir" && as_dir=.
2941 for ac_exec_ext in '' $ac_executable_extensions; do
2942 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2943 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2944 ac_prog_rejected=yes
2945 continue
2946 fi
2947 ac_cv_prog_CC="cc"
2948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2949 break 2
2950 fi
2951done
2952 done
2953IFS=$as_save_IFS
bec39cab 2954
c906108c
SS
2955if test $ac_prog_rejected = yes; then
2956 # We found a bogon in the path, so make sure we never use it.
2957 set dummy $ac_cv_prog_CC
2958 shift
bec39cab 2959 if test $# != 0; then
c906108c
SS
2960 # We chose a different compiler from the bogus one.
2961 # However, it has the same basename, so the bogon will be chosen
2962 # first if we set CC to just the basename; use the full file name.
2963 shift
bec39cab 2964 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2965 fi
2966fi
2967fi
2968fi
bec39cab 2969CC=$ac_cv_prog_CC
c906108c 2970if test -n "$CC"; then
81ecdfbb
RW
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2972$as_echo "$CC" >&6; }
c906108c 2973else
81ecdfbb
RW
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2975$as_echo "no" >&6; }
c906108c
SS
2976fi
2977
81ecdfbb 2978
bec39cab
AC
2979fi
2980if test -z "$CC"; then
2981 if test -n "$ac_tool_prefix"; then
81ecdfbb 2982 for ac_prog in cl.exe
bec39cab
AC
2983 do
2984 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2985set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2987$as_echo_n "checking for $ac_word... " >&6; }
2988if test "${ac_cv_prog_CC+set}" = set; then :
2989 $as_echo_n "(cached) " >&6
c906108c
SS
2990else
2991 if test -n "$CC"; then
2992 ac_cv_prog_CC="$CC" # Let the user override the test.
2993else
bec39cab
AC
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997 IFS=$as_save_IFS
2998 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2999 for ac_exec_ext in '' $ac_executable_extensions; do
3000 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3001 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3003 break 2
3004 fi
3005done
81ecdfbb
RW
3006 done
3007IFS=$as_save_IFS
bec39cab 3008
c906108c
SS
3009fi
3010fi
bec39cab 3011CC=$ac_cv_prog_CC
c906108c 3012if test -n "$CC"; then
81ecdfbb
RW
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3014$as_echo "$CC" >&6; }
c906108c 3015else
81ecdfbb
RW
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3017$as_echo "no" >&6; }
c906108c 3018fi
bec39cab 3019
81ecdfbb 3020
bec39cab
AC
3021 test -n "$CC" && break
3022 done
3023fi
3024if test -z "$CC"; then
3025 ac_ct_CC=$CC
81ecdfbb 3026 for ac_prog in cl.exe
bec39cab
AC
3027do
3028 # Extract the first word of "$ac_prog", so it can be a program name with args.
3029set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3031$as_echo_n "checking for $ac_word... " >&6; }
3032if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3033 $as_echo_n "(cached) " >&6
bec39cab
AC
3034else
3035 if test -n "$ac_ct_CC"; then
3036 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3037else
3038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3039for as_dir in $PATH
3040do
3041 IFS=$as_save_IFS
3042 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3043 for ac_exec_ext in '' $ac_executable_extensions; do
3044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3045 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3047 break 2
c906108c 3048 fi
bec39cab 3049done
81ecdfbb
RW
3050 done
3051IFS=$as_save_IFS
bec39cab
AC
3052
3053fi
3054fi
3055ac_ct_CC=$ac_cv_prog_ac_ct_CC
3056if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3058$as_echo "$ac_ct_CC" >&6; }
bec39cab 3059else
81ecdfbb
RW
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3061$as_echo "no" >&6; }
c906108c
SS
3062fi
3063
81ecdfbb 3064
bec39cab
AC
3065 test -n "$ac_ct_CC" && break
3066done
c906108c 3067
81ecdfbb
RW
3068 if test "x$ac_ct_CC" = x; then
3069 CC=""
3070 else
3071 case $cross_compiling:$ac_tool_warned in
3072yes:)
3073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3075ac_tool_warned=yes ;;
3076esac
3077 CC=$ac_ct_CC
3078 fi
bec39cab
AC
3079fi
3080
3081fi
3082
3083
81ecdfbb
RW
3084test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3086as_fn_error "no acceptable C compiler found in \$PATH
3087See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3088
3089# Provide some information about the compiler.
81ecdfbb
RW
3090$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3091set X $ac_compile
3092ac_compiler=$2
3093for ac_option in --version -v -V -qversion; do
3094 { { ac_try="$ac_compiler $ac_option >&5"
3095case "(($ac_try" in
3096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3097 *) ac_try_echo=$ac_try;;
3098esac
3099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3100$as_echo "$ac_try_echo"; } >&5
3101 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3102 ac_status=$?
81ecdfbb
RW
3103 if test -s conftest.err; then
3104 sed '10a\
3105... rest of stderr output deleted ...
3106 10q' conftest.err >conftest.er1
3107 cat conftest.er1 >&5
3108 rm -f conftest.er1 conftest.err
3109 fi
3110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3111 test $ac_status = 0; }
3112done
bec39cab 3113
81ecdfbb 3114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3115/* end confdefs.h. */
3116
3117int
3118main ()
3119{
3120
3121 ;
3122 return 0;
3123}
3124_ACEOF
3125ac_clean_files_save=$ac_clean_files
81ecdfbb 3126ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3127# Try to create an executable without -o first, disregard a.out.
3128# It will help us diagnose broken compilers, and finding out an intuition
3129# of exeext.
81ecdfbb
RW
3130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3131$as_echo_n "checking for C compiler default output file name... " >&6; }
3132ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3133
3134# The possible output files:
3135ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3136
3137ac_rmfiles=
3138for ac_file in $ac_files
3139do
3140 case $ac_file in
3141 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3142 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3143 esac
3144done
3145rm -f $ac_rmfiles
3146
3147if { { ac_try="$ac_link_default"
3148case "(($ac_try" in
3149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3150 *) ac_try_echo=$ac_try;;
3151esac
3152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3153$as_echo "$ac_try_echo"; } >&5
3154 (eval "$ac_link_default") 2>&5
3155 ac_status=$?
3156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3157 test $ac_status = 0; }; then :
3158 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3159# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3160# in a Makefile. We should not override ac_cv_exeext if it was cached,
3161# so that the user can short-circuit this test for compilers unknown to
3162# Autoconf.
3163for ac_file in $ac_files ''
bec39cab
AC
3164do
3165 test -f "$ac_file" || continue
3166 case $ac_file in
81ecdfbb 3167 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3168 ;;
3169 [ab].out )
3170 # We found the default executable, but exeext='' is most
3171 # certainly right.
3172 break;;
3173 *.* )
81ecdfbb
RW
3174 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3175 then :; else
3176 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3177 fi
3178 # We set ac_cv_exeext here because the later test for it is not
3179 # safe: cross compilers may not add the suffix if given an `-o'
3180 # argument, so we may need to know it at that point already.
3181 # Even if this section looks crufty: it has the advantage of
3182 # actually working.
b4e70030
JB
3183 break;;
3184 * )
3185 break;;
bec39cab
AC
3186 esac
3187done
81ecdfbb
RW
3188test "$ac_cv_exeext" = no && ac_cv_exeext=
3189
bec39cab 3190else
81ecdfbb
RW
3191 ac_file=''
3192fi
3193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3194$as_echo "$ac_file" >&6; }
3195if test -z "$ac_file"; then :
3196 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3197sed 's/^/| /' conftest.$ac_ext >&5
3198
81ecdfbb
RW
3199{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3201{ as_fn_set_status 77
3202as_fn_error "C compiler cannot create executables
3203See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3204fi
b4e70030 3205ac_exeext=$ac_cv_exeext
b4e70030 3206
81ecdfbb 3207# Check that the compiler produces executables we can run. If not, either
bec39cab 3208# the compiler is broken, or we cross compile.
81ecdfbb
RW
3209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3210$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3211# If not cross compiling, check that we can run a simple program.
3212if test "$cross_compiling" != yes; then
3213 if { ac_try='./$ac_file'
81ecdfbb
RW
3214 { { case "(($ac_try" in
3215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3216 *) ac_try_echo=$ac_try;;
3217esac
3218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3219$as_echo "$ac_try_echo"; } >&5
3220 (eval "$ac_try") 2>&5
bec39cab 3221 ac_status=$?
81ecdfbb
RW
3222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3223 test $ac_status = 0; }; }; then
bec39cab 3224 cross_compiling=no
c906108c 3225 else
bec39cab
AC
3226 if test "$cross_compiling" = maybe; then
3227 cross_compiling=yes
3228 else
81ecdfbb
RW
3229 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3231as_fn_error "cannot run C compiled programs.
bec39cab 3232If you meant to cross compile, use \`--host'.
81ecdfbb 3233See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3234 fi
c906108c 3235 fi
bec39cab 3236fi
81ecdfbb
RW
3237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3238$as_echo "yes" >&6; }
bec39cab 3239
81ecdfbb 3240rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3241ac_clean_files=$ac_clean_files_save
81ecdfbb 3242# Check that the compiler produces executables we can run. If not, either
b4e70030 3243# the compiler is broken, or we cross compile.
81ecdfbb
RW
3244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3245$as_echo_n "checking whether we are cross compiling... " >&6; }
3246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3247$as_echo "$cross_compiling" >&6; }
3248
3249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3250$as_echo_n "checking for suffix of executables... " >&6; }
3251if { { ac_try="$ac_link"
3252case "(($ac_try" in
3253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3254 *) ac_try_echo=$ac_try;;
3255esac
3256eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3257$as_echo "$ac_try_echo"; } >&5
3258 (eval "$ac_link") 2>&5
bec39cab 3259 ac_status=$?
81ecdfbb
RW
3260 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3261 test $ac_status = 0; }; then :
b4e70030
JB
3262 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3263# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3264# work properly (i.e., refer to `conftest.exe'), while it won't with
3265# `rm'.
3266for ac_file in conftest.exe conftest conftest.*; do
3267 test -f "$ac_file" || continue
3268 case $ac_file in
81ecdfbb 3269 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3270 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3271 break;;
3272 * ) break;;
3273 esac
3274done
c906108c 3275else
81ecdfbb
RW
3276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3278as_fn_error "cannot compute suffix of executables: cannot compile and link
3279See \`config.log' for more details." "$LINENO" 5; }
c906108c 3280fi
b4e70030 3281rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3283$as_echo "$ac_cv_exeext" >&6; }
c906108c 3284
b4e70030 3285rm -f conftest.$ac_ext
bec39cab
AC
3286EXEEXT=$ac_cv_exeext
3287ac_exeext=$EXEEXT
81ecdfbb
RW
3288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3289$as_echo_n "checking for suffix of object files... " >&6; }
3290if test "${ac_cv_objext+set}" = set; then :
3291 $as_echo_n "(cached) " >&6
bec39cab 3292else
81ecdfbb 3293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3294/* end confdefs.h. */
3295
3296int
3297main ()
3298{
3299
3300 ;
3301 return 0;
3302}
3303_ACEOF
3304rm -f conftest.o conftest.obj
81ecdfbb
RW
3305if { { ac_try="$ac_compile"
3306case "(($ac_try" in
3307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3308 *) ac_try_echo=$ac_try;;
3309esac
3310eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3311$as_echo "$ac_try_echo"; } >&5
3312 (eval "$ac_compile") 2>&5
3313 ac_status=$?
3314 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3315 test $ac_status = 0; }; then :
3316 for ac_file in conftest.o conftest.obj conftest.*; do
3317 test -f "$ac_file" || continue;
bec39cab 3318 case $ac_file in
81ecdfbb 3319 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3320 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3321 break;;
3322 esac
3323done
c906108c 3324else
81ecdfbb 3325 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3326sed 's/^/| /' conftest.$ac_ext >&5
3327
81ecdfbb
RW
3328{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3330as_fn_error "cannot compute suffix of object files: cannot compile
3331See \`config.log' for more details." "$LINENO" 5; }
c906108c 3332fi
b4e70030 3333rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3334fi
81ecdfbb
RW
3335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3336$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3337OBJEXT=$ac_cv_objext
3338ac_objext=$OBJEXT
81ecdfbb
RW
3339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3340$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3341if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3342 $as_echo_n "(cached) " >&6
c906108c 3343else
81ecdfbb 3344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3345/* end confdefs.h. */
3346
3347int
3348main ()
3349{
3350#ifndef __GNUC__
3351 choke me
3352#endif
3353
3354 ;
3355 return 0;
3356}
3357_ACEOF
81ecdfbb 3358if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3359 ac_compiler_gnu=yes
3360else
81ecdfbb 3361 ac_compiler_gnu=no
bec39cab 3362fi
81ecdfbb 3363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3364ac_cv_c_compiler_gnu=$ac_compiler_gnu
3365
3366fi
81ecdfbb
RW
3367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3368$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3369if test $ac_compiler_gnu = yes; then
3370 GCC=yes
3371else
3372 GCC=
3373fi
bec39cab
AC
3374ac_test_CFLAGS=${CFLAGS+set}
3375ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3377$as_echo_n "checking whether $CC accepts -g... " >&6; }
3378if test "${ac_cv_prog_cc_g+set}" = set; then :
3379 $as_echo_n "(cached) " >&6
bec39cab 3380else
81ecdfbb
RW
3381 ac_save_c_werror_flag=$ac_c_werror_flag
3382 ac_c_werror_flag=yes
3383 ac_cv_prog_cc_g=no
3384 CFLAGS="-g"
3385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3386/* end confdefs.h. */
3387
3388int
3389main ()
3390{
3391
3392 ;
3393 return 0;
3394}
3395_ACEOF
81ecdfbb 3396if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3397 ac_cv_prog_cc_g=yes
3398else
81ecdfbb
RW
3399 CFLAGS=""
3400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3401/* end confdefs.h. */
3402
3403int
3404main ()
3405{
3406
3407 ;
3408 return 0;
3409}
3410_ACEOF
3411if ac_fn_c_try_compile "$LINENO"; then :
3412
3413else
3414 ac_c_werror_flag=$ac_save_c_werror_flag
3415 CFLAGS="-g"
3416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3417/* end confdefs.h. */
3418
3419int
3420main ()
3421{
c906108c 3422
81ecdfbb
RW
3423 ;
3424 return 0;
3425}
3426_ACEOF
3427if ac_fn_c_try_compile "$LINENO"; then :
3428 ac_cv_prog_cc_g=yes
3429fi
3430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3431fi
3432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3433fi
81ecdfbb
RW
3434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3435 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3436fi
81ecdfbb
RW
3437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3438$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3439if test "$ac_test_CFLAGS" = set; then
bec39cab 3440 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3441elif test $ac_cv_prog_cc_g = yes; then
3442 if test "$GCC" = yes; then
3443 CFLAGS="-g -O2"
3444 else
3445 CFLAGS="-g"
3446 fi
3447else
3448 if test "$GCC" = yes; then
3449 CFLAGS="-O2"
3450 else
3451 CFLAGS=
3452 fi
3453fi
81ecdfbb
RW
3454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3455$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3456if test "${ac_cv_prog_cc_c89+set}" = set; then :
3457 $as_echo_n "(cached) " >&6
bec39cab 3458else
81ecdfbb 3459 ac_cv_prog_cc_c89=no
bec39cab 3460ac_save_CC=$CC
81ecdfbb 3461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3462/* end confdefs.h. */
c906108c
SS
3463#include <stdarg.h>
3464#include <stdio.h>
3465#include <sys/types.h>
3466#include <sys/stat.h>
3467/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3468struct buf { int x; };
3469FILE * (*rcsopen) (struct buf *, struct stat *, int);
3470static char *e (p, i)
3471 char **p;
3472 int i;
3473{
3474 return p[i];
3475}
3476static char *f (char * (*g) (char **, int), char **p, ...)
3477{
3478 char *s;
3479 va_list v;
3480 va_start (v,p);
3481 s = g (p, va_arg (v,int));
3482 va_end (v);
3483 return s;
3484}
bec39cab
AC
3485
3486/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3487 function prototypes and stuff, but not '\xHH' hex character constants.
3488 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3489 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3490 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3491 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3492 that's true only with -std. */
bec39cab
AC
3493int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3494
81ecdfbb
RW
3495/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3496 inside strings and character constants. */
3497#define FOO(x) 'x'
3498int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3499
c906108c
SS
3500int test (int i, double x);
3501struct s1 {int (*f) (int a);};
3502struct s2 {int (*f) (double a);};
3503int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3504int argc;
3505char **argv;
bec39cab
AC
3506int
3507main ()
3508{
c906108c 3509return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3510 ;
3511 return 0;
3512}
3513_ACEOF
81ecdfbb
RW
3514for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3515 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3516do
3517 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3518 if ac_fn_c_try_compile "$LINENO"; then :
3519 ac_cv_prog_cc_c89=$ac_arg
c906108c 3520fi
81ecdfbb
RW
3521rm -f core conftest.err conftest.$ac_objext
3522 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3523done
81ecdfbb 3524rm -f conftest.$ac_ext
bec39cab 3525CC=$ac_save_CC
c906108c
SS
3526
3527fi
81ecdfbb
RW
3528# AC_CACHE_VAL
3529case "x$ac_cv_prog_cc_c89" in
3530 x)
3531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3532$as_echo "none needed" >&6; } ;;
3533 xno)
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3535$as_echo "unsupported" >&6; } ;;
bec39cab 3536 *)
81ecdfbb
RW
3537 CC="$CC $ac_cv_prog_cc_c89"
3538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3539$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3540esac
81ecdfbb 3541if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3542
b4e70030
JB
3543fi
3544
bec39cab
AC
3545ac_ext=c
3546ac_cpp='$CPP $CPPFLAGS'
3547ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3548ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3549ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3550
3bc3d82a
PA
3551ac_ext=cpp
3552ac_cpp='$CXXCPP $CPPFLAGS'
3553ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3554ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3555ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3556if test -z "$CXX"; then
3557 if test -n "$CCC"; then
3558 CXX=$CCC
3559 else
3560 if test -n "$ac_tool_prefix"; then
3561 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3562 do
3563 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3564set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3566$as_echo_n "checking for $ac_word... " >&6; }
3567if test "${ac_cv_prog_CXX+set}" = set; then :
3568 $as_echo_n "(cached) " >&6
3569else
3570 if test -n "$CXX"; then
3571 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3572else
3573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3574for as_dir in $PATH
3575do
3576 IFS=$as_save_IFS
3577 test -z "$as_dir" && as_dir=.
3578 for ac_exec_ext in '' $ac_executable_extensions; do
3579 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3580 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3582 break 2
3583 fi
3584done
3585 done
3586IFS=$as_save_IFS
3587
3588fi
3589fi
3590CXX=$ac_cv_prog_CXX
3591if test -n "$CXX"; then
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3593$as_echo "$CXX" >&6; }
3594else
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3596$as_echo "no" >&6; }
3597fi
3598
3599
3600 test -n "$CXX" && break
3601 done
3602fi
3603if test -z "$CXX"; then
3604 ac_ct_CXX=$CXX
3605 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3606do
3607 # Extract the first word of "$ac_prog", so it can be a program name with args.
3608set dummy $ac_prog; ac_word=$2
3609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610$as_echo_n "checking for $ac_word... " >&6; }
3611if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3612 $as_echo_n "(cached) " >&6
3613else
3614 if test -n "$ac_ct_CXX"; then
3615 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3616else
3617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618for as_dir in $PATH
3619do
3620 IFS=$as_save_IFS
3621 test -z "$as_dir" && as_dir=.
3622 for ac_exec_ext in '' $ac_executable_extensions; do
3623 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3624 ac_cv_prog_ac_ct_CXX="$ac_prog"
3625 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3626 break 2
3627 fi
3628done
3629 done
3630IFS=$as_save_IFS
3631
3632fi
3633fi
3634ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3635if test -n "$ac_ct_CXX"; then
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3637$as_echo "$ac_ct_CXX" >&6; }
3638else
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3640$as_echo "no" >&6; }
3641fi
3642
3643
3644 test -n "$ac_ct_CXX" && break
3645done
3646
3647 if test "x$ac_ct_CXX" = x; then
3648 CXX="g++"
3649 else
3650 case $cross_compiling:$ac_tool_warned in
3651yes:)
3652{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3653$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3654ac_tool_warned=yes ;;
3655esac
3656 CXX=$ac_ct_CXX
3657 fi
3658fi
3659
3660 fi
3661fi
3662# Provide some information about the compiler.
3663$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3664set X $ac_compile
3665ac_compiler=$2
3666for ac_option in --version -v -V -qversion; do
3667 { { ac_try="$ac_compiler $ac_option >&5"
3668case "(($ac_try" in
3669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3670 *) ac_try_echo=$ac_try;;
3671esac
3672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3673$as_echo "$ac_try_echo"; } >&5
3674 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3675 ac_status=$?
3676 if test -s conftest.err; then
3677 sed '10a\
3678... rest of stderr output deleted ...
3679 10q' conftest.err >conftest.er1
3680 cat conftest.er1 >&5
3681 rm -f conftest.er1 conftest.err
3682 fi
3683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }
3685done
3686
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3688$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3689if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3690 $as_echo_n "(cached) " >&6
3691else
3692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3693/* end confdefs.h. */
3694
3695int
3696main ()
3697{
3698#ifndef __GNUC__
3699 choke me
3700#endif
3701
3702 ;
3703 return 0;
3704}
3705_ACEOF
3706if ac_fn_cxx_try_compile "$LINENO"; then :
3707 ac_compiler_gnu=yes
3708else
3709 ac_compiler_gnu=no
3710fi
3711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3712ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3713
3714fi
3715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3716$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3717if test $ac_compiler_gnu = yes; then
3718 GXX=yes
3719else
3720 GXX=
3721fi
3722ac_test_CXXFLAGS=${CXXFLAGS+set}
3723ac_save_CXXFLAGS=$CXXFLAGS
3724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3725$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3726if test "${ac_cv_prog_cxx_g+set}" = set; then :
3727 $as_echo_n "(cached) " >&6
3728else
3729 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3730 ac_cxx_werror_flag=yes
3731 ac_cv_prog_cxx_g=no
3732 CXXFLAGS="-g"
3733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3734/* end confdefs.h. */
3735
3736int
3737main ()
3738{
3739
3740 ;
3741 return 0;
3742}
3743_ACEOF
3744if ac_fn_cxx_try_compile "$LINENO"; then :
3745 ac_cv_prog_cxx_g=yes
3746else
3747 CXXFLAGS=""
3748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749/* end confdefs.h. */
3750
3751int
3752main ()
3753{
3754
3755 ;
3756 return 0;
3757}
3758_ACEOF
3759if ac_fn_cxx_try_compile "$LINENO"; then :
3760
3761else
3762 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3763 CXXFLAGS="-g"
3764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3765/* end confdefs.h. */
3766
3767int
3768main ()
3769{
3770
3771 ;
3772 return 0;
3773}
3774_ACEOF
3775if ac_fn_cxx_try_compile "$LINENO"; then :
3776 ac_cv_prog_cxx_g=yes
3777fi
3778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3779fi
3780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3781fi
3782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3783 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3784fi
3785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3786$as_echo "$ac_cv_prog_cxx_g" >&6; }
3787if test "$ac_test_CXXFLAGS" = set; then
3788 CXXFLAGS=$ac_save_CXXFLAGS
3789elif test $ac_cv_prog_cxx_g = yes; then
3790 if test "$GXX" = yes; then
3791 CXXFLAGS="-g -O2"
3792 else
3793 CXXFLAGS="-g"
3794 fi
3795else
3796 if test "$GXX" = yes; then
3797 CXXFLAGS="-O2"
3798 else
3799 CXXFLAGS=
3800 fi
3801fi
3802ac_ext=c
3803ac_cpp='$CPP $CPPFLAGS'
3804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3806ac_compiler_gnu=$ac_cv_c_compiler_gnu
3807
3808
60ca704f 3809
bec39cab
AC
3810ac_ext=c
3811ac_cpp='$CPP $CPPFLAGS'
3812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3814ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3816$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3817# On Suns, sometimes $CPP names a directory.
3818if test -n "$CPP" && test -d "$CPP"; then
3819 CPP=
8bb2c122 3820fi
bec39cab 3821if test -z "$CPP"; then
81ecdfbb
RW
3822 if test "${ac_cv_prog_CPP+set}" = set; then :
3823 $as_echo_n "(cached) " >&6
bec39cab
AC
3824else
3825 # Double quotes because CPP needs to be expanded
3826 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3827 do
3828 ac_preproc_ok=false
3829for ac_c_preproc_warn_flag in '' yes
3830do
3831 # Use a header file that comes with gcc, so configuring glibc
3832 # with a fresh cross-compiler works.
3833 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3834 # <limits.h> exists even on freestanding compilers.
3835 # On the NeXT, cc -E runs the code through the compiler's parser,
3836 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3838/* end confdefs.h. */
3839#ifdef __STDC__
3840# include <limits.h>
3841#else
3842# include <assert.h>
3843#endif
3844 Syntax error
3845_ACEOF
81ecdfbb 3846if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3847
81ecdfbb 3848else
bec39cab
AC
3849 # Broken: fails on valid input.
3850continue
3851fi
3852rm -f conftest.err conftest.$ac_ext
3853
81ecdfbb 3854 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3855 # can be detected and how.
81ecdfbb 3856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3857/* end confdefs.h. */
3858#include <ac_nonexistent.h>
3859_ACEOF
81ecdfbb 3860if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3861 # Broken: success on invalid input.
3862continue
8bb2c122 3863else
bec39cab
AC
3864 # Passes both tests.
3865ac_preproc_ok=:
3866break
8bb2c122 3867fi
bec39cab 3868rm -f conftest.err conftest.$ac_ext
8bb2c122 3869
bec39cab
AC
3870done
3871# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3872rm -f conftest.err conftest.$ac_ext
81ecdfbb 3873if $ac_preproc_ok; then :
bec39cab
AC
3874 break
3875fi
8bb2c122 3876
bec39cab
AC
3877 done
3878 ac_cv_prog_CPP=$CPP
ddc9cd0f 3879
c906108c 3880fi
bec39cab
AC
3881 CPP=$ac_cv_prog_CPP
3882else
3883 ac_cv_prog_CPP=$CPP
c906108c 3884fi
81ecdfbb
RW
3885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3886$as_echo "$CPP" >&6; }
bec39cab
AC
3887ac_preproc_ok=false
3888for ac_c_preproc_warn_flag in '' yes
3889do
3890 # Use a header file that comes with gcc, so configuring glibc
3891 # with a fresh cross-compiler works.
3892 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3893 # <limits.h> exists even on freestanding compilers.
3894 # On the NeXT, cc -E runs the code through the compiler's parser,
3895 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3897/* end confdefs.h. */
3898#ifdef __STDC__
3899# include <limits.h>
3900#else
3901# include <assert.h>
3902#endif
3903 Syntax error
3904_ACEOF
81ecdfbb 3905if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3906
81ecdfbb 3907else
bec39cab
AC
3908 # Broken: fails on valid input.
3909continue
3910fi
3911rm -f conftest.err conftest.$ac_ext
3912
81ecdfbb 3913 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3914 # can be detected and how.
81ecdfbb 3915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3916/* end confdefs.h. */
3917#include <ac_nonexistent.h>
3918_ACEOF
81ecdfbb 3919if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3920 # Broken: success on invalid input.
3921continue
c906108c 3922else
bec39cab
AC
3923 # Passes both tests.
3924ac_preproc_ok=:
3925break
c906108c 3926fi
bec39cab 3927rm -f conftest.err conftest.$ac_ext
c906108c 3928
bec39cab
AC
3929done
3930# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3931rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3932if $ac_preproc_ok; then :
3933
c906108c 3934else
81ecdfbb
RW
3935 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3937as_fn_error "C preprocessor \"$CPP\" fails sanity check
3938See \`config.log' for more details." "$LINENO" 5; }
c906108c 3939fi
c906108c 3940
bec39cab
AC
3941ac_ext=c
3942ac_cpp='$CPP $CPPFLAGS'
3943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3945ac_compiler_gnu=$ac_cv_c_compiler_gnu
3946
3947
81ecdfbb
RW
3948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3949$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3950if test "${ac_cv_path_GREP+set}" = set; then :
3951 $as_echo_n "(cached) " >&6
4e8d927d 3952else
81ecdfbb
RW
3953 if test -z "$GREP"; then
3954 ac_path_GREP_found=false
3955 # Loop through the user's path and test for each of PROGNAME-LIST
3956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3958do
3959 IFS=$as_save_IFS
3960 test -z "$as_dir" && as_dir=.
3961 for ac_prog in grep ggrep; do
3962 for ac_exec_ext in '' $ac_executable_extensions; do
3963 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3964 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3965# Check for GNU ac_path_GREP and select it if it is found.
3966 # Check for GNU $ac_path_GREP
3967case `"$ac_path_GREP" --version 2>&1` in
3968*GNU*)
3969 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3970*)
3971 ac_count=0
3972 $as_echo_n 0123456789 >"conftest.in"
3973 while :
3974 do
3975 cat "conftest.in" "conftest.in" >"conftest.tmp"
3976 mv "conftest.tmp" "conftest.in"
3977 cp "conftest.in" "conftest.nl"
3978 $as_echo 'GREP' >> "conftest.nl"
3979 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3980 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3981 as_fn_arith $ac_count + 1 && ac_count=$as_val
3982 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3983 # Best one so far, save it but keep looking for a better one
3984 ac_cv_path_GREP="$ac_path_GREP"
3985 ac_path_GREP_max=$ac_count
bec39cab 3986 fi
81ecdfbb
RW
3987 # 10*(2^10) chars as input seems more than enough
3988 test $ac_count -gt 10 && break
3989 done
3990 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3991esac
bec39cab 3992
81ecdfbb
RW
3993 $ac_path_GREP_found && break 3
3994 done
3995 done
3996 done
3997IFS=$as_save_IFS
3998 if test -z "$ac_cv_path_GREP"; then
3999 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4000 fi
c906108c 4001else
81ecdfbb 4002 ac_cv_path_GREP=$GREP
c906108c 4003fi
c906108c 4004
81ecdfbb
RW
4005fi
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4007$as_echo "$ac_cv_path_GREP" >&6; }
4008 GREP="$ac_cv_path_GREP"
c906108c 4009
c906108c 4010
81ecdfbb
RW
4011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4012$as_echo_n "checking for egrep... " >&6; }
4013if test "${ac_cv_path_EGREP+set}" = set; then :
4014 $as_echo_n "(cached) " >&6
783e057b 4015else
81ecdfbb
RW
4016 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4017 then ac_cv_path_EGREP="$GREP -E"
4018 else
4019 if test -z "$EGREP"; then
4020 ac_path_EGREP_found=false
4021 # Loop through the user's path and test for each of PROGNAME-LIST
4022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4023for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4024do
4025 IFS=$as_save_IFS
4026 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4027 for ac_prog in egrep; do
4028 for ac_exec_ext in '' $ac_executable_extensions; do
4029 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4030 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4031# Check for GNU ac_path_EGREP and select it if it is found.
4032 # Check for GNU $ac_path_EGREP
4033case `"$ac_path_EGREP" --version 2>&1` in
4034*GNU*)
4035 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4036*)
4037 ac_count=0
4038 $as_echo_n 0123456789 >"conftest.in"
4039 while :
4040 do
4041 cat "conftest.in" "conftest.in" >"conftest.tmp"
4042 mv "conftest.tmp" "conftest.in"
4043 cp "conftest.in" "conftest.nl"
4044 $as_echo 'EGREP' >> "conftest.nl"
4045 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4046 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4047 as_fn_arith $ac_count + 1 && ac_count=$as_val
4048 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4049 # Best one so far, save it but keep looking for a better one
4050 ac_cv_path_EGREP="$ac_path_EGREP"
4051 ac_path_EGREP_max=$ac_count
4052 fi
4053 # 10*(2^10) chars as input seems more than enough
4054 test $ac_count -gt 10 && break
4055 done
4056 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4057esac
bec39cab 4058
81ecdfbb
RW
4059 $ac_path_EGREP_found && break 3
4060 done
4061 done
4062 done
4063IFS=$as_save_IFS
4064 if test -z "$ac_cv_path_EGREP"; then
4065 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4066 fi
783e057b 4067else
81ecdfbb 4068 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4069fi
4070
81ecdfbb 4071 fi
783e057b 4072fi
81ecdfbb
RW
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4074$as_echo "$ac_cv_path_EGREP" >&6; }
4075 EGREP="$ac_cv_path_EGREP"
4076
783e057b 4077
81ecdfbb
RW
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4079$as_echo_n "checking for ANSI C header files... " >&6; }
4080if test "${ac_cv_header_stdc+set}" = set; then :
4081 $as_echo_n "(cached) " >&6
783e057b 4082else
81ecdfbb 4083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4084/* end confdefs.h. */
783e057b 4085#include <stdlib.h>
bec39cab 4086#include <stdarg.h>
783e057b
DJ
4087#include <string.h>
4088#include <float.h>
c906108c 4089
bec39cab
AC
4090int
4091main ()
4092{
c906108c 4093
bec39cab
AC
4094 ;
4095 return 0;
4096}
4097_ACEOF
81ecdfbb 4098if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4099 ac_cv_header_stdc=yes
c906108c 4100else
81ecdfbb 4101 ac_cv_header_stdc=no
c906108c 4102fi
81ecdfbb 4103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4104
783e057b
DJ
4105if test $ac_cv_header_stdc = yes; then
4106 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4108/* end confdefs.h. */
4109#include <string.h>
c906108c 4110
783e057b
DJ
4111_ACEOF
4112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4113 $EGREP "memchr" >/dev/null 2>&1; then :
4114
c906108c 4115else
783e057b 4116 ac_cv_header_stdc=no
c906108c 4117fi
783e057b 4118rm -f conftest*
c906108c
SS
4119
4120fi
4121
783e057b
DJ
4122if test $ac_cv_header_stdc = yes; then
4123 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4125/* end confdefs.h. */
4126#include <stdlib.h>
bec39cab 4127
783e057b
DJ
4128_ACEOF
4129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4130 $EGREP "free" >/dev/null 2>&1; then :
4131
bec39cab 4132else
783e057b 4133 ac_cv_header_stdc=no
bec39cab 4134fi
783e057b 4135rm -f conftest*
bec39cab
AC
4136
4137fi
bec39cab 4138
783e057b
DJ
4139if test $ac_cv_header_stdc = yes; then
4140 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4141 if test "$cross_compiling" = yes; then :
783e057b 4142 :
bec39cab 4143else
81ecdfbb 4144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4145/* end confdefs.h. */
4146#include <ctype.h>
81ecdfbb 4147#include <stdlib.h>
783e057b
DJ
4148#if ((' ' & 0x0FF) == 0x020)
4149# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4150# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4151#else
4152# define ISLOWER(c) \
4153 (('a' <= (c) && (c) <= 'i') \
4154 || ('j' <= (c) && (c) <= 'r') \
4155 || ('s' <= (c) && (c) <= 'z'))
4156# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4157#endif
4158
4159#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4160int
4161main ()
4162{
4163 int i;
4164 for (i = 0; i < 256; i++)
4165 if (XOR (islower (i), ISLOWER (i))
4166 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4167 return 2;
4168 return 0;
783e057b
DJ
4169}
4170_ACEOF
81ecdfbb 4171if ac_fn_c_try_run "$LINENO"; then :
783e057b 4172
81ecdfbb
RW
4173else
4174 ac_cv_header_stdc=no
783e057b 4175fi
81ecdfbb
RW
4176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4177 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4178fi
81ecdfbb 4179
783e057b
DJ
4180fi
4181fi
81ecdfbb
RW
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4183$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4184if test $ac_cv_header_stdc = yes; then
4185
81ecdfbb 4186$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4187
4188fi
4189
4190# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4191for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4192 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4193do :
4194 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4195ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4196"
4197eval as_val=\$$as_ac_Header
4198 if test "x$as_val" = x""yes; then :
783e057b 4199 cat >>confdefs.h <<_ACEOF
81ecdfbb 4200#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4201_ACEOF
4202
4203fi
4204
4205done
4206
4207
4208
81ecdfbb
RW
4209 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4210if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4211 MINIX=yes
4212else
4213 MINIX=
4214fi
4215
4216
4217 if test "$MINIX" = yes; then
4218
81ecdfbb 4219$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4220
4221
81ecdfbb 4222$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4223
4224
81ecdfbb 4225$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4226
4227 fi
4228
4229
81ecdfbb
RW
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4231$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4232if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4233 $as_echo_n "(cached) " >&6
783e057b 4234else
81ecdfbb 4235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4236/* end confdefs.h. */
4237
c971b7fa
PA
4238# define __EXTENSIONS__ 1
4239 $ac_includes_default
783e057b
DJ
4240int
4241main ()
4242{
4243
4244 ;
4245 return 0;
4246}
4247_ACEOF
81ecdfbb 4248if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4249 ac_cv_safe_to_define___extensions__=yes
4250else
81ecdfbb 4251 ac_cv_safe_to_define___extensions__=no
783e057b 4252fi
81ecdfbb 4253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4254fi
81ecdfbb
RW
4255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4256$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4257 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4258 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4259
81ecdfbb 4260 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4261
81ecdfbb 4262 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4263
81ecdfbb 4264 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4265
81ecdfbb 4266 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4267
4268
c971b7fa
PA
4269ac_aux_dir=
4270for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4271 for ac_t in install-sh install.sh shtool; do
4272 if test -f "$ac_dir/$ac_t"; then
4273 ac_aux_dir=$ac_dir
4274 ac_install_sh="$ac_aux_dir/$ac_t -c"
4275 break 2
4276 fi
4277 done
4278done
4279if test -z "$ac_aux_dir"; then
4280 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4281fi
770d76d7 4282
c971b7fa
PA
4283# These three variables are undocumented and unsupported,
4284# and are intended to be withdrawn in a future Autoconf release.
4285# They can cause serious problems if a builder's source tree is in a directory
4286# whose full name contains unusual characters.
4287ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4288ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4289ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4290
770d76d7 4291
c971b7fa
PA
4292# Make sure we can run config.sub.
4293$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4294 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4295
c971b7fa
PA
4296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4297$as_echo_n "checking build system type... " >&6; }
4298if test "${ac_cv_build+set}" = set; then :
4299 $as_echo_n "(cached) " >&6
770d76d7 4300else
c971b7fa
PA
4301 ac_build_alias=$build_alias
4302test "x$ac_build_alias" = x &&
4303 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4304test "x$ac_build_alias" = x &&
4305 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4306ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4307 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4308
770d76d7 4309fi
c971b7fa
PA
4310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4311$as_echo "$ac_cv_build" >&6; }
4312case $ac_cv_build in
4313*-*-*) ;;
4314*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4315esac
c971b7fa
PA
4316build=$ac_cv_build
4317ac_save_IFS=$IFS; IFS='-'
4318set x $ac_cv_build
4319shift
4320build_cpu=$1
4321build_vendor=$2
4322shift; shift
4323# Remember, the first character of IFS is used to create $*,
4324# except with old shells:
4325build_os=$*
4326IFS=$ac_save_IFS
4327case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4328
4329
c971b7fa
PA
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4331$as_echo_n "checking host system type... " >&6; }
4332if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4333 $as_echo_n "(cached) " >&6
4334else
c971b7fa
PA
4335 if test "x$host_alias" = x; then
4336 ac_cv_host=$ac_cv_build
81ecdfbb 4337else
c971b7fa
PA
4338 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4339 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4340fi
81ecdfbb
RW
4341
4342fi
c971b7fa
PA
4343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4344$as_echo "$ac_cv_host" >&6; }
4345case $ac_cv_host in
4346*-*-*) ;;
4347*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4348esac
c971b7fa
PA
4349host=$ac_cv_host
4350ac_save_IFS=$IFS; IFS='-'
4351set x $ac_cv_host
4352shift
4353host_cpu=$1
4354host_vendor=$2
4355shift; shift
4356# Remember, the first character of IFS is used to create $*,
4357# except with old shells:
4358host_os=$*
4359IFS=$ac_save_IFS
4360case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4361
4362
4363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4364$as_echo_n "checking target system type... " >&6; }
4365if test "${ac_cv_target+set}" = set; then :
4366 $as_echo_n "(cached) " >&6
4367else
4368 if test "x$target_alias" = x; then
4369 ac_cv_target=$ac_cv_host
4370else
4371 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4372 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4373fi
4374
4375fi
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4377$as_echo "$ac_cv_target" >&6; }
4378case $ac_cv_target in
4379*-*-*) ;;
4380*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4381esac
4382target=$ac_cv_target
4383ac_save_IFS=$IFS; IFS='-'
4384set x $ac_cv_target
4385shift
4386target_cpu=$1
4387target_vendor=$2
4388shift; shift
4389# Remember, the first character of IFS is used to create $*,
4390# except with old shells:
4391target_os=$*
4392IFS=$ac_save_IFS
4393case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4394
4395
4396# The aliases save the names the user supplied, while $host etc.
4397# will get canonicalized.
4398test -n "$target_alias" &&
4399 test "$program_prefix$program_suffix$program_transform_name" = \
4400 NONENONEs,x,x, &&
4401 program_prefix=${target_alias}-
4402
4403# The tests for host and target for $enable_largefile require
4404# canonical names.
4405
4406
81ecdfbb 4407
da2f07f1
JK
4408# As the $enable_largefile decision depends on --enable-plugins we must set it
4409# even in directories otherwise not depending on the $plugins option.
4410
4411
2974be62
AM
4412 maybe_plugins=no
4413 for ac_header in dlfcn.h
4414do :
4415 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4416"
4417if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4418 cat >>confdefs.h <<_ACEOF
4419#define HAVE_DLFCN_H 1
4420_ACEOF
4421 maybe_plugins=yes
4422fi
4423
4424done
4425
4426 for ac_header in windows.h
4427do :
4428 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4429"
4430if test "x$ac_cv_header_windows_h" = x""yes; then :
4431 cat >>confdefs.h <<_ACEOF
4432#define HAVE_WINDOWS_H 1
4433_ACEOF
4434 maybe_plugins=yes
4435fi
4436
4437done
4438
4439
4440 # Check whether --enable-plugins was given.
da2f07f1
JK
4441if test "${enable_plugins+set}" = set; then :
4442 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4443 no) plugins=no ;;
4444 *) plugins=yes
4445 if test "$maybe_plugins" != "yes" ; then
4446 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4447 fi ;;
4448 esac
da2f07f1 4449else
2974be62
AM
4450 plugins=$maybe_plugins
4451
da2f07f1
JK
4452fi
4453
2974be62
AM
4454 if test "$plugins" = "yes"; then
4455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4456$as_echo_n "checking for library containing dlopen... " >&6; }
4457if test "${ac_cv_search_dlopen+set}" = set; then :
4458 $as_echo_n "(cached) " >&6
4459else
4460 ac_func_search_save_LIBS=$LIBS
4461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462/* end confdefs.h. */
4463
4464/* Override any GCC internal prototype to avoid an error.
4465 Use char because int might match the return type of a GCC
4466 builtin and then its argument prototype would still apply. */
4467#ifdef __cplusplus
4468extern "C"
4469#endif
4470char dlopen ();
4471int
4472main ()
4473{
4474return dlopen ();
4475 ;
4476 return 0;
4477}
4478_ACEOF
4479for ac_lib in '' dl; do
4480 if test -z "$ac_lib"; then
4481 ac_res="none required"
4482 else
4483 ac_res=-l$ac_lib
4484 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4485 fi
4486 if ac_fn_c_try_link "$LINENO"; then :
4487 ac_cv_search_dlopen=$ac_res
4488fi
4489rm -f core conftest.err conftest.$ac_objext \
4490 conftest$ac_exeext
4491 if test "${ac_cv_search_dlopen+set}" = set; then :
4492 break
4493fi
4494done
4495if test "${ac_cv_search_dlopen+set}" = set; then :
4496
4497else
4498 ac_cv_search_dlopen=no
4499fi
4500rm conftest.$ac_ext
4501LIBS=$ac_func_search_save_LIBS
4502fi
4503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4504$as_echo "$ac_cv_search_dlopen" >&6; }
4505ac_res=$ac_cv_search_dlopen
4506if test "$ac_res" != no; then :
4507 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4508
4509fi
4510
4511 fi
da2f07f1
JK
4512
4513
4514case "${host}" in
4515 sparc-*-solaris*|i[3-7]86-*-solaris*)
4516 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4517 # are mutually exclusive; and without procfs support, the bfd/ elf module
4518 # cannot provide certain routines such as elfcore_write_prpsinfo
4519 # or elfcore_write_prstatus. So unless the user explicitly requested
4520 # large-file support through the --enable-largefile switch, disable
4521 # large-file support in favor of procfs support.
4522 test "${target}" = "${host}" -a "x$plugins" = xno \
4523 && : ${enable_largefile="no"}
4524 ;;
4525esac
4526
4527# Check whether --enable-largefile was given.
4528if test "${enable_largefile+set}" = set; then :
4529 enableval=$enable_largefile;
4530fi
4531
4532if test "$enable_largefile" != no; then
4533
4534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4535$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4536if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4537 $as_echo_n "(cached) " >&6
4538else
4539 ac_cv_sys_largefile_CC=no
4540 if test "$GCC" != yes; then
4541 ac_save_CC=$CC
4542 while :; do
4543 # IRIX 6.2 and later do not support large files by default,
4544 # so use the C compiler's -n32 option if that helps.
4545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4546/* end confdefs.h. */
4547#include <sys/types.h>
4548 /* Check that off_t can represent 2**63 - 1 correctly.
4549 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4550 since some C++ compilers masquerading as C compilers
4551 incorrectly reject 9223372036854775807. */
4552#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4553 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4554 && LARGE_OFF_T % 2147483647 == 1)
4555 ? 1 : -1];
4556int
4557main ()
4558{
4559
4560 ;
4561 return 0;
4562}
4563_ACEOF
4564 if ac_fn_c_try_compile "$LINENO"; then :
4565 break
4566fi
4567rm -f core conftest.err conftest.$ac_objext
4568 CC="$CC -n32"
4569 if ac_fn_c_try_compile "$LINENO"; then :
4570 ac_cv_sys_largefile_CC=' -n32'; break
4571fi
4572rm -f core conftest.err conftest.$ac_objext
4573 break
4574 done
4575 CC=$ac_save_CC
4576 rm -f conftest.$ac_ext
4577 fi
4578fi
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4580$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4581 if test "$ac_cv_sys_largefile_CC" != no; then
4582 CC=$CC$ac_cv_sys_largefile_CC
4583 fi
4584
4585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4586$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4587if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4588 $as_echo_n "(cached) " >&6
4589else
4590 while :; do
4591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592/* end confdefs.h. */
4593#include <sys/types.h>
4594 /* Check that off_t can represent 2**63 - 1 correctly.
4595 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4596 since some C++ compilers masquerading as C compilers
4597 incorrectly reject 9223372036854775807. */
4598#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4599 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4600 && LARGE_OFF_T % 2147483647 == 1)
4601 ? 1 : -1];
4602int
4603main ()
4604{
4605
4606 ;
4607 return 0;
4608}
4609_ACEOF
4610if ac_fn_c_try_compile "$LINENO"; then :
4611 ac_cv_sys_file_offset_bits=no; break
4612fi
4613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h. */
4616#define _FILE_OFFSET_BITS 64
4617#include <sys/types.h>
4618 /* Check that off_t can represent 2**63 - 1 correctly.
4619 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4620 since some C++ compilers masquerading as C compilers
4621 incorrectly reject 9223372036854775807. */
4622#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4623 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4624 && LARGE_OFF_T % 2147483647 == 1)
4625 ? 1 : -1];
4626int
4627main ()
4628{
4629
4630 ;
4631 return 0;
4632}
4633_ACEOF
4634if ac_fn_c_try_compile "$LINENO"; then :
4635 ac_cv_sys_file_offset_bits=64; break
4636fi
4637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4638 ac_cv_sys_file_offset_bits=unknown
4639 break
4640done
4641fi
4642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4643$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4644case $ac_cv_sys_file_offset_bits in #(
4645 no | unknown) ;;
4646 *)
4647cat >>confdefs.h <<_ACEOF
4648#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4649_ACEOF
4650;;
4651esac
4652rm -rf conftest*
4653 if test $ac_cv_sys_file_offset_bits = unknown; then
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4655$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4656if test "${ac_cv_sys_large_files+set}" = set; then :
4657 $as_echo_n "(cached) " >&6
4658else
4659 while :; do
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661/* end confdefs.h. */
4662#include <sys/types.h>
4663 /* Check that off_t can represent 2**63 - 1 correctly.
4664 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4665 since some C++ compilers masquerading as C compilers
4666 incorrectly reject 9223372036854775807. */
4667#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4668 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4669 && LARGE_OFF_T % 2147483647 == 1)
4670 ? 1 : -1];
4671int
4672main ()
4673{
4674
4675 ;
4676 return 0;
4677}
4678_ACEOF
4679if ac_fn_c_try_compile "$LINENO"; then :
4680 ac_cv_sys_large_files=no; break
4681fi
4682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4684/* end confdefs.h. */
4685#define _LARGE_FILES 1
4686#include <sys/types.h>
4687 /* Check that off_t can represent 2**63 - 1 correctly.
4688 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4689 since some C++ compilers masquerading as C compilers
4690 incorrectly reject 9223372036854775807. */
4691#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4692 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4693 && LARGE_OFF_T % 2147483647 == 1)
4694 ? 1 : -1];
4695int
4696main ()
4697{
4698
4699 ;
4700 return 0;
4701}
4702_ACEOF
4703if ac_fn_c_try_compile "$LINENO"; then :
4704 ac_cv_sys_large_files=1; break
4705fi
4706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4707 ac_cv_sys_large_files=unknown
4708 break
4709done
4710fi
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4712$as_echo "$ac_cv_sys_large_files" >&6; }
4713case $ac_cv_sys_large_files in #(
4714 no | unknown) ;;
4715 *)
4716cat >>confdefs.h <<_ACEOF
4717#define _LARGE_FILES $ac_cv_sys_large_files
4718_ACEOF
4719;;
4720esac
4721rm -rf conftest*
4722 fi
4723fi
4724
4725
4726
81ecdfbb
RW
4727
4728
4729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4730$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4731if test "${am_cv_prog_cc_stdc+set}" = set; then :
4732 $as_echo_n "(cached) " >&6
4733else
4734 am_cv_prog_cc_stdc=no
4735ac_save_CC="$CC"
4736# Don't try gcc -ansi; that turns off useful extensions and
4737# breaks some systems' header files.
4738# AIX -qlanglvl=ansi
4739# Ultrix and OSF/1 -std1
4740# HP-UX 10.20 and later -Ae
4741# HP-UX older versions -Aa -D_HPUX_SOURCE
4742# SVR4 -Xc -D__EXTENSIONS__
4743for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4744do
783e057b 4745 CC="$ac_save_CC $ac_arg"
81ecdfbb 4746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4747/* end confdefs.h. */
4748#include <stdarg.h>
4749#include <stdio.h>
4750#include <sys/types.h>
4751#include <sys/stat.h>
4752/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4753struct buf { int x; };
4754FILE * (*rcsopen) (struct buf *, struct stat *, int);
4755static char *e (p, i)
4756 char **p;
4757 int i;
4758{
4759 return p[i];
4760}
4761static char *f (char * (*g) (char **, int), char **p, ...)
4762{
4763 char *s;
4764 va_list v;
4765 va_start (v,p);
4766 s = g (p, va_arg (v,int));
4767 va_end (v);
4768 return s;
4769}
4770int test (int i, double x);
4771struct s1 {int (*f) (int a);};
4772struct s2 {int (*f) (double a);};
4773int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4774int argc;
4775char **argv;
4776
4777int
4778main ()
4779{
4780
4781return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4782
4783 ;
4784 return 0;
4785}
4786_ACEOF
81ecdfbb 4787if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4788 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4789fi
81ecdfbb 4790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4791done
4792CC="$ac_save_CC"
4793
4794fi
4795
4796if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4798$as_echo "none needed" >&6; }
783e057b 4799else
81ecdfbb
RW
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4801$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4802fi
4803case "x$am_cv_prog_cc_stdc" in
4804 x|xno) ;;
4805 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4806esac
4807
4869db5e
RM
4808# expand $ac_aux_dir to an absolute path
4809am_aux_dir=`cd $ac_aux_dir && pwd`
4810
4811if test x"${install_sh}" != xset; then
4812 case $am_aux_dir in
4813 *\ * | *\ *)
4814 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4815 *)
4816 install_sh="\${SHELL} $am_aux_dir/install-sh"
4817 esac
4818fi
4819
4820# Installed binaries are usually stripped using `strip' when the user
4821# run `make install-strip'. However `strip' might not be the right
4822# tool to use in cross-compilation environments, therefore Automake
4823# will honor the `STRIP' environment variable to overrule this program.
4824if test "$cross_compiling" != no; then
4825 if test -n "$ac_tool_prefix"; then
4826 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4827set dummy ${ac_tool_prefix}strip; ac_word=$2
4828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829$as_echo_n "checking for $ac_word... " >&6; }
4830if test "${ac_cv_prog_STRIP+set}" = set; then :
4831 $as_echo_n "(cached) " >&6
4832else
4833 if test -n "$STRIP"; then
4834 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4835else
4836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4837for as_dir in $PATH
4838do
4839 IFS=$as_save_IFS
4840 test -z "$as_dir" && as_dir=.
4841 for ac_exec_ext in '' $ac_executable_extensions; do
4842 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4843 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4845 break 2
4846 fi
4847done
4848 done
4849IFS=$as_save_IFS
4850
4851fi
4852fi
4853STRIP=$ac_cv_prog_STRIP
4854if test -n "$STRIP"; then
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4856$as_echo "$STRIP" >&6; }
4857else
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
4860fi
4861
4862
4863fi
4864if test -z "$ac_cv_prog_STRIP"; then
4865 ac_ct_STRIP=$STRIP
4866 # Extract the first word of "strip", so it can be a program name with args.
4867set dummy strip; ac_word=$2
4868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4869$as_echo_n "checking for $ac_word... " >&6; }
4870if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4871 $as_echo_n "(cached) " >&6
4872else
4873 if test -n "$ac_ct_STRIP"; then
4874 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4875else
4876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4877for as_dir in $PATH
4878do
4879 IFS=$as_save_IFS
4880 test -z "$as_dir" && as_dir=.
4881 for ac_exec_ext in '' $ac_executable_extensions; do
4882 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4883 ac_cv_prog_ac_ct_STRIP="strip"
4884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4885 break 2
4886 fi
4887done
4888 done
4889IFS=$as_save_IFS
4890
4891fi
4892fi
4893ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4894if test -n "$ac_ct_STRIP"; then
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4896$as_echo "$ac_ct_STRIP" >&6; }
4897else
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899$as_echo "no" >&6; }
4900fi
4901
4902 if test "x$ac_ct_STRIP" = x; then
4903 STRIP=":"
4904 else
4905 case $cross_compiling:$ac_tool_warned in
4906yes:)
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4908$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4909ac_tool_warned=yes ;;
4910esac
4911 STRIP=$ac_ct_STRIP
4912 fi
4913else
4914 STRIP="$ac_cv_prog_STRIP"
4915fi
4916
4917fi
4918INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4919
783e057b
DJ
4920
4921ac_aux_dir=
81ecdfbb
RW
4922for ac_dir in .. "$srcdir"/..; do
4923 for ac_t in install-sh install.sh shtool; do
4924 if test -f "$ac_dir/$ac_t"; then
4925 ac_aux_dir=$ac_dir
4926 ac_install_sh="$ac_aux_dir/$ac_t -c"
4927 break 2
4928 fi
4929 done
783e057b
DJ
4930done
4931if test -z "$ac_aux_dir"; then
81ecdfbb 4932 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4933fi
81ecdfbb
RW
4934
4935# These three variables are undocumented and unsupported,
4936# and are intended to be withdrawn in a future Autoconf release.
4937# They can cause serious problems if a builder's source tree is in a directory
4938# whose full name contains unusual characters.
4939ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4940ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4941ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4942
783e057b 4943
783e057b 4944
9009e1ae
MR
4945test "$program_prefix" != NONE &&
4946 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4947# Use a double $ so make ignores it.
4948test "$program_suffix" != NONE &&
4949 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4950# Double any \ or $.
4951# By default was `s,x,x', remove it if useless.
4952ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4953program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4954
81ecdfbb 4955
0bcda685
PA
4956# We require a C++11 compiler. Check if one is available, and if
4957# necessary, set CXX_DIALECT to some -std=xxx switch.
4958
4959 ax_cxx_compile_cxx11_required=true
4960 ac_ext=cpp
4961ac_cpp='$CXXCPP $CPPFLAGS'
4962ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4963ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4964ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4965 CXX_DIALECT=""
4966 ac_success=no
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4968$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4969if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4970 $as_echo_n "(cached) " >&6
4971else
4972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4973/* end confdefs.h. */
4974
4975
4976// If the compiler admits that it is not ready for C++11, why torture it?
4977// Hopefully, this will speed up the test.
4978
4979#ifndef __cplusplus
4980
4981#error "This is not a C++ compiler"
4982
4983#elif __cplusplus < 201103L
4984
4985#error "This is not a C++11 compiler"
4986
4987#else
4988
4989namespace cxx11
4990{
4991
4992 namespace test_static_assert
4993 {
4994
4995 template <typename T>
4996 struct check
4997 {
4998 static_assert(sizeof(int) <= sizeof(T), "not big enough");
4999 };
5000
5001 }
5002
5003 namespace test_final_override
5004 {
5005
5006 struct Base
5007 {
5008 virtual void f() {}
5009 };
5010
5011 struct Derived : public Base
5012 {
5013 virtual void f() override {}
5014 };
5015
5016 }
5017
5018 namespace test_double_right_angle_brackets
5019 {
5020
5021 template < typename T >
5022 struct check {};
5023
5024 typedef check<void> single_type;
5025 typedef check<check<void>> double_type;
5026 typedef check<check<check<void>>> triple_type;
5027 typedef check<check<check<check<void>>>> quadruple_type;
5028
5029 }
5030
5031 namespace test_decltype
5032 {
5033
5034 int
5035 f()
5036 {
5037 int a = 1;
5038 decltype(a) b = 2;
5039 return a + b;
5040 }
5041
5042 }
5043
5044 namespace test_type_deduction
5045 {
5046
5047 template < typename T1, typename T2 >
5048 struct is_same
5049 {
5050 static const bool value = false;
5051 };
5052
5053 template < typename T >
5054 struct is_same<T, T>
5055 {
5056 static const bool value = true;
5057 };
5058
5059 template < typename T1, typename T2 >
5060 auto
5061 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5062 {
5063 return a1 + a2;
5064 }
5065
5066 int
5067 test(const int c, volatile int v)
5068 {
5069 static_assert(is_same<int, decltype(0)>::value == true, "");
5070 static_assert(is_same<int, decltype(c)>::value == false, "");
5071 static_assert(is_same<int, decltype(v)>::value == false, "");
5072 auto ac = c;
5073 auto av = v;
5074 auto sumi = ac + av + 'x';
5075 auto sumf = ac + av + 1.0;
5076 static_assert(is_same<int, decltype(ac)>::value == true, "");
5077 static_assert(is_same<int, decltype(av)>::value == true, "");
5078 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5079 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5080 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5081 return (sumf > 0.0) ? sumi : add(c, v);
5082 }
5083
5084 }
5085
5086 namespace test_noexcept
5087 {
5088
5089 int f() { return 0; }
5090 int g() noexcept { return 0; }
5091
5092 static_assert(noexcept(f()) == false, "");
5093 static_assert(noexcept(g()) == true, "");
5094
5095 }
5096
5097 namespace test_constexpr
5098 {
5099
5100 template < typename CharT >
5101 unsigned long constexpr
5102 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5103 {
5104 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5105 }
5106
5107 template < typename CharT >
5108 unsigned long constexpr
5109 strlen_c(const CharT *const s) noexcept
5110 {
5111 return strlen_c_r(s, 0UL);
5112 }
5113
5114 static_assert(strlen_c("") == 0UL, "");
5115 static_assert(strlen_c("1") == 1UL, "");
5116 static_assert(strlen_c("example") == 7UL, "");
5117 static_assert(strlen_c("another\0example") == 7UL, "");
5118
5119 }
5120
5121 namespace test_rvalue_references
5122 {
5123
5124 template < int N >
5125 struct answer
5126 {
5127 static constexpr int value = N;
5128 };
5129
5130 answer<1> f(int&) { return answer<1>(); }
5131 answer<2> f(const int&) { return answer<2>(); }
5132 answer<3> f(int&&) { return answer<3>(); }
5133
5134 void
5135 test()
5136 {
5137 int i = 0;
5138 const int c = 0;
5139 static_assert(decltype(f(i))::value == 1, "");
5140 static_assert(decltype(f(c))::value == 2, "");
5141 static_assert(decltype(f(0))::value == 3, "");
5142 }
5143
5144 }
5145
5146 namespace test_uniform_initialization
5147 {
5148
5149 struct test
5150 {
5151 static const int zero {};
5152 static const int one {1};
5153 };
5154
5155 static_assert(test::zero == 0, "");
5156 static_assert(test::one == 1, "");
5157
5158 }
5159
5160 namespace test_lambdas
5161 {
5162
5163 void
5164 test1()
5165 {
5166 auto lambda1 = [](){};
5167 auto lambda2 = lambda1;
5168 lambda1();
5169 lambda2();
5170 }
5171
5172 int
5173 test2()
5174 {
5175 auto a = [](int i, int j){ return i + j; }(1, 2);
5176 auto b = []() -> int { return '0'; }();
5177 auto c = [=](){ return a + b; }();
5178 auto d = [&](){ return c; }();
5179 auto e = [a, &b](int x) mutable {
5180 const auto identity = [](int y){ return y; };
5181 for (auto i = 0; i < a; ++i)
5182 a += b--;
5183 return x + identity(a + b);
5184 }(0);
5185 return a + b + c + d + e;
5186 }
5187
5188 int
5189 test3()
5190 {
5191 const auto nullary = [](){ return 0; };
5192 const auto unary = [](int x){ return x; };
5193 using nullary_t = decltype(nullary);
5194 using unary_t = decltype(unary);
5195 const auto higher1st = [](nullary_t f){ return f(); };
5196 const auto higher2nd = [unary](nullary_t f1){
5197 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5198 };
5199 return higher1st(nullary) + higher2nd(nullary)(unary);
5200 }
5201
5202 }
5203
5204 namespace test_variadic_templates
5205 {
5206
5207 template <int...>
5208 struct sum;
5209
5210 template <int N0, int... N1toN>
5211 struct sum<N0, N1toN...>
5212 {
5213 static constexpr auto value = N0 + sum<N1toN...>::value;
5214 };
5215
5216 template <>
5217 struct sum<>
5218 {
5219 static constexpr auto value = 0;
5220 };
5221
5222 static_assert(sum<>::value == 0, "");
5223 static_assert(sum<1>::value == 1, "");
5224 static_assert(sum<23>::value == 23, "");
5225 static_assert(sum<1, 2>::value == 3, "");
5226 static_assert(sum<5, 5, 11>::value == 21, "");
5227 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5228
5229 }
5230
5231 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5232 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5233 // because of this.
5234 namespace test_template_alias_sfinae
5235 {
5236
5237 struct foo {};
5238
5239 template<typename T>
5240 using member = typename T::member_type;
5241
5242 template<typename T>
5243 void func(...) {}
5244
5245 template<typename T>
5246 void func(member<T>*) {}
5247
5248 void test();
5249
5250 void test() { func<foo>(0); }
5251
5252 }
5253
5254} // namespace cxx11
5255
5256#endif // __cplusplus >= 201103L
5257
5258
5259
5260_ACEOF
5261if ac_fn_cxx_try_compile "$LINENO"; then :
5262 ax_cv_cxx_compile_cxx11=yes
5263else
5264 ax_cv_cxx_compile_cxx11=no
5265fi
5266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5267fi
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5269$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5270 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5271 ac_success=yes
5272 fi
5273
5274 if test x$ac_success = xno; then
5275 for switch in -std=gnu++11 -std=gnu++0x; do
5276 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5278$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5279if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5280 $as_echo_n "(cached) " >&6
5281else
5282 ac_save_CXX="$CXX"
5283 CXX="$CXX $switch"
5284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5285/* end confdefs.h. */
5286
5287
5288// If the compiler admits that it is not ready for C++11, why torture it?
5289// Hopefully, this will speed up the test.
5290
5291#ifndef __cplusplus
5292
5293#error "This is not a C++ compiler"
5294
5295#elif __cplusplus < 201103L
5296
5297#error "This is not a C++11 compiler"
5298
5299#else
5300
5301namespace cxx11
5302{
5303
5304 namespace test_static_assert
5305 {
5306
5307 template <typename T>
5308 struct check
5309 {
5310 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5311 };
5312
5313 }
5314
5315 namespace test_final_override
5316 {
5317
5318 struct Base
5319 {
5320 virtual void f() {}
5321 };
5322
5323 struct Derived : public Base
5324 {
5325 virtual void f() override {}
5326 };
5327
5328 }
5329
5330 namespace test_double_right_angle_brackets
5331 {
5332
5333 template < typename T >
5334 struct check {};
5335
5336 typedef check<void> single_type;
5337 typedef check<check<void>> double_type;
5338 typedef check<check<check<void>>> triple_type;
5339 typedef check<check<check<check<void>>>> quadruple_type;
5340
5341 }
5342
5343 namespace test_decltype
5344 {
5345
5346 int
5347 f()
5348 {
5349 int a = 1;
5350 decltype(a) b = 2;
5351 return a + b;
5352 }
5353
5354 }
5355
5356 namespace test_type_deduction
5357 {
5358
5359 template < typename T1, typename T2 >
5360 struct is_same
5361 {
5362 static const bool value = false;
5363 };
5364
5365 template < typename T >
5366 struct is_same<T, T>
5367 {
5368 static const bool value = true;
5369 };
5370
5371 template < typename T1, typename T2 >
5372 auto
5373 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5374 {
5375 return a1 + a2;
5376 }
5377
5378 int
5379 test(const int c, volatile int v)
5380 {
5381 static_assert(is_same<int, decltype(0)>::value == true, "");
5382 static_assert(is_same<int, decltype(c)>::value == false, "");
5383 static_assert(is_same<int, decltype(v)>::value == false, "");
5384 auto ac = c;
5385 auto av = v;
5386 auto sumi = ac + av + 'x';
5387 auto sumf = ac + av + 1.0;
5388 static_assert(is_same<int, decltype(ac)>::value == true, "");
5389 static_assert(is_same<int, decltype(av)>::value == true, "");
5390 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5391 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5392 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5393 return (sumf > 0.0) ? sumi : add(c, v);
5394 }
5395
5396 }
5397
5398 namespace test_noexcept
5399 {
5400
5401 int f() { return 0; }
5402 int g() noexcept { return 0; }
5403
5404 static_assert(noexcept(f()) == false, "");
5405 static_assert(noexcept(g()) == true, "");
5406
5407 }
5408
5409 namespace test_constexpr
5410 {
5411
5412 template < typename CharT >
5413 unsigned long constexpr
5414 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5415 {
5416 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5417 }
5418
5419 template < typename CharT >
5420 unsigned long constexpr
5421 strlen_c(const CharT *const s) noexcept
5422 {
5423 return strlen_c_r(s, 0UL);
5424 }
5425
5426 static_assert(strlen_c("") == 0UL, "");
5427 static_assert(strlen_c("1") == 1UL, "");
5428 static_assert(strlen_c("example") == 7UL, "");
5429 static_assert(strlen_c("another\0example") == 7UL, "");
5430
5431 }
5432
5433 namespace test_rvalue_references
5434 {
5435
5436 template < int N >
5437 struct answer
5438 {
5439 static constexpr int value = N;
5440 };
5441
5442 answer<1> f(int&) { return answer<1>(); }
5443 answer<2> f(const int&) { return answer<2>(); }
5444 answer<3> f(int&&) { return answer<3>(); }
5445
5446 void
5447 test()
5448 {
5449 int i = 0;
5450 const int c = 0;
5451 static_assert(decltype(f(i))::value == 1, "");
5452 static_assert(decltype(f(c))::value == 2, "");
5453 static_assert(decltype(f(0))::value == 3, "");
5454 }
5455
5456 }
5457
5458 namespace test_uniform_initialization
5459 {
5460
5461 struct test
5462 {
5463 static const int zero {};
5464 static const int one {1};
5465 };
5466
5467 static_assert(test::zero == 0, "");
5468 static_assert(test::one == 1, "");
5469
5470 }
5471
5472 namespace test_lambdas
5473 {
5474
5475 void
5476 test1()
5477 {
5478 auto lambda1 = [](){};
5479 auto lambda2 = lambda1;
5480 lambda1();
5481 lambda2();
5482 }
5483
5484 int
5485 test2()
5486 {
5487 auto a = [](int i, int j){ return i + j; }(1, 2);
5488 auto b = []() -> int { return '0'; }();
5489 auto c = [=](){ return a + b; }();
5490 auto d = [&](){ return c; }();
5491 auto e = [a, &b](int x) mutable {
5492 const auto identity = [](int y){ return y; };
5493 for (auto i = 0; i < a; ++i)
5494 a += b--;
5495 return x + identity(a + b);
5496 }(0);
5497 return a + b + c + d + e;
5498 }
5499
5500 int
5501 test3()
5502 {
5503 const auto nullary = [](){ return 0; };
5504 const auto unary = [](int x){ return x; };
5505 using nullary_t = decltype(nullary);
5506 using unary_t = decltype(unary);
5507 const auto higher1st = [](nullary_t f){ return f(); };
5508 const auto higher2nd = [unary](nullary_t f1){
5509 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5510 };
5511 return higher1st(nullary) + higher2nd(nullary)(unary);
5512 }
5513
5514 }
5515
5516 namespace test_variadic_templates
5517 {
5518
5519 template <int...>
5520 struct sum;
5521
5522 template <int N0, int... N1toN>
5523 struct sum<N0, N1toN...>
5524 {
5525 static constexpr auto value = N0 + sum<N1toN...>::value;
5526 };
5527
5528 template <>
5529 struct sum<>
5530 {
5531 static constexpr auto value = 0;
5532 };
5533
5534 static_assert(sum<>::value == 0, "");
5535 static_assert(sum<1>::value == 1, "");
5536 static_assert(sum<23>::value == 23, "");
5537 static_assert(sum<1, 2>::value == 3, "");
5538 static_assert(sum<5, 5, 11>::value == 21, "");
5539 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5540
5541 }
5542
5543 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5544 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5545 // because of this.
5546 namespace test_template_alias_sfinae
5547 {
5548
5549 struct foo {};
5550
5551 template<typename T>
5552 using member = typename T::member_type;
5553
5554 template<typename T>
5555 void func(...) {}
5556
5557 template<typename T>
5558 void func(member<T>*) {}
5559
5560 void test();
5561
5562 void test() { func<foo>(0); }
5563
5564 }
5565
5566} // namespace cxx11
5567
5568#endif // __cplusplus >= 201103L
5569
5570
5571
5572_ACEOF
5573if ac_fn_cxx_try_compile "$LINENO"; then :
5574 eval $cachevar=yes
5575else
5576 eval $cachevar=no
5577fi
5578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5579 CXX="$ac_save_CXX"
5580fi
5581eval ac_res=\$$cachevar
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5583$as_echo "$ac_res" >&6; }
5584 if eval test x\$$cachevar = xyes; then
5585 CXX_DIALECT="$switch"
5586 ac_success=yes
5587 break
5588 fi
5589 done
5590 fi
5591
5592 if test x$ac_success = xno; then
5593 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5594 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5596$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5597if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5598 $as_echo_n "(cached) " >&6
5599else
5600 ac_save_CXX="$CXX"
5601 CXX="$CXX $switch"
5602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5603/* end confdefs.h. */
5604
5605
5606// If the compiler admits that it is not ready for C++11, why torture it?
5607// Hopefully, this will speed up the test.
5608
5609#ifndef __cplusplus
5610
5611#error "This is not a C++ compiler"
5612
5613#elif __cplusplus < 201103L
5614
5615#error "This is not a C++11 compiler"
5616
5617#else
5618
5619namespace cxx11
5620{
5621
5622 namespace test_static_assert
5623 {
5624
5625 template <typename T>
5626 struct check
5627 {
5628 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5629 };
5630
5631 }
5632
5633 namespace test_final_override
5634 {
5635
5636 struct Base
5637 {
5638 virtual void f() {}
5639 };
5640
5641 struct Derived : public Base
5642 {
5643 virtual void f() override {}
5644 };
5645
5646 }
5647
5648 namespace test_double_right_angle_brackets
5649 {
5650
5651 template < typename T >
5652 struct check {};
5653
5654 typedef check<void> single_type;
5655 typedef check<check<void>> double_type;
5656 typedef check<check<check<void>>> triple_type;
5657 typedef check<check<check<check<void>>>> quadruple_type;
5658
5659 }
5660
5661 namespace test_decltype
5662 {
5663
5664 int
5665 f()
5666 {
5667 int a = 1;
5668 decltype(a) b = 2;
5669 return a + b;
5670 }
5671
5672 }
5673
5674 namespace test_type_deduction
5675 {
5676
5677 template < typename T1, typename T2 >
5678 struct is_same
5679 {
5680 static const bool value = false;
5681 };
5682
5683 template < typename T >
5684 struct is_same<T, T>
5685 {
5686 static const bool value = true;
5687 };
5688
5689 template < typename T1, typename T2 >
5690 auto
5691 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5692 {
5693 return a1 + a2;
5694 }
5695
5696 int
5697 test(const int c, volatile int v)
5698 {
5699 static_assert(is_same<int, decltype(0)>::value == true, "");
5700 static_assert(is_same<int, decltype(c)>::value == false, "");
5701 static_assert(is_same<int, decltype(v)>::value == false, "");
5702 auto ac = c;
5703 auto av = v;
5704 auto sumi = ac + av + 'x';
5705 auto sumf = ac + av + 1.0;
5706 static_assert(is_same<int, decltype(ac)>::value == true, "");
5707 static_assert(is_same<int, decltype(av)>::value == true, "");
5708 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5709 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5710 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5711 return (sumf > 0.0) ? sumi : add(c, v);
5712 }
5713
5714 }
5715
5716 namespace test_noexcept
5717 {
5718
5719 int f() { return 0; }
5720 int g() noexcept { return 0; }
5721
5722 static_assert(noexcept(f()) == false, "");
5723 static_assert(noexcept(g()) == true, "");
5724
5725 }
5726
5727 namespace test_constexpr
5728 {
5729
5730 template < typename CharT >
5731 unsigned long constexpr
5732 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5733 {
5734 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5735 }
5736
5737 template < typename CharT >
5738 unsigned long constexpr
5739 strlen_c(const CharT *const s) noexcept
5740 {
5741 return strlen_c_r(s, 0UL);
5742 }
5743
5744 static_assert(strlen_c("") == 0UL, "");
5745 static_assert(strlen_c("1") == 1UL, "");
5746 static_assert(strlen_c("example") == 7UL, "");
5747 static_assert(strlen_c("another\0example") == 7UL, "");
5748
5749 }
5750
5751 namespace test_rvalue_references
5752 {
5753
5754 template < int N >
5755 struct answer
5756 {
5757 static constexpr int value = N;
5758 };
5759
5760 answer<1> f(int&) { return answer<1>(); }
5761 answer<2> f(const int&) { return answer<2>(); }
5762 answer<3> f(int&&) { return answer<3>(); }
5763
5764 void
5765 test()
5766 {
5767 int i = 0;
5768 const int c = 0;
5769 static_assert(decltype(f(i))::value == 1, "");
5770 static_assert(decltype(f(c))::value == 2, "");
5771 static_assert(decltype(f(0))::value == 3, "");
5772 }
5773
5774 }
5775
5776 namespace test_uniform_initialization
5777 {
5778
5779 struct test
5780 {
5781 static const int zero {};
5782 static const int one {1};
5783 };
5784
5785 static_assert(test::zero == 0, "");
5786 static_assert(test::one == 1, "");
5787
5788 }
5789
5790 namespace test_lambdas
5791 {
5792
5793 void
5794 test1()
5795 {
5796 auto lambda1 = [](){};
5797 auto lambda2 = lambda1;
5798 lambda1();
5799 lambda2();
5800 }
5801
5802 int
5803 test2()
5804 {
5805 auto a = [](int i, int j){ return i + j; }(1, 2);
5806 auto b = []() -> int { return '0'; }();
5807 auto c = [=](){ return a + b; }();
5808 auto d = [&](){ return c; }();
5809 auto e = [a, &b](int x) mutable {
5810 const auto identity = [](int y){ return y; };
5811 for (auto i = 0; i < a; ++i)
5812 a += b--;
5813 return x + identity(a + b);
5814 }(0);
5815 return a + b + c + d + e;
5816 }
5817
5818 int
5819 test3()
5820 {
5821 const auto nullary = [](){ return 0; };
5822 const auto unary = [](int x){ return x; };
5823 using nullary_t = decltype(nullary);
5824 using unary_t = decltype(unary);
5825 const auto higher1st = [](nullary_t f){ return f(); };
5826 const auto higher2nd = [unary](nullary_t f1){
5827 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5828 };
5829 return higher1st(nullary) + higher2nd(nullary)(unary);
5830 }
5831
5832 }
5833
5834 namespace test_variadic_templates
5835 {
5836
5837 template <int...>
5838 struct sum;
5839
5840 template <int N0, int... N1toN>
5841 struct sum<N0, N1toN...>
5842 {
5843 static constexpr auto value = N0 + sum<N1toN...>::value;
5844 };
5845
5846 template <>
5847 struct sum<>
5848 {
5849 static constexpr auto value = 0;
5850 };
5851
5852 static_assert(sum<>::value == 0, "");
5853 static_assert(sum<1>::value == 1, "");
5854 static_assert(sum<23>::value == 23, "");
5855 static_assert(sum<1, 2>::value == 3, "");
5856 static_assert(sum<5, 5, 11>::value == 21, "");
5857 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5858
5859 }
5860
5861 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5862 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5863 // because of this.
5864 namespace test_template_alias_sfinae
5865 {
5866
5867 struct foo {};
5868
5869 template<typename T>
5870 using member = typename T::member_type;
5871
5872 template<typename T>
5873 void func(...) {}
5874
5875 template<typename T>
5876 void func(member<T>*) {}
5877
5878 void test();
5879
5880 void test() { func<foo>(0); }
5881
5882 }
5883
5884} // namespace cxx11
5885
5886#endif // __cplusplus >= 201103L
5887
5888
5889
5890_ACEOF
5891if ac_fn_cxx_try_compile "$LINENO"; then :
5892 eval $cachevar=yes
5893else
5894 eval $cachevar=no
5895fi
5896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5897 CXX="$ac_save_CXX"
5898fi
5899eval ac_res=\$$cachevar
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5901$as_echo "$ac_res" >&6; }
5902 if eval test x\$$cachevar = xyes; then
5903 CXX_DIALECT="$switch"
5904 ac_success=yes
5905 break
5906 fi
5907 done
5908 fi
5909 ac_ext=c
5910ac_cpp='$CPP $CPPFLAGS'
5911ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5912ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5913ac_compiler_gnu=$ac_cv_c_compiler_gnu
5914
5915 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5916 if test x$ac_success = xno; then
5917 as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5918 fi
5919 fi
5920 if test x$ac_success = xno; then
5921 HAVE_CXX11=0
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5923$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5924 else
5925 HAVE_CXX11=1
5926
5927$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5928
5929 fi
5930
5931
5932
5933
a417dc56
RW
5934# Dependency checking.
5935rm -rf .tst 2>/dev/null
5936mkdir .tst 2>/dev/null
5937if test -d .tst; then
5938 am__leading_dot=.
5939else
5940 am__leading_dot=_
5941fi
5942rmdir .tst 2>/dev/null
5943
5944DEPDIR="${am__leading_dot}deps"
5945
81ecdfbb 5946ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5947
5948
5949depcc="$CC" am_compiler_list=
5950
5951am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5953$as_echo_n "checking dependency style of $depcc... " >&6; }
5954if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5955 $as_echo_n "(cached) " >&6
a417dc56
RW
5956else
5957 if test -f "$am_depcomp"; then
5958 # We make a subdir and do the tests there. Otherwise we can end up
5959 # making bogus files that we don't know about and never remove. For
5960 # instance it was reported that on HP-UX the gcc test will end up
5961 # making a dummy file named `D' -- because `-MD' means `put the output
5962 # in D'.
5963 mkdir conftest.dir
5964 # Copy depcomp to subdir because otherwise we won't find it if we're
5965 # using a relative directory.
5966 cp "$am_depcomp" conftest.dir
5967 cd conftest.dir
5968 # We will build objects and dependencies in a subdirectory because
5969 # it helps to detect inapplicable dependency modes. For instance
5970 # both Tru64's cc and ICC support -MD to output dependencies as a
5971 # side effect of compilation, but ICC will put the dependencies in
5972 # the current directory while Tru64 will put them in the object
5973 # directory.
5974 mkdir sub
5975
5976 am_cv_CC_dependencies_compiler_type=none
5977 if test "$am_compiler_list" = ""; then
5978 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5979 fi
5980 for depmode in $am_compiler_list; do
5981 if test $depmode = none; then break; fi
5982
81ecdfbb 5983 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5984 # Setup a source with many dependencies, because some compilers
5985 # like to wrap large dependency lists on column 80 (with \), and
5986 # we should not choose a depcomp mode which is confused by this.
5987 #
5988 # We need to recreate these files for each test, as the compiler may
5989 # overwrite some of them when testing with obscure command lines.
5990 # This happens at least with the AIX C compiler.
5991 : > sub/conftest.c
5992 for i in 1 2 3 4 5 6; do
5993 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5994 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5995 # Solaris 8's {/usr,}/bin/sh.
5996 touch sub/conftst$i.h
5997 done
5998 echo "include sub/conftest.Po" > confmf
5999
6000 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6001 # mode. It turns out that the SunPro C++ compiler does not properly
6002 # handle `-M -o', and we need to detect this.
6003 depcmd="depmode=$depmode \
6004 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6005 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6006 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6007 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6008 if env $depcmd > conftest.err 2>&1 &&
6009 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6010 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6011 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6012 # icc doesn't choke on unknown options, it will just issue warnings
6013 # or remarks (even with -Werror). So we grep stderr for any message
6014 # that says an option was ignored or not supported.
6015 # When given -MP, icc 7.0 and 7.1 complain thusly:
6016 # icc: Command line warning: ignoring option '-M'; no argument required
6017 # The diagnosis changed in icc 8.0:
6018 # icc: Command line remark: option '-MP' not supported
6019 if (grep 'ignoring option' conftest.err ||
6020 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6021 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6022 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6023 break
6024 fi
6025 fi
81ecdfbb 6026 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6027 sed -e 's/^/| /' < conftest.err >&5
6028 done
6029
6030 cd ..
6031 rm -rf conftest.dir
6032else
6033 am_cv_CC_dependencies_compiler_type=none
6034fi
6035
6036fi
81ecdfbb
RW
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6038$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6039if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 6040then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6041else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6042
6043fi
6044
6045
6046# Check for the 'make' the user wants to use.
6047for ac_prog in make
6048do
6049 # Extract the first word of "$ac_prog", so it can be a program name with args.
6050set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6052$as_echo_n "checking for $ac_word... " >&6; }
6053if test "${ac_cv_prog_MAKE+set}" = set; then :
6054 $as_echo_n "(cached) " >&6
a417dc56
RW
6055else
6056 if test -n "$MAKE"; then
6057 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
6058else
6059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060for as_dir in $PATH
6061do
6062 IFS=$as_save_IFS
6063 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6064 for ac_exec_ext in '' $ac_executable_extensions; do
6065 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 6066 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 6067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
6068 break 2
6069 fi
6070done
81ecdfbb
RW
6071 done
6072IFS=$as_save_IFS
a417dc56
RW
6073
6074fi
6075fi
6076MAKE=$ac_cv_prog_MAKE
6077if test -n "$MAKE"; then
81ecdfbb
RW
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
6079$as_echo "$MAKE" >&6; }
a417dc56 6080else
81ecdfbb
RW
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
a417dc56
RW
6083fi
6084
81ecdfbb 6085
a417dc56
RW
6086 test -n "$MAKE" && break
6087done
6088
6089MAKE_IS_GNU=
6090case "`$MAKE --version 2>&1 | sed 1q`" in
6091 *GNU*)
6092 MAKE_IS_GNU=yes
6093 ;;
6094esac
81ecdfbb 6095 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
6096 GMAKE_TRUE=
6097 GMAKE_FALSE='#'
6098else
6099 GMAKE_TRUE='#'
6100 GMAKE_FALSE=
6101fi
6102
81ecdfbb
RW
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6104$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6105set x ${MAKE-make}
6106ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6107if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
6108 $as_echo_n "(cached) " >&6
a417dc56
RW
6109else
6110 cat >conftest.make <<\_ACEOF
81ecdfbb 6111SHELL = /bin/sh
a417dc56 6112all:
81ecdfbb 6113 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
6114_ACEOF
6115# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
6116case `${MAKE-make} -f conftest.make 2>/dev/null` in
6117 *@@@%%%=?*=@@@%%%*)
6118 eval ac_cv_prog_make_${ac_make}_set=yes;;
6119 *)
6120 eval ac_cv_prog_make_${ac_make}_set=no;;
6121esac
a417dc56
RW
6122rm -f conftest.make
6123fi
81ecdfbb
RW
6124if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6126$as_echo "yes" >&6; }
a417dc56
RW
6127 SET_MAKE=
6128else
81ecdfbb
RW
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6130$as_echo "no" >&6; }
a417dc56
RW
6131 SET_MAKE="MAKE=${MAKE-make}"
6132fi
6133
6134
648d586d
JB
6135gnulib_extra_configure_args=
6136# If large-file support is disabled, make sure gnulib does the same.
6137if test "$enable_largefile" = no; then
6138gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6139fi
6140
c971b7fa
PA
6141# Configure gnulib. We need to build gnulib under some other
6142# directory not "gnulib", to avoid the problem of both GDB and
6143# GDBserver wanting to build it in the same directory, when building
6144# in the source dir.
783e057b 6145
c971b7fa
PA
6146 in_src="gnulib"
6147 in_build="build-gnulib"
648d586d 6148 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6149
6150 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6151 # so they do not pile up.
6152 ac_sub_configure_args=
6153 ac_prev=
6154 eval "set x $ac_configure_args"
6155 shift
6156 for ac_arg
6157 do
6158 if test -n "$ac_prev"; then
6159 ac_prev=
6160 continue
6161 fi
6162 case $ac_arg in
6163 -cache-file | --cache-file | --cache-fil | --cache-fi \
6164 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6165 ac_prev=cache_file ;;
6166 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6167 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6168 | --c=*)
6169 ;;
6170 --config-cache | -C)
6171 ;;
6172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6173 ac_prev=srcdir ;;
6174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6175 ;;
6176 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6177 ac_prev=prefix ;;
6178 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6179 ;;
6180 --disable-option-checking)
6181 ;;
6182 *)
6183 case $ac_arg in
6184 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6185 esac
6186 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6187 esac
6188 done
6189
6190 # Always prepend --prefix to ensure using the same prefix
6191 # in subdir configurations.
6192 ac_arg="--prefix=$prefix"
6193 case $ac_arg in
6194 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6195 esac
6196 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6197
6198 # Pass --silent
6199 if test "$silent" = yes; then
6200 ac_sub_configure_args="--silent $ac_sub_configure_args"
6201 fi
6202
6203 # Always prepend --disable-option-checking to silence warnings, since
6204 # different subdirs can have different --enable and --with options.
6205 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6206
6207 ac_popdir=`pwd`
6208 ac_dir=$in_build
6209
6210 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6211 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6212 $as_echo "$ac_msg" >&6
6213 as_dir="$ac_dir"; as_fn_mkdir_p
6214
38ea300a
PA
6215 case $srcdir in
6216 [\\/]* | ?:[\\/]* )
6217 ac_srcdir=$srcdir/$in_src ;;
6218 *) # Relative name.
6219 ac_srcdir=../$srcdir/$in_src ;;
6220 esac
c971b7fa
PA
6221
6222 cd "$ac_dir"
6223
6224 ac_sub_configure=$ac_srcdir/configure
6225
6226 # Make the cache file name correct relative to the subdirectory.
6227 case $cache_file in
6228 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6229 *) # Relative name.
6230 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6231 esac
6232
648d586d
JB
6233 if test -n "$in_extra_args"; then
6234 # Add the extra args at the end.
6235 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6236 fi
6237
c971b7fa
PA
6238 { $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
6239$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6240 # The eval makes quoting arguments work.
6241 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6242 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6243 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6244
6245 cd "$ac_popdir"
783e057b 6246
c971b7fa
PA
6247
6248
6249CONFIG_OBS=
6250CONFIG_DEPS=
6251CONFIG_SRCS=
6252ENABLE_CFLAGS=
6253
6254CONFIG_ALL=
6255CONFIG_CLEAN=
6256CONFIG_INSTALL=
6257CONFIG_UNINSTALL=
6258
6259# If we haven't got the data from the intl directory,
6260# assume NLS is disabled.
6261USE_NLS=no
6262LIBINTL=
6263LIBINTL_DEP=
6264INCINTL=
6265XGETTEXT=
6266GMSGFMT=
6267POSUB=
783e057b
DJ
6268
6269if test -f ../intl/config.intl; then
6270 . ../intl/config.intl
6271fi
81ecdfbb
RW
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6273$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6274if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6276$as_echo "no" >&6; }
783e057b 6277else
81ecdfbb
RW
6278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6279$as_echo "yes" >&6; }
783e057b 6280
81ecdfbb 6281$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6282
6283
81ecdfbb
RW
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6285$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6286 # Look for .po and .gmo files in the source directory.
6287 CATALOGS=
6288 XLINGUAS=
6289 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6290 # If there aren't any .gmo files the shell will give us the
6291 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6292 # weeded out.
6293 case "$cat" in *\**)
6294 continue;;
6295 esac
6296 # The quadruple backslash is collapsed to a double backslash
6297 # by the backticks, then collapsed again by the double quotes,
6298 # leaving us with one backslash in the sed expression (right
6299 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6300 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6301 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6302 # The user is allowed to set LINGUAS to a list of languages to
6303 # install catalogs for. If it's empty that means "all of them."
6304 if test "x$LINGUAS" = x; then
6305 CATALOGS="$CATALOGS $cat"
6306 XLINGUAS="$XLINGUAS $lang"
6307 else
6308 case "$LINGUAS" in *$lang*)
6309 CATALOGS="$CATALOGS $cat"
6310 XLINGUAS="$XLINGUAS $lang"
6311 ;;
6312 esac
e28b3332
DJ
6313 fi
6314 done
c971b7fa
PA
6315 LINGUAS="$XLINGUAS"
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6317$as_echo "$LINGUAS" >&6; }
6318
6319
6320 DATADIRNAME=share
6321
6322 INSTOBJEXT=.mo
6323
6324 GENCAT=gencat
6325
6326 CATOBJEXT=.gmo
e28b3332 6327
e28b3332
DJ
6328fi
6329
c971b7fa
PA
6330localedir='${datadir}/locale'
6331
6332
6333if test x"$USE_NLS" = xyes; then
6334 CONFIG_ALL="$CONFIG_ALL all-po"
6335 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6336 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6337 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6338fi
e28b3332 6339
c971b7fa
PA
6340GNULIB=build-gnulib/import
6341
6342# For Makefile dependencies.
6343GNULIB_STDINT_H=
6344if test x"$STDINT_H" != x; then
6345 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6346fi
6347
6348
c971b7fa
PA
6349PACKAGE=gdb
6350
6351cat >>confdefs.h <<_ACEOF
6352#define PACKAGE "$PACKAGE"
6353_ACEOF
6354
6355
6356
6357# We never need to detect it in this sub-configure.
6358# But preserve it for config.status --recheck.
6359
6360
6361
6362MAKEINFO_EXTRA_FLAGS=""
6363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6364$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6365if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6366 $as_echo_n "(cached) " >&6
6367else
6368 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6369 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6370 gdb_cv_have_makeinfo_click=yes
6371 else
6372 gdb_cv_have_makeinfo_click=no
6373 fi
6374fi
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6376$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6377if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6378 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6379fi
e28b3332
DJ
6380
6381
bec39cab
AC
6382
6383
81ecdfbb
RW
6384# Check whether --with-separate-debug-dir was given.
6385if test "${with_separate_debug_dir+set}" = set; then :
6386 withval=$with_separate_debug_dir;
b14b1491
TT
6387 DEBUGDIR=$withval
6388else
6389 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6390fi
6391
20e95c23 6392
783e057b
DJ
6393 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6394 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6395 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6396 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6397
783e057b
DJ
6398cat >>confdefs.h <<_ACEOF
6399#define DEBUGDIR "$ac_define_dir"
20e95c23 6400_ACEOF
20e95c23 6401
20e95c23 6402
20e95c23 6403
0c4a4063 6404
b14b1491
TT
6405 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6406 if test "x$prefix" = xNONE; then
6407 test_prefix=/usr/local
6408 else
6409 test_prefix=$prefix
6410 fi
783e057b 6411 else
b14b1491 6412 test_prefix=$exec_prefix
783e057b 6413 fi
b14b1491
TT
6414 value=0
6415 case ${ac_define_dir} in
6416 "${test_prefix}"|"${test_prefix}/"*|\
6417 '${exec_prefix}'|'${exec_prefix}/'*)
6418 value=1
6419 ;;
6420 esac
6421
6422cat >>confdefs.h <<_ACEOF
6423#define DEBUGDIR_RELOCATABLE $value
6424_ACEOF
6425
6426
6427
0c4a4063 6428
f83d8a90
DE
6429# We can't pass paths as command line arguments.
6430# Mingw32 tries to be clever and will convert the paths for us.
6431# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6432# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6433# This breaks GDB's relocatable path conversions since paths passed in
6434# config.h would not get so translated, the path prefixes no longer match.
6435
6436 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6437 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6438 ac_define_dir=`eval echo $bindir`
6439 ac_define_dir=`eval echo $ac_define_dir`
6440
6441cat >>confdefs.h <<_ACEOF
6442#define BINDIR "$ac_define_dir"
6443_ACEOF
6444
6445
6446
b14b1491
TT
6447# GDB's datadir relocation
6448
6449
6450
81ecdfbb
RW
6451# Check whether --with-gdb-datadir was given.
6452if test "${with_gdb_datadir+set}" = set; then :
6453 withval=$with_gdb_datadir;
b14b1491 6454 GDB_DATADIR=$withval
20e95c23 6455else
b14b1491 6456 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6457fi
6458
20e95c23 6459
b14b1491
TT
6460 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6461 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6462 ac_define_dir=`eval echo $GDB_DATADIR`
6463 ac_define_dir=`eval echo $ac_define_dir`
6464
6465cat >>confdefs.h <<_ACEOF
6466#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6467_ACEOF
6468
b14b1491
TT
6469
6470
0c4a4063 6471
b14b1491
TT
6472 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6473 if test "x$prefix" = xNONE; then
6474 test_prefix=/usr/local
6475 else
6476 test_prefix=$prefix
6477 fi
6478 else
6479 test_prefix=$exec_prefix
6480 fi
6481 value=0
6482 case ${ac_define_dir} in
6483 "${test_prefix}"|"${test_prefix}/"*|\
6484 '${exec_prefix}'|'${exec_prefix}/'*)
6485 value=1
6486 ;;
6487 esac
6488
6489cat >>confdefs.h <<_ACEOF
6490#define GDB_DATADIR_RELOCATABLE $value
6491_ACEOF
6492
6493
783e057b 6494
20e95c23 6495
0c4a4063 6496
81ecdfbb
RW
6497# Check whether --with-relocated-sources was given.
6498if test "${with_relocated_sources+set}" = set; then :
6499 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6500
6501 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6502 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6503 ac_define_dir=`eval echo $reloc_srcdir`
6504 ac_define_dir=`eval echo $ac_define_dir`
6505
6506cat >>confdefs.h <<_ACEOF
6507#define RELOC_SRCDIR "$ac_define_dir"
6508_ACEOF
6509
6510
6511
81ecdfbb
RW
6512fi
6513
29b0e8a2 6514
7349ff92
JK
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6516$as_echo_n "checking for default auto-load directory... " >&6; }
6517
6518# Check whether --with-auto-load-dir was given.
6519if test "${with_auto_load_dir+set}" = set; then :
6520 withval=$with_auto_load_dir;
6521else
1564a261 6522 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6523fi
6524
1564a261 6525escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6526
6527 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6528 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6529 ac_define_dir=`eval echo $escape_dir`
6530 ac_define_dir=`eval echo $ac_define_dir`
6531
6532cat >>confdefs.h <<_ACEOF
6533#define AUTO_LOAD_DIR "$ac_define_dir"
6534_ACEOF
6535
6536
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6538$as_echo "$with_auto_load_dir" >&6; }
6539
bccbefd2
JK
6540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6541$as_echo_n "checking for default auto-load safe-path... " >&6; }
6542
6543# Check whether --with-auto-load-safe-path was given.
6544if test "${with_auto_load_safe_path+set}" = set; then :
6545 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6546 with_auto_load_safe_path="/"
6547 fi
bccbefd2 6548else
7349ff92 6549 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6550fi
6551
1564a261 6552escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6553
6554 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6555 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6556 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6557 ac_define_dir=`eval echo $ac_define_dir`
6558
6559cat >>confdefs.h <<_ACEOF
6dea1fbd 6560#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6561_ACEOF
6562
6563
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6565$as_echo "$with_auto_load_safe_path" >&6; }
6566
29b0e8a2 6567
20e95c23 6568
5ae98d25 6569subdirs="$subdirs testsuite"
20e95c23
DJ
6570
6571
783e057b 6572# Check whether to support alternative target configurations
81ecdfbb
RW
6573# Check whether --enable-targets was given.
6574if test "${enable_targets+set}" = set; then :
6575 enableval=$enable_targets; case "${enableval}" in
6576 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6577 ;;
6578 no) enable_targets= ;;
6579 *) enable_targets=$enableval ;;
6580esac
81ecdfbb
RW
6581fi
6582
20e95c23 6583
783e057b 6584# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6585# Check whether --enable-64-bit-bfd was given.
6586if test "${enable_64_bit_bfd+set}" = set; then :
6587 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6588 yes) want64=true ;;
6589 no) want64=false ;;
81ecdfbb 6590 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6591esac
6592else
6593 want64=false
81ecdfbb
RW
6594fi
6595
783e057b
DJ
6596# Provide defaults for some variables set by the per-host and per-target
6597# configuration.
6598gdb_host_obs=posix-hdep.o
20e95c23 6599
783e057b
DJ
6600if test "${target}" = "${host}"; then
6601 gdb_native=yes
6602else
6603 gdb_native=no
6604fi
20e95c23 6605
783e057b 6606. $srcdir/configure.host
20e95c23 6607
fb23d554
SDJ
6608# Add in the common host objects.
6609. $srcdir/common/common.host
6610gdb_host_obs="$gdb_host_obs $common_host_obs"
6611
783e057b 6612# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6613
783e057b
DJ
6614TARGET_OBS=
6615all_targets=
b292c783 6616HAVE_NATIVE_GCORE_TARGET=
20e95c23 6617
783e057b 6618for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6619do
783e057b
DJ
6620 if test "$targ_alias" = "all"; then
6621 all_targets=true
6622 else
6623 # Canonicalize the secondary target names.
6624 result=`$ac_config_sub $targ_alias 2>/dev/null`
6625 if test -n "$result"; then
6626 targ=$result
6627 else
6628 targ=$targ_alias
6629 fi
20e95c23 6630
783e057b 6631 . ${srcdir}/configure.tgt
20e95c23 6632
bf307134
JB
6633 if test -z "${gdb_target_obs}"; then :
6634 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6635fi
6636
783e057b
DJ
6637 # Target-specific object files
6638 for i in ${gdb_target_obs}; do
6639 case " $TARGET_OBS " in
6640 *" ${i} "*) ;;
6641 *)
6642 TARGET_OBS="$TARGET_OBS ${i}"
6643 ;;
6644 esac
6645 done
20e95c23 6646
783e057b
DJ
6647 # Check whether this target needs 64-bit CORE_ADDR
6648 if test x${want64} = xfalse; then
6649 . ${srcdir}/../bfd/config.bfd
6650 fi
b292c783
JK
6651
6652 # Check whether this target is native and supports gcore.
6653 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6654 && $gdb_have_gcore; then
6655 HAVE_NATIVE_GCORE_TARGET=1
6656 fi
783e057b 6657 fi
20e95c23
DJ
6658done
6659
783e057b
DJ
6660if test x${all_targets} = xtrue; then
6661
6662 # We want all 64-bit targets if we either:
6663 # - run on a 64-bit host or
6664 # - already require 64-bit support for some other target or
6665 # - the --enable-64-bit-bfd option was supplied
6666 # Otherwise we only support all 32-bit targets.
6667 #
6668 # NOTE: This test must be in sync with the corresponding
6669 # tests in BFD!
20e95c23 6670
783e057b 6671 if test x${want64} = xfalse; then
81ecdfbb
RW
6672 # The cast to long int works around a bug in the HP C Compiler
6673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6675# This bug is HP SR number 8606223364.
6676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6677$as_echo_n "checking size of long... " >&6; }
6678if test "${ac_cv_sizeof_long+set}" = set; then :
6679 $as_echo_n "(cached) " >&6
c0993dbe 6680else
81ecdfbb 6681 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6682
81ecdfbb
RW
6683else
6684 if test "$ac_cv_type_long" = yes; then
6685 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6687{ as_fn_set_status 77
6688as_fn_error "cannot compute sizeof (long)
6689See \`config.log' for more details." "$LINENO" 5; }; }
6690 else
6691 ac_cv_sizeof_long=0
6692 fi
c0993dbe 6693fi
81ecdfbb 6694
c0993dbe 6695fi
81ecdfbb
RW
6696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6697$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6698
c0993dbe 6699
c0993dbe 6700
c0993dbe
UW
6701cat >>confdefs.h <<_ACEOF
6702#define SIZEOF_LONG $ac_cv_sizeof_long
6703_ACEOF
6704
6705
6706 if test "x${ac_cv_sizeof_long}" = "x8"; then
6707 want64=true
6708 fi
6709 fi
6710 if test x${want64} = xtrue; then
6711 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6712 else
6713 TARGET_OBS='$(ALL_TARGET_OBS)'
6714 fi
6715fi
6716
6717
6718
b292c783 6719
c0993dbe
UW
6720# For other settings, only the main target counts.
6721gdb_sim=
6722gdb_osabi=
6723build_gdbserver=
6724targ=$target; . ${srcdir}/configure.tgt
6725
6726# Fetch the default architecture and default target vector from BFD.
6727targ=$target; . $srcdir/../bfd/config.bfd
6728
6729# We only want the first architecture, so strip off the others if
6730# there is more than one.
6731targ_archs=`echo $targ_archs | sed 's/ .*//'`
6732
6733if test "x$targ_archs" != x; then
6734
6735cat >>confdefs.h <<_ACEOF
6736#define DEFAULT_BFD_ARCH $targ_archs
6737_ACEOF
6738
6739fi
6740if test "x$targ_defvec" != x; then
6741
6742cat >>confdefs.h <<_ACEOF
6743#define DEFAULT_BFD_VEC $targ_defvec
6744_ACEOF
6745
6746fi
6747
c0993dbe
UW
6748# The CLI cannot be disabled yet, but may be in the future.
6749
6750# Enable CLI.
81ecdfbb
RW
6751# Check whether --enable-gdbcli was given.
6752if test "${enable_gdbcli+set}" = set; then :
6753 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
6754 yes)
6755 ;;
6756 no)
81ecdfbb 6757 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 6758 *)
81ecdfbb 6759 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
6760 esac
6761else
6762 enable_gdbcli=yes
81ecdfbb
RW
6763fi
6764
c0993dbe
UW
6765if test x"$enable_gdbcli" = xyes; then
6766 if test -d $srcdir/cli; then
6767 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6768 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6769 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6770 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6771 fi
6772fi
6773
6774# Enable MI.
81ecdfbb
RW
6775# Check whether --enable-gdbmi was given.
6776if test "${enable_gdbmi+set}" = set; then :
6777 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6778 yes | no)
6779 ;;
6780 *)
81ecdfbb 6781 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6782 esac
6783else
6784 enable_gdbmi=yes
81ecdfbb
RW
6785fi
6786
c0993dbe
UW
6787if test x"$enable_gdbmi" = xyes; then
6788 if test -d $srcdir/mi; then
6789 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6790 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6791 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6792 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6793 fi
6794fi
6795
6796# Enable TUI.
81ecdfbb
RW
6797# Check whether --enable-tui was given.
6798if test "${enable_tui+set}" = set; then :
6799 enableval=$enable_tui; case $enableval in
3ca64bd3 6800 yes | no | auto)
c0993dbe
UW
6801 ;;
6802 *)
81ecdfbb 6803 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6804 esac
6805else
3ca64bd3 6806 enable_tui=auto
81ecdfbb
RW
6807fi
6808
c0993dbe
UW
6809
6810# Enable gdbtk.
81ecdfbb
RW
6811# Check whether --enable-gdbtk was given.
6812if test "${enable_gdbtk+set}" = set; then :
6813 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6814 yes | no)
6815 ;;
6816 *)
81ecdfbb 6817 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6818 esac
6819else
5062cc19 6820 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6821 enable_gdbtk=yes
6822 else
6823 enable_gdbtk=no
6824 fi
81ecdfbb
RW
6825fi
6826
c0993dbe
UW
6827# We unconditionally disable gdbtk tests on selected platforms.
6828case $host_os in
6829 go32* | windows*)
81ecdfbb
RW
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6831$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6832 enable_gdbtk=no ;;
6833esac
6834
05e7c244 6835# Libunwind support for ia64.
bec39cab 6836
05e7c244
JK
6837
6838# Check whether --with-libunwind-ia64 was given.
6839if test "${with_libunwind_ia64+set}" = set; then :
6840 withval=$with_libunwind_ia64;
bec39cab 6841else
05e7c244
JK
6842 with_libunwind_ia64=auto
6843fi
bec39cab 6844
05e7c244
JK
6845
6846# Backward compatibility option.
6847if test "${with_libunwind+set}" = set; then
6848 if test x"$with_libunwind_ia64" != xauto; then
6849 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6850 fi
6851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6852$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6853 with_libunwind_ia64="$with_libunwind"
6854fi
6855
6856case "$with_libunwind_ia64" in
6857 yes | no)
6858 ;;
6859 auto)
6860 for ac_header in libunwind-ia64.h
81ecdfbb 6861do :
b54a8fd7
PA
6862 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6863if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6864 cat >>confdefs.h <<_ACEOF
b54a8fd7 6865#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6866_ACEOF
6867
6868fi
6869
6870done
6871
05e7c244
JK
6872 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6873 ;;
6874 *)
6875 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6876 ;;
6877esac
bec39cab 6878
05e7c244 6879if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6880 for ac_header in libunwind-ia64.h
81ecdfbb 6881do :
b54a8fd7
PA
6882 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6883if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6884 cat >>confdefs.h <<_ACEOF
b54a8fd7 6885#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6886_ACEOF
6887
6888fi
6889
6890done
6891
05e7c244
JK
6892 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6893 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6894 fi
6895 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6896 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6897 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6898fi
6899
cb01cfba
JB
6900opt_curses=no
6901
81ecdfbb
RW
6902# Check whether --with-curses was given.
6903if test "${with_curses+set}" = set; then :
6904 withval=$with_curses; opt_curses=$withval
6905fi
6906
cb01cfba 6907
76a39ba7 6908prefer_curses=no
cb01cfba 6909if test "$opt_curses" = "yes"; then
76a39ba7 6910 prefer_curses=yes
cb01cfba
JB
6911fi
6912
a9322a30 6913# Profiling support.
81ecdfbb
RW
6914# Check whether --enable-profiling was given.
6915if test "${enable_profiling+set}" = set; then :
6916 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6917 yes | no)
6918 ;;
6919 *)
81ecdfbb 6920 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6921 esac
6922else
6923 enable_profiling=no
81ecdfbb 6924fi
bec39cab 6925
a9322a30
TT
6926
6927for ac_func in monstartup _mcleanup
81ecdfbb
RW
6928do :
6929 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6930ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6931eval as_val=\$$as_ac_var
6932 if test "x$as_val" = x""yes; then :
6933 cat >>confdefs.h <<_ACEOF
6934#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6935_ACEOF
a9322a30 6936
81ecdfbb
RW
6937fi
6938done
a9322a30 6939
81ecdfbb
RW
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6941$as_echo_n "checking for _etext... " >&6; }
6942if test "${ac_cv_var__etext+set}" = set; then :
6943 $as_echo_n "(cached) " >&6
6944else
6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6946/* end confdefs.h. */
6947#include <stdlib.h>
6948extern char _etext;
a9322a30
TT
6949
6950int
6951main ()
6952{
6953free (&_etext);
6954 ;
6955 return 0;
6956}
bec39cab 6957_ACEOF
81ecdfbb 6958if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6959 ac_cv_var__etext=yes
bec39cab 6960else
81ecdfbb 6961 ac_cv_var__etext=no
bec39cab 6962fi
81ecdfbb
RW
6963rm -f core conftest.err conftest.$ac_objext \
6964 conftest$ac_exeext conftest.$ac_ext
bec39cab 6965fi
81ecdfbb
RW
6966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6967$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6968if test $ac_cv_var__etext = yes; then
60ca704f 6969
81ecdfbb 6970$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6971
bec39cab 6972fi
81ecdfbb
RW
6973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6974$as_echo_n "checking for etext... " >&6; }
6975if test "${ac_cv_var_etext+set}" = set; then :
6976 $as_echo_n "(cached) " >&6
bec39cab 6977else
81ecdfbb 6978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6979/* end confdefs.h. */
a9322a30
TT
6980#include <stdlib.h>
6981extern char etext;
bec39cab
AC
6982
6983int
6984main ()
6985{
a9322a30 6986free (&etext);
bec39cab
AC
6987 ;
6988 return 0;
6989}
6990_ACEOF
81ecdfbb 6991if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6992 ac_cv_var_etext=yes
bec39cab 6993else
81ecdfbb 6994 ac_cv_var_etext=no
bec39cab 6995fi
81ecdfbb
RW
6996rm -f core conftest.err conftest.$ac_objext \
6997 conftest$ac_exeext conftest.$ac_ext
bec39cab 6998fi
81ecdfbb
RW
6999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7000$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
7001if test $ac_cv_var_etext = yes; then
7002
81ecdfbb 7003$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7004
7005fi
a9322a30
TT
7006if test "$enable_profiling" = yes ; then
7007 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 7008 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7009 fi
7010 PROFILE_CFLAGS=-pg
7011 OLD_CFLAGS="$CFLAGS"
7012 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7013
81ecdfbb
RW
7014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7015$as_echo_n "checking whether $CC supports -pg... " >&6; }
7016if test "${ac_cv_cc_supports_pg+set}" = set; then :
7017 $as_echo_n "(cached) " >&6
bec39cab 7018else
81ecdfbb 7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7020/* end confdefs.h. */
bec39cab
AC
7021
7022int
7023main ()
7024{
a9322a30 7025int x;
bec39cab
AC
7026 ;
7027 return 0;
7028}
7029_ACEOF
81ecdfbb 7030if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7031 ac_cv_cc_supports_pg=yes
bec39cab 7032else
81ecdfbb 7033 ac_cv_cc_supports_pg=no
bec39cab 7034fi
81ecdfbb 7035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7036fi
81ecdfbb
RW
7037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7038$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7039
a9322a30 7040 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 7041 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7042 fi
bec39cab 7043
a9322a30 7044 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7045fi
7046
c16158bc
JM
7047
7048
81ecdfbb
RW
7049# Check whether --with-pkgversion was given.
7050if test "${with_pkgversion+set}" = set; then :
7051 withval=$with_pkgversion; case "$withval" in
7052 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7053 no) PKGVERSION= ;;
7054 *) PKGVERSION="($withval) " ;;
7055 esac
7056else
7057 PKGVERSION="(GDB) "
7058
81ecdfbb 7059fi
c16158bc
JM
7060
7061
7062
7063
81ecdfbb
RW
7064
7065# Check whether --with-bugurl was given.
7066if test "${with_bugurl+set}" = set; then :
7067 withval=$with_bugurl; case "$withval" in
7068 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7069 no) BUGURL=
7070 ;;
7071 *) BUGURL="$withval"
7072 ;;
7073 esac
7074else
7075 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7076
81ecdfbb
RW
7077fi
7078
c16158bc
JM
7079 case ${BUGURL} in
7080 "")
7081 REPORT_BUGS_TO=
7082 REPORT_BUGS_TEXI=
7083 ;;
7084 *)
7085 REPORT_BUGS_TO="<$BUGURL>"
7086 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7087 ;;
7088 esac;
7089
7090
7091
7092
7093cat >>confdefs.h <<_ACEOF
7094#define PKGVERSION "$PKGVERSION"
7095_ACEOF
7096
7097
7098cat >>confdefs.h <<_ACEOF
7099#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7100_ACEOF
7101
7102
bec39cab
AC
7103# --------------------- #
7104# Checks for programs. #
7105# --------------------- #
7106
7107for ac_prog in gawk mawk nawk awk
7108do
7109 # Extract the first word of "$ac_prog", so it can be a program name with args.
7110set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7112$as_echo_n "checking for $ac_word... " >&6; }
7113if test "${ac_cv_prog_AWK+set}" = set; then :
7114 $as_echo_n "(cached) " >&6
bec39cab
AC
7115else
7116 if test -n "$AWK"; then
7117 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7118else
7119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7120for as_dir in $PATH
7121do
7122 IFS=$as_save_IFS
7123 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7124 for ac_exec_ext in '' $ac_executable_extensions; do
7125 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7126 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7128 break 2
7129 fi
7130done
81ecdfbb
RW
7131 done
7132IFS=$as_save_IFS
bec39cab
AC
7133
7134fi
7135fi
7136AWK=$ac_cv_prog_AWK
7137if test -n "$AWK"; then
81ecdfbb
RW
7138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7139$as_echo "$AWK" >&6; }
bec39cab 7140else
81ecdfbb
RW
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7142$as_echo "no" >&6; }
bec39cab
AC
7143fi
7144
bec39cab 7145
81ecdfbb 7146 test -n "$AWK" && break
bec39cab
AC
7147done
7148
c971b7fa
PA
7149# Find a good install program. We prefer a C program (faster),
7150# so one script is as good as another. But avoid the broken or
7151# incompatible versions:
7152# SysV /etc/install, /usr/sbin/install
7153# SunOS /usr/etc/install
7154# IRIX /sbin/install
7155# AIX /bin/install
7156# AmigaOS /C/install, which installs bootblocks on floppy discs
7157# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7158# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7159# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7160# OS/2's system install, which has a completely different semantic
7161# ./install, which can be erroneously created by make from ./install.sh.
7162# Reject install programs that cannot install multiple files.
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7164$as_echo_n "checking for a BSD-compatible install... " >&6; }
7165if test -z "$INSTALL"; then
7166if test "${ac_cv_path_install+set}" = set; then :
7167 $as_echo_n "(cached) " >&6
7168else
7169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7170for as_dir in $PATH
7171do
7172 IFS=$as_save_IFS
7173 test -z "$as_dir" && as_dir=.
7174 # Account for people who put trailing slashes in PATH elements.
7175case $as_dir/ in #((
7176 ./ | .// | /[cC]/* | \
7177 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7178 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7179 /usr/ucb/* ) ;;
7180 *)
7181 # OSF1 and SCO ODT 3.0 have their own names for install.
7182 # Don't use installbsd from OSF since it installs stuff as root
7183 # by default.
7184 for ac_prog in ginstall scoinst install; do
7185 for ac_exec_ext in '' $ac_executable_extensions; do
7186 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7187 if test $ac_prog = install &&
7188 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7189 # AIX install. It has an incompatible calling convention.
7190 :
7191 elif test $ac_prog = install &&
7192 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7193 # program-specific install script used by HP pwplus--don't use.
7194 :
7195 else
7196 rm -rf conftest.one conftest.two conftest.dir
7197 echo one > conftest.one
7198 echo two > conftest.two
7199 mkdir conftest.dir
7200 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7201 test -s conftest.one && test -s conftest.two &&
7202 test -s conftest.dir/conftest.one &&
7203 test -s conftest.dir/conftest.two
7204 then
7205 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7206 break 3
7207 fi
7208 fi
7209 fi
7210 done
7211 done
7212 ;;
7213esac
7214
7215 done
7216IFS=$as_save_IFS
7217
7218rm -rf conftest.one conftest.two conftest.dir
7219
7220fi
7221 if test "${ac_cv_path_install+set}" = set; then
7222 INSTALL=$ac_cv_path_install
7223 else
7224 # As a last resort, use the slow shell script. Don't cache a
7225 # value for INSTALL within a source directory, because that will
7226 # break other packages using the cache if that directory is
7227 # removed, or if the value is a relative name.
7228 INSTALL=$ac_install_sh
7229 fi
7230fi
7231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7232$as_echo "$INSTALL" >&6; }
7233
7234# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7235# It thinks the first close brace ends the variable substitution.
7236test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7237
7238test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7239
7240test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7241
81ecdfbb
RW
7242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7243$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7244LN_S=$as_ln_s
7245if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7247$as_echo "yes" >&6; }
bec39cab 7248else
81ecdfbb
RW
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7250$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7251fi
7252
7253if test -n "$ac_tool_prefix"; then
7254 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7255set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then :
7259 $as_echo_n "(cached) " >&6
bec39cab
AC
7260else
7261 if test -n "$RANLIB"; then
7262 ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
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
7281RANLIB=$ac_cv_prog_RANLIB
7282if test -n "$RANLIB"; then
81ecdfbb
RW
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7284$as_echo "$RANLIB" >&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
7291fi
7292if test -z "$ac_cv_prog_RANLIB"; then
7293 ac_ct_RANLIB=$RANLIB
7294 # Extract the first word of "ranlib", so it can be a program name with args.
7295set dummy ranlib; ac_word=$2
81ecdfbb
RW
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297$as_echo_n "checking for $ac_word... " >&6; }
7298if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7299 $as_echo_n "(cached) " >&6
bec39cab
AC
7300else
7301 if test -n "$ac_ct_RANLIB"; then
7302 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7303else
7304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305for as_dir in $PATH
7306do
7307 IFS=$as_save_IFS
7308 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7309 for ac_exec_ext in '' $ac_executable_extensions; do
7310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7311 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7312 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7313 break 2
7314 fi
7315done
81ecdfbb
RW
7316 done
7317IFS=$as_save_IFS
bec39cab 7318
bec39cab
AC
7319fi
7320fi
7321ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7322if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7324$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7325else
81ecdfbb
RW
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327$as_echo "no" >&6; }
bec39cab
AC
7328fi
7329
81ecdfbb
RW
7330 if test "x$ac_ct_RANLIB" = x; then
7331 RANLIB=":"
7332 else
7333 case $cross_compiling:$ac_tool_warned in
7334yes:)
7335{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7336$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7337ac_tool_warned=yes ;;
7338esac
7339 RANLIB=$ac_ct_RANLIB
7340 fi
bec39cab
AC
7341else
7342 RANLIB="$ac_cv_prog_RANLIB"
7343fi
7344
7345for ac_prog in 'bison -y' byacc
7346do
7347 # Extract the first word of "$ac_prog", so it can be a program name with args.
7348set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350$as_echo_n "checking for $ac_word... " >&6; }
7351if test "${ac_cv_prog_YACC+set}" = set; then :
7352 $as_echo_n "(cached) " >&6
bec39cab
AC
7353else
7354 if test -n "$YACC"; then
7355 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7356else
7357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358for as_dir in $PATH
7359do
7360 IFS=$as_save_IFS
7361 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7362 for ac_exec_ext in '' $ac_executable_extensions; do
7363 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7364 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7366 break 2
7367 fi
7368done
81ecdfbb
RW
7369 done
7370IFS=$as_save_IFS
bec39cab
AC
7371
7372fi
7373fi
7374YACC=$ac_cv_prog_YACC
7375if test -n "$YACC"; then
81ecdfbb
RW
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7377$as_echo "$YACC" >&6; }
bec39cab 7378else
81ecdfbb
RW
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380$as_echo "no" >&6; }
bec39cab
AC
7381fi
7382
81ecdfbb 7383
bec39cab
AC
7384 test -n "$YACC" && break
7385done
7386test -n "$YACC" || YACC="yacc"
7387
7388
7389if test -n "$ac_tool_prefix"; then
7390 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7391set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7393$as_echo_n "checking for $ac_word... " >&6; }
7394if test "${ac_cv_prog_AR+set}" = set; then :
7395 $as_echo_n "(cached) " >&6
bec39cab
AC
7396else
7397 if test -n "$AR"; then
7398 ac_cv_prog_AR="$AR" # Let the user override the test.
7399else
7400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7401for as_dir in $PATH
7402do
7403 IFS=$as_save_IFS
7404 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7405 for ac_exec_ext in '' $ac_executable_extensions; do
7406 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7407 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7408 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7409 break 2
7410 fi
7411done
81ecdfbb
RW
7412 done
7413IFS=$as_save_IFS
bec39cab
AC
7414
7415fi
7416fi
7417AR=$ac_cv_prog_AR
7418if test -n "$AR"; then
81ecdfbb
RW
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7420$as_echo "$AR" >&6; }
bec39cab 7421else
81ecdfbb
RW
7422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7423$as_echo "no" >&6; }
bec39cab
AC
7424fi
7425
81ecdfbb 7426
bec39cab
AC
7427fi
7428if test -z "$ac_cv_prog_AR"; then
7429 ac_ct_AR=$AR
7430 # Extract the first word of "ar", so it can be a program name with args.
7431set dummy ar; ac_word=$2
81ecdfbb
RW
7432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7433$as_echo_n "checking for $ac_word... " >&6; }
7434if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7435 $as_echo_n "(cached) " >&6
bec39cab
AC
7436else
7437 if test -n "$ac_ct_AR"; then
7438 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7439else
7440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7441for as_dir in $PATH
7442do
7443 IFS=$as_save_IFS
7444 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7445 for ac_exec_ext in '' $ac_executable_extensions; do
7446 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7447 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7449 break 2
7450 fi
7451done
81ecdfbb
RW
7452 done
7453IFS=$as_save_IFS
bec39cab
AC
7454
7455fi
7456fi
7457ac_ct_AR=$ac_cv_prog_ac_ct_AR
7458if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7460$as_echo "$ac_ct_AR" >&6; }
bec39cab 7461else
81ecdfbb
RW
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7463$as_echo "no" >&6; }
bec39cab
AC
7464fi
7465
81ecdfbb
RW
7466 if test "x$ac_ct_AR" = x; then
7467 AR=""
7468 else
7469 case $cross_compiling:$ac_tool_warned in
7470yes:)
7471{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7472$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7473ac_tool_warned=yes ;;
7474esac
7475 AR=$ac_ct_AR
7476 fi
bec39cab
AC
7477else
7478 AR="$ac_cv_prog_AR"
7479fi
7480
7481if test -n "$ac_tool_prefix"; then
7482 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7483set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7485$as_echo_n "checking for $ac_word... " >&6; }
7486if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7487 $as_echo_n "(cached) " >&6
bec39cab
AC
7488else
7489 if test -n "$DLLTOOL"; then
7490 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7491else
7492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7493for as_dir in $PATH
7494do
7495 IFS=$as_save_IFS
7496 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7497 for ac_exec_ext in '' $ac_executable_extensions; do
7498 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7499 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7501 break 2
7502 fi
7503done
81ecdfbb
RW
7504 done
7505IFS=$as_save_IFS
bec39cab
AC
7506
7507fi
7508fi
7509DLLTOOL=$ac_cv_prog_DLLTOOL
7510if test -n "$DLLTOOL"; then
81ecdfbb
RW
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7512$as_echo "$DLLTOOL" >&6; }
bec39cab 7513else
81ecdfbb
RW
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7515$as_echo "no" >&6; }
bec39cab
AC
7516fi
7517
81ecdfbb 7518
bec39cab
AC
7519fi
7520if test -z "$ac_cv_prog_DLLTOOL"; then
7521 ac_ct_DLLTOOL=$DLLTOOL
7522 # Extract the first word of "dlltool", so it can be a program name with args.
7523set dummy dlltool; ac_word=$2
81ecdfbb
RW
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7525$as_echo_n "checking for $ac_word... " >&6; }
7526if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7527 $as_echo_n "(cached) " >&6
bec39cab
AC
7528else
7529 if test -n "$ac_ct_DLLTOOL"; then
7530 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7531else
7532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533for as_dir in $PATH
7534do
7535 IFS=$as_save_IFS
7536 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7537 for ac_exec_ext in '' $ac_executable_extensions; do
7538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7539 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7541 break 2
7542 fi
7543done
81ecdfbb
RW
7544 done
7545IFS=$as_save_IFS
bec39cab
AC
7546
7547fi
7548fi
7549ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7550if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7552$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7553else
81ecdfbb
RW
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7555$as_echo "no" >&6; }
bec39cab
AC
7556fi
7557
81ecdfbb
RW
7558 if test "x$ac_ct_DLLTOOL" = x; then
7559 DLLTOOL=""
7560 else
7561 case $cross_compiling:$ac_tool_warned in
7562yes:)
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7564$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7565ac_tool_warned=yes ;;
7566esac
7567 DLLTOOL=$ac_ct_DLLTOOL
7568 fi
bec39cab
AC
7569else
7570 DLLTOOL="$ac_cv_prog_DLLTOOL"
7571fi
7572
7573if test -n "$ac_tool_prefix"; then
7574 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7575set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7577$as_echo_n "checking for $ac_word... " >&6; }
7578if test "${ac_cv_prog_WINDRES+set}" = set; then :
7579 $as_echo_n "(cached) " >&6
bec39cab
AC
7580else
7581 if test -n "$WINDRES"; then
7582 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7583else
7584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585for as_dir in $PATH
7586do
7587 IFS=$as_save_IFS
7588 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7589 for ac_exec_ext in '' $ac_executable_extensions; do
7590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7591 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7593 break 2
7594 fi
7595done
81ecdfbb
RW
7596 done
7597IFS=$as_save_IFS
bec39cab
AC
7598
7599fi
7600fi
7601WINDRES=$ac_cv_prog_WINDRES
7602if test -n "$WINDRES"; then
81ecdfbb
RW
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7604$as_echo "$WINDRES" >&6; }
bec39cab 7605else
81ecdfbb
RW
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7607$as_echo "no" >&6; }
bec39cab
AC
7608fi
7609
81ecdfbb 7610
bec39cab
AC
7611fi
7612if test -z "$ac_cv_prog_WINDRES"; then
7613 ac_ct_WINDRES=$WINDRES
7614 # Extract the first word of "windres", so it can be a program name with args.
7615set dummy windres; ac_word=$2
81ecdfbb
RW
7616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7617$as_echo_n "checking for $ac_word... " >&6; }
7618if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7619 $as_echo_n "(cached) " >&6
bec39cab
AC
7620else
7621 if test -n "$ac_ct_WINDRES"; then
7622 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7623else
7624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7625for as_dir in $PATH
7626do
7627 IFS=$as_save_IFS
7628 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7629 for ac_exec_ext in '' $ac_executable_extensions; do
7630 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7631 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7633 break 2
7634 fi
7635done
81ecdfbb
RW
7636 done
7637IFS=$as_save_IFS
bec39cab
AC
7638
7639fi
7640fi
7641ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7642if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7644$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7645else
81ecdfbb
RW
7646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7647$as_echo "no" >&6; }
c906108c 7648fi
bec39cab 7649
81ecdfbb
RW
7650 if test "x$ac_ct_WINDRES" = x; then
7651 WINDRES=""
7652 else
7653 case $cross_compiling:$ac_tool_warned in
7654yes:)
7655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7657ac_tool_warned=yes ;;
7658esac
7659 WINDRES=$ac_ct_WINDRES
7660 fi
c906108c 7661else
bec39cab 7662 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7663fi
7664
bec39cab 7665
036c3acb
TS
7666case $host_os in
7667 gnu*)
7668 # Needed for GNU Hurd hosts.
7669 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7670 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7671set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if test "${ac_cv_prog_MIG+set}" = set; then :
7675 $as_echo_n "(cached) " >&6
c906108c 7676else
bec39cab
AC
7677 if test -n "$MIG"; then
7678 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7679else
7680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7681for as_dir in $PATH
7682do
7683 IFS=$as_save_IFS
7684 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7685 for ac_exec_ext in '' $ac_executable_extensions; do
7686 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7687 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7689 break 2
7690 fi
7691done
81ecdfbb
RW
7692 done
7693IFS=$as_save_IFS
bec39cab 7694
c906108c 7695fi
bec39cab
AC
7696fi
7697MIG=$ac_cv_prog_MIG
7698if test -n "$MIG"; then
81ecdfbb
RW
7699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7700$as_echo "$MIG" >&6; }
c906108c 7701else
81ecdfbb
RW
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7703$as_echo "no" >&6; }
c906108c
SS
7704fi
7705
81ecdfbb 7706
bec39cab
AC
7707fi
7708if test -z "$ac_cv_prog_MIG"; then
7709 ac_ct_MIG=$MIG
7710 # Extract the first word of "mig", so it can be a program name with args.
7711set dummy mig; ac_word=$2
81ecdfbb
RW
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7713$as_echo_n "checking for $ac_word... " >&6; }
7714if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7715 $as_echo_n "(cached) " >&6
bec39cab
AC
7716else
7717 if test -n "$ac_ct_MIG"; then
7718 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7719else
7720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721for as_dir in $PATH
7722do
7723 IFS=$as_save_IFS
7724 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7725 for ac_exec_ext in '' $ac_executable_extensions; do
7726 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7727 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7729 break 2
7730 fi
7731done
81ecdfbb
RW
7732 done
7733IFS=$as_save_IFS
c906108c 7734
bec39cab
AC
7735fi
7736fi
7737ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7738if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7740$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7741else
81ecdfbb
RW
7742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7743$as_echo "no" >&6; }
bec39cab 7744fi
c906108c 7745
81ecdfbb
RW
7746 if test "x$ac_ct_MIG" = x; then
7747 MIG=""
7748 else
7749 case $cross_compiling:$ac_tool_warned in
7750yes:)
7751{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7752$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7753ac_tool_warned=yes ;;
7754esac
7755 MIG=$ac_ct_MIG
7756 fi
bec39cab
AC
7757else
7758 MIG="$ac_cv_prog_MIG"
7759fi
c906108c 7760
036c3acb
TS
7761 if test x"$MIG" = x; then
7762 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7763 fi
7764 ;;
7765esac
c906108c 7766
bec39cab
AC
7767# ---------------------- #
7768# Checks for libraries. #
7769# ---------------------- #
c906108c 7770
bec39cab 7771# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7773$as_echo_n "checking for main in -lm... " >&6; }
7774if test "${ac_cv_lib_m_main+set}" = set; then :
7775 $as_echo_n "(cached) " >&6
bec39cab
AC
7776else
7777 ac_check_lib_save_LIBS=$LIBS
7778LIBS="-lm $LIBS"
81ecdfbb 7779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7780/* end confdefs.h. */
c906108c 7781
c906108c 7782
bec39cab
AC
7783int
7784main ()
7785{
81ecdfbb 7786return main ();
bec39cab
AC
7787 ;
7788 return 0;
7789}
7790_ACEOF
81ecdfbb 7791if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7792 ac_cv_lib_m_main=yes
7793else
81ecdfbb 7794 ac_cv_lib_m_main=no
bec39cab 7795fi
81ecdfbb
RW
7796rm -f core conftest.err conftest.$ac_objext \
7797 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7798LIBS=$ac_check_lib_save_LIBS
7799fi
81ecdfbb
RW
7800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7801$as_echo "$ac_cv_lib_m_main" >&6; }
7802if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7803 cat >>confdefs.h <<_ACEOF
7804#define HAVE_LIBM 1
7805_ACEOF
7806
7807 LIBS="-lm $LIBS"
c906108c 7808
c906108c 7809fi
bec39cab
AC
7810
7811
7812# We need to link with -lw to get `wctype' on Solaris before Solaris
7813# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
7814# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
7815# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
7816ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
7817if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 7818
c906108c 7819else
81ecdfbb
RW
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
7821$as_echo_n "checking for wctype in -lw... " >&6; }
7822if test "${ac_cv_lib_w_wctype+set}" = set; then :
7823 $as_echo_n "(cached) " >&6
bec39cab
AC
7824else
7825 ac_check_lib_save_LIBS=$LIBS
7826LIBS="-lw $LIBS"
81ecdfbb 7827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7828/* end confdefs.h. */
c906108c 7829
81ecdfbb
RW
7830/* Override any GCC internal prototype to avoid an error.
7831 Use char because int might match the return type of a GCC
7832 builtin and then its argument prototype would still apply. */
bec39cab
AC
7833#ifdef __cplusplus
7834extern "C"
7835#endif
bec39cab
AC
7836char wctype ();
7837int
7838main ()
7839{
81ecdfbb 7840return wctype ();
bec39cab
AC
7841 ;
7842 return 0;
7843}
7844_ACEOF
81ecdfbb 7845if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7846 ac_cv_lib_w_wctype=yes
7847else
81ecdfbb 7848 ac_cv_lib_w_wctype=no
bec39cab 7849fi
81ecdfbb
RW
7850rm -f core conftest.err conftest.$ac_objext \
7851 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7852LIBS=$ac_check_lib_save_LIBS
7853fi
81ecdfbb
RW
7854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
7855$as_echo "$ac_cv_lib_w_wctype" >&6; }
7856if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
7857 cat >>confdefs.h <<_ACEOF
7858#define HAVE_LIBW 1
7859_ACEOF
c906108c 7860
bec39cab 7861 LIBS="-lw $LIBS"
c906108c 7862
bec39cab 7863fi
c906108c 7864
bec39cab 7865fi
c906108c 7866
ddc9cd0f 7867
bec39cab 7868# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7870$as_echo_n "checking for library containing gethostbyname... " >&6; }
7871if test "${ac_cv_search_gethostbyname+set}" = set; then :
7872 $as_echo_n "(cached) " >&6
bec39cab
AC
7873else
7874 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7876/* end confdefs.h. */
ddc9cd0f 7877
81ecdfbb
RW
7878/* Override any GCC internal prototype to avoid an error.
7879 Use char because int might match the return type of a GCC
7880 builtin and then its argument prototype would still apply. */
bec39cab
AC
7881#ifdef __cplusplus
7882extern "C"
7883#endif
bec39cab
AC
7884char gethostbyname ();
7885int
7886main ()
7887{
81ecdfbb 7888return gethostbyname ();
bec39cab
AC
7889 ;
7890 return 0;
7891}
7892_ACEOF
81ecdfbb
RW
7893for ac_lib in '' nsl; do
7894 if test -z "$ac_lib"; then
7895 ac_res="none required"
7896 else
7897 ac_res=-l$ac_lib
b4e70030 7898 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7899 fi
7900 if ac_fn_c_try_link "$LINENO"; then :
7901 ac_cv_search_gethostbyname=$ac_res
7902fi
7903rm -f core conftest.err conftest.$ac_objext \
7904 conftest$ac_exeext
7905 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7906 break
7907fi
7908done
7909if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7910
bec39cab 7911else
81ecdfbb 7912 ac_cv_search_gethostbyname=no
bec39cab 7913fi
81ecdfbb 7914rm conftest.$ac_ext
bec39cab
AC
7915LIBS=$ac_func_search_save_LIBS
7916fi
81ecdfbb
RW
7917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7918$as_echo "$ac_cv_search_gethostbyname" >&6; }
7919ac_res=$ac_cv_search_gethostbyname
7920if test "$ac_res" != no; then :
7921 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7922
bec39cab 7923fi
96baa820 7924
c906108c 7925
b4e70030 7926# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7928$as_echo_n "checking for library containing socketpair... " >&6; }
7929if test "${ac_cv_search_socketpair+set}" = set; then :
7930 $as_echo_n "(cached) " >&6
b4e70030
JB
7931else
7932 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7934/* end confdefs.h. */
7935
81ecdfbb
RW
7936/* Override any GCC internal prototype to avoid an error.
7937 Use char because int might match the return type of a GCC
7938 builtin and then its argument prototype would still apply. */
b4e70030
JB
7939#ifdef __cplusplus
7940extern "C"
7941#endif
b4e70030
JB
7942char socketpair ();
7943int
7944main ()
7945{
81ecdfbb 7946return socketpair ();
b4e70030
JB
7947 ;
7948 return 0;
7949}
7950_ACEOF
81ecdfbb
RW
7951for ac_lib in '' socket; do
7952 if test -z "$ac_lib"; then
7953 ac_res="none required"
7954 else
7955 ac_res=-l$ac_lib
b4e70030 7956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7957 fi
7958 if ac_fn_c_try_link "$LINENO"; then :
7959 ac_cv_search_socketpair=$ac_res
7960fi
7961rm -f core conftest.err conftest.$ac_objext \
7962 conftest$ac_exeext
7963 if test "${ac_cv_search_socketpair+set}" = set; then :
7964 break
7965fi
7966done
7967if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7968
b4e70030 7969else
81ecdfbb 7970 ac_cv_search_socketpair=no
b4e70030 7971fi
81ecdfbb 7972rm conftest.$ac_ext
b4e70030
JB
7973LIBS=$ac_func_search_save_LIBS
7974fi
81ecdfbb
RW
7975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7976$as_echo "$ac_cv_search_socketpair" >&6; }
7977ac_res=$ac_cv_search_socketpair
7978if test "$ac_res" != no; then :
7979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7980
7981fi
7982
7983
233a11ab 7984# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7985
711a72d3 7986 # Use the system's zlib library.
39f3de7c
L
7987 zlibdir="-L\$(top_builddir)/../zlib"
7988 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7989
711a72d3
L
7990# Check whether --with-system-zlib was given.
7991if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7992 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7993 zlibdir=
7994 zlibinc=
7995 fi
b040ad30 7996
233a11ab 7997fi
233a11ab 7998
233a11ab 7999
233a11ab 8000
b040ad30 8001
233a11ab 8002
25268153 8003# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 8004# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
8006$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
8007if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
8008 $as_echo_n "(cached) " >&6
8009else
8010 ac_func_search_save_LIBS=$LIBS
8011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8012/* end confdefs.h. */
8013
8014/* Override any GCC internal prototype to avoid an error.
8015 Use char because int might match the return type of a GCC
8016 builtin and then its argument prototype would still apply. */
8017#ifdef __cplusplus
8018extern "C"
8019#endif
8020char kinfo_getvmmap ();
8021int
8022main ()
8023{
8024return kinfo_getvmmap ();
8025 ;
8026 return 0;
8027}
8028_ACEOF
37773e78 8029for ac_lib in '' util util-freebsd; do
25268153
JB
8030 if test -z "$ac_lib"; then
8031 ac_res="none required"
8032 else
8033 ac_res=-l$ac_lib
8034 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8035 fi
8036 if ac_fn_c_try_link "$LINENO"; then :
8037 ac_cv_search_kinfo_getvmmap=$ac_res
8038fi
8039rm -f core conftest.err conftest.$ac_objext \
8040 conftest$ac_exeext
8041 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
8042 break
8043fi
8044done
8045if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
8046
8047else
8048 ac_cv_search_kinfo_getvmmap=no
8049fi
8050rm conftest.$ac_ext
8051LIBS=$ac_func_search_save_LIBS
8052fi
8053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8054$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8055ac_res=$ac_cv_search_kinfo_getvmmap
8056if test "$ac_res" != no; then :
8057 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8058
8059$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8060
8061fi
8062
8063
77f120bf 8064
016a3251
DD
8065 if test "X$prefix" = "XNONE"; then
8066 acl_final_prefix="$ac_default_prefix"
8067 else
8068 acl_final_prefix="$prefix"
8069 fi
8070 if test "X$exec_prefix" = "XNONE"; then
8071 acl_final_exec_prefix='${prefix}'
8072 else
8073 acl_final_exec_prefix="$exec_prefix"
8074 fi
8075 acl_save_prefix="$prefix"
8076 prefix="$acl_final_prefix"
8077 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8078 prefix="$acl_save_prefix"
8079
8080
8081# Check whether --with-gnu-ld was given.
8082if test "${with_gnu_ld+set}" = set; then :
8083 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8084else
8085 with_gnu_ld=no
8086fi
8087
8088# Prepare PATH_SEPARATOR.
8089# The user is always right.
8090if test "${PATH_SEPARATOR+set}" != set; then
8091 echo "#! /bin/sh" >conf$$.sh
8092 echo "exit 0" >>conf$$.sh
8093 chmod +x conf$$.sh
8094 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8095 PATH_SEPARATOR=';'
8096 else
8097 PATH_SEPARATOR=:
8098 fi
8099 rm -f conf$$.sh
8100fi
8101ac_prog=ld
8102if test "$GCC" = yes; then
8103 # Check if gcc -print-prog-name=ld gives a path.
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8105$as_echo_n "checking for ld used by GCC... " >&6; }
8106 case $host in
8107 *-*-mingw*)
8108 # gcc leaves a trailing carriage return which upsets mingw
8109 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8110 *)
8111 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8112 esac
8113 case $ac_prog in
8114 # Accept absolute paths.
8115 [\\/]* | [A-Za-z]:[\\/]*)
8116 re_direlt='/[^/][^/]*/\.\./'
8117 # Canonicalize the path of ld
8118 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8119 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8120 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8121 done
8122 test -z "$LD" && LD="$ac_prog"
8123 ;;
8124 "")
8125 # If it fails, then pretend we aren't using GCC.
8126 ac_prog=ld
8127 ;;
8128 *)
8129 # If it is relative, then search for the first ld in PATH.
8130 with_gnu_ld=unknown
8131 ;;
8132 esac
8133elif test "$with_gnu_ld" = yes; then
8134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8135$as_echo_n "checking for GNU ld... " >&6; }
8136else
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8138$as_echo_n "checking for non-GNU ld... " >&6; }
8139fi
8140if test "${acl_cv_path_LD+set}" = set; then :
8141 $as_echo_n "(cached) " >&6
8142else
8143 if test -z "$LD"; then
8144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8145 for ac_dir in $PATH; do
8146 test -z "$ac_dir" && ac_dir=.
8147 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8148 acl_cv_path_LD="$ac_dir/$ac_prog"
8149 # Check to see if the program is GNU ld. I'd rather use --version,
8150 # but apparently some GNU ld's only accept -v.
8151 # Break only if it was the GNU/non-GNU ld that we prefer.
8152 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8153 test "$with_gnu_ld" != no && break
8154 else
8155 test "$with_gnu_ld" != yes && break
8156 fi
8157 fi
8158 done
8159 IFS="$ac_save_ifs"
8160else
8161 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8162fi
8163fi
8164
8165LD="$acl_cv_path_LD"
8166if test -n "$LD"; then
8167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8168$as_echo "$LD" >&6; }
8169else
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8171$as_echo "no" >&6; }
8172fi
8173test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8175$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8176if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8177 $as_echo_n "(cached) " >&6
8178else
8179 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8180if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8181 acl_cv_prog_gnu_ld=yes
8182else
8183 acl_cv_prog_gnu_ld=no
8184fi
8185fi
8186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8187$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8188with_gnu_ld=$acl_cv_prog_gnu_ld
8189
8190
8191
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8193$as_echo_n "checking for shared library run path origin... " >&6; }
8194if test "${acl_cv_rpath+set}" = set; then :
8195 $as_echo_n "(cached) " >&6
8196else
8197
8198 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8199 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8200 . ./conftest.sh
8201 rm -f ./conftest.sh
8202 acl_cv_rpath=done
8203
8204fi
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8206$as_echo "$acl_cv_rpath" >&6; }
8207 wl="$acl_cv_wl"
8208 libext="$acl_cv_libext"
8209 shlibext="$acl_cv_shlibext"
8210 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8211 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8212 hardcode_direct="$acl_cv_hardcode_direct"
8213 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8214 # Check whether --enable-rpath was given.
8215if test "${enable_rpath+set}" = set; then :
8216 enableval=$enable_rpath; :
8217else
8218 enable_rpath=yes
8219fi
8220
8221
8222
8223
8224
8225
8226
8227
8228 use_additional=yes
8229
8230 acl_save_prefix="$prefix"
8231 prefix="$acl_final_prefix"
8232 acl_save_exec_prefix="$exec_prefix"
8233 exec_prefix="$acl_final_exec_prefix"
8234
8235 eval additional_includedir=\"$includedir\"
8236 eval additional_libdir=\"$libdir\"
8237
8238 exec_prefix="$acl_save_exec_prefix"
8239 prefix="$acl_save_prefix"
77f120bf 8240
6c7a06a3 8241
81ecdfbb
RW
8242# Check whether --with-libiconv-prefix was given.
8243if test "${with_libiconv_prefix+set}" = set; then :
8244 withval=$with_libiconv_prefix;
016a3251
DD
8245 if test "X$withval" = "Xno"; then
8246 use_additional=no
8247 else
8248 if test "X$withval" = "X"; then
8249
8250 acl_save_prefix="$prefix"
8251 prefix="$acl_final_prefix"
8252 acl_save_exec_prefix="$exec_prefix"
8253 exec_prefix="$acl_final_exec_prefix"
8254
8255 eval additional_includedir=\"$includedir\"
8256 eval additional_libdir=\"$libdir\"
8257
8258 exec_prefix="$acl_save_exec_prefix"
8259 prefix="$acl_save_prefix"
8260
8261 else
8262 additional_includedir="$withval/include"
8263 additional_libdir="$withval/lib"
8264 fi
8265 fi
6c7a06a3 8266
81ecdfbb
RW
8267fi
8268
016a3251
DD
8269 LIBICONV=
8270 LTLIBICONV=
8271 INCICONV=
8272 rpathdirs=
8273 ltrpathdirs=
8274 names_already_handled=
8275 names_next_round='iconv '
8276 while test -n "$names_next_round"; do
8277 names_this_round="$names_next_round"
8278 names_next_round=
8279 for name in $names_this_round; do
8280 already_handled=
8281 for n in $names_already_handled; do
8282 if test "$n" = "$name"; then
8283 already_handled=yes
8284 break
8285 fi
8286 done
8287 if test -z "$already_handled"; then
8288 names_already_handled="$names_already_handled $name"
8289 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8290 eval value=\"\$HAVE_LIB$uppername\"
8291 if test -n "$value"; then
8292 if test "$value" = yes; then
8293 eval value=\"\$LIB$uppername\"
8294 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8295 eval value=\"\$LTLIB$uppername\"
8296 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8297 else
8298 :
8299 fi
8300 else
8301 found_dir=
8302 found_la=
8303 found_so=
8304 found_a=
8305 if test $use_additional = yes; then
8306 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8307 found_dir="$additional_libdir"
8308 found_so="$additional_libdir/lib$name.$shlibext"
8309 if test -f "$additional_libdir/lib$name.la"; then
8310 found_la="$additional_libdir/lib$name.la"
8311 fi
8312 else
8313 if test -f "$additional_libdir/lib$name.$libext"; then
8314 found_dir="$additional_libdir"
8315 found_a="$additional_libdir/lib$name.$libext"
8316 if test -f "$additional_libdir/lib$name.la"; then
8317 found_la="$additional_libdir/lib$name.la"
8318 fi
8319 fi
8320 fi
8321 fi
8322 if test "X$found_dir" = "X"; then
8323 for x in $LDFLAGS $LTLIBICONV; do
8324
8325 acl_save_prefix="$prefix"
8326 prefix="$acl_final_prefix"
8327 acl_save_exec_prefix="$exec_prefix"
8328 exec_prefix="$acl_final_exec_prefix"
8329 eval x=\"$x\"
8330 exec_prefix="$acl_save_exec_prefix"
8331 prefix="$acl_save_prefix"
8332
8333 case "$x" in
8334 -L*)
8335 dir=`echo "X$x" | sed -e 's/^X-L//'`
8336 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8337 found_dir="$dir"
8338 found_so="$dir/lib$name.$shlibext"
8339 if test -f "$dir/lib$name.la"; then
8340 found_la="$dir/lib$name.la"
8341 fi
8342 else
8343 if test -f "$dir/lib$name.$libext"; then
8344 found_dir="$dir"
8345 found_a="$dir/lib$name.$libext"
8346 if test -f "$dir/lib$name.la"; then
8347 found_la="$dir/lib$name.la"
8348 fi
8349 fi
8350 fi
8351 ;;
8352 esac
8353 if test "X$found_dir" != "X"; then
8354 break
8355 fi
8356 done
8357 fi
8358 if test "X$found_dir" != "X"; then
8359 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8360 if test "X$found_so" != "X"; then
8361 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8362 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8363 else
8364 haveit=
8365 for x in $ltrpathdirs; do
8366 if test "X$x" = "X$found_dir"; then
8367 haveit=yes
8368 break
8369 fi
8370 done
8371 if test -z "$haveit"; then
8372 ltrpathdirs="$ltrpathdirs $found_dir"
8373 fi
8374 if test "$hardcode_direct" = yes; then
8375 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8376 else
8377 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8378 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8379 haveit=
8380 for x in $rpathdirs; do
8381 if test "X$x" = "X$found_dir"; then
8382 haveit=yes
8383 break
8384 fi
8385 done
8386 if test -z "$haveit"; then
8387 rpathdirs="$rpathdirs $found_dir"
8388 fi
8389 else
8390 haveit=
8391 for x in $LDFLAGS $LIBICONV; do
8392
8393 acl_save_prefix="$prefix"
8394 prefix="$acl_final_prefix"
8395 acl_save_exec_prefix="$exec_prefix"
8396 exec_prefix="$acl_final_exec_prefix"
8397 eval x=\"$x\"
8398 exec_prefix="$acl_save_exec_prefix"
8399 prefix="$acl_save_prefix"
8400
8401 if test "X$x" = "X-L$found_dir"; then
8402 haveit=yes
8403 break
8404 fi
8405 done
8406 if test -z "$haveit"; then
8407 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8408 fi
8409 if test "$hardcode_minus_L" != no; then
8410 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8411 else
8412 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8413 fi
8414 fi
8415 fi
8416 fi
8417 else
8418 if test "X$found_a" != "X"; then
8419 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8420 else
8421 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8422 fi
8423 fi
8424 additional_includedir=
8425 case "$found_dir" in
8426 */lib | */lib/)
8427 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8428 additional_includedir="$basedir/include"
8429 ;;
8430 esac
8431 if test "X$additional_includedir" != "X"; then
8432 if test "X$additional_includedir" != "X/usr/include"; then
8433 haveit=
8434 if test "X$additional_includedir" = "X/usr/local/include"; then
8435 if test -n "$GCC"; then
8436 case $host_os in
8437 linux*) haveit=yes;;
8438 esac
8439 fi
8440 fi
8441 if test -z "$haveit"; then
8442 for x in $CPPFLAGS $INCICONV; do
8443
8444 acl_save_prefix="$prefix"
8445 prefix="$acl_final_prefix"
8446 acl_save_exec_prefix="$exec_prefix"
8447 exec_prefix="$acl_final_exec_prefix"
8448 eval x=\"$x\"
8449 exec_prefix="$acl_save_exec_prefix"
8450 prefix="$acl_save_prefix"
8451
8452 if test "X$x" = "X-I$additional_includedir"; then
8453 haveit=yes
8454 break
8455 fi
8456 done
8457 if test -z "$haveit"; then
8458 if test -d "$additional_includedir"; then
8459 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8460 fi
8461 fi
8462 fi
8463 fi
8464 fi
8465 if test -n "$found_la"; then
8466 save_libdir="$libdir"
8467 case "$found_la" in
8468 */* | *\\*) . "$found_la" ;;
8469 *) . "./$found_la" ;;
8470 esac
8471 libdir="$save_libdir"
8472 for dep in $dependency_libs; do
8473 case "$dep" in
8474 -L*)
8475 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8476 if test "X$additional_libdir" != "X/usr/lib"; then
8477 haveit=
8478 if test "X$additional_libdir" = "X/usr/local/lib"; then
8479 if test -n "$GCC"; then
8480 case $host_os in
8481 linux*) haveit=yes;;
8482 esac
8483 fi
8484 fi
8485 if test -z "$haveit"; then
8486 haveit=
8487 for x in $LDFLAGS $LIBICONV; do
8488
8489 acl_save_prefix="$prefix"
8490 prefix="$acl_final_prefix"
8491 acl_save_exec_prefix="$exec_prefix"
8492 exec_prefix="$acl_final_exec_prefix"
8493 eval x=\"$x\"
8494 exec_prefix="$acl_save_exec_prefix"
8495 prefix="$acl_save_prefix"
8496
8497 if test "X$x" = "X-L$additional_libdir"; then
8498 haveit=yes
8499 break
8500 fi
8501 done
8502 if test -z "$haveit"; then
8503 if test -d "$additional_libdir"; then
8504 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8505 fi
8506 fi
8507 haveit=
8508 for x in $LDFLAGS $LTLIBICONV; do
8509
8510 acl_save_prefix="$prefix"
8511 prefix="$acl_final_prefix"
8512 acl_save_exec_prefix="$exec_prefix"
8513 exec_prefix="$acl_final_exec_prefix"
8514 eval x=\"$x\"
8515 exec_prefix="$acl_save_exec_prefix"
8516 prefix="$acl_save_prefix"
8517
8518 if test "X$x" = "X-L$additional_libdir"; then
8519 haveit=yes
8520 break
8521 fi
8522 done
8523 if test -z "$haveit"; then
8524 if test -d "$additional_libdir"; then
8525 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8526 fi
8527 fi
8528 fi
8529 fi
8530 ;;
8531 -R*)
8532 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8533 if test "$enable_rpath" != no; then
8534 haveit=
8535 for x in $rpathdirs; do
8536 if test "X$x" = "X$dir"; then
8537 haveit=yes
8538 break
8539 fi
8540 done
8541 if test -z "$haveit"; then
8542 rpathdirs="$rpathdirs $dir"
8543 fi
8544 haveit=
8545 for x in $ltrpathdirs; do
8546 if test "X$x" = "X$dir"; then
8547 haveit=yes
8548 break
8549 fi
8550 done
8551 if test -z "$haveit"; then
8552 ltrpathdirs="$ltrpathdirs $dir"
8553 fi
8554 fi
8555 ;;
8556 -l*)
8557 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8558 ;;
8559 *.la)
8560 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8561 ;;
8562 *)
8563 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8564 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8565 ;;
8566 esac
8567 done
8568 fi
8569 else
8570 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8571 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8572 fi
8573 fi
8574 fi
8575 done
8576 done
8577 if test "X$rpathdirs" != "X"; then
8578 if test -n "$hardcode_libdir_separator"; then
8579 alldirs=
8580 for found_dir in $rpathdirs; do
8581 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8582 done
8583 acl_save_libdir="$libdir"
8584 libdir="$alldirs"
8585 eval flag=\"$hardcode_libdir_flag_spec\"
8586 libdir="$acl_save_libdir"
8587 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8588 else
8589 for found_dir in $rpathdirs; do
8590 acl_save_libdir="$libdir"
8591 libdir="$found_dir"
8592 eval flag=\"$hardcode_libdir_flag_spec\"
8593 libdir="$acl_save_libdir"
8594 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8595 done
8596 fi
8597 fi
8598 if test "X$ltrpathdirs" != "X"; then
8599 for found_dir in $ltrpathdirs; do
8600 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8601 done
8602 fi
8603
8604
8605
8606
8607
6c7a06a3 8608
6c7a06a3 8609
81ecdfbb
RW
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8611$as_echo_n "checking for iconv... " >&6; }
8612if test "${am_cv_func_iconv+set}" = set; then :
8613 $as_echo_n "(cached) " >&6
d542061a 8614else
6c7a06a3
TT
8615
8616 am_cv_func_iconv="no, consider installing GNU libiconv"
8617 am_cv_lib_iconv=no
016a3251
DD
8618 am_save_CPPFLAGS="$CPPFLAGS"
8619 CPPFLAGS="$CPPFLAGS $INCICONV"
8620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8621/* end confdefs.h. */
6c7a06a3
TT
8622#include <stdlib.h>
8623#include <iconv.h>
d542061a
UW
8624int
8625main ()
8626{
6c7a06a3 8627iconv_t cd = iconv_open("","");
016a3251
DD
8628 iconv(cd,NULL,NULL,NULL,NULL);
8629 iconv_close(cd);
d542061a
UW
8630 ;
8631 return 0;
8632}
8633_ACEOF
81ecdfbb 8634if ac_fn_c_try_link "$LINENO"; then :
016a3251 8635 am_cv_func_iconv=yes
d542061a 8636fi
81ecdfbb
RW
8637rm -f core conftest.err conftest.$ac_objext \
8638 conftest$ac_exeext conftest.$ac_ext
016a3251 8639 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8640
016a3251
DD
8641 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8642 for _libs in .libs _libs; do
8643 am_save_CPPFLAGS="$CPPFLAGS"
8644 am_save_LIBS="$LIBS"
8645 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8646 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8648/* end confdefs.h. */
6c7a06a3
TT
8649#include <stdlib.h>
8650#include <iconv.h>
d542061a
UW
8651int
8652main ()
8653{
6c7a06a3 8654iconv_t cd = iconv_open("","");
016a3251
DD
8655 iconv(cd,NULL,NULL,NULL,NULL);
8656 iconv_close(cd);
d542061a
UW
8657 ;
8658 return 0;
8659}
8660_ACEOF
81ecdfbb 8661if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8662 INCICONV="-I../libiconv/include"
8663 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8664 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8665 am_cv_lib_iconv=yes
8666 am_cv_func_iconv=yes
d542061a 8667fi
81ecdfbb
RW
8668rm -f core conftest.err conftest.$ac_objext \
8669 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8670 CPPFLAGS="$am_save_CPPFLAGS"
8671 LIBS="$am_save_LIBS"
8672 if test "$am_cv_func_iconv" = "yes"; then
8673 break
8674 fi
8675 done
77f120bf 8676 fi
94ae1714 8677
4edb1e84 8678 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8679 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8680 am_save_LIBS="$LIBS"
016a3251
DD
8681 CPPFLAGS="$LIBS $INCICONV"
8682 LIBS="$LIBS $LIBICONV"
81ecdfbb 8683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8684/* end confdefs.h. */
6c7a06a3
TT
8685#include <stdlib.h>
8686#include <iconv.h>
bec39cab
AC
8687int
8688main ()
8689{
6c7a06a3
TT
8690iconv_t cd = iconv_open("","");
8691 iconv(cd,NULL,NULL,NULL,NULL);
8692 iconv_close(cd);
bec39cab
AC
8693 ;
8694 return 0;
8695}
8696_ACEOF
81ecdfbb 8697if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8698 am_cv_lib_iconv=yes
6c7a06a3 8699 am_cv_func_iconv=yes
627af7ea 8700fi
81ecdfbb
RW
8701rm -f core conftest.err conftest.$ac_objext \
8702 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8703 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8704 LIBS="$am_save_LIBS"
6c7a06a3
TT
8705 fi
8706
8707fi
81ecdfbb
RW
8708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8709$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8710 if test "$am_cv_func_iconv" = yes; then
8711
8712$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8713
016a3251 8714 fi
fc3b640d 8715 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8716
8717 for element in $INCICONV; do
8718 haveit=
8719 for x in $CPPFLAGS; do
8720
8721 acl_save_prefix="$prefix"
8722 prefix="$acl_final_prefix"
8723 acl_save_exec_prefix="$exec_prefix"
8724 exec_prefix="$acl_final_exec_prefix"
8725 eval x=\"$x\"
8726 exec_prefix="$acl_save_exec_prefix"
8727 prefix="$acl_save_prefix"
8728
8729 if test "X$x" = "X$element"; then
8730 haveit=yes
8731 break
8732 fi
8733 done
8734 if test -z "$haveit"; then
8735 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8736 fi
8737 done
8738
8739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8740$as_echo_n "checking how to link with libiconv... " >&6; }
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8742$as_echo "$LIBICONV" >&6; }
94ae1714 8743 else
016a3251
DD
8744 LIBICONV=
8745 LTLIBICONV=
fc3b640d 8746 fi
94ae1714 8747
6c7a06a3 8748
6c7a06a3 8749
016a3251 8750 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8752$as_echo_n "checking for iconv declaration... " >&6; }
8753 if test "${am_cv_proto_iconv+set}" = set; then :
8754 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8755else
8756
81ecdfbb 8757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8758/* end confdefs.h. */
8759
6c7a06a3
TT
8760#include <stdlib.h>
8761#include <iconv.h>
8762extern
b4e70030 8763#ifdef __cplusplus
6c7a06a3 8764"C"
b4e70030 8765#endif
6c7a06a3
TT
8766#if defined(__STDC__) || defined(__cplusplus)
8767size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8768#else
8769size_t iconv();
8770#endif
8771
b4e70030
JB
8772int
8773main ()
8774{
6c7a06a3 8775
b4e70030
JB
8776 ;
8777 return 0;
8778}
8779_ACEOF
81ecdfbb 8780if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8781 am_cv_proto_iconv_arg1=""
4e8d927d 8782else
81ecdfbb 8783 am_cv_proto_iconv_arg1="const"
b4e70030 8784fi
81ecdfbb 8785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8786 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);"
8787fi
8788
8789 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8791 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8792$as_echo "${ac_t:-
8793 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8794
8795cat >>confdefs.h <<_ACEOF
8796#define ICONV_CONST $am_cv_proto_iconv_arg1
8797_ACEOF
8798
8799 fi
6c7a06a3
TT
8800
8801
478aac75
DE
8802# GDB may fork/exec the iconv program to get the list of supported character
8803# sets. Allow the user to specify where to find it.
8804# There are several factors affecting the choice of option name:
8805# - There is already --with-libiconv-prefix but we can't use it, it specifies
8806# the build-time location of libiconv files.
8807# - The program we need to find is iconv, which comes with glibc. The user
8808# doesn't necessarily have libiconv installed. Therefore naming this
8809# --with-libiconv-foo feels wrong.
8810# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8811# defined to work on directories not files (though it really doesn't know
8812# the difference).
8813# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8814# with --with-libiconv-prefix.
8815# Putting these together is why the option name is --with-iconv-bin.
8816
8817
8818# Check whether --with-iconv-bin was given.
8819if test "${with_iconv_bin+set}" = set; then :
8820 withval=$with_iconv_bin; iconv_bin="${withval}"
8821
8822cat >>confdefs.h <<_ACEOF
8823#define ICONV_BIN "${iconv_bin}"
8824_ACEOF
8825
8826
8827 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8828 if test "x$prefix" = xNONE; then
8829 test_prefix=/usr/local
8830 else
8831 test_prefix=$prefix
8832 fi
8833 else
8834 test_prefix=$exec_prefix
8835 fi
8836 value=0
8837 case ${iconv_bin} in
8838 "${test_prefix}"|"${test_prefix}/"*|\
8839 '${exec_prefix}'|'${exec_prefix}/'*)
8840 value=1
8841 ;;
8842 esac
8843
8844cat >>confdefs.h <<_ACEOF
8845#define ICONV_BIN_RELOCATABLE $value
8846_ACEOF
8847
8848
8849
8850fi
8851
8852
cb01cfba 8853# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8854if test x"$enable_tui" != xno; then
cb01cfba
JB
8855 prefer_curses=yes
8856fi
8857
8858curses_found=no
8859if test x"$prefer_curses" = xyes; then
8860 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8861 # curses library because the latter might not provide all the
8862 # functionality we need. However, this leads to problems on systems
8863 # where the linker searches /usr/local/lib, but the compiler doesn't
8864 # search /usr/local/include, if ncurses is installed in /usr/local. A
8865 # default installation of ncurses on alpha*-dec-osf* will lead to such
8866 # a situation.
81ecdfbb
RW
8867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8868$as_echo_n "checking for library containing waddstr... " >&6; }
8869if test "${ac_cv_search_waddstr+set}" = set; then :
8870 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8871else
8872 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8874/* end confdefs.h. */
8875
81ecdfbb
RW
8876/* Override any GCC internal prototype to avoid an error.
8877 Use char because int might match the return type of a GCC
8878 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8879#ifdef __cplusplus
8880extern "C"
8881#endif
6c7a06a3
TT
8882char waddstr ();
8883int
8884main ()
8885{
81ecdfbb 8886return waddstr ();
6c7a06a3
TT
8887 ;
8888 return 0;
8889}
8890_ACEOF
81ecdfbb
RW
8891for ac_lib in '' ncurses cursesX curses; do
8892 if test -z "$ac_lib"; then
8893 ac_res="none required"
8894 else
8895 ac_res=-l$ac_lib
8896 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8897 fi
8898 if ac_fn_c_try_link "$LINENO"; then :
8899 ac_cv_search_waddstr=$ac_res
8900fi
8901rm -f core conftest.err conftest.$ac_objext \
8902 conftest$ac_exeext
8903 if test "${ac_cv_search_waddstr+set}" = set; then :
8904 break
8905fi
8906done
8907if test "${ac_cv_search_waddstr+set}" = set; then :
8908
6c7a06a3 8909else
81ecdfbb
RW
8910 ac_cv_search_waddstr=no
8911fi
8912rm conftest.$ac_ext
8913LIBS=$ac_func_search_save_LIBS
8914fi
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8916$as_echo "$ac_cv_search_waddstr" >&6; }
8917ac_res=$ac_cv_search_waddstr
8918if test "$ac_res" != no; then :
8919 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8920
8921fi
8922
8923
cb01cfba
JB
8924 if test "$ac_cv_search_waddstr" != no; then
8925 curses_found=yes
8926 fi
8927fi
8928
8929# Check whether we should enable the TUI, but only do so if we really
8930# can.
8931if test x"$enable_tui" != xno; then
8932 if test -d $srcdir/tui; then
8933 if test "$curses_found" != no; then
6c7a06a3
TT
8934 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8935 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8936 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8937 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8938 else
8939 if test x"$enable_tui" = xyes; then
81ecdfbb 8940 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8941 else
81ecdfbb
RW
8942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8943$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8944 fi
8945 fi
8946 fi
8947fi
8948
8949# Since GDB uses Readline, we need termcap functionality. In many
8950# cases this will be provided by the curses library, but some systems
8951# have a seperate termcap library, or no curses library at all.
8952
8953case $host_os in
8954 cygwin*)
8955 if test -d $srcdir/libtermcap; then
8956 LIBS="../libtermcap/libtermcap.a $LIBS"
8957 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8958 fi ;;
8959 go32* | *djgpp*)
8960 ac_cv_search_tgetent="none required"
8961 ;;
6c7a06a3
TT
8962esac
8963
8964# These are the libraries checked by Readline.
81ecdfbb
RW
8965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8966$as_echo_n "checking for library containing tgetent... " >&6; }
8967if test "${ac_cv_search_tgetent+set}" = set; then :
8968 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8969else
8970 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8972/* end confdefs.h. */
8973
81ecdfbb
RW
8974/* Override any GCC internal prototype to avoid an error.
8975 Use char because int might match the return type of a GCC
8976 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8977#ifdef __cplusplus
8978extern "C"
8979#endif
6c7a06a3
TT
8980char tgetent ();
8981int
8982main ()
8983{
81ecdfbb 8984return tgetent ();
6c7a06a3
TT
8985 ;
8986 return 0;
8987}
8988_ACEOF
81ecdfbb
RW
8989for ac_lib in '' termcap tinfo curses ncurses; do
8990 if test -z "$ac_lib"; then
8991 ac_res="none required"
8992 else
8993 ac_res=-l$ac_lib
6c7a06a3 8994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8995 fi
8996 if ac_fn_c_try_link "$LINENO"; then :
8997 ac_cv_search_tgetent=$ac_res
8998fi
8999rm -f core conftest.err conftest.$ac_objext \
9000 conftest$ac_exeext
9001 if test "${ac_cv_search_tgetent+set}" = set; then :
9002 break
9003fi
9004done
9005if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 9006
6c7a06a3 9007else
81ecdfbb 9008 ac_cv_search_tgetent=no
6c7a06a3 9009fi
81ecdfbb 9010rm conftest.$ac_ext
6c7a06a3
TT
9011LIBS=$ac_func_search_save_LIBS
9012fi
81ecdfbb
RW
9013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9014$as_echo "$ac_cv_search_tgetent" >&6; }
9015ac_res=$ac_cv_search_tgetent
9016if test "$ac_res" != no; then :
9017 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9018
06825bd1
MK
9019fi
9020
06825bd1 9021
bec39cab 9022if test "$ac_cv_search_tgetent" = no; then
7a85168d 9023 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9024fi
9025
3841debe 9026
81ecdfbb
RW
9027# Check whether --with-system-readline was given.
9028if test "${with_system_readline+set}" = set; then :
9029 withval=$with_system_readline;
9030fi
6a30b0a5 9031
6a30b0a5
AS
9032
9033if test "$with_system_readline" = yes; then
9034 READLINE=-lreadline
9035 READLINE_DEPS=
9036 READLINE_CFLAGS=
39037522 9037 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9038else
9039 READLINE='$(READLINE_DIR)/libreadline.a'
9040 READLINE_DEPS='$(READLINE)'
9041 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9042 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9043fi
9044
9045
9046
9047
9048
f997c383
SD
9049# Generate jit-reader.h
9050
9051# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9052TARGET_PTR=
9053
9054# The cast to long int works around a bug in the HP C Compiler
9055# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9056# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9057# This bug is HP SR number 8606223364.
9058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9059$as_echo_n "checking size of unsigned long long... " >&6; }
9060if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
9061 $as_echo_n "(cached) " >&6
9062else
9063 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9064
9065else
9066 if test "$ac_cv_type_unsigned_long_long" = yes; then
9067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9069{ as_fn_set_status 77
9070as_fn_error "cannot compute sizeof (unsigned long long)
9071See \`config.log' for more details." "$LINENO" 5; }; }
9072 else
9073 ac_cv_sizeof_unsigned_long_long=0
9074 fi
9075fi
9076
9077fi
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9079$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9080
9081
9082
9083cat >>confdefs.h <<_ACEOF
9084#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9085_ACEOF
9086
9087
9088# The cast to long int works around a bug in the HP C Compiler
9089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9091# This bug is HP SR number 8606223364.
9092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9093$as_echo_n "checking size of unsigned long... " >&6; }
9094if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9095 $as_echo_n "(cached) " >&6
9096else
9097 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9098
9099else
9100 if test "$ac_cv_type_unsigned_long" = yes; then
9101 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9103{ as_fn_set_status 77
9104as_fn_error "cannot compute sizeof (unsigned long)
9105See \`config.log' for more details." "$LINENO" 5; }; }
9106 else
9107 ac_cv_sizeof_unsigned_long=0
9108 fi
9109fi
9110
9111fi
9112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9113$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9114
9115
9116
9117cat >>confdefs.h <<_ACEOF
9118#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9119_ACEOF
9120
9121
9122# The cast to long int works around a bug in the HP C Compiler
9123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9125# This bug is HP SR number 8606223364.
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9127$as_echo_n "checking size of unsigned __int128... " >&6; }
9128if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9129 $as_echo_n "(cached) " >&6
9130else
9131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9132
9133else
9134 if test "$ac_cv_type_unsigned___int128" = yes; then
9135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9137{ as_fn_set_status 77
9138as_fn_error "cannot compute sizeof (unsigned __int128)
9139See \`config.log' for more details." "$LINENO" 5; }; }
9140 else
9141 ac_cv_sizeof_unsigned___int128=0
9142 fi
9143fi
9144
9145fi
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9147$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9148
9149
9150
9151cat >>confdefs.h <<_ACEOF
9152#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9153_ACEOF
9154
9155
9156
9157if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9158 TARGET_PTR="unsigned long"
9159elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9160 TARGET_PTR="unsigned long long"
9161elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9162 TARGET_PTR="unsigned __int128"
9163else
9164 TARGET_PTR="unsigned long"
9165fi
9166
9167
9168ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9169
9170
a2d08b9e
SD
9171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9172$as_echo_n "checking for library containing dlopen... " >&6; }
9173if test "${ac_cv_search_dlopen+set}" = set; then :
9174 $as_echo_n "(cached) " >&6
9175else
9176 ac_func_search_save_LIBS=$LIBS
9177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9178/* end confdefs.h. */
9179
9180/* Override any GCC internal prototype to avoid an error.
9181 Use char because int might match the return type of a GCC
9182 builtin and then its argument prototype would still apply. */
9183#ifdef __cplusplus
9184extern "C"
9185#endif
9186char dlopen ();
9187int
9188main ()
9189{
9190return dlopen ();
9191 ;
9192 return 0;
9193}
9194_ACEOF
9195for ac_lib in '' dl; do
9196 if test -z "$ac_lib"; then
9197 ac_res="none required"
9198 else
9199 ac_res=-l$ac_lib
9200 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9201 fi
9202 if ac_fn_c_try_link "$LINENO"; then :
9203 ac_cv_search_dlopen=$ac_res
9204fi
9205rm -f core conftest.err conftest.$ac_objext \
9206 conftest$ac_exeext
9207 if test "${ac_cv_search_dlopen+set}" = set; then :
9208 break
9209fi
9210done
9211if test "${ac_cv_search_dlopen+set}" = set; then :
9212
9213else
9214 ac_cv_search_dlopen=no
9215fi
9216rm conftest.$ac_ext
9217LIBS=$ac_func_search_save_LIBS
9218fi
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9220$as_echo "$ac_cv_search_dlopen" >&6; }
9221ac_res=$ac_cv_search_dlopen
9222if test "$ac_res" != no; then :
9223 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9224
9225fi
9226
9227
39037522 9228
b8e0a31c
SD
9229
9230# Check whether --with-jit-reader-dir was given.
9231if test "${with_jit_reader_dir+set}" = set; then :
9232 withval=$with_jit_reader_dir;
9233 JIT_READER_DIR=$withval
9234else
9235 JIT_READER_DIR=${libdir}/gdb
9236fi
9237
9238
9239 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9240 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9241 ac_define_dir=`eval echo $JIT_READER_DIR`
9242 ac_define_dir=`eval echo $ac_define_dir`
9243
9244cat >>confdefs.h <<_ACEOF
9245#define JIT_READER_DIR "$ac_define_dir"
9246_ACEOF
9247
9248
9249
9250
9251 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9252 if test "x$prefix" = xNONE; then
9253 test_prefix=/usr/local
9254 else
9255 test_prefix=$prefix
9256 fi
9257 else
9258 test_prefix=$exec_prefix
9259 fi
9260 value=0
9261 case ${ac_define_dir} in
9262 "${test_prefix}"|"${test_prefix}/"*|\
9263 '${exec_prefix}'|'${exec_prefix}/'*)
9264 value=1
9265 ;;
9266 esac
9267
9268cat >>confdefs.h <<_ACEOF
9269#define JIT_READER_DIR_RELOCATABLE $value
9270_ACEOF
9271
9272
9273
9274
9275
81ecdfbb
RW
9276# Check whether --with-expat was given.
9277if test "${with_expat+set}" = set; then :
9278 withval=$with_expat;
5c39566f
DJ
9279else
9280 with_expat=auto
81ecdfbb
RW
9281fi
9282
9283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9284$as_echo_n "checking whether to use expat... " >&6; }
9285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9286$as_echo "$with_expat" >&6; }
5c39566f
DJ
9287
9288if test "${with_expat}" = no; then
81ecdfbb
RW
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9290$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9291 HAVE_LIBEXPAT=no
9292else
9293
3841debe
DJ
9294
9295
9296
9297
9298
9299
9300
9301 use_additional=yes
9302
9303 acl_save_prefix="$prefix"
9304 prefix="$acl_final_prefix"
9305 acl_save_exec_prefix="$exec_prefix"
9306 exec_prefix="$acl_final_exec_prefix"
9307
9308 eval additional_includedir=\"$includedir\"
9309 eval additional_libdir=\"$libdir\"
9310
9311 exec_prefix="$acl_save_exec_prefix"
9312 prefix="$acl_save_prefix"
9313
9314
81ecdfbb
RW
9315# Check whether --with-libexpat-prefix was given.
9316if test "${with_libexpat_prefix+set}" = set; then :
9317 withval=$with_libexpat_prefix;
3841debe
DJ
9318 if test "X$withval" = "Xno"; then
9319 use_additional=no
9320 else
9321 if test "X$withval" = "X"; then
9322
9323 acl_save_prefix="$prefix"
9324 prefix="$acl_final_prefix"
9325 acl_save_exec_prefix="$exec_prefix"
9326 exec_prefix="$acl_final_exec_prefix"
9327
9328 eval additional_includedir=\"$includedir\"
9329 eval additional_libdir=\"$libdir\"
9330
9331 exec_prefix="$acl_save_exec_prefix"
9332 prefix="$acl_save_prefix"
9333
9334 else
9335 additional_includedir="$withval/include"
9336 additional_libdir="$withval/lib"
9337 fi
9338 fi
9339
81ecdfbb
RW
9340fi
9341
3841debe
DJ
9342 LIBEXPAT=
9343 LTLIBEXPAT=
9344 INCEXPAT=
9345 rpathdirs=
9346 ltrpathdirs=
9347 names_already_handled=
9348 names_next_round='expat '
9349 while test -n "$names_next_round"; do
9350 names_this_round="$names_next_round"
9351 names_next_round=
9352 for name in $names_this_round; do
9353 already_handled=
9354 for n in $names_already_handled; do
9355 if test "$n" = "$name"; then
9356 already_handled=yes
9357 break
9358 fi
9359 done
9360 if test -z "$already_handled"; then
9361 names_already_handled="$names_already_handled $name"
9362 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9363 eval value=\"\$HAVE_LIB$uppername\"
9364 if test -n "$value"; then
9365 if test "$value" = yes; then
9366 eval value=\"\$LIB$uppername\"
9367 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9368 eval value=\"\$LTLIB$uppername\"
9369 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9370 else
9371 :
9372 fi
9373 else
9374 found_dir=
9375 found_la=
9376 found_so=
9377 found_a=
9378 if test $use_additional = yes; then
9379 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9380 found_dir="$additional_libdir"
9381 found_so="$additional_libdir/lib$name.$shlibext"
9382 if test -f "$additional_libdir/lib$name.la"; then
9383 found_la="$additional_libdir/lib$name.la"
9384 fi
9385 else
9386 if test -f "$additional_libdir/lib$name.$libext"; then
9387 found_dir="$additional_libdir"
9388 found_a="$additional_libdir/lib$name.$libext"
9389 if test -f "$additional_libdir/lib$name.la"; then
9390 found_la="$additional_libdir/lib$name.la"
9391 fi
9392 fi
9393 fi
9394 fi
9395 if test "X$found_dir" = "X"; then
9396 for x in $LDFLAGS $LTLIBEXPAT; do
9397
9398 acl_save_prefix="$prefix"
9399 prefix="$acl_final_prefix"
9400 acl_save_exec_prefix="$exec_prefix"
9401 exec_prefix="$acl_final_exec_prefix"
9402 eval x=\"$x\"
9403 exec_prefix="$acl_save_exec_prefix"
9404 prefix="$acl_save_prefix"
9405
9406 case "$x" in
9407 -L*)
9408 dir=`echo "X$x" | sed -e 's/^X-L//'`
9409 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9410 found_dir="$dir"
9411 found_so="$dir/lib$name.$shlibext"
9412 if test -f "$dir/lib$name.la"; then
9413 found_la="$dir/lib$name.la"
9414 fi
9415 else
9416 if test -f "$dir/lib$name.$libext"; then
9417 found_dir="$dir"
9418 found_a="$dir/lib$name.$libext"
9419 if test -f "$dir/lib$name.la"; then
9420 found_la="$dir/lib$name.la"
9421 fi
9422 fi
9423 fi
9424 ;;
9425 esac
9426 if test "X$found_dir" != "X"; then
9427 break
9428 fi
9429 done
9430 fi
9431 if test "X$found_dir" != "X"; then
9432 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9433 if test "X$found_so" != "X"; then
9434 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9435 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9436 else
9437 haveit=
9438 for x in $ltrpathdirs; do
9439 if test "X$x" = "X$found_dir"; then
9440 haveit=yes
9441 break
9442 fi
9443 done
9444 if test -z "$haveit"; then
9445 ltrpathdirs="$ltrpathdirs $found_dir"
9446 fi
9447 if test "$hardcode_direct" = yes; then
9448 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9449 else
9450 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9451 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9452 haveit=
9453 for x in $rpathdirs; do
9454 if test "X$x" = "X$found_dir"; then
9455 haveit=yes
9456 break
9457 fi
9458 done
9459 if test -z "$haveit"; then
9460 rpathdirs="$rpathdirs $found_dir"
9461 fi
9462 else
9463 haveit=
9464 for x in $LDFLAGS $LIBEXPAT; do
9465
9466 acl_save_prefix="$prefix"
9467 prefix="$acl_final_prefix"
9468 acl_save_exec_prefix="$exec_prefix"
9469 exec_prefix="$acl_final_exec_prefix"
9470 eval x=\"$x\"
9471 exec_prefix="$acl_save_exec_prefix"
9472 prefix="$acl_save_prefix"
9473
9474 if test "X$x" = "X-L$found_dir"; then
9475 haveit=yes
9476 break
9477 fi
9478 done
9479 if test -z "$haveit"; then
9480 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9481 fi
9482 if test "$hardcode_minus_L" != no; then
9483 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9484 else
9485 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9486 fi
9487 fi
9488 fi
9489 fi
9490 else
9491 if test "X$found_a" != "X"; then
9492 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9493 else
9494 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9495 fi
9496 fi
9497 additional_includedir=
9498 case "$found_dir" in
9499 */lib | */lib/)
9500 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9501 additional_includedir="$basedir/include"
9502 ;;
9503 esac
9504 if test "X$additional_includedir" != "X"; then
9505 if test "X$additional_includedir" != "X/usr/include"; then
9506 haveit=
9507 if test "X$additional_includedir" = "X/usr/local/include"; then
9508 if test -n "$GCC"; then
9509 case $host_os in
9510 linux*) haveit=yes;;
9511 esac
9512 fi
9513 fi
9514 if test -z "$haveit"; then
9515 for x in $CPPFLAGS $INCEXPAT; do
9516
9517 acl_save_prefix="$prefix"
9518 prefix="$acl_final_prefix"
9519 acl_save_exec_prefix="$exec_prefix"
9520 exec_prefix="$acl_final_exec_prefix"
9521 eval x=\"$x\"
9522 exec_prefix="$acl_save_exec_prefix"
9523 prefix="$acl_save_prefix"
9524
9525 if test "X$x" = "X-I$additional_includedir"; then
9526 haveit=yes
9527 break
9528 fi
9529 done
9530 if test -z "$haveit"; then
9531 if test -d "$additional_includedir"; then
9532 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9533 fi
9534 fi
9535 fi
9536 fi
9537 fi
9538 if test -n "$found_la"; then
9539 save_libdir="$libdir"
9540 case "$found_la" in
9541 */* | *\\*) . "$found_la" ;;
9542 *) . "./$found_la" ;;
9543 esac
9544 libdir="$save_libdir"
9545 for dep in $dependency_libs; do
9546 case "$dep" in
9547 -L*)
9548 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9549 if test "X$additional_libdir" != "X/usr/lib"; then
9550 haveit=
9551 if test "X$additional_libdir" = "X/usr/local/lib"; then
9552 if test -n "$GCC"; then
9553 case $host_os in
9554 linux*) haveit=yes;;
9555 esac
9556 fi
9557 fi
9558 if test -z "$haveit"; then
9559 haveit=
9560 for x in $LDFLAGS $LIBEXPAT; do
9561
9562 acl_save_prefix="$prefix"
9563 prefix="$acl_final_prefix"
9564 acl_save_exec_prefix="$exec_prefix"
9565 exec_prefix="$acl_final_exec_prefix"
9566 eval x=\"$x\"
9567 exec_prefix="$acl_save_exec_prefix"
9568 prefix="$acl_save_prefix"
9569
9570 if test "X$x" = "X-L$additional_libdir"; then
9571 haveit=yes
9572 break
9573 fi
9574 done
9575 if test -z "$haveit"; then
9576 if test -d "$additional_libdir"; then
9577 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9578 fi
9579 fi
9580 haveit=
9581 for x in $LDFLAGS $LTLIBEXPAT; do
9582
9583 acl_save_prefix="$prefix"
9584 prefix="$acl_final_prefix"
9585 acl_save_exec_prefix="$exec_prefix"
9586 exec_prefix="$acl_final_exec_prefix"
9587 eval x=\"$x\"
9588 exec_prefix="$acl_save_exec_prefix"
9589 prefix="$acl_save_prefix"
9590
9591 if test "X$x" = "X-L$additional_libdir"; then
9592 haveit=yes
9593 break
9594 fi
9595 done
9596 if test -z "$haveit"; then
9597 if test -d "$additional_libdir"; then
9598 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9599 fi
9600 fi
9601 fi
9602 fi
9603 ;;
9604 -R*)
9605 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9606 if test "$enable_rpath" != no; then
9607 haveit=
9608 for x in $rpathdirs; do
9609 if test "X$x" = "X$dir"; then
9610 haveit=yes
9611 break
9612 fi
9613 done
9614 if test -z "$haveit"; then
9615 rpathdirs="$rpathdirs $dir"
9616 fi
9617 haveit=
9618 for x in $ltrpathdirs; do
9619 if test "X$x" = "X$dir"; then
9620 haveit=yes
9621 break
9622 fi
9623 done
9624 if test -z "$haveit"; then
9625 ltrpathdirs="$ltrpathdirs $dir"
9626 fi
9627 fi
9628 ;;
9629 -l*)
9630 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9631 ;;
9632 *.la)
9633 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9634 ;;
9635 *)
9636 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9637 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9638 ;;
81ecdfbb
RW
9639 esac
9640 done
9641 fi
9642 else
9643 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9644 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9645 fi
9646 fi
9647 fi
9648 done
9649 done
9650 if test "X$rpathdirs" != "X"; then
9651 if test -n "$hardcode_libdir_separator"; then
9652 alldirs=
9653 for found_dir in $rpathdirs; do
9654 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9655 done
9656 acl_save_libdir="$libdir"
9657 libdir="$alldirs"
9658 eval flag=\"$hardcode_libdir_flag_spec\"
9659 libdir="$acl_save_libdir"
9660 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9661 else
9662 for found_dir in $rpathdirs; do
9663 acl_save_libdir="$libdir"
9664 libdir="$found_dir"
9665 eval flag=\"$hardcode_libdir_flag_spec\"
9666 libdir="$acl_save_libdir"
9667 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9668 done
9669 fi
9670 fi
9671 if test "X$ltrpathdirs" != "X"; then
9672 for found_dir in $ltrpathdirs; do
9673 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9674 done
9675 fi
a9322a30
TT
9676
9677
81ecdfbb 9678 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9679
81ecdfbb
RW
9680 for element in $INCEXPAT; do
9681 haveit=
9682 for x in $CPPFLAGS; do
a9322a30 9683
81ecdfbb
RW
9684 acl_save_prefix="$prefix"
9685 prefix="$acl_final_prefix"
9686 acl_save_exec_prefix="$exec_prefix"
9687 exec_prefix="$acl_final_exec_prefix"
9688 eval x=\"$x\"
9689 exec_prefix="$acl_save_exec_prefix"
9690 prefix="$acl_save_prefix"
a8111142 9691
81ecdfbb
RW
9692 if test "X$x" = "X$element"; then
9693 haveit=yes
9694 break
9695 fi
9696 done
9697 if test -z "$haveit"; then
9698 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9699 fi
9700 done
a9322a30
TT
9701
9702
81ecdfbb
RW
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9704$as_echo_n "checking for libexpat... " >&6; }
9705if test "${ac_cv_libexpat+set}" = set; then :
9706 $as_echo_n "(cached) " >&6
bec39cab 9707else
bec39cab 9708
81ecdfbb
RW
9709 ac_save_LIBS="$LIBS"
9710 LIBS="$LIBS $LIBEXPAT"
9711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9712/* end confdefs.h. */
81ecdfbb
RW
9713#include "expat.h"
9714int
9715main ()
9716{
9717XML_Parser p = XML_ParserCreate (0);
9718 ;
9719 return 0;
9720}
bec39cab 9721_ACEOF
81ecdfbb
RW
9722if ac_fn_c_try_link "$LINENO"; then :
9723 ac_cv_libexpat=yes
c906108c 9724else
81ecdfbb 9725 ac_cv_libexpat=no
bec39cab 9726fi
81ecdfbb
RW
9727rm -f core conftest.err conftest.$ac_objext \
9728 conftest$ac_exeext conftest.$ac_ext
9729 LIBS="$ac_save_LIBS"
c906108c 9730
95ca63c4 9731fi
81ecdfbb
RW
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9733$as_echo "$ac_cv_libexpat" >&6; }
9734 if test "$ac_cv_libexpat" = yes; then
9735 HAVE_LIBEXPAT=yes
bec39cab 9736
81ecdfbb 9737$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9738
81ecdfbb
RW
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9740$as_echo_n "checking how to link with libexpat... " >&6; }
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9742$as_echo "$LIBEXPAT" >&6; }
9743 else
9744 HAVE_LIBEXPAT=no
9745 CPPFLAGS="$ac_save_CPPFLAGS"
9746 LIBEXPAT=
9747 LTLIBEXPAT=
9748 fi
95ca63c4
CF
9749
9750
9751
7cb9022a
MK
9752
9753
bec39cab 9754
81ecdfbb
RW
9755 if test "$HAVE_LIBEXPAT" != yes; then
9756 if test "$with_expat" = yes; then
9757 as_fn_error "expat is missing or unusable" "$LINENO" 5
9758 else
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9760$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9761 fi
9762 else
9763 save_LIBS=$LIBS
9764 LIBS="$LIBS $LIBEXPAT"
9765 for ac_func in XML_StopParser
9766do :
9767 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9768if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9769 cat >>confdefs.h <<_ACEOF
81ecdfbb 9770#define HAVE_XML_STOPPARSER 1
bec39cab 9771_ACEOF
95ca63c4 9772
bec39cab 9773fi
bec39cab 9774done
95ca63c4 9775
81ecdfbb
RW
9776 LIBS=$save_LIBS
9777 fi
a9322a30
TT
9778fi
9779
d344e670
DE
9780# --------------------- #
9781# Check for libpython. #
9782# --------------------- #
9783
a9322a30 9784
a9322a30
TT
9785
9786
ec685c5e 9787
0c4a4063 9788
81ecdfbb
RW
9789# Check whether --with-python was given.
9790if test "${with_python+set}" = set; then :
9791 withval=$with_python;
bec39cab 9792else
81ecdfbb 9793 with_python=auto
bec39cab 9794fi
bec39cab 9795
81ecdfbb
RW
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
9797$as_echo_n "checking whether to use python... " >&6; }
9798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
9799$as_echo "$with_python" >&6; }
9a156167 9800
81ecdfbb
RW
9801if test "${with_python}" = no; then
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
9803$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
9804 have_libpython=no
bec39cab 9805else
81ecdfbb 9806 case "${with_python}" in
8c85a4e2 9807 [\\/]* | ?:[\\/]*)
ec685c5e
DE
9808 if test -d ${with_python}; then
9809 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 9810 python_prog="${with_python}/bin/python"
0c4a4063 9811 python_prefix=
9c4ea6c5
JB
9812 # If python does not exit ${with_python}/bin, then try in
9813 # ${with_python}. On Windows/MinGW, this is where the Python
9814 # executable is.
9815 if test ! -x "${python_prog}"; then
9816 python_prog="${with_python}/python"
9817 python_prefix=
9818 fi
e7a30f46 9819 if test ! -x "${python_prog}"; then
ec685c5e
DE
9820 # Fall back to gdb 7.0/7.1 behaviour.
9821 python_prog=missing
0c4a4063 9822 python_prefix=${with_python}
ec685c5e 9823 fi
e7a30f46 9824 elif test -x "${with_python}"; then
ec685c5e
DE
9825 # While we can't run python compiled for $host (unless host == build),
9826 # the user could write a script that provides the needed information,
9827 # so we support that.
ec685c5e 9828 python_prog=${with_python}
0c4a4063 9829 python_prefix=
ec685c5e
DE
9830 else
9831 as_fn_error "invalid value for --with-python" "$LINENO" 5
9832 fi
81ecdfbb 9833 ;;
ec685c5e
DE
9834 */*)
9835 # Disallow --with-python=foo/bar.
81ecdfbb
RW
9836 as_fn_error "invalid value for --with-python" "$LINENO" 5
9837 ;;
ec685c5e
DE
9838 *)
9839 # The user has either specified auto, yes, or the name of the python
9840 # program assumed to be in $PATH.
9841 python_prefix=
9842 case "${with_python}" in
9843 yes | auto)
9844 if test ${build} = ${host}; then
9845 # Extract the first word of "python", so it can be a program name with args.
9846set dummy python; ac_word=$2
9847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9848$as_echo_n "checking for $ac_word... " >&6; }
9849if test "${ac_cv_path_python_prog_path+set}" = set; then :
9850 $as_echo_n "(cached) " >&6
9851else
9852 case $python_prog_path in
9853 [\\/]* | ?:[\\/]*)
9854 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9855 ;;
9856 *)
9857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9858for as_dir in $PATH
9859do
9860 IFS=$as_save_IFS
9861 test -z "$as_dir" && as_dir=.
9862 for ac_exec_ext in '' $ac_executable_extensions; do
9863 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9864 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9865 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9866 break 2
9867 fi
9868done
9869 done
9870IFS=$as_save_IFS
9871
9872 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9873 ;;
9874esac
9875fi
9876python_prog_path=$ac_cv_path_python_prog_path
9877if test -n "$python_prog_path"; then
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9879$as_echo "$python_prog_path" >&6; }
9880else
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9882$as_echo "no" >&6; }
9883fi
9884
9885
9886 if test "${python_prog_path}" = missing; then
9887 python_prog=missing
9888 else
9889 python_prog=${python_prog_path}
9890 fi
9891 else
9892 # Not much we can do except assume the cross-compiler will find the
9893 # right files.
9894 python_prog=missing
9895 fi
9896 ;;
9897 *)
9898 # While we can't run python compiled for $host (unless host == build),
9899 # the user could write a script that provides the needed information,
9900 # so we support that.
9901 python_prog="${with_python}"
9902 # Extract the first word of "${python_prog}", so it can be a program name with args.
9903set dummy ${python_prog}; ac_word=$2
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9905$as_echo_n "checking for $ac_word... " >&6; }
9906if test "${ac_cv_path_python_prog_path+set}" = set; then :
9907 $as_echo_n "(cached) " >&6
9908else
9909 case $python_prog_path in
9910 [\\/]* | ?:[\\/]*)
9911 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
9912 ;;
9913 *)
9914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9915for as_dir in $PATH
9916do
9917 IFS=$as_save_IFS
9918 test -z "$as_dir" && as_dir=.
9919 for ac_exec_ext in '' $ac_executable_extensions; do
9920 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9921 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
9922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9923 break 2
9924 fi
9925done
9926 done
9927IFS=$as_save_IFS
9928
9929 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
9930 ;;
9931esac
9932fi
9933python_prog_path=$ac_cv_path_python_prog_path
9934if test -n "$python_prog_path"; then
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
9936$as_echo "$python_prog_path" >&6; }
9937else
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9939$as_echo "no" >&6; }
9940fi
9941
9942
9943 if test "${python_prog_path}" = missing; then
9944 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
9945 fi
9946 ;;
9947 esac
81ecdfbb
RW
9948 esac
9949
ec685c5e 9950 if test "${python_prog}" != missing; then
e7a30f46
DE
9951 # We have a python program to use, but it may be too old.
9952 # Don't flag an error for --with-python=auto (the default).
9953 have_python_config=yes
ec685c5e
DE
9954 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
9955 if test $? != 0; then
e7a30f46
DE
9956 have_python_config=failed
9957 if test "${with_python}" != auto; then
9958 as_fn_error "failure running python-config --includes" "$LINENO" 5
9959 fi
ec685c5e
DE
9960 fi
9961 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
9962 if test $? != 0; then
e7a30f46
DE
9963 have_python_config=failed
9964 if test "${with_python}" != auto; then
9965 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
9966 fi
ec685c5e 9967 fi
0c4a4063
DE
9968 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
9969 if test $? != 0; then
e7a30f46
DE
9970 have_python_config=failed
9971 if test "${with_python}" != auto; then
9972 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
9973 fi
0c4a4063 9974 fi
ec685c5e 9975 else
ac534cba
JB
9976 # We do not have a python executable we can use to determine where
9977 # to find the Python headers and libs. We cannot guess the include
9978 # path from the python_prefix either, because that include path
9979 # depends on the Python version. So, there is nothing much we can
9980 # do except assume that the compiler will be able to find those files.
9981 python_includes=
9982 python_libs=
0c4a4063 9983 have_python_config=no
ec685c5e 9984 fi
bec39cab 9985
ec685c5e
DE
9986 # If we have python-config, only try the configuration it provides.
9987 # Otherwise fallback on the old way of trying different versions of
9988 # python in turn.
81ecdfbb 9989
ec685c5e
DE
9990 have_libpython=no
9991 if test "${have_python_config}" = yes; then
c1039e3c
JB
9992 # Determine the Python version by extracting "-lpython<version>"
9993 # part of the python_libs. <version> is usually X.Y with X and Y
9994 # being decimal numbers, but can also be XY (seen on Windows).
9995 #
9996 # The extraction is performed using sed with a regular expression.
9997 # Initially, the regexp used was using the '?' quantifier to make
9998 # the dot in the version number optional. Unfortunately, this
9999 # does not work with non-GNU versions of sed because, because of
10000 # what looks like a limitation (the '?' quantifier does not work
10001 # with back-references). We work around this limitation by using
10002 # the '*' quantifier instead. It means that, in theory, we might
10003 # match unexpected version strings such as "-lpython2..7", but
10004 # this seems unlikely in practice. And even if that happens,
10005 # an error will be triggered later on, when checking that version
10006 # number.
ec685c5e 10007 python_version=`echo " ${python_libs} " \
c1039e3c 10008 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10009 case "${python_version}" in
10010 python*)
ec685c5e
DE
10011
10012 version=${python_version}
10013
10014 new_CPPFLAGS=${python_includes}
10015 new_LIBS=${python_libs}
81ecdfbb
RW
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10017$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10018 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10019 save_LIBS=$LIBS
ec685c5e
DE
10020 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10021 LIBS="$LIBS $new_LIBS"
10022 found_usable_python=no
81ecdfbb 10023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10024/* end confdefs.h. */
ac534cba 10025#include "Python.h"
81ecdfbb
RW
10026int
10027main ()
10028{
10029Py_Initialize ();
10030 ;
10031 return 0;
10032}
bec39cab 10033_ACEOF
81ecdfbb 10034if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10035 have_libpython=${version}
10036 found_usable_python=yes
ac534cba
JB
10037 PYTHON_CPPFLAGS=$new_CPPFLAGS
10038 PYTHON_LIBS=$new_LIBS
9a156167 10039fi
81ecdfbb
RW
10040rm -f core conftest.err conftest.$ac_objext \
10041 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10042 CPPFLAGS=$save_CPPFLAGS
10043 LIBS=$save_LIBS
ec685c5e
DE
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10045$as_echo "${found_usable_python}" >&6; }
9a156167 10046
0c4a4063
DE
10047 ;;
10048 *)
ec685c5e 10049 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10050 ;;
10051 esac
e7a30f46 10052 elif test "${have_python_config}" != failed; then
ec685c5e 10053 if test "${have_libpython}" = no; then
9a156167 10054
420697bb
TT
10055 version=python2.7
10056
10057 new_CPPFLAGS=${python_includes}
10058 new_LIBS="${python_libs} -lpython2.7"
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10060$as_echo_n "checking for ${version}... " >&6; }
10061 save_CPPFLAGS=$CPPFLAGS
10062 save_LIBS=$LIBS
10063 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10064 LIBS="$LIBS $new_LIBS"
10065 found_usable_python=no
10066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10067/* end confdefs.h. */
ac534cba 10068#include "Python.h"
420697bb
TT
10069int
10070main ()
10071{
10072Py_Initialize ();
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077if ac_fn_c_try_link "$LINENO"; then :
10078 have_libpython=${version}
10079 found_usable_python=yes
ac534cba
JB
10080 PYTHON_CPPFLAGS=$new_CPPFLAGS
10081 PYTHON_LIBS=$new_LIBS
420697bb
TT
10082fi
10083rm -f core conftest.err conftest.$ac_objext \
10084 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10085 CPPFLAGS=$save_CPPFLAGS
10086 LIBS=$save_LIBS
420697bb
TT
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10088$as_echo "${found_usable_python}" >&6; }
10089
10090 fi
10091 if test "${have_libpython}" = no; then
10092
ec685c5e
DE
10093 version=python2.6
10094
10095 new_CPPFLAGS=${python_includes}
10096 new_LIBS="${python_libs} -lpython2.6"
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10098$as_echo_n "checking for ${version}... " >&6; }
10099 save_CPPFLAGS=$CPPFLAGS
10100 save_LIBS=$LIBS
10101 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10102 LIBS="$LIBS $new_LIBS"
10103 found_usable_python=no
10104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10105/* end confdefs.h. */
ac534cba 10106#include "Python.h"
ec685c5e
DE
10107int
10108main ()
10109{
10110Py_Initialize ();
10111 ;
10112 return 0;
10113}
10114_ACEOF
10115if ac_fn_c_try_link "$LINENO"; then :
10116 have_libpython=${version}
10117 found_usable_python=yes
ac534cba
JB
10118 PYTHON_CPPFLAGS=$new_CPPFLAGS
10119 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10120fi
10121rm -f core conftest.err conftest.$ac_objext \
10122 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10123 CPPFLAGS=$save_CPPFLAGS
10124 LIBS=$save_LIBS
ec685c5e
DE
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10126$as_echo "${found_usable_python}" >&6; }
9a156167 10127
81ecdfbb 10128 fi
ec685c5e 10129 if test ${have_libpython} = no; then
9a156167 10130
81ecdfbb 10131 version=python2.5
9a156167 10132
ec685c5e
DE
10133 new_CPPFLAGS=${python_includes}
10134 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10136$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10137 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10138 save_LIBS=$LIBS
ec685c5e
DE
10139 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10140 LIBS="$LIBS $new_LIBS"
10141 found_usable_python=no
81ecdfbb 10142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10143/* end confdefs.h. */
ac534cba 10144#include "Python.h"
81ecdfbb
RW
10145int
10146main ()
10147{
10148Py_Initialize ();
10149 ;
10150 return 0;
10151}
436868fb 10152_ACEOF
81ecdfbb 10153if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10154 have_libpython=${version}
10155 found_usable_python=yes
ac534cba
JB
10156 PYTHON_CPPFLAGS=$new_CPPFLAGS
10157 PYTHON_LIBS=$new_LIBS
436868fb 10158fi
81ecdfbb
RW
10159rm -f core conftest.err conftest.$ac_objext \
10160 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10161 CPPFLAGS=$save_CPPFLAGS
10162 LIBS=$save_LIBS
ec685c5e
DE
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10164$as_echo "${found_usable_python}" >&6; }
a9322a30 10165
81ecdfbb 10166 fi
ec685c5e 10167 if test ${have_libpython} = no; then
a9322a30 10168
81ecdfbb 10169 version=python2.4
a9322a30 10170
ec685c5e
DE
10171 new_CPPFLAGS=${python_includes}
10172 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10174$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10175 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10176 save_LIBS=$LIBS
ec685c5e
DE
10177 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10178 LIBS="$LIBS $new_LIBS"
10179 found_usable_python=no
81ecdfbb 10180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10181/* end confdefs.h. */
ac534cba 10182#include "Python.h"
a9322a30
TT
10183int
10184main ()
10185{
81ecdfbb 10186Py_Initialize ();
a9322a30
TT
10187 ;
10188 return 0;
10189}
436868fb 10190_ACEOF
81ecdfbb 10191if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10192 have_libpython=${version}
10193 found_usable_python=yes
ac534cba
JB
10194 PYTHON_CPPFLAGS=$new_CPPFLAGS
10195 PYTHON_LIBS=$new_LIBS
436868fb 10196fi
81ecdfbb
RW
10197rm -f core conftest.err conftest.$ac_objext \
10198 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10199 CPPFLAGS=$save_CPPFLAGS
10200 LIBS=$save_LIBS
ec685c5e
DE
10201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10202$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10203
ec685c5e
DE
10204 fi
10205 fi
9c4ea6c5 10206 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10207
10208$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10209
9c4ea6c5 10210 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10211
10212$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10213
9c4ea6c5 10214 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10215
10216$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10217
9c4ea6c5 10218 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10219
10220$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10221
81ecdfbb 10222 fi
ec685c5e
DE
10223
10224 if test "${have_libpython}" = no; then
81ecdfbb
RW
10225 case "${with_python}" in
10226 yes)
10227 as_fn_error "python is missing or unusable" "$LINENO" 5
10228 ;;
10229 auto)
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10231$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10232 ;;
10233 *)
10234 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10235 ;;
10236 esac
0c4a4063
DE
10237 else
10238 if test -n "${python_prefix}"; then
10239
10240cat >>confdefs.h <<_ACEOF
10241#define WITH_PYTHON_PATH "${python_prefix}"
10242_ACEOF
10243
10244
10245 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10246 if test "x$prefix" = xNONE; then
10247 test_prefix=/usr/local
10248 else
10249 test_prefix=$prefix
10250 fi
10251 else
10252 test_prefix=$exec_prefix
10253 fi
10254 value=0
10255 case ${python_prefix} in
10256 "${test_prefix}"|"${test_prefix}/"*|\
10257 '${exec_prefix}'|'${exec_prefix}/'*)
10258 value=1
10259 ;;
10260 esac
10261
10262cat >>confdefs.h <<_ACEOF
10263#define PYTHON_PATH_RELOCATABLE $value
10264_ACEOF
10265
10266
10267 fi
81ecdfbb 10268 fi
436868fb 10269fi
436868fb 10270
ec685c5e 10271if test "${have_libpython}" != no; then
436868fb 10272
81ecdfbb 10273$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10274
81ecdfbb
RW
10275 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10276 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10277 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10278 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10279 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10280
81ecdfbb
RW
10281 # Flags needed to compile Python code (taken from python-config --cflags).
10282 # We cannot call python-config directly because it will output whatever was
10283 # used when compiling the Python interpreter itself, including flags which
10284 # would make the python-related objects be compiled differently from the
10285 # rest of GDB (e.g., -O2 and -fPIC).
10286 if test "${GCC}" = yes; then
10287 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10288 fi
436868fb 10289
81ecdfbb
RW
10290 if test "x${tentative_python_cflags}" != x; then
10291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10292$as_echo_n "checking compiler flags for python code... " >&6; }
10293 for flag in ${tentative_python_cflags}; do
10294 # Check that the compiler accepts it
10295 saved_CFLAGS="$CFLAGS"
10296 CFLAGS="$CFLAGS $flag"
10297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10298/* end confdefs.h. */
81ecdfbb 10299
a9322a30
TT
10300int
10301main ()
10302{
a9322a30
TT
10303
10304 ;
10305 return 0;
10306}
bec39cab 10307_ACEOF
81ecdfbb
RW
10308if ac_fn_c_try_compile "$LINENO"; then :
10309 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10310fi
81ecdfbb
RW
10311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10312 CFLAGS="$saved_CFLAGS"
10313 done
10314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10315$as_echo "${PYTHON_CFLAGS}" >&6; }
10316 fi
043b6510 10317
c83393b9
JB
10318 # On x64 Windows, Python's include headers, and pyconfig.h in
10319 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10320 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10321 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10322 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10323 # The issue was reported to the Python community, but still isn't
10324 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10325
043b6510 10326 case "$gdb_host" in
c83393b9
JB
10327 mingw64)
10328 if test "${GCC}" = yes; then
10329 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10330 fi
10331 ;;
043b6510 10332 esac
a8db4212
YPK
10333
10334 # Note that "python -m threading" cannot be used to check for
10335 # threading support due to a bug in Python 2.7.3
10336 # (http://bugs.python.org/issue15567).
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10338$as_echo_n "checking whether python supports threads... " >&6; }
10339 saved_CPPFLAGS="${CPPFLAGS}"
10340 CPPFLAGS="${PYTHON_CPPFLAGS}"
10341 # Note that the test is reversed so that python_has_threads=yes on
10342 # unexpected failures.
10343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344/* end confdefs.h. */
10345
10346#include <Python.h>
10347#ifdef WITH_THREAD
10348# error
10349#endif
10350
10351_ACEOF
10352if ac_fn_c_try_cpp "$LINENO"; then :
10353 python_has_threads=no
10354else
10355 python_has_threads=yes
10356fi
10357rm -f conftest.err conftest.$ac_ext
10358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10359$as_echo "${python_has_threads}" >&6; }
10360 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10361else
6dddc817
DE
10362 # Even if Python support is not compiled in, we need to have this file
10363 # included so that the "python" command, et.al., still exists.
10364 CONFIG_OBS="$CONFIG_OBS python.o"
10365 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10366fi
9a156167 10367
a4a1c157
PA
10368# Work around Python http://bugs.python.org/issue10112. See also
10369# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10370# no effect. Note that the only test after this that uses Python is
10371# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10372# run without -export-dynamic too.
10373PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10374
10375
ed3ef339
DE
10376
10377
4df42755
DE
10378 if test "${have_libpython}" != no; then
10379 HAVE_PYTHON_TRUE=
10380 HAVE_PYTHON_FALSE='#'
10381else
10382 HAVE_PYTHON_TRUE='#'
10383 HAVE_PYTHON_FALSE=
10384fi
10385
ed3ef339
DE
10386
10387# -------------------- #
10388# Check for libguile. #
10389# -------------------- #
10390
10391
e1402065
DE
10392
10393
10394
10395
10396# Check whether --with-guile was given.
10397if test "${with_guile+set}" = set; then :
10398 withval=$with_guile;
10399else
10400 with_guile=auto
10401fi
10402
10403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10404$as_echo_n "checking whether to use guile... " >&6; }
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10406$as_echo "$with_guile" >&6; }
10407
ed3ef339
DE
10408# Extract the first word of "pkg-config", so it can be a program name with args.
10409set dummy pkg-config; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10413 $as_echo_n "(cached) " >&6
10414else
10415 case $pkg_config_prog_path in
10416 [\\/]* | ?:[\\/]*)
10417 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10418 ;;
10419 *)
10420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423 IFS=$as_save_IFS
10424 test -z "$as_dir" && as_dir=.
10425 for ac_exec_ext in '' $ac_executable_extensions; do
10426 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10427 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429 break 2
10430 fi
10431done
10432 done
10433IFS=$as_save_IFS
10434
10435 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10436 ;;
10437esac
10438fi
10439pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10440if test -n "$pkg_config_prog_path"; then
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10442$as_echo "$pkg_config_prog_path" >&6; }
10443else
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449
214ab2da 10450try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
10451have_libguile=no
10452case "${with_guile}" in
10453no)
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10455$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10456 ;;
10457auto)
e1402065
DE
10458 if test "${pkg_config_prog_path}" = "missing"; then
10459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10460$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10461 else
ed3ef339
DE
10462
10463 pkg_config=${pkg_config_prog_path}
10464 guile_version_list=${try_guile_versions}
10465 flag_errors=no
10466
ed3ef339
DE
10467 found_usable_guile=checking
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10469$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10470 for guile_version in ${guile_version_list}; do
10471 ${pkg_config} --exists ${guile_version} 2>/dev/null
10472 if test $? != 0; then
10473 continue
10474 fi
10475 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10476 if test $? != 0; then
10477 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10478 fi
10479 new_LIBS=`${pkg_config} --libs ${guile_version}`
10480 if test $? != 0; then
10481 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10482 fi
10483 found_usable_guile=${guile_version}
10484 break
10485 done
10486 if test "${found_usable_guile}" = "checking"; then
10487 if test "${flag_errors}" = "yes"; then
10488 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10489 else
10490 found_usable_guile=no
10491 fi
10492 fi
10493 if test "${found_usable_guile}" != no; then
10494 save_CPPFLAGS=$CPPFLAGS
10495 save_LIBS=$LIBS
10496 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10497 LIBS="$LIBS $new_LIBS"
10498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10499/* end confdefs.h. */
10500#include "libguile.h"
10501int
10502main ()
10503{
10504scm_init_guile ();
10505 ;
10506 return 0;
10507}
10508_ACEOF
10509if ac_fn_c_try_link "$LINENO"; then :
10510 have_libguile=yes
10511 GUILE_CPPFLAGS=$new_CPPFLAGS
10512 GUILE_LIBS=$new_LIBS
10513else
10514 found_usable_guile=no
10515fi
10516rm -f core conftest.err conftest.$ac_objext \
10517 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10518 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10519if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10520
10521$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10522
10523
10524fi
10525
ed3ef339
DE
10526 CPPFLAGS=$save_CPPFLAGS
10527 LIBS=$save_LIBS
10528 if test "${found_usable_guile}" = no; then
10529 if test "${flag_errors}" = yes; then
10530 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10532as_fn_error "linking guile version ${guile_version} test program failed
10533See \`config.log' for more details." "$LINENO" 5; }
10534 fi
10535 fi
10536 fi
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10538$as_echo "${found_usable_guile}" >&6; }
10539
e1402065 10540 fi
ed3ef339
DE
10541 ;;
10542yes)
e1402065
DE
10543 if test "${pkg_config_prog_path}" = "missing"; then
10544 as_fn_error "pkg-config not found" "$LINENO" 5
10545 fi
ed3ef339
DE
10546
10547 pkg_config=${pkg_config_prog_path}
10548 guile_version_list=${try_guile_versions}
10549 flag_errors=yes
10550
ed3ef339
DE
10551 found_usable_guile=checking
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10553$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10554 for guile_version in ${guile_version_list}; do
10555 ${pkg_config} --exists ${guile_version} 2>/dev/null
10556 if test $? != 0; then
10557 continue
10558 fi
10559 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10560 if test $? != 0; then
10561 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10562 fi
10563 new_LIBS=`${pkg_config} --libs ${guile_version}`
10564 if test $? != 0; then
10565 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10566 fi
10567 found_usable_guile=${guile_version}
10568 break
10569 done
10570 if test "${found_usable_guile}" = "checking"; then
10571 if test "${flag_errors}" = "yes"; then
10572 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10573 else
10574 found_usable_guile=no
10575 fi
10576 fi
10577 if test "${found_usable_guile}" != no; then
10578 save_CPPFLAGS=$CPPFLAGS
10579 save_LIBS=$LIBS
10580 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10581 LIBS="$LIBS $new_LIBS"
10582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583/* end confdefs.h. */
10584#include "libguile.h"
10585int
10586main ()
10587{
10588scm_init_guile ();
10589 ;
10590 return 0;
10591}
10592_ACEOF
10593if ac_fn_c_try_link "$LINENO"; then :
10594 have_libguile=yes
10595 GUILE_CPPFLAGS=$new_CPPFLAGS
10596 GUILE_LIBS=$new_LIBS
10597else
10598 found_usable_guile=no
10599fi
10600rm -f core conftest.err conftest.$ac_objext \
10601 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10602 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10603if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10604
10605$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10606
10607
10608fi
10609
ed3ef339
DE
10610 CPPFLAGS=$save_CPPFLAGS
10611 LIBS=$save_LIBS
10612 if test "${found_usable_guile}" = no; then
10613 if test "${flag_errors}" = yes; then
10614 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10616as_fn_error "linking guile version ${guile_version} test program failed
10617See \`config.log' for more details." "$LINENO" 5; }
10618 fi
10619 fi
10620 fi
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10622$as_echo "${found_usable_guile}" >&6; }
10623
10624 ;;
10625[\\/]* | ?:[\\/]*)
e1402065 10626 if test -x "${with_guile}"; then
ed3ef339
DE
10627
10628 pkg_config=${with_guile}
10629 guile_version_list=${try_guile_versions}
10630 flag_errors=yes
10631
ed3ef339
DE
10632 found_usable_guile=checking
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10634$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10635 for guile_version in ${guile_version_list}; do
10636 ${pkg_config} --exists ${guile_version} 2>/dev/null
10637 if test $? != 0; then
10638 continue
10639 fi
10640 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10641 if test $? != 0; then
10642 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10643 fi
10644 new_LIBS=`${pkg_config} --libs ${guile_version}`
10645 if test $? != 0; then
10646 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10647 fi
10648 found_usable_guile=${guile_version}
10649 break
10650 done
10651 if test "${found_usable_guile}" = "checking"; then
10652 if test "${flag_errors}" = "yes"; then
10653 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10654 else
10655 found_usable_guile=no
10656 fi
10657 fi
10658 if test "${found_usable_guile}" != no; then
10659 save_CPPFLAGS=$CPPFLAGS
10660 save_LIBS=$LIBS
10661 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10662 LIBS="$LIBS $new_LIBS"
10663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10664/* end confdefs.h. */
10665#include "libguile.h"
10666int
10667main ()
10668{
10669scm_init_guile ();
10670 ;
10671 return 0;
10672}
10673_ACEOF
10674if ac_fn_c_try_link "$LINENO"; then :
10675 have_libguile=yes
10676 GUILE_CPPFLAGS=$new_CPPFLAGS
10677 GUILE_LIBS=$new_LIBS
10678else
10679 found_usable_guile=no
10680fi
10681rm -f core conftest.err conftest.$ac_objext \
10682 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10683 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10684if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10685
10686$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10687
10688
10689fi
10690
ed3ef339
DE
10691 CPPFLAGS=$save_CPPFLAGS
10692 LIBS=$save_LIBS
10693 if test "${found_usable_guile}" = no; then
10694 if test "${flag_errors}" = yes; then
10695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10697as_fn_error "linking guile version ${guile_version} test program failed
10698See \`config.log' for more details." "$LINENO" 5; }
10699 fi
10700 fi
10701 fi
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10703$as_echo "${found_usable_guile}" >&6; }
10704
e1402065
DE
10705 else
10706 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
10707 fi
ed3ef339
DE
10708 ;;
10709"" | */*)
10710 # Disallow --with=guile="" and --with-guile=foo/bar.
10711 as_fn_error "invalid value for --with-guile" "$LINENO" 5
10712 ;;
10713*)
10714 # A space separate list of guile versions to try, in order.
e1402065
DE
10715 if test "${pkg_config_prog_path}" = "missing"; then
10716 as_fn_error "pkg-config not found" "$LINENO" 5
10717 fi
ed3ef339
DE
10718
10719 pkg_config=${pkg_config_prog_path}
10720 guile_version_list=${with_guile}
10721 flag_errors=yes
10722
ed3ef339
DE
10723 found_usable_guile=checking
10724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10725$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10726 for guile_version in ${guile_version_list}; do
10727 ${pkg_config} --exists ${guile_version} 2>/dev/null
10728 if test $? != 0; then
10729 continue
10730 fi
10731 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10732 if test $? != 0; then
10733 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10734 fi
10735 new_LIBS=`${pkg_config} --libs ${guile_version}`
10736 if test $? != 0; then
10737 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10738 fi
10739 found_usable_guile=${guile_version}
10740 break
10741 done
10742 if test "${found_usable_guile}" = "checking"; then
10743 if test "${flag_errors}" = "yes"; then
10744 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10745 else
10746 found_usable_guile=no
10747 fi
10748 fi
10749 if test "${found_usable_guile}" != no; then
10750 save_CPPFLAGS=$CPPFLAGS
10751 save_LIBS=$LIBS
10752 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10753 LIBS="$LIBS $new_LIBS"
10754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10755/* end confdefs.h. */
10756#include "libguile.h"
10757int
10758main ()
10759{
10760scm_init_guile ();
10761 ;
10762 return 0;
10763}
10764_ACEOF
10765if ac_fn_c_try_link "$LINENO"; then :
10766 have_libguile=yes
10767 GUILE_CPPFLAGS=$new_CPPFLAGS
10768 GUILE_LIBS=$new_LIBS
10769else
10770 found_usable_guile=no
10771fi
10772rm -f core conftest.err conftest.$ac_objext \
10773 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10774 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10775if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10776
10777$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10778
10779
10780fi
10781
ed3ef339
DE
10782 CPPFLAGS=$save_CPPFLAGS
10783 LIBS=$save_LIBS
10784 if test "${found_usable_guile}" = no; then
10785 if test "${flag_errors}" = yes; then
10786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10788as_fn_error "linking guile version ${guile_version} test program failed
10789See \`config.log' for more details." "$LINENO" 5; }
10790 fi
10791 fi
10792 fi
10793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10794$as_echo "${found_usable_guile}" >&6; }
10795
10796 ;;
10797esac
10798
e76c5d17 10799if test "${have_libguile}" != no; then
d342a0da
DE
10800 case "${with_guile}" in
10801 [\\/]* | ?:[\\/]*)
e76c5d17
DE
10802
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10804$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10805if test "${ac_cv_guild_program_name+set}" = set; then :
10806 $as_echo_n "(cached) " >&6
10807else
d342a0da 10808 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
10809
10810 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10811 # the 'guild' and 'bindir' variables. In that case, try to guess
10812 # what the program name is, at the risk of getting it wrong if
10813 # Guile was configured with '--program-suffix' or similar.
10814 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 10815 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
10816 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10817 fi
10818
10819fi
10820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10821$as_echo "$ac_cv_guild_program_name" >&6; }
10822
10823 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10824 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10825 fi
10826
10827 GUILD="$ac_cv_guild_program_name"
10828
10829
d342a0da
DE
10830 ;;
10831 *)
10832
10833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
10834$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
10835if test "${ac_cv_guild_program_name+set}" = set; then :
10836 $as_echo_n "(cached) " >&6
10837else
10838 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
10839
10840 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
10841 # the 'guild' and 'bindir' variables. In that case, try to guess
10842 # what the program name is, at the risk of getting it wrong if
10843 # Guile was configured with '--program-suffix' or similar.
10844 if test "x$ac_cv_guild_program_name" = "x"; then
10845 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
10846 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
10847 fi
10848
10849fi
10850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
10851$as_echo "$ac_cv_guild_program_name" >&6; }
10852
10853 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
10854 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
10855 fi
10856
10857 GUILD="$ac_cv_guild_program_name"
10858
10859
10860 ;;
10861 esac
e76c5d17
DE
10862
10863
10864 if test "$cross_compiling" = no; then
10865 GUILD_TARGET_FLAG=
10866 else
10867 GUILD_TARGET_FLAG="--target=$host"
10868 fi
10869
10870
10871
10872
10873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
10874$as_echo_n "checking whether guild supports this host... " >&6; }
10875if test "${ac_cv_guild_ok+set}" = set; then :
10876 $as_echo_n "(cached) " >&6
10877else
10878 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
10879 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
10880 ac_cv_guild_ok=yes
10881 else
10882 ac_cv_guild_ok=no
10883 fi
10884fi
10885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
10886$as_echo "$ac_cv_guild_ok" >&6; }
10887
10888 if test "$ac_cv_guild_ok" = no; then
10889 have_libguile=no
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
10891$as_echo "$as_me: WARNING: disabling guile support" >&2;}
10892 fi
10893fi
10894
ed3ef339
DE
10895if test "${have_libguile}" != no; then
10896
10897$as_echo "#define HAVE_GUILE 1" >>confdefs.h
10898
10899 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
10900 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
10901 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
10902 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
10903 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
10904
10905 save_LIBS="$LIBS"
10906 save_CPPFLAGS="$CPPFLAGS"
10907 LIBS="$GUILE_LIBS"
10908 CPPFLAGS="$GUILE_CPPFLAGS"
10909 for ac_func in scm_new_smob
10910do :
10911 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
10912if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
10913 cat >>confdefs.h <<_ACEOF
10914#define HAVE_SCM_NEW_SMOB 1
10915_ACEOF
10916
10917fi
10918done
10919
10920 LIBS="$save_LIBS"
10921 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
10922else
10923 # Even if Guile support is not compiled in, we need to have these files
10924 # included.
10925 CONFIG_OBS="$CONFIG_OBS guile.o"
10926 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
10927fi
9a156167 10928
ac534cba 10929
4df42755
DE
10930 if test "${have_libguile}" != no; then
10931 HAVE_GUILE_TRUE=
10932 HAVE_GUILE_FALSE='#'
10933else
10934 HAVE_GUILE_TRUE='#'
10935 HAVE_GUILE_FALSE=
10936fi
10937
ac534cba 10938
d344e670
DE
10939# --------------------- #
10940# Check for libmcheck. #
10941# --------------------- #
10942
a8db4212
YPK
10943# Enable -lmcheck by default (it provides cheap-enough memory mangling),
10944# but turn it off if Python is enabled with threads, since -lmcheck is
10945# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
10946# and for releases.
17ef446e
PA
10947if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
10948 && $development; then
10949 libmcheck_default=yes
10950else
10951 libmcheck_default=no
a8db4212
YPK
10952fi
10953
17ef446e
PA
10954 # Check whether --enable-libmcheck was given.
10955if test "${enable_libmcheck+set}" = set; then :
10956 enableval=$enable_libmcheck; case "${enableval}" in
10957 yes | y) ENABLE_LIBMCHECK="yes" ;;
10958 no | n) ENABLE_LIBMCHECK="no" ;;
10959 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
10960 esac
10961fi
10962
10963
10964 if test -z "${ENABLE_LIBMCHECK}"; then
10965 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 10966 fi
17ef446e
PA
10967
10968 if test "$ENABLE_LIBMCHECK" = "yes" ; then
10969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
10970$as_echo_n "checking for main in -lmcheck... " >&6; }
10971if test "${ac_cv_lib_mcheck_main+set}" = set; then :
10972 $as_echo_n "(cached) " >&6
10973else
10974 ac_check_lib_save_LIBS=$LIBS
10975LIBS="-lmcheck $LIBS"
10976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977/* end confdefs.h. */
10978
10979
10980int
10981main ()
10982{
10983return main ();
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988if ac_fn_c_try_link "$LINENO"; then :
10989 ac_cv_lib_mcheck_main=yes
10990else
10991 ac_cv_lib_mcheck_main=no
10992fi
10993rm -f core conftest.err conftest.$ac_objext \
10994 conftest$ac_exeext conftest.$ac_ext
10995LIBS=$ac_check_lib_save_LIBS
10996fi
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
10998$as_echo "$ac_cv_lib_mcheck_main" >&6; }
10999if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
11000 cat >>confdefs.h <<_ACEOF
11001#define HAVE_LIBMCHECK 1
11002_ACEOF
11003
11004 LIBS="-lmcheck $LIBS"
11005
11006fi
11007
17ef446e
PA
11008 fi
11009
11010
11011if test "$ENABLE_LIBMCHECK" = "yes" \
11012 -a "${have_libpython}" != "no" \
11013 -a "${python_has_threads}" = "yes" ; then
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11015$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11016fi
11017
58bfce93
MM
11018
11019# Check whether --with-intel_pt was given.
11020if test "${with_intel_pt+set}" = set; then :
11021 withval=$with_intel_pt;
11022else
11023 with_intel_pt=auto
11024fi
11025
11026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11027$as_echo_n "checking whether to use intel pt... " >&6; }
11028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11029$as_echo "$with_intel_pt" >&6; }
11030
11031if test "${with_intel_pt}" = no; then
bc504a31
PA
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11033$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11034 HAVE_LIBIPT=no
11035else
5599c404
MM
11036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11037/* end confdefs.h. */
11038
11039#include <linux/perf_event.h>
11040#ifndef PERF_ATTR_SIZE_VER5
11041# error
11042#endif
11043
11044_ACEOF
11045if ac_fn_c_try_cpp "$LINENO"; then :
11046 perf_event=yes
11047else
11048 perf_event=no
11049fi
11050rm -f conftest.err conftest.$ac_ext
11051 if test "$perf_event" != yes; then
11052 if test "$with_intel_pt" = yes; then
11053 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
11054 else
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11056$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11057 fi
11058 fi
11059
58bfce93
MM
11060
11061
11062
11063
11064
11065
11066
11067
11068 use_additional=yes
11069
11070 acl_save_prefix="$prefix"
11071 prefix="$acl_final_prefix"
11072 acl_save_exec_prefix="$exec_prefix"
11073 exec_prefix="$acl_final_exec_prefix"
11074
11075 eval additional_includedir=\"$includedir\"
11076 eval additional_libdir=\"$libdir\"
11077
11078 exec_prefix="$acl_save_exec_prefix"
11079 prefix="$acl_save_prefix"
11080
11081
11082# Check whether --with-libipt-prefix was given.
11083if test "${with_libipt_prefix+set}" = set; then :
11084 withval=$with_libipt_prefix;
11085 if test "X$withval" = "Xno"; then
11086 use_additional=no
11087 else
11088 if test "X$withval" = "X"; then
11089
11090 acl_save_prefix="$prefix"
11091 prefix="$acl_final_prefix"
11092 acl_save_exec_prefix="$exec_prefix"
11093 exec_prefix="$acl_final_exec_prefix"
11094
11095 eval additional_includedir=\"$includedir\"
11096 eval additional_libdir=\"$libdir\"
11097
11098 exec_prefix="$acl_save_exec_prefix"
11099 prefix="$acl_save_prefix"
11100
11101 else
11102 additional_includedir="$withval/include"
11103 additional_libdir="$withval/lib"
11104 fi
11105 fi
11106
11107fi
11108
11109 LIBIPT=
11110 LTLIBIPT=
11111 INCIPT=
11112 rpathdirs=
11113 ltrpathdirs=
11114 names_already_handled=
11115 names_next_round='ipt '
11116 while test -n "$names_next_round"; do
11117 names_this_round="$names_next_round"
11118 names_next_round=
11119 for name in $names_this_round; do
11120 already_handled=
11121 for n in $names_already_handled; do
11122 if test "$n" = "$name"; then
11123 already_handled=yes
11124 break
11125 fi
11126 done
11127 if test -z "$already_handled"; then
11128 names_already_handled="$names_already_handled $name"
11129 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11130 eval value=\"\$HAVE_LIB$uppername\"
11131 if test -n "$value"; then
11132 if test "$value" = yes; then
11133 eval value=\"\$LIB$uppername\"
11134 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11135 eval value=\"\$LTLIB$uppername\"
11136 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11137 else
11138 :
11139 fi
11140 else
11141 found_dir=
11142 found_la=
11143 found_so=
11144 found_a=
11145 if test $use_additional = yes; then
11146 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11147 found_dir="$additional_libdir"
11148 found_so="$additional_libdir/lib$name.$shlibext"
11149 if test -f "$additional_libdir/lib$name.la"; then
11150 found_la="$additional_libdir/lib$name.la"
11151 fi
11152 else
11153 if test -f "$additional_libdir/lib$name.$libext"; then
11154 found_dir="$additional_libdir"
11155 found_a="$additional_libdir/lib$name.$libext"
11156 if test -f "$additional_libdir/lib$name.la"; then
11157 found_la="$additional_libdir/lib$name.la"
11158 fi
11159 fi
11160 fi
11161 fi
11162 if test "X$found_dir" = "X"; then
11163 for x in $LDFLAGS $LTLIBIPT; do
11164
11165 acl_save_prefix="$prefix"
11166 prefix="$acl_final_prefix"
11167 acl_save_exec_prefix="$exec_prefix"
11168 exec_prefix="$acl_final_exec_prefix"
11169 eval x=\"$x\"
11170 exec_prefix="$acl_save_exec_prefix"
11171 prefix="$acl_save_prefix"
11172
11173 case "$x" in
11174 -L*)
11175 dir=`echo "X$x" | sed -e 's/^X-L//'`
11176 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11177 found_dir="$dir"
11178 found_so="$dir/lib$name.$shlibext"
11179 if test -f "$dir/lib$name.la"; then
11180 found_la="$dir/lib$name.la"
11181 fi
11182 else
11183 if test -f "$dir/lib$name.$libext"; then
11184 found_dir="$dir"
11185 found_a="$dir/lib$name.$libext"
11186 if test -f "$dir/lib$name.la"; then
11187 found_la="$dir/lib$name.la"
11188 fi
11189 fi
11190 fi
11191 ;;
11192 esac
11193 if test "X$found_dir" != "X"; then
11194 break
11195 fi
11196 done
11197 fi
11198 if test "X$found_dir" != "X"; then
11199 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11200 if test "X$found_so" != "X"; then
11201 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11202 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11203 else
11204 haveit=
11205 for x in $ltrpathdirs; do
11206 if test "X$x" = "X$found_dir"; then
11207 haveit=yes
11208 break
11209 fi
11210 done
11211 if test -z "$haveit"; then
11212 ltrpathdirs="$ltrpathdirs $found_dir"
11213 fi
11214 if test "$hardcode_direct" = yes; then
11215 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11216 else
11217 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11218 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11219 haveit=
11220 for x in $rpathdirs; do
11221 if test "X$x" = "X$found_dir"; then
11222 haveit=yes
11223 break
11224 fi
11225 done
11226 if test -z "$haveit"; then
11227 rpathdirs="$rpathdirs $found_dir"
11228 fi
11229 else
11230 haveit=
11231 for x in $LDFLAGS $LIBIPT; do
11232
11233 acl_save_prefix="$prefix"
11234 prefix="$acl_final_prefix"
11235 acl_save_exec_prefix="$exec_prefix"
11236 exec_prefix="$acl_final_exec_prefix"
11237 eval x=\"$x\"
11238 exec_prefix="$acl_save_exec_prefix"
11239 prefix="$acl_save_prefix"
11240
11241 if test "X$x" = "X-L$found_dir"; then
11242 haveit=yes
11243 break
11244 fi
11245 done
11246 if test -z "$haveit"; then
11247 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11248 fi
11249 if test "$hardcode_minus_L" != no; then
11250 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11251 else
11252 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11253 fi
11254 fi
11255 fi
11256 fi
11257 else
11258 if test "X$found_a" != "X"; then
11259 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11260 else
11261 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11262 fi
11263 fi
11264 additional_includedir=
11265 case "$found_dir" in
11266 */lib | */lib/)
11267 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11268 additional_includedir="$basedir/include"
11269 ;;
11270 esac
11271 if test "X$additional_includedir" != "X"; then
11272 if test "X$additional_includedir" != "X/usr/include"; then
11273 haveit=
11274 if test "X$additional_includedir" = "X/usr/local/include"; then
11275 if test -n "$GCC"; then
11276 case $host_os in
11277 linux*) haveit=yes;;
11278 esac
11279 fi
11280 fi
11281 if test -z "$haveit"; then
11282 for x in $CPPFLAGS $INCIPT; do
11283
11284 acl_save_prefix="$prefix"
11285 prefix="$acl_final_prefix"
11286 acl_save_exec_prefix="$exec_prefix"
11287 exec_prefix="$acl_final_exec_prefix"
11288 eval x=\"$x\"
11289 exec_prefix="$acl_save_exec_prefix"
11290 prefix="$acl_save_prefix"
11291
11292 if test "X$x" = "X-I$additional_includedir"; then
11293 haveit=yes
11294 break
11295 fi
11296 done
11297 if test -z "$haveit"; then
11298 if test -d "$additional_includedir"; then
11299 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11300 fi
11301 fi
11302 fi
11303 fi
11304 fi
11305 if test -n "$found_la"; then
11306 save_libdir="$libdir"
11307 case "$found_la" in
11308 */* | *\\*) . "$found_la" ;;
11309 *) . "./$found_la" ;;
11310 esac
11311 libdir="$save_libdir"
11312 for dep in $dependency_libs; do
11313 case "$dep" in
11314 -L*)
11315 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11316 if test "X$additional_libdir" != "X/usr/lib"; then
11317 haveit=
11318 if test "X$additional_libdir" = "X/usr/local/lib"; then
11319 if test -n "$GCC"; then
11320 case $host_os in
11321 linux*) haveit=yes;;
11322 esac
11323 fi
11324 fi
11325 if test -z "$haveit"; then
11326 haveit=
11327 for x in $LDFLAGS $LIBIPT; do
11328
11329 acl_save_prefix="$prefix"
11330 prefix="$acl_final_prefix"
11331 acl_save_exec_prefix="$exec_prefix"
11332 exec_prefix="$acl_final_exec_prefix"
11333 eval x=\"$x\"
11334 exec_prefix="$acl_save_exec_prefix"
11335 prefix="$acl_save_prefix"
11336
11337 if test "X$x" = "X-L$additional_libdir"; then
11338 haveit=yes
11339 break
11340 fi
11341 done
11342 if test -z "$haveit"; then
11343 if test -d "$additional_libdir"; then
11344 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11345 fi
11346 fi
11347 haveit=
11348 for x in $LDFLAGS $LTLIBIPT; do
11349
11350 acl_save_prefix="$prefix"
11351 prefix="$acl_final_prefix"
11352 acl_save_exec_prefix="$exec_prefix"
11353 exec_prefix="$acl_final_exec_prefix"
11354 eval x=\"$x\"
11355 exec_prefix="$acl_save_exec_prefix"
11356 prefix="$acl_save_prefix"
11357
11358 if test "X$x" = "X-L$additional_libdir"; then
11359 haveit=yes
11360 break
11361 fi
11362 done
11363 if test -z "$haveit"; then
11364 if test -d "$additional_libdir"; then
11365 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11366 fi
11367 fi
11368 fi
11369 fi
11370 ;;
11371 -R*)
11372 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11373 if test "$enable_rpath" != no; then
11374 haveit=
11375 for x in $rpathdirs; do
11376 if test "X$x" = "X$dir"; then
11377 haveit=yes
11378 break
11379 fi
11380 done
11381 if test -z "$haveit"; then
11382 rpathdirs="$rpathdirs $dir"
11383 fi
11384 haveit=
11385 for x in $ltrpathdirs; do
11386 if test "X$x" = "X$dir"; then
11387 haveit=yes
11388 break
11389 fi
11390 done
11391 if test -z "$haveit"; then
11392 ltrpathdirs="$ltrpathdirs $dir"
11393 fi
11394 fi
11395 ;;
11396 -l*)
11397 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11398 ;;
11399 *.la)
11400 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11401 ;;
11402 *)
11403 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11404 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11405 ;;
11406 esac
11407 done
11408 fi
11409 else
11410 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11411 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11412 fi
11413 fi
11414 fi
11415 done
11416 done
11417 if test "X$rpathdirs" != "X"; then
11418 if test -n "$hardcode_libdir_separator"; then
11419 alldirs=
11420 for found_dir in $rpathdirs; do
11421 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11422 done
11423 acl_save_libdir="$libdir"
11424 libdir="$alldirs"
11425 eval flag=\"$hardcode_libdir_flag_spec\"
11426 libdir="$acl_save_libdir"
11427 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11428 else
11429 for found_dir in $rpathdirs; do
11430 acl_save_libdir="$libdir"
11431 libdir="$found_dir"
11432 eval flag=\"$hardcode_libdir_flag_spec\"
11433 libdir="$acl_save_libdir"
11434 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11435 done
11436 fi
11437 fi
11438 if test "X$ltrpathdirs" != "X"; then
11439 for found_dir in $ltrpathdirs; do
11440 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11441 done
11442 fi
11443
11444
11445 ac_save_CPPFLAGS="$CPPFLAGS"
11446
11447 for element in $INCIPT; do
11448 haveit=
11449 for x in $CPPFLAGS; do
11450
11451 acl_save_prefix="$prefix"
11452 prefix="$acl_final_prefix"
11453 acl_save_exec_prefix="$exec_prefix"
11454 exec_prefix="$acl_final_exec_prefix"
11455 eval x=\"$x\"
11456 exec_prefix="$acl_save_exec_prefix"
11457 prefix="$acl_save_prefix"
11458
11459 if test "X$x" = "X$element"; then
11460 haveit=yes
11461 break
11462 fi
11463 done
11464 if test -z "$haveit"; then
11465 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11466 fi
11467 done
11468
11469
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11471$as_echo_n "checking for libipt... " >&6; }
11472if test "${ac_cv_libipt+set}" = set; then :
11473 $as_echo_n "(cached) " >&6
11474else
11475
11476 ac_save_LIBS="$LIBS"
11477 LIBS="$LIBS $LIBIPT"
11478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11479/* end confdefs.h. */
11480#include "intel-pt.h"
11481int
11482main ()
11483{
11484pt_insn_alloc_decoder (0);
11485 ;
11486 return 0;
11487}
11488_ACEOF
11489if ac_fn_c_try_link "$LINENO"; then :
11490 ac_cv_libipt=yes
11491else
11492 ac_cv_libipt=no
11493fi
11494rm -f core conftest.err conftest.$ac_objext \
11495 conftest$ac_exeext conftest.$ac_ext
11496 LIBS="$ac_save_LIBS"
11497
11498fi
11499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11500$as_echo "$ac_cv_libipt" >&6; }
11501 if test "$ac_cv_libipt" = yes; then
11502 HAVE_LIBIPT=yes
11503
11504$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11505
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11507$as_echo_n "checking how to link with libipt... " >&6; }
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11509$as_echo "$LIBIPT" >&6; }
11510 else
11511 HAVE_LIBIPT=no
11512 CPPFLAGS="$ac_save_CPPFLAGS"
11513 LIBIPT=
11514 LTLIBIPT=
11515 fi
11516
11517
11518
11519
11520
11521
11522 if test "$HAVE_LIBIPT" != yes; then
11523 if test "$with_intel_pt" = yes; then
11524 as_fn_error "libipt is missing or unusable" "$LINENO" 5
11525 else
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11527$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11528 fi
11529 fi
11530fi
11531
81ecdfbb
RW
11532# ------------------------- #
11533# Checks for header files. #
11534# ------------------------- #
c890192f 11535
81ecdfbb
RW
11536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11537$as_echo_n "checking for ANSI C header files... " >&6; }
11538if test "${ac_cv_header_stdc+set}" = set; then :
11539 $as_echo_n "(cached) " >&6
bec39cab 11540else
81ecdfbb 11541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11542/* end confdefs.h. */
81ecdfbb
RW
11543#include <stdlib.h>
11544#include <stdarg.h>
11545#include <string.h>
11546#include <float.h>
11547
a9322a30
TT
11548int
11549main ()
11550{
a9322a30
TT
11551
11552 ;
11553 return 0;
11554}
bec39cab 11555_ACEOF
81ecdfbb
RW
11556if ac_fn_c_try_compile "$LINENO"; then :
11557 ac_cv_header_stdc=yes
bec39cab 11558else
81ecdfbb 11559 ac_cv_header_stdc=no
a9322a30 11560fi
81ecdfbb 11561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11562
81ecdfbb
RW
11563if test $ac_cv_header_stdc = yes; then
11564 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11566/* end confdefs.h. */
11567#include <string.h>
bec39cab 11568
81ecdfbb
RW
11569_ACEOF
11570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11571 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 11572
bec39cab 11573else
81ecdfbb
RW
11574 ac_cv_header_stdc=no
11575fi
11576rm -f conftest*
11577
11578fi
11579
11580if test $ac_cv_header_stdc = yes; then
11581 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11583/* end confdefs.h. */
11584#include <stdlib.h>
11585
bec39cab 11586_ACEOF
81ecdfbb
RW
11587if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11588 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 11589
81ecdfbb
RW
11590else
11591 ac_cv_header_stdc=no
11592fi
11593rm -f conftest*
bec39cab 11594
bec39cab 11595fi
81ecdfbb
RW
11596
11597if test $ac_cv_header_stdc = yes; then
11598 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11599 if test "$cross_compiling" = yes; then :
11600 :
bec39cab 11601else
81ecdfbb 11602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11603/* end confdefs.h. */
81ecdfbb
RW
11604#include <ctype.h>
11605#include <stdlib.h>
11606#if ((' ' & 0x0FF) == 0x020)
11607# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11608# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11609#else
11610# define ISLOWER(c) \
11611 (('a' <= (c) && (c) <= 'i') \
11612 || ('j' <= (c) && (c) <= 'r') \
11613 || ('s' <= (c) && (c) <= 'z'))
11614# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11615#endif
11616
11617#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
11618int
11619main ()
11620{
81ecdfbb
RW
11621 int i;
11622 for (i = 0; i < 256; i++)
11623 if (XOR (islower (i), ISLOWER (i))
11624 || toupper (i) != TOUPPER (i))
11625 return 2;
a9322a30
TT
11626 return 0;
11627}
bec39cab 11628_ACEOF
81ecdfbb
RW
11629if ac_fn_c_try_run "$LINENO"; then :
11630
bec39cab 11631else
81ecdfbb
RW
11632 ac_cv_header_stdc=no
11633fi
11634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11635 conftest.$ac_objext conftest.beam conftest.$ac_ext
11636fi
bec39cab 11637
bec39cab 11638fi
a9322a30 11639fi
81ecdfbb
RW
11640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11641$as_echo "$ac_cv_header_stdc" >&6; }
11642if test $ac_cv_header_stdc = yes; then
bec39cab 11643
81ecdfbb 11644$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 11645
81ecdfbb 11646fi
bec39cab 11647
81ecdfbb 11648# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 11649for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 11650 thread_db.h \
0080a2f6 11651 sys/fault.h \
81ecdfbb
RW
11652 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11653 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
11654 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 11655 termios.h termio.h \
3447c057 11656 sgtty.h elf_hp.h \
9467110b 11657 dlfcn.h
81ecdfbb
RW
11658do :
11659 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11660ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11661eval as_val=\$$as_ac_Header
11662 if test "x$as_val" = x""yes; then :
bec39cab 11663 cat >>confdefs.h <<_ACEOF
81ecdfbb 11664#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11665_ACEOF
c906108c 11666
bec39cab 11667fi
81ecdfbb
RW
11668
11669done
11670
81ecdfbb
RW
11671for ac_header in sys/proc.h
11672do :
11673 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
11674# include <sys/param.h>
11675#endif
c906108c 11676
81ecdfbb
RW
11677"
11678if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 11679 cat >>confdefs.h <<_ACEOF
81ecdfbb 11680#define HAVE_SYS_PROC_H 1
bec39cab 11681_ACEOF
5ee754fc 11682
bec39cab 11683fi
81ecdfbb
RW
11684
11685done
11686
11687for ac_header in sys/user.h
11688do :
11689 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11690# include <sys/param.h>
a9322a30
TT
11691#endif
11692
81ecdfbb
RW
11693"
11694if test "x$ac_cv_header_sys_user_h" = x""yes; then :
11695 cat >>confdefs.h <<_ACEOF
11696#define HAVE_SYS_USER_H 1
bec39cab 11697_ACEOF
bec39cab 11698
a9322a30 11699fi
bec39cab 11700
81ecdfbb 11701done
5ee754fc 11702
5ee754fc 11703
81ecdfbb
RW
11704# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
11705# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
11706# think that we don't have <curses.h> if we're using GCC.
11707case $host_os in
11708 solaris2.[789])
11709 if test "$GCC" = yes; then
11710
11711$as_echo "#define _MSE_INT_H 1" >>confdefs.h
11712
11713 fi ;;
11714esac
11715for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
11716do :
11717 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11718ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11719eval as_val=\$$as_ac_Header
11720 if test "x$as_val" = x""yes; then :
bec39cab 11721 cat >>confdefs.h <<_ACEOF
81ecdfbb 11722#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 11723_ACEOF
5ee754fc
MK
11724
11725fi
11726
81ecdfbb 11727done
bec39cab 11728
81ecdfbb
RW
11729for ac_header in term.h
11730do :
11731 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11732# include <curses.h>
11733#endif
bec39cab 11734
81ecdfbb
RW
11735"
11736if test "x$ac_cv_header_term_h" = x""yes; then :
11737 cat >>confdefs.h <<_ACEOF
11738#define HAVE_TERM_H 1
a8111142 11739_ACEOF
a8111142 11740
a8111142 11741fi
a8111142 11742
81ecdfbb 11743done
a8111142
TT
11744
11745
81ecdfbb
RW
11746# ------------------------- #
11747# Checks for declarations. #
11748# ------------------------- #
a9322a30 11749
07697489
PA
11750
11751 # Check for presence and size of long long.
11752 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11753if test "x$ac_cv_type_long_long" = x""yes; then :
11754
11755cat >>confdefs.h <<_ACEOF
11756#define HAVE_LONG_LONG 1
11757_ACEOF
11758
11759# The cast to long int works around a bug in the HP C Compiler
11760# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11761# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11762# This bug is HP SR number 8606223364.
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11764$as_echo_n "checking size of long long... " >&6; }
11765if test "${ac_cv_sizeof_long_long+set}" = set; then :
11766 $as_echo_n "(cached) " >&6
11767else
11768 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11769
11770else
11771 if test "$ac_cv_type_long_long" = yes; then
11772 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11774{ as_fn_set_status 77
11775as_fn_error "cannot compute sizeof (long long)
11776See \`config.log' for more details." "$LINENO" 5; }; }
11777 else
11778 ac_cv_sizeof_long_long=0
11779 fi
11780fi
11781
11782fi
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11784$as_echo "$ac_cv_sizeof_long_long" >&6; }
11785
11786
11787
11788cat >>confdefs.h <<_ACEOF
11789#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11790_ACEOF
11791
11792
11793fi
11794
11795
11796 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
11797if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
11798 ac_have_decl=1
11799else
11800 ac_have_decl=0
11801fi
11802
11803cat >>confdefs.h <<_ACEOF
11804#define HAVE_DECL_BASENAME $ac_have_decl
11805_ACEOF
11806ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11807if test "x$ac_cv_have_decl_ffs" = x""yes; then :
11808 ac_have_decl=1
11809else
11810 ac_have_decl=0
11811fi
11812
11813cat >>confdefs.h <<_ACEOF
11814#define HAVE_DECL_FFS $ac_have_decl
11815_ACEOF
11816ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11817if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
11818 ac_have_decl=1
11819else
11820 ac_have_decl=0
11821fi
11822
11823cat >>confdefs.h <<_ACEOF
11824#define HAVE_DECL_ASPRINTF $ac_have_decl
11825_ACEOF
11826ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11827if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
11828 ac_have_decl=1
11829else
11830 ac_have_decl=0
11831fi
11832
11833cat >>confdefs.h <<_ACEOF
11834#define HAVE_DECL_VASPRINTF $ac_have_decl
11835_ACEOF
11836ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11837if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11838 ac_have_decl=1
11839else
11840 ac_have_decl=0
11841fi
11842
11843cat >>confdefs.h <<_ACEOF
11844#define HAVE_DECL_SNPRINTF $ac_have_decl
11845_ACEOF
11846ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11847if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
11848 ac_have_decl=1
11849else
11850 ac_have_decl=0
11851fi
11852
11853cat >>confdefs.h <<_ACEOF
11854#define HAVE_DECL_VSNPRINTF $ac_have_decl
11855_ACEOF
11856
11857 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11858if test "x$ac_cv_have_decl_strtol" = x""yes; then :
11859 ac_have_decl=1
11860else
11861 ac_have_decl=0
11862fi
11863
11864cat >>confdefs.h <<_ACEOF
11865#define HAVE_DECL_STRTOL $ac_have_decl
11866_ACEOF
11867ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11868if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
11869 ac_have_decl=1
11870else
11871 ac_have_decl=0
11872fi
11873
11874cat >>confdefs.h <<_ACEOF
11875#define HAVE_DECL_STRTOUL $ac_have_decl
11876_ACEOF
11877ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11878if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
11879 ac_have_decl=1
11880else
11881 ac_have_decl=0
11882fi
11883
11884cat >>confdefs.h <<_ACEOF
11885#define HAVE_DECL_STRTOLL $ac_have_decl
11886_ACEOF
11887ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11888if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
11889 ac_have_decl=1
11890else
11891 ac_have_decl=0
11892fi
11893
11894cat >>confdefs.h <<_ACEOF
11895#define HAVE_DECL_STRTOULL $ac_have_decl
11896_ACEOF
11897
11898 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11899if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
11900 ac_have_decl=1
11901else
11902 ac_have_decl=0
11903fi
11904
11905cat >>confdefs.h <<_ACEOF
11906#define HAVE_DECL_STRVERSCMP $ac_have_decl
11907_ACEOF
11908
11909
11910
81ecdfbb
RW
11911ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
11912if test "x$ac_cv_have_decl_free" = x""yes; then :
11913 ac_have_decl=1
bec39cab 11914else
81ecdfbb
RW
11915 ac_have_decl=0
11916fi
11917
11918cat >>confdefs.h <<_ACEOF
11919#define HAVE_DECL_FREE $ac_have_decl
bec39cab 11920_ACEOF
81ecdfbb
RW
11921ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
11922if test "x$ac_cv_have_decl_malloc" = x""yes; then :
11923 ac_have_decl=1
11924else
11925 ac_have_decl=0
11926fi
11927
11928cat >>confdefs.h <<_ACEOF
11929#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 11930_ACEOF
81ecdfbb
RW
11931ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
11932if test "x$ac_cv_have_decl_realloc" = x""yes; then :
11933 ac_have_decl=1
bec39cab 11934else
81ecdfbb
RW
11935 ac_have_decl=0
11936fi
bec39cab 11937
81ecdfbb
RW
11938cat >>confdefs.h <<_ACEOF
11939#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 11940_ACEOF
81ecdfbb
RW
11941ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11942if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
11943 ac_have_decl=1
11944else
11945 ac_have_decl=0
5ee754fc 11946fi
81ecdfbb
RW
11947
11948cat >>confdefs.h <<_ACEOF
11949#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 11950_ACEOF
5ee754fc 11951
5ee754fc 11952
81ecdfbb
RW
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11954$as_echo_n "checking for LC_MESSAGES... " >&6; }
11955if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
11956 $as_echo_n "(cached) " >&6
bec39cab 11957else
81ecdfbb 11958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11959/* end confdefs.h. */
81ecdfbb 11960#include <locale.h>
a9322a30
TT
11961int
11962main ()
11963{
81ecdfbb 11964return LC_MESSAGES
a9322a30
TT
11965 ;
11966 return 0;
11967}
bec39cab 11968_ACEOF
81ecdfbb
RW
11969if ac_fn_c_try_link "$LINENO"; then :
11970 am_cv_val_LC_MESSAGES=yes
bec39cab 11971else
81ecdfbb
RW
11972 am_cv_val_LC_MESSAGES=no
11973fi
11974rm -f core conftest.err conftest.$ac_objext \
11975 conftest$ac_exeext conftest.$ac_ext
11976fi
11977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11978$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11979 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 11980
81ecdfbb
RW
11981$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11982
11983 fi
11984
11985
11986# ----------------------- #
11987# Checks for structures. #
11988# ----------------------- #
11989
11990ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
11991if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
11992
11993cat >>confdefs.h <<_ACEOF
11994#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 11995_ACEOF
7eb368b3 11996
81ecdfbb 11997
7eb368b3 11998fi
81ecdfbb
RW
11999ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12000if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 12001
a9322a30
TT
12002cat >>confdefs.h <<_ACEOF
12003#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12004_ACEOF
12005
a9322a30 12006
7eb368b3
NR
12007fi
12008
7eb368b3 12009
a9322a30
TT
12010# ------------------ #
12011# Checks for types. #
12012# ------------------ #
7eb368b3 12013
81ecdfbb 12014ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12015#include <sys/socket.h>
12016
81ecdfbb
RW
12017"
12018if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 12019
a9322a30
TT
12020cat >>confdefs.h <<_ACEOF
12021#define HAVE_SOCKLEN_T 1
12022_ACEOF
12023
12024
12025fi
12026
12027
12028# ------------------------------------- #
12029# Checks for compiler characteristics. #
12030# ------------------------------------- #
12031
81ecdfbb
RW
12032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12033$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12034if test "${ac_cv_c_const+set}" = set; then :
12035 $as_echo_n "(cached) " >&6
a9322a30 12036else
81ecdfbb 12037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12038/* end confdefs.h. */
a9322a30
TT
12039
12040int
12041main ()
12042{
12043/* FIXME: Include the comments suggested by Paul. */
12044#ifndef __cplusplus
12045 /* Ultrix mips cc rejects this. */
12046 typedef int charset[2];
81ecdfbb 12047 const charset cs;
a9322a30 12048 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12049 char const *const *pcpcc;
12050 char **ppc;
a9322a30
TT
12051 /* NEC SVR4.0.2 mips cc rejects this. */
12052 struct point {int x, y;};
12053 static struct point const zero = {0,0};
12054 /* AIX XL C 1.02.0.0 rejects this.
12055 It does not let you subtract one const X* pointer from another in
12056 an arm of an if-expression whose if-part is not a constant
12057 expression */
12058 const char *g = "string";
81ecdfbb 12059 pcpcc = &g + (g ? g-g : 0);
a9322a30 12060 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12061 ++pcpcc;
12062 ppc = (char**) pcpcc;
12063 pcpcc = (char const *const *) ppc;
a9322a30
TT
12064 { /* SCO 3.2v4 cc rejects this. */
12065 char *t;
12066 char const *s = 0 ? (char *) 0 : (char const *) 0;
12067
12068 *t++ = 0;
81ecdfbb 12069 if (s) return 0;
a9322a30
TT
12070 }
12071 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12072 int x[] = {25, 17};
12073 const int *foo = &x[0];
12074 ++foo;
12075 }
12076 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12077 typedef const int *iptr;
12078 iptr p = 0;
12079 ++p;
12080 }
12081 { /* AIX XL C 1.02.0.0 rejects this saying
12082 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12083 struct s { int j; const int *ap[3]; };
12084 struct s *b; b->j = 5;
12085 }
12086 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12087 const int foo = 10;
81ecdfbb 12088 if (!foo) return 0;
a9322a30 12089 }
81ecdfbb 12090 return !cs[0] && !zero.x;
a9322a30
TT
12091#endif
12092
12093 ;
12094 return 0;
12095}
bec39cab 12096_ACEOF
81ecdfbb 12097if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12098 ac_cv_c_const=yes
5ee754fc 12099else
81ecdfbb 12100 ac_cv_c_const=no
5ee754fc 12101fi
81ecdfbb 12102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12103fi
81ecdfbb
RW
12104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12105$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12106if test $ac_cv_c_const = no; then
bec39cab 12107
81ecdfbb 12108$as_echo "#define const /**/" >>confdefs.h
bec39cab 12109
5ee754fc 12110fi
bec39cab 12111
81ecdfbb
RW
12112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12113$as_echo_n "checking for inline... " >&6; }
12114if test "${ac_cv_c_inline+set}" = set; then :
12115 $as_echo_n "(cached) " >&6
bec39cab 12116else
a9322a30
TT
12117 ac_cv_c_inline=no
12118for ac_kw in inline __inline__ __inline; do
81ecdfbb 12119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12120/* end confdefs.h. */
a9322a30
TT
12121#ifndef __cplusplus
12122typedef int foo_t;
12123static $ac_kw foo_t static_foo () {return 0; }
12124$ac_kw foo_t foo () {return 0; }
12125#endif
12126
bec39cab 12127_ACEOF
81ecdfbb
RW
12128if ac_fn_c_try_compile "$LINENO"; then :
12129 ac_cv_c_inline=$ac_kw
bec39cab 12130fi
81ecdfbb
RW
12131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12132 test "$ac_cv_c_inline" != no && break
a9322a30 12133done
bec39cab 12134
5ee754fc 12135fi
81ecdfbb
RW
12136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12137$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12138
a9322a30
TT
12139case $ac_cv_c_inline in
12140 inline | yes) ;;
12141 *)
12142 case $ac_cv_c_inline in
12143 no) ac_val=;;
12144 *) ac_val=$ac_cv_c_inline;;
12145 esac
12146 cat >>confdefs.h <<_ACEOF
12147#ifndef __cplusplus
12148#define inline $ac_val
12149#endif
12150_ACEOF
bec39cab
AC
12151 ;;
12152esac
bec39cab 12153
81ecdfbb
RW
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12155$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12156if test "${ac_cv_c_bigendian+set}" = set; then :
12157 $as_echo_n "(cached) " >&6
bec39cab 12158else
81ecdfbb
RW
12159 ac_cv_c_bigendian=unknown
12160 # See if we're dealing with a universal compiler.
12161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12162/* end confdefs.h. */
12163#ifndef __APPLE_CC__
12164 not a universal capable compiler
12165 #endif
12166 typedef int dummy;
12167
12168_ACEOF
12169if ac_fn_c_try_compile "$LINENO"; then :
12170
12171 # Check for potential -arch flags. It is not universal unless
12172 # there are at least two -arch flags with different values.
12173 ac_arch=
12174 ac_prev=
12175 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12176 if test -n "$ac_prev"; then
12177 case $ac_word in
12178 i?86 | x86_64 | ppc | ppc64)
12179 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12180 ac_arch=$ac_word
12181 else
12182 ac_cv_c_bigendian=universal
12183 break
12184 fi
12185 ;;
12186 esac
12187 ac_prev=
12188 elif test "x$ac_word" = "x-arch"; then
12189 ac_prev=arch
12190 fi
12191 done
12192fi
12193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12194 if test $ac_cv_c_bigendian = unknown; then
12195 # See if sys/param.h defines the BYTE_ORDER macro.
12196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12197/* end confdefs.h. */
a9322a30 12198#include <sys/types.h>
81ecdfbb 12199 #include <sys/param.h>
a9322a30
TT
12200
12201int
12202main ()
12203{
81ecdfbb
RW
12204#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12205 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12206 && LITTLE_ENDIAN)
12207 bogus endian macros
12208 #endif
a9322a30
TT
12209
12210 ;
12211 return 0;
12212}
bec39cab 12213_ACEOF
81ecdfbb 12214if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12215 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12217/* end confdefs.h. */
a9322a30 12218#include <sys/types.h>
81ecdfbb 12219 #include <sys/param.h>
a9322a30
TT
12220
12221int
12222main ()
12223{
12224#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12225 not big endian
12226 #endif
a9322a30
TT
12227
12228 ;
12229 return 0;
12230}
bec39cab 12231_ACEOF
81ecdfbb 12232if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12233 ac_cv_c_bigendian=yes
5ee754fc 12234else
81ecdfbb 12235 ac_cv_c_bigendian=no
5ee754fc 12236fi
81ecdfbb
RW
12237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12238fi
12239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12240 fi
12241 if test $ac_cv_c_bigendian = unknown; then
12242 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244/* end confdefs.h. */
12245#include <limits.h>
bec39cab 12246
81ecdfbb
RW
12247int
12248main ()
12249{
12250#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12251 bogus endian macros
12252 #endif
12253
12254 ;
12255 return 0;
12256}
7eb368b3 12257_ACEOF
81ecdfbb
RW
12258if ac_fn_c_try_compile "$LINENO"; then :
12259 # It does; now see whether it defined to _BIG_ENDIAN or not.
12260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12261/* end confdefs.h. */
81ecdfbb
RW
12262#include <limits.h>
12263
7eb368b3
NR
12264int
12265main ()
12266{
81ecdfbb
RW
12267#ifndef _BIG_ENDIAN
12268 not big endian
12269 #endif
12270
7eb368b3
NR
12271 ;
12272 return 0;
12273}
12274_ACEOF
81ecdfbb 12275if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12276 ac_cv_c_bigendian=yes
81ecdfbb
RW
12277else
12278 ac_cv_c_bigendian=no
a9322a30 12279fi
81ecdfbb 12280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12281fi
81ecdfbb
RW
12282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12283 fi
12284 if test $ac_cv_c_bigendian = unknown; then
12285 # Compile a test program.
12286 if test "$cross_compiling" = yes; then :
12287 # Try to guess by grepping values from an object file.
12288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289/* end confdefs.h. */
12290short int ascii_mm[] =
12291 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12292 short int ascii_ii[] =
12293 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12294 int use_ascii (int i) {
12295 return ascii_mm[i] + ascii_ii[i];
12296 }
12297 short int ebcdic_ii[] =
12298 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12299 short int ebcdic_mm[] =
12300 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12301 int use_ebcdic (int i) {
12302 return ebcdic_mm[i] + ebcdic_ii[i];
12303 }
12304 extern int foo;
7eb368b3 12305
81ecdfbb
RW
12306int
12307main ()
12308{
12309return use_ascii (foo) == use_ebcdic (foo);
12310 ;
12311 return 0;
12312}
12313_ACEOF
12314if ac_fn_c_try_compile "$LINENO"; then :
12315 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12316 ac_cv_c_bigendian=yes
12317 fi
12318 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12319 if test "$ac_cv_c_bigendian" = unknown; then
12320 ac_cv_c_bigendian=no
12321 else
12322 # finding both strings is unlikely to happen, but who knows?
12323 ac_cv_c_bigendian=unknown
12324 fi
12325 fi
7eb368b3 12326fi
81ecdfbb 12327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12328else
81ecdfbb 12329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12330/* end confdefs.h. */
81ecdfbb 12331$ac_includes_default
d3ea6809
MM
12332int
12333main ()
12334{
81ecdfbb
RW
12335
12336 /* Are we little or big endian? From Harbison&Steele. */
12337 union
12338 {
12339 long int l;
12340 char c[sizeof (long int)];
12341 } u;
12342 u.l = 1;
12343 return u.c[sizeof (long int) - 1] == 1;
12344
12345 ;
12346 return 0;
d3ea6809
MM
12347}
12348_ACEOF
81ecdfbb 12349if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12350 ac_cv_c_bigendian=no
d3ea6809 12351else
81ecdfbb 12352 ac_cv_c_bigendian=yes
d3ea6809 12353fi
81ecdfbb
RW
12354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12355 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12356fi
a9322a30 12357
81ecdfbb
RW
12358 fi
12359fi
12360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12361$as_echo "$ac_cv_c_bigendian" >&6; }
12362 case $ac_cv_c_bigendian in #(
12363 yes)
12364 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12365;; #(
12366 no)
12367 ;; #(
12368 universal)
12369
12370$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12371
12372 ;; #(
12373 *)
12374 as_fn_error "unknown endianness
12375 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12376 esac
d3ea6809
MM
12377
12378
a9322a30
TT
12379# ------------------------------ #
12380# Checks for library functions. #
12381# ------------------------------ #
d3ea6809 12382
a9322a30 12383for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12384do :
12385 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12386ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12387eval as_val=\$$as_ac_Header
12388 if test "x$as_val" = x""yes; then :
bec39cab 12389 cat >>confdefs.h <<_ACEOF
81ecdfbb 12390#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12391_ACEOF
b757528f 12392
b757528f 12393fi
bec39cab 12394
a9322a30 12395done
a3828db0 12396
a9322a30 12397for ac_func in getpagesize
81ecdfbb
RW
12398do :
12399 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12400if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12401 cat >>confdefs.h <<_ACEOF
81ecdfbb 12402#define HAVE_GETPAGESIZE 1
bec39cab 12403_ACEOF
bcb3dc3d 12404
bcb3dc3d
MK
12405fi
12406done
12407
81ecdfbb
RW
12408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12409$as_echo_n "checking for working mmap... " >&6; }
12410if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12411 $as_echo_n "(cached) " >&6
a9322a30 12412else
81ecdfbb 12413 if test "$cross_compiling" = yes; then :
a9322a30 12414 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12415else
81ecdfbb 12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12417/* end confdefs.h. */
a9322a30
TT
12418$ac_includes_default
12419/* malloc might have been renamed as rpl_malloc. */
12420#undef malloc
bec39cab 12421
a9322a30
TT
12422/* Thanks to Mike Haertel and Jim Avera for this test.
12423 Here is a matrix of mmap possibilities:
12424 mmap private not fixed
12425 mmap private fixed at somewhere currently unmapped
12426 mmap private fixed at somewhere already mapped
12427 mmap shared not fixed
12428 mmap shared fixed at somewhere currently unmapped
12429 mmap shared fixed at somewhere already mapped
12430 For private mappings, we should verify that changes cannot be read()
12431 back from the file, nor mmap's back from the file at a different
12432 address. (There have been systems where private was not correctly
12433 implemented like the infamous i386 svr4.0, and systems where the
12434 VM page cache was not coherent with the file system buffer cache
12435 like early versions of FreeBSD and possibly contemporary NetBSD.)
12436 For shared mappings, we should conversely verify that changes get
12437 propagated back to all the places they're supposed to be.
bec39cab 12438
a9322a30
TT
12439 Grep wants private fixed already mapped.
12440 The main things grep needs to know about mmap are:
12441 * does it exist and is it safe to write into the mmap'd area
12442 * how to use it (BSD variants) */
8b9cf735 12443
a9322a30
TT
12444#include <fcntl.h>
12445#include <sys/mman.h>
8b9cf735 12446
81ecdfbb 12447#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12448char *malloc ();
a3828db0
MK
12449#endif
12450
a9322a30 12451/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12452#ifndef HAVE_GETPAGESIZE
a9322a30 12453/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12454# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12455# define HAVE_SYS_PARAM_H 1
12456# endif
12457
12458# ifdef _SC_PAGESIZE
12459# define getpagesize() sysconf(_SC_PAGESIZE)
12460# else /* no _SC_PAGESIZE */
81ecdfbb 12461# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12462# include <sys/param.h>
12463# ifdef EXEC_PAGESIZE
12464# define getpagesize() EXEC_PAGESIZE
12465# else /* no EXEC_PAGESIZE */
12466# ifdef NBPG
12467# define getpagesize() NBPG * CLSIZE
12468# ifndef CLSIZE
12469# define CLSIZE 1
12470# endif /* no CLSIZE */
12471# else /* no NBPG */
12472# ifdef NBPC
12473# define getpagesize() NBPC
12474# else /* no NBPC */
12475# ifdef PAGESIZE
12476# define getpagesize() PAGESIZE
12477# endif /* PAGESIZE */
12478# endif /* no NBPC */
12479# endif /* no NBPG */
12480# endif /* no EXEC_PAGESIZE */
12481# else /* no HAVE_SYS_PARAM_H */
12482# define getpagesize() 8192 /* punt totally */
12483# endif /* no HAVE_SYS_PARAM_H */
12484# endif /* no _SC_PAGESIZE */
12485
12486#endif /* no HAVE_GETPAGESIZE */
12487
bec39cab
AC
12488int
12489main ()
12490{
a9322a30
TT
12491 char *data, *data2, *data3;
12492 int i, pagesize;
12493 int fd;
12494
12495 pagesize = getpagesize ();
12496
12497 /* First, make a file with some known garbage in it. */
12498 data = (char *) malloc (pagesize);
12499 if (!data)
81ecdfbb 12500 return 1;
a9322a30
TT
12501 for (i = 0; i < pagesize; ++i)
12502 *(data + i) = rand ();
12503 umask (0);
12504 fd = creat ("conftest.mmap", 0600);
12505 if (fd < 0)
81ecdfbb 12506 return 1;
a9322a30 12507 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12508 return 1;
a9322a30
TT
12509 close (fd);
12510
12511 /* Next, try to mmap the file at a fixed address which already has
12512 something else allocated at it. If we can, also make sure that
12513 we see the same garbage. */
12514 fd = open ("conftest.mmap", O_RDWR);
12515 if (fd < 0)
81ecdfbb 12516 return 1;
a9322a30
TT
12517 data2 = (char *) malloc (2 * pagesize);
12518 if (!data2)
81ecdfbb
RW
12519 return 1;
12520 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12521 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12522 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12523 return 1;
a9322a30
TT
12524 for (i = 0; i < pagesize; ++i)
12525 if (*(data + i) != *(data2 + i))
81ecdfbb 12526 return 1;
a9322a30
TT
12527
12528 /* Finally, make sure that changes to the mapped area do not
12529 percolate back to the file as seen by read(). (This is a bug on
12530 some variants of i386 svr4.0.) */
12531 for (i = 0; i < pagesize; ++i)
12532 *(data2 + i) = *(data2 + i) + 1;
12533 data3 = (char *) malloc (pagesize);
12534 if (!data3)
81ecdfbb 12535 return 1;
a9322a30 12536 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12537 return 1;
a9322a30
TT
12538 for (i = 0; i < pagesize; ++i)
12539 if (*(data + i) != *(data3 + i))
81ecdfbb 12540 return 1;
a9322a30 12541 close (fd);
81ecdfbb 12542 return 0;
bec39cab
AC
12543}
12544_ACEOF
81ecdfbb 12545if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12546 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12547else
81ecdfbb 12548 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12549fi
81ecdfbb
RW
12550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12551 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12552fi
81ecdfbb 12553
a9322a30 12554fi
81ecdfbb
RW
12555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12556$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12557if test $ac_cv_func_mmap_fixed_mapped = yes; then
12558
81ecdfbb 12559$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12560
086ec9eb 12561fi
a9322a30 12562rm -f conftest.mmap
a3828db0 12563
81ecdfbb
RW
12564ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12565if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12566
a9322a30
TT
12567else
12568
12569cat >>confdefs.h <<_ACEOF
12570#define pid_t int
bec39cab 12571_ACEOF
086ec9eb
MK
12572
12573fi
12574
81ecdfbb
RW
12575for ac_header in vfork.h
12576do :
12577 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12578if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 12579 cat >>confdefs.h <<_ACEOF
81ecdfbb 12580#define HAVE_VFORK_H 1
bec39cab 12581_ACEOF
c906108c
SS
12582
12583fi
a9322a30 12584
a3828db0 12585done
c906108c 12586
a9322a30 12587for ac_func in fork vfork
81ecdfbb
RW
12588do :
12589 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12590ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12591eval as_val=\$$as_ac_var
12592 if test "x$as_val" = x""yes; then :
a3828db0 12593 cat >>confdefs.h <<_ACEOF
81ecdfbb 12594#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 12595_ACEOF
b83266a0 12596
97bf5e38 12597fi
a3828db0 12598done
b83266a0 12599
a9322a30 12600if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12602$as_echo_n "checking for working fork... " >&6; }
12603if test "${ac_cv_func_fork_works+set}" = set; then :
12604 $as_echo_n "(cached) " >&6
a9322a30 12605else
81ecdfbb 12606 if test "$cross_compiling" = yes; then :
a9322a30
TT
12607 ac_cv_func_fork_works=cross
12608else
81ecdfbb
RW
12609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12610/* end confdefs.h. */
12611$ac_includes_default
12612int
12613main ()
12614{
12615
12616 /* By Ruediger Kuhlmann. */
12617 return fork () < 0;
12618
12619 ;
12620 return 0;
12621}
a9322a30 12622_ACEOF
81ecdfbb 12623if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12624 ac_cv_func_fork_works=yes
12625else
81ecdfbb 12626 ac_cv_func_fork_works=no
a9322a30 12627fi
81ecdfbb
RW
12628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12629 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12630fi
81ecdfbb 12631
a9322a30 12632fi
81ecdfbb
RW
12633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12634$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
12635
12636else
12637 ac_cv_func_fork_works=$ac_cv_func_fork
12638fi
12639if test "x$ac_cv_func_fork_works" = xcross; then
12640 case $host in
12641 *-*-amigaos* | *-*-msdosdjgpp*)
12642 # Override, as these systems have only a dummy fork() stub
12643 ac_cv_func_fork_works=no
12644 ;;
12645 *)
12646 ac_cv_func_fork_works=yes
12647 ;;
12648 esac
81ecdfbb
RW
12649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12650$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12651fi
12652ac_cv_func_vfork_works=$ac_cv_func_vfork
12653if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12655$as_echo_n "checking for working vfork... " >&6; }
12656if test "${ac_cv_func_vfork_works+set}" = set; then :
12657 $as_echo_n "(cached) " >&6
a9322a30 12658else
81ecdfbb 12659 if test "$cross_compiling" = yes; then :
a9322a30
TT
12660 ac_cv_func_vfork_works=cross
12661else
81ecdfbb 12662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
12663/* end confdefs.h. */
12664/* Thanks to Paul Eggert for this test. */
81ecdfbb 12665$ac_includes_default
a9322a30 12666#include <sys/wait.h>
81ecdfbb 12667#ifdef HAVE_VFORK_H
a9322a30
TT
12668# include <vfork.h>
12669#endif
12670/* On some sparc systems, changes by the child to local and incoming
12671 argument registers are propagated back to the parent. The compiler
12672 is told about this with #include <vfork.h>, but some compilers
12673 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12674 static variable whose address is put into a register that is
12675 clobbered by the vfork. */
12676static void
12677#ifdef __cplusplus
12678sparc_address_test (int arg)
12679# else
12680sparc_address_test (arg) int arg;
12681#endif
12682{
12683 static pid_t child;
12684 if (!child) {
12685 child = vfork ();
12686 if (child < 0) {
12687 perror ("vfork");
12688 _exit(2);
12689 }
12690 if (!child) {
12691 arg = getpid();
12692 write(-1, "", 0);
12693 _exit (arg);
12694 }
12695 }
12696}
12697
12698int
12699main ()
12700{
12701 pid_t parent = getpid ();
12702 pid_t child;
12703
12704 sparc_address_test (0);
12705
12706 child = vfork ();
12707
12708 if (child == 0) {
12709 /* Here is another test for sparc vfork register problems. This
12710 test uses lots of local variables, at least as many local
12711 variables as main has allocated so far including compiler
12712 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12713 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12714 reuse the register of parent for one of the local variables,
12715 since it will think that parent can't possibly be used any more
12716 in this routine. Assigning to the local variable will thus
12717 munge parent in the parent process. */
12718 pid_t
12719 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12720 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12721 /* Convince the compiler that p..p7 are live; otherwise, it might
12722 use the same hardware register for all 8 local variables. */
12723 if (p != p1 || p != p2 || p != p3 || p != p4
12724 || p != p5 || p != p6 || p != p7)
12725 _exit(1);
12726
12727 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12728 from child file descriptors. If the child closes a descriptor
12729 before it execs or exits, this munges the parent's descriptor
12730 as well. Test for this by closing stdout in the child. */
12731 _exit(close(fileno(stdout)) != 0);
12732 } else {
12733 int status;
12734 struct stat st;
12735
12736 while (wait(&status) != child)
12737 ;
81ecdfbb 12738 return (
a9322a30
TT
12739 /* Was there some problem with vforking? */
12740 child < 0
12741
12742 /* Did the child fail? (This shouldn't happen.) */
12743 || status
12744
12745 /* Did the vfork/compiler bug occur? */
12746 || parent != getpid()
12747
12748 /* Did the file descriptor bug occur? */
12749 || fstat(fileno(stdout), &st) != 0
12750 );
12751 }
12752}
12753_ACEOF
81ecdfbb 12754if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
12755 ac_cv_func_vfork_works=yes
12756else
81ecdfbb 12757 ac_cv_func_vfork_works=no
a9322a30 12758fi
81ecdfbb
RW
12759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12760 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12761fi
81ecdfbb 12762
a9322a30 12763fi
81ecdfbb
RW
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12765$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
12766
12767fi;
12768if test "x$ac_cv_func_fork_works" = xcross; then
12769 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
12770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12771$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
12772fi
12773
12774if test "x$ac_cv_func_vfork_works" = xyes; then
12775
81ecdfbb 12776$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
12777
12778else
12779
81ecdfbb 12780$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
12781
12782fi
12783if test "x$ac_cv_func_fork_works" = xyes; then
12784
81ecdfbb 12785$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
12786
12787fi
12788
cdf43629 12789for ac_func in getauxval getrusage getuid getgid \
bdca27a2 12790 pipe poll pread pread64 pwrite resize_term \
7313baad 12791 sbrk setpgid setpgrp setsid \
9467110b 12792 sigaction sigprocmask sigsetmask socketpair \
110ed339 12793 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 12794 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 12795 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
12796do :
12797 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12798ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12799eval as_val=\$$as_ac_var
12800 if test "x$as_val" = x""yes; then :
6c7a06a3 12801 cat >>confdefs.h <<_ACEOF
81ecdfbb 12802#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
12803_ACEOF
12804
12805fi
12806done
12807
12808
81ecdfbb
RW
12809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12810$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12811if test "${am_cv_langinfo_codeset+set}" = set; then :
12812 $as_echo_n "(cached) " >&6
6c7a06a3 12813else
81ecdfbb 12814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
12815/* end confdefs.h. */
12816#include <langinfo.h>
12817int
12818main ()
12819{
12820char* cs = nl_langinfo(CODESET);
bec39cab
AC
12821 ;
12822 return 0;
12823}
12824_ACEOF
81ecdfbb 12825if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 12826 am_cv_langinfo_codeset=yes
a4db0f07 12827else
81ecdfbb 12828 am_cv_langinfo_codeset=no
a4db0f07 12829fi
81ecdfbb
RW
12830rm -f core conftest.err conftest.$ac_objext \
12831 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 12832
a4db0f07 12833fi
81ecdfbb
RW
12834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12835$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
12836 if test $am_cv_langinfo_codeset = yes; then
12837
81ecdfbb 12838$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 12839
6c7a06a3 12840 fi
c906108c 12841
06825bd1 12842
3266f10b
TT
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12844$as_echo_n "checking for ANSI C header files... " >&6; }
12845if test "${ac_cv_header_stdc+set}" = set; then :
12846 $as_echo_n "(cached) " >&6
12847else
12848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12849/* end confdefs.h. */
12850#include <stdlib.h>
12851#include <stdarg.h>
12852#include <string.h>
12853#include <float.h>
12854
12855int
12856main ()
12857{
12858
12859 ;
12860 return 0;
12861}
12862_ACEOF
12863if ac_fn_c_try_compile "$LINENO"; then :
12864 ac_cv_header_stdc=yes
12865else
12866 ac_cv_header_stdc=no
12867fi
12868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12869
12870if test $ac_cv_header_stdc = yes; then
12871 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12873/* end confdefs.h. */
12874#include <string.h>
12875
12876_ACEOF
12877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12878 $EGREP "memchr" >/dev/null 2>&1; then :
12879
12880else
12881 ac_cv_header_stdc=no
12882fi
12883rm -f conftest*
12884
12885fi
12886
12887if test $ac_cv_header_stdc = yes; then
12888 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12890/* end confdefs.h. */
12891#include <stdlib.h>
12892
12893_ACEOF
12894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12895 $EGREP "free" >/dev/null 2>&1; then :
12896
12897else
12898 ac_cv_header_stdc=no
12899fi
12900rm -f conftest*
12901
12902fi
12903
12904if test $ac_cv_header_stdc = yes; then
12905 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12906 if test "$cross_compiling" = yes; then :
12907 :
12908else
12909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12910/* end confdefs.h. */
12911#include <ctype.h>
12912#include <stdlib.h>
12913#if ((' ' & 0x0FF) == 0x020)
12914# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12915# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12916#else
12917# define ISLOWER(c) \
12918 (('a' <= (c) && (c) <= 'i') \
12919 || ('j' <= (c) && (c) <= 'r') \
12920 || ('s' <= (c) && (c) <= 'z'))
12921# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12922#endif
12923
12924#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12925int
12926main ()
12927{
12928 int i;
12929 for (i = 0; i < 256; i++)
12930 if (XOR (islower (i), ISLOWER (i))
12931 || toupper (i) != TOUPPER (i))
12932 return 2;
12933 return 0;
12934}
12935_ACEOF
12936if ac_fn_c_try_run "$LINENO"; then :
12937
12938else
12939 ac_cv_header_stdc=no
12940fi
12941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12942 conftest.$ac_objext conftest.beam conftest.$ac_ext
12943fi
12944
12945fi
12946fi
12947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12948$as_echo "$ac_cv_header_stdc" >&6; }
12949if test $ac_cv_header_stdc = yes; then
12950
12951$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12952
3266f10b
TT
12953fi
12954
12955 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12956# for constant arguments. Useless!
12957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12958$as_echo_n "checking for working alloca.h... " >&6; }
12959if test "${ac_cv_working_alloca_h+set}" = set; then :
12960 $as_echo_n "(cached) " >&6
12961else
12962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12963/* end confdefs.h. */
12964#include <alloca.h>
12965int
12966main ()
12967{
12968char *p = (char *) alloca (2 * sizeof (int));
12969 if (p) return 0;
12970 ;
12971 return 0;
12972}
12973_ACEOF
12974if ac_fn_c_try_link "$LINENO"; then :
12975 ac_cv_working_alloca_h=yes
12976else
12977 ac_cv_working_alloca_h=no
12978fi
12979rm -f core conftest.err conftest.$ac_objext \
12980 conftest$ac_exeext conftest.$ac_ext
12981fi
12982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12983$as_echo "$ac_cv_working_alloca_h" >&6; }
12984if test $ac_cv_working_alloca_h = yes; then
12985
12986$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12987
12988fi
12989
12990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12991$as_echo_n "checking for alloca... " >&6; }
12992if test "${ac_cv_func_alloca_works+set}" = set; then :
12993 $as_echo_n "(cached) " >&6
12994else
12995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12996/* end confdefs.h. */
12997#ifdef __GNUC__
12998# define alloca __builtin_alloca
12999#else
13000# ifdef _MSC_VER
13001# include <malloc.h>
13002# define alloca _alloca
13003# else
13004# ifdef HAVE_ALLOCA_H
13005# include <alloca.h>
13006# else
13007# ifdef _AIX
13008 #pragma alloca
13009# else
13010# ifndef alloca /* predefined by HP cc +Olibcalls */
13011char *alloca ();
13012# endif
13013# endif
13014# endif
13015# endif
13016#endif
13017
13018int
13019main ()
13020{
13021char *p = (char *) alloca (1);
13022 if (p) return 0;
13023 ;
13024 return 0;
13025}
13026_ACEOF
13027if ac_fn_c_try_link "$LINENO"; then :
13028 ac_cv_func_alloca_works=yes
13029else
13030 ac_cv_func_alloca_works=no
13031fi
13032rm -f core conftest.err conftest.$ac_objext \
13033 conftest$ac_exeext conftest.$ac_ext
13034fi
13035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13036$as_echo "$ac_cv_func_alloca_works" >&6; }
13037
13038if test $ac_cv_func_alloca_works = yes; then
13039
13040$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13041
13042else
13043 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13044# that cause trouble. Some versions do not even contain alloca or
13045# contain a buggy version. If you still want to use their alloca,
13046# use ar to extract alloca.o from them instead of compiling alloca.c.
13047
13048ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13049
13050$as_echo "#define C_ALLOCA 1" >>confdefs.h
13051
13052
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13054$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13055if test "${ac_cv_os_cray+set}" = set; then :
13056 $as_echo_n "(cached) " >&6
13057else
13058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13059/* end confdefs.h. */
13060#if defined CRAY && ! defined CRAY2
13061webecray
13062#else
13063wenotbecray
13064#endif
13065
13066_ACEOF
13067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13068 $EGREP "webecray" >/dev/null 2>&1; then :
13069 ac_cv_os_cray=yes
13070else
13071 ac_cv_os_cray=no
13072fi
13073rm -f conftest*
13074
13075fi
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13077$as_echo "$ac_cv_os_cray" >&6; }
13078if test $ac_cv_os_cray = yes; then
13079 for ac_func in _getb67 GETB67 getb67; do
13080 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13081ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13082eval as_val=\$$as_ac_var
13083 if test "x$as_val" = x""yes; then :
13084
13085cat >>confdefs.h <<_ACEOF
13086#define CRAY_STACKSEG_END $ac_func
13087_ACEOF
13088
13089 break
13090fi
13091
13092 done
13093fi
13094
13095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13096$as_echo_n "checking stack direction for C alloca... " >&6; }
13097if test "${ac_cv_c_stack_direction+set}" = set; then :
13098 $as_echo_n "(cached) " >&6
13099else
13100 if test "$cross_compiling" = yes; then :
13101 ac_cv_c_stack_direction=0
13102else
13103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13104/* end confdefs.h. */
13105$ac_includes_default
13106int
13107find_stack_direction ()
13108{
13109 static char *addr = 0;
13110 auto char dummy;
13111 if (addr == 0)
13112 {
13113 addr = &dummy;
13114 return find_stack_direction ();
13115 }
13116 else
13117 return (&dummy > addr) ? 1 : -1;
13118}
13119
13120int
13121main ()
13122{
13123 return find_stack_direction () < 0;
13124}
13125_ACEOF
13126if ac_fn_c_try_run "$LINENO"; then :
13127 ac_cv_c_stack_direction=1
13128else
13129 ac_cv_c_stack_direction=-1
13130fi
13131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13132 conftest.$ac_objext conftest.beam conftest.$ac_ext
13133fi
13134
13135fi
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13137$as_echo "$ac_cv_c_stack_direction" >&6; }
13138cat >>confdefs.h <<_ACEOF
13139#define STACK_DIRECTION $ac_cv_c_stack_direction
13140_ACEOF
13141
13142
13143fi
13144
13145
13146
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13148$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13149if test "${am_cv_langinfo_codeset+set}" = set; then :
13150 $as_echo_n "(cached) " >&6
13151else
13152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13153/* end confdefs.h. */
13154#include <langinfo.h>
13155int
13156main ()
13157{
13158char* cs = nl_langinfo(CODESET);
13159 ;
13160 return 0;
13161}
13162_ACEOF
13163if ac_fn_c_try_link "$LINENO"; then :
13164 am_cv_langinfo_codeset=yes
13165else
13166 am_cv_langinfo_codeset=no
13167fi
13168rm -f core conftest.err conftest.$ac_objext \
13169 conftest$ac_exeext conftest.$ac_ext
13170
13171fi
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13173$as_echo "$am_cv_langinfo_codeset" >&6; }
13174 if test $am_cv_langinfo_codeset = yes; then
13175
13176$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13177
13178 fi
13179
13180
a3d08894 13181 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h
3266f10b
TT
13182do :
13183 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13184ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13185eval as_val=\$$as_ac_Header
13186 if test "x$as_val" = x""yes; then :
13187 cat >>confdefs.h <<_ACEOF
13188#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13189_ACEOF
13190
13191fi
13192
13193done
13194
13195
f348d89a 13196 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13197do :
13198 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13199ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13200eval as_val=\$$as_ac_var
13201 if test "x$as_val" = x""yes; then :
13202 cat >>confdefs.h <<_ACEOF
13203#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13204_ACEOF
13205
13206fi
13207done
13208
13209
13210 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13211if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13212 ac_have_decl=1
13213else
13214 ac_have_decl=0
13215fi
13216
13217cat >>confdefs.h <<_ACEOF
13218#define HAVE_DECL_STRERROR $ac_have_decl
13219_ACEOF
13220ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13221if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13222 ac_have_decl=1
13223else
13224 ac_have_decl=0
13225fi
13226
13227cat >>confdefs.h <<_ACEOF
13228#define HAVE_DECL_STRSTR $ac_have_decl
13229_ACEOF
13230
13231
e9bcb658
GB
13232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13233$as_echo_n "checking for sigsetjmp... " >&6; }
13234if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13235 $as_echo_n "(cached) " >&6
13236else
13237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13238/* end confdefs.h. */
13239
13240#include <setjmp.h>
13241
13242int
13243main ()
13244{
13245sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13246 ;
13247 return 0;
13248}
13249_ACEOF
13250if ac_fn_c_try_compile "$LINENO"; then :
13251 gdb_cv_func_sigsetjmp=yes
13252else
13253 gdb_cv_func_sigsetjmp=no
13254fi
13255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13256fi
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13258$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13259if test $gdb_cv_func_sigsetjmp = yes; then
13260
13261$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13262
13263fi
13264
3266f10b 13265
54019719
PA
13266# Check the return and argument types of ptrace.
13267
13268
54019719
PA
13269for ac_header in sys/ptrace.h ptrace.h
13270do :
13271 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13272ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13273eval as_val=\$$as_ac_Header
13274 if test "x$as_val" = x""yes; then :
13275 cat >>confdefs.h <<_ACEOF
13276#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13277_ACEOF
13278
13279fi
13280
13281done
13282
13283
a3828db0 13284gdb_ptrace_headers='
4ff70b84 13285#include <sys/types.h>
a3828db0
MK
13286#if HAVE_SYS_PTRACE_H
13287# include <sys/ptrace.h>
13288#endif
13289#if HAVE_UNISTD_H
13290# include <unistd.h>
13291#endif
13292'
13293# There is no point in checking if we don't have a prototype.
9b30624b 13294ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
13295"
13296if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13297 ac_have_decl=1
06825bd1 13298else
81ecdfbb 13299 ac_have_decl=0
06825bd1 13300fi
06825bd1 13301
a3828db0 13302cat >>confdefs.h <<_ACEOF
81ecdfbb 13303#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13304_ACEOF
81ecdfbb 13305if test $ac_have_decl = 1; then :
bec39cab 13306
a3828db0 13307else
a3828db0
MK
13308
13309 : ${gdb_cv_func_ptrace_ret='int'}
13310 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13311
06825bd1
MK
13312fi
13313
064ef605
DJ
13314# Check return type. Varargs (used on GNU/Linux) conflict with the
13315# empty argument list, so check for that explicitly.
81ecdfbb
RW
13316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13317$as_echo_n "checking return type of ptrace... " >&6; }
13318if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13319 $as_echo_n "(cached) " >&6
bec39cab 13320else
81ecdfbb 13321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13322/* end confdefs.h. */
a3828db0 13323$gdb_ptrace_headers
bec39cab
AC
13324int
13325main ()
13326{
064ef605
DJ
13327extern long ptrace (enum __ptrace_request, ...);
13328 ;
13329 return 0;
13330}
13331_ACEOF
9b30624b 13332if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13333 gdb_cv_func_ptrace_ret='long'
13334else
81ecdfbb 13335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13336/* end confdefs.h. */
13337$gdb_ptrace_headers
13338int
13339main ()
13340{
a3828db0 13341extern int ptrace ();
bec39cab
AC
13342 ;
13343 return 0;
13344}
13345_ACEOF
9b30624b 13346if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13347 gdb_cv_func_ptrace_ret='int'
70f9f479 13348else
81ecdfbb 13349 gdb_cv_func_ptrace_ret='long'
70f9f479 13350fi
81ecdfbb 13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13352fi
81ecdfbb 13353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13354fi
81ecdfbb
RW
13355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13356$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13357
a3828db0
MK
13358cat >>confdefs.h <<_ACEOF
13359#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13360_ACEOF
70f9f479 13361
a3828db0 13362# Check argument types.
81ecdfbb
RW
13363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13364$as_echo_n "checking types of arguments for ptrace... " >&6; }
13365if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13366 $as_echo_n "(cached) " >&6
bec39cab 13367else
a3828db0 13368
81ecdfbb 13369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13370/* end confdefs.h. */
13371$gdb_ptrace_headers
13372int
13373main ()
13374{
13375extern long ptrace (enum __ptrace_request, ...);
13376 ;
13377 return 0;
13378}
13379_ACEOF
9b30624b 13380if ac_fn_c_try_compile "$LINENO"; then :
54019719 13381 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13382else
064ef605 13383
a3828db0
MK
13384for gdb_arg1 in 'int' 'long'; do
13385 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13386 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13387 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13389/* end confdefs.h. */
a3828db0 13390$gdb_ptrace_headers
bec39cab
AC
13391int
13392main ()
13393{
a3828db0
MK
13394
13395extern $gdb_cv_func_ptrace_ret
13396 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13397
bec39cab
AC
13398 ;
13399 return 0;
13400}
13401_ACEOF
9b30624b 13402if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13403 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13404 break 4;
5c7f2947 13405fi
81ecdfbb 13406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13407 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13409/* end confdefs.h. */
a3828db0 13410$gdb_ptrace_headers
bec39cab
AC
13411int
13412main ()
13413{
a3828db0
MK
13414
13415extern $gdb_cv_func_ptrace_ret
13416 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13417
bec39cab
AC
13418 ;
13419 return 0;
13420}
13421_ACEOF
9b30624b 13422if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13423
13424gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13425 break 5;
78434e59 13426fi
81ecdfbb 13427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13428 done
13429 done
13430 done
13431 done
13432done
13433# Provide a safe default value.
13434: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13435
064ef605 13436fi
81ecdfbb 13437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13438fi
81ecdfbb
RW
13439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13440$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13441ac_save_IFS=$IFS; IFS=','
13442set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13443IFS=$ac_save_IFS
13444shift
bec39cab 13445
54019719
PA
13446cat >>confdefs.h <<_ACEOF
13447#define PTRACE_TYPE_ARG1 $1
13448_ACEOF
13449
13450
a3828db0
MK
13451cat >>confdefs.h <<_ACEOF
13452#define PTRACE_TYPE_ARG3 $3
13453_ACEOF
13454
96d7229d
LM
13455
13456cat >>confdefs.h <<_ACEOF
13457#define PTRACE_TYPE_ARG4 $4
13458_ACEOF
13459
a3828db0
MK
13460if test -n "$5"; then
13461
13462cat >>confdefs.h <<_ACEOF
13463#define PTRACE_TYPE_ARG5 $5
bec39cab 13464_ACEOF
78434e59
MK
13465
13466fi
13467
54019719 13468
a3828db0 13469if test "$cross_compiling" = no; then
81ecdfbb
RW
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13471$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13472if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13473 $as_echo_n "(cached) " >&6
a3828db0 13474else
81ecdfbb
RW
13475 if test "$cross_compiling" = yes; then :
13476 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13477else
81ecdfbb 13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13479/* end confdefs.h. */
81ecdfbb 13480$ac_includes_default
bec39cab
AC
13481int
13482main ()
13483{
a3828db0
MK
13484/* If this system has a BSD-style setpgrp which takes arguments,
13485 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13486 exit successfully. */
81ecdfbb 13487 return setpgrp (1,1) != -1;
bec39cab
AC
13488 ;
13489 return 0;
13490}
13491_ACEOF
81ecdfbb 13492if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13493 ac_cv_func_setpgrp_void=no
c906108c 13494else
81ecdfbb 13495 ac_cv_func_setpgrp_void=yes
c906108c 13496fi
81ecdfbb
RW
13497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13498 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13499fi
81ecdfbb 13500
a3828db0 13501fi
81ecdfbb
RW
13502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13503$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13504if test $ac_cv_func_setpgrp_void = yes; then
13505
81ecdfbb 13506$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13507
13508fi
a3828db0
MK
13509
13510else
81ecdfbb
RW
13511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13512$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13513if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13514 $as_echo_n "(cached) " >&6
97bf5e38 13515else
81ecdfbb 13516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13517/* end confdefs.h. */
a3828db0
MK
13518
13519#include <unistd.h>
13520
bec39cab
AC
13521int
13522main ()
13523{
a3828db0
MK
13524
13525 if (setpgrp(1,1) == -1)
13526 exit (0);
13527 else
13528 exit (1);
13529
bec39cab
AC
13530 ;
13531 return 0;
13532}
13533_ACEOF
81ecdfbb 13534if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13535 ac_cv_func_setpgrp_void=no
c906108c 13536else
81ecdfbb 13537 ac_cv_func_setpgrp_void=yes
c906108c 13538fi
81ecdfbb 13539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13540fi
81ecdfbb
RW
13541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13542$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13543if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13544 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13545
a3828db0 13546fi
c906108c
SS
13547fi
13548
db1ff28b
JK
13549# Assume we'll default to using the included libiberty regex.
13550gdb_use_included_regex=yes
13551
13552# However, if the system regex is GNU regex, then default to *not*
13553# using the included regex.
13554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13555$as_echo_n "checking for GNU regex... " >&6; }
13556if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13557 $as_echo_n "(cached) " >&6
13558else
13559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13560/* end confdefs.h. */
13561#include <gnu-versions.h>
13562int
13563main ()
13564{
13565#define REGEX_INTERFACE_VERSION 1
13566#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13567# error "Version mismatch"
13568#endif
13569 ;
13570 return 0;
13571}
13572_ACEOF
13573if ac_fn_c_try_compile "$LINENO"; then :
13574 gdb_cv_have_gnu_regex=yes
13575else
13576 gdb_cv_have_gnu_regex=no
13577fi
13578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13579fi
13580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
13581$as_echo "$gdb_cv_have_gnu_regex" >&6; }
13582if test $gdb_cv_have_gnu_regex = yes; then
13583 gdb_use_included_regex=no
13584fi
13585
13586
13587# Check whether --with-included-regex was given.
13588if test "${with_included_regex+set}" = set; then :
13589 withval=$with_included_regex; gdb_with_regex=$withval
13590else
13591 gdb_with_regex=$gdb_use_included_regex
13592fi
13593
13594if test "$gdb_with_regex" = yes; then
13595
13596$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
13597
13598fi
13599
81ecdfbb
RW
13600# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
13601ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
13602#include <sys/proc.h>
13603
13604"
13605if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 13606
5c45e068 13607cat >>confdefs.h <<_ACEOF
a3828db0 13608#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 13609_ACEOF
c906108c 13610
5c45e068 13611
97bf5e38 13612fi
c906108c 13613
5c45e068 13614
a3828db0 13615# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
13617$as_echo_n "checking for struct lwp... " >&6; }
13618if test "${gdb_cv_struct_lwp+set}" = set; then :
13619 $as_echo_n "(cached) " >&6
bec39cab 13620else
81ecdfbb 13621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13622/* end confdefs.h. */
a3828db0
MK
13623#include <sys/param.h>
13624#include <sys/lwp.h>
bec39cab
AC
13625int
13626main ()
13627{
a3828db0 13628struct lwp l;
bec39cab
AC
13629 ;
13630 return 0;
13631}
13632_ACEOF
81ecdfbb 13633if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13634 gdb_cv_struct_lwp=yes
c906108c 13635else
81ecdfbb 13636 gdb_cv_struct_lwp=no
c906108c 13637fi
81ecdfbb 13638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13639fi
81ecdfbb
RW
13640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
13641$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 13642if test $gdb_cv_struct_lwp = yes; then
c906108c 13643
81ecdfbb 13644$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 13645
97bf5e38 13646fi
c906108c 13647
a3828db0 13648# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
13649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
13650$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
13651if test "${gdb_cv_struct_reg+set}" = set; then :
13652 $as_echo_n "(cached) " >&6
bec39cab 13653else
81ecdfbb 13654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13655/* end confdefs.h. */
a3828db0
MK
13656#include <sys/types.h>
13657#include <machine/reg.h>
bec39cab
AC
13658int
13659main ()
13660{
a3828db0 13661struct reg r;
bec39cab
AC
13662 ;
13663 return 0;
13664}
13665_ACEOF
81ecdfbb 13666if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13667 gdb_cv_struct_reg=yes
27ca5dad 13668else
81ecdfbb 13669 gdb_cv_struct_reg=no
27ca5dad 13670fi
81ecdfbb 13671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 13672fi
81ecdfbb
RW
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
13674$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 13675if test $gdb_cv_struct_reg = yes; then
bec39cab 13676
81ecdfbb 13677$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
13678
13679fi
97bf5e38 13680
a3828db0
MK
13681# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
13682# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
13683ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
13684#include <machine/reg.h>
81ecdfbb
RW
13685"
13686if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
13687
13688cat >>confdefs.h <<_ACEOF
a3828db0 13689#define HAVE_STRUCT_REG_R_FS 1
bec39cab 13690_ACEOF
3862412b 13691
5c45e068 13692
97bf5e38 13693fi
a6e69c1f
JB
13694ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
13695#include <machine/reg.h>
81ecdfbb
RW
13696"
13697if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
13698
13699cat >>confdefs.h <<_ACEOF
a3828db0 13700#define HAVE_STRUCT_REG_R_GS 1
bec39cab 13701_ACEOF
3862412b 13702
5c45e068 13703
97bf5e38 13704fi
3862412b 13705
5c45e068 13706
6fea9e18
L
13707# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
13708# Older amd64 Linux's don't have the fs_base and gs_base members of
13709# `struct user_regs_struct'.
13710ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
13711"
13712if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
13713
13714cat >>confdefs.h <<_ACEOF
13715#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
13716_ACEOF
13717
13718
13719fi
13720ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
13721"
13722if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
13723
13724cat >>confdefs.h <<_ACEOF
13725#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
13726_ACEOF
13727
13728
13729fi
13730
13731
a3828db0 13732# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
13733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
13734$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
13735if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
13736 $as_echo_n "(cached) " >&6
451928c5 13737else
81ecdfbb 13738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13739/* end confdefs.h. */
a3828db0 13740#include <sys/ptrace.h>
bec39cab
AC
13741int
13742main ()
13743{
a3828db0 13744PTRACE_GETREGS;
bec39cab
AC
13745 ;
13746 return 0;
13747}
13748_ACEOF
81ecdfbb 13749if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13750 gdb_cv_have_ptrace_getregs=yes
451928c5 13751else
81ecdfbb 13752 gdb_cv_have_ptrace_getregs=no
451928c5 13753fi
81ecdfbb 13754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13755fi
13756
81ecdfbb
RW
13757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
13758$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 13759if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 13760
81ecdfbb 13761$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 13762
97bf5e38 13763fi
451928c5 13764
a3828db0 13765# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
13766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
13767$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
13768if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
13769 $as_echo_n "(cached) " >&6
451928c5 13770else
81ecdfbb 13771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13772/* end confdefs.h. */
a3828db0 13773#include <sys/ptrace.h>
bec39cab
AC
13774int
13775main ()
13776{
a3828db0 13777PTRACE_GETFPXREGS;
bec39cab
AC
13778 ;
13779 return 0;
13780}
13781_ACEOF
81ecdfbb 13782if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13783 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 13784else
81ecdfbb 13785 gdb_cv_have_ptrace_getfpxregs=no
451928c5 13786fi
81ecdfbb 13787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
13788fi
13789
81ecdfbb
RW
13790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
13791$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 13792if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 13793
81ecdfbb 13794$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 13795
97bf5e38 13796fi
451928c5 13797
a3828db0 13798# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
13799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
13800$as_echo_n "checking for PT_GETDBREGS... " >&6; }
13801if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
13802 $as_echo_n "(cached) " >&6
3862412b 13803else
81ecdfbb 13804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13805/* end confdefs.h. */
a3828db0
MK
13806#include <sys/types.h>
13807#include <sys/ptrace.h>
bec39cab
AC
13808int
13809main ()
13810{
a3828db0 13811PT_GETDBREGS;
bec39cab
AC
13812 ;
13813 return 0;
13814}
13815_ACEOF
81ecdfbb 13816if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13817 gdb_cv_have_pt_getdbregs=yes
3862412b 13818else
81ecdfbb 13819 gdb_cv_have_pt_getdbregs=no
3862412b 13820fi
81ecdfbb 13821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13822fi
13823
81ecdfbb
RW
13824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
13825$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 13826if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 13827
81ecdfbb 13828$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 13829
97bf5e38 13830fi
3862412b 13831
a3828db0 13832# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
13833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
13834$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
13835if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
13836 $as_echo_n "(cached) " >&6
3862412b 13837else
81ecdfbb 13838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13839/* end confdefs.h. */
a3828db0
MK
13840#include <sys/types.h>
13841#include <sys/ptrace.h>
bec39cab
AC
13842int
13843main ()
13844{
a3828db0 13845PT_GETXMMREGS;
bec39cab
AC
13846 ;
13847 return 0;
13848}
13849_ACEOF
81ecdfbb 13850if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13851 gdb_cv_have_pt_getxmmregs=yes
3862412b 13852else
81ecdfbb 13853 gdb_cv_have_pt_getxmmregs=no
3862412b 13854fi
81ecdfbb 13855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
13856fi
13857
81ecdfbb
RW
13858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
13859$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 13860if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 13861
81ecdfbb 13862$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 13863
97bf5e38 13864fi
3862412b 13865
6e9567fe
JB
13866# See if <sys/ptrace.h> supports LWP names on FreeBSD
13867# Older FreeBSD versions don't have the pl_tdname member of
13868# `struct ptrace_lwpinfo'.
13869ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
13870"
13871if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
13872
13873cat >>confdefs.h <<_ACEOF
13874#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
13875_ACEOF
13876
13877
13878fi
13879
13880
e6cdd38e
JB
13881# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
13882# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
13883# FreeBSD 10.3.
13884ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
13885"
13886if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
13887
13888cat >>confdefs.h <<_ACEOF
13889#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
13890_ACEOF
13891
13892
13893fi
13894
6e9567fe 13895
05b4bd79 13896# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
13897
13898if test "${target}" = "${host}"; then
13899 case "${host}" in
7b00db47 13900 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 13901
81ecdfbb 13902$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
13903
13904 ;;
c162e8c9 13905 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 13906
81ecdfbb 13907$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f 13908
97bf5e38
MK
13909 ;;
13910 esac
13911fi
13912
13913if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
13914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
13915$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
13916 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
13917 $as_echo_n "(cached) " >&6
596c9d4b 13918else
81ecdfbb 13919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13920/* end confdefs.h. */
596c9d4b
KB
13921
13922#define _SYSCALL32
d30c5336
JK
13923/* Needed for new procfs interface on sparc-solaris. */
13924#define _STRUCTURED_PROC 1
596c9d4b 13925#include <sys/procfs.h>
bec39cab
AC
13926int
13927main ()
13928{
97bf5e38 13929gregset_t avar
bec39cab
AC
13930 ;
13931 return 0;
13932}
13933_ACEOF
81ecdfbb 13934if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13935 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 13936else
81ecdfbb 13937 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 13938
596c9d4b 13939fi
81ecdfbb 13940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
13941fi
13942
97bf5e38 13943 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 13944
81ecdfbb 13945$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
13946
13947 fi
81ecdfbb
RW
13948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
13949$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 13950
81ecdfbb
RW
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
13952$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
13953 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
13954 $as_echo_n "(cached) " >&6
d84dd0c5 13955else
81ecdfbb 13956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13957/* end confdefs.h. */
97bf5e38
MK
13958
13959#define _SYSCALL32
d30c5336
JK
13960/* Needed for new procfs interface on sparc-solaris. */
13961#define _STRUCTURED_PROC 1
d84dd0c5 13962#include <sys/procfs.h>
bec39cab
AC
13963int
13964main ()
13965{
97bf5e38 13966fpregset_t avar
bec39cab
AC
13967 ;
13968 return 0;
13969}
13970_ACEOF
81ecdfbb 13971if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 13972 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 13973else
81ecdfbb 13974 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 13975
d84dd0c5 13976fi
81ecdfbb 13977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
13978fi
13979
97bf5e38 13980 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 13981
81ecdfbb 13982$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 13983
97bf5e38 13984 fi
81ecdfbb
RW
13985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
13986$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 13987
81ecdfbb
RW
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
13989$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
13990 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
13991 $as_echo_n "(cached) " >&6
c906108c 13992else
81ecdfbb 13993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13994/* end confdefs.h. */
c906108c 13995
97bf5e38 13996#define _SYSCALL32
d30c5336
JK
13997/* Needed for new procfs interface on sparc-solaris. */
13998#define _STRUCTURED_PROC 1
97bf5e38 13999#include <sys/procfs.h>
bec39cab
AC
14000int
14001main ()
14002{
97bf5e38 14003prgregset_t avar
bec39cab
AC
14004 ;
14005 return 0;
14006}
14007_ACEOF
81ecdfbb 14008if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14009 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14010else
81ecdfbb 14011 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14012
c906108c 14013fi
81ecdfbb 14014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14015fi
14016
97bf5e38 14017 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14018
81ecdfbb 14019$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14020
97bf5e38 14021 fi
81ecdfbb
RW
14022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14023$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14024
81ecdfbb
RW
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14026$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14027 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
14028 $as_echo_n "(cached) " >&6
d45fe813 14029else
81ecdfbb 14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14031/* end confdefs.h. */
97bf5e38
MK
14032
14033#define _SYSCALL32
d30c5336
JK
14034/* Needed for new procfs interface on sparc-solaris. */
14035#define _STRUCTURED_PROC 1
97bf5e38 14036#include <sys/procfs.h>
bec39cab
AC
14037int
14038main ()
14039{
97bf5e38 14040prfpregset_t avar
bec39cab
AC
14041 ;
14042 return 0;
14043}
14044_ACEOF
81ecdfbb 14045if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14046 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14047else
81ecdfbb 14048 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14049
d45fe813 14050fi
81ecdfbb 14051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14052fi
14053
97bf5e38 14054 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14055
81ecdfbb 14056$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14057
97bf5e38 14058 fi
81ecdfbb
RW
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14060$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14061
81ecdfbb
RW
14062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14063$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14064 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
14065 $as_echo_n "(cached) " >&6
d45fe813 14066else
81ecdfbb 14067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14068/* end confdefs.h. */
97bf5e38
MK
14069
14070#define _SYSCALL32
d30c5336
JK
14071/* Needed for new procfs interface on sparc-solaris. */
14072#define _STRUCTURED_PROC 1
97bf5e38 14073#include <sys/procfs.h>
bec39cab
AC
14074int
14075main ()
14076{
97bf5e38 14077prgregset32_t avar
bec39cab
AC
14078 ;
14079 return 0;
14080}
14081_ACEOF
81ecdfbb 14082if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14083 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14084else
81ecdfbb 14085 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14086
d45fe813 14087fi
81ecdfbb 14088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14089fi
14090
97bf5e38 14091 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14092
81ecdfbb 14093$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14094
97bf5e38 14095 fi
81ecdfbb
RW
14096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14097$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14098
81ecdfbb
RW
14099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14100$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14101 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
14102 $as_echo_n "(cached) " >&6
d45fe813 14103else
81ecdfbb 14104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14105/* end confdefs.h. */
97bf5e38 14106
d45fe813 14107#define _SYSCALL32
d30c5336
JK
14108/* Needed for new procfs interface on sparc-solaris. */
14109#define _STRUCTURED_PROC 1
97bf5e38 14110#include <sys/procfs.h>
bec39cab
AC
14111int
14112main ()
14113{
97bf5e38 14114lwpid_t avar
bec39cab
AC
14115 ;
14116 return 0;
14117}
14118_ACEOF
81ecdfbb 14119if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14120 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14121else
81ecdfbb 14122 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14123
d45fe813 14124fi
81ecdfbb 14125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14126fi
14127
97bf5e38 14128 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14129
81ecdfbb 14130$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14131
97bf5e38 14132 fi
81ecdfbb
RW
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14134$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14135
81ecdfbb
RW
14136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14137$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14138 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14139 $as_echo_n "(cached) " >&6
c906108c 14140else
81ecdfbb 14141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14142/* end confdefs.h. */
c906108c 14143
97bf5e38 14144#define _SYSCALL32
d30c5336
JK
14145/* Needed for new procfs interface on sparc-solaris. */
14146#define _STRUCTURED_PROC 1
97bf5e38 14147#include <sys/procfs.h>
bec39cab
AC
14148int
14149main ()
14150{
97bf5e38 14151psaddr_t avar
bec39cab
AC
14152 ;
14153 return 0;
14154}
14155_ACEOF
81ecdfbb 14156if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14157 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14158else
81ecdfbb 14159 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14160
c906108c 14161fi
81ecdfbb 14162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14163fi
14164
97bf5e38 14165 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14166
81ecdfbb 14167$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14168
97bf5e38 14169 fi
81ecdfbb
RW
14170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14171$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14172
81ecdfbb
RW
14173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
14174$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
14175 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
14176 $as_echo_n "(cached) " >&6
c906108c 14177else
81ecdfbb 14178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14179/* end confdefs.h. */
c906108c 14180
97bf5e38 14181#define _SYSCALL32
d30c5336
JK
14182/* Needed for new procfs interface on sparc-solaris. */
14183#define _STRUCTURED_PROC 1
97bf5e38 14184#include <sys/procfs.h>
bec39cab
AC
14185int
14186main ()
14187{
97bf5e38 14188prsysent_t avar
bec39cab
AC
14189 ;
14190 return 0;
14191}
14192_ACEOF
81ecdfbb 14193if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14194 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 14195else
81ecdfbb 14196 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 14197
c906108c 14198fi
81ecdfbb 14199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14200fi
14201
97bf5e38 14202 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 14203
81ecdfbb 14204$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 14205
97bf5e38 14206 fi
81ecdfbb
RW
14207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
14208$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 14209
81ecdfbb
RW
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
14211$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
14212 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
14213 $as_echo_n "(cached) " >&6
c906108c 14214else
81ecdfbb 14215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14216/* end confdefs.h. */
c906108c 14217
97bf5e38 14218#define _SYSCALL32
d30c5336
JK
14219/* Needed for new procfs interface on sparc-solaris. */
14220#define _STRUCTURED_PROC 1
97bf5e38 14221#include <sys/procfs.h>
bec39cab
AC
14222int
14223main ()
14224{
97bf5e38 14225pr_sigset_t avar
bec39cab
AC
14226 ;
14227 return 0;
14228}
14229_ACEOF
81ecdfbb 14230if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14231 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 14232else
81ecdfbb 14233 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 14234
c906108c 14235fi
81ecdfbb 14236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14237fi
14238
97bf5e38 14239 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 14240
81ecdfbb 14241$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 14242
97bf5e38 14243 fi
81ecdfbb
RW
14244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
14245$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 14246
81ecdfbb
RW
14247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
14248$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
14249 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
14250 $as_echo_n "(cached) " >&6
c906108c 14251else
81ecdfbb 14252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14253/* end confdefs.h. */
c906108c 14254
97bf5e38 14255#define _SYSCALL32
d30c5336
JK
14256/* Needed for new procfs interface on sparc-solaris. */
14257#define _STRUCTURED_PROC 1
97bf5e38 14258#include <sys/procfs.h>
bec39cab
AC
14259int
14260main ()
14261{
97bf5e38 14262pr_sigaction64_t avar
bec39cab
AC
14263 ;
14264 return 0;
14265}
14266_ACEOF
81ecdfbb 14267if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14268 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 14269else
81ecdfbb 14270 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 14271
c906108c 14272fi
81ecdfbb 14273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14274fi
14275
97bf5e38 14276 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 14277
81ecdfbb 14278$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 14279
97bf5e38 14280 fi
81ecdfbb
RW
14281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
14282$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 14283
81ecdfbb
RW
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
14285$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
14286 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
14287 $as_echo_n "(cached) " >&6
97bf5e38 14288else
81ecdfbb 14289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14290/* end confdefs.h. */
97bf5e38
MK
14291
14292#define _SYSCALL32
d30c5336
JK
14293/* Needed for new procfs interface on sparc-solaris. */
14294#define _STRUCTURED_PROC 1
97bf5e38 14295#include <sys/procfs.h>
bec39cab
AC
14296int
14297main ()
14298{
97bf5e38 14299pr_siginfo64_t avar
bec39cab
AC
14300 ;
14301 return 0;
14302}
14303_ACEOF
81ecdfbb 14304if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14305 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
14306else
81ecdfbb 14307 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 14308
97bf5e38 14309fi
81ecdfbb 14310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14311fi
c906108c 14312
97bf5e38 14313 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 14314
81ecdfbb 14315$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 14316
97bf5e38 14317 fi
81ecdfbb
RW
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
14319$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
14320
14321
97bf5e38
MK
14322
14323
14324
97bf5e38 14325 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14327$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14328 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14329 $as_echo_n "(cached) " >&6
c906108c 14330else
81ecdfbb 14331 if test "$cross_compiling" = yes; then :
97bf5e38 14332 gdb_cv_prfpregset_t_broken=yes
c906108c 14333else
81ecdfbb 14334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14335/* end confdefs.h. */
97bf5e38
MK
14336#include <sys/procfs.h>
14337 int main ()
14338 {
14339 if (sizeof (prfpregset_t) == sizeof (void *))
14340 return 1;
14341 return 0;
14342 }
bec39cab 14343_ACEOF
81ecdfbb 14344if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14345 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14346else
14347 gdb_cv_prfpregset_t_broken=yes
c906108c 14348fi
81ecdfbb
RW
14349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14350 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14351fi
81ecdfbb 14352
c906108c
SS
14353fi
14354
81ecdfbb
RW
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14356$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14357 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14358
81ecdfbb 14359$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14360
97bf5e38
MK
14361 fi
14362 fi
c906108c 14363fi
c906108c 14364
bc8bcb4b 14365# Check if the compiler supports the `long long' type.
c906108c 14366
81ecdfbb
RW
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14368$as_echo_n "checking for long long support in compiler... " >&6; }
14369if test "${gdb_cv_c_long_long+set}" = set; then :
14370 $as_echo_n "(cached) " >&6
97bf5e38 14371else
81ecdfbb 14372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14373/* end confdefs.h. */
bc8bcb4b 14374extern long long foo;
bec39cab
AC
14375int
14376main ()
14377{
bc8bcb4b 14378switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14379 ;
14380 return 0;
14381}
14382_ACEOF
81ecdfbb 14383if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14384 gdb_cv_c_long_long=yes
14385else
81ecdfbb 14386 gdb_cv_c_long_long=no
97bf5e38 14387fi
81ecdfbb 14388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14389fi
81ecdfbb
RW
14390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14391$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14392if test $gdb_cv_c_long_long != yes; then
14393 # libdecnumber requires long long.
14394 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14395fi
14396
bc8bcb4b 14397# Check if the compiler and runtime support printing long longs.
97bf5e38 14398
81ecdfbb
RW
14399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14400$as_echo_n "checking for long long support in printf... " >&6; }
14401if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14402 $as_echo_n "(cached) " >&6
97bf5e38 14403else
81ecdfbb 14404 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14405 gdb_cv_printf_has_long_long=no
14406else
81ecdfbb 14407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14408/* end confdefs.h. */
bc8bcb4b
MK
14409$ac_includes_default
14410int
14411main ()
14412{
14413char buf[32];
97bf5e38
MK
14414 long long l = 0;
14415 l = (l << 16) + 0x0123;
14416 l = (l << 16) + 0x4567;
14417 l = (l << 16) + 0x89ab;
14418 l = (l << 16) + 0xcdef;
14419 sprintf (buf, "0x%016llx", l);
14420 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14421 ;
14422 return 0;
c906108c 14423}
bec39cab 14424_ACEOF
81ecdfbb 14425if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14426 gdb_cv_printf_has_long_long=yes
14427else
81ecdfbb 14428 gdb_cv_printf_has_long_long=no
97bf5e38 14429fi
81ecdfbb
RW
14430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14431 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14432fi
81ecdfbb 14433
97bf5e38 14434fi
81ecdfbb
RW
14435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14436$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14437if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14438
81ecdfbb 14439$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14440
14441fi
97bf5e38 14442
1a619819
LM
14443# Check if the compiler and runtime support printing decfloats.
14444
81ecdfbb
RW
14445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14446$as_echo_n "checking for decfloat support in printf... " >&6; }
14447if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14448 $as_echo_n "(cached) " >&6
1a619819 14449else
81ecdfbb 14450 if test "$cross_compiling" = yes; then :
1a619819
LM
14451 gdb_cv_printf_has_decfloat=no
14452else
81ecdfbb 14453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14454/* end confdefs.h. */
14455$ac_includes_default
14456int
14457main ()
14458{
14459char buf[64];
14460 _Decimal32 d32 = 1.2345df;
14461 _Decimal64 d64 = 1.2345dd;
14462 _Decimal128 d128 = 1.2345dl;
14463 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14464 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14465 ;
14466 return 0;
14467}
14468_ACEOF
81ecdfbb 14469if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14470 gdb_cv_printf_has_decfloat=yes
14471else
81ecdfbb 14472 gdb_cv_printf_has_decfloat=no
1a619819 14473fi
81ecdfbb
RW
14474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14475 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14476fi
81ecdfbb 14477
1a619819 14478fi
81ecdfbb
RW
14479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14480$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14481if test $gdb_cv_printf_has_decfloat = yes; then
14482
81ecdfbb 14483$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14484
14485fi
14486
bc8bcb4b
MK
14487# Check if the compiler supports the `long double' type. We can't use
14488# AC_C_LONG_DOUBLE because that one does additional checks on the
14489# constants defined in <float.h> that fail on some systems,
14490# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14491
81ecdfbb
RW
14492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14493$as_echo_n "checking for long double support in compiler... " >&6; }
14494if test "${gdb_cv_c_long_double+set}" = set; then :
14495 $as_echo_n "(cached) " >&6
97bf5e38 14496else
81ecdfbb 14497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14498/* end confdefs.h. */
97bf5e38 14499long double foo;
bec39cab 14500_ACEOF
81ecdfbb 14501if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14502 gdb_cv_c_long_double=yes
97bf5e38 14503else
81ecdfbb 14504 gdb_cv_c_long_double=no
97bf5e38 14505fi
81ecdfbb 14506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14507fi
81ecdfbb
RW
14508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14509$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14510if test $gdb_cv_c_long_double = yes; then
c906108c 14511
81ecdfbb 14512$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14513
14514fi
14515
bc8bcb4b 14516# Check if the compiler and runtime support printing long doubles.
97bf5e38 14517
81ecdfbb
RW
14518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14519$as_echo_n "checking for long double support in printf... " >&6; }
14520if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14521 $as_echo_n "(cached) " >&6
97bf5e38 14522else
81ecdfbb 14523 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14524 gdb_cv_printf_has_long_double=no
14525else
81ecdfbb 14526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14527/* end confdefs.h. */
bc8bcb4b
MK
14528$ac_includes_default
14529int
14530main ()
14531{
14532char buf[16];
97bf5e38
MK
14533 long double f = 3.141592653;
14534 sprintf (buf, "%Lg", f);
14535 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14536 ;
14537 return 0;
97bf5e38 14538}
bec39cab 14539_ACEOF
81ecdfbb 14540if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14541 gdb_cv_printf_has_long_double=yes
c906108c 14542else
81ecdfbb 14543 gdb_cv_printf_has_long_double=no
c906108c 14544fi
81ecdfbb
RW
14545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14546 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14547fi
81ecdfbb 14548
c906108c 14549fi
81ecdfbb
RW
14550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14551$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14552if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14553
81ecdfbb 14554$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14555
14556fi
97bf5e38 14557
bc8bcb4b 14558# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14559
81ecdfbb
RW
14560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14561$as_echo_n "checking for long double support in scanf... " >&6; }
14562if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14563 $as_echo_n "(cached) " >&6
97bf5e38 14564else
81ecdfbb 14565 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14566 gdb_cv_scanf_has_long_double=no
14567else
81ecdfbb 14568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14569/* end confdefs.h. */
bc8bcb4b
MK
14570#include <stdio.h>
14571int
14572main ()
14573{
14574char *buf = "3.141592653";
97bf5e38
MK
14575 long double f = 0;
14576 sscanf (buf, "%Lg", &f);
14577 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14578 ;
14579 return 0;
97bf5e38 14580}
bec39cab 14581_ACEOF
81ecdfbb 14582if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14583 gdb_cv_scanf_has_long_double=yes
14584else
81ecdfbb 14585 gdb_cv_scanf_has_long_double=no
97bf5e38 14586fi
81ecdfbb
RW
14587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14588 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14589fi
81ecdfbb 14590
c906108c 14591fi
81ecdfbb
RW
14592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14593$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14594if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14595
81ecdfbb 14596$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14597
14598fi
c906108c 14599
438013df
AO
14600case ${host_os} in
14601aix*)
81ecdfbb
RW
14602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14603$as_echo_n "checking for -bbigtoc option... " >&6; }
14604if test "${gdb_cv_bigtoc+set}" = set; then :
14605 $as_echo_n "(cached) " >&6
438013df 14606else
bec39cab 14607
438013df
AO
14608 SAVE_LDFLAGS=$LDFLAGS
14609
14610 case $GCC in
14611 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14612 *) gdb_cv_bigtoc=-bbigtoc ;;
14613 esac
14614
14615 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14617/* end confdefs.h. */
438013df 14618
bec39cab
AC
14619int
14620main ()
14621{
438013df 14622int i;
bec39cab
AC
14623 ;
14624 return 0;
14625}
14626_ACEOF
81ecdfbb 14627if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14628
81ecdfbb
RW
14629else
14630 gdb_cv_bigtoc=
438013df 14631fi
81ecdfbb
RW
14632rm -f core conftest.err conftest.$ac_objext \
14633 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14634 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14635
bec39cab 14636fi
81ecdfbb
RW
14637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14638$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14639 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14640 ;;
14641esac
14642
38f6b338 14643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14644$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14645dynamic_list=false
14646if test "${gdb_native}" = yes; then
14647 # The dynamically loaded libthread_db needs access to symbols in the gdb
14648 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14649 # may not be supported there.
14650 old_LDFLAGS="$LDFLAGS"
14651 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14652 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14653 LDFLAGS="$LDFLAGS $RDYNAMIC"
14654 if test "${have_libpython}" = no; then
14655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14656/* end confdefs.h. */
14657
14658int
14659main ()
14660{
14661
14662 ;
14663 return 0;
14664}
14665_ACEOF
14666if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14667 dynamic_list=true
14668fi
14669rm -f core conftest.err conftest.$ac_objext \
14670 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14671 else
14672 # Workaround http://bugs.python.org/issue4434 where static
14673 # libpythonX.Y.a would get its symbols required for
14674 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14675 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14676
14677 # Note the workaround for Python
14678 # http://bugs.python.org/issue10112 earlier has removed
14679 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14680 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14681 # always pass.
38f6b338
JK
14682 old_CFLAGS="$CFLAGS"
14683 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14684 old_LIBS="$LIBS"
14685 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14686 old_CPPFLAGS="$CPPFLAGS"
14687 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14688 if test "$cross_compiling" = yes; then :
3bebe2f2 14689 true
f6528abd 14690else
3bebe2f2
JK
14691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692/* end confdefs.h. */
1b4f615e 14693#include "Python.h"
3bebe2f2
JK
14694int
14695main ()
14696{
14697int err;
38f6b338
JK
14698 Py_Initialize ();
14699 err = PyRun_SimpleString ("import itertools\n");
14700 Py_Finalize ();
14701 return err == 0 ? 0 : 1;
3bebe2f2
JK
14702 ;
14703 return 0;
14704}
14705_ACEOF
14706if ac_fn_c_try_run "$LINENO"; then :
14707 dynamic_list=true
14708fi
14709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14710 conftest.$ac_objext conftest.beam conftest.$ac_ext
14711fi
14712
8c1fb155 14713 LIBS="$old_LIBS"
38f6b338 14714 CFLAGS="$old_CFLAGS"
1b4f615e 14715 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14716 fi
14717 LDFLAGS="$old_LDFLAGS"
14718fi
14719if $dynamic_list; then
14720 found="-Wl,--dynamic-list"
14721 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14722else
38f6b338
JK
14723 found="-rdynamic"
14724 RDYNAMIC="-rdynamic"
f6528abd 14725fi
f6528abd 14726
38f6b338 14727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14728$as_echo "$found" >&6; }
0407b3f1 14729
f6528abd 14730
0407b3f1 14731if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14732 case ${host_os} in
c906108c 14733 solaris*)
d92419e5
JB
14734 # See if thread_db library is around for Solaris thread debugging.
14735 # Note that we must explicitly test for version 1 of the library
14736 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
14737 # the same API.
81ecdfbb
RW
14738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
14739$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 14740 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
14741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14742$as_echo "yes" >&6; }
60ca704f 14743
81ecdfbb 14744$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 14745
3483b318 14746 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 14747 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
14748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14749$as_echo_n "checking for dlopen in -ldl... " >&6; }
14750if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
14751 $as_echo_n "(cached) " >&6
c906108c 14752else
bec39cab 14753 ac_check_lib_save_LIBS=$LIBS
c906108c 14754LIBS="-ldl $LIBS"
81ecdfbb 14755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
14756/* end confdefs.h. */
14757
81ecdfbb
RW
14758/* Override any GCC internal prototype to avoid an error.
14759 Use char because int might match the return type of a GCC
14760 builtin and then its argument prototype would still apply. */
bec39cab
AC
14761#ifdef __cplusplus
14762extern "C"
14763#endif
bec39cab
AC
14764char dlopen ();
14765int
14766main ()
14767{
81ecdfbb 14768return dlopen ();
bec39cab
AC
14769 ;
14770 return 0;
14771}
14772_ACEOF
81ecdfbb 14773if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
14774 ac_cv_lib_dl_dlopen=yes
14775else
81ecdfbb 14776 ac_cv_lib_dl_dlopen=no
bec39cab 14777fi
81ecdfbb
RW
14778rm -f core conftest.err conftest.$ac_objext \
14779 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
14780LIBS=$ac_check_lib_save_LIBS
14781fi
81ecdfbb
RW
14782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14783$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14784if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
14785 cat >>confdefs.h <<_ACEOF
14786#define HAVE_LIBDL 1
14787_ACEOF
c906108c
SS
14788
14789 LIBS="-ldl $LIBS"
14790
c906108c
SS
14791fi
14792
f6528abd 14793 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
14794 # Sun randomly tweaked the prototypes in <proc_service.h>
14795 # at one point.
81ecdfbb
RW
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
14797$as_echo_n "checking if <proc_service.h> is old... " >&6; }
14798 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
14799 $as_echo_n "(cached) " >&6
c906108c 14800else
bec39cab 14801
81ecdfbb 14802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14803/* end confdefs.h. */
c906108c
SS
14804
14805 #include <proc_service.h>
14806 ps_err_e ps_pdwrite
14807 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 14808
bec39cab
AC
14809int
14810main ()
14811{
14812
14813 ;
14814 return 0;
14815}
14816_ACEOF
81ecdfbb 14817if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
14818 gdb_cv_proc_service_is_old=no
14819else
81ecdfbb 14820 gdb_cv_proc_service_is_old=yes
c906108c 14821fi
81ecdfbb 14822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14823
c906108c
SS
14824fi
14825
81ecdfbb
RW
14826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
14827$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 14828 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 14829
81ecdfbb 14830$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
14831
14832 fi
14833 else
81ecdfbb
RW
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14835$as_echo "no" >&6; }
c906108c
SS
14836 fi
14837 ;;
d92419e5 14838 aix*)
81ecdfbb
RW
14839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14840$as_echo_n "checking for AiX thread debugging library... " >&6; }
14841 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14842 $as_echo_n "(cached) " >&6
bec39cab 14843else
81ecdfbb 14844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14845/* end confdefs.h. */
d92419e5 14846#include <sys/pthdebug.h>
bec39cab
AC
14847int
14848main ()
14849{
d92419e5
JB
14850#ifndef PTHDB_VERSION_3
14851 #error
14852 #endif
bec39cab
AC
14853 ;
14854 return 0;
14855}
14856_ACEOF
81ecdfbb 14857if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
14858 gdb_cv_have_aix_thread_debug=yes
14859else
81ecdfbb 14860 gdb_cv_have_aix_thread_debug=no
d92419e5 14861fi
81ecdfbb 14862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
14863fi
14864
81ecdfbb
RW
14865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
14866$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
14867 if test $gdb_cv_have_aix_thread_debug = yes; then
14868 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 14869 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 14870 LIBS="$LIBS -lpthdebug"
d645e32e
JB
14871
14872 # Older versions of AIX do not provide the declaration for
14873 # the getthrds function (it appears that it was introduced
14874 # with AIX 6.x).
14875 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
14876"
14877if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
14878 ac_have_decl=1
14879else
14880 ac_have_decl=0
14881fi
14882
14883cat >>confdefs.h <<_ACEOF
14884#define HAVE_DECL_GETTHRDS $ac_have_decl
14885_ACEOF
14886
d92419e5
JB
14887 fi
14888 ;;
c906108c 14889 esac
bec39cab 14890
c906108c
SS
14891fi
14892
3f47be5c 14893if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
14894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
14895$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
14896if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
14897 $as_echo_n "(cached) " >&6
bec39cab 14898else
81ecdfbb 14899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14900/* end confdefs.h. */
3f47be5c 14901#include <thread_db.h>
bec39cab
AC
14902int
14903main ()
14904{
3f47be5c 14905int i = TD_NOTALLOC;
bec39cab
AC
14906 ;
14907 return 0;
14908}
14909_ACEOF
81ecdfbb 14910if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
14911 gdb_cv_thread_db_h_has_td_notalloc=yes
14912else
81ecdfbb 14913 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 14914
3f47be5c 14915fi
81ecdfbb 14916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 14917
bec39cab 14918fi
81ecdfbb
RW
14919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
14920$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
14921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
14922$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
14923if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
14924 $as_echo_n "(cached) " >&6
59f80f10 14925else
81ecdfbb 14926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14927/* end confdefs.h. */
14928#include <thread_db.h>
14929int
14930main ()
14931{
14932int i = TD_VERSION;
14933 ;
14934 return 0;
14935}
14936_ACEOF
81ecdfbb 14937if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14938 gdb_cv_thread_db_h_has_td_version=yes
14939else
81ecdfbb 14940 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
14941
14942fi
81ecdfbb 14943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14944
14945fi
81ecdfbb
RW
14946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
14947$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
14948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
14949$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
14950if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
14951 $as_echo_n "(cached) " >&6
59f80f10 14952else
81ecdfbb 14953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
14954/* end confdefs.h. */
14955#include <thread_db.h>
14956int
14957main ()
14958{
14959int i = TD_NOTLS;
14960 ;
14961 return 0;
14962}
14963_ACEOF
81ecdfbb 14964if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
14965 gdb_cv_thread_db_h_has_td_notls=yes
14966else
81ecdfbb 14967 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
14968
14969fi
81ecdfbb 14970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
14971
14972fi
81ecdfbb
RW
14973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
14974$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
14975fi
14976if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 14977
81ecdfbb 14978$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 14979
59f80f10
DJ
14980fi
14981if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
14982
81ecdfbb 14983$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
14984
14985fi
14986if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
14987
81ecdfbb 14988$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 14989
3f47be5c
EZ
14990fi
14991
81ecdfbb
RW
14992ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14993"
14994if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
14995 ac_have_decl=1
10568435 14996else
81ecdfbb 14997 ac_have_decl=0
10568435 14998fi
10568435
JK
14999
15000cat >>confdefs.h <<_ACEOF
81ecdfbb 15001#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15002_ACEOF
15003
15004
81ecdfbb
RW
15005if test "$cross_compiling" = yes; then :
15006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15007/* end confdefs.h. */
15008#include <sys/personality.h>
15009int
15010main ()
15011{
15012
15013# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15014# define ADDR_NO_RANDOMIZE 0x0040000
15015# endif
15016 /* Test the flag could be set and stays set. */
15017 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15018 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15019 return 1
15020 ;
15021 return 0;
15022}
15023_ACEOF
81ecdfbb 15024if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15025 have_personality=true
15026else
81ecdfbb 15027 have_personality=false
10568435 15028fi
81ecdfbb
RW
15029rm -f core conftest.err conftest.$ac_objext \
15030 conftest$ac_exeext conftest.$ac_ext
10568435 15031else
81ecdfbb 15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15033/* end confdefs.h. */
15034#include <sys/personality.h>
15035int
15036main ()
15037{
15038
15039# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15040# define ADDR_NO_RANDOMIZE 0x0040000
15041# endif
15042 /* Test the flag could be set and stays set. */
15043 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15044 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15045 return 1
15046 ;
15047 return 0;
15048}
15049_ACEOF
81ecdfbb 15050if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15051 have_personality=true
15052else
81ecdfbb 15053 have_personality=false
10568435 15054fi
81ecdfbb
RW
15055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15056 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15057fi
81ecdfbb 15058
10568435
JK
15059if $have_personality
15060then
15061
81ecdfbb 15062$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15063
15064fi
15065
e655c1a2
PA
15066case $host_os in
15067 go32* | *djgpp*)
15068 gdbinit=gdb.ini
15069 ;;
15070 *)
15071 gdbinit=.gdbinit
15072 ;;
15073esac
15074
15075cat >>confdefs.h <<_ACEOF
15076#define GDBINIT "$gdbinit"
15077_ACEOF
15078
15079
fb40c209 15080
f83d8a90
DE
15081# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15082# except that the argument to --with-sysroot is optional.
15083# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15084if test "x$with_sysroot" = xyes; then
15085 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15086fi
bec39cab 15087
81ecdfbb
RW
15088# Check whether --with-sysroot was given.
15089if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15090 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15091else
15092 TARGET_SYSTEM_ROOT=
15093fi
030292b7 15094
030292b7 15095
f83d8a90
DE
15096 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15097 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15098 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15099 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15100
f83d8a90
DE
15101cat >>confdefs.h <<_ACEOF
15102#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15103_ACEOF
bec39cab 15104
030292b7 15105
b14b1491 15106
f83d8a90
DE
15107
15108 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15109 if test "x$prefix" = xNONE; then
15110 test_prefix=/usr/local
15111 else
15112 test_prefix=$prefix
15113 fi
15114 else
15115 test_prefix=$exec_prefix
15116 fi
15117 value=0
15118 case ${ac_define_dir} in
15119 "${test_prefix}"|"${test_prefix}/"*|\
15120 '${exec_prefix}'|'${exec_prefix}/'*)
15121 value=1
15122 ;;
15123 esac
15124
15125cat >>confdefs.h <<_ACEOF
15126#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15127_ACEOF
030292b7
DJ
15128
15129
15130
16e7150e 15131
16e7150e 15132
81ecdfbb
RW
15133# Check whether --with-system-gdbinit was given.
15134if test "${with_system_gdbinit+set}" = set; then :
15135 withval=$with_system_gdbinit;
b14b1491
TT
15136 SYSTEM_GDBINIT=$withval
15137else
15138 SYSTEM_GDBINIT=
81ecdfbb
RW
15139fi
15140
16e7150e
JG
15141
15142 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15143 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15144 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15145 ac_define_dir=`eval echo $ac_define_dir`
15146
15147cat >>confdefs.h <<_ACEOF
15148#define SYSTEM_GDBINIT "$ac_define_dir"
15149_ACEOF
15150
15151
15152
0c4a4063 15153
b14b1491
TT
15154 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15155 if test "x$prefix" = xNONE; then
15156 test_prefix=/usr/local
15157 else
15158 test_prefix=$prefix
15159 fi
15160 else
15161 test_prefix=$exec_prefix
15162 fi
15163 value=0
15164 case ${ac_define_dir} in
15165 "${test_prefix}"|"${test_prefix}/"*|\
15166 '${exec_prefix}'|'${exec_prefix}/'*)
15167 value=1
15168 ;;
15169 esac
16e7150e 15170
b14b1491
TT
15171cat >>confdefs.h <<_ACEOF
15172#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15173_ACEOF
15174
b14b1491 15175
16e7150e 15176
0c4a4063 15177
b835bb52 15178
81ecdfbb
RW
15179# Check whether --enable-werror was given.
15180if test "${enable_werror+set}" = set; then :
15181 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15182 yes | y) ERROR_ON_WARNING="yes" ;;
15183 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15184 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15185 esac
81ecdfbb
RW
15186fi
15187
094a342e 15188
9a084706
PA
15189# Enable -Werror by default when using gcc. Turn it off for releases.
15190if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15191 ERROR_ON_WARNING=yes
15192fi
15193
15194WERROR_CFLAGS=""
15195if test "${ERROR_ON_WARNING}" = yes ; then
15196 WERROR_CFLAGS="-Werror"
15197fi
15198
cf6de44d 15199# The options we'll try to enable.
aac331e4 15200build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 15201-Wno-unused -Wunused-value -Wunused-function \
aac331e4 15202-Wno-switch -Wno-char-subscripts \
cf6de44d
PA
15203-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15204-Wno-sign-compare -Wno-write-strings -Wno-narrowing"
3bc3d82a 15205
3526781e
DJ
15206# Enable -Wno-format by default when using gcc on mingw since many
15207# GCC versions complain about %I64.
15208case "${host}" in
15209 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 15210 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15211esac
15212
81ecdfbb
RW
15213# Check whether --enable-build-warnings was given.
15214if test "${enable_build_warnings+set}" = set; then :
15215 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15216 yes) ;;
15217 no) build_warnings="-w";;
15218 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15219 build_warnings="${build_warnings} ${t}";;
15220 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15221 build_warnings="${t} ${build_warnings}";;
15222 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15223esac
d4f3574e 15224if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15225 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15226fi
81ecdfbb
RW
15227fi
15228# Check whether --enable-gdb-build-warnings was given.
15229if test "${enable_gdb_build_warnings+set}" = set; then :
15230 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15231 yes) ;;
15232 no) build_warnings="-w";;
15233 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15234 build_warnings="${build_warnings} ${t}";;
15235 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15236 build_warnings="${t} ${build_warnings}";;
15237 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15238esac
15239if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15240 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15241fi
81ecdfbb 15242fi
3bc3d82a
PA
15243
15244# The set of warnings supported by a C++ compiler is not the same as
15245# of the C compiler.
cf6de44d 15246ac_ext=cpp
3bc3d82a
PA
15247ac_cpp='$CXXCPP $CPPFLAGS'
15248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15251
3bc3d82a 15252
81ecdfbb 15253WARN_CFLAGS=""
c906108c
SS
15254if test "x${build_warnings}" != x -a "x$GCC" = xyes
15255then
81ecdfbb
RW
15256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15257$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15258 # Separate out the -Werror flag as some files just cannot be
15259 # compiled with it enabled.
15260 for w in ${build_warnings}; do
7544db95
PA
15261 # GCC does not complain about -Wno-unknown-warning. Invert
15262 # and test -Wunknown-warning instead.
15263 case $w in
15264 -Wno-*)
15265 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15266 *)
15267 wtest=$w ;;
15268 esac
15269
746a987d
AC
15270 case $w in
15271 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15272 *)
15273 # Check whether GCC accepts it.
4536bbc6 15274 saved_CFLAGS="$CFLAGS"
7544db95 15275 CFLAGS="$CFLAGS $wtest"
3bc3d82a 15276 saved_CXXFLAGS="$CXXFLAGS"
7544db95 15277 CXXFLAGS="$CXXFLAGS $wtest"
54019719 15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15279/* end confdefs.h. */
4536bbc6 15280
bec39cab
AC
15281int
15282main ()
15283{
4536bbc6 15284
bec39cab
AC
15285 ;
15286 return 0;
15287}
15288_ACEOF
3bc3d82a 15289if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15290 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15291fi
81ecdfbb 15292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15293 CFLAGS="$saved_CFLAGS"
3bc3d82a 15294 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15295 esac
15296 done
81ecdfbb
RW
15297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15298$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15299fi
15300
15301
104c1213 15302
cf6de44d 15303ac_ext=c
3bc3d82a
PA
15304ac_cpp='$CPP $CPPFLAGS'
15305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15307ac_compiler_gnu=$ac_cv_c_compiler_gnu
15308
3bc3d82a 15309
b835bb52 15310
7a292a7a 15311# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15313$as_echo_n "checking for cygwin... " >&6; }
15314if test "${gdb_cv_os_cygwin+set}" = set; then :
15315 $as_echo_n "(cached) " >&6
bec39cab 15316else
81ecdfbb 15317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15318/* end confdefs.h. */
7a292a7a
SS
15319
15320#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15321lose
15322#endif
bec39cab 15323_ACEOF
7a292a7a 15324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15325 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15326 gdb_cv_os_cygwin=yes
15327else
7a292a7a
SS
15328 gdb_cv_os_cygwin=no
15329fi
15330rm -f conftest*
15331
15332fi
81ecdfbb
RW
15333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15334$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15335
aff38e61 15336
3eb25fda 15337SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15338case ${host} in
95cbc983
AC
15339 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15340 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15341 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15342esac
15343
15344
cd0fc7c3
SS
15345# libreadline needs libuser32.a in a cygwin environment
15346WIN32LIBS=
15347if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15348 WIN32LIBS="-luser32"
15349 case "${target}" in
15350 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15351 ;;
15352 esac
cd0fc7c3 15353fi
c906108c 15354
b4505029
MM
15355# The ser-tcp.c module requires sockets.
15356case ${host} in
15357 *mingw32*)
15358
81ecdfbb 15359$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15360
15361 WIN32LIBS="$WIN32LIBS -lws2_32"
15362 ;;
15363esac
15364
7a292a7a 15365
31d99776 15366# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15367
15368 OLD_CFLAGS=$CFLAGS
15369 OLD_LDFLAGS=$LDFLAGS
15370 OLD_LIBS=$LIBS
15371 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15372 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15373 # always want our bfd.
15374 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15375 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15376 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15377 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15378 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
15380$as_echo_n "checking for ELF support in BFD... " >&6; }
15381if test "${gdb_cv_var_elf+set}" = set; then :
15382 $as_echo_n "(cached) " >&6
31d99776 15383else
81ecdfbb 15384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15385/* end confdefs.h. */
15386#include <stdlib.h>
def63ff0
TT
15387 #include "bfd.h"
15388 #include "elf-bfd.h"
31d99776
DJ
15389
15390int
15391main ()
15392{
def63ff0 15393return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15394 ;
15395 return 0;
15396}
15397_ACEOF
81ecdfbb 15398if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15399 gdb_cv_var_elf=yes
15400else
81ecdfbb 15401 gdb_cv_var_elf=no
31d99776 15402fi
81ecdfbb
RW
15403rm -f core conftest.err conftest.$ac_objext \
15404 conftest$ac_exeext conftest.$ac_ext
31d99776 15405fi
81ecdfbb
RW
15406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15407$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15408 CFLAGS=$OLD_CFLAGS
15409 LDFLAGS=$OLD_LDFLAGS
15410 LIBS=$OLD_LIBS
31d99776 15411if test $gdb_cv_var_elf = yes; then
d4777acb 15412 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15413
81ecdfbb 15414$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15415
075ff26d
JK
15416 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15417 if test "$plugins" = "yes"; then
a48b32c0
L
15418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15419$as_echo_n "checking for library containing dlopen... " >&6; }
15420if test "${ac_cv_search_dlopen+set}" = set; then :
15421 $as_echo_n "(cached) " >&6
15422else
15423 ac_func_search_save_LIBS=$LIBS
15424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15425/* end confdefs.h. */
15426
15427/* Override any GCC internal prototype to avoid an error.
15428 Use char because int might match the return type of a GCC
15429 builtin and then its argument prototype would still apply. */
15430#ifdef __cplusplus
15431extern "C"
15432#endif
15433char dlopen ();
15434int
15435main ()
15436{
15437return dlopen ();
15438 ;
15439 return 0;
15440}
15441_ACEOF
15442for ac_lib in '' dl; do
15443 if test -z "$ac_lib"; then
15444 ac_res="none required"
15445 else
15446 ac_res=-l$ac_lib
15447 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15448 fi
15449 if ac_fn_c_try_link "$LINENO"; then :
15450 ac_cv_search_dlopen=$ac_res
15451fi
15452rm -f core conftest.err conftest.$ac_objext \
15453 conftest$ac_exeext
15454 if test "${ac_cv_search_dlopen+set}" = set; then :
15455 break
15456fi
15457done
15458if test "${ac_cv_search_dlopen+set}" = set; then :
15459
15460else
15461 ac_cv_search_dlopen=no
15462fi
15463rm conftest.$ac_ext
15464LIBS=$ac_func_search_save_LIBS
15465fi
15466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15467$as_echo "$ac_cv_search_dlopen" >&6; }
15468ac_res=$ac_cv_search_dlopen
15469if test "$ac_res" != no; then :
15470 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15471
15472fi
15473
075ff26d 15474 fi
31d99776 15475fi
31d99776 15476
4f05add4
TT
15477# Add macho support to GDB, but only if BFD includes it.
15478
15479 OLD_CFLAGS=$CFLAGS
15480 OLD_LDFLAGS=$LDFLAGS
15481 OLD_LIBS=$LIBS
15482 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15483 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15484 # always want our bfd.
15485 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15486 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15487 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15488 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15489 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15491$as_echo_n "checking for Mach-O support in BFD... " >&6; }
15492if test "${gdb_cv_var_macho+set}" = set; then :
15493 $as_echo_n "(cached) " >&6
15494else
15495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15496/* end confdefs.h. */
15497#include <stdlib.h>
15498 #include "bfd.h"
15499 #include "mach-o.h"
15500
15501int
15502main ()
15503{
15504return bfd_mach_o_lookup_command (NULL, 0, NULL);
15505 ;
15506 return 0;
15507}
15508_ACEOF
15509if ac_fn_c_try_link "$LINENO"; then :
15510 gdb_cv_var_macho=yes
15511else
15512 gdb_cv_var_macho=no
15513fi
15514rm -f core conftest.err conftest.$ac_objext \
15515 conftest$ac_exeext conftest.$ac_ext
15516fi
15517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15518$as_echo "$gdb_cv_var_macho" >&6; }
15519 CFLAGS=$OLD_CFLAGS
15520 LDFLAGS=$OLD_LDFLAGS
15521 LIBS=$OLD_LIBS
15522if test $gdb_cv_var_macho = yes; then
15523 CONFIG_OBS="$CONFIG_OBS machoread.o"
15524fi
15525
121ce6e5
DJ
15526# Add any host-specific objects to GDB.
15527CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15528
608e2dbb
TT
15529# If building on ELF, look for lzma support for embedded compressed debug info.
15530if test $gdb_cv_var_elf = yes; then
15531
15532# Check whether --with-lzma was given.
15533if test "${with_lzma+set}" = set; then :
15534 withval=$with_lzma;
15535else
15536 with_lzma=auto
15537fi
15538
15539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15540$as_echo_n "checking whether to use lzma... " >&6; }
15541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15542$as_echo "$with_lzma" >&6; }
15543
15544 if test "${with_lzma}" != no; then
15545
15546
15547
15548
15549
15550
15551
15552
15553 use_additional=yes
15554
15555 acl_save_prefix="$prefix"
15556 prefix="$acl_final_prefix"
15557 acl_save_exec_prefix="$exec_prefix"
15558 exec_prefix="$acl_final_exec_prefix"
15559
15560 eval additional_includedir=\"$includedir\"
15561 eval additional_libdir=\"$libdir\"
15562
15563 exec_prefix="$acl_save_exec_prefix"
15564 prefix="$acl_save_prefix"
15565
15566
15567# Check whether --with-liblzma-prefix was given.
15568if test "${with_liblzma_prefix+set}" = set; then :
15569 withval=$with_liblzma_prefix;
15570 if test "X$withval" = "Xno"; then
15571 use_additional=no
15572 else
15573 if test "X$withval" = "X"; then
15574
15575 acl_save_prefix="$prefix"
15576 prefix="$acl_final_prefix"
15577 acl_save_exec_prefix="$exec_prefix"
15578 exec_prefix="$acl_final_exec_prefix"
15579
15580 eval additional_includedir=\"$includedir\"
15581 eval additional_libdir=\"$libdir\"
15582
15583 exec_prefix="$acl_save_exec_prefix"
15584 prefix="$acl_save_prefix"
15585
15586 else
15587 additional_includedir="$withval/include"
15588 additional_libdir="$withval/lib"
15589 fi
15590 fi
15591
15592fi
15593
15594 LIBLZMA=
15595 LTLIBLZMA=
15596 INCLZMA=
15597 rpathdirs=
15598 ltrpathdirs=
15599 names_already_handled=
15600 names_next_round='lzma '
15601 while test -n "$names_next_round"; do
15602 names_this_round="$names_next_round"
15603 names_next_round=
15604 for name in $names_this_round; do
15605 already_handled=
15606 for n in $names_already_handled; do
15607 if test "$n" = "$name"; then
15608 already_handled=yes
15609 break
15610 fi
15611 done
15612 if test -z "$already_handled"; then
15613 names_already_handled="$names_already_handled $name"
15614 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15615 eval value=\"\$HAVE_LIB$uppername\"
15616 if test -n "$value"; then
15617 if test "$value" = yes; then
15618 eval value=\"\$LIB$uppername\"
15619 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15620 eval value=\"\$LTLIB$uppername\"
15621 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15622 else
15623 :
15624 fi
15625 else
15626 found_dir=
15627 found_la=
15628 found_so=
15629 found_a=
15630 if test $use_additional = yes; then
15631 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15632 found_dir="$additional_libdir"
15633 found_so="$additional_libdir/lib$name.$shlibext"
15634 if test -f "$additional_libdir/lib$name.la"; then
15635 found_la="$additional_libdir/lib$name.la"
15636 fi
15637 else
15638 if test -f "$additional_libdir/lib$name.$libext"; then
15639 found_dir="$additional_libdir"
15640 found_a="$additional_libdir/lib$name.$libext"
15641 if test -f "$additional_libdir/lib$name.la"; then
15642 found_la="$additional_libdir/lib$name.la"
15643 fi
15644 fi
15645 fi
15646 fi
15647 if test "X$found_dir" = "X"; then
15648 for x in $LDFLAGS $LTLIBLZMA; do
15649
15650 acl_save_prefix="$prefix"
15651 prefix="$acl_final_prefix"
15652 acl_save_exec_prefix="$exec_prefix"
15653 exec_prefix="$acl_final_exec_prefix"
15654 eval x=\"$x\"
15655 exec_prefix="$acl_save_exec_prefix"
15656 prefix="$acl_save_prefix"
15657
15658 case "$x" in
15659 -L*)
15660 dir=`echo "X$x" | sed -e 's/^X-L//'`
15661 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15662 found_dir="$dir"
15663 found_so="$dir/lib$name.$shlibext"
15664 if test -f "$dir/lib$name.la"; then
15665 found_la="$dir/lib$name.la"
15666 fi
15667 else
15668 if test -f "$dir/lib$name.$libext"; then
15669 found_dir="$dir"
15670 found_a="$dir/lib$name.$libext"
15671 if test -f "$dir/lib$name.la"; then
15672 found_la="$dir/lib$name.la"
15673 fi
15674 fi
15675 fi
15676 ;;
15677 esac
15678 if test "X$found_dir" != "X"; then
15679 break
15680 fi
15681 done
15682 fi
15683 if test "X$found_dir" != "X"; then
15684 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15685 if test "X$found_so" != "X"; then
15686 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15687 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15688 else
15689 haveit=
15690 for x in $ltrpathdirs; do
15691 if test "X$x" = "X$found_dir"; then
15692 haveit=yes
15693 break
15694 fi
15695 done
15696 if test -z "$haveit"; then
15697 ltrpathdirs="$ltrpathdirs $found_dir"
15698 fi
15699 if test "$hardcode_direct" = yes; then
15700 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15701 else
15702 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15703 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15704 haveit=
15705 for x in $rpathdirs; do
15706 if test "X$x" = "X$found_dir"; then
15707 haveit=yes
15708 break
15709 fi
15710 done
15711 if test -z "$haveit"; then
15712 rpathdirs="$rpathdirs $found_dir"
15713 fi
15714 else
15715 haveit=
15716 for x in $LDFLAGS $LIBLZMA; do
15717
15718 acl_save_prefix="$prefix"
15719 prefix="$acl_final_prefix"
15720 acl_save_exec_prefix="$exec_prefix"
15721 exec_prefix="$acl_final_exec_prefix"
15722 eval x=\"$x\"
15723 exec_prefix="$acl_save_exec_prefix"
15724 prefix="$acl_save_prefix"
15725
15726 if test "X$x" = "X-L$found_dir"; then
15727 haveit=yes
15728 break
15729 fi
15730 done
15731 if test -z "$haveit"; then
15732 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15733 fi
15734 if test "$hardcode_minus_L" != no; then
15735 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15736 else
15737 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15738 fi
15739 fi
15740 fi
15741 fi
15742 else
15743 if test "X$found_a" != "X"; then
15744 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15745 else
15746 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15747 fi
15748 fi
15749 additional_includedir=
15750 case "$found_dir" in
15751 */lib | */lib/)
15752 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15753 additional_includedir="$basedir/include"
15754 ;;
15755 esac
15756 if test "X$additional_includedir" != "X"; then
15757 if test "X$additional_includedir" != "X/usr/include"; then
15758 haveit=
15759 if test "X$additional_includedir" = "X/usr/local/include"; then
15760 if test -n "$GCC"; then
15761 case $host_os in
15762 linux*) haveit=yes;;
15763 esac
15764 fi
15765 fi
15766 if test -z "$haveit"; then
15767 for x in $CPPFLAGS $INCLZMA; do
15768
15769 acl_save_prefix="$prefix"
15770 prefix="$acl_final_prefix"
15771 acl_save_exec_prefix="$exec_prefix"
15772 exec_prefix="$acl_final_exec_prefix"
15773 eval x=\"$x\"
15774 exec_prefix="$acl_save_exec_prefix"
15775 prefix="$acl_save_prefix"
15776
15777 if test "X$x" = "X-I$additional_includedir"; then
15778 haveit=yes
15779 break
15780 fi
15781 done
15782 if test -z "$haveit"; then
15783 if test -d "$additional_includedir"; then
15784 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15785 fi
15786 fi
15787 fi
15788 fi
15789 fi
15790 if test -n "$found_la"; then
15791 save_libdir="$libdir"
15792 case "$found_la" in
15793 */* | *\\*) . "$found_la" ;;
15794 *) . "./$found_la" ;;
15795 esac
15796 libdir="$save_libdir"
15797 for dep in $dependency_libs; do
15798 case "$dep" in
15799 -L*)
15800 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15801 if test "X$additional_libdir" != "X/usr/lib"; then
15802 haveit=
15803 if test "X$additional_libdir" = "X/usr/local/lib"; then
15804 if test -n "$GCC"; then
15805 case $host_os in
15806 linux*) haveit=yes;;
15807 esac
15808 fi
15809 fi
15810 if test -z "$haveit"; then
15811 haveit=
15812 for x in $LDFLAGS $LIBLZMA; do
15813
15814 acl_save_prefix="$prefix"
15815 prefix="$acl_final_prefix"
15816 acl_save_exec_prefix="$exec_prefix"
15817 exec_prefix="$acl_final_exec_prefix"
15818 eval x=\"$x\"
15819 exec_prefix="$acl_save_exec_prefix"
15820 prefix="$acl_save_prefix"
15821
15822 if test "X$x" = "X-L$additional_libdir"; then
15823 haveit=yes
15824 break
15825 fi
15826 done
15827 if test -z "$haveit"; then
15828 if test -d "$additional_libdir"; then
15829 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15830 fi
15831 fi
15832 haveit=
15833 for x in $LDFLAGS $LTLIBLZMA; do
15834
15835 acl_save_prefix="$prefix"
15836 prefix="$acl_final_prefix"
15837 acl_save_exec_prefix="$exec_prefix"
15838 exec_prefix="$acl_final_exec_prefix"
15839 eval x=\"$x\"
15840 exec_prefix="$acl_save_exec_prefix"
15841 prefix="$acl_save_prefix"
15842
15843 if test "X$x" = "X-L$additional_libdir"; then
15844 haveit=yes
15845 break
15846 fi
15847 done
15848 if test -z "$haveit"; then
15849 if test -d "$additional_libdir"; then
15850 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
15851 fi
15852 fi
15853 fi
15854 fi
15855 ;;
15856 -R*)
15857 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15858 if test "$enable_rpath" != no; then
15859 haveit=
15860 for x in $rpathdirs; do
15861 if test "X$x" = "X$dir"; then
15862 haveit=yes
15863 break
15864 fi
15865 done
15866 if test -z "$haveit"; then
15867 rpathdirs="$rpathdirs $dir"
15868 fi
15869 haveit=
15870 for x in $ltrpathdirs; do
15871 if test "X$x" = "X$dir"; then
15872 haveit=yes
15873 break
15874 fi
15875 done
15876 if test -z "$haveit"; then
15877 ltrpathdirs="$ltrpathdirs $dir"
15878 fi
15879 fi
15880 ;;
15881 -l*)
15882 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15883 ;;
15884 *.la)
15885 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15886 ;;
15887 *)
15888 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
15889 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
15890 ;;
15891 esac
15892 done
15893 fi
15894 else
15895 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15896 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
15897 fi
15898 fi
15899 fi
15900 done
15901 done
15902 if test "X$rpathdirs" != "X"; then
15903 if test -n "$hardcode_libdir_separator"; then
15904 alldirs=
15905 for found_dir in $rpathdirs; do
15906 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15907 done
15908 acl_save_libdir="$libdir"
15909 libdir="$alldirs"
15910 eval flag=\"$hardcode_libdir_flag_spec\"
15911 libdir="$acl_save_libdir"
15912 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15913 else
15914 for found_dir in $rpathdirs; do
15915 acl_save_libdir="$libdir"
15916 libdir="$found_dir"
15917 eval flag=\"$hardcode_libdir_flag_spec\"
15918 libdir="$acl_save_libdir"
15919 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
15920 done
15921 fi
15922 fi
15923 if test "X$ltrpathdirs" != "X"; then
15924 for found_dir in $ltrpathdirs; do
15925 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
15926 done
15927 fi
15928
15929
15930 ac_save_CPPFLAGS="$CPPFLAGS"
15931
15932 for element in $INCLZMA; do
15933 haveit=
15934 for x in $CPPFLAGS; do
15935
15936 acl_save_prefix="$prefix"
15937 prefix="$acl_final_prefix"
15938 acl_save_exec_prefix="$exec_prefix"
15939 exec_prefix="$acl_final_exec_prefix"
15940 eval x=\"$x\"
15941 exec_prefix="$acl_save_exec_prefix"
15942 prefix="$acl_save_prefix"
15943
15944 if test "X$x" = "X$element"; then
15945 haveit=yes
15946 break
15947 fi
15948 done
15949 if test -z "$haveit"; then
15950 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15951 fi
15952 done
15953
15954
15955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
15956$as_echo_n "checking for liblzma... " >&6; }
15957if test "${ac_cv_liblzma+set}" = set; then :
15958 $as_echo_n "(cached) " >&6
15959else
15960
15961 ac_save_LIBS="$LIBS"
15962 LIBS="$LIBS $LIBLZMA"
15963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15964/* end confdefs.h. */
15965#include "lzma.h"
15966int
15967main ()
15968{
15969lzma_index_iter iter;
15970 lzma_index_iter_init (&iter, 0);
15971 lzma_mf_is_supported (LZMA_MF_HC3);
15972 ;
15973 return 0;
15974}
15975_ACEOF
15976if ac_fn_c_try_link "$LINENO"; then :
15977 ac_cv_liblzma=yes
15978else
15979 ac_cv_liblzma=no
15980fi
15981rm -f core conftest.err conftest.$ac_objext \
15982 conftest$ac_exeext conftest.$ac_ext
15983 LIBS="$ac_save_LIBS"
15984
15985fi
15986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
15987$as_echo "$ac_cv_liblzma" >&6; }
15988 if test "$ac_cv_liblzma" = yes; then
15989 HAVE_LIBLZMA=yes
15990
15991$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
15992
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
15994$as_echo_n "checking how to link with liblzma... " >&6; }
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
15996$as_echo "$LIBLZMA" >&6; }
15997 else
15998 HAVE_LIBLZMA=no
15999 CPPFLAGS="$ac_save_CPPFLAGS"
16000 LIBLZMA=
16001 LTLIBLZMA=
16002 fi
16003
16004
16005
16006
16007
16008
16009 if test "$HAVE_LIBLZMA" != yes; then
16010 if test "$with_lzma" = yes; then
16011 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
16012 fi
16013 fi
16014 fi
16015fi
16016
3fc11d3e
JM
16017LIBGUI="../libgui/src/libgui.a"
16018GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16019
16020
7a292a7a 16021
3fc11d3e
JM
16022WIN32LDAPP=
16023
16024
16025
d91670b9 16026case "${host}" in
686a5eed 16027*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16028 configdir="win"
16029 ;;
16030*)
16031 configdir="unix"
16032 ;;
16033esac
3fc11d3e
JM
16034
16035GDBTKLIBS=
16036if test "${enable_gdbtk}" = "yes"; then
16037
d1c3b63a
KS
16038 # Gdbtk must have an absolute path to srcdir in order to run
16039 # properly when not installed.
16040 here=`pwd`
16041 cd ${srcdir}
16042 GDBTK_SRC_DIR=`pwd`
16043 cd $here
16044
bec39cab 16045
5062cc19
KS
16046 #
16047 # Ok, lets find the tcl configuration
16048 # First, look for one uninstalled.
16049 # the alternative search directory is invoked by --with-tcl
16050 #
3fc11d3e 16051
5062cc19
KS
16052 if test x"${no_tcl}" = x ; then
16053 # we reset no_tcl in case something fails here
16054 no_tcl=true
bec39cab 16055
81ecdfbb
RW
16056# Check whether --with-tcl was given.
16057if test "${with_tcl+set}" = set; then :
16058 withval=$with_tcl; with_tclconfig=${withval}
16059fi
16060
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16062$as_echo_n "checking for Tcl configuration... " >&6; }
16063 if test "${ac_cv_c_tclconfig+set}" = set; then :
16064 $as_echo_n "(cached) " >&6
3fc11d3e 16065else
bec39cab 16066
3fc11d3e 16067
5062cc19
KS
16068 # First check to see if --with-tcl was specified.
16069 case "${host}" in
16070 *-*-cygwin*) platDir="win" ;;
16071 *) platDir="unix" ;;
16072 esac
16073 if test x"${with_tclconfig}" != x ; then
16074 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16075 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16076 else
81ecdfbb 16077 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16078 fi
16079 fi
16080
16081 # then check for a private Tcl installation
16082 if test x"${ac_cv_c_tclconfig}" = x ; then
16083 for i in \
16084 ../tcl \
16085 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16086 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16087 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16088 ../../tcl \
16089 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16090 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16091 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16092 ../../../tcl \
16093 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16094 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16095 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16096 if test -f "$i/$platDir/tclConfig.sh" ; then
16097 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16098 break
16099 fi
16100 done
16101 fi
16102
16103 # on Darwin, check in Framework installation locations
16104 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16105 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16106 `ls -d /Library/Frameworks 2>/dev/null` \
16107 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16108 `ls -d /System/Library/Frameworks 2>/dev/null` \
16109 ; do
16110 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16111 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16112 break
16113 fi
16114 done
16115 fi
16116
16117 # check in a few common install locations
16118 if test x"${ac_cv_c_tclconfig}" = x ; then
16119 for i in `ls -d ${libdir} 2>/dev/null` \
16120 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16121 `ls -d ${prefix}/lib 2>/dev/null` \
16122 `ls -d /usr/local/lib 2>/dev/null` \
16123 `ls -d /usr/contrib/lib 2>/dev/null` \
16124 `ls -d /usr/lib 2>/dev/null` \
16125 ; do
16126 if test -f "$i/tclConfig.sh" ; then
16127 ac_cv_c_tclconfig=`(cd $i; pwd)`
16128 break
16129 fi
16130 done
16131 fi
3fc11d3e 16132
5062cc19
KS
16133 # check in a few other private locations
16134 if test x"${ac_cv_c_tclconfig}" = x ; then
16135 for i in \
16136 ${srcdir}/../tcl \
16137 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16138 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16139 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16140 if test -f "$i/$platDir/tclConfig.sh" ; then
16141 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16142 break
16143 fi
16144 done
16145 fi
bec39cab 16146
3fc11d3e
JM
16147fi
16148
5062cc19
KS
16149
16150 if test x"${ac_cv_c_tclconfig}" = x ; then
16151 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16153$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16154 else
16155 no_tcl=
16156 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16158$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16159 fi
16160 fi
3fc11d3e 16161
bec39cab 16162
85541719
DE
16163 # If $no_tk is nonempty, then we can't do Tk, and there is no
16164 # point to doing Tcl.
bec39cab 16165
5062cc19
KS
16166 #
16167 # Ok, lets find the tk configuration
16168 # First, look for one uninstalled.
16169 # the alternative search directory is invoked by --with-tk
16170 #
3fc11d3e 16171
5062cc19
KS
16172 if test x"${no_tk}" = x ; then
16173 # we reset no_tk in case something fails here
16174 no_tk=true
bec39cab 16175
81ecdfbb
RW
16176# Check whether --with-tk was given.
16177if test "${with_tk+set}" = set; then :
16178 withval=$with_tk; with_tkconfig=${withval}
16179fi
16180
16181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16182$as_echo_n "checking for Tk configuration... " >&6; }
16183 if test "${ac_cv_c_tkconfig+set}" = set; then :
16184 $as_echo_n "(cached) " >&6
bec39cab 16185else
3fc11d3e
JM
16186
16187
5062cc19
KS
16188 # First check to see if --with-tkconfig was specified.
16189 if test x"${with_tkconfig}" != x ; then
16190 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16191 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16192 else
81ecdfbb 16193 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16194 fi
16195 fi
3fc11d3e 16196
5062cc19
KS
16197 # then check for a private Tk library
16198 case "${host}" in
16199 *-*-cygwin*) platDir="win" ;;
16200 *) platDir="unix" ;;
16201 esac
16202 if test x"${ac_cv_c_tkconfig}" = x ; then
16203 for i in \
16204 ../tk \
16205 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16206 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16207 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16208 ../../tk \
16209 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16210 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16211 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16212 ../../../tk \
16213 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16214 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16215 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16216 if test -f "$i/$platDir/tkConfig.sh" ; then
16217 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16218 break
16219 fi
16220 done
16221 fi
16222
16223 # on Darwin, check in Framework installation locations
16224 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16225 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16226 `ls -d /Library/Frameworks 2>/dev/null` \
16227 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16228 `ls -d /System/Library/Frameworks 2>/dev/null` \
16229 ; do
16230 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16231 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16232 break
16233 fi
16234 done
16235 fi
16236
16237 # check in a few common install locations
16238 if test x"${ac_cv_c_tkconfig}" = x ; then
16239 for i in `ls -d ${libdir} 2>/dev/null` \
16240 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16241 `ls -d ${prefix}/lib 2>/dev/null` \
16242 `ls -d /usr/local/lib 2>/dev/null` \
16243 `ls -d /usr/contrib/lib 2>/dev/null` \
16244 `ls -d /usr/lib 2>/dev/null` \
16245 ; do
16246 if test -f "$i/tkConfig.sh" ; then
16247 ac_cv_c_tkconfig=`(cd $i; pwd)`
16248 break
16249 fi
16250 done
16251 fi
16252 # check in a few other private locations
16253 if test x"${ac_cv_c_tkconfig}" = x ; then
16254 for i in \
16255 ${srcdir}/../tk \
16256 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16257 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16258 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16259 if test -f "$i/$platDir/tkConfig.sh" ; then
16260 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16261 break
16262 fi
16263 done
16264 fi
3fc11d3e 16265
3fc11d3e
JM
16266fi
16267
16268
5062cc19
KS
16269 if test x"${ac_cv_c_tkconfig}" = x ; then
16270 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16272$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16273 else
16274 no_tk=
16275 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16277$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16278 fi
3fc11d3e 16279 fi
dd2504ab 16280
dd2504ab 16281
85541719
DE
16282 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16283
81ecdfbb
RW
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16285$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16286
16287 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16289$as_echo "loading" >&6; }
85541719
DE
16290 . ${TCL_BIN_DIR}/tclConfig.sh
16291 else
81ecdfbb
RW
16292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16293$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16294 fi
16295
16296 # eval is required to do the TCL_DBGX substitution
16297 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16298 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16299
16300 # If the TCL_BIN_DIR is the build directory (not the install directory),
16301 # then set the common variable name to the value of the build variables.
16302 # For example, the variable TCL_LIB_SPEC will be set to the value
16303 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16304 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16305 # installed and uninstalled version of Tcl.
16306 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16307 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16308 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16309 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16310 elif test "`uname -s`" = "Darwin"; then
16311 # If Tcl was built as a framework, attempt to use the libraries
16312 # from the framework at the given location so that linking works
a68ffae9 16313 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16314 case ${TCL_DEFS} in
16315 *TCL_FRAMEWORK*)
16316 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16317 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16318 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16319 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16320 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16321 break
16322 fi
16323 done
16324 fi
16325 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16326 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16327 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16328 fi
16329 ;;
16330 esac
16331 fi
16332
16333 # eval is required to do the TCL_DBGX substitution
16334 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16335 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16336 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16337 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353 # Check for in-tree tcl
16354 here=`pwd`
16355 cd ${srcdir}/..
16356 topdir=`pwd`
16357 cd ${here}
16358
16359 intree="no"
16360 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16361 intree="yes"
16362 fi
16363
16364 # Find Tcl private headers
16365 if test x"${intree}" = xno; then
16366
81ecdfbb
RW
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16368$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16369 private_dir=""
16370 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16371 if test -f ${dir}/tclInt.h ; then
16372 private_dir=${dir}
16373 fi
16374
16375 if test x"${private_dir}" = x; then
81ecdfbb 16376 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16377 else
16378 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16380$as_echo "${private_dir}" >&6; }
85541719
DE
16381 fi
16382
16383 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16384 TCL_LIBRARY="${TCL_LIB_SPEC}"
16385 TCL_DEPS=""
16386 else
16387 # If building tcl in the same src tree, private headers
16388 # are not needed, but we need to be sure to use the right
16389 # headers library
16390 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16391 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16392 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16393 fi
16394
16395
16396
16397
16398
81ecdfbb
RW
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16400$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16401
5062cc19 16402 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16404$as_echo "loading" >&6; }
5062cc19 16405 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16406 else
81ecdfbb
RW
16407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16408$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16409 fi
bec39cab 16410
5062cc19
KS
16411 # eval is required to do the TK_DBGX substitution
16412 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16413 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16414
16415 # If the TK_BIN_DIR is the build directory (not the install directory),
16416 # then set the common variable name to the value of the build variables.
16417 # For example, the variable TK_LIB_SPEC will be set to the value
16418 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16419 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16420 # installed and uninstalled version of Tcl.
85541719 16421 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16422 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16423 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16424 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16425 elif test "`uname -s`" = "Darwin"; then
16426 # If Tk was built as a framework, attempt to use the libraries
16427 # from the framework at the given location so that linking works
a68ffae9 16428 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16429 case ${TK_DEFS} in
16430 *TK_FRAMEWORK*)
85541719 16431 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16432 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16433 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16434 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16435 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16436 break
16437 fi
16438 done
16439 fi
85541719 16440 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16441 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16442 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16443 fi
16444 ;;
16445 esac
3fc11d3e
JM
16446 fi
16447
5062cc19
KS
16448 # eval is required to do the TK_DBGX substitution
16449 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16450 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16451 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16452 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16453
3fc11d3e
JM
16454
16455
bec39cab
AC
16456
16457
16458
16459
16460
16461
16462
3fc11d3e 16463
3fc11d3e 16464
bec39cab 16465
bec39cab 16466
85541719
DE
16467 # Check for in-tree Tk
16468 intree="no"
16469 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16470 intree="yes"
16471 fi
3fc11d3e 16472
85541719
DE
16473 # Find Tk private headers
16474 if test x"${intree}" = xno; then
3fc11d3e 16475
81ecdfbb
RW
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16477$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16478 private_dir=""
16479 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16480 if test -f ${dir}/tkInt.h; then
16481 private_dir=${dir}
3fc11d3e 16482 fi
bec39cab 16483
5062cc19 16484 if test x"${private_dir}" = x; then
81ecdfbb 16485 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16486 else
5062cc19 16487 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16489$as_echo "${private_dir}" >&6; }
3fc11d3e 16490 fi
3fc11d3e 16491
85541719
DE
16492 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16493 TK_LIBRARY=${TK_LIB_SPEC}
16494 TK_DEPS=""
16495 else
16496 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16497 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16498 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16499 fi
3fc11d3e
JM
16500
16501
3fc11d3e
JM
16502
16503
3fc11d3e 16504
85541719 16505 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16506
85541719
DE
16507 # Include some libraries that Tcl and Tk want.
16508 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16509 # Yes, the ordering seems wrong here. But it isn't.
16510 # TK_LIBS is the list of libraries that need to be linked
16511 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16512 # were in LIBS then any link tests after this point would
16513 # try to include things like `$(LIBGUI)', which wouldn't work.
16514 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16515
85541719
DE
16516 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16517 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16518 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16519 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16520 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16521 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16522 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16523
85541719
DE
16524 if test x$gdb_cv_os_cygwin = xyes; then
16525 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16526 WIN32LDAPP="-Wl,--subsystem,console"
16527 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16528 fi
ffc6a242 16529
81ecdfbb 16530 subdirs="$subdirs gdbtk"
3ace7edb 16531
85541719 16532 fi
3fc11d3e
JM
16533fi
16534
16535
16536
16537
16538
16539
16540
16541
81ecdfbb
RW
16542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16543$as_echo_n "checking for X... " >&6; }
bec39cab 16544
c906108c 16545
81ecdfbb
RW
16546# Check whether --with-x was given.
16547if test "${with_x+set}" = set; then :
16548 withval=$with_x;
16549fi
c906108c
SS
16550
16551# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16552if test "x$with_x" = xno; then
16553 # The user explicitly disabled X.
16554 have_x=disabled
16555else
81ecdfbb
RW
16556 case $x_includes,$x_libraries in #(
16557 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16558 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16559 $as_echo_n "(cached) " >&6
c906108c
SS
16560else
16561 # One or both of the vars are not set, and there is no cached value.
bec39cab 16562ac_x_includes=no ac_x_libraries=no
81ecdfbb 16563rm -f -r conftest.dir
bec39cab
AC
16564if mkdir conftest.dir; then
16565 cd conftest.dir
bec39cab 16566 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16567incroot:
16568 @echo incroot='${INCROOT}'
16569usrlibdir:
16570 @echo usrlibdir='${USRLIBDIR}'
16571libdir:
16572 @echo libdir='${LIBDIR}'
16573_ACEOF
16574 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 16575 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
16576 for ac_var in incroot usrlibdir libdir; do
16577 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16578 done
c906108c 16579 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16580 for ac_extension in a so sl dylib la dll; do
16581 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16582 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16583 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16584 fi
16585 done
16586 # Screen out bogus values from the imake configuration. They are
16587 # bogus both because they are the default anyway, and because
16588 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16589 case $ac_im_incroot in
81ecdfbb 16590 /usr/include) ac_x_includes= ;;
bec39cab 16591 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16592 esac
bec39cab 16593 case $ac_im_usrlibdir in
81ecdfbb 16594 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16595 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16596 esac
16597 fi
16598 cd ..
81ecdfbb 16599 rm -f -r conftest.dir
c906108c
SS
16600fi
16601
bec39cab
AC
16602# Standard set of common directories for X headers.
16603# Check X11 before X11Rn because it is often a symlink to the current release.
16604ac_x_header_dirs='
16605/usr/X11/include
81ecdfbb 16606/usr/X11R7/include
bec39cab
AC
16607/usr/X11R6/include
16608/usr/X11R5/include
16609/usr/X11R4/include
16610
16611/usr/include/X11
81ecdfbb 16612/usr/include/X11R7
bec39cab
AC
16613/usr/include/X11R6
16614/usr/include/X11R5
16615/usr/include/X11R4
16616
16617/usr/local/X11/include
81ecdfbb 16618/usr/local/X11R7/include
bec39cab
AC
16619/usr/local/X11R6/include
16620/usr/local/X11R5/include
16621/usr/local/X11R4/include
16622
16623/usr/local/include/X11
81ecdfbb 16624/usr/local/include/X11R7
bec39cab
AC
16625/usr/local/include/X11R6
16626/usr/local/include/X11R5
16627/usr/local/include/X11R4
16628
16629/usr/X386/include
16630/usr/x386/include
16631/usr/XFree86/include/X11
16632
16633/usr/include
16634/usr/local/include
16635/usr/unsupported/include
16636/usr/athena/include
16637/usr/local/x11r5/include
16638/usr/lpp/Xamples/include
16639
16640/usr/openwin/include
16641/usr/openwin/share/include'
16642
16643if test "$ac_x_includes" = no; then
81ecdfbb 16644 # Guess where to find include files, by looking for Xlib.h.
c906108c 16645 # First, try using that file with no special directory specified.
81ecdfbb 16646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16647/* end confdefs.h. */
81ecdfbb 16648#include <X11/Xlib.h>
bec39cab 16649_ACEOF
81ecdfbb 16650if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16651 # We can compile using X headers with no special include directory.
16652ac_x_includes=
16653else
bec39cab 16654 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16655 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16656 ac_x_includes=$ac_dir
16657 break
16658 fi
16659done
c906108c 16660fi
bec39cab
AC
16661rm -f conftest.err conftest.$ac_ext
16662fi # $ac_x_includes = no
c906108c 16663
bec39cab 16664if test "$ac_x_libraries" = no; then
c906108c 16665 # Check for the libraries.
c906108c
SS
16666 # See if we find them without any special options.
16667 # Don't add to $LIBS permanently.
bec39cab 16668 ac_save_LIBS=$LIBS
81ecdfbb
RW
16669 LIBS="-lX11 $LIBS"
16670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16671/* end confdefs.h. */
81ecdfbb 16672#include <X11/Xlib.h>
bec39cab
AC
16673int
16674main ()
16675{
81ecdfbb 16676XrmInitialize ()
bec39cab
AC
16677 ;
16678 return 0;
16679}
16680_ACEOF
81ecdfbb 16681if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16682 LIBS=$ac_save_LIBS
c906108c
SS
16683# We can link X programs with no special library path.
16684ac_x_libraries=
16685else
81ecdfbb
RW
16686 LIBS=$ac_save_LIBS
16687for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16688do
bec39cab 16689 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16690 for ac_extension in a so sl dylib la dll; do
16691 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16692 ac_x_libraries=$ac_dir
16693 break 2
16694 fi
16695 done
16696done
16697fi
81ecdfbb
RW
16698rm -f core conftest.err conftest.$ac_objext \
16699 conftest$ac_exeext conftest.$ac_ext
bec39cab 16700fi # $ac_x_libraries = no
c906108c 16701
81ecdfbb
RW
16702case $ac_x_includes,$ac_x_libraries in #(
16703 no,* | *,no | *\'*)
16704 # Didn't find X, or a directory has "'" in its name.
16705 ac_cv_have_x="have_x=no";; #(
16706 *)
16707 # Record where we found X for the cache.
16708 ac_cv_have_x="have_x=yes\
16709 ac_x_includes='$ac_x_includes'\
16710 ac_x_libraries='$ac_x_libraries'"
16711esac
c906108c 16712fi
81ecdfbb
RW
16713;; #(
16714 *) have_x=yes;;
16715 esac
c906108c
SS
16716 eval "$ac_cv_have_x"
16717fi # $with_x != no
16718
16719if test "$have_x" != yes; then
81ecdfbb
RW
16720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16721$as_echo "$have_x" >&6; }
c906108c
SS
16722 no_x=yes
16723else
16724 # If each of the values was on the command line, it overrides each guess.
16725 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16726 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16727 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16728 ac_cv_have_x="have_x=yes\
16729 ac_x_includes='$x_includes'\
16730 ac_x_libraries='$x_libraries'"
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16732$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16733fi
16734
16735
bec39cab 16736# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16737# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16738# This code just checks for a few cases where we'd like to ignore those
16739# definitions, even when they're present in the '.mt' file. These cases
16740# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16741# not part of the source tree.
7a292a7a 16742#
81ecdfbb
RW
16743# Check whether --enable-sim was given.
16744if test "${enable_sim+set}" = set; then :
16745 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16746 echo "enableval = ${enableval}";
16747 case "${enableval}" in
16748 yes) ignore_sim=false ;;
16749 no) ignore_sim=true ;;
16750 *) ignore_sim=false ;;
16751 esac
16752else
16753 ignore_sim=false
81ecdfbb
RW
16754fi
16755
7a292a7a
SS
16756
16757if test ! -d "${srcdir}/../sim"; then
16758 ignore_sim=true
16759fi
16760
9b624dbe
UW
16761SIM=
16762SIM_OBS=
16763if test "${ignore_sim}" = "false"; then
16764 if test x"${gdb_sim}" != x ; then
16765 SIM="${gdb_sim}"
16766 SIM_OBS="remote-sim.o"
60ca704f 16767
81ecdfbb 16768$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16769
976102cd
PA
16770
16771 # Some tdep code should only be compiled in when the ppc sim is
16772 # built. PR sim/13418.
16773 case $target in
16774 powerpc*-*-*)
16775
16776$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16777
16778 ;;
16779 esac
9b624dbe 16780 fi
7a292a7a
SS
16781fi
16782
16783
16784
c906108c
SS
16785
16786
16787
16788
16789
16790
dfcd3bfb 16791
e56ac5c3
AC
16792
16793
b3a90332
AC
16794
16795
c35f4ffc 16796# List of host floatformats.
bec39cab
AC
16797
16798cat >>confdefs.h <<_ACEOF
c35f4ffc 16799#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16800_ACEOF
c35f4ffc 16801
bec39cab
AC
16802
16803cat >>confdefs.h <<_ACEOF
c35f4ffc 16804#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16805_ACEOF
16806
c35f4ffc 16807
bec39cab 16808cat >>confdefs.h <<_ACEOF
c35f4ffc 16809#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16810_ACEOF
c35f4ffc
AC
16811
16812
c906108c
SS
16813# target_subdir is used by the testsuite to find the target libraries.
16814target_subdir=
16815if test "${host}" != "${target}"; then
16816 target_subdir="${target_alias}/"
16817fi
16818
16819
16820frags=
771b4502 16821if test "${gdb_native}" = "yes"; then
0dad8a66
MK
16822 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
16823 if test ! -f ${host_makefile_frag}; then
81ecdfbb 16824 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
16825 fi
16826 frags="$frags $host_makefile_frag"
16827else
16828 host_makefile_frag=/dev/null
c906108c 16829fi
c906108c 16830
c906108c
SS
16831
16832
16833
771b4502 16834if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
16835# We pick this up from the host configuration file (.mh) because we
16836# do not have a native configuration Makefile fragment.
c906108c
SS
16837nativefile=`sed -n '
16838s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
16839' ${host_makefile_frag}`
c906108c
SS
16840fi
16841
16842
b00a8037 16843if test x"${gdb_osabi}" != x ; then
bec39cab
AC
16844
16845cat >>confdefs.h <<_ACEOF
b00a8037 16846#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 16847_ACEOF
b00a8037
DJ
16848
16849fi
16850
8dcde887 16851# Enable multi-ice-gdb-server.
81ecdfbb
RW
16852# Check whether --enable-multi-ice was given.
16853if test "${enable_multi_ice+set}" = set; then :
16854 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
16855 yes | no)
16856 ;;
81ecdfbb 16857 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 16858 esac
81ecdfbb 16859fi
b4e70030 16860
81ecdfbb
RW
16861if test "x$enable_multi_ice" = xyes; then
16862 subdirs="$subdirs multi-ice"
3ace7edb 16863
a85f51e7
DJ
16864fi
16865
496c0e1b
JB
16866# Check whether --enable-gdbserver was given.
16867if test "${enable_gdbserver+set}" = set; then :
16868 enableval=$enable_gdbserver; case "${enableval}" in
16869 yes| no|auto) ;;
16870 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
16871esac
16872else
16873 enable_gdbserver=auto
16874fi
16875
16876
16877# We only build gdbserver automatically in a native configuration, and
16878# only if the user did not explicitly disable its build.
16879if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
16880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
16881$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 16882 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16884$as_echo "yes" >&6; }
16885 subdirs="$subdirs gdbserver"
3ace7edb 16886
496c0e1b 16887 gdbserver_build_enabled=yes
8dcde887 16888 else
81ecdfbb
RW
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16890$as_echo "no" >&6; }
8dcde887
MK
16891 fi
16892fi
16893
496c0e1b
JB
16894# If the user explicitly request the gdbserver to be built, verify that
16895# we were in fact able to enable it.
16896if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
16897 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
16898fi
16899
393fd4c3
YQ
16900# Check for babeltrace and babeltrace-ctf
16901
16902# Check whether --with-babeltrace was given.
16903if test "${with_babeltrace+set}" = set; then :
16904 withval=$with_babeltrace;
16905else
16906 with_babeltrace=auto
16907fi
16908
16909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
16910$as_echo_n "checking whether to use babeltrace... " >&6; }
16911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
16912$as_echo "$with_babeltrace" >&6; }
16913
16914if test "x$with_babeltrace" = "xno"; then
16915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
16916$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
16917else
16918 # Append -Werror to CFLAGS so that configure can catch the warning
16919 # "assignment from incompatible pointer type", which is related to
16920 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
16921 # in GDB, while babeltrace 1.0.3 is broken.
16922 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
16923 # safe to save and restore CFLAGS here.
16924 saved_CFLAGS=$CFLAGS
16925 CFLAGS="$CFLAGS -Werror"
16926
16927
16928
16929
16930
16931
16932
16933
16934 use_additional=yes
16935
16936 acl_save_prefix="$prefix"
16937 prefix="$acl_final_prefix"
16938 acl_save_exec_prefix="$exec_prefix"
16939 exec_prefix="$acl_final_exec_prefix"
16940
16941 eval additional_includedir=\"$includedir\"
16942 eval additional_libdir=\"$libdir\"
16943
16944 exec_prefix="$acl_save_exec_prefix"
16945 prefix="$acl_save_prefix"
16946
16947
16948# Check whether --with-libbabeltrace-prefix was given.
16949if test "${with_libbabeltrace_prefix+set}" = set; then :
16950 withval=$with_libbabeltrace_prefix;
16951 if test "X$withval" = "Xno"; then
16952 use_additional=no
16953 else
16954 if test "X$withval" = "X"; then
16955
16956 acl_save_prefix="$prefix"
16957 prefix="$acl_final_prefix"
16958 acl_save_exec_prefix="$exec_prefix"
16959 exec_prefix="$acl_final_exec_prefix"
16960
16961 eval additional_includedir=\"$includedir\"
16962 eval additional_libdir=\"$libdir\"
16963
16964 exec_prefix="$acl_save_exec_prefix"
16965 prefix="$acl_save_prefix"
16966
16967 else
16968 additional_includedir="$withval/include"
16969 additional_libdir="$withval/lib"
16970 fi
16971 fi
16972
16973fi
16974
16975 LIBBABELTRACE=
16976 LTLIBBABELTRACE=
16977 INCBABELTRACE=
16978 rpathdirs=
16979 ltrpathdirs=
16980 names_already_handled=
16981 names_next_round='babeltrace babeltrace-ctf'
16982 while test -n "$names_next_round"; do
16983 names_this_round="$names_next_round"
16984 names_next_round=
16985 for name in $names_this_round; do
16986 already_handled=
16987 for n in $names_already_handled; do
16988 if test "$n" = "$name"; then
16989 already_handled=yes
16990 break
16991 fi
16992 done
16993 if test -z "$already_handled"; then
16994 names_already_handled="$names_already_handled $name"
16995 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16996 eval value=\"\$HAVE_LIB$uppername\"
16997 if test -n "$value"; then
16998 if test "$value" = yes; then
16999 eval value=\"\$LIB$uppername\"
17000 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17001 eval value=\"\$LTLIB$uppername\"
17002 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17003 else
17004 :
17005 fi
17006 else
17007 found_dir=
17008 found_la=
17009 found_so=
17010 found_a=
17011 if test $use_additional = yes; then
17012 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17013 found_dir="$additional_libdir"
17014 found_so="$additional_libdir/lib$name.$shlibext"
17015 if test -f "$additional_libdir/lib$name.la"; then
17016 found_la="$additional_libdir/lib$name.la"
17017 fi
17018 else
17019 if test -f "$additional_libdir/lib$name.$libext"; then
17020 found_dir="$additional_libdir"
17021 found_a="$additional_libdir/lib$name.$libext"
17022 if test -f "$additional_libdir/lib$name.la"; then
17023 found_la="$additional_libdir/lib$name.la"
17024 fi
17025 fi
17026 fi
17027 fi
17028 if test "X$found_dir" = "X"; then
17029 for x in $LDFLAGS $LTLIBBABELTRACE; do
17030
17031 acl_save_prefix="$prefix"
17032 prefix="$acl_final_prefix"
17033 acl_save_exec_prefix="$exec_prefix"
17034 exec_prefix="$acl_final_exec_prefix"
17035 eval x=\"$x\"
17036 exec_prefix="$acl_save_exec_prefix"
17037 prefix="$acl_save_prefix"
17038
17039 case "$x" in
17040 -L*)
17041 dir=`echo "X$x" | sed -e 's/^X-L//'`
17042 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17043 found_dir="$dir"
17044 found_so="$dir/lib$name.$shlibext"
17045 if test -f "$dir/lib$name.la"; then
17046 found_la="$dir/lib$name.la"
17047 fi
17048 else
17049 if test -f "$dir/lib$name.$libext"; then
17050 found_dir="$dir"
17051 found_a="$dir/lib$name.$libext"
17052 if test -f "$dir/lib$name.la"; then
17053 found_la="$dir/lib$name.la"
17054 fi
17055 fi
17056 fi
17057 ;;
17058 esac
17059 if test "X$found_dir" != "X"; then
17060 break
17061 fi
17062 done
17063 fi
17064 if test "X$found_dir" != "X"; then
17065 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17066 if test "X$found_so" != "X"; then
17067 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17068 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17069 else
17070 haveit=
17071 for x in $ltrpathdirs; do
17072 if test "X$x" = "X$found_dir"; then
17073 haveit=yes
17074 break
17075 fi
17076 done
17077 if test -z "$haveit"; then
17078 ltrpathdirs="$ltrpathdirs $found_dir"
17079 fi
17080 if test "$hardcode_direct" = yes; then
17081 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17082 else
17083 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17084 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17085 haveit=
17086 for x in $rpathdirs; do
17087 if test "X$x" = "X$found_dir"; then
17088 haveit=yes
17089 break
17090 fi
17091 done
17092 if test -z "$haveit"; then
17093 rpathdirs="$rpathdirs $found_dir"
17094 fi
17095 else
17096 haveit=
17097 for x in $LDFLAGS $LIBBABELTRACE; do
17098
17099 acl_save_prefix="$prefix"
17100 prefix="$acl_final_prefix"
17101 acl_save_exec_prefix="$exec_prefix"
17102 exec_prefix="$acl_final_exec_prefix"
17103 eval x=\"$x\"
17104 exec_prefix="$acl_save_exec_prefix"
17105 prefix="$acl_save_prefix"
17106
17107 if test "X$x" = "X-L$found_dir"; then
17108 haveit=yes
17109 break
17110 fi
17111 done
17112 if test -z "$haveit"; then
17113 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17114 fi
17115 if test "$hardcode_minus_L" != no; then
17116 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17117 else
17118 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17119 fi
17120 fi
17121 fi
17122 fi
17123 else
17124 if test "X$found_a" != "X"; then
17125 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17126 else
17127 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17128 fi
17129 fi
17130 additional_includedir=
17131 case "$found_dir" in
17132 */lib | */lib/)
17133 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17134 additional_includedir="$basedir/include"
17135 ;;
17136 esac
17137 if test "X$additional_includedir" != "X"; then
17138 if test "X$additional_includedir" != "X/usr/include"; then
17139 haveit=
17140 if test "X$additional_includedir" = "X/usr/local/include"; then
17141 if test -n "$GCC"; then
17142 case $host_os in
17143 linux*) haveit=yes;;
17144 esac
17145 fi
17146 fi
17147 if test -z "$haveit"; then
17148 for x in $CPPFLAGS $INCBABELTRACE; do
17149
17150 acl_save_prefix="$prefix"
17151 prefix="$acl_final_prefix"
17152 acl_save_exec_prefix="$exec_prefix"
17153 exec_prefix="$acl_final_exec_prefix"
17154 eval x=\"$x\"
17155 exec_prefix="$acl_save_exec_prefix"
17156 prefix="$acl_save_prefix"
17157
17158 if test "X$x" = "X-I$additional_includedir"; then
17159 haveit=yes
17160 break
17161 fi
17162 done
17163 if test -z "$haveit"; then
17164 if test -d "$additional_includedir"; then
17165 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17166 fi
17167 fi
17168 fi
17169 fi
17170 fi
17171 if test -n "$found_la"; then
17172 save_libdir="$libdir"
17173 case "$found_la" in
17174 */* | *\\*) . "$found_la" ;;
17175 *) . "./$found_la" ;;
17176 esac
17177 libdir="$save_libdir"
17178 for dep in $dependency_libs; do
17179 case "$dep" in
17180 -L*)
17181 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17182 if test "X$additional_libdir" != "X/usr/lib"; then
17183 haveit=
17184 if test "X$additional_libdir" = "X/usr/local/lib"; then
17185 if test -n "$GCC"; then
17186 case $host_os in
17187 linux*) haveit=yes;;
17188 esac
17189 fi
17190 fi
17191 if test -z "$haveit"; then
17192 haveit=
17193 for x in $LDFLAGS $LIBBABELTRACE; do
17194
17195 acl_save_prefix="$prefix"
17196 prefix="$acl_final_prefix"
17197 acl_save_exec_prefix="$exec_prefix"
17198 exec_prefix="$acl_final_exec_prefix"
17199 eval x=\"$x\"
17200 exec_prefix="$acl_save_exec_prefix"
17201 prefix="$acl_save_prefix"
17202
17203 if test "X$x" = "X-L$additional_libdir"; then
17204 haveit=yes
17205 break
17206 fi
17207 done
17208 if test -z "$haveit"; then
17209 if test -d "$additional_libdir"; then
17210 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17211 fi
17212 fi
17213 haveit=
17214 for x in $LDFLAGS $LTLIBBABELTRACE; do
17215
17216 acl_save_prefix="$prefix"
17217 prefix="$acl_final_prefix"
17218 acl_save_exec_prefix="$exec_prefix"
17219 exec_prefix="$acl_final_exec_prefix"
17220 eval x=\"$x\"
17221 exec_prefix="$acl_save_exec_prefix"
17222 prefix="$acl_save_prefix"
17223
17224 if test "X$x" = "X-L$additional_libdir"; then
17225 haveit=yes
17226 break
17227 fi
17228 done
17229 if test -z "$haveit"; then
17230 if test -d "$additional_libdir"; then
17231 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17232 fi
17233 fi
17234 fi
17235 fi
17236 ;;
17237 -R*)
17238 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17239 if test "$enable_rpath" != no; then
17240 haveit=
17241 for x in $rpathdirs; do
17242 if test "X$x" = "X$dir"; then
17243 haveit=yes
17244 break
17245 fi
17246 done
17247 if test -z "$haveit"; then
17248 rpathdirs="$rpathdirs $dir"
17249 fi
17250 haveit=
17251 for x in $ltrpathdirs; do
17252 if test "X$x" = "X$dir"; then
17253 haveit=yes
17254 break
17255 fi
17256 done
17257 if test -z "$haveit"; then
17258 ltrpathdirs="$ltrpathdirs $dir"
17259 fi
17260 fi
17261 ;;
17262 -l*)
17263 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17264 ;;
17265 *.la)
17266 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17267 ;;
17268 *)
17269 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17270 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17271 ;;
17272 esac
17273 done
17274 fi
17275 else
17276 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17277 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17278 fi
17279 fi
17280 fi
17281 done
17282 done
17283 if test "X$rpathdirs" != "X"; then
17284 if test -n "$hardcode_libdir_separator"; then
17285 alldirs=
17286 for found_dir in $rpathdirs; do
17287 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17288 done
17289 acl_save_libdir="$libdir"
17290 libdir="$alldirs"
17291 eval flag=\"$hardcode_libdir_flag_spec\"
17292 libdir="$acl_save_libdir"
17293 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17294 else
17295 for found_dir in $rpathdirs; do
17296 acl_save_libdir="$libdir"
17297 libdir="$found_dir"
17298 eval flag=\"$hardcode_libdir_flag_spec\"
17299 libdir="$acl_save_libdir"
17300 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17301 done
17302 fi
17303 fi
17304 if test "X$ltrpathdirs" != "X"; then
17305 for found_dir in $ltrpathdirs; do
17306 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17307 done
17308 fi
17309
17310
17311 ac_save_CPPFLAGS="$CPPFLAGS"
17312
17313 for element in $INCBABELTRACE; do
17314 haveit=
17315 for x in $CPPFLAGS; do
17316
17317 acl_save_prefix="$prefix"
17318 prefix="$acl_final_prefix"
17319 acl_save_exec_prefix="$exec_prefix"
17320 exec_prefix="$acl_final_exec_prefix"
17321 eval x=\"$x\"
17322 exec_prefix="$acl_save_exec_prefix"
17323 prefix="$acl_save_prefix"
17324
17325 if test "X$x" = "X$element"; then
17326 haveit=yes
17327 break
17328 fi
17329 done
17330 if test -z "$haveit"; then
17331 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17332 fi
17333 done
17334
17335
17336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17337$as_echo_n "checking for libbabeltrace... " >&6; }
17338if test "${ac_cv_libbabeltrace+set}" = set; then :
17339 $as_echo_n "(cached) " >&6
17340else
17341
17342 ac_save_LIBS="$LIBS"
17343 LIBS="$LIBS $LIBBABELTRACE"
17344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345/* end confdefs.h. */
17346#include <babeltrace/babeltrace.h>
17347 #include <babeltrace/ctf/events.h>
17348 #include <babeltrace/ctf/iterator.h>
17349int
17350main ()
17351{
17352struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17353 struct bt_ctf_event *event = NULL;
17354 const struct bt_definition *scope;
17355
13cdc2af 17356 pos->type = BT_SEEK_BEGIN;
65c749e7 17357 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17358 scope = bt_ctf_get_top_level_scope (event,
17359 BT_STREAM_EVENT_HEADER);
17360 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17361
17362 ;
17363 return 0;
17364}
17365_ACEOF
17366if ac_fn_c_try_link "$LINENO"; then :
17367 ac_cv_libbabeltrace=yes
17368else
17369 ac_cv_libbabeltrace=no
17370fi
17371rm -f core conftest.err conftest.$ac_objext \
17372 conftest$ac_exeext conftest.$ac_ext
17373 LIBS="$ac_save_LIBS"
17374
17375fi
17376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17377$as_echo "$ac_cv_libbabeltrace" >&6; }
17378 if test "$ac_cv_libbabeltrace" = yes; then
17379 HAVE_LIBBABELTRACE=yes
17380
17381$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17382
17383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17384$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17386$as_echo "$LIBBABELTRACE" >&6; }
17387 else
17388 HAVE_LIBBABELTRACE=no
17389 CPPFLAGS="$ac_save_CPPFLAGS"
17390 LIBBABELTRACE=
17391 LTLIBBABELTRACE=
17392 fi
17393
17394
17395
17396
17397
17398
17399 CFLAGS=$saved_CFLAGS
17400
17401 if test "$HAVE_LIBBABELTRACE" != yes; then
17402 if test "$with_babeltrace" = yes; then
17403 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17404 else
17405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17406$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17407 fi
17408 fi
17409fi
17410
db985757 17411# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 17412# to an empty version.
c906108c
SS
17413
17414files=
17415links=
5a2402b8 17416
c906108c
SS
17417rm -f nm.h
17418if test "${nativefile}" != ""; then
0f475e27
AC
17419 case "${nativefile}" in
17420 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17421 * ) GDB_NM_FILE="${nativefile}"
17422 esac
5a2402b8
AC
17423 files="${files} ${GDB_NM_FILE}"
17424 links="${links} nm.h"
60ca704f
SE
17425
17426cat >>confdefs.h <<_ACEOF
b78960be 17427#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17428_ACEOF
5a2402b8 17429
c906108c 17430fi
5a2402b8
AC
17431
17432
e3487908
GKB
17433for ac_prog in xsltproc
17434do
17435 # Extract the first word of "$ac_prog", so it can be a program name with args.
17436set dummy $ac_prog; ac_word=$2
17437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17438$as_echo_n "checking for $ac_word... " >&6; }
17439if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17440 $as_echo_n "(cached) " >&6
17441else
17442 case $XSLTPROC in
17443 [\\/]* | ?:[\\/]*)
17444 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17445 ;;
17446 *)
17447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17448for as_dir in $PATH
17449do
17450 IFS=$as_save_IFS
17451 test -z "$as_dir" && as_dir=.
17452 for ac_exec_ext in '' $ac_executable_extensions; do
17453 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17454 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17455 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17456 break 2
17457 fi
17458done
17459 done
17460IFS=$as_save_IFS
17461
17462 ;;
17463esac
17464fi
17465XSLTPROC=$ac_cv_path_XSLTPROC
17466if test -n "$XSLTPROC"; then
17467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17468$as_echo "$XSLTPROC" >&6; }
17469else
17470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17471$as_echo "no" >&6; }
17472fi
17473
17474
17475 test -n "$XSLTPROC" && break
17476done
17477test -n "$XSLTPROC" || XSLTPROC="missing"
17478
17479if test "x$USE_MAINTAINER_MODE" = xyes; then
17480 if test "${XSLTPROC}" = missing; then
17481 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
17482 fi
17483fi
17484
17485
bec39cab
AC
17486ac_sources="$files"
17487ac_dests="$links"
17488while test -n "$ac_sources"; do
17489 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17490 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17491 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17492done
81ecdfbb 17493ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17494
17495
c906108c
SS
17496
17497
c906108c 17498
81ecdfbb 17499$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17500
bec39cab 17501
dcd1f979
TT
17502if $development; then
17503
17504$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17505
17506fi
17507
b292c783 17508
f6a88844
JM
17509 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17510 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17511 if test "x$GDB_TRANSFORM_NAME" = x; then
17512 GDB_TRANSFORM_NAME=gdb
17513 fi
17514
17515
17516
17517 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17518 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17519 if test "x$GCORE_TRANSFORM_NAME" = x; then
17520 GCORE_TRANSFORM_NAME=gcore
17521 fi
17522
b292c783
JK
17523
17524ac_config_files="$ac_config_files gcore"
17525
c971b7fa 17526ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 17527
89a34d1b 17528
bec39cab
AC
17529cat >confcache <<\_ACEOF
17530# This file is a shell script that caches the results of configure
17531# tests run on this system so they can be shared between configure
17532# scripts and configure runs, see configure's option --config-cache.
17533# It is not useful on other systems. If it contains results you don't
17534# want to keep, you may remove or edit it.
17535#
17536# config.status only pays attention to the cache file if you give it
17537# the --recheck option to rerun configure.
17538#
17539# `ac_cv_env_foo' variables (set or unset) will be overridden when
17540# loading this file, other *unset* `ac_cv_foo' will be assigned the
17541# following values.
17542
17543_ACEOF
17544
17545# The following way of writing the cache mishandles newlines in values,
17546# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17547# So, we kill variables containing newlines.
bec39cab
AC
17548# Ultrix sh set writes to stderr and can't be redirected directly,
17549# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17550(
17551 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17552 eval ac_val=\$$ac_var
17553 case $ac_val in #(
17554 *${as_nl}*)
17555 case $ac_var in #(
17556 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17557$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17558 esac
17559 case $ac_var in #(
17560 _ | IFS | as_nl) ;; #(
17561 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17562 *) { eval $ac_var=; unset $ac_var;} ;;
17563 esac ;;
17564 esac
17565 done
17566
bec39cab 17567 (set) 2>&1 |
81ecdfbb
RW
17568 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17569 *${as_nl}ac_space=\ *)
17570 # `set' does not quote correctly, so add quotes: double-quote
17571 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17572 sed -n \
17573 "s/'/'\\\\''/g;
17574 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17575 ;; #(
bec39cab
AC
17576 *)
17577 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17578 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17579 ;;
81ecdfbb
RW
17580 esac |
17581 sort
17582) |
bec39cab 17583 sed '
81ecdfbb 17584 /^ac_cv_env_/b end
bec39cab 17585 t clear
81ecdfbb 17586 :clear
bec39cab
AC
17587 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17588 t end
81ecdfbb
RW
17589 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17590 :end' >>confcache
17591if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17592 if test -w "$cache_file"; then
17593 test "x$cache_file" != "x/dev/null" &&
17594 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17595$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
17596 cat confcache >$cache_file
17597 else
81ecdfbb
RW
17598 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17599$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17600 fi
17601fi
17602rm -f confcache
17603
17604test "x$prefix" = xNONE && prefix=$ac_default_prefix
17605# Let make expand exec_prefix.
17606test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17607
bec39cab
AC
17608DEFS=-DHAVE_CONFIG_H
17609
17610ac_libobjs=
17611ac_ltlibobjs=
17612for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17613 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17614 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17615 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17616 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17617 # will be set to the directory where LIBOBJS objects are built.
17618 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17619 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17620done
17621LIBOBJS=$ac_libobjs
17622
17623LTLIBOBJS=$ac_ltlibobjs
17624
17625
85981d60 17626if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
17627 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17628Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17629fi
a417dc56 17630if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
17631 as_fn_error "conditional \"GMAKE\" was never defined.
17632Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 17633fi
4df42755
DE
17634if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17635 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17636Usually this means the macro was only invoked conditionally." "$LINENO" 5
17637fi
17638if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17639 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17640Usually this means the macro was only invoked conditionally." "$LINENO" 5
17641fi
81ecdfbb
RW
17642
17643
bec39cab 17644: ${CONFIG_STATUS=./config.status}
81ecdfbb 17645ac_write_fail=0
bec39cab
AC
17646ac_clean_files_save=$ac_clean_files
17647ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17648{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17649$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17650as_write_fail=0
17651cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17652#! $SHELL
17653# Generated by $as_me.
17654# Run this file to recreate the current configuration.
17655# Compiler output produced by configure, useful for debugging
17656# configure, is in config.log if it exists.
17657
17658debug=false
17659ac_cs_recheck=false
17660ac_cs_silent=false
bec39cab 17661
81ecdfbb
RW
17662SHELL=\${CONFIG_SHELL-$SHELL}
17663export SHELL
17664_ASEOF
17665cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17666## -------------------- ##
17667## M4sh Initialization. ##
17668## -------------------- ##
17669
17670# Be more Bourne compatible
17671DUALCASE=1; export DUALCASE # for MKS sh
17672if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17673 emulate sh
17674 NULLCMD=:
81ecdfbb 17675 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17676 # is contrary to our usage. Disable this feature.
17677 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17678 setopt NO_GLOB_SUBST
17679else
17680 case `(set -o) 2>/dev/null` in #(
17681 *posix*) :
17682 set -o posix ;; #(
17683 *) :
17684 ;;
17685esac
bec39cab 17686fi
bec39cab 17687
81ecdfbb
RW
17688
17689as_nl='
17690'
17691export as_nl
17692# Printing a long string crashes Solaris 7 /usr/bin/printf.
17693as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17694as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17695as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17696# Prefer a ksh shell builtin over an external printf program on Solaris,
17697# but without wasting forks for bash or zsh.
17698if test -z "$BASH_VERSION$ZSH_VERSION" \
17699 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17700 as_echo='print -r --'
17701 as_echo_n='print -rn --'
17702elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17703 as_echo='printf %s\n'
17704 as_echo_n='printf %s'
17705else
17706 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17707 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17708 as_echo_n='/usr/ucb/echo -n'
17709 else
17710 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17711 as_echo_n_body='eval
17712 arg=$1;
17713 case $arg in #(
17714 *"$as_nl"*)
17715 expr "X$arg" : "X\\(.*\\)$as_nl";
17716 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17717 esac;
17718 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17719 '
17720 export as_echo_n_body
17721 as_echo_n='sh -c $as_echo_n_body as_echo'
17722 fi
17723 export as_echo_body
17724 as_echo='sh -c $as_echo_body as_echo'
17725fi
17726
17727# The user is always right.
17728if test "${PATH_SEPARATOR+set}" != set; then
17729 PATH_SEPARATOR=:
17730 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17731 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17732 PATH_SEPARATOR=';'
17733 }
bec39cab
AC
17734fi
17735
17736
81ecdfbb
RW
17737# IFS
17738# We need space, tab and new line, in precisely that order. Quoting is
17739# there to prevent editors from complaining about space-tab.
17740# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17741# splitting by setting IFS to empty value.)
17742IFS=" "" $as_nl"
17743
17744# Find who we are. Look in the path if we contain no directory separator.
17745case $0 in #((
17746 *[\\/]* ) as_myself=$0 ;;
17747 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17748for as_dir in $PATH
17749do
17750 IFS=$as_save_IFS
17751 test -z "$as_dir" && as_dir=.
17752 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17753 done
17754IFS=$as_save_IFS
17755
17756 ;;
17757esac
17758# We did not find ourselves, most probably we were run as `sh COMMAND'
17759# in which case we are not to be found in the path.
17760if test "x$as_myself" = x; then
17761 as_myself=$0
17762fi
17763if test ! -f "$as_myself"; then
17764 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17765 exit 1
17766fi
17767
17768# Unset variables that we do not need and which cause bugs (e.g. in
17769# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17770# suppresses any "Segmentation fault" message there. '((' could
17771# trigger a bug in pdksh 5.2.14.
17772for as_var in BASH_ENV ENV MAIL MAILPATH
17773do eval test x\${$as_var+set} = xset \
17774 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17775done
bec39cab
AC
17776PS1='$ '
17777PS2='> '
17778PS4='+ '
17779
17780# NLS nuisances.
81ecdfbb
RW
17781LC_ALL=C
17782export LC_ALL
17783LANGUAGE=C
17784export LANGUAGE
17785
17786# CDPATH.
17787(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17788
17789
17790# as_fn_error ERROR [LINENO LOG_FD]
17791# ---------------------------------
17792# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17793# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17794# script with status $?, using 1 if that was 0.
17795as_fn_error ()
17796{
17797 as_status=$?; test $as_status -eq 0 && as_status=1
17798 if test "$3"; then
17799 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17800 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17801 fi
17802 $as_echo "$as_me: error: $1" >&2
17803 as_fn_exit $as_status
17804} # as_fn_error
17805
17806
17807# as_fn_set_status STATUS
17808# -----------------------
17809# Set $? to STATUS, without forking.
17810as_fn_set_status ()
17811{
17812 return $1
17813} # as_fn_set_status
17814
17815# as_fn_exit STATUS
17816# -----------------
17817# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17818as_fn_exit ()
17819{
17820 set +e
17821 as_fn_set_status $1
17822 exit $1
17823} # as_fn_exit
17824
17825# as_fn_unset VAR
17826# ---------------
17827# Portably unset VAR.
17828as_fn_unset ()
17829{
17830 { eval $1=; unset $1;}
17831}
17832as_unset=as_fn_unset
17833# as_fn_append VAR VALUE
17834# ----------------------
17835# Append the text in VALUE to the end of the definition contained in VAR. Take
17836# advantage of any shell optimizations that allow amortized linear growth over
17837# repeated appends, instead of the typical quadratic growth present in naive
17838# implementations.
17839if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17840 eval 'as_fn_append ()
17841 {
17842 eval $1+=\$2
17843 }'
17844else
17845 as_fn_append ()
17846 {
17847 eval $1=\$$1\$2
17848 }
17849fi # as_fn_append
17850
17851# as_fn_arith ARG...
17852# ------------------
17853# Perform arithmetic evaluation on the ARGs, and store the result in the
17854# global $as_val. Take advantage of shells that can avoid forks. The arguments
17855# must be portable across $(()) and expr.
17856if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17857 eval 'as_fn_arith ()
17858 {
17859 as_val=$(( $* ))
17860 }'
17861else
17862 as_fn_arith ()
17863 {
17864 as_val=`expr "$@" || test $? -eq 1`
17865 }
17866fi # as_fn_arith
bec39cab 17867
81ecdfbb
RW
17868
17869if expr a : '\(a\)' >/dev/null 2>&1 &&
17870 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
17871 as_expr=expr
17872else
17873 as_expr=false
17874fi
17875
81ecdfbb 17876if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
17877 as_basename=basename
17878else
17879 as_basename=false
17880fi
17881
81ecdfbb
RW
17882if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17883 as_dirname=dirname
17884else
17885 as_dirname=false
17886fi
bec39cab 17887
81ecdfbb 17888as_me=`$as_basename -- "$0" ||
bec39cab
AC
17889$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17890 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
17891 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17892$as_echo X/"$0" |
17893 sed '/^.*\/\([^/][^/]*\)\/*$/{
17894 s//\1/
17895 q
17896 }
17897 /^X\/\(\/\/\)$/{
17898 s//\1/
17899 q
17900 }
17901 /^X\/\(\/\).*/{
17902 s//\1/
17903 q
17904 }
17905 s/.*/./; q'`
b4e70030 17906
b4e70030
JB
17907# Avoid depending upon Character Ranges.
17908as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17909as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17910as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17911as_cr_digits='0123456789'
17912as_cr_alnum=$as_cr_Letters$as_cr_digits
17913
81ecdfbb
RW
17914ECHO_C= ECHO_N= ECHO_T=
17915case `echo -n x` in #(((((
17916-n*)
17917 case `echo 'xy\c'` in
17918 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17919 xy) ECHO_C='\c';;
17920 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17921 ECHO_T=' ';;
17922 esac;;
17923*)
17924 ECHO_N='-n';;
bec39cab
AC
17925esac
17926
81ecdfbb
RW
17927rm -f conf$$ conf$$.exe conf$$.file
17928if test -d conf$$.dir; then
17929 rm -f conf$$.dir/conf$$.file
bec39cab 17930else
81ecdfbb
RW
17931 rm -f conf$$.dir
17932 mkdir conf$$.dir 2>/dev/null
bec39cab 17933fi
81ecdfbb
RW
17934if (echo >conf$$.file) 2>/dev/null; then
17935 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 17936 as_ln_s='ln -s'
81ecdfbb
RW
17937 # ... but there are two gotchas:
17938 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17939 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17940 # In both cases, we have to default to `cp -p'.
17941 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17942 as_ln_s='cp -p'
17943 elif ln conf$$.file conf$$ 2>/dev/null; then
17944 as_ln_s=ln
17945 else
17946 as_ln_s='cp -p'
b4e70030 17947 fi
bec39cab
AC
17948else
17949 as_ln_s='cp -p'
17950fi
81ecdfbb
RW
17951rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17952rmdir conf$$.dir 2>/dev/null
17953
17954
17955# as_fn_mkdir_p
17956# -------------
17957# Create "$as_dir" as a directory, including parents if necessary.
17958as_fn_mkdir_p ()
17959{
17960
17961 case $as_dir in #(
17962 -*) as_dir=./$as_dir;;
17963 esac
17964 test -d "$as_dir" || eval $as_mkdir_p || {
17965 as_dirs=
17966 while :; do
17967 case $as_dir in #(
17968 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17969 *) as_qdir=$as_dir;;
17970 esac
17971 as_dirs="'$as_qdir' $as_dirs"
17972 as_dir=`$as_dirname -- "$as_dir" ||
17973$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17974 X"$as_dir" : 'X\(//\)[^/]' \| \
17975 X"$as_dir" : 'X\(//\)$' \| \
17976 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17977$as_echo X"$as_dir" |
17978 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17979 s//\1/
17980 q
17981 }
17982 /^X\(\/\/\)[^/].*/{
17983 s//\1/
17984 q
17985 }
17986 /^X\(\/\/\)$/{
17987 s//\1/
17988 q
17989 }
17990 /^X\(\/\).*/{
17991 s//\1/
17992 q
17993 }
17994 s/.*/./; q'`
17995 test -d "$as_dir" && break
17996 done
17997 test -z "$as_dirs" || eval "mkdir $as_dirs"
17998 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
17999
bec39cab 18000
81ecdfbb 18001} # as_fn_mkdir_p
bec39cab 18002if mkdir -p . 2>/dev/null; then
81ecdfbb 18003 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18004else
18005 test -d ./-p && rmdir ./-p
18006 as_mkdir_p=false
18007fi
18008
81ecdfbb
RW
18009if test -x / >/dev/null 2>&1; then
18010 as_test_x='test -x'
18011else
18012 if ls -dL / >/dev/null 2>&1; then
18013 as_ls_L_option=L
18014 else
18015 as_ls_L_option=
18016 fi
18017 as_test_x='
18018 eval sh -c '\''
18019 if test -d "$1"; then
18020 test -d "$1/.";
18021 else
18022 case $1 in #(
18023 -*)set "./$1";;
18024 esac;
18025 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
18026 ???[sx]*):;;*)false;;esac;fi
18027 '\'' sh
18028 '
18029fi
18030as_executable_p=$as_test_x
bec39cab
AC
18031
18032# Sed expression to map a string onto a valid CPP name.
18033as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18034
18035# Sed expression to map a string onto a valid variable name.
18036as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18037
18038
bec39cab 18039exec 6>&1
81ecdfbb
RW
18040## ----------------------------------- ##
18041## Main body of $CONFIG_STATUS script. ##
18042## ----------------------------------- ##
18043_ASEOF
18044test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18045
18046cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18047# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18048# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18049# values after options handling.
18050ac_log="
bec39cab 18051This file was extended by $as_me, which was
81ecdfbb 18052generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
18053
18054 CONFIG_FILES = $CONFIG_FILES
18055 CONFIG_HEADERS = $CONFIG_HEADERS
18056 CONFIG_LINKS = $CONFIG_LINKS
18057 CONFIG_COMMANDS = $CONFIG_COMMANDS
18058 $ $0 $@
18059
81ecdfbb
RW
18060on `(hostname || uname -n) 2>/dev/null | sed 1q`
18061"
18062
bec39cab
AC
18063_ACEOF
18064
81ecdfbb
RW
18065case $ac_config_files in *"
18066"*) set x $ac_config_files; shift; ac_config_files=$*;;
18067esac
234b45d4 18068
81ecdfbb
RW
18069case $ac_config_headers in *"
18070"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18071esac
b4e70030 18072
b4e70030 18073
81ecdfbb
RW
18074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18075# Files that config.status was made for.
18076config_files="$ac_config_files"
18077config_headers="$ac_config_headers"
18078config_links="$ac_config_links"
18079config_commands="$ac_config_commands"
234b45d4 18080
81ecdfbb 18081_ACEOF
b4e70030 18082
81ecdfbb 18083cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18084ac_cs_usage="\
81ecdfbb
RW
18085\`$as_me' instantiates files and other configuration actions
18086from templates according to the current configuration. Unless the files
18087and actions are specified as TAGs, all are instantiated by default.
234b45d4 18088
81ecdfbb 18089Usage: $0 [OPTION]... [TAG]...
234b45d4 18090
bec39cab 18091 -h, --help print this help, then exit
81ecdfbb
RW
18092 -V, --version print version number and configuration settings, then exit
18093 -q, --quiet, --silent
18094 do not print progress messages
bec39cab
AC
18095 -d, --debug don't remove temporary files
18096 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18097 --file=FILE[:TEMPLATE]
18098 instantiate the configuration file FILE
18099 --header=FILE[:TEMPLATE]
18100 instantiate the configuration header FILE
234b45d4 18101
bec39cab
AC
18102Configuration files:
18103$config_files
234b45d4 18104
bec39cab
AC
18105Configuration headers:
18106$config_headers
234b45d4 18107
bec39cab
AC
18108Configuration links:
18109$config_links
234b45d4 18110
bec39cab
AC
18111Configuration commands:
18112$config_commands
18113
81ecdfbb 18114Report bugs to the package provider."
b4e70030 18115
81ecdfbb
RW
18116_ACEOF
18117cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
18118ac_cs_version="\\
18119config.status
81ecdfbb
RW
18120configured by $0, generated by GNU Autoconf 2.64,
18121 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 18122
81ecdfbb 18123Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
18124This config.status script is free software; the Free Software Foundation
18125gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18126
18127ac_pwd='$ac_pwd'
18128srcdir='$srcdir'
18129INSTALL='$INSTALL'
81ecdfbb
RW
18130AWK='$AWK'
18131test -n "\$AWK" || AWK=awk
bec39cab
AC
18132_ACEOF
18133
81ecdfbb
RW
18134cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18135# The default lists apply if the user does not specify any file.
bec39cab
AC
18136ac_need_defaults=:
18137while test $# != 0
18138do
18139 case $1 in
18140 --*=*)
81ecdfbb
RW
18141 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18142 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18143 ac_shift=:
c906108c 18144 ;;
81ecdfbb 18145 *)
bec39cab
AC
18146 ac_option=$1
18147 ac_optarg=$2
18148 ac_shift=shift
c906108c 18149 ;;
bec39cab 18150 esac
c906108c 18151
bec39cab
AC
18152 case $ac_option in
18153 # Handling of the options.
bec39cab
AC
18154 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18155 ac_cs_recheck=: ;;
81ecdfbb
RW
18156 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18157 $as_echo "$ac_cs_version"; exit ;;
18158 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18159 debug=: ;;
18160 --file | --fil | --fi | --f )
18161 $ac_shift
81ecdfbb
RW
18162 case $ac_optarg in
18163 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18164 esac
18165 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18166 ac_need_defaults=false;;
18167 --header | --heade | --head | --hea )
18168 $ac_shift
81ecdfbb
RW
18169 case $ac_optarg in
18170 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18171 esac
18172 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18173 ac_need_defaults=false;;
81ecdfbb
RW
18174 --he | --h)
18175 # Conflict between --help and --header
18176 as_fn_error "ambiguous option: \`$1'
18177Try \`$0 --help' for more information.";;
18178 --help | --hel | -h )
18179 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18180 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18181 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18182 ac_cs_silent=: ;;
c906108c 18183
bec39cab 18184 # This is an error.
81ecdfbb
RW
18185 -*) as_fn_error "unrecognized option: \`$1'
18186Try \`$0 --help' for more information." ;;
c906108c 18187
81ecdfbb
RW
18188 *) as_fn_append ac_config_targets " $1"
18189 ac_need_defaults=false ;;
c906108c 18190
bec39cab
AC
18191 esac
18192 shift
18193done
c906108c 18194
bec39cab 18195ac_configure_extra_args=
c906108c 18196
bec39cab
AC
18197if $ac_cs_silent; then
18198 exec 6>/dev/null
18199 ac_configure_extra_args="$ac_configure_extra_args --silent"
18200fi
c906108c 18201
bec39cab 18202_ACEOF
81ecdfbb 18203cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18204if \$ac_cs_recheck; then
81ecdfbb
RW
18205 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18206 shift
18207 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18208 CONFIG_SHELL='$SHELL'
18209 export CONFIG_SHELL
18210 exec "\$@"
bec39cab
AC
18211fi
18212
18213_ACEOF
81ecdfbb
RW
18214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18215exec 5>>config.log
18216{
18217 echo
18218 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18219## Running $as_me. ##
18220_ASBOX
18221 $as_echo "$ac_log"
18222} >&5
bec39cab 18223
81ecdfbb
RW
18224_ACEOF
18225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18226#
81ecdfbb 18227# INIT-COMMANDS
c906108c 18228#
a417dc56 18229ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18230
bec39cab
AC
18231_ACEOF
18232
81ecdfbb 18233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18234
81ecdfbb 18235# Handling of arguments.
bec39cab 18236for ac_config_target in $ac_config_targets
c906108c 18237do
81ecdfbb
RW
18238 case $ac_config_target in
18239 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18240 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18241 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18242 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18243 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18244 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18245 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 18246 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18247 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
18248
18249 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18250 esac
18251done
18252
81ecdfbb 18253
bec39cab
AC
18254# If the user did not use the arguments to specify the items to instantiate,
18255# then the envvar interface is used. Set only those that are not.
18256# We use the long form for the default assignment because of an extremely
18257# bizarre bug on SunOS 4.1.3.
18258if $ac_need_defaults; then
18259 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18260 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18261 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18262 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18263fi
18264
b4e70030 18265# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18266# simply because there is no reason against having it here, and in addition,
b4e70030 18267# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18268# Hook for its removal unless debugging.
18269# Note that there is a small window in which the directory will not be cleaned:
18270# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18271$debug ||
18272{
81ecdfbb
RW
18273 tmp=
18274 trap 'exit_status=$?
18275 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18276' 0
18277 trap 'as_fn_exit 1' 1 2 13 15
18278}
18279# Create a (secure) tmp directory for tmp files.
18280
18281{
18282 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18283 test -n "$tmp" && test -d "$tmp"
18284} ||
18285{
18286 tmp=./conf$$-$RANDOM
18287 (umask 077 && mkdir "$tmp")
18288} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18289
18290# Set up the scripts for CONFIG_FILES section.
18291# No need to generate them if there are no CONFIG_FILES.
18292# This happens for instance with `./config.status config.h'.
18293if test -n "$CONFIG_FILES"; then
18294
18295if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18296 ac_cs_awk_getline=:
18297 ac_cs_awk_pipe_init=
18298 ac_cs_awk_read_file='
18299 while ((getline aline < (F[key])) > 0)
18300 print(aline)
18301 close(F[key])'
18302 ac_cs_awk_pipe_fini=
18303else
18304 ac_cs_awk_getline=false
18305 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18306 ac_cs_awk_read_file='
18307 print "|#_!!_#|"
18308 print "cat " F[key] " &&"
18309 '$ac_cs_awk_pipe_init
18310 # The final `:' finishes the AND list.
18311 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18312fi
18313ac_cr=`echo X | tr X '\015'`
18314# On cygwin, bash can eat \r inside `` if the user requested igncr.
18315# But we know of no other shell where ac_cr would be empty at this
18316# point, so we can use a bashism as a fallback.
18317if test "x$ac_cr" = x; then
18318 eval ac_cr=\$\'\\r\'
18319fi
18320ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18321if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18322 ac_cs_awk_cr='\r'
18323else
18324 ac_cs_awk_cr=$ac_cr
18325fi
18326
18327echo 'BEGIN {' >"$tmp/subs1.awk" &&
18328_ACEOF
18329
18330# Create commands to substitute file output variables.
18331{
18332 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18333 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18334 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18335 echo "_ACAWK" &&
18336 echo "_ACEOF"
18337} >conf$$files.sh &&
18338. ./conf$$files.sh ||
18339 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18340rm -f conf$$files.sh
18341
18342{
18343 echo "cat >conf$$subs.awk <<_ACEOF" &&
18344 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18345 echo "_ACEOF"
18346} >conf$$subs.sh ||
18347 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18348ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18349ac_delim='%!_!# '
18350for ac_last_try in false false false false false :; do
18351 . ./conf$$subs.sh ||
18352 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18353
18354 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18355 if test $ac_delim_n = $ac_delim_num; then
18356 break
18357 elif $ac_last_try; then
18358 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18359 else
18360 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18361 fi
18362done
18363rm -f conf$$subs.sh
18364
18365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18366cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18367_ACEOF
18368sed -n '
18369h
18370s/^/S["/; s/!.*/"]=/
18371p
18372g
18373s/^[^!]*!//
18374:repl
18375t repl
18376s/'"$ac_delim"'$//
18377t delim
18378:nl
18379h
18380s/\(.\{148\}\).*/\1/
18381t more1
18382s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18383p
18384n
18385b repl
18386:more1
18387s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18388p
18389g
18390s/.\{148\}//
18391t nl
18392:delim
18393h
18394s/\(.\{148\}\).*/\1/
18395t more2
18396s/["\\]/\\&/g; s/^/"/; s/$/"/
18397p
18398b
18399:more2
18400s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18401p
18402g
18403s/.\{148\}//
18404t delim
18405' <conf$$subs.awk | sed '
18406/^[^""]/{
18407 N
18408 s/\n//
18409}
18410' >>$CONFIG_STATUS || ac_write_fail=1
18411rm -f conf$$subs.awk
18412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18413_ACAWK
18414cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18415 for (key in S) S_is_set[key] = 1
18416 FS = "\a"
18417 \$ac_cs_awk_pipe_init
18418}
18419{
18420 line = $ 0
18421 nfields = split(line, field, "@")
18422 substed = 0
18423 len = length(field[1])
18424 for (i = 2; i < nfields; i++) {
18425 key = field[i]
18426 keylen = length(key)
18427 if (S_is_set[key]) {
18428 value = S[key]
18429 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18430 len += length(value) + length(field[++i])
18431 substed = 1
18432 } else
18433 len += 1 + keylen
18434 }
18435 if (nfields == 3 && !substed) {
18436 key = field[2]
18437 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18438 \$ac_cs_awk_read_file
18439 next
18440 }
18441 }
18442 print line
b4e70030 18443}
81ecdfbb
RW
18444\$ac_cs_awk_pipe_fini
18445_ACAWK
18446_ACEOF
18447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18448if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18449 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18450else
18451 cat
18452fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18453 || as_fn_error "could not setup config files machinery" "$LINENO" 5
18454_ACEOF
18455
18456# VPATH may cause trouble with some makes, so we remove $(srcdir),
18457# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18458# trailing colons and then remove the whole line if VPATH becomes empty
18459# (actually we leave an empty line to preserve line numbers).
18460if test "x$srcdir" = x.; then
18461 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18462s/:*\$(srcdir):*/:/
18463s/:*\${srcdir}:*/:/
18464s/:*@srcdir@:*/:/
18465s/^\([^=]*=[ ]*\):*/\1/
18466s/:*$//
18467s/^[^=]*=[ ]*$//
18468}'
18469fi
18470
18471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18472fi # test -n "$CONFIG_FILES"
18473
18474# Set up the scripts for CONFIG_HEADERS section.
18475# No need to generate them if there are no CONFIG_HEADERS.
18476# This happens for instance with `./config.status Makefile'.
18477if test -n "$CONFIG_HEADERS"; then
18478cat >"$tmp/defines.awk" <<\_ACAWK ||
18479BEGIN {
18480_ACEOF
18481
18482# Transform confdefs.h into an awk script `defines.awk', embedded as
18483# here-document in config.status, that substitutes the proper values into
18484# config.h.in to produce config.h.
4e8d927d 18485
81ecdfbb
RW
18486# Create a delimiter string that does not exist in confdefs.h, to ease
18487# handling of long lines.
18488ac_delim='%!_!# '
18489for ac_last_try in false false :; do
18490 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18491 if test -z "$ac_t"; then
18492 break
18493 elif $ac_last_try; then
18494 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18495 else
18496 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18497 fi
18498done
4e8d927d 18499
81ecdfbb
RW
18500# For the awk script, D is an array of macro values keyed by name,
18501# likewise P contains macro parameters if any. Preserve backslash
18502# newline sequences.
18503
18504ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18505sed -n '
18506s/.\{148\}/&'"$ac_delim"'/g
18507t rset
18508:rset
18509s/^[ ]*#[ ]*define[ ][ ]*/ /
18510t def
18511d
18512:def
18513s/\\$//
18514t bsnl
18515s/["\\]/\\&/g
18516s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18517D["\1"]=" \3"/p
18518s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18519d
18520:bsnl
18521s/["\\]/\\&/g
18522s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18523D["\1"]=" \3\\\\\\n"\\/p
18524t cont
18525s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18526t cont
18527d
18528:cont
18529n
18530s/.\{148\}/&'"$ac_delim"'/g
18531t clear
18532:clear
18533s/\\$//
18534t bsnlc
18535s/["\\]/\\&/g; s/^/"/; s/$/"/p
18536d
18537:bsnlc
18538s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18539b cont
18540' <confdefs.h | sed '
18541s/'"$ac_delim"'/"\\\
18542"/g' >>$CONFIG_STATUS || ac_write_fail=1
18543
18544cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18545 for (key in D) D_is_set[key] = 1
18546 FS = "\a"
18547}
18548/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18549 line = \$ 0
18550 split(line, arg, " ")
18551 if (arg[1] == "#") {
18552 defundef = arg[2]
18553 mac1 = arg[3]
18554 } else {
18555 defundef = substr(arg[1], 2)
18556 mac1 = arg[2]
18557 }
18558 split(mac1, mac2, "(") #)
18559 macro = mac2[1]
18560 prefix = substr(line, 1, index(line, defundef) - 1)
18561 if (D_is_set[macro]) {
18562 # Preserve the white space surrounding the "#".
18563 print prefix "define", macro P[macro] D[macro]
18564 next
18565 } else {
18566 # Replace #undef with comments. This is necessary, for example,
18567 # in the case of _POSIX_SOURCE, which is predefined and required
18568 # on some systems where configure will not decide to define it.
18569 if (defundef == "undef") {
18570 print "/*", prefix defundef, macro, "*/"
18571 next
18572 }
18573 }
b4e70030 18574}
81ecdfbb
RW
18575{ print }
18576_ACAWK
b4e70030 18577_ACEOF
81ecdfbb
RW
18578cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18579 as_fn_error "could not setup config headers machinery" "$LINENO" 5
18580fi # test -n "$CONFIG_HEADERS"
4e8d927d 18581
4e8d927d 18582
81ecdfbb
RW
18583eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18584shift
18585for ac_tag
18586do
18587 case $ac_tag in
18588 :[FHLC]) ac_mode=$ac_tag; continue;;
18589 esac
18590 case $ac_mode$ac_tag in
18591 :[FHL]*:*);;
18592 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18593 :[FH]-) ac_tag=-:-;;
18594 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18595 esac
18596 ac_save_IFS=$IFS
18597 IFS=:
18598 set x $ac_tag
18599 IFS=$ac_save_IFS
18600 shift
18601 ac_file=$1
18602 shift
4e8d927d 18603
81ecdfbb
RW
18604 case $ac_mode in
18605 :L) ac_source=$1;;
18606 :[FH])
18607 ac_file_inputs=
18608 for ac_f
18609 do
18610 case $ac_f in
18611 -) ac_f="$tmp/stdin";;
18612 *) # Look for the file first in the build tree, then in the source tree
18613 # (if the path is not absolute). The absolute path cannot be DOS-style,
18614 # because $ac_f cannot contain `:'.
18615 test -f "$ac_f" ||
18616 case $ac_f in
18617 [\\/$]*) false;;
18618 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18619 esac ||
18620 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18621 esac
18622 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18623 as_fn_append ac_file_inputs " '$ac_f'"
18624 done
18625
18626 # Let's still pretend it is `configure' which instantiates (i.e., don't
18627 # use $as_me), people would be surprised to read:
18628 # /* config.h. Generated by config.status. */
18629 configure_input='Generated from '`
18630 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18631 `' by configure.'
18632 if test x"$ac_file" != x-; then
18633 configure_input="$ac_file. $configure_input"
18634 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18635$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18636 fi
81ecdfbb
RW
18637 # Neutralize special characters interpreted by sed in replacement strings.
18638 case $configure_input in #(
18639 *\&* | *\|* | *\\* )
18640 ac_sed_conf_input=`$as_echo "$configure_input" |
18641 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18642 *) ac_sed_conf_input=$configure_input;;
18643 esac
4e8d927d 18644
81ecdfbb
RW
18645 case $ac_tag in
18646 *:-:* | *:-) cat >"$tmp/stdin" \
18647 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18648 esac
18649 ;;
c906108c
SS
18650 esac
18651
81ecdfbb 18652 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18653$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18654 X"$ac_file" : 'X\(//\)[^/]' \| \
18655 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18656 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18657$as_echo X"$ac_file" |
18658 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18659 s//\1/
18660 q
18661 }
18662 /^X\(\/\/\)[^/].*/{
18663 s//\1/
18664 q
18665 }
18666 /^X\(\/\/\)$/{
18667 s//\1/
18668 q
18669 }
18670 /^X\(\/\).*/{
18671 s//\1/
18672 q
18673 }
18674 s/.*/./; q'`
18675 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18676 ac_builddir=.
18677
81ecdfbb
RW
18678case "$ac_dir" in
18679.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18680*)
18681 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18682 # A ".." for each directory in $ac_dir_suffix.
18683 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18684 case $ac_top_builddir_sub in
18685 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18686 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18687 esac ;;
18688esac
18689ac_abs_top_builddir=$ac_pwd
18690ac_abs_builddir=$ac_pwd$ac_dir_suffix
18691# for backward compatibility:
18692ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18693
18694case $srcdir in
81ecdfbb 18695 .) # We are building in place.
bec39cab 18696 ac_srcdir=.
81ecdfbb
RW
18697 ac_top_srcdir=$ac_top_builddir_sub
18698 ac_abs_top_srcdir=$ac_pwd ;;
18699 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18700 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18701 ac_top_srcdir=$srcdir
18702 ac_abs_top_srcdir=$srcdir ;;
18703 *) # Relative name.
18704 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18705 ac_top_srcdir=$ac_top_build_prefix$srcdir
18706 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18707esac
81ecdfbb 18708ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18709
c906108c 18710
81ecdfbb
RW
18711 case $ac_mode in
18712 :F)
18713 #
18714 # CONFIG_FILE
18715 #
c906108c 18716
bec39cab
AC
18717 case $INSTALL in
18718 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18719 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18720 esac
81ecdfbb 18721_ACEOF
121ce6e5 18722
81ecdfbb
RW
18723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18724# If the template does not know about datarootdir, expand it.
18725# FIXME: This hack should be removed a few years after 2.60.
18726ac_datarootdir_hack=; ac_datarootdir_seen=
18727ac_sed_dataroot='
18728/datarootdir/ {
18729 p
18730 q
18731}
18732/@datadir@/p
18733/@docdir@/p
18734/@infodir@/p
18735/@localedir@/p
18736/@mandir@/p'
18737case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18738*datarootdir*) ac_datarootdir_seen=yes;;
18739*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18741$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18742_ACEOF
18743cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18744 ac_datarootdir_hack='
18745 s&@datadir@&$datadir&g
18746 s&@docdir@&$docdir&g
18747 s&@infodir@&$infodir&g
18748 s&@localedir@&$localedir&g
18749 s&@mandir@&$mandir&g
18750 s&\\\${datarootdir}&$datarootdir&g' ;;
18751esac
4e8d927d 18752_ACEOF
81ecdfbb
RW
18753
18754# Neutralize VPATH when `$srcdir' = `.'.
18755# Shell code in configure.ac might set extrasub.
18756# FIXME: do we really want to maintain this feature?
18757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18758ac_sed_extra="$ac_vpsub
bec39cab
AC
18759$extrasub
18760_ACEOF
81ecdfbb 18761cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18762:t
18763/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18764s|@configure_input@|$ac_sed_conf_input|;t t
18765s&@top_builddir@&$ac_top_builddir_sub&;t t
18766s&@top_build_prefix@&$ac_top_build_prefix&;t t
18767s&@srcdir@&$ac_srcdir&;t t
18768s&@abs_srcdir@&$ac_abs_srcdir&;t t
18769s&@top_srcdir@&$ac_top_srcdir&;t t
18770s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18771s&@builddir@&$ac_builddir&;t t
18772s&@abs_builddir@&$ac_abs_builddir&;t t
18773s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18774s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
18775$ac_datarootdir_hack
18776"
18777eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18778if $ac_cs_awk_getline; then
18779 $AWK -f "$tmp/subs.awk"
18780else
18781 $AWK -f "$tmp/subs.awk" | $SHELL
18782fi >$tmp/out \
18783 || as_fn_error "could not create $ac_file" "$LINENO" 5
18784
18785test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18786 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18787 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18789which seems to be undefined. Please make sure it is defined." >&5
18790$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18791which seems to be undefined. Please make sure it is defined." >&2;}
18792
18793 rm -f "$tmp/stdin"
bec39cab 18794 case $ac_file in
81ecdfbb
RW
18795 -) cat "$tmp/out" && rm -f "$tmp/out";;
18796 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18797 esac \
18798 || as_fn_error "could not create $ac_file" "$LINENO" 5
18799 ;;
18800 :H)
18801 #
18802 # CONFIG_HEADER
18803 #
bec39cab 18804 if test x"$ac_file" != x-; then
81ecdfbb
RW
18805 {
18806 $as_echo "/* $configure_input */" \
18807 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18808 } >"$tmp/config.h" \
18809 || as_fn_error "could not create $ac_file" "$LINENO" 5
18810 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18811 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18812$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18813 else
81ecdfbb
RW
18814 rm -f "$ac_file"
18815 mv "$tmp/config.h" "$ac_file" \
18816 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18817 fi
18818 else
81ecdfbb
RW
18819 $as_echo "/* $configure_input */" \
18820 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18821 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 18822 fi
81ecdfbb
RW
18823 ;;
18824 :L)
18825 #
18826 # CONFIG_LINK
18827 #
c906108c 18828
81ecdfbb
RW
18829 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18830 :
b4e70030 18831 else
81ecdfbb
RW
18832 # Prefer the file from the source tree if names are identical.
18833 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18834 ac_source=$srcdir/$ac_source
18835 fi
b4e70030 18836
81ecdfbb
RW
18837 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18838$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 18839
81ecdfbb
RW
18840 if test ! -r "$ac_source"; then
18841 as_fn_error "$ac_source: file not found" "$LINENO" 5
18842 fi
18843 rm -f "$ac_file"
bec39cab 18844
81ecdfbb
RW
18845 # Try a relative symlink, then a hard link, then a copy.
18846 case $srcdir in
18847 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18848 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18849 esac
18850 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18851 ln "$ac_source" "$ac_file" 2>/dev/null ||
18852 cp -p "$ac_source" "$ac_file" ||
18853 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18854 fi
18855 ;;
18856 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18857$as_echo "$as_me: executing $ac_file commands" >&6;}
18858 ;;
c906108c 18859 esac
b4e70030 18860
bec39cab 18861
81ecdfbb
RW
18862 case $ac_file$ac_mode in
18863 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 18864 "gcore":F) chmod +x gcore ;;
1e94266c
SM
18865 "Makefile":F)
18866case x$CONFIG_HEADERS in
18867xconfig.h:config.in)
18868echo > stamp-h ;;
18869esac
18870 ;;
18871 "gdb-gdb.gdb":F)
18872case x$CONFIG_HEADERS in
18873xconfig.h:config.in)
18874echo > stamp-h ;;
18875esac
18876 ;;
18877 "doc/Makefile":F)
18878case x$CONFIG_HEADERS in
18879xconfig.h:config.in)
18880echo > stamp-h ;;
18881esac
18882 ;;
18883 "data-directory/Makefile":F)
c906108c
SS
18884case x$CONFIG_HEADERS in
18885xconfig.h:config.in)
18886echo > stamp-h ;;
18887esac
bec39cab 18888 ;;
81ecdfbb 18889
bec39cab 18890 esac
81ecdfbb 18891done # for ac_tag
c906108c 18892
bec39cab 18893
81ecdfbb 18894as_fn_exit 0
bec39cab 18895_ACEOF
bec39cab
AC
18896ac_clean_files=$ac_clean_files_save
18897
81ecdfbb
RW
18898test $ac_write_fail = 0 ||
18899 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
18900
bec39cab
AC
18901
18902# configure is writing to config.log, and then calls config.status.
18903# config.status does its own redirection, appending to config.log.
18904# Unfortunately, on DOS this fails, as config.log is still kept open
18905# by configure, so config.status won't be able to write to it; its
18906# output is simply discarded. So we exec the FD to /dev/null,
18907# effectively closing config.log, so it can be properly (re)opened and
18908# appended to by config.status. When coming back to configure, we
18909# need to make the FD available again.
18910if test "$no_create" != yes; then
18911 ac_cs_success=:
18912 ac_config_status_args=
18913 test "$silent" = yes &&
18914 ac_config_status_args="$ac_config_status_args --quiet"
18915 exec 5>/dev/null
18916 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18917 exec 5>>config.log
18918 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18919 # would make configure fail if this is the last instruction.
81ecdfbb 18920 $ac_cs_success || as_fn_exit $?
bec39cab 18921fi
c906108c 18922
bec39cab 18923#
81ecdfbb 18924# CONFIG_SUBDIRS section.
bec39cab 18925#
c906108c
SS
18926if test "$no_recursion" != yes; then
18927
81ecdfbb
RW
18928 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
18929 # so they do not pile up.
c906108c
SS
18930 ac_sub_configure_args=
18931 ac_prev=
fdc59709
PB
18932 eval "set x $ac_configure_args"
18933 shift
18934 for ac_arg
18935 do
c906108c
SS
18936 if test -n "$ac_prev"; then
18937 ac_prev=
18938 continue
18939 fi
bec39cab 18940 case $ac_arg in
c906108c
SS
18941 -cache-file | --cache-file | --cache-fil | --cache-fi \
18942 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
18943 ac_prev=cache_file ;;
18944 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
18945 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
18946 | --c=*)
18947 ;;
18948 --config-cache | -C)
c906108c
SS
18949 ;;
18950 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
18951 ac_prev=srcdir ;;
18952 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
18953 ;;
bec39cab
AC
18954 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
18955 ac_prev=prefix ;;
18956 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
18957 ;;
81ecdfbb
RW
18958 --disable-option-checking)
18959 ;;
fdc59709
PB
18960 *)
18961 case $ac_arg in
81ecdfbb 18962 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18963 esac
81ecdfbb 18964 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
18965 esac
18966 done
18967
bec39cab
AC
18968 # Always prepend --prefix to ensure using the same prefix
18969 # in subdir configurations.
fdc59709
PB
18970 ac_arg="--prefix=$prefix"
18971 case $ac_arg in
81ecdfbb 18972 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 18973 esac
81ecdfbb
RW
18974 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
18975
18976 # Pass --silent
18977 if test "$silent" = yes; then
18978 ac_sub_configure_args="--silent $ac_sub_configure_args"
18979 fi
18980
18981 # Always prepend --disable-option-checking to silence warnings, since
18982 # different subdirs can have different --enable and --with options.
18983 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 18984
b4e70030 18985 ac_popdir=`pwd`
bec39cab 18986 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
18987
18988 # Do not complain, so a configure script can configure whichever
18989 # parts of a large source tree are present.
fdc59709 18990 test -d "$srcdir/$ac_dir" || continue
c906108c 18991
81ecdfbb
RW
18992 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
18993 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
18994 $as_echo "$ac_msg" >&6
18995 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18996 ac_builddir=.
18997
81ecdfbb
RW
18998case "$ac_dir" in
18999.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19000*)
19001 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19002 # A ".." for each directory in $ac_dir_suffix.
19003 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19004 case $ac_top_builddir_sub in
19005 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19006 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19007 esac ;;
19008esac
19009ac_abs_top_builddir=$ac_pwd
19010ac_abs_builddir=$ac_pwd$ac_dir_suffix
19011# for backward compatibility:
19012ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19013
19014case $srcdir in
81ecdfbb 19015 .) # We are building in place.
bec39cab 19016 ac_srcdir=.
81ecdfbb
RW
19017 ac_top_srcdir=$ac_top_builddir_sub
19018 ac_abs_top_srcdir=$ac_pwd ;;
19019 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19020 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19021 ac_top_srcdir=$srcdir
19022 ac_abs_top_srcdir=$srcdir ;;
19023 *) # Relative name.
19024 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19025 ac_top_srcdir=$ac_top_build_prefix$srcdir
19026 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19027esac
81ecdfbb 19028ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19029
c906108c 19030
fdc59709 19031 cd "$ac_dir"
c906108c
SS
19032
19033 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19034 if test -f "$ac_srcdir/configure.gnu"; then
19035 ac_sub_configure=$ac_srcdir/configure.gnu
19036 elif test -f "$ac_srcdir/configure"; then
19037 ac_sub_configure=$ac_srcdir/configure
19038 elif test -f "$ac_srcdir/configure.in"; then
19039 # This should be Cygnus configure.
19040 ac_sub_configure=$ac_aux_dir/configure
c906108c 19041 else
81ecdfbb
RW
19042 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19043$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19044 ac_sub_configure=
19045 fi
19046
19047 # The recursion is here.
19048 if test -n "$ac_sub_configure"; then
c906108c 19049 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19050 case $cache_file in
19051 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19052 *) # Relative name.
19053 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19054 esac
c906108c 19055
81ecdfbb
RW
19056 { $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
19057$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19058 # The eval makes quoting arguments work.
fdc59709
PB
19059 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19060 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 19061 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19062 fi
19063
fdc59709 19064 cd "$ac_popdir"
c906108c
SS
19065 done
19066fi
81ecdfbb
RW
19067if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19069$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19070fi
c906108c 19071
This page took 2.811976 seconds and 4 git commands to generate.