PT_LOAD and PT_GNU_RELRO segment overlap
[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
21ea5acd
SDJ
601HAVE_NATIVE_GCORE_HOST
602NAT_GENERATED_FILES
603XM_CLIBS
604MH_CFLAGS
605LOADLIBES
606NAT_CDEPS
607NATDEPFILES
608NAT_FILE
81ecdfbb
RW
609target_subdir
610CONFIG_UNINSTALL
611CONFIG_INSTALL
612CONFIG_CLEAN
613CONFIG_ALL
614CONFIG_SRCS
615CONFIG_DEPS
616CONFIG_OBS
617PROFILE_CFLAGS
618ENABLE_CFLAGS
619SIM_OBS
620SIM
621XMKMF
622GDBTK_SRC_DIR
623GDBTK_CFLAGS
624GDBTKLIBS
625X_LIBS
626X_LDFLAGS
627X_CFLAGS
628TK_XINCLUDES
629TK_DEPS
630TK_LIBRARY
631TK_INCLUDE
632TK_STUB_LIB_SPEC
633TK_STUB_LIB_FLAG
634TK_STUB_LIB_FILE
635TK_LIB_SPEC
636TK_LIB_FLAG
637TK_LIB_FILE
638TK_SRC_DIR
639TK_BIN_DIR
640TK_VERSION
641TCL_DEPS
642TCL_LIBRARY
643TCL_INCLUDE
644TCL_STUB_LIB_SPEC
645TCL_STUB_LIB_FLAG
646TCL_STUB_LIB_FILE
647TCL_LIB_SPEC
648TCL_LIB_FLAG
649TCL_LIB_FILE
650TCL_SRC_DIR
651TCL_BIN_DIR
652TCL_PATCH_LEVEL
653TCL_VERSION
654WIN32LDAPP
655GUI_CFLAGS_X
656LIBGUI
608e2dbb
TT
657LTLIBLZMA
658LIBLZMA
659HAVE_LIBLZMA
81ecdfbb
RW
660WIN32LIBS
661SER_HARDWIRE
662WERROR_CFLAGS
663WARN_CFLAGS
664SYSTEM_GDBINIT
81ecdfbb
RW
665TARGET_SYSTEM_ROOT
666CONFIG_LDFLAGS
f6528abd 667RDYNAMIC
81ecdfbb 668ALLOCA
58bfce93
MM
669LTLIBIPT
670LIBIPT
671HAVE_LIBIPT
4df42755
DE
672HAVE_GUILE_FALSE
673HAVE_GUILE_TRUE
ed3ef339
DE
674GUILE_LIBS
675GUILE_CPPFLAGS
e76c5d17
DE
676GUILD_TARGET_FLAG
677GUILD
ed3ef339 678pkg_config_prog_path
4df42755
DE
679HAVE_PYTHON_FALSE
680HAVE_PYTHON_TRUE
ac534cba
JB
681PYTHON_LIBS
682PYTHON_CPPFLAGS
81ecdfbb 683PYTHON_CFLAGS
ec685c5e 684python_prog_path
2400729e
UW
685LTLIBMPFR
686LIBMPFR
687HAVE_LIBMPFR
81ecdfbb
RW
688LTLIBEXPAT
689LIBEXPAT
690HAVE_LIBEXPAT
b8e0a31c 691JIT_READER_DIR
f997c383 692TARGET_PTR
39037522 693READLINE_TEXI_INCFLAG
81ecdfbb
RW
694READLINE_CFLAGS
695READLINE_DEPS
696READLINE
016a3251
DD
697LTLIBICONV
698LIBICONV
711a72d3
L
699zlibinc
700zlibdir
81ecdfbb
RW
701MIG
702WINDRES
703DLLTOOL
c971b7fa 704AR
81ecdfbb
RW
705YFLAGS
706YACC
c971b7fa 707RANLIB
81ecdfbb 708LN_S
c971b7fa
PA
709INSTALL_DATA
710INSTALL_SCRIPT
711INSTALL_PROGRAM
712AWK
81ecdfbb
RW
713REPORT_BUGS_TEXI
714REPORT_BUGS_TO
715PKGVERSION
b292c783 716HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
717TARGET_OBS
718subdirs
719GDB_DATADIR
720DEBUGDIR
5048e516
JK
721MAKEINFO_EXTRA_FLAGS
722MAKEINFOFLAGS
723MAKEINFO
81ecdfbb
RW
724PACKAGE
725GNULIB_STDINT_H
81ecdfbb
RW
726CATOBJEXT
727GENCAT
728INSTOBJEXT
729DATADIRNAME
730CATALOGS
731POSUB
732GMSGFMT
733XGETTEXT
734INCINTL
735LIBINTL_DEP
736LIBINTL
737USE_NLS
81ecdfbb
RW
738CCDEPMODE
739DEPDIR
740am__leading_dot
0bcda685
PA
741CXX_DIALECT
742HAVE_CXX11
4869db5e
RM
743INSTALL_STRIP_PROGRAM
744STRIP
745install_sh
81ecdfbb
RW
746target_os
747target_vendor
748target_cpu
749target
750host_os
751host_vendor
752host_cpu
753host
754build_os
755build_vendor
756build_cpu
757build
c971b7fa
PA
758EGREP
759GREP
760CPP
3bc3d82a
PA
761ac_ct_CXX
762CXXFLAGS
763CXX
81ecdfbb
RW
764OBJEXT
765EXEEXT
766ac_ct_CC
767CPPFLAGS
768LDFLAGS
769CFLAGS
770CC
771MAINT
772MAINTAINER_MODE_FALSE
773MAINTAINER_MODE_TRUE
774target_alias
775host_alias
776build_alias
777LIBS
778ECHO_T
779ECHO_N
780ECHO_C
781DEFS
782mandir
783localedir
784libdir
785psdir
786pdfdir
787dvidir
788htmldir
789infodir
790docdir
791oldincludedir
792includedir
793localstatedir
794sharedstatedir
795sysconfdir
796datadir
797datarootdir
798libexecdir
799sbindir
800bindir
801program_transform_name
802prefix
803exec_prefix
804PACKAGE_URL
805PACKAGE_BUGREPORT
806PACKAGE_STRING
807PACKAGE_VERSION
808PACKAGE_TARNAME
809PACKAGE_NAME
810PATH_SEPARATOR
811SHELL'
2b351b19 812ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
813ac_user_opts='
814enable_option_checking
815enable_maintainer_mode
da2f07f1
JK
816enable_plugins
817enable_largefile
81ecdfbb
RW
818with_separate_debug_dir
819with_gdb_datadir
820with_relocated_sources
7349ff92 821with_auto_load_dir
bccbefd2 822with_auto_load_safe_path
81ecdfbb
RW
823enable_targets
824enable_64_bit_bfd
825enable_gdbcli
826enable_gdbmi
827enable_tui
828enable_gdbtk
05e7c244 829with_libunwind_ia64
81ecdfbb
RW
830with_curses
831enable_profiling
832with_pkgversion
833with_bugurl
711a72d3 834with_system_zlib
016a3251
DD
835with_gnu_ld
836enable_rpath
81ecdfbb 837with_libiconv_prefix
478aac75 838with_iconv_bin
81ecdfbb 839with_system_readline
b8e0a31c 840with_jit_reader_dir
81ecdfbb 841with_expat
81ecdfbb 842with_libexpat_prefix
2400729e
UW
843with_mpfr
844with_libmpfr_prefix
81ecdfbb 845with_python
ed3ef339 846with_guile
a8db4212 847enable_libmcheck
58bfce93
MM
848with_intel_pt
849with_libipt_prefix
81ecdfbb
RW
850with_included_regex
851with_sysroot
852with_system_gdbinit
853enable_werror
854enable_build_warnings
855enable_gdb_build_warnings
608e2dbb
TT
856with_lzma
857with_liblzma_prefix
81ecdfbb
RW
858with_tcl
859with_tk
860with_x
861enable_sim
862enable_multi_ice
496c0e1b 863enable_gdbserver
393fd4c3
YQ
864with_babeltrace
865with_libbabeltrace_prefix
81ecdfbb
RW
866'
867 ac_precious_vars='build_alias
868host_alias
869target_alias
870CC
871CFLAGS
872LDFLAGS
873LIBS
874CPPFLAGS
3bc3d82a
PA
875CXX
876CXXFLAGS
877CCC
81ecdfbb 878CPP
f06e05e0
JK
879MAKEINFO
880MAKEINFOFLAGS
81ecdfbb
RW
881YACC
882YFLAGS
883XMKMF'
5ae98d25 884ac_subdirs_all='testsuite
81ecdfbb
RW
885gdbtk
886multi-ice
887gdbserver'
c906108c
SS
888
889# Initialize some variables set by options.
bec39cab
AC
890ac_init_help=
891ac_init_version=false
81ecdfbb
RW
892ac_unrecognized_opts=
893ac_unrecognized_sep=
c906108c
SS
894# The variables have the same names as the options, with
895# dashes changed to underlines.
bec39cab 896cache_file=/dev/null
c906108c 897exec_prefix=NONE
c906108c 898no_create=
c906108c
SS
899no_recursion=
900prefix=NONE
901program_prefix=NONE
902program_suffix=NONE
903program_transform_name=s,x,x,
904silent=
905site=
906srcdir=
c906108c
SS
907verbose=
908x_includes=NONE
909x_libraries=NONE
bec39cab
AC
910
911# Installation directory options.
912# These are left unexpanded so users can "make install exec_prefix=/foo"
913# and all the variables that are supposed to be based on exec_prefix
914# by default will actually change.
915# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 916# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
917bindir='${exec_prefix}/bin'
918sbindir='${exec_prefix}/sbin'
919libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
920datarootdir='${prefix}/share'
921datadir='${datarootdir}'
c906108c
SS
922sysconfdir='${prefix}/etc'
923sharedstatedir='${prefix}/com'
924localstatedir='${prefix}/var'
c906108c
SS
925includedir='${prefix}/include'
926oldincludedir='/usr/include'
81ecdfbb
RW
927docdir='${datarootdir}/doc/${PACKAGE}'
928infodir='${datarootdir}/info'
929htmldir='${docdir}'
930dvidir='${docdir}'
931pdfdir='${docdir}'
932psdir='${docdir}'
933libdir='${exec_prefix}/lib'
934localedir='${datarootdir}/locale'
935mandir='${datarootdir}/man'
c906108c 936
c906108c 937ac_prev=
81ecdfbb 938ac_dashdash=
c906108c
SS
939for ac_option
940do
c906108c
SS
941 # If the previous option needs an argument, assign it.
942 if test -n "$ac_prev"; then
81ecdfbb 943 eval $ac_prev=\$ac_option
c906108c
SS
944 ac_prev=
945 continue
946 fi
947
81ecdfbb
RW
948 case $ac_option in
949 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
950 *) ac_optarg=yes ;;
951 esac
c906108c
SS
952
953 # Accept the important Cygnus configure options, so we can diagnose typos.
954
81ecdfbb
RW
955 case $ac_dashdash$ac_option in
956 --)
957 ac_dashdash=yes ;;
c906108c
SS
958
959 -bindir | --bindir | --bindi | --bind | --bin | --bi)
960 ac_prev=bindir ;;
961 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 962 bindir=$ac_optarg ;;
c906108c
SS
963
964 -build | --build | --buil | --bui | --bu)
bec39cab 965 ac_prev=build_alias ;;
c906108c 966 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 967 build_alias=$ac_optarg ;;
c906108c
SS
968
969 -cache-file | --cache-file | --cache-fil | --cache-fi \
970 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
971 ac_prev=cache_file ;;
972 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
973 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
974 cache_file=$ac_optarg ;;
975
976 --config-cache | -C)
977 cache_file=config.cache ;;
c906108c 978
81ecdfbb 979 -datadir | --datadir | --datadi | --datad)
c906108c 980 ac_prev=datadir ;;
81ecdfbb 981 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 982 datadir=$ac_optarg ;;
c906108c 983
81ecdfbb
RW
984 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
985 | --dataroo | --dataro | --datar)
986 ac_prev=datarootdir ;;
987 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
988 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
989 datarootdir=$ac_optarg ;;
990
c906108c 991 -disable-* | --disable-*)
81ecdfbb 992 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 993 # Reject names that are not valid shell variable names.
81ecdfbb
RW
994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995 as_fn_error "invalid feature name: $ac_useropt"
996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=no ;;
1006
1007 -docdir | --docdir | --docdi | --doc | --do)
1008 ac_prev=docdir ;;
1009 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1010 docdir=$ac_optarg ;;
1011
1012 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1013 ac_prev=dvidir ;;
1014 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1015 dvidir=$ac_optarg ;;
c906108c
SS
1016
1017 -enable-* | --enable-*)
81ecdfbb 1018 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1019 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1020 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1021 as_fn_error "invalid feature name: $ac_useropt"
1022 ac_useropt_orig=$ac_useropt
1023 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1024 case $ac_user_opts in
1025 *"
1026"enable_$ac_useropt"
1027"*) ;;
1028 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1029 ac_unrecognized_sep=', ';;
b4e70030 1030 esac
81ecdfbb 1031 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1032
1033 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1034 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1035 | --exec | --exe | --ex)
1036 ac_prev=exec_prefix ;;
1037 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1038 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1039 | --exec=* | --exe=* | --ex=*)
bec39cab 1040 exec_prefix=$ac_optarg ;;
c906108c
SS
1041
1042 -gas | --gas | --ga | --g)
1043 # Obsolete; use --with-gas.
1044 with_gas=yes ;;
1045
bec39cab
AC
1046 -help | --help | --hel | --he | -h)
1047 ac_init_help=long ;;
1048 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1049 ac_init_help=recursive ;;
1050 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1051 ac_init_help=short ;;
c906108c
SS
1052
1053 -host | --host | --hos | --ho)
bec39cab 1054 ac_prev=host_alias ;;
c906108c 1055 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1056 host_alias=$ac_optarg ;;
c906108c 1057
81ecdfbb
RW
1058 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1059 ac_prev=htmldir ;;
1060 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1061 | --ht=*)
1062 htmldir=$ac_optarg ;;
1063
c906108c
SS
1064 -includedir | --includedir | --includedi | --included | --include \
1065 | --includ | --inclu | --incl | --inc)
1066 ac_prev=includedir ;;
1067 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1068 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1069 includedir=$ac_optarg ;;
c906108c
SS
1070
1071 -infodir | --infodir | --infodi | --infod | --info | --inf)
1072 ac_prev=infodir ;;
1073 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1074 infodir=$ac_optarg ;;
c906108c
SS
1075
1076 -libdir | --libdir | --libdi | --libd)
1077 ac_prev=libdir ;;
1078 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1079 libdir=$ac_optarg ;;
c906108c
SS
1080
1081 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1082 | --libexe | --libex | --libe)
1083 ac_prev=libexecdir ;;
1084 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1085 | --libexe=* | --libex=* | --libe=*)
bec39cab 1086 libexecdir=$ac_optarg ;;
c906108c 1087
81ecdfbb
RW
1088 -localedir | --localedir | --localedi | --localed | --locale)
1089 ac_prev=localedir ;;
1090 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1091 localedir=$ac_optarg ;;
1092
c906108c 1093 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1094 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1095 ac_prev=localstatedir ;;
1096 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1097 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1098 localstatedir=$ac_optarg ;;
c906108c
SS
1099
1100 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1101 ac_prev=mandir ;;
1102 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1103 mandir=$ac_optarg ;;
c906108c
SS
1104
1105 -nfp | --nfp | --nf)
1106 # Obsolete; use --without-fp.
1107 with_fp=no ;;
1108
1109 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1110 | --no-cr | --no-c | -n)
c906108c
SS
1111 no_create=yes ;;
1112
1113 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1114 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1115 no_recursion=yes ;;
1116
1117 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1118 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1119 | --oldin | --oldi | --old | --ol | --o)
1120 ac_prev=oldincludedir ;;
1121 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1122 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1123 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1124 oldincludedir=$ac_optarg ;;
c906108c
SS
1125
1126 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1127 ac_prev=prefix ;;
1128 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1129 prefix=$ac_optarg ;;
c906108c
SS
1130
1131 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1132 | --program-pre | --program-pr | --program-p)
1133 ac_prev=program_prefix ;;
1134 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1135 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1136 program_prefix=$ac_optarg ;;
c906108c
SS
1137
1138 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1139 | --program-suf | --program-su | --program-s)
1140 ac_prev=program_suffix ;;
1141 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1142 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1143 program_suffix=$ac_optarg ;;
c906108c
SS
1144
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)
1152 ac_prev=program_transform_name ;;
1153 -program-transform-name=* | --program-transform-name=* \
1154 | --program-transform-nam=* | --program-transform-na=* \
1155 | --program-transform-n=* | --program-transform-=* \
1156 | --program-transform=* | --program-transfor=* \
1157 | --program-transfo=* | --program-transf=* \
1158 | --program-trans=* | --program-tran=* \
1159 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1160 program_transform_name=$ac_optarg ;;
c906108c 1161
81ecdfbb
RW
1162 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1163 ac_prev=pdfdir ;;
1164 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1165 pdfdir=$ac_optarg ;;
1166
1167 -psdir | --psdir | --psdi | --psd | --ps)
1168 ac_prev=psdir ;;
1169 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1170 psdir=$ac_optarg ;;
1171
c906108c
SS
1172 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1173 | -silent | --silent | --silen | --sile | --sil)
1174 silent=yes ;;
1175
1176 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1177 ac_prev=sbindir ;;
1178 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1179 | --sbi=* | --sb=*)
bec39cab 1180 sbindir=$ac_optarg ;;
c906108c
SS
1181
1182 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1183 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1184 | --sharedst | --shareds | --shared | --share | --shar \
1185 | --sha | --sh)
1186 ac_prev=sharedstatedir ;;
1187 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1188 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1189 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1190 | --sha=* | --sh=*)
bec39cab 1191 sharedstatedir=$ac_optarg ;;
c906108c
SS
1192
1193 -site | --site | --sit)
1194 ac_prev=site ;;
1195 -site=* | --site=* | --sit=*)
bec39cab 1196 site=$ac_optarg ;;
3ace7edb 1197
c906108c
SS
1198 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1199 ac_prev=srcdir ;;
1200 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1201 srcdir=$ac_optarg ;;
c906108c
SS
1202
1203 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1204 | --syscon | --sysco | --sysc | --sys | --sy)
1205 ac_prev=sysconfdir ;;
1206 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1207 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1208 sysconfdir=$ac_optarg ;;
c906108c
SS
1209
1210 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1211 ac_prev=target_alias ;;
c906108c 1212 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1213 target_alias=$ac_optarg ;;
c906108c
SS
1214
1215 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1216 verbose=yes ;;
1217
bec39cab
AC
1218 -version | --version | --versio | --versi | --vers | -V)
1219 ac_init_version=: ;;
c906108c
SS
1220
1221 -with-* | --with-*)
81ecdfbb 1222 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1223 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1225 as_fn_error "invalid package name: $ac_useropt"
1226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
b4e70030 1234 esac
81ecdfbb 1235 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1236
1237 -without-* | --without-*)
81ecdfbb 1238 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1239 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1240 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1241 as_fn_error "invalid package name: $ac_useropt"
1242 ac_useropt_orig=$ac_useropt
1243 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1244 case $ac_user_opts in
1245 *"
1246"with_$ac_useropt"
1247"*) ;;
1248 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1249 ac_unrecognized_sep=', ';;
1250 esac
1251 eval with_$ac_useropt=no ;;
c906108c
SS
1252
1253 --x)
1254 # Obsolete; use --with-x.
1255 with_x=yes ;;
1256
1257 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1258 | --x-incl | --x-inc | --x-in | --x-i)
1259 ac_prev=x_includes ;;
1260 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1261 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1262 x_includes=$ac_optarg ;;
c906108c
SS
1263
1264 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1265 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1266 ac_prev=x_libraries ;;
1267 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1268 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1269 x_libraries=$ac_optarg ;;
c906108c 1270
81ecdfbb
RW
1271 -*) as_fn_error "unrecognized option: \`$ac_option'
1272Try \`$0 --help' for more information."
c906108c
SS
1273 ;;
1274
bec39cab
AC
1275 *=*)
1276 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1277 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1278 case $ac_envvar in #(
1279 '' | [0-9]* | *[!_$as_cr_alnum]* )
1280 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1281 esac
1282 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1283 export $ac_envvar ;;
1284
c906108c 1285 *)
bec39cab 1286 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1287 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1288 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1289 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1290 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1291 ;;
1292
1293 esac
1294done
1295
1296if test -n "$ac_prev"; then
bec39cab 1297 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1298 as_fn_error "missing argument to $ac_option"
c906108c 1299fi
c906108c 1300
81ecdfbb
RW
1301if test -n "$ac_unrecognized_opts"; then
1302 case $enable_option_checking in
1303 no) ;;
1304 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1305 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1306 esac
81ecdfbb 1307fi
b4e70030 1308
81ecdfbb
RW
1309# Check all directory arguments for consistency.
1310for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1311 datadir sysconfdir sharedstatedir localstatedir includedir \
1312 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1313 libdir localedir mandir
b4e70030 1314do
81ecdfbb
RW
1315 eval ac_val=\$$ac_var
1316 # Remove trailing slashes.
1317 case $ac_val in
1318 */ )
1319 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1320 eval $ac_var=\$ac_val;;
1321 esac
1322 # Be sure to have absolute directory names.
b4e70030 1323 case $ac_val in
81ecdfbb
RW
1324 [\\/$]* | ?:[\\/]* ) continue;;
1325 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1326 esac
81ecdfbb 1327 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1328done
1329
bec39cab
AC
1330# There might be people who depend on the old broken behavior: `$host'
1331# used to hold the argument of --host etc.
1332# FIXME: To remove some day.
1333build=$build_alias
1334host=$host_alias
1335target=$target_alias
1336
1337# FIXME: To remove some day.
1338if test "x$host_alias" != x; then
1339 if test "x$build_alias" = x; then
1340 cross_compiling=maybe
81ecdfbb 1341 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1342 If a cross compiler is detected then cross compile mode will be used." >&2
1343 elif test "x$build_alias" != "x$host_alias"; then
1344 cross_compiling=yes
1345 fi
1346fi
c906108c 1347
bec39cab
AC
1348ac_tool_prefix=
1349test -n "$host_alias" && ac_tool_prefix=$host_alias-
1350
1351test "$silent" = yes && exec 6>/dev/null
c906108c 1352
c906108c 1353
81ecdfbb
RW
1354ac_pwd=`pwd` && test -n "$ac_pwd" &&
1355ac_ls_di=`ls -di .` &&
1356ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1357 as_fn_error "working directory cannot be determined"
1358test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1359 as_fn_error "pwd does not report name of working directory"
1360
1361
c906108c
SS
1362# Find the source files, if location was not specified.
1363if test -z "$srcdir"; then
1364 ac_srcdir_defaulted=yes
81ecdfbb
RW
1365 # Try the directory containing this script, then the parent directory.
1366 ac_confdir=`$as_dirname -- "$as_myself" ||
1367$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1368 X"$as_myself" : 'X\(//\)[^/]' \| \
1369 X"$as_myself" : 'X\(//\)$' \| \
1370 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1371$as_echo X"$as_myself" |
1372 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1373 s//\1/
1374 q
1375 }
1376 /^X\(\/\/\)[^/].*/{
1377 s//\1/
1378 q
1379 }
1380 /^X\(\/\/\)$/{
1381 s//\1/
1382 q
1383 }
1384 /^X\(\/\).*/{
1385 s//\1/
1386 q
1387 }
1388 s/.*/./; q'`
c906108c 1389 srcdir=$ac_confdir
81ecdfbb 1390 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1391 srcdir=..
1392 fi
1393else
1394 ac_srcdir_defaulted=no
1395fi
81ecdfbb
RW
1396if test ! -r "$srcdir/$ac_unique_file"; then
1397 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1398 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1399fi
1400ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1401ac_abs_confdir=`(
1402 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1403 pwd)`
1404# When building in place, set srcdir=.
1405if test "$ac_abs_confdir" = "$ac_pwd"; then
1406 srcdir=.
1407fi
1408# Remove unnecessary trailing slashes from srcdir.
1409# Double slashes in file names in object file debugging info
1410# mess up M-x gdb in Emacs.
1411case $srcdir in
1412*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1413esac
1414for ac_var in $ac_precious_vars; do
1415 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1416 eval ac_env_${ac_var}_value=\$${ac_var}
1417 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1418 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1419done
c906108c 1420
bec39cab
AC
1421#
1422# Report the --help message.
1423#
1424if test "$ac_init_help" = "long"; then
1425 # Omit some internal or obsolete options to make the list less imposing.
1426 # This message is too long to be a string in the A/UX 3.1 sh.
1427 cat <<_ACEOF
1428\`configure' configures this package to adapt to many kinds of systems.
1429
1430Usage: $0 [OPTION]... [VAR=VALUE]...
1431
1432To assign environment variables (e.g., CC, CFLAGS...), specify them as
1433VAR=VALUE. See below for descriptions of some of the useful variables.
1434
1435Defaults for the options are specified in brackets.
1436
1437Configuration:
1438 -h, --help display this help and exit
1439 --help=short display options specific to this package
1440 --help=recursive display the short help of all the included packages
1441 -V, --version display version information and exit
1442 -q, --quiet, --silent do not print \`checking...' messages
1443 --cache-file=FILE cache test results in FILE [disabled]
1444 -C, --config-cache alias for \`--cache-file=config.cache'
1445 -n, --no-create do not create output files
1446 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1447
bec39cab
AC
1448Installation directories:
1449 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1450 [$ac_default_prefix]
bec39cab 1451 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1452 [PREFIX]
bec39cab
AC
1453
1454By default, \`make install' will install all the files in
1455\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1456an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1457for instance \`--prefix=\$HOME'.
1458
1459For better control, use the options below.
1460
1461Fine tuning of the installation directories:
81ecdfbb
RW
1462 --bindir=DIR user executables [EPREFIX/bin]
1463 --sbindir=DIR system admin executables [EPREFIX/sbin]
1464 --libexecdir=DIR program executables [EPREFIX/libexec]
1465 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1466 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1467 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1468 --libdir=DIR object code libraries [EPREFIX/lib]
1469 --includedir=DIR C header files [PREFIX/include]
1470 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1471 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1472 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1473 --infodir=DIR info documentation [DATAROOTDIR/info]
1474 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1475 --mandir=DIR man documentation [DATAROOTDIR/man]
1476 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1477 --htmldir=DIR html documentation [DOCDIR]
1478 --dvidir=DIR dvi documentation [DOCDIR]
1479 --pdfdir=DIR pdf documentation [DOCDIR]
1480 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1481_ACEOF
1482
1483 cat <<\_ACEOF
1484
9009e1ae
MR
1485Program names:
1486 --program-prefix=PREFIX prepend PREFIX to installed program names
1487 --program-suffix=SUFFIX append SUFFIX to installed program names
1488 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1489
bec39cab
AC
1490X features:
1491 --x-includes=DIR X include files are in DIR
1492 --x-libraries=DIR X library files are in DIR
1493
1494System types:
1495 --build=BUILD configure for building on BUILD [guessed]
1496 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1497 --target=TARGET configure for building compilers for TARGET [HOST]
1498_ACEOF
1499fi
1500
1501if test -n "$ac_init_help"; then
1502
1503 cat <<\_ACEOF
1504
1505Optional Features:
81ecdfbb 1506 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1507 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1508 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1509 --enable-maintainer-mode enable make rules and dependencies not useful
1510 (and sometimes confusing) to the casual installer
2974be62 1511 --enable-plugins Enable support for plugins
da2f07f1 1512 --disable-largefile omit support for large files
a1220294
TT
1513 --enable-targets=TARGETS
1514 alternative target configurations
c0993dbe 1515 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1516 --disable-gdbcli disable command-line interface (CLI)
1517 --disable-gdbmi disable machine-interface (MI)
1518 --enable-tui enable full-screen terminal user interface (TUI)
1519 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1520 --enable-profiling enable profiling of GDB
3841debe 1521 --disable-rpath do not hardcode runtime library paths
17ef446e 1522 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1523 --enable-werror treat compile warnings as errors
32c1c914 1524 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1525 --enable-gdb-build-warnings
32c1c914 1526 enable GDB specific build-time compiler warnings if
a1220294 1527 gcc is used
32c1c914 1528 --enable-sim link gdb with simulator
bec39cab 1529 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1530 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1531 is auto)
bec39cab
AC
1532
1533Optional Packages:
1534 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1535 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1536 --with-separate-debug-dir=PATH
32c1c914 1537 look for global separate debug info in this path
62e4f60c 1538 [LIBDIR/debug]
b14b1491
TT
1539 --with-gdb-datadir=PATH look for global separate data files in this path
1540 [DATADIR/gdb]
29b0e8a2 1541 --with-relocated-sources=PATH
32c1c914 1542 automatically relocate this path for source files
7349ff92 1543 --with-auto-load-dir=PATH
aff139ff 1544 directories from which to load auto-loaded scripts
1564a261 1545 [$debugdir:$datadir/auto-load]
bccbefd2 1546 --with-auto-load-safe-path=PATH
aff139ff 1547 directories safe to hold auto-loaded files
7349ff92 1548 [--with-auto-load-dir]
bccbefd2
JK
1549 --without-auto-load-safe-path
1550 do not restrict auto-loaded files locations
05e7c244 1551 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1552 --with-curses use the curses library instead of the termcap
1553 library
c16158bc
JM
1554 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1555 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1556 --with-system-zlib use installed libz
016a3251
DD
1557 --with-gnu-ld assume the C compiler uses GNU ld default=no
1558 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1559 --without-libiconv-prefix don't search for libiconv in includedir and libdir
478aac75 1560 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1561 --with-system-readline use installed readline library
b8e0a31c
SD
1562 --with-jit-reader-dir=PATH
1563 directory to load the JIT readers from
5c39566f 1564 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1565 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1566 --without-libexpat-prefix don't search for libexpat in includedir and libdir
2400729e
UW
1567 --with-mpfr include MPFR support (auto/yes/no)
1568 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1569 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
0c4a4063
DE
1570 --with-python[=PYTHON] include python support
1571 (auto/yes/no/<python-program>)
ed3ef339
DE
1572 --with-guile[=GUILE] include guile support
1573 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1574 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1575 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1576 --without-libipt-prefix don't search for libipt in includedir and libdir
a1220294
TT
1577 --without-included-regex
1578 don't use included regex; this is the default on
1579 systems with version 2 of the GNU C library (use
1580 with caution on other system)
81ecdfbb 1581 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1582 --with-system-gdbinit=PATH
32c1c914 1583 automatically load a system-wide gdbinit file
608e2dbb
TT
1584 --with-lzma support lzma compression (auto/yes/no)
1585 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1586 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1587 --with-tcl directory containing tcl configuration (tclConfig.sh)
1588 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1589 --with-x use the X Window System
393fd4c3
YQ
1590 --with-babeltrace include babeltrace support (auto/yes/no)
1591 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1592 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1593
1594Some influential environment variables:
1595 CC C compiler command
1596 CFLAGS C compiler flags
1597 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1598 nonstandard directory <lib dir>
81ecdfbb
RW
1599 LIBS libraries to pass to the linker, e.g. -l<library>
1600 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1601 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1602 CXX C++ compiler command
1603 CXXFLAGS C++ compiler flags
bec39cab 1604 CPP C preprocessor
f06e05e0
JK
1605 MAKEINFO Parent configure detects if it is of sufficient version.
1606 MAKEINFOFLAGS
1607 Parameters for MAKEINFO.
81ecdfbb
RW
1608 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1609 the first program found out of: `bison -y', `byacc', `yacc'.
1610 YFLAGS The list of arguments that will be passed by default to $YACC.
1611 This script will default YFLAGS to the empty string to avoid a
1612 default value of `-d' given by some make applications.
1613 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1614
1615Use these variables to override the choices made by `configure' or to help
1616it to find libraries and programs with nonstandard names/locations.
1617
81ecdfbb 1618Report bugs to the package provider.
bec39cab 1619_ACEOF
81ecdfbb 1620ac_status=$?
bec39cab
AC
1621fi
1622
1623if test "$ac_init_help" = "recursive"; then
1624 # If there are subdirs, report their specific --help.
bec39cab 1625 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1626 test -d "$ac_dir" ||
1627 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1628 continue
bec39cab
AC
1629 ac_builddir=.
1630
81ecdfbb
RW
1631case "$ac_dir" in
1632.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1633*)
1634 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1635 # A ".." for each directory in $ac_dir_suffix.
1636 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1637 case $ac_top_builddir_sub in
1638 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1639 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1640 esac ;;
1641esac
1642ac_abs_top_builddir=$ac_pwd
1643ac_abs_builddir=$ac_pwd$ac_dir_suffix
1644# for backward compatibility:
1645ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1646
1647case $srcdir in
81ecdfbb 1648 .) # We are building in place.
bec39cab 1649 ac_srcdir=.
81ecdfbb
RW
1650 ac_top_srcdir=$ac_top_builddir_sub
1651 ac_abs_top_srcdir=$ac_pwd ;;
1652 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1653 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1654 ac_top_srcdir=$srcdir
1655 ac_abs_top_srcdir=$srcdir ;;
1656 *) # Relative name.
1657 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1658 ac_top_srcdir=$ac_top_build_prefix$srcdir
1659 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1660esac
81ecdfbb 1661ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1662
81ecdfbb
RW
1663 cd "$ac_dir" || { ac_status=$?; continue; }
1664 # Check for guested configure.
1665 if test -f "$ac_srcdir/configure.gnu"; then
1666 echo &&
1667 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1668 elif test -f "$ac_srcdir/configure"; then
1669 echo &&
1670 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1671 else
81ecdfbb
RW
1672 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1673 fi || ac_status=$?
1674 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1675 done
1676fi
1677
81ecdfbb 1678test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1679if $ac_init_version; then
1680 cat <<\_ACEOF
81ecdfbb
RW
1681configure
1682generated by GNU Autoconf 2.64
bec39cab 1683
81ecdfbb 1684Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1685This configure script is free software; the Free Software Foundation
1686gives unlimited permission to copy, distribute and modify it.
1687_ACEOF
81ecdfbb 1688 exit
bec39cab 1689fi
bec39cab 1690
81ecdfbb
RW
1691## ------------------------ ##
1692## Autoconf initialization. ##
1693## ------------------------ ##
bec39cab 1694
81ecdfbb
RW
1695# ac_fn_c_try_compile LINENO
1696# --------------------------
1697# Try to compile conftest.$ac_ext, and return whether this succeeded.
1698ac_fn_c_try_compile ()
1699{
1700 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1701 rm -f conftest.$ac_objext
1702 if { { ac_try="$ac_compile"
1703case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_compile") 2>conftest.err
1710 ac_status=$?
1711 if test -s conftest.err; then
1712 grep -v '^ *+' conftest.err >conftest.er1
1713 cat conftest.er1 >&5
1714 mv -f conftest.er1 conftest.err
1715 fi
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717 test $ac_status = 0; } && {
1718 test -z "$ac_c_werror_flag" ||
1719 test ! -s conftest.err
1720 } && test -s conftest.$ac_objext; then :
1721 ac_retval=0
1722else
1723 $as_echo "$as_me: failed program was:" >&5
1724sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1725
81ecdfbb
RW
1726 ac_retval=1
1727fi
1728 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1729 return $ac_retval
1730
1731} # ac_fn_c_try_compile
1732
3bc3d82a
PA
1733# ac_fn_cxx_try_compile LINENO
1734# ----------------------------
1735# Try to compile conftest.$ac_ext, and return whether this succeeded.
1736ac_fn_cxx_try_compile ()
1737{
1738 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739 rm -f conftest.$ac_objext
1740 if { { ac_try="$ac_compile"
1741case "(($ac_try" in
1742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1743 *) ac_try_echo=$ac_try;;
1744esac
1745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1746$as_echo "$ac_try_echo"; } >&5
1747 (eval "$ac_compile") 2>conftest.err
1748 ac_status=$?
1749 if test -s conftest.err; then
1750 grep -v '^ *+' conftest.err >conftest.er1
1751 cat conftest.er1 >&5
1752 mv -f conftest.er1 conftest.err
1753 fi
1754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1755 test $ac_status = 0; } && {
1756 test -z "$ac_cxx_werror_flag" ||
1757 test ! -s conftest.err
1758 } && test -s conftest.$ac_objext; then :
1759 ac_retval=0
1760else
1761 $as_echo "$as_me: failed program was:" >&5
1762sed 's/^/| /' conftest.$ac_ext >&5
1763
1764 ac_retval=1
1765fi
1766 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1767 return $ac_retval
1768
1769} # ac_fn_cxx_try_compile
1770
81ecdfbb
RW
1771# ac_fn_c_try_cpp LINENO
1772# ----------------------
1773# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1774ac_fn_c_try_cpp ()
bec39cab 1775{
81ecdfbb
RW
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1777 if { { ac_try="$ac_cpp conftest.$ac_ext"
1778case "(($ac_try" in
1779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1780 *) ac_try_echo=$ac_try;;
1781esac
1782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1783$as_echo "$ac_try_echo"; } >&5
1784 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1785 ac_status=$?
1786 if test -s conftest.err; then
1787 grep -v '^ *+' conftest.err >conftest.er1
1788 cat conftest.er1 >&5
1789 mv -f conftest.er1 conftest.err
1790 fi
1791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1792 test $ac_status = 0; } >/dev/null && {
1793 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1794 test ! -s conftest.err
1795 }; then :
1796 ac_retval=0
1797else
1798 $as_echo "$as_me: failed program was:" >&5
1799sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1800
81ecdfbb
RW
1801 ac_retval=1
1802fi
1803 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1804 return $ac_retval
bec39cab 1805
81ecdfbb 1806} # ac_fn_c_try_cpp
bec39cab 1807
81ecdfbb
RW
1808# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1809# -------------------------------------------------------
1810# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1811# the include files in INCLUDES and setting the cache variable VAR
1812# accordingly.
1813ac_fn_c_check_header_mongrel ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
1819if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1820 $as_echo_n "(cached) " >&6
1821fi
1822eval ac_res=\$$3
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824$as_echo "$ac_res" >&6; }
1825else
1826 # Is the header compilable?
1827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1828$as_echo_n "checking $2 usability... " >&6; }
1829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832#include <$2>
1833_ACEOF
1834if ac_fn_c_try_compile "$LINENO"; then :
1835 ac_header_compiler=yes
1836else
1837 ac_header_compiler=no
1838fi
1839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1841$as_echo "$ac_header_compiler" >&6; }
bec39cab 1842
81ecdfbb
RW
1843# Is the header present?
1844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1845$as_echo_n "checking $2 presence... " >&6; }
1846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848#include <$2>
1849_ACEOF
1850if ac_fn_c_try_cpp "$LINENO"; then :
1851 ac_header_preproc=yes
1852else
1853 ac_header_preproc=no
1854fi
1855rm -f conftest.err conftest.$ac_ext
1856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1857$as_echo "$ac_header_preproc" >&6; }
bec39cab 1858
81ecdfbb
RW
1859# So? What about this header?
1860case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1861 yes:no: )
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1863$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1865$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1866 ;;
1867 no:yes:* )
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1869$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1871$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1873$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1875$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1877$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1878 ;;
1879esac
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1881$as_echo_n "checking for $2... " >&6; }
1882if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1883 $as_echo_n "(cached) " >&6
1884else
1885 eval "$3=\$ac_header_compiler"
1886fi
1887eval ac_res=\$$3
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1889$as_echo "$ac_res" >&6; }
1890fi
1891 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1892
81ecdfbb 1893} # ac_fn_c_check_header_mongrel
bec39cab 1894
81ecdfbb
RW
1895# ac_fn_c_try_run LINENO
1896# ----------------------
1897# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1898# that executables *can* be run.
1899ac_fn_c_try_run ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 if { { ac_try="$ac_link"
1903case "(($ac_try" in
1904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905 *) ac_try_echo=$ac_try;;
1906esac
1907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908$as_echo "$ac_try_echo"; } >&5
1909 (eval "$ac_link") 2>&5
1910 ac_status=$?
1911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1913 { { case "(($ac_try" in
1914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915 *) ac_try_echo=$ac_try;;
1916esac
1917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1918$as_echo "$ac_try_echo"; } >&5
1919 (eval "$ac_try") 2>&5
1920 ac_status=$?
1921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1922 test $ac_status = 0; }; }; then :
1923 ac_retval=0
1924else
1925 $as_echo "$as_me: program exited with status $ac_status" >&5
1926 $as_echo "$as_me: failed program was:" >&5
1927sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1928
81ecdfbb
RW
1929 ac_retval=$ac_status
1930fi
1931 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1932 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1933 return $ac_retval
bec39cab 1934
81ecdfbb 1935} # ac_fn_c_try_run
bec39cab 1936
81ecdfbb
RW
1937# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1938# -------------------------------------------------------
1939# Tests whether HEADER exists and can be compiled using the include files in
1940# INCLUDES, setting the cache variable VAR accordingly.
1941ac_fn_c_check_header_compile ()
1942{
1943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1945$as_echo_n "checking for $2... " >&6; }
1946if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1947 $as_echo_n "(cached) " >&6
1948else
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952#include <$2>
bec39cab 1953_ACEOF
81ecdfbb
RW
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 eval "$3=yes"
1956else
1957 eval "$3=no"
1958fi
1959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1960fi
1961eval ac_res=\$$3
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1963$as_echo "$ac_res" >&6; }
1964 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1965
81ecdfbb 1966} # ac_fn_c_check_header_compile
bec39cab 1967
2974be62
AM
1968# ac_fn_c_try_link LINENO
1969# -----------------------
1970# Try to link conftest.$ac_ext, and return whether this succeeded.
1971ac_fn_c_try_link ()
1972{
1973 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1974 rm -f conftest.$ac_objext conftest$ac_exeext
1975 if { { ac_try="$ac_link"
1976case "(($ac_try" in
1977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978 *) ac_try_echo=$ac_try;;
1979esac
1980eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981$as_echo "$ac_try_echo"; } >&5
1982 (eval "$ac_link") 2>conftest.err
1983 ac_status=$?
1984 if test -s conftest.err; then
1985 grep -v '^ *+' conftest.err >conftest.er1
1986 cat conftest.er1 >&5
1987 mv -f conftest.er1 conftest.err
1988 fi
1989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1990 test $ac_status = 0; } && {
1991 test -z "$ac_c_werror_flag" ||
1992 test ! -s conftest.err
1993 } && test -s conftest$ac_exeext && {
1994 test "$cross_compiling" = yes ||
1995 $as_test_x conftest$ac_exeext
1996 }; then :
1997 ac_retval=0
1998else
1999 $as_echo "$as_me: failed program was:" >&5
2000sed 's/^/| /' conftest.$ac_ext >&5
2001
2002 ac_retval=1
2003fi
2004 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2005 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2006 # interfere with the next link command; also delete a directory that is
2007 # left behind by Apple's compiler. We do this before executing the actions.
2008 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2009 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2010 return $ac_retval
2011
2012} # ac_fn_c_try_link
2013
81ecdfbb
RW
2014# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2015# --------------------------------------------
2016# Tries to find the compile-time value of EXPR in a program that includes
2017# INCLUDES, setting VAR accordingly. Returns whether the value could be
2018# computed
2019ac_fn_c_compute_int ()
2020{
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 if test "$cross_compiling" = yes; then
2023 # Depending upon the size, compute the lo and hi bounds.
2024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
2028main ()
2029{
2030static int test_array [1 - 2 * !(($2) >= 0)];
2031test_array [0] = 0
bec39cab 2032
81ecdfbb
RW
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 ac_lo=0 ac_mid=0
2039 while :; do
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2047test_array [0] = 0
bec39cab 2048
81ecdfbb
RW
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_hi=$ac_mid; break
2055else
2056 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2057 if test $ac_lo -le $ac_mid; then
2058 ac_lo= ac_hi=
2059 break
2060 fi
2061 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2062fi
81ecdfbb
RW
2063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2064 done
c906108c 2065else
81ecdfbb
RW
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) < 0)];
2073test_array [0] = 0
bec39cab 2074
81ecdfbb
RW
2075 ;
2076 return 0;
2077}
2078_ACEOF
2079if ac_fn_c_try_compile "$LINENO"; then :
2080 ac_hi=-1 ac_mid=-1
2081 while :; do
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2089test_array [0] = 0
bec39cab 2090
81ecdfbb
RW
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095if ac_fn_c_try_compile "$LINENO"; then :
2096 ac_lo=$ac_mid; break
2097else
2098 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2099 if test $ac_mid -le $ac_hi; then
2100 ac_lo= ac_hi=
2101 break
2102 fi
2103 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106 done
2107else
2108 ac_lo= ac_hi=
2109fi
2110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113# Binary search between lo and hi bounds.
2114while test "x$ac_lo" != "x$ac_hi"; do
2115 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119int
2120main ()
2121{
2122static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2123test_array [0] = 0
bec39cab 2124
81ecdfbb
RW
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_hi=$ac_mid
2131else
2132 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135done
2136case $ac_lo in #((
2137?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2138'') ac_retval=1 ;;
2139esac
2140 else
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143$4
2144static long int longval () { return $2; }
2145static unsigned long int ulongval () { return $2; }
2146#include <stdio.h>
2147#include <stdlib.h>
2148int
2149main ()
2150{
bec39cab 2151
81ecdfbb
RW
2152 FILE *f = fopen ("conftest.val", "w");
2153 if (! f)
2154 return 1;
2155 if (($2) < 0)
2156 {
2157 long int i = longval ();
2158 if (i != ($2))
2159 return 1;
2160 fprintf (f, "%ld", i);
2161 }
2162 else
2163 {
2164 unsigned long int i = ulongval ();
2165 if (i != ($2))
2166 return 1;
2167 fprintf (f, "%lu", i);
2168 }
2169 /* Do not output a trailing newline, as this causes \r\n confusion
2170 on some platforms. */
2171 return ferror (f) || fclose (f) != 0;
bec39cab 2172
81ecdfbb
RW
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_run "$LINENO"; then :
2178 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2179else
2180 ac_retval=1
2181fi
2182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2183 conftest.$ac_objext conftest.beam conftest.$ac_ext
2184rm -f conftest.val
bec39cab 2185
81ecdfbb
RW
2186 fi
2187 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2188 return $ac_retval
bec39cab 2189
81ecdfbb 2190} # ac_fn_c_compute_int
bec39cab 2191
55a8c076
YQ
2192# ac_fn_c_check_func LINENO FUNC VAR
2193# ----------------------------------
2194# Tests whether FUNC exists, setting the cache variable VAR accordingly
2195ac_fn_c_check_func ()
81ecdfbb
RW
2196{
2197 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2199$as_echo_n "checking for $2... " >&6; }
2200if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2201 $as_echo_n "(cached) " >&6
2202else
81ecdfbb
RW
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h. */
55a8c076
YQ
2205/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2207#define $2 innocuous_$2
2208
2209/* System header to define __stub macros and hopefully few prototypes,
2210 which can conflict with char $2 (); below.
2211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2212 <limits.h> exists even on freestanding compilers. */
2213
2214#ifdef __STDC__
2215# include <limits.h>
2216#else
2217# include <assert.h>
2218#endif
2219
2220#undef $2
2221
2222/* Override any GCC internal prototype to avoid an error.
2223 Use char because int might match the return type of a GCC
2224 builtin and then its argument prototype would still apply. */
2225#ifdef __cplusplus
2226extern "C"
2227#endif
2228char $2 ();
2229/* The GNU C library defines this for functions which it implements
2230 to always fail with ENOSYS. Some functions are actually named
2231 something starting with __ and the normal name is an alias. */
2232#if defined __stub_$2 || defined __stub___$2
2233choke me
2234#endif
2235
2236int
2237main ()
2238{
2239return $2 ();
2240 ;
2241 return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_link "$LINENO"; then :
2245 eval "$3=yes"
2246else
2247 eval "$3=no"
2248fi
2249rm -f core conftest.err conftest.$ac_objext \
2250 conftest$ac_exeext conftest.$ac_ext
2251fi
2252eval ac_res=\$$3
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2254$as_echo "$ac_res" >&6; }
2255 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2256
2257} # ac_fn_c_check_func
2258
c56ccc05
MM
2259# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2260# ----------------------------------------------------
2261# Tries to find if the field MEMBER exists in type AGGR, after including
2262# INCLUDES, setting cache variable VAR accordingly.
2263ac_fn_c_check_member ()
2264{
2265 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2267$as_echo_n "checking for $2.$3... " >&6; }
2268if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2269 $as_echo_n "(cached) " >&6
2270else
2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272/* end confdefs.h. */
2273$5
2274int
2275main ()
2276{
2277static $2 ac_aggr;
2278if (ac_aggr.$3)
2279return 0;
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"; then :
2285 eval "$4=yes"
2286else
2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h. */
2289$5
2290int
2291main ()
2292{
2293static $2 ac_aggr;
2294if (sizeof ac_aggr.$3)
2295return 0;
2296 ;
2297 return 0;
2298}
2299_ACEOF
2300if ac_fn_c_try_compile "$LINENO"; then :
2301 eval "$4=yes"
2302else
2303 eval "$4=no"
2304fi
2305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308fi
2309eval ac_res=\$$4
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2311$as_echo "$ac_res" >&6; }
2312 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2313
2314} # ac_fn_c_check_member
2315
07697489
PA
2316# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2317# -------------------------------------------
2318# Tests whether TYPE exists after having included INCLUDES, setting cache
2319# variable VAR accordingly.
2320ac_fn_c_check_type ()
2321{
2322 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2324$as_echo_n "checking for $2... " >&6; }
2325if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2326 $as_echo_n "(cached) " >&6
2327else
2328 eval "$3=no"
2329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330/* end confdefs.h. */
2331$4
2332int
2333main ()
2334{
2335if (sizeof ($2))
2336 return 0;
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_compile "$LINENO"; then :
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h. */
2344$4
2345int
2346main ()
2347{
2348if (sizeof (($2)))
2349 return 0;
2350 ;
2351 return 0;
2352}
2353_ACEOF
2354if ac_fn_c_try_compile "$LINENO"; then :
2355
2356else
2357 eval "$3=yes"
2358fi
2359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362fi
2363eval ac_res=\$$3
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2365$as_echo "$ac_res" >&6; }
2366 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2367
2368} # ac_fn_c_check_type
2369
770d76d7
PA
2370# ac_fn_c_check_decl LINENO SYMBOL VAR
2371# ------------------------------------
2372# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2373ac_fn_c_check_decl ()
2374{
2375 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376 as_decl_name=`echo $2|sed 's/ *(.*//'`
2377 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2379$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2380if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2381 $as_echo_n "(cached) " >&6
2382else
2383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384/* end confdefs.h. */
2385$4
2386int
2387main ()
2388{
2389#ifndef $as_decl_name
2390#ifdef __cplusplus
2391 (void) $as_decl_use;
2392#else
2393 (void) $as_decl_name;
2394#endif
2395#endif
2396
2397 ;
2398 return 0;
2399}
2400_ACEOF
2401if ac_fn_c_try_compile "$LINENO"; then :
2402 eval "$3=yes"
2403else
2404 eval "$3=no"
2405fi
2406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407fi
2408eval ac_res=\$$3
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2410$as_echo "$ac_res" >&6; }
2411 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2412
2413} # ac_fn_c_check_decl
81ecdfbb
RW
2414cat >config.log <<_ACEOF
2415This file contains any messages produced by compilers while
2416running configure, to aid debugging if configure makes a mistake.
d5af19ba 2417
81ecdfbb
RW
2418It was created by $as_me, which was
2419generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2420
81ecdfbb 2421 $ $0 $@
413ccac7 2422
81ecdfbb
RW
2423_ACEOF
2424exec 5>>config.log
2425{
2426cat <<_ASUNAME
2427## --------- ##
2428## Platform. ##
2429## --------- ##
413ccac7 2430
81ecdfbb
RW
2431hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2432uname -m = `(uname -m) 2>/dev/null || echo unknown`
2433uname -r = `(uname -r) 2>/dev/null || echo unknown`
2434uname -s = `(uname -s) 2>/dev/null || echo unknown`
2435uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2436
81ecdfbb
RW
2437/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2438/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2439
81ecdfbb
RW
2440/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2441/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2442/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2443/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2444/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2445/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2446/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2447
81ecdfbb 2448_ASUNAME
bec39cab 2449
bec39cab
AC
2450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2451for as_dir in $PATH
2452do
2453 IFS=$as_save_IFS
2454 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2455 $as_echo "PATH: $as_dir"
2456 done
2457IFS=$as_save_IFS
bec39cab 2458
81ecdfbb 2459} >&5
bec39cab 2460
81ecdfbb 2461cat >&5 <<_ACEOF
bec39cab 2462
bec39cab 2463
81ecdfbb
RW
2464## ----------- ##
2465## Core tests. ##
2466## ----------- ##
2467
2468_ACEOF
2469
2470
2471# Keep a trace of the command line.
2472# Strip out --no-create and --no-recursion so they do not pile up.
2473# Strip out --silent because we don't want to record it for future runs.
2474# Also quote any args containing shell meta-characters.
2475# Make two passes to allow for proper duplicate-argument suppression.
2476ac_configure_args=
2477ac_configure_args0=
2478ac_configure_args1=
2479ac_must_keep_next=false
2480for ac_pass in 1 2
2481do
2482 for ac_arg
2483 do
2484 case $ac_arg in
2485 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2486 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2487 | -silent | --silent | --silen | --sile | --sil)
2488 continue ;;
2489 *\'*)
2490 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2491 esac
2492 case $ac_pass in
2493 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2494 2)
2495 as_fn_append ac_configure_args1 " '$ac_arg'"
2496 if test $ac_must_keep_next = true; then
2497 ac_must_keep_next=false # Got value, back to normal.
2498 else
2499 case $ac_arg in
2500 *=* | --config-cache | -C | -disable-* | --disable-* \
2501 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2502 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2503 | -with-* | --with-* | -without-* | --without-* | --x)
2504 case "$ac_configure_args0 " in
2505 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2506 esac
2507 ;;
2508 -* ) ac_must_keep_next=true ;;
2509 esac
2510 fi
2511 as_fn_append ac_configure_args " '$ac_arg'"
2512 ;;
2513 esac
2514 done
2515done
2516{ ac_configure_args0=; unset ac_configure_args0;}
2517{ ac_configure_args1=; unset ac_configure_args1;}
2518
2519# When interrupted or exit'd, cleanup temporary files, and complete
2520# config.log. We remove comments because anyway the quotes in there
2521# would cause problems or look ugly.
2522# WARNING: Use '\'' to represent an apostrophe within the trap.
2523# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2524trap 'exit_status=$?
2525 # Save into config.log some information that might help in debugging.
2526 {
2527 echo
2528
2529 cat <<\_ASBOX
2530## ---------------- ##
2531## Cache variables. ##
2532## ---------------- ##
2533_ASBOX
2534 echo
2535 # The following way of writing the cache mishandles newlines in values,
2536(
2537 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2538 eval ac_val=\$$ac_var
2539 case $ac_val in #(
2540 *${as_nl}*)
2541 case $ac_var in #(
2542 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2543$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2544 esac
2545 case $ac_var in #(
2546 _ | IFS | as_nl) ;; #(
2547 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2548 *) { eval $ac_var=; unset $ac_var;} ;;
2549 esac ;;
2550 esac
2551 done
2552 (set) 2>&1 |
2553 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2554 *${as_nl}ac_space=\ *)
2555 sed -n \
2556 "s/'\''/'\''\\\\'\'''\''/g;
2557 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2558 ;; #(
2559 *)
2560 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2561 ;;
2562 esac |
2563 sort
2564)
2565 echo
2566
2567 cat <<\_ASBOX
2568## ----------------- ##
2569## Output variables. ##
2570## ----------------- ##
2571_ASBOX
2572 echo
2573 for ac_var in $ac_subst_vars
2574 do
2575 eval ac_val=\$$ac_var
2576 case $ac_val in
2577 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2578 esac
2579 $as_echo "$ac_var='\''$ac_val'\''"
2580 done | sort
2581 echo
2582
2583 if test -n "$ac_subst_files"; then
2584 cat <<\_ASBOX
2585## ------------------- ##
2586## File substitutions. ##
2587## ------------------- ##
2588_ASBOX
2589 echo
2590 for ac_var in $ac_subst_files
2591 do
2592 eval ac_val=\$$ac_var
2593 case $ac_val in
2594 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2595 esac
2596 $as_echo "$ac_var='\''$ac_val'\''"
2597 done | sort
2598 echo
2599 fi
2600
2601 if test -s confdefs.h; then
2602 cat <<\_ASBOX
2603## ----------- ##
2604## confdefs.h. ##
2605## ----------- ##
2606_ASBOX
2607 echo
2608 cat confdefs.h
2609 echo
2610 fi
2611 test "$ac_signal" != 0 &&
2612 $as_echo "$as_me: caught signal $ac_signal"
2613 $as_echo "$as_me: exit $exit_status"
2614 } >&5
2615 rm -f core *.core core.conftest.* &&
2616 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2617 exit $exit_status
2618' 0
2619for ac_signal in 1 2 13 15; do
2620 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2621done
2622ac_signal=0
2623
2624# confdefs.h avoids OS command line length limits that DEFS can exceed.
2625rm -f -r conftest* confdefs.h
2626
2627$as_echo "/* confdefs.h */" > confdefs.h
2628
2629# Predefined preprocessor variables.
2630
2631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_NAME "$PACKAGE_NAME"
2633_ACEOF
2634
2635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2637_ACEOF
2638
2639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_VERSION "$PACKAGE_VERSION"
2641_ACEOF
2642
2643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_STRING "$PACKAGE_STRING"
2645_ACEOF
2646
2647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2649_ACEOF
2650
2651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_URL "$PACKAGE_URL"
2653_ACEOF
2654
2655
2656# Let the site file select an alternate cache file if it wants to.
2657# Prefer an explicitly selected file to automatically selected ones.
2658ac_site_file1=NONE
2659ac_site_file2=NONE
2660if test -n "$CONFIG_SITE"; then
2661 ac_site_file1=$CONFIG_SITE
2662elif test "x$prefix" != xNONE; then
2663 ac_site_file1=$prefix/share/config.site
2664 ac_site_file2=$prefix/etc/config.site
2665else
2666 ac_site_file1=$ac_default_prefix/share/config.site
2667 ac_site_file2=$ac_default_prefix/etc/config.site
2668fi
2669for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2670do
2671 test "x$ac_site_file" = xNONE && continue
2672 if test -r "$ac_site_file"; then
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2674$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2675 sed 's/^/| /' "$ac_site_file" >&5
2676 . "$ac_site_file"
2677 fi
2678done
2679
2680if test -r "$cache_file"; then
2681 # Some versions of bash will fail to source /dev/null (special
2682 # files actually), so we avoid doing that.
2683 if test -f "$cache_file"; then
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2685$as_echo "$as_me: loading cache $cache_file" >&6;}
2686 case $cache_file in
2687 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2688 *) . "./$cache_file";;
2689 esac
2690 fi
2691else
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2693$as_echo "$as_me: creating cache $cache_file" >&6;}
2694 >$cache_file
bec39cab
AC
2695fi
2696
81ecdfbb
RW
2697# Check that the precious variables saved in the cache have kept the same
2698# value.
2699ac_cache_corrupted=false
2700for ac_var in $ac_precious_vars; do
2701 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2702 eval ac_new_set=\$ac_env_${ac_var}_set
2703 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2704 eval ac_new_val=\$ac_env_${ac_var}_value
2705 case $ac_old_set,$ac_new_set in
2706 set,)
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2708$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2709 ac_cache_corrupted=: ;;
2710 ,set)
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2712$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2713 ac_cache_corrupted=: ;;
2714 ,);;
2715 *)
2716 if test "x$ac_old_val" != "x$ac_new_val"; then
2717 # differences in whitespace do not lead to failure.
2718 ac_old_val_w=`echo x $ac_old_val`
2719 ac_new_val_w=`echo x $ac_new_val`
2720 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2722$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2723 ac_cache_corrupted=:
2724 else
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2726$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2727 eval $ac_var=\$ac_old_val
2728 fi
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2730$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2732$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2733 fi;;
2734 esac
2735 # Pass precious variables to config.status.
2736 if test "$ac_new_set" = set; then
2737 case $ac_new_val in
2738 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2739 *) ac_arg=$ac_var=$ac_new_val ;;
2740 esac
2741 case " $ac_configure_args " in
2742 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2743 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2744 esac
2745 fi
2746done
2747if $ac_cache_corrupted; then
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2751$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2752 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2753fi
2754## -------------------- ##
2755## Main body of script. ##
2756## -------------------- ##
2757
2758ac_ext=c
2759ac_cpp='$CPP $CPPFLAGS'
2760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2762ac_compiler_gnu=$ac_cv_c_compiler_gnu
2763
2764
2765
2766
2767
2768ac_config_headers="$ac_config_headers config.h:config.in"
2769
2770
2771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2772$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2773 # Check whether --enable-maintainer-mode was given.
2774if test "${enable_maintainer_mode+set}" = set; then :
2775 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2776else
2777 USE_MAINTAINER_MODE=no
2778fi
2779
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2781$as_echo "$USE_MAINTAINER_MODE" >&6; }
2782 if test $USE_MAINTAINER_MODE = yes; then
2783 MAINTAINER_MODE_TRUE=
2784 MAINTAINER_MODE_FALSE='#'
2785else
2786 MAINTAINER_MODE_TRUE='#'
2787 MAINTAINER_MODE_FALSE=
2788fi
2789
2790 MAINT=$MAINTAINER_MODE_TRUE
2791
2792
2793
17ef446e 2794# Set the 'development' global.
270c9937 2795. $srcdir/../bfd/development.sh
f5f1cdb6 2796
81ecdfbb
RW
2797ac_ext=c
2798ac_cpp='$CPP $CPPFLAGS'
2799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2801ac_compiler_gnu=$ac_cv_c_compiler_gnu
2802if test -n "$ac_tool_prefix"; then
2803 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2804set dummy ${ac_tool_prefix}gcc; ac_word=$2
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2806$as_echo_n "checking for $ac_word... " >&6; }
2807if test "${ac_cv_prog_CC+set}" = set; then :
2808 $as_echo_n "(cached) " >&6
c906108c
SS
2809else
2810 if test -n "$CC"; then
2811 ac_cv_prog_CC="$CC" # Let the user override the test.
2812else
bec39cab
AC
2813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2814for as_dir in $PATH
2815do
2816 IFS=$as_save_IFS
2817 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2818 for ac_exec_ext in '' $ac_executable_extensions; do
2819 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2820 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2822 break 2
2823 fi
2824done
81ecdfbb
RW
2825 done
2826IFS=$as_save_IFS
bec39cab 2827
c906108c
SS
2828fi
2829fi
bec39cab 2830CC=$ac_cv_prog_CC
c906108c 2831if test -n "$CC"; then
81ecdfbb
RW
2832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2833$as_echo "$CC" >&6; }
c906108c 2834else
81ecdfbb
RW
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2836$as_echo "no" >&6; }
c906108c
SS
2837fi
2838
81ecdfbb 2839
b4e70030
JB
2840fi
2841if test -z "$ac_cv_prog_CC"; then
2842 ac_ct_CC=$CC
81ecdfbb
RW
2843 # Extract the first word of "gcc", so it can be a program name with args.
2844set dummy gcc; ac_word=$2
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2846$as_echo_n "checking for $ac_word... " >&6; }
2847if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2848 $as_echo_n "(cached) " >&6
b4e70030
JB
2849else
2850 if test -n "$ac_ct_CC"; then
2851 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2852else
2853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2854for as_dir in $PATH
2855do
2856 IFS=$as_save_IFS
2857 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2858 for ac_exec_ext in '' $ac_executable_extensions; do
2859 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2860 ac_cv_prog_ac_ct_CC="gcc"
2861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2862 break 2
4e8d927d 2863 fi
b4e70030 2864done
81ecdfbb
RW
2865 done
2866IFS=$as_save_IFS
b4e70030
JB
2867
2868fi
2869fi
2870ac_ct_CC=$ac_cv_prog_ac_ct_CC
2871if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2873$as_echo "$ac_ct_CC" >&6; }
b4e70030 2874else
81ecdfbb
RW
2875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2876$as_echo "no" >&6; }
b4e70030
JB
2877fi
2878
81ecdfbb
RW
2879 if test "x$ac_ct_CC" = x; then
2880 CC=""
2881 else
2882 case $cross_compiling:$ac_tool_warned in
2883yes:)
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2885$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2886ac_tool_warned=yes ;;
2887esac
2888 CC=$ac_ct_CC
2889 fi
b4e70030
JB
2890else
2891 CC="$ac_cv_prog_CC"
2892fi
2893
c906108c 2894if test -z "$CC"; then
81ecdfbb
RW
2895 if test -n "$ac_tool_prefix"; then
2896 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2897set dummy ${ac_tool_prefix}cc; ac_word=$2
2898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2899$as_echo_n "checking for $ac_word... " >&6; }
2900if test "${ac_cv_prog_CC+set}" = set; then :
2901 $as_echo_n "(cached) " >&6
c906108c
SS
2902else
2903 if test -n "$CC"; then
2904 ac_cv_prog_CC="$CC" # Let the user override the test.
2905else
bec39cab
AC
2906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2907for as_dir in $PATH
2908do
2909 IFS=$as_save_IFS
2910 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2911 for ac_exec_ext in '' $ac_executable_extensions; do
2912 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2913 ac_cv_prog_CC="${ac_tool_prefix}cc"
2914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2915 break 2
2916 fi
2917done
81ecdfbb
RW
2918 done
2919IFS=$as_save_IFS
2920
2921fi
2922fi
2923CC=$ac_cv_prog_CC
2924if test -n "$CC"; then
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2926$as_echo "$CC" >&6; }
2927else
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2929$as_echo "no" >&6; }
2930fi
2931
2932
2933 fi
2934fi
2935if test -z "$CC"; then
2936 # Extract the first word of "cc", so it can be a program name with args.
2937set dummy cc; ac_word=$2
2938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2939$as_echo_n "checking for $ac_word... " >&6; }
2940if test "${ac_cv_prog_CC+set}" = set; then :
2941 $as_echo_n "(cached) " >&6
2942else
2943 if test -n "$CC"; then
2944 ac_cv_prog_CC="$CC" # Let the user override the test.
2945else
2946 ac_prog_rejected=no
2947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948for as_dir in $PATH
2949do
2950 IFS=$as_save_IFS
2951 test -z "$as_dir" && as_dir=.
2952 for ac_exec_ext in '' $ac_executable_extensions; do
2953 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2954 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2955 ac_prog_rejected=yes
2956 continue
2957 fi
2958 ac_cv_prog_CC="cc"
2959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2960 break 2
2961 fi
2962done
2963 done
2964IFS=$as_save_IFS
bec39cab 2965
c906108c
SS
2966if test $ac_prog_rejected = yes; then
2967 # We found a bogon in the path, so make sure we never use it.
2968 set dummy $ac_cv_prog_CC
2969 shift
bec39cab 2970 if test $# != 0; then
c906108c
SS
2971 # We chose a different compiler from the bogus one.
2972 # However, it has the same basename, so the bogon will be chosen
2973 # first if we set CC to just the basename; use the full file name.
2974 shift
bec39cab 2975 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2976 fi
2977fi
2978fi
2979fi
bec39cab 2980CC=$ac_cv_prog_CC
c906108c 2981if test -n "$CC"; then
81ecdfbb
RW
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2983$as_echo "$CC" >&6; }
c906108c 2984else
81ecdfbb
RW
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2986$as_echo "no" >&6; }
c906108c
SS
2987fi
2988
81ecdfbb 2989
bec39cab
AC
2990fi
2991if test -z "$CC"; then
2992 if test -n "$ac_tool_prefix"; then
81ecdfbb 2993 for ac_prog in cl.exe
bec39cab
AC
2994 do
2995 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2996set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2998$as_echo_n "checking for $ac_word... " >&6; }
2999if test "${ac_cv_prog_CC+set}" = set; then :
3000 $as_echo_n "(cached) " >&6
c906108c
SS
3001else
3002 if test -n "$CC"; then
3003 ac_cv_prog_CC="$CC" # Let the user override the test.
3004else
bec39cab
AC
3005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3006for as_dir in $PATH
3007do
3008 IFS=$as_save_IFS
3009 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3010 for ac_exec_ext in '' $ac_executable_extensions; do
3011 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3012 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3014 break 2
3015 fi
3016done
81ecdfbb
RW
3017 done
3018IFS=$as_save_IFS
bec39cab 3019
c906108c
SS
3020fi
3021fi
bec39cab 3022CC=$ac_cv_prog_CC
c906108c 3023if test -n "$CC"; then
81ecdfbb
RW
3024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3025$as_echo "$CC" >&6; }
c906108c 3026else
81ecdfbb
RW
3027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3028$as_echo "no" >&6; }
c906108c 3029fi
bec39cab 3030
81ecdfbb 3031
bec39cab
AC
3032 test -n "$CC" && break
3033 done
3034fi
3035if test -z "$CC"; then
3036 ac_ct_CC=$CC
81ecdfbb 3037 for ac_prog in cl.exe
bec39cab
AC
3038do
3039 # Extract the first word of "$ac_prog", so it can be a program name with args.
3040set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3042$as_echo_n "checking for $ac_word... " >&6; }
3043if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3044 $as_echo_n "(cached) " >&6
bec39cab
AC
3045else
3046 if test -n "$ac_ct_CC"; then
3047 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3048else
3049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3050for as_dir in $PATH
3051do
3052 IFS=$as_save_IFS
3053 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3054 for ac_exec_ext in '' $ac_executable_extensions; do
3055 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 3056 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3058 break 2
c906108c 3059 fi
bec39cab 3060done
81ecdfbb
RW
3061 done
3062IFS=$as_save_IFS
bec39cab
AC
3063
3064fi
3065fi
3066ac_ct_CC=$ac_cv_prog_ac_ct_CC
3067if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3069$as_echo "$ac_ct_CC" >&6; }
bec39cab 3070else
81ecdfbb
RW
3071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3072$as_echo "no" >&6; }
c906108c
SS
3073fi
3074
81ecdfbb 3075
bec39cab
AC
3076 test -n "$ac_ct_CC" && break
3077done
c906108c 3078
81ecdfbb
RW
3079 if test "x$ac_ct_CC" = x; then
3080 CC=""
3081 else
3082 case $cross_compiling:$ac_tool_warned in
3083yes:)
3084{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3085$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3086ac_tool_warned=yes ;;
3087esac
3088 CC=$ac_ct_CC
3089 fi
bec39cab
AC
3090fi
3091
3092fi
3093
3094
81ecdfbb
RW
3095test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3097as_fn_error "no acceptable C compiler found in \$PATH
3098See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3099
3100# Provide some information about the compiler.
81ecdfbb
RW
3101$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3102set X $ac_compile
3103ac_compiler=$2
3104for ac_option in --version -v -V -qversion; do
3105 { { ac_try="$ac_compiler $ac_option >&5"
3106case "(($ac_try" in
3107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3108 *) ac_try_echo=$ac_try;;
3109esac
3110eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3111$as_echo "$ac_try_echo"; } >&5
3112 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3113 ac_status=$?
81ecdfbb
RW
3114 if test -s conftest.err; then
3115 sed '10a\
3116... rest of stderr output deleted ...
3117 10q' conftest.err >conftest.er1
3118 cat conftest.er1 >&5
3119 rm -f conftest.er1 conftest.err
3120 fi
3121 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3122 test $ac_status = 0; }
3123done
bec39cab 3124
81ecdfbb 3125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3126/* end confdefs.h. */
3127
3128int
3129main ()
3130{
3131
3132 ;
3133 return 0;
3134}
3135_ACEOF
3136ac_clean_files_save=$ac_clean_files
81ecdfbb 3137ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3138# Try to create an executable without -o first, disregard a.out.
3139# It will help us diagnose broken compilers, and finding out an intuition
3140# of exeext.
81ecdfbb
RW
3141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3142$as_echo_n "checking for C compiler default output file name... " >&6; }
3143ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3144
3145# The possible output files:
3146ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3147
3148ac_rmfiles=
3149for ac_file in $ac_files
3150do
3151 case $ac_file in
3152 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3153 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3154 esac
3155done
3156rm -f $ac_rmfiles
3157
3158if { { ac_try="$ac_link_default"
3159case "(($ac_try" in
3160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161 *) ac_try_echo=$ac_try;;
3162esac
3163eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3164$as_echo "$ac_try_echo"; } >&5
3165 (eval "$ac_link_default") 2>&5
3166 ac_status=$?
3167 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168 test $ac_status = 0; }; then :
3169 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3170# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3171# in a Makefile. We should not override ac_cv_exeext if it was cached,
3172# so that the user can short-circuit this test for compilers unknown to
3173# Autoconf.
3174for ac_file in $ac_files ''
bec39cab
AC
3175do
3176 test -f "$ac_file" || continue
3177 case $ac_file in
81ecdfbb 3178 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3179 ;;
3180 [ab].out )
3181 # We found the default executable, but exeext='' is most
3182 # certainly right.
3183 break;;
3184 *.* )
81ecdfbb
RW
3185 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3186 then :; else
3187 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3188 fi
3189 # We set ac_cv_exeext here because the later test for it is not
3190 # safe: cross compilers may not add the suffix if given an `-o'
3191 # argument, so we may need to know it at that point already.
3192 # Even if this section looks crufty: it has the advantage of
3193 # actually working.
b4e70030
JB
3194 break;;
3195 * )
3196 break;;
bec39cab
AC
3197 esac
3198done
81ecdfbb
RW
3199test "$ac_cv_exeext" = no && ac_cv_exeext=
3200
bec39cab 3201else
81ecdfbb
RW
3202 ac_file=''
3203fi
3204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3205$as_echo "$ac_file" >&6; }
3206if test -z "$ac_file"; then :
3207 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3208sed 's/^/| /' conftest.$ac_ext >&5
3209
81ecdfbb
RW
3210{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3212{ as_fn_set_status 77
3213as_fn_error "C compiler cannot create executables
3214See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3215fi
b4e70030 3216ac_exeext=$ac_cv_exeext
b4e70030 3217
81ecdfbb 3218# Check that the compiler produces executables we can run. If not, either
bec39cab 3219# the compiler is broken, or we cross compile.
81ecdfbb
RW
3220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3221$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3222# If not cross compiling, check that we can run a simple program.
3223if test "$cross_compiling" != yes; then
3224 if { ac_try='./$ac_file'
81ecdfbb
RW
3225 { { case "(($ac_try" in
3226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3227 *) ac_try_echo=$ac_try;;
3228esac
3229eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3230$as_echo "$ac_try_echo"; } >&5
3231 (eval "$ac_try") 2>&5
bec39cab 3232 ac_status=$?
81ecdfbb
RW
3233 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3234 test $ac_status = 0; }; }; then
bec39cab 3235 cross_compiling=no
c906108c 3236 else
bec39cab
AC
3237 if test "$cross_compiling" = maybe; then
3238 cross_compiling=yes
3239 else
81ecdfbb
RW
3240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3242as_fn_error "cannot run C compiled programs.
bec39cab 3243If you meant to cross compile, use \`--host'.
81ecdfbb 3244See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3245 fi
c906108c 3246 fi
bec39cab 3247fi
81ecdfbb
RW
3248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3249$as_echo "yes" >&6; }
bec39cab 3250
81ecdfbb 3251rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3252ac_clean_files=$ac_clean_files_save
81ecdfbb 3253# Check that the compiler produces executables we can run. If not, either
b4e70030 3254# the compiler is broken, or we cross compile.
81ecdfbb
RW
3255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3256$as_echo_n "checking whether we are cross compiling... " >&6; }
3257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3258$as_echo "$cross_compiling" >&6; }
3259
3260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3261$as_echo_n "checking for suffix of executables... " >&6; }
3262if { { ac_try="$ac_link"
3263case "(($ac_try" in
3264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3265 *) ac_try_echo=$ac_try;;
3266esac
3267eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3268$as_echo "$ac_try_echo"; } >&5
3269 (eval "$ac_link") 2>&5
bec39cab 3270 ac_status=$?
81ecdfbb
RW
3271 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3272 test $ac_status = 0; }; then :
b4e70030
JB
3273 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3274# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3275# work properly (i.e., refer to `conftest.exe'), while it won't with
3276# `rm'.
3277for ac_file in conftest.exe conftest conftest.*; do
3278 test -f "$ac_file" || continue
3279 case $ac_file in
81ecdfbb 3280 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3281 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3282 break;;
3283 * ) break;;
3284 esac
3285done
c906108c 3286else
81ecdfbb
RW
3287 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3289as_fn_error "cannot compute suffix of executables: cannot compile and link
3290See \`config.log' for more details." "$LINENO" 5; }
c906108c 3291fi
b4e70030 3292rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3294$as_echo "$ac_cv_exeext" >&6; }
c906108c 3295
b4e70030 3296rm -f conftest.$ac_ext
bec39cab
AC
3297EXEEXT=$ac_cv_exeext
3298ac_exeext=$EXEEXT
81ecdfbb
RW
3299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3300$as_echo_n "checking for suffix of object files... " >&6; }
3301if test "${ac_cv_objext+set}" = set; then :
3302 $as_echo_n "(cached) " >&6
bec39cab 3303else
81ecdfbb 3304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3305/* end confdefs.h. */
3306
3307int
3308main ()
3309{
3310
3311 ;
3312 return 0;
3313}
3314_ACEOF
3315rm -f conftest.o conftest.obj
81ecdfbb
RW
3316if { { ac_try="$ac_compile"
3317case "(($ac_try" in
3318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3319 *) ac_try_echo=$ac_try;;
3320esac
3321eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3322$as_echo "$ac_try_echo"; } >&5
3323 (eval "$ac_compile") 2>&5
3324 ac_status=$?
3325 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3326 test $ac_status = 0; }; then :
3327 for ac_file in conftest.o conftest.obj conftest.*; do
3328 test -f "$ac_file" || continue;
bec39cab 3329 case $ac_file in
81ecdfbb 3330 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3331 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3332 break;;
3333 esac
3334done
c906108c 3335else
81ecdfbb 3336 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3337sed 's/^/| /' conftest.$ac_ext >&5
3338
81ecdfbb
RW
3339{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341as_fn_error "cannot compute suffix of object files: cannot compile
3342See \`config.log' for more details." "$LINENO" 5; }
c906108c 3343fi
b4e70030 3344rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3345fi
81ecdfbb
RW
3346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3347$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3348OBJEXT=$ac_cv_objext
3349ac_objext=$OBJEXT
81ecdfbb
RW
3350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3351$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3352if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3353 $as_echo_n "(cached) " >&6
c906108c 3354else
81ecdfbb 3355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3356/* end confdefs.h. */
3357
3358int
3359main ()
3360{
3361#ifndef __GNUC__
3362 choke me
3363#endif
3364
3365 ;
3366 return 0;
3367}
3368_ACEOF
81ecdfbb 3369if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3370 ac_compiler_gnu=yes
3371else
81ecdfbb 3372 ac_compiler_gnu=no
bec39cab 3373fi
81ecdfbb 3374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3375ac_cv_c_compiler_gnu=$ac_compiler_gnu
3376
3377fi
81ecdfbb
RW
3378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3379$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3380if test $ac_compiler_gnu = yes; then
3381 GCC=yes
3382else
3383 GCC=
3384fi
bec39cab
AC
3385ac_test_CFLAGS=${CFLAGS+set}
3386ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3388$as_echo_n "checking whether $CC accepts -g... " >&6; }
3389if test "${ac_cv_prog_cc_g+set}" = set; then :
3390 $as_echo_n "(cached) " >&6
bec39cab 3391else
81ecdfbb
RW
3392 ac_save_c_werror_flag=$ac_c_werror_flag
3393 ac_c_werror_flag=yes
3394 ac_cv_prog_cc_g=no
3395 CFLAGS="-g"
3396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3397/* end confdefs.h. */
3398
3399int
3400main ()
3401{
3402
3403 ;
3404 return 0;
3405}
3406_ACEOF
81ecdfbb 3407if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3408 ac_cv_prog_cc_g=yes
3409else
81ecdfbb
RW
3410 CFLAGS=""
3411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3412/* end confdefs.h. */
3413
3414int
3415main ()
3416{
3417
3418 ;
3419 return 0;
3420}
3421_ACEOF
3422if ac_fn_c_try_compile "$LINENO"; then :
3423
3424else
3425 ac_c_werror_flag=$ac_save_c_werror_flag
3426 CFLAGS="-g"
3427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3428/* end confdefs.h. */
3429
3430int
3431main ()
3432{
c906108c 3433
81ecdfbb
RW
3434 ;
3435 return 0;
3436}
3437_ACEOF
3438if ac_fn_c_try_compile "$LINENO"; then :
3439 ac_cv_prog_cc_g=yes
3440fi
3441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3442fi
3443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3444fi
81ecdfbb
RW
3445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3446 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3447fi
81ecdfbb
RW
3448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3449$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3450if test "$ac_test_CFLAGS" = set; then
bec39cab 3451 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3452elif test $ac_cv_prog_cc_g = yes; then
3453 if test "$GCC" = yes; then
3454 CFLAGS="-g -O2"
3455 else
3456 CFLAGS="-g"
3457 fi
3458else
3459 if test "$GCC" = yes; then
3460 CFLAGS="-O2"
3461 else
3462 CFLAGS=
3463 fi
3464fi
81ecdfbb
RW
3465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3466$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3467if test "${ac_cv_prog_cc_c89+set}" = set; then :
3468 $as_echo_n "(cached) " >&6
bec39cab 3469else
81ecdfbb 3470 ac_cv_prog_cc_c89=no
bec39cab 3471ac_save_CC=$CC
81ecdfbb 3472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3473/* end confdefs.h. */
c906108c
SS
3474#include <stdarg.h>
3475#include <stdio.h>
3476#include <sys/types.h>
3477#include <sys/stat.h>
3478/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3479struct buf { int x; };
3480FILE * (*rcsopen) (struct buf *, struct stat *, int);
3481static char *e (p, i)
3482 char **p;
3483 int i;
3484{
3485 return p[i];
3486}
3487static char *f (char * (*g) (char **, int), char **p, ...)
3488{
3489 char *s;
3490 va_list v;
3491 va_start (v,p);
3492 s = g (p, va_arg (v,int));
3493 va_end (v);
3494 return s;
3495}
bec39cab
AC
3496
3497/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3498 function prototypes and stuff, but not '\xHH' hex character constants.
3499 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3500 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3501 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3502 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3503 that's true only with -std. */
bec39cab
AC
3504int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3505
81ecdfbb
RW
3506/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3507 inside strings and character constants. */
3508#define FOO(x) 'x'
3509int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3510
c906108c
SS
3511int test (int i, double x);
3512struct s1 {int (*f) (int a);};
3513struct s2 {int (*f) (double a);};
3514int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3515int argc;
3516char **argv;
bec39cab
AC
3517int
3518main ()
3519{
c906108c 3520return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3521 ;
3522 return 0;
3523}
3524_ACEOF
81ecdfbb
RW
3525for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3526 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3527do
3528 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3529 if ac_fn_c_try_compile "$LINENO"; then :
3530 ac_cv_prog_cc_c89=$ac_arg
c906108c 3531fi
81ecdfbb
RW
3532rm -f core conftest.err conftest.$ac_objext
3533 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3534done
81ecdfbb 3535rm -f conftest.$ac_ext
bec39cab 3536CC=$ac_save_CC
c906108c
SS
3537
3538fi
81ecdfbb
RW
3539# AC_CACHE_VAL
3540case "x$ac_cv_prog_cc_c89" in
3541 x)
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3543$as_echo "none needed" >&6; } ;;
3544 xno)
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3546$as_echo "unsupported" >&6; } ;;
bec39cab 3547 *)
81ecdfbb
RW
3548 CC="$CC $ac_cv_prog_cc_c89"
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3550$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3551esac
81ecdfbb 3552if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3553
b4e70030
JB
3554fi
3555
bec39cab
AC
3556ac_ext=c
3557ac_cpp='$CPP $CPPFLAGS'
3558ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3559ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3560ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3561
3bc3d82a
PA
3562ac_ext=cpp
3563ac_cpp='$CXXCPP $CPPFLAGS'
3564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3567if test -z "$CXX"; then
3568 if test -n "$CCC"; then
3569 CXX=$CCC
3570 else
3571 if test -n "$ac_tool_prefix"; then
3572 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3573 do
3574 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3577$as_echo_n "checking for $ac_word... " >&6; }
3578if test "${ac_cv_prog_CXX+set}" = set; then :
3579 $as_echo_n "(cached) " >&6
3580else
3581 if test -n "$CXX"; then
3582 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3583else
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
3589 for ac_exec_ext in '' $ac_executable_extensions; do
3590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3591 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3593 break 2
3594 fi
3595done
3596 done
3597IFS=$as_save_IFS
3598
3599fi
3600fi
3601CXX=$ac_cv_prog_CXX
3602if test -n "$CXX"; then
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3604$as_echo "$CXX" >&6; }
3605else
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3607$as_echo "no" >&6; }
3608fi
3609
3610
3611 test -n "$CXX" && break
3612 done
3613fi
3614if test -z "$CXX"; then
3615 ac_ct_CXX=$CXX
3616 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3617do
3618 # Extract the first word of "$ac_prog", so it can be a program name with args.
3619set dummy $ac_prog; ac_word=$2
3620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3621$as_echo_n "checking for $ac_word... " >&6; }
3622if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3623 $as_echo_n "(cached) " >&6
3624else
3625 if test -n "$ac_ct_CXX"; then
3626 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3627else
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3629for as_dir in $PATH
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
3633 for ac_exec_ext in '' $ac_executable_extensions; do
3634 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3635 ac_cv_prog_ac_ct_CXX="$ac_prog"
3636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3637 break 2
3638 fi
3639done
3640 done
3641IFS=$as_save_IFS
3642
3643fi
3644fi
3645ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3646if test -n "$ac_ct_CXX"; then
3647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3648$as_echo "$ac_ct_CXX" >&6; }
3649else
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
3652fi
3653
3654
3655 test -n "$ac_ct_CXX" && break
3656done
3657
3658 if test "x$ac_ct_CXX" = x; then
3659 CXX="g++"
3660 else
3661 case $cross_compiling:$ac_tool_warned in
3662yes:)
3663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3665ac_tool_warned=yes ;;
3666esac
3667 CXX=$ac_ct_CXX
3668 fi
3669fi
3670
3671 fi
3672fi
3673# Provide some information about the compiler.
3674$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3675set X $ac_compile
3676ac_compiler=$2
3677for ac_option in --version -v -V -qversion; do
3678 { { ac_try="$ac_compiler $ac_option >&5"
3679case "(($ac_try" in
3680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3681 *) ac_try_echo=$ac_try;;
3682esac
3683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3684$as_echo "$ac_try_echo"; } >&5
3685 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3686 ac_status=$?
3687 if test -s conftest.err; then
3688 sed '10a\
3689... rest of stderr output deleted ...
3690 10q' conftest.err >conftest.er1
3691 cat conftest.er1 >&5
3692 rm -f conftest.er1 conftest.err
3693 fi
3694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3695 test $ac_status = 0; }
3696done
3697
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3699$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3700if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3701 $as_echo_n "(cached) " >&6
3702else
3703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3704/* end confdefs.h. */
3705
3706int
3707main ()
3708{
3709#ifndef __GNUC__
3710 choke me
3711#endif
3712
3713 ;
3714 return 0;
3715}
3716_ACEOF
3717if ac_fn_cxx_try_compile "$LINENO"; then :
3718 ac_compiler_gnu=yes
3719else
3720 ac_compiler_gnu=no
3721fi
3722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3723ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3724
3725fi
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3727$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3728if test $ac_compiler_gnu = yes; then
3729 GXX=yes
3730else
3731 GXX=
3732fi
3733ac_test_CXXFLAGS=${CXXFLAGS+set}
3734ac_save_CXXFLAGS=$CXXFLAGS
3735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3736$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3737if test "${ac_cv_prog_cxx_g+set}" = set; then :
3738 $as_echo_n "(cached) " >&6
3739else
3740 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3741 ac_cxx_werror_flag=yes
3742 ac_cv_prog_cxx_g=no
3743 CXXFLAGS="-g"
3744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3745/* end confdefs.h. */
3746
3747int
3748main ()
3749{
3750
3751 ;
3752 return 0;
3753}
3754_ACEOF
3755if ac_fn_cxx_try_compile "$LINENO"; then :
3756 ac_cv_prog_cxx_g=yes
3757else
3758 CXXFLAGS=""
3759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3760/* end confdefs.h. */
3761
3762int
3763main ()
3764{
3765
3766 ;
3767 return 0;
3768}
3769_ACEOF
3770if ac_fn_cxx_try_compile "$LINENO"; then :
3771
3772else
3773 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3774 CXXFLAGS="-g"
3775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3776/* end confdefs.h. */
3777
3778int
3779main ()
3780{
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
3786if ac_fn_cxx_try_compile "$LINENO"; then :
3787 ac_cv_prog_cxx_g=yes
3788fi
3789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3790fi
3791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3792fi
3793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3794 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3795fi
3796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3797$as_echo "$ac_cv_prog_cxx_g" >&6; }
3798if test "$ac_test_CXXFLAGS" = set; then
3799 CXXFLAGS=$ac_save_CXXFLAGS
3800elif test $ac_cv_prog_cxx_g = yes; then
3801 if test "$GXX" = yes; then
3802 CXXFLAGS="-g -O2"
3803 else
3804 CXXFLAGS="-g"
3805 fi
3806else
3807 if test "$GXX" = yes; then
3808 CXXFLAGS="-O2"
3809 else
3810 CXXFLAGS=
3811 fi
3812fi
3813ac_ext=c
3814ac_cpp='$CPP $CPPFLAGS'
3815ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3816ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3817ac_compiler_gnu=$ac_cv_c_compiler_gnu
3818
3819
60ca704f 3820
bec39cab
AC
3821ac_ext=c
3822ac_cpp='$CPP $CPPFLAGS'
3823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3825ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3827$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3828# On Suns, sometimes $CPP names a directory.
3829if test -n "$CPP" && test -d "$CPP"; then
3830 CPP=
8bb2c122 3831fi
bec39cab 3832if test -z "$CPP"; then
81ecdfbb
RW
3833 if test "${ac_cv_prog_CPP+set}" = set; then :
3834 $as_echo_n "(cached) " >&6
bec39cab
AC
3835else
3836 # Double quotes because CPP needs to be expanded
3837 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3838 do
3839 ac_preproc_ok=false
3840for ac_c_preproc_warn_flag in '' yes
3841do
3842 # Use a header file that comes with gcc, so configuring glibc
3843 # with a fresh cross-compiler works.
3844 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3845 # <limits.h> exists even on freestanding compilers.
3846 # On the NeXT, cc -E runs the code through the compiler's parser,
3847 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3849/* end confdefs.h. */
3850#ifdef __STDC__
3851# include <limits.h>
3852#else
3853# include <assert.h>
3854#endif
3855 Syntax error
3856_ACEOF
81ecdfbb 3857if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3858
81ecdfbb 3859else
bec39cab
AC
3860 # Broken: fails on valid input.
3861continue
3862fi
3863rm -f conftest.err conftest.$ac_ext
3864
81ecdfbb 3865 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3866 # can be detected and how.
81ecdfbb 3867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3868/* end confdefs.h. */
3869#include <ac_nonexistent.h>
3870_ACEOF
81ecdfbb 3871if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3872 # Broken: success on invalid input.
3873continue
8bb2c122 3874else
bec39cab
AC
3875 # Passes both tests.
3876ac_preproc_ok=:
3877break
8bb2c122 3878fi
bec39cab 3879rm -f conftest.err conftest.$ac_ext
8bb2c122 3880
bec39cab
AC
3881done
3882# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3883rm -f conftest.err conftest.$ac_ext
81ecdfbb 3884if $ac_preproc_ok; then :
bec39cab
AC
3885 break
3886fi
8bb2c122 3887
bec39cab
AC
3888 done
3889 ac_cv_prog_CPP=$CPP
ddc9cd0f 3890
c906108c 3891fi
bec39cab
AC
3892 CPP=$ac_cv_prog_CPP
3893else
3894 ac_cv_prog_CPP=$CPP
c906108c 3895fi
81ecdfbb
RW
3896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3897$as_echo "$CPP" >&6; }
bec39cab
AC
3898ac_preproc_ok=false
3899for ac_c_preproc_warn_flag in '' yes
3900do
3901 # Use a header file that comes with gcc, so configuring glibc
3902 # with a fresh cross-compiler works.
3903 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3904 # <limits.h> exists even on freestanding compilers.
3905 # On the NeXT, cc -E runs the code through the compiler's parser,
3906 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3908/* end confdefs.h. */
3909#ifdef __STDC__
3910# include <limits.h>
3911#else
3912# include <assert.h>
3913#endif
3914 Syntax error
3915_ACEOF
81ecdfbb 3916if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3917
81ecdfbb 3918else
bec39cab
AC
3919 # Broken: fails on valid input.
3920continue
3921fi
3922rm -f conftest.err conftest.$ac_ext
3923
81ecdfbb 3924 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3925 # can be detected and how.
81ecdfbb 3926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3927/* end confdefs.h. */
3928#include <ac_nonexistent.h>
3929_ACEOF
81ecdfbb 3930if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3931 # Broken: success on invalid input.
3932continue
c906108c 3933else
bec39cab
AC
3934 # Passes both tests.
3935ac_preproc_ok=:
3936break
c906108c 3937fi
bec39cab 3938rm -f conftest.err conftest.$ac_ext
c906108c 3939
bec39cab
AC
3940done
3941# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3942rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3943if $ac_preproc_ok; then :
3944
c906108c 3945else
81ecdfbb
RW
3946 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3948as_fn_error "C preprocessor \"$CPP\" fails sanity check
3949See \`config.log' for more details." "$LINENO" 5; }
c906108c 3950fi
c906108c 3951
bec39cab
AC
3952ac_ext=c
3953ac_cpp='$CPP $CPPFLAGS'
3954ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3955ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3956ac_compiler_gnu=$ac_cv_c_compiler_gnu
3957
3958
81ecdfbb
RW
3959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3960$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3961if test "${ac_cv_path_GREP+set}" = set; then :
3962 $as_echo_n "(cached) " >&6
4e8d927d 3963else
81ecdfbb
RW
3964 if test -z "$GREP"; then
3965 ac_path_GREP_found=false
3966 # Loop through the user's path and test for each of PROGNAME-LIST
3967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3968for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3969do
3970 IFS=$as_save_IFS
3971 test -z "$as_dir" && as_dir=.
3972 for ac_prog in grep ggrep; do
3973 for ac_exec_ext in '' $ac_executable_extensions; do
3974 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3975 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3976# Check for GNU ac_path_GREP and select it if it is found.
3977 # Check for GNU $ac_path_GREP
3978case `"$ac_path_GREP" --version 2>&1` in
3979*GNU*)
3980 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3981*)
3982 ac_count=0
3983 $as_echo_n 0123456789 >"conftest.in"
3984 while :
3985 do
3986 cat "conftest.in" "conftest.in" >"conftest.tmp"
3987 mv "conftest.tmp" "conftest.in"
3988 cp "conftest.in" "conftest.nl"
3989 $as_echo 'GREP' >> "conftest.nl"
3990 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3991 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3992 as_fn_arith $ac_count + 1 && ac_count=$as_val
3993 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3994 # Best one so far, save it but keep looking for a better one
3995 ac_cv_path_GREP="$ac_path_GREP"
3996 ac_path_GREP_max=$ac_count
bec39cab 3997 fi
81ecdfbb
RW
3998 # 10*(2^10) chars as input seems more than enough
3999 test $ac_count -gt 10 && break
4000 done
4001 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4002esac
bec39cab 4003
81ecdfbb
RW
4004 $ac_path_GREP_found && break 3
4005 done
4006 done
4007 done
4008IFS=$as_save_IFS
4009 if test -z "$ac_cv_path_GREP"; then
4010 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4011 fi
c906108c 4012else
81ecdfbb 4013 ac_cv_path_GREP=$GREP
c906108c 4014fi
c906108c 4015
81ecdfbb
RW
4016fi
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4018$as_echo "$ac_cv_path_GREP" >&6; }
4019 GREP="$ac_cv_path_GREP"
c906108c 4020
c906108c 4021
81ecdfbb
RW
4022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4023$as_echo_n "checking for egrep... " >&6; }
4024if test "${ac_cv_path_EGREP+set}" = set; then :
4025 $as_echo_n "(cached) " >&6
783e057b 4026else
81ecdfbb
RW
4027 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4028 then ac_cv_path_EGREP="$GREP -E"
4029 else
4030 if test -z "$EGREP"; then
4031 ac_path_EGREP_found=false
4032 # Loop through the user's path and test for each of PROGNAME-LIST
4033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4034for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4035do
4036 IFS=$as_save_IFS
4037 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4038 for ac_prog in egrep; do
4039 for ac_exec_ext in '' $ac_executable_extensions; do
4040 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4041 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4042# Check for GNU ac_path_EGREP and select it if it is found.
4043 # Check for GNU $ac_path_EGREP
4044case `"$ac_path_EGREP" --version 2>&1` in
4045*GNU*)
4046 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4047*)
4048 ac_count=0
4049 $as_echo_n 0123456789 >"conftest.in"
4050 while :
4051 do
4052 cat "conftest.in" "conftest.in" >"conftest.tmp"
4053 mv "conftest.tmp" "conftest.in"
4054 cp "conftest.in" "conftest.nl"
4055 $as_echo 'EGREP' >> "conftest.nl"
4056 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4057 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4058 as_fn_arith $ac_count + 1 && ac_count=$as_val
4059 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4060 # Best one so far, save it but keep looking for a better one
4061 ac_cv_path_EGREP="$ac_path_EGREP"
4062 ac_path_EGREP_max=$ac_count
4063 fi
4064 # 10*(2^10) chars as input seems more than enough
4065 test $ac_count -gt 10 && break
4066 done
4067 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4068esac
bec39cab 4069
81ecdfbb
RW
4070 $ac_path_EGREP_found && break 3
4071 done
4072 done
4073 done
4074IFS=$as_save_IFS
4075 if test -z "$ac_cv_path_EGREP"; then
4076 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4077 fi
783e057b 4078else
81ecdfbb 4079 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4080fi
4081
81ecdfbb 4082 fi
783e057b 4083fi
81ecdfbb
RW
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4085$as_echo "$ac_cv_path_EGREP" >&6; }
4086 EGREP="$ac_cv_path_EGREP"
4087
783e057b 4088
81ecdfbb
RW
4089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4090$as_echo_n "checking for ANSI C header files... " >&6; }
4091if test "${ac_cv_header_stdc+set}" = set; then :
4092 $as_echo_n "(cached) " >&6
783e057b 4093else
81ecdfbb 4094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4095/* end confdefs.h. */
783e057b 4096#include <stdlib.h>
bec39cab 4097#include <stdarg.h>
783e057b
DJ
4098#include <string.h>
4099#include <float.h>
c906108c 4100
bec39cab
AC
4101int
4102main ()
4103{
c906108c 4104
bec39cab
AC
4105 ;
4106 return 0;
4107}
4108_ACEOF
81ecdfbb 4109if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4110 ac_cv_header_stdc=yes
c906108c 4111else
81ecdfbb 4112 ac_cv_header_stdc=no
c906108c 4113fi
81ecdfbb 4114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4115
783e057b
DJ
4116if test $ac_cv_header_stdc = yes; then
4117 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4119/* end confdefs.h. */
4120#include <string.h>
c906108c 4121
783e057b
DJ
4122_ACEOF
4123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4124 $EGREP "memchr" >/dev/null 2>&1; then :
4125
c906108c 4126else
783e057b 4127 ac_cv_header_stdc=no
c906108c 4128fi
783e057b 4129rm -f conftest*
c906108c
SS
4130
4131fi
4132
783e057b
DJ
4133if test $ac_cv_header_stdc = yes; then
4134 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4136/* end confdefs.h. */
4137#include <stdlib.h>
bec39cab 4138
783e057b
DJ
4139_ACEOF
4140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4141 $EGREP "free" >/dev/null 2>&1; then :
4142
bec39cab 4143else
783e057b 4144 ac_cv_header_stdc=no
bec39cab 4145fi
783e057b 4146rm -f conftest*
bec39cab
AC
4147
4148fi
bec39cab 4149
783e057b
DJ
4150if test $ac_cv_header_stdc = yes; then
4151 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4152 if test "$cross_compiling" = yes; then :
783e057b 4153 :
bec39cab 4154else
81ecdfbb 4155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4156/* end confdefs.h. */
4157#include <ctype.h>
81ecdfbb 4158#include <stdlib.h>
783e057b
DJ
4159#if ((' ' & 0x0FF) == 0x020)
4160# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4161# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4162#else
4163# define ISLOWER(c) \
4164 (('a' <= (c) && (c) <= 'i') \
4165 || ('j' <= (c) && (c) <= 'r') \
4166 || ('s' <= (c) && (c) <= 'z'))
4167# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4168#endif
4169
4170#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4171int
4172main ()
4173{
4174 int i;
4175 for (i = 0; i < 256; i++)
4176 if (XOR (islower (i), ISLOWER (i))
4177 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4178 return 2;
4179 return 0;
783e057b
DJ
4180}
4181_ACEOF
81ecdfbb 4182if ac_fn_c_try_run "$LINENO"; then :
783e057b 4183
81ecdfbb
RW
4184else
4185 ac_cv_header_stdc=no
783e057b 4186fi
81ecdfbb
RW
4187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4188 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4189fi
81ecdfbb 4190
783e057b
DJ
4191fi
4192fi
81ecdfbb
RW
4193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4194$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4195if test $ac_cv_header_stdc = yes; then
4196
81ecdfbb 4197$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4198
4199fi
4200
4201# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4202for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4203 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4204do :
4205 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4206ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4207"
4208eval as_val=\$$as_ac_Header
4209 if test "x$as_val" = x""yes; then :
783e057b 4210 cat >>confdefs.h <<_ACEOF
81ecdfbb 4211#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4212_ACEOF
4213
4214fi
4215
4216done
4217
4218
4219
81ecdfbb
RW
4220 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4221if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
4222 MINIX=yes
4223else
4224 MINIX=
4225fi
4226
4227
4228 if test "$MINIX" = yes; then
4229
81ecdfbb 4230$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4231
4232
81ecdfbb 4233$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4234
4235
81ecdfbb 4236$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4237
4238 fi
4239
4240
81ecdfbb
RW
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4242$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4243if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4244 $as_echo_n "(cached) " >&6
783e057b 4245else
81ecdfbb 4246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4247/* end confdefs.h. */
4248
c971b7fa
PA
4249# define __EXTENSIONS__ 1
4250 $ac_includes_default
783e057b
DJ
4251int
4252main ()
4253{
4254
4255 ;
4256 return 0;
4257}
4258_ACEOF
81ecdfbb 4259if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4260 ac_cv_safe_to_define___extensions__=yes
4261else
81ecdfbb 4262 ac_cv_safe_to_define___extensions__=no
783e057b 4263fi
81ecdfbb 4264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4265fi
81ecdfbb
RW
4266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4267$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4268 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4269 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4270
81ecdfbb 4271 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4272
81ecdfbb 4273 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4274
81ecdfbb 4275 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4276
81ecdfbb 4277 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4278
4279
c971b7fa
PA
4280ac_aux_dir=
4281for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4282 for ac_t in install-sh install.sh shtool; do
4283 if test -f "$ac_dir/$ac_t"; then
4284 ac_aux_dir=$ac_dir
4285 ac_install_sh="$ac_aux_dir/$ac_t -c"
4286 break 2
4287 fi
4288 done
4289done
4290if test -z "$ac_aux_dir"; then
4291 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4292fi
770d76d7 4293
c971b7fa
PA
4294# These three variables are undocumented and unsupported,
4295# and are intended to be withdrawn in a future Autoconf release.
4296# They can cause serious problems if a builder's source tree is in a directory
4297# whose full name contains unusual characters.
4298ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4299ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4300ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4301
770d76d7 4302
c971b7fa
PA
4303# Make sure we can run config.sub.
4304$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4305 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4306
c971b7fa
PA
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4308$as_echo_n "checking build system type... " >&6; }
4309if test "${ac_cv_build+set}" = set; then :
4310 $as_echo_n "(cached) " >&6
770d76d7 4311else
c971b7fa
PA
4312 ac_build_alias=$build_alias
4313test "x$ac_build_alias" = x &&
4314 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4315test "x$ac_build_alias" = x &&
4316 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4317ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4318 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4319
770d76d7 4320fi
c971b7fa
PA
4321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4322$as_echo "$ac_cv_build" >&6; }
4323case $ac_cv_build in
4324*-*-*) ;;
4325*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4326esac
c971b7fa
PA
4327build=$ac_cv_build
4328ac_save_IFS=$IFS; IFS='-'
4329set x $ac_cv_build
4330shift
4331build_cpu=$1
4332build_vendor=$2
4333shift; shift
4334# Remember, the first character of IFS is used to create $*,
4335# except with old shells:
4336build_os=$*
4337IFS=$ac_save_IFS
4338case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4339
4340
c971b7fa
PA
4341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4342$as_echo_n "checking host system type... " >&6; }
4343if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4344 $as_echo_n "(cached) " >&6
4345else
c971b7fa
PA
4346 if test "x$host_alias" = x; then
4347 ac_cv_host=$ac_cv_build
81ecdfbb 4348else
c971b7fa
PA
4349 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4350 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4351fi
81ecdfbb
RW
4352
4353fi
c971b7fa
PA
4354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4355$as_echo "$ac_cv_host" >&6; }
4356case $ac_cv_host in
4357*-*-*) ;;
4358*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4359esac
c971b7fa
PA
4360host=$ac_cv_host
4361ac_save_IFS=$IFS; IFS='-'
4362set x $ac_cv_host
4363shift
4364host_cpu=$1
4365host_vendor=$2
4366shift; shift
4367# Remember, the first character of IFS is used to create $*,
4368# except with old shells:
4369host_os=$*
4370IFS=$ac_save_IFS
4371case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4372
4373
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4375$as_echo_n "checking target system type... " >&6; }
4376if test "${ac_cv_target+set}" = set; then :
4377 $as_echo_n "(cached) " >&6
4378else
4379 if test "x$target_alias" = x; then
4380 ac_cv_target=$ac_cv_host
4381else
4382 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4383 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4384fi
4385
4386fi
4387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4388$as_echo "$ac_cv_target" >&6; }
4389case $ac_cv_target in
4390*-*-*) ;;
4391*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4392esac
4393target=$ac_cv_target
4394ac_save_IFS=$IFS; IFS='-'
4395set x $ac_cv_target
4396shift
4397target_cpu=$1
4398target_vendor=$2
4399shift; shift
4400# Remember, the first character of IFS is used to create $*,
4401# except with old shells:
4402target_os=$*
4403IFS=$ac_save_IFS
4404case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4405
4406
4407# The aliases save the names the user supplied, while $host etc.
4408# will get canonicalized.
4409test -n "$target_alias" &&
4410 test "$program_prefix$program_suffix$program_transform_name" = \
4411 NONENONEs,x,x, &&
4412 program_prefix=${target_alias}-
4413
4414# The tests for host and target for $enable_largefile require
4415# canonical names.
4416
4417
81ecdfbb 4418
da2f07f1
JK
4419# As the $enable_largefile decision depends on --enable-plugins we must set it
4420# even in directories otherwise not depending on the $plugins option.
4421
4422
2974be62
AM
4423 maybe_plugins=no
4424 for ac_header in dlfcn.h
4425do :
4426 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4427"
4428if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4429 cat >>confdefs.h <<_ACEOF
4430#define HAVE_DLFCN_H 1
4431_ACEOF
4432 maybe_plugins=yes
4433fi
4434
4435done
4436
4437 for ac_header in windows.h
4438do :
4439 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4440"
4441if test "x$ac_cv_header_windows_h" = x""yes; then :
4442 cat >>confdefs.h <<_ACEOF
4443#define HAVE_WINDOWS_H 1
4444_ACEOF
4445 maybe_plugins=yes
4446fi
4447
4448done
4449
4450
4451 # Check whether --enable-plugins was given.
da2f07f1
JK
4452if test "${enable_plugins+set}" = set; then :
4453 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4454 no) plugins=no ;;
4455 *) plugins=yes
4456 if test "$maybe_plugins" != "yes" ; then
4457 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4458 fi ;;
4459 esac
da2f07f1 4460else
2974be62
AM
4461 plugins=$maybe_plugins
4462
da2f07f1
JK
4463fi
4464
2974be62
AM
4465 if test "$plugins" = "yes"; then
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4467$as_echo_n "checking for library containing dlopen... " >&6; }
4468if test "${ac_cv_search_dlopen+set}" = set; then :
4469 $as_echo_n "(cached) " >&6
4470else
4471 ac_func_search_save_LIBS=$LIBS
4472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473/* end confdefs.h. */
4474
4475/* Override any GCC internal prototype to avoid an error.
4476 Use char because int might match the return type of a GCC
4477 builtin and then its argument prototype would still apply. */
4478#ifdef __cplusplus
4479extern "C"
4480#endif
4481char dlopen ();
4482int
4483main ()
4484{
4485return dlopen ();
4486 ;
4487 return 0;
4488}
4489_ACEOF
4490for ac_lib in '' dl; do
4491 if test -z "$ac_lib"; then
4492 ac_res="none required"
4493 else
4494 ac_res=-l$ac_lib
4495 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4496 fi
4497 if ac_fn_c_try_link "$LINENO"; then :
4498 ac_cv_search_dlopen=$ac_res
4499fi
4500rm -f core conftest.err conftest.$ac_objext \
4501 conftest$ac_exeext
4502 if test "${ac_cv_search_dlopen+set}" = set; then :
4503 break
4504fi
4505done
4506if test "${ac_cv_search_dlopen+set}" = set; then :
4507
4508else
4509 ac_cv_search_dlopen=no
4510fi
4511rm conftest.$ac_ext
4512LIBS=$ac_func_search_save_LIBS
4513fi
4514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4515$as_echo "$ac_cv_search_dlopen" >&6; }
4516ac_res=$ac_cv_search_dlopen
4517if test "$ac_res" != no; then :
4518 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4519
4520fi
4521
4522 fi
da2f07f1
JK
4523
4524
4525case "${host}" in
4526 sparc-*-solaris*|i[3-7]86-*-solaris*)
4527 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4528 # are mutually exclusive; and without procfs support, the bfd/ elf module
4529 # cannot provide certain routines such as elfcore_write_prpsinfo
4530 # or elfcore_write_prstatus. So unless the user explicitly requested
4531 # large-file support through the --enable-largefile switch, disable
4532 # large-file support in favor of procfs support.
4533 test "${target}" = "${host}" -a "x$plugins" = xno \
4534 && : ${enable_largefile="no"}
4535 ;;
4536esac
4537
4538# Check whether --enable-largefile was given.
4539if test "${enable_largefile+set}" = set; then :
4540 enableval=$enable_largefile;
4541fi
4542
4543if test "$enable_largefile" != no; then
4544
4545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4546$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4547if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4548 $as_echo_n "(cached) " >&6
4549else
4550 ac_cv_sys_largefile_CC=no
4551 if test "$GCC" != yes; then
4552 ac_save_CC=$CC
4553 while :; do
4554 # IRIX 6.2 and later do not support large files by default,
4555 # so use the C compiler's -n32 option if that helps.
4556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4557/* end confdefs.h. */
4558#include <sys/types.h>
4559 /* Check that off_t can represent 2**63 - 1 correctly.
4560 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4561 since some C++ compilers masquerading as C compilers
4562 incorrectly reject 9223372036854775807. */
4563#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4564 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4565 && LARGE_OFF_T % 2147483647 == 1)
4566 ? 1 : -1];
4567int
4568main ()
4569{
4570
4571 ;
4572 return 0;
4573}
4574_ACEOF
4575 if ac_fn_c_try_compile "$LINENO"; then :
4576 break
4577fi
4578rm -f core conftest.err conftest.$ac_objext
4579 CC="$CC -n32"
4580 if ac_fn_c_try_compile "$LINENO"; then :
4581 ac_cv_sys_largefile_CC=' -n32'; break
4582fi
4583rm -f core conftest.err conftest.$ac_objext
4584 break
4585 done
4586 CC=$ac_save_CC
4587 rm -f conftest.$ac_ext
4588 fi
4589fi
4590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4591$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4592 if test "$ac_cv_sys_largefile_CC" != no; then
4593 CC=$CC$ac_cv_sys_largefile_CC
4594 fi
4595
4596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4597$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4598if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4599 $as_echo_n "(cached) " >&6
4600else
4601 while :; do
4602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4603/* end confdefs.h. */
4604#include <sys/types.h>
4605 /* Check that off_t can represent 2**63 - 1 correctly.
4606 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4607 since some C++ compilers masquerading as C compilers
4608 incorrectly reject 9223372036854775807. */
4609#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4610 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4611 && LARGE_OFF_T % 2147483647 == 1)
4612 ? 1 : -1];
4613int
4614main ()
4615{
4616
4617 ;
4618 return 0;
4619}
4620_ACEOF
4621if ac_fn_c_try_compile "$LINENO"; then :
4622 ac_cv_sys_file_offset_bits=no; break
4623fi
4624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4626/* end confdefs.h. */
4627#define _FILE_OFFSET_BITS 64
4628#include <sys/types.h>
4629 /* Check that off_t can represent 2**63 - 1 correctly.
4630 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4631 since some C++ compilers masquerading as C compilers
4632 incorrectly reject 9223372036854775807. */
4633#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4634 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4635 && LARGE_OFF_T % 2147483647 == 1)
4636 ? 1 : -1];
4637int
4638main ()
4639{
4640
4641 ;
4642 return 0;
4643}
4644_ACEOF
4645if ac_fn_c_try_compile "$LINENO"; then :
4646 ac_cv_sys_file_offset_bits=64; break
4647fi
4648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4649 ac_cv_sys_file_offset_bits=unknown
4650 break
4651done
4652fi
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4654$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4655case $ac_cv_sys_file_offset_bits in #(
4656 no | unknown) ;;
4657 *)
4658cat >>confdefs.h <<_ACEOF
4659#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4660_ACEOF
4661;;
4662esac
4663rm -rf conftest*
4664 if test $ac_cv_sys_file_offset_bits = unknown; then
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4666$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4667if test "${ac_cv_sys_large_files+set}" = set; then :
4668 $as_echo_n "(cached) " >&6
4669else
4670 while :; do
4671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4672/* end confdefs.h. */
4673#include <sys/types.h>
4674 /* Check that off_t can represent 2**63 - 1 correctly.
4675 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4676 since some C++ compilers masquerading as C compilers
4677 incorrectly reject 9223372036854775807. */
4678#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4679 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4680 && LARGE_OFF_T % 2147483647 == 1)
4681 ? 1 : -1];
4682int
4683main ()
4684{
4685
4686 ;
4687 return 0;
4688}
4689_ACEOF
4690if ac_fn_c_try_compile "$LINENO"; then :
4691 ac_cv_sys_large_files=no; break
4692fi
4693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4695/* end confdefs.h. */
4696#define _LARGE_FILES 1
4697#include <sys/types.h>
4698 /* Check that off_t can represent 2**63 - 1 correctly.
4699 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4700 since some C++ compilers masquerading as C compilers
4701 incorrectly reject 9223372036854775807. */
4702#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4703 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4704 && LARGE_OFF_T % 2147483647 == 1)
4705 ? 1 : -1];
4706int
4707main ()
4708{
4709
4710 ;
4711 return 0;
4712}
4713_ACEOF
4714if ac_fn_c_try_compile "$LINENO"; then :
4715 ac_cv_sys_large_files=1; break
4716fi
4717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4718 ac_cv_sys_large_files=unknown
4719 break
4720done
4721fi
4722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4723$as_echo "$ac_cv_sys_large_files" >&6; }
4724case $ac_cv_sys_large_files in #(
4725 no | unknown) ;;
4726 *)
4727cat >>confdefs.h <<_ACEOF
4728#define _LARGE_FILES $ac_cv_sys_large_files
4729_ACEOF
4730;;
4731esac
4732rm -rf conftest*
4733 fi
4734fi
4735
4736
4737
81ecdfbb
RW
4738
4739
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4741$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4742if test "${am_cv_prog_cc_stdc+set}" = set; then :
4743 $as_echo_n "(cached) " >&6
4744else
4745 am_cv_prog_cc_stdc=no
4746ac_save_CC="$CC"
4747# Don't try gcc -ansi; that turns off useful extensions and
4748# breaks some systems' header files.
4749# AIX -qlanglvl=ansi
4750# Ultrix and OSF/1 -std1
4751# HP-UX 10.20 and later -Ae
4752# HP-UX older versions -Aa -D_HPUX_SOURCE
4753# SVR4 -Xc -D__EXTENSIONS__
4754for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4755do
783e057b 4756 CC="$ac_save_CC $ac_arg"
81ecdfbb 4757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4758/* end confdefs.h. */
4759#include <stdarg.h>
4760#include <stdio.h>
4761#include <sys/types.h>
4762#include <sys/stat.h>
4763/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4764struct buf { int x; };
4765FILE * (*rcsopen) (struct buf *, struct stat *, int);
4766static char *e (p, i)
4767 char **p;
4768 int i;
4769{
4770 return p[i];
4771}
4772static char *f (char * (*g) (char **, int), char **p, ...)
4773{
4774 char *s;
4775 va_list v;
4776 va_start (v,p);
4777 s = g (p, va_arg (v,int));
4778 va_end (v);
4779 return s;
4780}
4781int test (int i, double x);
4782struct s1 {int (*f) (int a);};
4783struct s2 {int (*f) (double a);};
4784int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4785int argc;
4786char **argv;
4787
4788int
4789main ()
4790{
4791
4792return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4793
4794 ;
4795 return 0;
4796}
4797_ACEOF
81ecdfbb 4798if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4799 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4800fi
81ecdfbb 4801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4802done
4803CC="$ac_save_CC"
4804
4805fi
4806
4807if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4809$as_echo "none needed" >&6; }
783e057b 4810else
81ecdfbb
RW
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4812$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4813fi
4814case "x$am_cv_prog_cc_stdc" in
4815 x|xno) ;;
4816 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4817esac
4818
4869db5e
RM
4819# expand $ac_aux_dir to an absolute path
4820am_aux_dir=`cd $ac_aux_dir && pwd`
4821
4822if test x"${install_sh}" != xset; then
4823 case $am_aux_dir in
4824 *\ * | *\ *)
4825 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4826 *)
4827 install_sh="\${SHELL} $am_aux_dir/install-sh"
4828 esac
4829fi
4830
4831# Installed binaries are usually stripped using `strip' when the user
4832# run `make install-strip'. However `strip' might not be the right
4833# tool to use in cross-compilation environments, therefore Automake
4834# will honor the `STRIP' environment variable to overrule this program.
4835if test "$cross_compiling" != no; then
4836 if test -n "$ac_tool_prefix"; then
4837 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4838set dummy ${ac_tool_prefix}strip; ac_word=$2
4839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
4841if test "${ac_cv_prog_STRIP+set}" = set; then :
4842 $as_echo_n "(cached) " >&6
4843else
4844 if test -n "$STRIP"; then
4845 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4846else
4847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4848for as_dir in $PATH
4849do
4850 IFS=$as_save_IFS
4851 test -z "$as_dir" && as_dir=.
4852 for ac_exec_ext in '' $ac_executable_extensions; do
4853 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4854 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4856 break 2
4857 fi
4858done
4859 done
4860IFS=$as_save_IFS
4861
4862fi
4863fi
4864STRIP=$ac_cv_prog_STRIP
4865if test -n "$STRIP"; then
4866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4867$as_echo "$STRIP" >&6; }
4868else
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872
4873
4874fi
4875if test -z "$ac_cv_prog_STRIP"; then
4876 ac_ct_STRIP=$STRIP
4877 # Extract the first word of "strip", so it can be a program name with args.
4878set dummy strip; ac_word=$2
4879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4880$as_echo_n "checking for $ac_word... " >&6; }
4881if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4882 $as_echo_n "(cached) " >&6
4883else
4884 if test -n "$ac_ct_STRIP"; then
4885 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4886else
4887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4888for as_dir in $PATH
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
4892 for ac_exec_ext in '' $ac_executable_extensions; do
4893 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4894 ac_cv_prog_ac_ct_STRIP="strip"
4895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4896 break 2
4897 fi
4898done
4899 done
4900IFS=$as_save_IFS
4901
4902fi
4903fi
4904ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4905if test -n "$ac_ct_STRIP"; then
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4907$as_echo "$ac_ct_STRIP" >&6; }
4908else
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910$as_echo "no" >&6; }
4911fi
4912
4913 if test "x$ac_ct_STRIP" = x; then
4914 STRIP=":"
4915 else
4916 case $cross_compiling:$ac_tool_warned in
4917yes:)
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4919$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4920ac_tool_warned=yes ;;
4921esac
4922 STRIP=$ac_ct_STRIP
4923 fi
4924else
4925 STRIP="$ac_cv_prog_STRIP"
4926fi
4927
4928fi
4929INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4930
783e057b
DJ
4931
4932ac_aux_dir=
81ecdfbb
RW
4933for ac_dir in .. "$srcdir"/..; do
4934 for ac_t in install-sh install.sh shtool; do
4935 if test -f "$ac_dir/$ac_t"; then
4936 ac_aux_dir=$ac_dir
4937 ac_install_sh="$ac_aux_dir/$ac_t -c"
4938 break 2
4939 fi
4940 done
783e057b
DJ
4941done
4942if test -z "$ac_aux_dir"; then
81ecdfbb 4943 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4944fi
81ecdfbb
RW
4945
4946# These three variables are undocumented and unsupported,
4947# and are intended to be withdrawn in a future Autoconf release.
4948# They can cause serious problems if a builder's source tree is in a directory
4949# whose full name contains unusual characters.
4950ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4951ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4952ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4953
783e057b 4954
783e057b 4955
9009e1ae
MR
4956test "$program_prefix" != NONE &&
4957 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4958# Use a double $ so make ignores it.
4959test "$program_suffix" != NONE &&
4960 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4961# Double any \ or $.
4962# By default was `s,x,x', remove it if useless.
4963ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4964program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4965
81ecdfbb 4966
0bcda685
PA
4967# We require a C++11 compiler. Check if one is available, and if
4968# necessary, set CXX_DIALECT to some -std=xxx switch.
4969
4970 ax_cxx_compile_cxx11_required=true
4971 ac_ext=cpp
4972ac_cpp='$CXXCPP $CPPFLAGS'
4973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4976 CXX_DIALECT=""
4977 ac_success=no
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4979$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
4980if test "${ax_cv_cxx_compile_cxx11+set}" = set; then :
4981 $as_echo_n "(cached) " >&6
4982else
4983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4984/* end confdefs.h. */
4985
4986
4987// If the compiler admits that it is not ready for C++11, why torture it?
4988// Hopefully, this will speed up the test.
4989
4990#ifndef __cplusplus
4991
4992#error "This is not a C++ compiler"
4993
4994#elif __cplusplus < 201103L
4995
4996#error "This is not a C++11 compiler"
4997
4998#else
4999
5000namespace cxx11
5001{
5002
5003 namespace test_static_assert
5004 {
5005
5006 template <typename T>
5007 struct check
5008 {
5009 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5010 };
5011
5012 }
5013
5014 namespace test_final_override
5015 {
5016
5017 struct Base
5018 {
5019 virtual void f() {}
5020 };
5021
5022 struct Derived : public Base
5023 {
5024 virtual void f() override {}
5025 };
5026
5027 }
5028
5029 namespace test_double_right_angle_brackets
5030 {
5031
5032 template < typename T >
5033 struct check {};
5034
5035 typedef check<void> single_type;
5036 typedef check<check<void>> double_type;
5037 typedef check<check<check<void>>> triple_type;
5038 typedef check<check<check<check<void>>>> quadruple_type;
5039
5040 }
5041
5042 namespace test_decltype
5043 {
5044
5045 int
5046 f()
5047 {
5048 int a = 1;
5049 decltype(a) b = 2;
5050 return a + b;
5051 }
5052
5053 }
5054
5055 namespace test_type_deduction
5056 {
5057
5058 template < typename T1, typename T2 >
5059 struct is_same
5060 {
5061 static const bool value = false;
5062 };
5063
5064 template < typename T >
5065 struct is_same<T, T>
5066 {
5067 static const bool value = true;
5068 };
5069
5070 template < typename T1, typename T2 >
5071 auto
5072 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5073 {
5074 return a1 + a2;
5075 }
5076
5077 int
5078 test(const int c, volatile int v)
5079 {
5080 static_assert(is_same<int, decltype(0)>::value == true, "");
5081 static_assert(is_same<int, decltype(c)>::value == false, "");
5082 static_assert(is_same<int, decltype(v)>::value == false, "");
5083 auto ac = c;
5084 auto av = v;
5085 auto sumi = ac + av + 'x';
5086 auto sumf = ac + av + 1.0;
5087 static_assert(is_same<int, decltype(ac)>::value == true, "");
5088 static_assert(is_same<int, decltype(av)>::value == true, "");
5089 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5090 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5091 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5092 return (sumf > 0.0) ? sumi : add(c, v);
5093 }
5094
5095 }
5096
5097 namespace test_noexcept
5098 {
5099
5100 int f() { return 0; }
5101 int g() noexcept { return 0; }
5102
5103 static_assert(noexcept(f()) == false, "");
5104 static_assert(noexcept(g()) == true, "");
5105
5106 }
5107
5108 namespace test_constexpr
5109 {
5110
5111 template < typename CharT >
5112 unsigned long constexpr
5113 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5114 {
5115 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5116 }
5117
5118 template < typename CharT >
5119 unsigned long constexpr
5120 strlen_c(const CharT *const s) noexcept
5121 {
5122 return strlen_c_r(s, 0UL);
5123 }
5124
5125 static_assert(strlen_c("") == 0UL, "");
5126 static_assert(strlen_c("1") == 1UL, "");
5127 static_assert(strlen_c("example") == 7UL, "");
5128 static_assert(strlen_c("another\0example") == 7UL, "");
5129
5130 }
5131
5132 namespace test_rvalue_references
5133 {
5134
5135 template < int N >
5136 struct answer
5137 {
5138 static constexpr int value = N;
5139 };
5140
5141 answer<1> f(int&) { return answer<1>(); }
5142 answer<2> f(const int&) { return answer<2>(); }
5143 answer<3> f(int&&) { return answer<3>(); }
5144
5145 void
5146 test()
5147 {
5148 int i = 0;
5149 const int c = 0;
5150 static_assert(decltype(f(i))::value == 1, "");
5151 static_assert(decltype(f(c))::value == 2, "");
5152 static_assert(decltype(f(0))::value == 3, "");
5153 }
5154
5155 }
5156
5157 namespace test_uniform_initialization
5158 {
5159
5160 struct test
5161 {
5162 static const int zero {};
5163 static const int one {1};
5164 };
5165
5166 static_assert(test::zero == 0, "");
5167 static_assert(test::one == 1, "");
5168
5169 }
5170
5171 namespace test_lambdas
5172 {
5173
5174 void
5175 test1()
5176 {
5177 auto lambda1 = [](){};
5178 auto lambda2 = lambda1;
5179 lambda1();
5180 lambda2();
5181 }
5182
5183 int
5184 test2()
5185 {
5186 auto a = [](int i, int j){ return i + j; }(1, 2);
5187 auto b = []() -> int { return '0'; }();
5188 auto c = [=](){ return a + b; }();
5189 auto d = [&](){ return c; }();
5190 auto e = [a, &b](int x) mutable {
5191 const auto identity = [](int y){ return y; };
5192 for (auto i = 0; i < a; ++i)
5193 a += b--;
5194 return x + identity(a + b);
5195 }(0);
5196 return a + b + c + d + e;
5197 }
5198
5199 int
5200 test3()
5201 {
5202 const auto nullary = [](){ return 0; };
5203 const auto unary = [](int x){ return x; };
5204 using nullary_t = decltype(nullary);
5205 using unary_t = decltype(unary);
5206 const auto higher1st = [](nullary_t f){ return f(); };
5207 const auto higher2nd = [unary](nullary_t f1){
5208 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5209 };
5210 return higher1st(nullary) + higher2nd(nullary)(unary);
5211 }
5212
5213 }
5214
5215 namespace test_variadic_templates
5216 {
5217
5218 template <int...>
5219 struct sum;
5220
5221 template <int N0, int... N1toN>
5222 struct sum<N0, N1toN...>
5223 {
5224 static constexpr auto value = N0 + sum<N1toN...>::value;
5225 };
5226
5227 template <>
5228 struct sum<>
5229 {
5230 static constexpr auto value = 0;
5231 };
5232
5233 static_assert(sum<>::value == 0, "");
5234 static_assert(sum<1>::value == 1, "");
5235 static_assert(sum<23>::value == 23, "");
5236 static_assert(sum<1, 2>::value == 3, "");
5237 static_assert(sum<5, 5, 11>::value == 21, "");
5238 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5239
5240 }
5241
5242 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5243 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5244 // because of this.
5245 namespace test_template_alias_sfinae
5246 {
5247
5248 struct foo {};
5249
5250 template<typename T>
5251 using member = typename T::member_type;
5252
5253 template<typename T>
5254 void func(...) {}
5255
5256 template<typename T>
5257 void func(member<T>*) {}
5258
5259 void test();
5260
5261 void test() { func<foo>(0); }
5262
5263 }
5264
5265} // namespace cxx11
5266
5267#endif // __cplusplus >= 201103L
5268
5269
5270
5271_ACEOF
5272if ac_fn_cxx_try_compile "$LINENO"; then :
5273 ax_cv_cxx_compile_cxx11=yes
5274else
5275 ax_cv_cxx_compile_cxx11=no
5276fi
5277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5278fi
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5280$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5281 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5282 ac_success=yes
5283 fi
5284
5285 if test x$ac_success = xno; then
5286 for switch in -std=gnu++11 -std=gnu++0x; do
5287 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5289$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5290if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5291 $as_echo_n "(cached) " >&6
5292else
5293 ac_save_CXX="$CXX"
5294 CXX="$CXX $switch"
5295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5296/* end confdefs.h. */
5297
5298
5299// If the compiler admits that it is not ready for C++11, why torture it?
5300// Hopefully, this will speed up the test.
5301
5302#ifndef __cplusplus
5303
5304#error "This is not a C++ compiler"
5305
5306#elif __cplusplus < 201103L
5307
5308#error "This is not a C++11 compiler"
5309
5310#else
5311
5312namespace cxx11
5313{
5314
5315 namespace test_static_assert
5316 {
5317
5318 template <typename T>
5319 struct check
5320 {
5321 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5322 };
5323
5324 }
5325
5326 namespace test_final_override
5327 {
5328
5329 struct Base
5330 {
5331 virtual void f() {}
5332 };
5333
5334 struct Derived : public Base
5335 {
5336 virtual void f() override {}
5337 };
5338
5339 }
5340
5341 namespace test_double_right_angle_brackets
5342 {
5343
5344 template < typename T >
5345 struct check {};
5346
5347 typedef check<void> single_type;
5348 typedef check<check<void>> double_type;
5349 typedef check<check<check<void>>> triple_type;
5350 typedef check<check<check<check<void>>>> quadruple_type;
5351
5352 }
5353
5354 namespace test_decltype
5355 {
5356
5357 int
5358 f()
5359 {
5360 int a = 1;
5361 decltype(a) b = 2;
5362 return a + b;
5363 }
5364
5365 }
5366
5367 namespace test_type_deduction
5368 {
5369
5370 template < typename T1, typename T2 >
5371 struct is_same
5372 {
5373 static const bool value = false;
5374 };
5375
5376 template < typename T >
5377 struct is_same<T, T>
5378 {
5379 static const bool value = true;
5380 };
5381
5382 template < typename T1, typename T2 >
5383 auto
5384 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5385 {
5386 return a1 + a2;
5387 }
5388
5389 int
5390 test(const int c, volatile int v)
5391 {
5392 static_assert(is_same<int, decltype(0)>::value == true, "");
5393 static_assert(is_same<int, decltype(c)>::value == false, "");
5394 static_assert(is_same<int, decltype(v)>::value == false, "");
5395 auto ac = c;
5396 auto av = v;
5397 auto sumi = ac + av + 'x';
5398 auto sumf = ac + av + 1.0;
5399 static_assert(is_same<int, decltype(ac)>::value == true, "");
5400 static_assert(is_same<int, decltype(av)>::value == true, "");
5401 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5402 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5403 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5404 return (sumf > 0.0) ? sumi : add(c, v);
5405 }
5406
5407 }
5408
5409 namespace test_noexcept
5410 {
5411
5412 int f() { return 0; }
5413 int g() noexcept { return 0; }
5414
5415 static_assert(noexcept(f()) == false, "");
5416 static_assert(noexcept(g()) == true, "");
5417
5418 }
5419
5420 namespace test_constexpr
5421 {
5422
5423 template < typename CharT >
5424 unsigned long constexpr
5425 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5426 {
5427 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5428 }
5429
5430 template < typename CharT >
5431 unsigned long constexpr
5432 strlen_c(const CharT *const s) noexcept
5433 {
5434 return strlen_c_r(s, 0UL);
5435 }
5436
5437 static_assert(strlen_c("") == 0UL, "");
5438 static_assert(strlen_c("1") == 1UL, "");
5439 static_assert(strlen_c("example") == 7UL, "");
5440 static_assert(strlen_c("another\0example") == 7UL, "");
5441
5442 }
5443
5444 namespace test_rvalue_references
5445 {
5446
5447 template < int N >
5448 struct answer
5449 {
5450 static constexpr int value = N;
5451 };
5452
5453 answer<1> f(int&) { return answer<1>(); }
5454 answer<2> f(const int&) { return answer<2>(); }
5455 answer<3> f(int&&) { return answer<3>(); }
5456
5457 void
5458 test()
5459 {
5460 int i = 0;
5461 const int c = 0;
5462 static_assert(decltype(f(i))::value == 1, "");
5463 static_assert(decltype(f(c))::value == 2, "");
5464 static_assert(decltype(f(0))::value == 3, "");
5465 }
5466
5467 }
5468
5469 namespace test_uniform_initialization
5470 {
5471
5472 struct test
5473 {
5474 static const int zero {};
5475 static const int one {1};
5476 };
5477
5478 static_assert(test::zero == 0, "");
5479 static_assert(test::one == 1, "");
5480
5481 }
5482
5483 namespace test_lambdas
5484 {
5485
5486 void
5487 test1()
5488 {
5489 auto lambda1 = [](){};
5490 auto lambda2 = lambda1;
5491 lambda1();
5492 lambda2();
5493 }
5494
5495 int
5496 test2()
5497 {
5498 auto a = [](int i, int j){ return i + j; }(1, 2);
5499 auto b = []() -> int { return '0'; }();
5500 auto c = [=](){ return a + b; }();
5501 auto d = [&](){ return c; }();
5502 auto e = [a, &b](int x) mutable {
5503 const auto identity = [](int y){ return y; };
5504 for (auto i = 0; i < a; ++i)
5505 a += b--;
5506 return x + identity(a + b);
5507 }(0);
5508 return a + b + c + d + e;
5509 }
5510
5511 int
5512 test3()
5513 {
5514 const auto nullary = [](){ return 0; };
5515 const auto unary = [](int x){ return x; };
5516 using nullary_t = decltype(nullary);
5517 using unary_t = decltype(unary);
5518 const auto higher1st = [](nullary_t f){ return f(); };
5519 const auto higher2nd = [unary](nullary_t f1){
5520 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5521 };
5522 return higher1st(nullary) + higher2nd(nullary)(unary);
5523 }
5524
5525 }
5526
5527 namespace test_variadic_templates
5528 {
5529
5530 template <int...>
5531 struct sum;
5532
5533 template <int N0, int... N1toN>
5534 struct sum<N0, N1toN...>
5535 {
5536 static constexpr auto value = N0 + sum<N1toN...>::value;
5537 };
5538
5539 template <>
5540 struct sum<>
5541 {
5542 static constexpr auto value = 0;
5543 };
5544
5545 static_assert(sum<>::value == 0, "");
5546 static_assert(sum<1>::value == 1, "");
5547 static_assert(sum<23>::value == 23, "");
5548 static_assert(sum<1, 2>::value == 3, "");
5549 static_assert(sum<5, 5, 11>::value == 21, "");
5550 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5551
5552 }
5553
5554 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5555 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5556 // because of this.
5557 namespace test_template_alias_sfinae
5558 {
5559
5560 struct foo {};
5561
5562 template<typename T>
5563 using member = typename T::member_type;
5564
5565 template<typename T>
5566 void func(...) {}
5567
5568 template<typename T>
5569 void func(member<T>*) {}
5570
5571 void test();
5572
5573 void test() { func<foo>(0); }
5574
5575 }
5576
5577} // namespace cxx11
5578
5579#endif // __cplusplus >= 201103L
5580
5581
5582
5583_ACEOF
5584if ac_fn_cxx_try_compile "$LINENO"; then :
5585 eval $cachevar=yes
5586else
5587 eval $cachevar=no
5588fi
5589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5590 CXX="$ac_save_CXX"
5591fi
5592eval ac_res=\$$cachevar
5593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5594$as_echo "$ac_res" >&6; }
5595 if eval test x\$$cachevar = xyes; then
5596 CXX_DIALECT="$switch"
5597 ac_success=yes
5598 break
5599 fi
5600 done
5601 fi
5602
5603 if test x$ac_success = xno; then
5604 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
5605 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5607$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5608if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
5609 $as_echo_n "(cached) " >&6
5610else
5611 ac_save_CXX="$CXX"
5612 CXX="$CXX $switch"
5613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5614/* end confdefs.h. */
5615
5616
5617// If the compiler admits that it is not ready for C++11, why torture it?
5618// Hopefully, this will speed up the test.
5619
5620#ifndef __cplusplus
5621
5622#error "This is not a C++ compiler"
5623
5624#elif __cplusplus < 201103L
5625
5626#error "This is not a C++11 compiler"
5627
5628#else
5629
5630namespace cxx11
5631{
5632
5633 namespace test_static_assert
5634 {
5635
5636 template <typename T>
5637 struct check
5638 {
5639 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5640 };
5641
5642 }
5643
5644 namespace test_final_override
5645 {
5646
5647 struct Base
5648 {
5649 virtual void f() {}
5650 };
5651
5652 struct Derived : public Base
5653 {
5654 virtual void f() override {}
5655 };
5656
5657 }
5658
5659 namespace test_double_right_angle_brackets
5660 {
5661
5662 template < typename T >
5663 struct check {};
5664
5665 typedef check<void> single_type;
5666 typedef check<check<void>> double_type;
5667 typedef check<check<check<void>>> triple_type;
5668 typedef check<check<check<check<void>>>> quadruple_type;
5669
5670 }
5671
5672 namespace test_decltype
5673 {
5674
5675 int
5676 f()
5677 {
5678 int a = 1;
5679 decltype(a) b = 2;
5680 return a + b;
5681 }
5682
5683 }
5684
5685 namespace test_type_deduction
5686 {
5687
5688 template < typename T1, typename T2 >
5689 struct is_same
5690 {
5691 static const bool value = false;
5692 };
5693
5694 template < typename T >
5695 struct is_same<T, T>
5696 {
5697 static const bool value = true;
5698 };
5699
5700 template < typename T1, typename T2 >
5701 auto
5702 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5703 {
5704 return a1 + a2;
5705 }
5706
5707 int
5708 test(const int c, volatile int v)
5709 {
5710 static_assert(is_same<int, decltype(0)>::value == true, "");
5711 static_assert(is_same<int, decltype(c)>::value == false, "");
5712 static_assert(is_same<int, decltype(v)>::value == false, "");
5713 auto ac = c;
5714 auto av = v;
5715 auto sumi = ac + av + 'x';
5716 auto sumf = ac + av + 1.0;
5717 static_assert(is_same<int, decltype(ac)>::value == true, "");
5718 static_assert(is_same<int, decltype(av)>::value == true, "");
5719 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5720 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5721 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5722 return (sumf > 0.0) ? sumi : add(c, v);
5723 }
5724
5725 }
5726
5727 namespace test_noexcept
5728 {
5729
5730 int f() { return 0; }
5731 int g() noexcept { return 0; }
5732
5733 static_assert(noexcept(f()) == false, "");
5734 static_assert(noexcept(g()) == true, "");
5735
5736 }
5737
5738 namespace test_constexpr
5739 {
5740
5741 template < typename CharT >
5742 unsigned long constexpr
5743 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5744 {
5745 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5746 }
5747
5748 template < typename CharT >
5749 unsigned long constexpr
5750 strlen_c(const CharT *const s) noexcept
5751 {
5752 return strlen_c_r(s, 0UL);
5753 }
5754
5755 static_assert(strlen_c("") == 0UL, "");
5756 static_assert(strlen_c("1") == 1UL, "");
5757 static_assert(strlen_c("example") == 7UL, "");
5758 static_assert(strlen_c("another\0example") == 7UL, "");
5759
5760 }
5761
5762 namespace test_rvalue_references
5763 {
5764
5765 template < int N >
5766 struct answer
5767 {
5768 static constexpr int value = N;
5769 };
5770
5771 answer<1> f(int&) { return answer<1>(); }
5772 answer<2> f(const int&) { return answer<2>(); }
5773 answer<3> f(int&&) { return answer<3>(); }
5774
5775 void
5776 test()
5777 {
5778 int i = 0;
5779 const int c = 0;
5780 static_assert(decltype(f(i))::value == 1, "");
5781 static_assert(decltype(f(c))::value == 2, "");
5782 static_assert(decltype(f(0))::value == 3, "");
5783 }
5784
5785 }
5786
5787 namespace test_uniform_initialization
5788 {
5789
5790 struct test
5791 {
5792 static const int zero {};
5793 static const int one {1};
5794 };
5795
5796 static_assert(test::zero == 0, "");
5797 static_assert(test::one == 1, "");
5798
5799 }
5800
5801 namespace test_lambdas
5802 {
5803
5804 void
5805 test1()
5806 {
5807 auto lambda1 = [](){};
5808 auto lambda2 = lambda1;
5809 lambda1();
5810 lambda2();
5811 }
5812
5813 int
5814 test2()
5815 {
5816 auto a = [](int i, int j){ return i + j; }(1, 2);
5817 auto b = []() -> int { return '0'; }();
5818 auto c = [=](){ return a + b; }();
5819 auto d = [&](){ return c; }();
5820 auto e = [a, &b](int x) mutable {
5821 const auto identity = [](int y){ return y; };
5822 for (auto i = 0; i < a; ++i)
5823 a += b--;
5824 return x + identity(a + b);
5825 }(0);
5826 return a + b + c + d + e;
5827 }
5828
5829 int
5830 test3()
5831 {
5832 const auto nullary = [](){ return 0; };
5833 const auto unary = [](int x){ return x; };
5834 using nullary_t = decltype(nullary);
5835 using unary_t = decltype(unary);
5836 const auto higher1st = [](nullary_t f){ return f(); };
5837 const auto higher2nd = [unary](nullary_t f1){
5838 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5839 };
5840 return higher1st(nullary) + higher2nd(nullary)(unary);
5841 }
5842
5843 }
5844
5845 namespace test_variadic_templates
5846 {
5847
5848 template <int...>
5849 struct sum;
5850
5851 template <int N0, int... N1toN>
5852 struct sum<N0, N1toN...>
5853 {
5854 static constexpr auto value = N0 + sum<N1toN...>::value;
5855 };
5856
5857 template <>
5858 struct sum<>
5859 {
5860 static constexpr auto value = 0;
5861 };
5862
5863 static_assert(sum<>::value == 0, "");
5864 static_assert(sum<1>::value == 1, "");
5865 static_assert(sum<23>::value == 23, "");
5866 static_assert(sum<1, 2>::value == 3, "");
5867 static_assert(sum<5, 5, 11>::value == 21, "");
5868 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5869
5870 }
5871
5872 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5873 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5874 // because of this.
5875 namespace test_template_alias_sfinae
5876 {
5877
5878 struct foo {};
5879
5880 template<typename T>
5881 using member = typename T::member_type;
5882
5883 template<typename T>
5884 void func(...) {}
5885
5886 template<typename T>
5887 void func(member<T>*) {}
5888
5889 void test();
5890
5891 void test() { func<foo>(0); }
5892
5893 }
5894
5895} // namespace cxx11
5896
5897#endif // __cplusplus >= 201103L
5898
5899
5900
5901_ACEOF
5902if ac_fn_cxx_try_compile "$LINENO"; then :
5903 eval $cachevar=yes
5904else
5905 eval $cachevar=no
5906fi
5907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5908 CXX="$ac_save_CXX"
5909fi
5910eval ac_res=\$$cachevar
5911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5912$as_echo "$ac_res" >&6; }
5913 if eval test x\$$cachevar = xyes; then
5914 CXX_DIALECT="$switch"
5915 ac_success=yes
5916 break
5917 fi
5918 done
5919 fi
5920 ac_ext=c
5921ac_cpp='$CPP $CPPFLAGS'
5922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5924ac_compiler_gnu=$ac_cv_c_compiler_gnu
5925
5926 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5927 if test x$ac_success = xno; then
5928 as_fn_error "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5929 fi
5930 fi
5931 if test x$ac_success = xno; then
5932 HAVE_CXX11=0
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5934$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
5935 else
5936 HAVE_CXX11=1
5937
5938$as_echo "#define HAVE_CXX11 1" >>confdefs.h
5939
5940 fi
5941
5942
5943
5944
a417dc56
RW
5945# Dependency checking.
5946rm -rf .tst 2>/dev/null
5947mkdir .tst 2>/dev/null
5948if test -d .tst; then
5949 am__leading_dot=.
5950else
5951 am__leading_dot=_
5952fi
5953rmdir .tst 2>/dev/null
5954
5955DEPDIR="${am__leading_dot}deps"
5956
81ecdfbb 5957ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
5958
5959
5960depcc="$CC" am_compiler_list=
5961
5962am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
5963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5964$as_echo_n "checking dependency style of $depcc... " >&6; }
5965if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5966 $as_echo_n "(cached) " >&6
a417dc56
RW
5967else
5968 if test -f "$am_depcomp"; then
5969 # We make a subdir and do the tests there. Otherwise we can end up
5970 # making bogus files that we don't know about and never remove. For
5971 # instance it was reported that on HP-UX the gcc test will end up
5972 # making a dummy file named `D' -- because `-MD' means `put the output
5973 # in D'.
5974 mkdir conftest.dir
5975 # Copy depcomp to subdir because otherwise we won't find it if we're
5976 # using a relative directory.
5977 cp "$am_depcomp" conftest.dir
5978 cd conftest.dir
5979 # We will build objects and dependencies in a subdirectory because
5980 # it helps to detect inapplicable dependency modes. For instance
5981 # both Tru64's cc and ICC support -MD to output dependencies as a
5982 # side effect of compilation, but ICC will put the dependencies in
5983 # the current directory while Tru64 will put them in the object
5984 # directory.
5985 mkdir sub
5986
5987 am_cv_CC_dependencies_compiler_type=none
5988 if test "$am_compiler_list" = ""; then
5989 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5990 fi
5991 for depmode in $am_compiler_list; do
5992 if test $depmode = none; then break; fi
5993
81ecdfbb 5994 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
5995 # Setup a source with many dependencies, because some compilers
5996 # like to wrap large dependency lists on column 80 (with \), and
5997 # we should not choose a depcomp mode which is confused by this.
5998 #
5999 # We need to recreate these files for each test, as the compiler may
6000 # overwrite some of them when testing with obscure command lines.
6001 # This happens at least with the AIX C compiler.
6002 : > sub/conftest.c
6003 for i in 1 2 3 4 5 6; do
6004 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6005 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6006 # Solaris 8's {/usr,}/bin/sh.
6007 touch sub/conftst$i.h
6008 done
6009 echo "include sub/conftest.Po" > confmf
6010
6011 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6012 # mode. It turns out that the SunPro C++ compiler does not properly
6013 # handle `-M -o', and we need to detect this.
6014 depcmd="depmode=$depmode \
6015 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6016 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6017 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6018 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6019 if env $depcmd > conftest.err 2>&1 &&
6020 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6021 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6022 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6023 # icc doesn't choke on unknown options, it will just issue warnings
6024 # or remarks (even with -Werror). So we grep stderr for any message
6025 # that says an option was ignored or not supported.
6026 # When given -MP, icc 7.0 and 7.1 complain thusly:
6027 # icc: Command line warning: ignoring option '-M'; no argument required
6028 # The diagnosis changed in icc 8.0:
6029 # icc: Command line remark: option '-MP' not supported
6030 if (grep 'ignoring option' conftest.err ||
6031 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6032 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6033 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6034 break
6035 fi
6036 fi
81ecdfbb 6037 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6038 sed -e 's/^/| /' < conftest.err >&5
6039 done
6040
6041 cd ..
6042 rm -rf conftest.dir
6043else
6044 am_cv_CC_dependencies_compiler_type=none
6045fi
6046
6047fi
81ecdfbb
RW
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6049$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6050if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 6051then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6052else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6053
6054fi
6055
6056
648d586d
JB
6057gnulib_extra_configure_args=
6058# If large-file support is disabled, make sure gnulib does the same.
6059if test "$enable_largefile" = no; then
6060gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6061fi
6062
c971b7fa
PA
6063# Configure gnulib. We need to build gnulib under some other
6064# directory not "gnulib", to avoid the problem of both GDB and
6065# GDBserver wanting to build it in the same directory, when building
6066# in the source dir.
783e057b 6067
c971b7fa
PA
6068 in_src="gnulib"
6069 in_build="build-gnulib"
648d586d 6070 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
6071
6072 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6073 # so they do not pile up.
6074 ac_sub_configure_args=
6075 ac_prev=
6076 eval "set x $ac_configure_args"
6077 shift
6078 for ac_arg
6079 do
6080 if test -n "$ac_prev"; then
6081 ac_prev=
6082 continue
6083 fi
6084 case $ac_arg in
6085 -cache-file | --cache-file | --cache-fil | --cache-fi \
6086 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6087 ac_prev=cache_file ;;
6088 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6089 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6090 | --c=*)
6091 ;;
6092 --config-cache | -C)
6093 ;;
6094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6095 ac_prev=srcdir ;;
6096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6097 ;;
6098 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6099 ac_prev=prefix ;;
6100 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6101 ;;
6102 --disable-option-checking)
6103 ;;
6104 *)
6105 case $ac_arg in
6106 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6107 esac
6108 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6109 esac
6110 done
6111
6112 # Always prepend --prefix to ensure using the same prefix
6113 # in subdir configurations.
6114 ac_arg="--prefix=$prefix"
6115 case $ac_arg in
6116 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6117 esac
6118 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6119
6120 # Pass --silent
6121 if test "$silent" = yes; then
6122 ac_sub_configure_args="--silent $ac_sub_configure_args"
6123 fi
6124
6125 # Always prepend --disable-option-checking to silence warnings, since
6126 # different subdirs can have different --enable and --with options.
6127 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6128
6129 ac_popdir=`pwd`
6130 ac_dir=$in_build
6131
6132 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6133 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6134 $as_echo "$ac_msg" >&6
6135 as_dir="$ac_dir"; as_fn_mkdir_p
6136
38ea300a
PA
6137 case $srcdir in
6138 [\\/]* | ?:[\\/]* )
6139 ac_srcdir=$srcdir/$in_src ;;
6140 *) # Relative name.
6141 ac_srcdir=../$srcdir/$in_src ;;
6142 esac
c971b7fa
PA
6143
6144 cd "$ac_dir"
6145
6146 ac_sub_configure=$ac_srcdir/configure
6147
6148 # Make the cache file name correct relative to the subdirectory.
6149 case $cache_file in
6150 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6151 *) # Relative name.
6152 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6153 esac
6154
648d586d
JB
6155 if test -n "$in_extra_args"; then
6156 # Add the extra args at the end.
6157 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6158 fi
6159
c971b7fa
PA
6160 { $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
6161$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6162 # The eval makes quoting arguments work.
6163 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6164 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6165 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6166
6167 cd "$ac_popdir"
783e057b 6168
c971b7fa
PA
6169
6170
6171CONFIG_OBS=
6172CONFIG_DEPS=
6173CONFIG_SRCS=
6174ENABLE_CFLAGS=
6175
6176CONFIG_ALL=
6177CONFIG_CLEAN=
6178CONFIG_INSTALL=
6179CONFIG_UNINSTALL=
6180
6181# If we haven't got the data from the intl directory,
6182# assume NLS is disabled.
6183USE_NLS=no
6184LIBINTL=
6185LIBINTL_DEP=
6186INCINTL=
6187XGETTEXT=
6188GMSGFMT=
6189POSUB=
783e057b
DJ
6190
6191if test -f ../intl/config.intl; then
6192 . ../intl/config.intl
6193fi
81ecdfbb
RW
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6195$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6196if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
783e057b 6199else
81ecdfbb
RW
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6201$as_echo "yes" >&6; }
783e057b 6202
81ecdfbb 6203$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6204
6205
81ecdfbb
RW
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6207$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6208 # Look for .po and .gmo files in the source directory.
6209 CATALOGS=
6210 XLINGUAS=
6211 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6212 # If there aren't any .gmo files the shell will give us the
6213 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6214 # weeded out.
6215 case "$cat" in *\**)
6216 continue;;
6217 esac
6218 # The quadruple backslash is collapsed to a double backslash
6219 # by the backticks, then collapsed again by the double quotes,
6220 # leaving us with one backslash in the sed expression (right
6221 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6222 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6223 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6224 # The user is allowed to set LINGUAS to a list of languages to
6225 # install catalogs for. If it's empty that means "all of them."
6226 if test "x$LINGUAS" = x; then
6227 CATALOGS="$CATALOGS $cat"
6228 XLINGUAS="$XLINGUAS $lang"
6229 else
6230 case "$LINGUAS" in *$lang*)
6231 CATALOGS="$CATALOGS $cat"
6232 XLINGUAS="$XLINGUAS $lang"
6233 ;;
6234 esac
e28b3332
DJ
6235 fi
6236 done
c971b7fa
PA
6237 LINGUAS="$XLINGUAS"
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6239$as_echo "$LINGUAS" >&6; }
6240
6241
6242 DATADIRNAME=share
6243
6244 INSTOBJEXT=.mo
6245
6246 GENCAT=gencat
6247
6248 CATOBJEXT=.gmo
e28b3332 6249
e28b3332
DJ
6250fi
6251
c971b7fa
PA
6252localedir='${datadir}/locale'
6253
6254
6255if test x"$USE_NLS" = xyes; then
6256 CONFIG_ALL="$CONFIG_ALL all-po"
6257 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6258 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6259 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6260fi
e28b3332 6261
c971b7fa
PA
6262GNULIB=build-gnulib/import
6263
6264# For Makefile dependencies.
6265GNULIB_STDINT_H=
6266if test x"$STDINT_H" != x; then
6267 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
6268fi
6269
6270
c971b7fa
PA
6271PACKAGE=gdb
6272
6273cat >>confdefs.h <<_ACEOF
6274#define PACKAGE "$PACKAGE"
6275_ACEOF
6276
6277
6278
6279# We never need to detect it in this sub-configure.
6280# But preserve it for config.status --recheck.
6281
6282
6283
6284MAKEINFO_EXTRA_FLAGS=""
6285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6286$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6287if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
6288 $as_echo_n "(cached) " >&6
6289else
6290 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6291 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6292 gdb_cv_have_makeinfo_click=yes
6293 else
6294 gdb_cv_have_makeinfo_click=no
6295 fi
6296fi
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6298$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6299if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6300 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6301fi
e28b3332
DJ
6302
6303
bec39cab
AC
6304
6305
81ecdfbb
RW
6306# Check whether --with-separate-debug-dir was given.
6307if test "${with_separate_debug_dir+set}" = set; then :
6308 withval=$with_separate_debug_dir;
b14b1491
TT
6309 DEBUGDIR=$withval
6310else
6311 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6312fi
6313
20e95c23 6314
783e057b
DJ
6315 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6316 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6317 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6318 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6319
783e057b
DJ
6320cat >>confdefs.h <<_ACEOF
6321#define DEBUGDIR "$ac_define_dir"
20e95c23 6322_ACEOF
20e95c23 6323
20e95c23 6324
20e95c23 6325
0c4a4063 6326
b14b1491
TT
6327 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6328 if test "x$prefix" = xNONE; then
6329 test_prefix=/usr/local
6330 else
6331 test_prefix=$prefix
6332 fi
783e057b 6333 else
b14b1491 6334 test_prefix=$exec_prefix
783e057b 6335 fi
b14b1491
TT
6336 value=0
6337 case ${ac_define_dir} in
6338 "${test_prefix}"|"${test_prefix}/"*|\
6339 '${exec_prefix}'|'${exec_prefix}/'*)
6340 value=1
6341 ;;
6342 esac
6343
6344cat >>confdefs.h <<_ACEOF
6345#define DEBUGDIR_RELOCATABLE $value
6346_ACEOF
6347
6348
6349
0c4a4063 6350
f83d8a90
DE
6351# We can't pass paths as command line arguments.
6352# Mingw32 tries to be clever and will convert the paths for us.
6353# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6354# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6355# This breaks GDB's relocatable path conversions since paths passed in
6356# config.h would not get so translated, the path prefixes no longer match.
6357
6358 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6359 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6360 ac_define_dir=`eval echo $bindir`
6361 ac_define_dir=`eval echo $ac_define_dir`
6362
6363cat >>confdefs.h <<_ACEOF
6364#define BINDIR "$ac_define_dir"
6365_ACEOF
6366
6367
6368
b14b1491
TT
6369# GDB's datadir relocation
6370
6371
6372
81ecdfbb
RW
6373# Check whether --with-gdb-datadir was given.
6374if test "${with_gdb_datadir+set}" = set; then :
6375 withval=$with_gdb_datadir;
b14b1491 6376 GDB_DATADIR=$withval
20e95c23 6377else
b14b1491 6378 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6379fi
6380
20e95c23 6381
b14b1491
TT
6382 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6383 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6384 ac_define_dir=`eval echo $GDB_DATADIR`
6385 ac_define_dir=`eval echo $ac_define_dir`
6386
6387cat >>confdefs.h <<_ACEOF
6388#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6389_ACEOF
6390
b14b1491
TT
6391
6392
0c4a4063 6393
b14b1491
TT
6394 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6395 if test "x$prefix" = xNONE; then
6396 test_prefix=/usr/local
6397 else
6398 test_prefix=$prefix
6399 fi
6400 else
6401 test_prefix=$exec_prefix
6402 fi
6403 value=0
6404 case ${ac_define_dir} in
6405 "${test_prefix}"|"${test_prefix}/"*|\
6406 '${exec_prefix}'|'${exec_prefix}/'*)
6407 value=1
6408 ;;
6409 esac
6410
6411cat >>confdefs.h <<_ACEOF
6412#define GDB_DATADIR_RELOCATABLE $value
6413_ACEOF
6414
6415
783e057b 6416
20e95c23 6417
0c4a4063 6418
81ecdfbb
RW
6419# Check whether --with-relocated-sources was given.
6420if test "${with_relocated_sources+set}" = set; then :
6421 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6422
6423 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6424 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6425 ac_define_dir=`eval echo $reloc_srcdir`
6426 ac_define_dir=`eval echo $ac_define_dir`
6427
6428cat >>confdefs.h <<_ACEOF
6429#define RELOC_SRCDIR "$ac_define_dir"
6430_ACEOF
6431
6432
6433
81ecdfbb
RW
6434fi
6435
29b0e8a2 6436
7349ff92
JK
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6438$as_echo_n "checking for default auto-load directory... " >&6; }
6439
6440# Check whether --with-auto-load-dir was given.
6441if test "${with_auto_load_dir+set}" = set; then :
6442 withval=$with_auto_load_dir;
6443else
1564a261 6444 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6445fi
6446
1564a261 6447escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6448
6449 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6450 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6451 ac_define_dir=`eval echo $escape_dir`
6452 ac_define_dir=`eval echo $ac_define_dir`
6453
6454cat >>confdefs.h <<_ACEOF
6455#define AUTO_LOAD_DIR "$ac_define_dir"
6456_ACEOF
6457
6458
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6460$as_echo "$with_auto_load_dir" >&6; }
6461
bccbefd2
JK
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6463$as_echo_n "checking for default auto-load safe-path... " >&6; }
6464
6465# Check whether --with-auto-load-safe-path was given.
6466if test "${with_auto_load_safe_path+set}" = set; then :
6467 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6468 with_auto_load_safe_path="/"
6469 fi
bccbefd2 6470else
7349ff92 6471 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6472fi
6473
1564a261 6474escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6475
6476 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6477 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6478 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6479 ac_define_dir=`eval echo $ac_define_dir`
6480
6481cat >>confdefs.h <<_ACEOF
6dea1fbd 6482#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6483_ACEOF
6484
6485
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6487$as_echo "$with_auto_load_safe_path" >&6; }
6488
29b0e8a2 6489
20e95c23 6490
5ae98d25 6491subdirs="$subdirs testsuite"
20e95c23
DJ
6492
6493
783e057b 6494# Check whether to support alternative target configurations
81ecdfbb
RW
6495# Check whether --enable-targets was given.
6496if test "${enable_targets+set}" = set; then :
6497 enableval=$enable_targets; case "${enableval}" in
6498 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6499 ;;
6500 no) enable_targets= ;;
6501 *) enable_targets=$enableval ;;
6502esac
81ecdfbb
RW
6503fi
6504
20e95c23 6505
783e057b 6506# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6507# Check whether --enable-64-bit-bfd was given.
6508if test "${enable_64_bit_bfd+set}" = set; then :
6509 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6510 yes) want64=true ;;
6511 no) want64=false ;;
81ecdfbb 6512 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6513esac
6514else
6515 want64=false
81ecdfbb
RW
6516fi
6517
783e057b
DJ
6518# Provide defaults for some variables set by the per-host and per-target
6519# configuration.
6520gdb_host_obs=posix-hdep.o
20e95c23 6521
783e057b
DJ
6522if test "${target}" = "${host}"; then
6523 gdb_native=yes
6524else
6525 gdb_native=no
6526fi
20e95c23 6527
783e057b 6528. $srcdir/configure.host
20e95c23 6529
fb23d554
SDJ
6530# Add in the common host objects.
6531. $srcdir/common/common.host
6532gdb_host_obs="$gdb_host_obs $common_host_obs"
6533
783e057b 6534# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6535
783e057b
DJ
6536TARGET_OBS=
6537all_targets=
b292c783 6538HAVE_NATIVE_GCORE_TARGET=
20e95c23 6539
783e057b 6540for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6541do
783e057b
DJ
6542 if test "$targ_alias" = "all"; then
6543 all_targets=true
6544 else
6545 # Canonicalize the secondary target names.
6546 result=`$ac_config_sub $targ_alias 2>/dev/null`
6547 if test -n "$result"; then
6548 targ=$result
6549 else
6550 targ=$targ_alias
6551 fi
20e95c23 6552
783e057b 6553 . ${srcdir}/configure.tgt
20e95c23 6554
bf307134
JB
6555 if test -z "${gdb_target_obs}"; then :
6556 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
6557fi
6558
783e057b
DJ
6559 # Target-specific object files
6560 for i in ${gdb_target_obs}; do
6561 case " $TARGET_OBS " in
6562 *" ${i} "*) ;;
6563 *)
6564 TARGET_OBS="$TARGET_OBS ${i}"
6565 ;;
6566 esac
6567 done
20e95c23 6568
783e057b
DJ
6569 # Check whether this target needs 64-bit CORE_ADDR
6570 if test x${want64} = xfalse; then
6571 . ${srcdir}/../bfd/config.bfd
6572 fi
b292c783
JK
6573
6574 # Check whether this target is native and supports gcore.
6575 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6576 && $gdb_have_gcore; then
6577 HAVE_NATIVE_GCORE_TARGET=1
6578 fi
783e057b 6579 fi
20e95c23
DJ
6580done
6581
783e057b
DJ
6582if test x${all_targets} = xtrue; then
6583
6584 # We want all 64-bit targets if we either:
6585 # - run on a 64-bit host or
6586 # - already require 64-bit support for some other target or
6587 # - the --enable-64-bit-bfd option was supplied
6588 # Otherwise we only support all 32-bit targets.
6589 #
6590 # NOTE: This test must be in sync with the corresponding
6591 # tests in BFD!
20e95c23 6592
783e057b 6593 if test x${want64} = xfalse; then
81ecdfbb
RW
6594 # The cast to long int works around a bug in the HP C Compiler
6595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6597# This bug is HP SR number 8606223364.
6598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6599$as_echo_n "checking size of long... " >&6; }
6600if test "${ac_cv_sizeof_long+set}" = set; then :
6601 $as_echo_n "(cached) " >&6
c0993dbe 6602else
81ecdfbb 6603 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6604
81ecdfbb
RW
6605else
6606 if test "$ac_cv_type_long" = yes; then
6607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6609{ as_fn_set_status 77
6610as_fn_error "cannot compute sizeof (long)
6611See \`config.log' for more details." "$LINENO" 5; }; }
6612 else
6613 ac_cv_sizeof_long=0
6614 fi
c0993dbe 6615fi
81ecdfbb 6616
c0993dbe 6617fi
81ecdfbb
RW
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6619$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6620
c0993dbe 6621
c0993dbe 6622
c0993dbe
UW
6623cat >>confdefs.h <<_ACEOF
6624#define SIZEOF_LONG $ac_cv_sizeof_long
6625_ACEOF
6626
6627
6628 if test "x${ac_cv_sizeof_long}" = "x8"; then
6629 want64=true
6630 fi
6631 fi
6632 if test x${want64} = xtrue; then
6633 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6634 else
6635 TARGET_OBS='$(ALL_TARGET_OBS)'
6636 fi
6637fi
6638
6639
6640
b292c783 6641
c0993dbe
UW
6642# For other settings, only the main target counts.
6643gdb_sim=
6644gdb_osabi=
6645build_gdbserver=
6646targ=$target; . ${srcdir}/configure.tgt
6647
6648# Fetch the default architecture and default target vector from BFD.
6649targ=$target; . $srcdir/../bfd/config.bfd
6650
6651# We only want the first architecture, so strip off the others if
6652# there is more than one.
6653targ_archs=`echo $targ_archs | sed 's/ .*//'`
6654
6655if test "x$targ_archs" != x; then
6656
6657cat >>confdefs.h <<_ACEOF
6658#define DEFAULT_BFD_ARCH $targ_archs
6659_ACEOF
6660
6661fi
6662if test "x$targ_defvec" != x; then
6663
6664cat >>confdefs.h <<_ACEOF
6665#define DEFAULT_BFD_VEC $targ_defvec
6666_ACEOF
6667
6668fi
6669
c0993dbe
UW
6670# The CLI cannot be disabled yet, but may be in the future.
6671
6672# Enable CLI.
81ecdfbb
RW
6673# Check whether --enable-gdbcli was given.
6674if test "${enable_gdbcli+set}" = set; then :
6675 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
6676 yes)
6677 ;;
6678 no)
81ecdfbb 6679 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 6680 *)
81ecdfbb 6681 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
6682 esac
6683else
6684 enable_gdbcli=yes
81ecdfbb
RW
6685fi
6686
c0993dbe
UW
6687if test x"$enable_gdbcli" = xyes; then
6688 if test -d $srcdir/cli; then
6689 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6690 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6691 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6692 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6693 fi
6694fi
6695
6696# Enable MI.
81ecdfbb
RW
6697# Check whether --enable-gdbmi was given.
6698if test "${enable_gdbmi+set}" = set; then :
6699 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6700 yes | no)
6701 ;;
6702 *)
81ecdfbb 6703 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6704 esac
6705else
6706 enable_gdbmi=yes
81ecdfbb
RW
6707fi
6708
c0993dbe
UW
6709if test x"$enable_gdbmi" = xyes; then
6710 if test -d $srcdir/mi; then
6711 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6712 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6713 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6714 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6715 fi
6716fi
6717
6718# Enable TUI.
81ecdfbb
RW
6719# Check whether --enable-tui was given.
6720if test "${enable_tui+set}" = set; then :
6721 enableval=$enable_tui; case $enableval in
3ca64bd3 6722 yes | no | auto)
c0993dbe
UW
6723 ;;
6724 *)
81ecdfbb 6725 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6726 esac
6727else
3ca64bd3 6728 enable_tui=auto
81ecdfbb
RW
6729fi
6730
c0993dbe
UW
6731
6732# Enable gdbtk.
81ecdfbb
RW
6733# Check whether --enable-gdbtk was given.
6734if test "${enable_gdbtk+set}" = set; then :
6735 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6736 yes | no)
6737 ;;
6738 *)
81ecdfbb 6739 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6740 esac
6741else
5062cc19 6742 if test -d $srcdir/gdbtk; then
c0993dbe
UW
6743 enable_gdbtk=yes
6744 else
6745 enable_gdbtk=no
6746 fi
81ecdfbb
RW
6747fi
6748
c0993dbe
UW
6749# We unconditionally disable gdbtk tests on selected platforms.
6750case $host_os in
6751 go32* | windows*)
81ecdfbb
RW
6752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6753$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6754 enable_gdbtk=no ;;
6755esac
6756
05e7c244 6757# Libunwind support for ia64.
bec39cab 6758
05e7c244
JK
6759
6760# Check whether --with-libunwind-ia64 was given.
6761if test "${with_libunwind_ia64+set}" = set; then :
6762 withval=$with_libunwind_ia64;
bec39cab 6763else
05e7c244
JK
6764 with_libunwind_ia64=auto
6765fi
bec39cab 6766
05e7c244
JK
6767
6768# Backward compatibility option.
6769if test "${with_libunwind+set}" = set; then
6770 if test x"$with_libunwind_ia64" != xauto; then
6771 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6772 fi
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6774$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6775 with_libunwind_ia64="$with_libunwind"
6776fi
6777
6778case "$with_libunwind_ia64" in
6779 yes | no)
6780 ;;
6781 auto)
6782 for ac_header in libunwind-ia64.h
81ecdfbb 6783do :
b54a8fd7
PA
6784 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6785if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6786 cat >>confdefs.h <<_ACEOF
b54a8fd7 6787#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6788_ACEOF
6789
6790fi
6791
6792done
6793
05e7c244
JK
6794 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6795 ;;
6796 *)
6797 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6798 ;;
6799esac
bec39cab 6800
05e7c244 6801if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 6802 for ac_header in libunwind-ia64.h
81ecdfbb 6803do :
b54a8fd7
PA
6804 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6805if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 6806 cat >>confdefs.h <<_ACEOF
b54a8fd7 6807#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
6808_ACEOF
6809
6810fi
6811
6812done
6813
05e7c244
JK
6814 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6815 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6816 fi
6817 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6818 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6819 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
6820fi
6821
cb01cfba
JB
6822opt_curses=no
6823
81ecdfbb
RW
6824# Check whether --with-curses was given.
6825if test "${with_curses+set}" = set; then :
6826 withval=$with_curses; opt_curses=$withval
6827fi
6828
cb01cfba 6829
76a39ba7 6830prefer_curses=no
cb01cfba 6831if test "$opt_curses" = "yes"; then
76a39ba7 6832 prefer_curses=yes
cb01cfba
JB
6833fi
6834
a9322a30 6835# Profiling support.
81ecdfbb
RW
6836# Check whether --enable-profiling was given.
6837if test "${enable_profiling+set}" = set; then :
6838 enableval=$enable_profiling; case $enableval in
a9322a30
TT
6839 yes | no)
6840 ;;
6841 *)
81ecdfbb 6842 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
6843 esac
6844else
6845 enable_profiling=no
81ecdfbb 6846fi
bec39cab 6847
a9322a30
TT
6848
6849for ac_func in monstartup _mcleanup
81ecdfbb
RW
6850do :
6851 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6852ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6853eval as_val=\$$as_ac_var
6854 if test "x$as_val" = x""yes; then :
6855 cat >>confdefs.h <<_ACEOF
6856#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 6857_ACEOF
a9322a30 6858
81ecdfbb
RW
6859fi
6860done
a9322a30 6861
81ecdfbb
RW
6862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6863$as_echo_n "checking for _etext... " >&6; }
6864if test "${ac_cv_var__etext+set}" = set; then :
6865 $as_echo_n "(cached) " >&6
6866else
6867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6868/* end confdefs.h. */
6869#include <stdlib.h>
6870extern char _etext;
a9322a30
TT
6871
6872int
6873main ()
6874{
6875free (&_etext);
6876 ;
6877 return 0;
6878}
bec39cab 6879_ACEOF
81ecdfbb 6880if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6881 ac_cv_var__etext=yes
bec39cab 6882else
81ecdfbb 6883 ac_cv_var__etext=no
bec39cab 6884fi
81ecdfbb
RW
6885rm -f core conftest.err conftest.$ac_objext \
6886 conftest$ac_exeext conftest.$ac_ext
bec39cab 6887fi
81ecdfbb
RW
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6889$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 6890if test $ac_cv_var__etext = yes; then
60ca704f 6891
81ecdfbb 6892$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 6893
bec39cab 6894fi
81ecdfbb
RW
6895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6896$as_echo_n "checking for etext... " >&6; }
6897if test "${ac_cv_var_etext+set}" = set; then :
6898 $as_echo_n "(cached) " >&6
bec39cab 6899else
81ecdfbb 6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6901/* end confdefs.h. */
a9322a30
TT
6902#include <stdlib.h>
6903extern char etext;
bec39cab
AC
6904
6905int
6906main ()
6907{
a9322a30 6908free (&etext);
bec39cab
AC
6909 ;
6910 return 0;
6911}
6912_ACEOF
81ecdfbb 6913if ac_fn_c_try_link "$LINENO"; then :
a9322a30 6914 ac_cv_var_etext=yes
bec39cab 6915else
81ecdfbb 6916 ac_cv_var_etext=no
bec39cab 6917fi
81ecdfbb
RW
6918rm -f core conftest.err conftest.$ac_objext \
6919 conftest$ac_exeext conftest.$ac_ext
bec39cab 6920fi
81ecdfbb
RW
6921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6922$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
6923if test $ac_cv_var_etext = yes; then
6924
81ecdfbb 6925$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
6926
6927fi
a9322a30
TT
6928if test "$enable_profiling" = yes ; then
6929 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 6930 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
6931 fi
6932 PROFILE_CFLAGS=-pg
6933 OLD_CFLAGS="$CFLAGS"
6934 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 6935
81ecdfbb
RW
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
6937$as_echo_n "checking whether $CC supports -pg... " >&6; }
6938if test "${ac_cv_cc_supports_pg+set}" = set; then :
6939 $as_echo_n "(cached) " >&6
bec39cab 6940else
81ecdfbb 6941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6942/* end confdefs.h. */
bec39cab
AC
6943
6944int
6945main ()
6946{
a9322a30 6947int x;
bec39cab
AC
6948 ;
6949 return 0;
6950}
6951_ACEOF
81ecdfbb 6952if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 6953 ac_cv_cc_supports_pg=yes
bec39cab 6954else
81ecdfbb 6955 ac_cv_cc_supports_pg=no
bec39cab 6956fi
81ecdfbb 6957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 6958fi
81ecdfbb
RW
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
6960$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 6961
a9322a30 6962 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 6963 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 6964 fi
bec39cab 6965
a9322a30 6966 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
6967fi
6968
c16158bc
JM
6969
6970
81ecdfbb
RW
6971# Check whether --with-pkgversion was given.
6972if test "${with_pkgversion+set}" = set; then :
6973 withval=$with_pkgversion; case "$withval" in
6974 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
6975 no) PKGVERSION= ;;
6976 *) PKGVERSION="($withval) " ;;
6977 esac
6978else
6979 PKGVERSION="(GDB) "
6980
81ecdfbb 6981fi
c16158bc
JM
6982
6983
6984
6985
81ecdfbb
RW
6986
6987# Check whether --with-bugurl was given.
6988if test "${with_bugurl+set}" = set; then :
6989 withval=$with_bugurl; case "$withval" in
6990 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
6991 no) BUGURL=
6992 ;;
6993 *) BUGURL="$withval"
6994 ;;
6995 esac
6996else
6997 BUGURL="http://www.gnu.org/software/gdb/bugs/"
6998
81ecdfbb
RW
6999fi
7000
c16158bc
JM
7001 case ${BUGURL} in
7002 "")
7003 REPORT_BUGS_TO=
7004 REPORT_BUGS_TEXI=
7005 ;;
7006 *)
7007 REPORT_BUGS_TO="<$BUGURL>"
7008 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7009 ;;
7010 esac;
7011
7012
7013
7014
7015cat >>confdefs.h <<_ACEOF
7016#define PKGVERSION "$PKGVERSION"
7017_ACEOF
7018
7019
7020cat >>confdefs.h <<_ACEOF
7021#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7022_ACEOF
7023
7024
bec39cab
AC
7025# --------------------- #
7026# Checks for programs. #
7027# --------------------- #
7028
7029for ac_prog in gawk mawk nawk awk
7030do
7031 # Extract the first word of "$ac_prog", so it can be a program name with args.
7032set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7034$as_echo_n "checking for $ac_word... " >&6; }
7035if test "${ac_cv_prog_AWK+set}" = set; then :
7036 $as_echo_n "(cached) " >&6
bec39cab
AC
7037else
7038 if test -n "$AWK"; then
7039 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7040else
7041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7042for as_dir in $PATH
7043do
7044 IFS=$as_save_IFS
7045 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7046 for ac_exec_ext in '' $ac_executable_extensions; do
7047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7048 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7050 break 2
7051 fi
7052done
81ecdfbb
RW
7053 done
7054IFS=$as_save_IFS
bec39cab
AC
7055
7056fi
7057fi
7058AWK=$ac_cv_prog_AWK
7059if test -n "$AWK"; then
81ecdfbb
RW
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7061$as_echo "$AWK" >&6; }
bec39cab 7062else
81ecdfbb
RW
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7064$as_echo "no" >&6; }
bec39cab
AC
7065fi
7066
bec39cab 7067
81ecdfbb 7068 test -n "$AWK" && break
bec39cab
AC
7069done
7070
c971b7fa
PA
7071# Find a good install program. We prefer a C program (faster),
7072# so one script is as good as another. But avoid the broken or
7073# incompatible versions:
7074# SysV /etc/install, /usr/sbin/install
7075# SunOS /usr/etc/install
7076# IRIX /sbin/install
7077# AIX /bin/install
7078# AmigaOS /C/install, which installs bootblocks on floppy discs
7079# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7080# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7081# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7082# OS/2's system install, which has a completely different semantic
7083# ./install, which can be erroneously created by make from ./install.sh.
7084# Reject install programs that cannot install multiple files.
7085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7086$as_echo_n "checking for a BSD-compatible install... " >&6; }
7087if test -z "$INSTALL"; then
7088if test "${ac_cv_path_install+set}" = set; then :
7089 $as_echo_n "(cached) " >&6
7090else
7091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7092for as_dir in $PATH
7093do
7094 IFS=$as_save_IFS
7095 test -z "$as_dir" && as_dir=.
7096 # Account for people who put trailing slashes in PATH elements.
7097case $as_dir/ in #((
7098 ./ | .// | /[cC]/* | \
7099 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7100 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7101 /usr/ucb/* ) ;;
7102 *)
7103 # OSF1 and SCO ODT 3.0 have their own names for install.
7104 # Don't use installbsd from OSF since it installs stuff as root
7105 # by default.
7106 for ac_prog in ginstall scoinst install; do
7107 for ac_exec_ext in '' $ac_executable_extensions; do
7108 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
7109 if test $ac_prog = install &&
7110 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7111 # AIX install. It has an incompatible calling convention.
7112 :
7113 elif test $ac_prog = install &&
7114 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7115 # program-specific install script used by HP pwplus--don't use.
7116 :
7117 else
7118 rm -rf conftest.one conftest.two conftest.dir
7119 echo one > conftest.one
7120 echo two > conftest.two
7121 mkdir conftest.dir
7122 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7123 test -s conftest.one && test -s conftest.two &&
7124 test -s conftest.dir/conftest.one &&
7125 test -s conftest.dir/conftest.two
7126 then
7127 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7128 break 3
7129 fi
7130 fi
7131 fi
7132 done
7133 done
7134 ;;
7135esac
7136
7137 done
7138IFS=$as_save_IFS
7139
7140rm -rf conftest.one conftest.two conftest.dir
7141
7142fi
7143 if test "${ac_cv_path_install+set}" = set; then
7144 INSTALL=$ac_cv_path_install
7145 else
7146 # As a last resort, use the slow shell script. Don't cache a
7147 # value for INSTALL within a source directory, because that will
7148 # break other packages using the cache if that directory is
7149 # removed, or if the value is a relative name.
7150 INSTALL=$ac_install_sh
7151 fi
7152fi
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7154$as_echo "$INSTALL" >&6; }
7155
7156# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7157# It thinks the first close brace ends the variable substitution.
7158test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7159
7160test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7161
7162test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7163
81ecdfbb
RW
7164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7165$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7166LN_S=$as_ln_s
7167if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7169$as_echo "yes" >&6; }
bec39cab 7170else
81ecdfbb
RW
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7172$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7173fi
7174
7175if test -n "$ac_tool_prefix"; then
7176 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7177set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7179$as_echo_n "checking for $ac_word... " >&6; }
7180if test "${ac_cv_prog_RANLIB+set}" = set; then :
7181 $as_echo_n "(cached) " >&6
bec39cab
AC
7182else
7183 if test -n "$RANLIB"; then
7184 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7185else
7186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7187for as_dir in $PATH
7188do
7189 IFS=$as_save_IFS
7190 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7191 for ac_exec_ext in '' $ac_executable_extensions; do
7192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7193 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7195 break 2
7196 fi
7197done
81ecdfbb
RW
7198 done
7199IFS=$as_save_IFS
bec39cab
AC
7200
7201fi
7202fi
7203RANLIB=$ac_cv_prog_RANLIB
7204if test -n "$RANLIB"; then
81ecdfbb
RW
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7206$as_echo "$RANLIB" >&6; }
bec39cab 7207else
81ecdfbb
RW
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7209$as_echo "no" >&6; }
bec39cab
AC
7210fi
7211
81ecdfbb 7212
bec39cab
AC
7213fi
7214if test -z "$ac_cv_prog_RANLIB"; then
7215 ac_ct_RANLIB=$RANLIB
7216 # Extract the first word of "ranlib", so it can be a program name with args.
7217set dummy ranlib; ac_word=$2
81ecdfbb
RW
7218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7219$as_echo_n "checking for $ac_word... " >&6; }
7220if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
7221 $as_echo_n "(cached) " >&6
bec39cab
AC
7222else
7223 if test -n "$ac_ct_RANLIB"; then
7224 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7225else
7226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227for as_dir in $PATH
7228do
7229 IFS=$as_save_IFS
7230 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7231 for ac_exec_ext in '' $ac_executable_extensions; do
7232 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7233 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7235 break 2
7236 fi
7237done
81ecdfbb
RW
7238 done
7239IFS=$as_save_IFS
bec39cab 7240
bec39cab
AC
7241fi
7242fi
7243ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7244if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7246$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7247else
81ecdfbb
RW
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7249$as_echo "no" >&6; }
bec39cab
AC
7250fi
7251
81ecdfbb
RW
7252 if test "x$ac_ct_RANLIB" = x; then
7253 RANLIB=":"
7254 else
7255 case $cross_compiling:$ac_tool_warned in
7256yes:)
7257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7259ac_tool_warned=yes ;;
7260esac
7261 RANLIB=$ac_ct_RANLIB
7262 fi
bec39cab
AC
7263else
7264 RANLIB="$ac_cv_prog_RANLIB"
7265fi
7266
7267for ac_prog in 'bison -y' byacc
7268do
7269 # Extract the first word of "$ac_prog", so it can be a program name with args.
7270set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7272$as_echo_n "checking for $ac_word... " >&6; }
7273if test "${ac_cv_prog_YACC+set}" = set; then :
7274 $as_echo_n "(cached) " >&6
bec39cab
AC
7275else
7276 if test -n "$YACC"; then
7277 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7278else
7279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7280for as_dir in $PATH
7281do
7282 IFS=$as_save_IFS
7283 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7284 for ac_exec_ext in '' $ac_executable_extensions; do
7285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7286 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7288 break 2
7289 fi
7290done
81ecdfbb
RW
7291 done
7292IFS=$as_save_IFS
bec39cab
AC
7293
7294fi
7295fi
7296YACC=$ac_cv_prog_YACC
7297if test -n "$YACC"; then
81ecdfbb
RW
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7299$as_echo "$YACC" >&6; }
bec39cab 7300else
81ecdfbb
RW
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7302$as_echo "no" >&6; }
bec39cab
AC
7303fi
7304
81ecdfbb 7305
bec39cab
AC
7306 test -n "$YACC" && break
7307done
7308test -n "$YACC" || YACC="yacc"
7309
7310
7311if test -n "$ac_tool_prefix"; then
7312 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7313set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7315$as_echo_n "checking for $ac_word... " >&6; }
7316if test "${ac_cv_prog_AR+set}" = set; then :
7317 $as_echo_n "(cached) " >&6
bec39cab
AC
7318else
7319 if test -n "$AR"; then
7320 ac_cv_prog_AR="$AR" # Let the user override the test.
7321else
7322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7323for as_dir in $PATH
7324do
7325 IFS=$as_save_IFS
7326 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7327 for ac_exec_ext in '' $ac_executable_extensions; do
7328 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7329 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7331 break 2
7332 fi
7333done
81ecdfbb
RW
7334 done
7335IFS=$as_save_IFS
bec39cab
AC
7336
7337fi
7338fi
7339AR=$ac_cv_prog_AR
7340if test -n "$AR"; then
81ecdfbb
RW
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7342$as_echo "$AR" >&6; }
bec39cab 7343else
81ecdfbb
RW
7344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7345$as_echo "no" >&6; }
bec39cab
AC
7346fi
7347
81ecdfbb 7348
bec39cab
AC
7349fi
7350if test -z "$ac_cv_prog_AR"; then
7351 ac_ct_AR=$AR
7352 # Extract the first word of "ar", so it can be a program name with args.
7353set dummy ar; ac_word=$2
81ecdfbb
RW
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355$as_echo_n "checking for $ac_word... " >&6; }
7356if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7357 $as_echo_n "(cached) " >&6
bec39cab
AC
7358else
7359 if test -n "$ac_ct_AR"; then
7360 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7361else
7362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7363for as_dir in $PATH
7364do
7365 IFS=$as_save_IFS
7366 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7367 for ac_exec_ext in '' $ac_executable_extensions; do
7368 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7369 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7371 break 2
7372 fi
7373done
81ecdfbb
RW
7374 done
7375IFS=$as_save_IFS
bec39cab
AC
7376
7377fi
7378fi
7379ac_ct_AR=$ac_cv_prog_ac_ct_AR
7380if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7382$as_echo "$ac_ct_AR" >&6; }
bec39cab 7383else
81ecdfbb
RW
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7385$as_echo "no" >&6; }
bec39cab
AC
7386fi
7387
81ecdfbb
RW
7388 if test "x$ac_ct_AR" = x; then
7389 AR=""
7390 else
7391 case $cross_compiling:$ac_tool_warned in
7392yes:)
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7394$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7395ac_tool_warned=yes ;;
7396esac
7397 AR=$ac_ct_AR
7398 fi
bec39cab
AC
7399else
7400 AR="$ac_cv_prog_AR"
7401fi
7402
7403if test -n "$ac_tool_prefix"; then
7404 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7405set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7407$as_echo_n "checking for $ac_word... " >&6; }
7408if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7409 $as_echo_n "(cached) " >&6
bec39cab
AC
7410else
7411 if test -n "$DLLTOOL"; then
7412 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7413else
7414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7415for as_dir in $PATH
7416do
7417 IFS=$as_save_IFS
7418 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7419 for ac_exec_ext in '' $ac_executable_extensions; do
7420 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7421 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7423 break 2
7424 fi
7425done
81ecdfbb
RW
7426 done
7427IFS=$as_save_IFS
bec39cab
AC
7428
7429fi
7430fi
7431DLLTOOL=$ac_cv_prog_DLLTOOL
7432if test -n "$DLLTOOL"; then
81ecdfbb
RW
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7434$as_echo "$DLLTOOL" >&6; }
bec39cab 7435else
81ecdfbb
RW
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
bec39cab
AC
7438fi
7439
81ecdfbb 7440
bec39cab
AC
7441fi
7442if test -z "$ac_cv_prog_DLLTOOL"; then
7443 ac_ct_DLLTOOL=$DLLTOOL
7444 # Extract the first word of "dlltool", so it can be a program name with args.
7445set dummy dlltool; ac_word=$2
81ecdfbb
RW
7446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7447$as_echo_n "checking for $ac_word... " >&6; }
7448if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7449 $as_echo_n "(cached) " >&6
bec39cab
AC
7450else
7451 if test -n "$ac_ct_DLLTOOL"; then
7452 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7453else
7454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7455for as_dir in $PATH
7456do
7457 IFS=$as_save_IFS
7458 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7459 for ac_exec_ext in '' $ac_executable_extensions; do
7460 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7461 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7463 break 2
7464 fi
7465done
81ecdfbb
RW
7466 done
7467IFS=$as_save_IFS
bec39cab
AC
7468
7469fi
7470fi
7471ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7472if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7474$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7475else
81ecdfbb
RW
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7477$as_echo "no" >&6; }
bec39cab
AC
7478fi
7479
81ecdfbb
RW
7480 if test "x$ac_ct_DLLTOOL" = x; then
7481 DLLTOOL=""
7482 else
7483 case $cross_compiling:$ac_tool_warned in
7484yes:)
7485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7487ac_tool_warned=yes ;;
7488esac
7489 DLLTOOL=$ac_ct_DLLTOOL
7490 fi
bec39cab
AC
7491else
7492 DLLTOOL="$ac_cv_prog_DLLTOOL"
7493fi
7494
7495if test -n "$ac_tool_prefix"; then
7496 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7497set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7499$as_echo_n "checking for $ac_word... " >&6; }
7500if test "${ac_cv_prog_WINDRES+set}" = set; then :
7501 $as_echo_n "(cached) " >&6
bec39cab
AC
7502else
7503 if test -n "$WINDRES"; then
7504 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7505else
7506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7507for as_dir in $PATH
7508do
7509 IFS=$as_save_IFS
7510 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7511 for ac_exec_ext in '' $ac_executable_extensions; do
7512 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7513 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7514 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7515 break 2
7516 fi
7517done
81ecdfbb
RW
7518 done
7519IFS=$as_save_IFS
bec39cab
AC
7520
7521fi
7522fi
7523WINDRES=$ac_cv_prog_WINDRES
7524if test -n "$WINDRES"; then
81ecdfbb
RW
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7526$as_echo "$WINDRES" >&6; }
bec39cab 7527else
81ecdfbb
RW
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7529$as_echo "no" >&6; }
bec39cab
AC
7530fi
7531
81ecdfbb 7532
bec39cab
AC
7533fi
7534if test -z "$ac_cv_prog_WINDRES"; then
7535 ac_ct_WINDRES=$WINDRES
7536 # Extract the first word of "windres", so it can be a program name with args.
7537set dummy windres; ac_word=$2
81ecdfbb
RW
7538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539$as_echo_n "checking for $ac_word... " >&6; }
7540if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
7541 $as_echo_n "(cached) " >&6
bec39cab
AC
7542else
7543 if test -n "$ac_ct_WINDRES"; then
7544 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7545else
7546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549 IFS=$as_save_IFS
7550 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7551 for ac_exec_ext in '' $ac_executable_extensions; do
7552 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7553 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7555 break 2
7556 fi
7557done
81ecdfbb
RW
7558 done
7559IFS=$as_save_IFS
bec39cab
AC
7560
7561fi
7562fi
7563ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7564if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7566$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7567else
81ecdfbb
RW
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569$as_echo "no" >&6; }
c906108c 7570fi
bec39cab 7571
81ecdfbb
RW
7572 if test "x$ac_ct_WINDRES" = x; then
7573 WINDRES=""
7574 else
7575 case $cross_compiling:$ac_tool_warned in
7576yes:)
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7578$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7579ac_tool_warned=yes ;;
7580esac
7581 WINDRES=$ac_ct_WINDRES
7582 fi
c906108c 7583else
bec39cab 7584 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7585fi
7586
bec39cab 7587
036c3acb
TS
7588case $host_os in
7589 gnu*)
7590 # Needed for GNU Hurd hosts.
7591 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7592 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7593set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7595$as_echo_n "checking for $ac_word... " >&6; }
7596if test "${ac_cv_prog_MIG+set}" = set; then :
7597 $as_echo_n "(cached) " >&6
c906108c 7598else
bec39cab
AC
7599 if test -n "$MIG"; then
7600 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7601else
7602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603for as_dir in $PATH
7604do
7605 IFS=$as_save_IFS
7606 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7607 for ac_exec_ext in '' $ac_executable_extensions; do
7608 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7609 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7611 break 2
7612 fi
7613done
81ecdfbb
RW
7614 done
7615IFS=$as_save_IFS
bec39cab 7616
c906108c 7617fi
bec39cab
AC
7618fi
7619MIG=$ac_cv_prog_MIG
7620if test -n "$MIG"; then
81ecdfbb
RW
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7622$as_echo "$MIG" >&6; }
c906108c 7623else
81ecdfbb
RW
7624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7625$as_echo "no" >&6; }
c906108c
SS
7626fi
7627
81ecdfbb 7628
bec39cab
AC
7629fi
7630if test -z "$ac_cv_prog_MIG"; then
7631 ac_ct_MIG=$MIG
7632 # Extract the first word of "mig", so it can be a program name with args.
7633set dummy mig; ac_word=$2
81ecdfbb
RW
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7635$as_echo_n "checking for $ac_word... " >&6; }
7636if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
7637 $as_echo_n "(cached) " >&6
bec39cab
AC
7638else
7639 if test -n "$ac_ct_MIG"; then
7640 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7641else
7642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7643for as_dir in $PATH
7644do
7645 IFS=$as_save_IFS
7646 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
7647 for ac_exec_ext in '' $ac_executable_extensions; do
7648 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 7649 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7651 break 2
7652 fi
7653done
81ecdfbb
RW
7654 done
7655IFS=$as_save_IFS
c906108c 7656
bec39cab
AC
7657fi
7658fi
7659ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7660if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7662$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7663else
81ecdfbb
RW
7664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665$as_echo "no" >&6; }
bec39cab 7666fi
c906108c 7667
81ecdfbb
RW
7668 if test "x$ac_ct_MIG" = x; then
7669 MIG=""
7670 else
7671 case $cross_compiling:$ac_tool_warned in
7672yes:)
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7675ac_tool_warned=yes ;;
7676esac
7677 MIG=$ac_ct_MIG
7678 fi
bec39cab
AC
7679else
7680 MIG="$ac_cv_prog_MIG"
7681fi
c906108c 7682
036c3acb
TS
7683 if test x"$MIG" = x; then
7684 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
7685 fi
7686 ;;
7687esac
c906108c 7688
bec39cab
AC
7689# ---------------------- #
7690# Checks for libraries. #
7691# ---------------------- #
c906108c 7692
bec39cab 7693# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7695$as_echo_n "checking for main in -lm... " >&6; }
7696if test "${ac_cv_lib_m_main+set}" = set; then :
7697 $as_echo_n "(cached) " >&6
bec39cab
AC
7698else
7699 ac_check_lib_save_LIBS=$LIBS
7700LIBS="-lm $LIBS"
81ecdfbb 7701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7702/* end confdefs.h. */
c906108c 7703
c906108c 7704
bec39cab
AC
7705int
7706main ()
7707{
81ecdfbb 7708return main ();
bec39cab
AC
7709 ;
7710 return 0;
7711}
7712_ACEOF
81ecdfbb 7713if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
7714 ac_cv_lib_m_main=yes
7715else
81ecdfbb 7716 ac_cv_lib_m_main=no
bec39cab 7717fi
81ecdfbb
RW
7718rm -f core conftest.err conftest.$ac_objext \
7719 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
7720LIBS=$ac_check_lib_save_LIBS
7721fi
81ecdfbb
RW
7722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7723$as_echo "$ac_cv_lib_m_main" >&6; }
7724if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
7725 cat >>confdefs.h <<_ACEOF
7726#define HAVE_LIBM 1
7727_ACEOF
7728
7729 LIBS="-lm $LIBS"
c906108c 7730
c906108c 7731fi
bec39cab
AC
7732
7733
bec39cab 7734# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
7735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7736$as_echo_n "checking for library containing gethostbyname... " >&6; }
7737if test "${ac_cv_search_gethostbyname+set}" = set; then :
7738 $as_echo_n "(cached) " >&6
bec39cab
AC
7739else
7740 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7742/* end confdefs.h. */
ddc9cd0f 7743
81ecdfbb
RW
7744/* Override any GCC internal prototype to avoid an error.
7745 Use char because int might match the return type of a GCC
7746 builtin and then its argument prototype would still apply. */
bec39cab
AC
7747#ifdef __cplusplus
7748extern "C"
7749#endif
bec39cab
AC
7750char gethostbyname ();
7751int
7752main ()
7753{
81ecdfbb 7754return gethostbyname ();
bec39cab
AC
7755 ;
7756 return 0;
7757}
7758_ACEOF
81ecdfbb
RW
7759for ac_lib in '' nsl; do
7760 if test -z "$ac_lib"; then
7761 ac_res="none required"
7762 else
7763 ac_res=-l$ac_lib
b4e70030 7764 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7765 fi
7766 if ac_fn_c_try_link "$LINENO"; then :
7767 ac_cv_search_gethostbyname=$ac_res
7768fi
7769rm -f core conftest.err conftest.$ac_objext \
7770 conftest$ac_exeext
7771 if test "${ac_cv_search_gethostbyname+set}" = set; then :
7772 break
7773fi
7774done
7775if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 7776
bec39cab 7777else
81ecdfbb 7778 ac_cv_search_gethostbyname=no
bec39cab 7779fi
81ecdfbb 7780rm conftest.$ac_ext
bec39cab
AC
7781LIBS=$ac_func_search_save_LIBS
7782fi
81ecdfbb
RW
7783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7784$as_echo "$ac_cv_search_gethostbyname" >&6; }
7785ac_res=$ac_cv_search_gethostbyname
7786if test "$ac_res" != no; then :
7787 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 7788
bec39cab 7789fi
96baa820 7790
c906108c 7791
b4e70030 7792# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7794$as_echo_n "checking for library containing socketpair... " >&6; }
7795if test "${ac_cv_search_socketpair+set}" = set; then :
7796 $as_echo_n "(cached) " >&6
b4e70030
JB
7797else
7798 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
7800/* end confdefs.h. */
7801
81ecdfbb
RW
7802/* Override any GCC internal prototype to avoid an error.
7803 Use char because int might match the return type of a GCC
7804 builtin and then its argument prototype would still apply. */
b4e70030
JB
7805#ifdef __cplusplus
7806extern "C"
7807#endif
b4e70030
JB
7808char socketpair ();
7809int
7810main ()
7811{
81ecdfbb 7812return socketpair ();
b4e70030
JB
7813 ;
7814 return 0;
7815}
7816_ACEOF
81ecdfbb
RW
7817for ac_lib in '' socket; do
7818 if test -z "$ac_lib"; then
7819 ac_res="none required"
7820 else
7821 ac_res=-l$ac_lib
b4e70030 7822 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7823 fi
7824 if ac_fn_c_try_link "$LINENO"; then :
7825 ac_cv_search_socketpair=$ac_res
7826fi
7827rm -f core conftest.err conftest.$ac_objext \
7828 conftest$ac_exeext
7829 if test "${ac_cv_search_socketpair+set}" = set; then :
7830 break
7831fi
7832done
7833if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 7834
b4e70030 7835else
81ecdfbb 7836 ac_cv_search_socketpair=no
b4e70030 7837fi
81ecdfbb 7838rm conftest.$ac_ext
b4e70030
JB
7839LIBS=$ac_func_search_save_LIBS
7840fi
81ecdfbb
RW
7841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7842$as_echo "$ac_cv_search_socketpair" >&6; }
7843ac_res=$ac_cv_search_socketpair
7844if test "$ac_res" != no; then :
7845 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
7846
7847fi
7848
7849
233a11ab 7850# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 7851
711a72d3 7852 # Use the system's zlib library.
39f3de7c
L
7853 zlibdir="-L\$(top_builddir)/../zlib"
7854 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 7855
711a72d3
L
7856# Check whether --with-system-zlib was given.
7857if test "${with_system_zlib+set}" = set; then :
afa59b79
L
7858 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7859 zlibdir=
7860 zlibinc=
7861 fi
b040ad30 7862
233a11ab 7863fi
233a11ab 7864
233a11ab 7865
233a11ab 7866
b040ad30 7867
233a11ab 7868
25268153 7869# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
37773e78 7870# On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
25268153
JB
7871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7872$as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7873if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7874 $as_echo_n "(cached) " >&6
7875else
7876 ac_func_search_save_LIBS=$LIBS
7877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7878/* end confdefs.h. */
7879
7880/* Override any GCC internal prototype to avoid an error.
7881 Use char because int might match the return type of a GCC
7882 builtin and then its argument prototype would still apply. */
7883#ifdef __cplusplus
7884extern "C"
7885#endif
7886char kinfo_getvmmap ();
7887int
7888main ()
7889{
7890return kinfo_getvmmap ();
7891 ;
7892 return 0;
7893}
7894_ACEOF
37773e78 7895for ac_lib in '' util util-freebsd; do
25268153
JB
7896 if test -z "$ac_lib"; then
7897 ac_res="none required"
7898 else
7899 ac_res=-l$ac_lib
7900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7901 fi
7902 if ac_fn_c_try_link "$LINENO"; then :
7903 ac_cv_search_kinfo_getvmmap=$ac_res
7904fi
7905rm -f core conftest.err conftest.$ac_objext \
7906 conftest$ac_exeext
7907 if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7908 break
7909fi
7910done
7911if test "${ac_cv_search_kinfo_getvmmap+set}" = set; then :
7912
7913else
7914 ac_cv_search_kinfo_getvmmap=no
7915fi
7916rm conftest.$ac_ext
7917LIBS=$ac_func_search_save_LIBS
7918fi
7919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7920$as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7921ac_res=$ac_cv_search_kinfo_getvmmap
7922if test "$ac_res" != no; then :
7923 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7924
7925$as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7926
7927fi
7928
7929
92fce24d
JB
7930# fbsd-nat.c can also use kinfo_getfile.
7931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
7932$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
7933if test "${ac_cv_search_kinfo_getfile+set}" = set; then :
7934 $as_echo_n "(cached) " >&6
7935else
7936 ac_func_search_save_LIBS=$LIBS
7937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7938/* end confdefs.h. */
7939
7940/* Override any GCC internal prototype to avoid an error.
7941 Use char because int might match the return type of a GCC
7942 builtin and then its argument prototype would still apply. */
7943#ifdef __cplusplus
7944extern "C"
7945#endif
7946char kinfo_getfile ();
7947int
7948main ()
7949{
7950return kinfo_getfile ();
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955for ac_lib in '' util util-freebsd; do
7956 if test -z "$ac_lib"; then
7957 ac_res="none required"
7958 else
7959 ac_res=-l$ac_lib
7960 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7961 fi
7962 if ac_fn_c_try_link "$LINENO"; then :
7963 ac_cv_search_kinfo_getfile=$ac_res
7964fi
7965rm -f core conftest.err conftest.$ac_objext \
7966 conftest$ac_exeext
7967 if test "${ac_cv_search_kinfo_getfile+set}" = set; then :
7968 break
7969fi
7970done
7971if test "${ac_cv_search_kinfo_getfile+set}" = set; then :
7972
7973else
7974 ac_cv_search_kinfo_getfile=no
7975fi
7976rm conftest.$ac_ext
7977LIBS=$ac_func_search_save_LIBS
7978fi
7979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
7980$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
7981ac_res=$ac_cv_search_kinfo_getfile
7982if test "$ac_res" != no; then :
7983 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7984
7985$as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
7986
7987fi
7988
7989
77f120bf 7990
016a3251
DD
7991 if test "X$prefix" = "XNONE"; then
7992 acl_final_prefix="$ac_default_prefix"
7993 else
7994 acl_final_prefix="$prefix"
7995 fi
7996 if test "X$exec_prefix" = "XNONE"; then
7997 acl_final_exec_prefix='${prefix}'
7998 else
7999 acl_final_exec_prefix="$exec_prefix"
8000 fi
8001 acl_save_prefix="$prefix"
8002 prefix="$acl_final_prefix"
8003 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8004 prefix="$acl_save_prefix"
8005
8006
8007# Check whether --with-gnu-ld was given.
8008if test "${with_gnu_ld+set}" = set; then :
8009 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8010else
8011 with_gnu_ld=no
8012fi
8013
8014# Prepare PATH_SEPARATOR.
8015# The user is always right.
8016if test "${PATH_SEPARATOR+set}" != set; then
8017 echo "#! /bin/sh" >conf$$.sh
8018 echo "exit 0" >>conf$$.sh
8019 chmod +x conf$$.sh
8020 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8021 PATH_SEPARATOR=';'
8022 else
8023 PATH_SEPARATOR=:
8024 fi
8025 rm -f conf$$.sh
8026fi
8027ac_prog=ld
8028if test "$GCC" = yes; then
8029 # Check if gcc -print-prog-name=ld gives a path.
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8031$as_echo_n "checking for ld used by GCC... " >&6; }
8032 case $host in
8033 *-*-mingw*)
8034 # gcc leaves a trailing carriage return which upsets mingw
8035 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8036 *)
8037 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8038 esac
8039 case $ac_prog in
8040 # Accept absolute paths.
8041 [\\/]* | [A-Za-z]:[\\/]*)
8042 re_direlt='/[^/][^/]*/\.\./'
8043 # Canonicalize the path of ld
8044 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8045 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8046 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8047 done
8048 test -z "$LD" && LD="$ac_prog"
8049 ;;
8050 "")
8051 # If it fails, then pretend we aren't using GCC.
8052 ac_prog=ld
8053 ;;
8054 *)
8055 # If it is relative, then search for the first ld in PATH.
8056 with_gnu_ld=unknown
8057 ;;
8058 esac
8059elif test "$with_gnu_ld" = yes; then
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8061$as_echo_n "checking for GNU ld... " >&6; }
8062else
8063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8064$as_echo_n "checking for non-GNU ld... " >&6; }
8065fi
8066if test "${acl_cv_path_LD+set}" = set; then :
8067 $as_echo_n "(cached) " >&6
8068else
8069 if test -z "$LD"; then
8070 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8071 for ac_dir in $PATH; do
8072 test -z "$ac_dir" && ac_dir=.
8073 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8074 acl_cv_path_LD="$ac_dir/$ac_prog"
8075 # Check to see if the program is GNU ld. I'd rather use --version,
8076 # but apparently some GNU ld's only accept -v.
8077 # Break only if it was the GNU/non-GNU ld that we prefer.
8078 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8079 test "$with_gnu_ld" != no && break
8080 else
8081 test "$with_gnu_ld" != yes && break
8082 fi
8083 fi
8084 done
8085 IFS="$ac_save_ifs"
8086else
8087 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8088fi
8089fi
8090
8091LD="$acl_cv_path_LD"
8092if test -n "$LD"; then
8093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8094$as_echo "$LD" >&6; }
8095else
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
8098fi
8099test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
8100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8101$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8102if test "${acl_cv_prog_gnu_ld+set}" = set; then :
8103 $as_echo_n "(cached) " >&6
8104else
8105 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8106if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8107 acl_cv_prog_gnu_ld=yes
8108else
8109 acl_cv_prog_gnu_ld=no
8110fi
8111fi
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8113$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8114with_gnu_ld=$acl_cv_prog_gnu_ld
8115
8116
8117
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8119$as_echo_n "checking for shared library run path origin... " >&6; }
8120if test "${acl_cv_rpath+set}" = set; then :
8121 $as_echo_n "(cached) " >&6
8122else
8123
8124 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8125 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8126 . ./conftest.sh
8127 rm -f ./conftest.sh
8128 acl_cv_rpath=done
8129
8130fi
8131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8132$as_echo "$acl_cv_rpath" >&6; }
8133 wl="$acl_cv_wl"
8134 libext="$acl_cv_libext"
8135 shlibext="$acl_cv_shlibext"
8136 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8137 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8138 hardcode_direct="$acl_cv_hardcode_direct"
8139 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8140 # Check whether --enable-rpath was given.
8141if test "${enable_rpath+set}" = set; then :
8142 enableval=$enable_rpath; :
8143else
8144 enable_rpath=yes
8145fi
8146
8147
8148
8149
8150
8151
8152
8153
8154 use_additional=yes
8155
8156 acl_save_prefix="$prefix"
8157 prefix="$acl_final_prefix"
8158 acl_save_exec_prefix="$exec_prefix"
8159 exec_prefix="$acl_final_exec_prefix"
8160
8161 eval additional_includedir=\"$includedir\"
8162 eval additional_libdir=\"$libdir\"
8163
8164 exec_prefix="$acl_save_exec_prefix"
8165 prefix="$acl_save_prefix"
77f120bf 8166
6c7a06a3 8167
81ecdfbb
RW
8168# Check whether --with-libiconv-prefix was given.
8169if test "${with_libiconv_prefix+set}" = set; then :
8170 withval=$with_libiconv_prefix;
016a3251
DD
8171 if test "X$withval" = "Xno"; then
8172 use_additional=no
8173 else
8174 if test "X$withval" = "X"; then
8175
8176 acl_save_prefix="$prefix"
8177 prefix="$acl_final_prefix"
8178 acl_save_exec_prefix="$exec_prefix"
8179 exec_prefix="$acl_final_exec_prefix"
8180
8181 eval additional_includedir=\"$includedir\"
8182 eval additional_libdir=\"$libdir\"
8183
8184 exec_prefix="$acl_save_exec_prefix"
8185 prefix="$acl_save_prefix"
8186
8187 else
8188 additional_includedir="$withval/include"
8189 additional_libdir="$withval/lib"
8190 fi
8191 fi
6c7a06a3 8192
81ecdfbb
RW
8193fi
8194
016a3251
DD
8195 LIBICONV=
8196 LTLIBICONV=
8197 INCICONV=
8198 rpathdirs=
8199 ltrpathdirs=
8200 names_already_handled=
8201 names_next_round='iconv '
8202 while test -n "$names_next_round"; do
8203 names_this_round="$names_next_round"
8204 names_next_round=
8205 for name in $names_this_round; do
8206 already_handled=
8207 for n in $names_already_handled; do
8208 if test "$n" = "$name"; then
8209 already_handled=yes
8210 break
8211 fi
8212 done
8213 if test -z "$already_handled"; then
8214 names_already_handled="$names_already_handled $name"
8215 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8216 eval value=\"\$HAVE_LIB$uppername\"
8217 if test -n "$value"; then
8218 if test "$value" = yes; then
8219 eval value=\"\$LIB$uppername\"
8220 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8221 eval value=\"\$LTLIB$uppername\"
8222 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8223 else
8224 :
8225 fi
8226 else
8227 found_dir=
8228 found_la=
8229 found_so=
8230 found_a=
8231 if test $use_additional = yes; then
8232 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8233 found_dir="$additional_libdir"
8234 found_so="$additional_libdir/lib$name.$shlibext"
8235 if test -f "$additional_libdir/lib$name.la"; then
8236 found_la="$additional_libdir/lib$name.la"
8237 fi
8238 else
8239 if test -f "$additional_libdir/lib$name.$libext"; then
8240 found_dir="$additional_libdir"
8241 found_a="$additional_libdir/lib$name.$libext"
8242 if test -f "$additional_libdir/lib$name.la"; then
8243 found_la="$additional_libdir/lib$name.la"
8244 fi
8245 fi
8246 fi
8247 fi
8248 if test "X$found_dir" = "X"; then
8249 for x in $LDFLAGS $LTLIBICONV; do
8250
8251 acl_save_prefix="$prefix"
8252 prefix="$acl_final_prefix"
8253 acl_save_exec_prefix="$exec_prefix"
8254 exec_prefix="$acl_final_exec_prefix"
8255 eval x=\"$x\"
8256 exec_prefix="$acl_save_exec_prefix"
8257 prefix="$acl_save_prefix"
8258
8259 case "$x" in
8260 -L*)
8261 dir=`echo "X$x" | sed -e 's/^X-L//'`
8262 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8263 found_dir="$dir"
8264 found_so="$dir/lib$name.$shlibext"
8265 if test -f "$dir/lib$name.la"; then
8266 found_la="$dir/lib$name.la"
8267 fi
8268 else
8269 if test -f "$dir/lib$name.$libext"; then
8270 found_dir="$dir"
8271 found_a="$dir/lib$name.$libext"
8272 if test -f "$dir/lib$name.la"; then
8273 found_la="$dir/lib$name.la"
8274 fi
8275 fi
8276 fi
8277 ;;
8278 esac
8279 if test "X$found_dir" != "X"; then
8280 break
8281 fi
8282 done
8283 fi
8284 if test "X$found_dir" != "X"; then
8285 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8286 if test "X$found_so" != "X"; then
8287 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8288 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8289 else
8290 haveit=
8291 for x in $ltrpathdirs; do
8292 if test "X$x" = "X$found_dir"; then
8293 haveit=yes
8294 break
8295 fi
8296 done
8297 if test -z "$haveit"; then
8298 ltrpathdirs="$ltrpathdirs $found_dir"
8299 fi
8300 if test "$hardcode_direct" = yes; then
8301 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8302 else
8303 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8304 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8305 haveit=
8306 for x in $rpathdirs; do
8307 if test "X$x" = "X$found_dir"; then
8308 haveit=yes
8309 break
8310 fi
8311 done
8312 if test -z "$haveit"; then
8313 rpathdirs="$rpathdirs $found_dir"
8314 fi
8315 else
8316 haveit=
8317 for x in $LDFLAGS $LIBICONV; do
8318
8319 acl_save_prefix="$prefix"
8320 prefix="$acl_final_prefix"
8321 acl_save_exec_prefix="$exec_prefix"
8322 exec_prefix="$acl_final_exec_prefix"
8323 eval x=\"$x\"
8324 exec_prefix="$acl_save_exec_prefix"
8325 prefix="$acl_save_prefix"
8326
8327 if test "X$x" = "X-L$found_dir"; then
8328 haveit=yes
8329 break
8330 fi
8331 done
8332 if test -z "$haveit"; then
8333 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8334 fi
8335 if test "$hardcode_minus_L" != no; then
8336 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8337 else
8338 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8339 fi
8340 fi
8341 fi
8342 fi
8343 else
8344 if test "X$found_a" != "X"; then
8345 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8346 else
8347 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8348 fi
8349 fi
8350 additional_includedir=
8351 case "$found_dir" in
8352 */lib | */lib/)
8353 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8354 additional_includedir="$basedir/include"
8355 ;;
8356 esac
8357 if test "X$additional_includedir" != "X"; then
8358 if test "X$additional_includedir" != "X/usr/include"; then
8359 haveit=
8360 if test "X$additional_includedir" = "X/usr/local/include"; then
8361 if test -n "$GCC"; then
8362 case $host_os in
8363 linux*) haveit=yes;;
8364 esac
8365 fi
8366 fi
8367 if test -z "$haveit"; then
8368 for x in $CPPFLAGS $INCICONV; do
8369
8370 acl_save_prefix="$prefix"
8371 prefix="$acl_final_prefix"
8372 acl_save_exec_prefix="$exec_prefix"
8373 exec_prefix="$acl_final_exec_prefix"
8374 eval x=\"$x\"
8375 exec_prefix="$acl_save_exec_prefix"
8376 prefix="$acl_save_prefix"
8377
8378 if test "X$x" = "X-I$additional_includedir"; then
8379 haveit=yes
8380 break
8381 fi
8382 done
8383 if test -z "$haveit"; then
8384 if test -d "$additional_includedir"; then
8385 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8386 fi
8387 fi
8388 fi
8389 fi
8390 fi
8391 if test -n "$found_la"; then
8392 save_libdir="$libdir"
8393 case "$found_la" in
8394 */* | *\\*) . "$found_la" ;;
8395 *) . "./$found_la" ;;
8396 esac
8397 libdir="$save_libdir"
8398 for dep in $dependency_libs; do
8399 case "$dep" in
8400 -L*)
8401 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8402 if test "X$additional_libdir" != "X/usr/lib"; then
8403 haveit=
8404 if test "X$additional_libdir" = "X/usr/local/lib"; then
8405 if test -n "$GCC"; then
8406 case $host_os in
8407 linux*) haveit=yes;;
8408 esac
8409 fi
8410 fi
8411 if test -z "$haveit"; then
8412 haveit=
8413 for x in $LDFLAGS $LIBICONV; do
8414
8415 acl_save_prefix="$prefix"
8416 prefix="$acl_final_prefix"
8417 acl_save_exec_prefix="$exec_prefix"
8418 exec_prefix="$acl_final_exec_prefix"
8419 eval x=\"$x\"
8420 exec_prefix="$acl_save_exec_prefix"
8421 prefix="$acl_save_prefix"
8422
8423 if test "X$x" = "X-L$additional_libdir"; then
8424 haveit=yes
8425 break
8426 fi
8427 done
8428 if test -z "$haveit"; then
8429 if test -d "$additional_libdir"; then
8430 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8431 fi
8432 fi
8433 haveit=
8434 for x in $LDFLAGS $LTLIBICONV; do
8435
8436 acl_save_prefix="$prefix"
8437 prefix="$acl_final_prefix"
8438 acl_save_exec_prefix="$exec_prefix"
8439 exec_prefix="$acl_final_exec_prefix"
8440 eval x=\"$x\"
8441 exec_prefix="$acl_save_exec_prefix"
8442 prefix="$acl_save_prefix"
8443
8444 if test "X$x" = "X-L$additional_libdir"; then
8445 haveit=yes
8446 break
8447 fi
8448 done
8449 if test -z "$haveit"; then
8450 if test -d "$additional_libdir"; then
8451 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8452 fi
8453 fi
8454 fi
8455 fi
8456 ;;
8457 -R*)
8458 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8459 if test "$enable_rpath" != no; then
8460 haveit=
8461 for x in $rpathdirs; do
8462 if test "X$x" = "X$dir"; then
8463 haveit=yes
8464 break
8465 fi
8466 done
8467 if test -z "$haveit"; then
8468 rpathdirs="$rpathdirs $dir"
8469 fi
8470 haveit=
8471 for x in $ltrpathdirs; do
8472 if test "X$x" = "X$dir"; then
8473 haveit=yes
8474 break
8475 fi
8476 done
8477 if test -z "$haveit"; then
8478 ltrpathdirs="$ltrpathdirs $dir"
8479 fi
8480 fi
8481 ;;
8482 -l*)
8483 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8484 ;;
8485 *.la)
8486 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8487 ;;
8488 *)
8489 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8490 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8491 ;;
8492 esac
8493 done
8494 fi
8495 else
8496 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8497 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8498 fi
8499 fi
8500 fi
8501 done
8502 done
8503 if test "X$rpathdirs" != "X"; then
8504 if test -n "$hardcode_libdir_separator"; then
8505 alldirs=
8506 for found_dir in $rpathdirs; do
8507 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8508 done
8509 acl_save_libdir="$libdir"
8510 libdir="$alldirs"
8511 eval flag=\"$hardcode_libdir_flag_spec\"
8512 libdir="$acl_save_libdir"
8513 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8514 else
8515 for found_dir in $rpathdirs; do
8516 acl_save_libdir="$libdir"
8517 libdir="$found_dir"
8518 eval flag=\"$hardcode_libdir_flag_spec\"
8519 libdir="$acl_save_libdir"
8520 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8521 done
8522 fi
8523 fi
8524 if test "X$ltrpathdirs" != "X"; then
8525 for found_dir in $ltrpathdirs; do
8526 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8527 done
8528 fi
8529
8530
8531
8532
8533
6c7a06a3 8534
6c7a06a3 8535
81ecdfbb
RW
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8537$as_echo_n "checking for iconv... " >&6; }
8538if test "${am_cv_func_iconv+set}" = set; then :
8539 $as_echo_n "(cached) " >&6
d542061a 8540else
6c7a06a3
TT
8541
8542 am_cv_func_iconv="no, consider installing GNU libiconv"
8543 am_cv_lib_iconv=no
016a3251
DD
8544 am_save_CPPFLAGS="$CPPFLAGS"
8545 CPPFLAGS="$CPPFLAGS $INCICONV"
8546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8547/* end confdefs.h. */
6c7a06a3
TT
8548#include <stdlib.h>
8549#include <iconv.h>
d542061a
UW
8550int
8551main ()
8552{
6c7a06a3 8553iconv_t cd = iconv_open("","");
016a3251
DD
8554 iconv(cd,NULL,NULL,NULL,NULL);
8555 iconv_close(cd);
d542061a
UW
8556 ;
8557 return 0;
8558}
8559_ACEOF
81ecdfbb 8560if ac_fn_c_try_link "$LINENO"; then :
016a3251 8561 am_cv_func_iconv=yes
d542061a 8562fi
81ecdfbb
RW
8563rm -f core conftest.err conftest.$ac_objext \
8564 conftest$ac_exeext conftest.$ac_ext
016a3251 8565 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8566
016a3251
DD
8567 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8568 for _libs in .libs _libs; do
8569 am_save_CPPFLAGS="$CPPFLAGS"
8570 am_save_LIBS="$LIBS"
8571 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8572 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8574/* end confdefs.h. */
6c7a06a3
TT
8575#include <stdlib.h>
8576#include <iconv.h>
d542061a
UW
8577int
8578main ()
8579{
6c7a06a3 8580iconv_t cd = iconv_open("","");
016a3251
DD
8581 iconv(cd,NULL,NULL,NULL,NULL);
8582 iconv_close(cd);
d542061a
UW
8583 ;
8584 return 0;
8585}
8586_ACEOF
81ecdfbb 8587if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8588 INCICONV="-I../libiconv/include"
8589 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8590 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8591 am_cv_lib_iconv=yes
8592 am_cv_func_iconv=yes
d542061a 8593fi
81ecdfbb
RW
8594rm -f core conftest.err conftest.$ac_objext \
8595 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8596 CPPFLAGS="$am_save_CPPFLAGS"
8597 LIBS="$am_save_LIBS"
8598 if test "$am_cv_func_iconv" = "yes"; then
8599 break
8600 fi
8601 done
77f120bf 8602 fi
94ae1714 8603
4edb1e84 8604 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8605 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8606 am_save_LIBS="$LIBS"
016a3251
DD
8607 CPPFLAGS="$LIBS $INCICONV"
8608 LIBS="$LIBS $LIBICONV"
81ecdfbb 8609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8610/* end confdefs.h. */
6c7a06a3
TT
8611#include <stdlib.h>
8612#include <iconv.h>
bec39cab
AC
8613int
8614main ()
8615{
6c7a06a3
TT
8616iconv_t cd = iconv_open("","");
8617 iconv(cd,NULL,NULL,NULL,NULL);
8618 iconv_close(cd);
bec39cab
AC
8619 ;
8620 return 0;
8621}
8622_ACEOF
81ecdfbb 8623if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8624 am_cv_lib_iconv=yes
6c7a06a3 8625 am_cv_func_iconv=yes
627af7ea 8626fi
81ecdfbb
RW
8627rm -f core conftest.err conftest.$ac_objext \
8628 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8629 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8630 LIBS="$am_save_LIBS"
6c7a06a3
TT
8631 fi
8632
8633fi
81ecdfbb
RW
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8635$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8636 if test "$am_cv_func_iconv" = yes; then
8637
8638$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8639
016a3251 8640 fi
fc3b640d 8641 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8642
8643 for element in $INCICONV; do
8644 haveit=
8645 for x in $CPPFLAGS; do
8646
8647 acl_save_prefix="$prefix"
8648 prefix="$acl_final_prefix"
8649 acl_save_exec_prefix="$exec_prefix"
8650 exec_prefix="$acl_final_exec_prefix"
8651 eval x=\"$x\"
8652 exec_prefix="$acl_save_exec_prefix"
8653 prefix="$acl_save_prefix"
8654
8655 if test "X$x" = "X$element"; then
8656 haveit=yes
8657 break
8658 fi
8659 done
8660 if test -z "$haveit"; then
8661 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8662 fi
8663 done
8664
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8666$as_echo_n "checking how to link with libiconv... " >&6; }
8667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8668$as_echo "$LIBICONV" >&6; }
94ae1714 8669 else
016a3251
DD
8670 LIBICONV=
8671 LTLIBICONV=
fc3b640d 8672 fi
94ae1714 8673
6c7a06a3 8674
6c7a06a3 8675
016a3251 8676 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8678$as_echo_n "checking for iconv declaration... " >&6; }
8679 if test "${am_cv_proto_iconv+set}" = set; then :
8680 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8681else
8682
81ecdfbb 8683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8684/* end confdefs.h. */
8685
6c7a06a3
TT
8686#include <stdlib.h>
8687#include <iconv.h>
8688extern
b4e70030 8689#ifdef __cplusplus
6c7a06a3 8690"C"
b4e70030 8691#endif
6c7a06a3
TT
8692#if defined(__STDC__) || defined(__cplusplus)
8693size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8694#else
8695size_t iconv();
8696#endif
8697
b4e70030
JB
8698int
8699main ()
8700{
6c7a06a3 8701
b4e70030
JB
8702 ;
8703 return 0;
8704}
8705_ACEOF
81ecdfbb 8706if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8707 am_cv_proto_iconv_arg1=""
4e8d927d 8708else
81ecdfbb 8709 am_cv_proto_iconv_arg1="const"
b4e70030 8710fi
81ecdfbb 8711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8712 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);"
8713fi
8714
8715 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8717 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8718$as_echo "${ac_t:-
8719 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8720
8721cat >>confdefs.h <<_ACEOF
8722#define ICONV_CONST $am_cv_proto_iconv_arg1
8723_ACEOF
8724
8725 fi
6c7a06a3
TT
8726
8727
478aac75
DE
8728# GDB may fork/exec the iconv program to get the list of supported character
8729# sets. Allow the user to specify where to find it.
8730# There are several factors affecting the choice of option name:
8731# - There is already --with-libiconv-prefix but we can't use it, it specifies
8732# the build-time location of libiconv files.
8733# - The program we need to find is iconv, which comes with glibc. The user
8734# doesn't necessarily have libiconv installed. Therefore naming this
8735# --with-libiconv-foo feels wrong.
8736# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8737# defined to work on directories not files (though it really doesn't know
8738# the difference).
8739# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8740# with --with-libiconv-prefix.
8741# Putting these together is why the option name is --with-iconv-bin.
8742
8743
8744# Check whether --with-iconv-bin was given.
8745if test "${with_iconv_bin+set}" = set; then :
8746 withval=$with_iconv_bin; iconv_bin="${withval}"
8747
8748cat >>confdefs.h <<_ACEOF
8749#define ICONV_BIN "${iconv_bin}"
8750_ACEOF
8751
8752
8753 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8754 if test "x$prefix" = xNONE; then
8755 test_prefix=/usr/local
8756 else
8757 test_prefix=$prefix
8758 fi
8759 else
8760 test_prefix=$exec_prefix
8761 fi
8762 value=0
8763 case ${iconv_bin} in
8764 "${test_prefix}"|"${test_prefix}/"*|\
8765 '${exec_prefix}'|'${exec_prefix}/'*)
8766 value=1
8767 ;;
8768 esac
8769
8770cat >>confdefs.h <<_ACEOF
8771#define ICONV_BIN_RELOCATABLE $value
8772_ACEOF
8773
8774
8775
8776fi
8777
8778
cb01cfba 8779# For the TUI, we need enhanced curses functionality.
bd8a8e1b 8780if test x"$enable_tui" != xno; then
cb01cfba
JB
8781 prefer_curses=yes
8782fi
8783
8784curses_found=no
8785if test x"$prefer_curses" = xyes; then
8786 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8787 # curses library because the latter might not provide all the
8788 # functionality we need. However, this leads to problems on systems
8789 # where the linker searches /usr/local/lib, but the compiler doesn't
8790 # search /usr/local/include, if ncurses is installed in /usr/local. A
8791 # default installation of ncurses on alpha*-dec-osf* will lead to such
8792 # a situation.
81ecdfbb
RW
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8794$as_echo_n "checking for library containing waddstr... " >&6; }
8795if test "${ac_cv_search_waddstr+set}" = set; then :
8796 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8797else
8798 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8800/* end confdefs.h. */
8801
81ecdfbb
RW
8802/* Override any GCC internal prototype to avoid an error.
8803 Use char because int might match the return type of a GCC
8804 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8805#ifdef __cplusplus
8806extern "C"
8807#endif
6c7a06a3
TT
8808char waddstr ();
8809int
8810main ()
8811{
81ecdfbb 8812return waddstr ();
6c7a06a3
TT
8813 ;
8814 return 0;
8815}
8816_ACEOF
5007d765 8817for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
8818 if test -z "$ac_lib"; then
8819 ac_res="none required"
8820 else
8821 ac_res=-l$ac_lib
8822 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8823 fi
8824 if ac_fn_c_try_link "$LINENO"; then :
8825 ac_cv_search_waddstr=$ac_res
8826fi
8827rm -f core conftest.err conftest.$ac_objext \
8828 conftest$ac_exeext
8829 if test "${ac_cv_search_waddstr+set}" = set; then :
8830 break
8831fi
8832done
8833if test "${ac_cv_search_waddstr+set}" = set; then :
8834
6c7a06a3 8835else
81ecdfbb
RW
8836 ac_cv_search_waddstr=no
8837fi
8838rm conftest.$ac_ext
8839LIBS=$ac_func_search_save_LIBS
8840fi
8841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8842$as_echo "$ac_cv_search_waddstr" >&6; }
8843ac_res=$ac_cv_search_waddstr
8844if test "$ac_res" != no; then :
8845 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
8846
8847fi
8848
8849
cb01cfba
JB
8850 if test "$ac_cv_search_waddstr" != no; then
8851 curses_found=yes
8852 fi
8853fi
8854
8855# Check whether we should enable the TUI, but only do so if we really
8856# can.
8857if test x"$enable_tui" != xno; then
8858 if test -d $srcdir/tui; then
8859 if test "$curses_found" != no; then
6c7a06a3
TT
8860 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8861 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8862 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8863 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
8864 else
8865 if test x"$enable_tui" = xyes; then
81ecdfbb 8866 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 8867 else
81ecdfbb
RW
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8869$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
8870 fi
8871 fi
8872 fi
8873fi
8874
8875# Since GDB uses Readline, we need termcap functionality. In many
8876# cases this will be provided by the curses library, but some systems
96fe4562 8877# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
8878
8879case $host_os in
8880 cygwin*)
8881 if test -d $srcdir/libtermcap; then
8882 LIBS="../libtermcap/libtermcap.a $LIBS"
8883 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8884 fi ;;
8885 go32* | *djgpp*)
8886 ac_cv_search_tgetent="none required"
8887 ;;
6c7a06a3
TT
8888esac
8889
8890# These are the libraries checked by Readline.
81ecdfbb
RW
8891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8892$as_echo_n "checking for library containing tgetent... " >&6; }
8893if test "${ac_cv_search_tgetent+set}" = set; then :
8894 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8895else
8896 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
8898/* end confdefs.h. */
8899
81ecdfbb
RW
8900/* Override any GCC internal prototype to avoid an error.
8901 Use char because int might match the return type of a GCC
8902 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
8903#ifdef __cplusplus
8904extern "C"
8905#endif
6c7a06a3
TT
8906char tgetent ();
8907int
8908main ()
8909{
81ecdfbb 8910return tgetent ();
6c7a06a3
TT
8911 ;
8912 return 0;
8913}
8914_ACEOF
5007d765 8915for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
81ecdfbb
RW
8916 if test -z "$ac_lib"; then
8917 ac_res="none required"
8918 else
8919 ac_res=-l$ac_lib
6c7a06a3 8920 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8921 fi
8922 if ac_fn_c_try_link "$LINENO"; then :
8923 ac_cv_search_tgetent=$ac_res
8924fi
8925rm -f core conftest.err conftest.$ac_objext \
8926 conftest$ac_exeext
8927 if test "${ac_cv_search_tgetent+set}" = set; then :
8928 break
8929fi
8930done
8931if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 8932
6c7a06a3 8933else
81ecdfbb 8934 ac_cv_search_tgetent=no
6c7a06a3 8935fi
81ecdfbb 8936rm conftest.$ac_ext
6c7a06a3
TT
8937LIBS=$ac_func_search_save_LIBS
8938fi
81ecdfbb
RW
8939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8940$as_echo "$ac_cv_search_tgetent" >&6; }
8941ac_res=$ac_cv_search_tgetent
8942if test "$ac_res" != no; then :
8943 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 8944
06825bd1
MK
8945fi
8946
06825bd1 8947
bec39cab 8948if test "$ac_cv_search_tgetent" = no; then
7a85168d 8949 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
8950fi
8951
3841debe 8952
81ecdfbb
RW
8953# Check whether --with-system-readline was given.
8954if test "${with_system_readline+set}" = set; then :
8955 withval=$with_system_readline;
8956fi
6a30b0a5 8957
6a30b0a5
AS
8958
8959if test "$with_system_readline" = yes; then
8960 READLINE=-lreadline
8961 READLINE_DEPS=
8962 READLINE_CFLAGS=
39037522 8963 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
8964else
8965 READLINE='$(READLINE_DIR)/libreadline.a'
8966 READLINE_DEPS='$(READLINE)'
8967 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 8968 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
8969fi
8970
8971
8972
8973
8974
f997c383
SD
8975# Generate jit-reader.h
8976
8977# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
8978TARGET_PTR=
8979
8980# The cast to long int works around a bug in the HP C Compiler
8981# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8982# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8983# This bug is HP SR number 8606223364.
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
8985$as_echo_n "checking size of unsigned long long... " >&6; }
8986if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
8987 $as_echo_n "(cached) " >&6
8988else
8989 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
8990
8991else
8992 if test "$ac_cv_type_unsigned_long_long" = yes; then
8993 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8994$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8995{ as_fn_set_status 77
8996as_fn_error "cannot compute sizeof (unsigned long long)
8997See \`config.log' for more details." "$LINENO" 5; }; }
8998 else
8999 ac_cv_sizeof_unsigned_long_long=0
9000 fi
9001fi
9002
9003fi
9004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9005$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9006
9007
9008
9009cat >>confdefs.h <<_ACEOF
9010#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9011_ACEOF
9012
9013
9014# The cast to long int works around a bug in the HP C Compiler
9015# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9016# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9017# This bug is HP SR number 8606223364.
9018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9019$as_echo_n "checking size of unsigned long... " >&6; }
9020if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
9021 $as_echo_n "(cached) " >&6
9022else
9023 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9024
9025else
9026 if test "$ac_cv_type_unsigned_long" = yes; then
9027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9029{ as_fn_set_status 77
9030as_fn_error "cannot compute sizeof (unsigned long)
9031See \`config.log' for more details." "$LINENO" 5; }; }
9032 else
9033 ac_cv_sizeof_unsigned_long=0
9034 fi
9035fi
9036
9037fi
9038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9039$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9040
9041
9042
9043cat >>confdefs.h <<_ACEOF
9044#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9045_ACEOF
9046
9047
9048# The cast to long int works around a bug in the HP C Compiler
9049# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9050# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9051# This bug is HP SR number 8606223364.
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9053$as_echo_n "checking size of unsigned __int128... " >&6; }
9054if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
9055 $as_echo_n "(cached) " >&6
9056else
9057 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9058
9059else
9060 if test "$ac_cv_type_unsigned___int128" = yes; then
9061 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9063{ as_fn_set_status 77
9064as_fn_error "cannot compute sizeof (unsigned __int128)
9065See \`config.log' for more details." "$LINENO" 5; }; }
9066 else
9067 ac_cv_sizeof_unsigned___int128=0
9068 fi
9069fi
9070
9071fi
9072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9073$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9074
9075
9076
9077cat >>confdefs.h <<_ACEOF
9078#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9079_ACEOF
9080
9081
9082
9083if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9084 TARGET_PTR="unsigned long"
9085elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9086 TARGET_PTR="unsigned long long"
9087elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9088 TARGET_PTR="unsigned __int128"
9089else
9090 TARGET_PTR="unsigned long"
9091fi
9092
9093
9094ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9095
9096
a2d08b9e
SD
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9098$as_echo_n "checking for library containing dlopen... " >&6; }
9099if test "${ac_cv_search_dlopen+set}" = set; then :
9100 $as_echo_n "(cached) " >&6
9101else
9102 ac_func_search_save_LIBS=$LIBS
9103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9104/* end confdefs.h. */
9105
9106/* Override any GCC internal prototype to avoid an error.
9107 Use char because int might match the return type of a GCC
9108 builtin and then its argument prototype would still apply. */
9109#ifdef __cplusplus
9110extern "C"
9111#endif
9112char dlopen ();
9113int
9114main ()
9115{
9116return dlopen ();
9117 ;
9118 return 0;
9119}
9120_ACEOF
9121for ac_lib in '' dl; do
9122 if test -z "$ac_lib"; then
9123 ac_res="none required"
9124 else
9125 ac_res=-l$ac_lib
9126 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9127 fi
9128 if ac_fn_c_try_link "$LINENO"; then :
9129 ac_cv_search_dlopen=$ac_res
9130fi
9131rm -f core conftest.err conftest.$ac_objext \
9132 conftest$ac_exeext
9133 if test "${ac_cv_search_dlopen+set}" = set; then :
9134 break
9135fi
9136done
9137if test "${ac_cv_search_dlopen+set}" = set; then :
9138
9139else
9140 ac_cv_search_dlopen=no
9141fi
9142rm conftest.$ac_ext
9143LIBS=$ac_func_search_save_LIBS
9144fi
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9146$as_echo "$ac_cv_search_dlopen" >&6; }
9147ac_res=$ac_cv_search_dlopen
9148if test "$ac_res" != no; then :
9149 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9150
9151fi
9152
9153
39037522 9154
b8e0a31c
SD
9155
9156# Check whether --with-jit-reader-dir was given.
9157if test "${with_jit_reader_dir+set}" = set; then :
9158 withval=$with_jit_reader_dir;
9159 JIT_READER_DIR=$withval
9160else
9161 JIT_READER_DIR=${libdir}/gdb
9162fi
9163
9164
9165 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9167 ac_define_dir=`eval echo $JIT_READER_DIR`
9168 ac_define_dir=`eval echo $ac_define_dir`
9169
9170cat >>confdefs.h <<_ACEOF
9171#define JIT_READER_DIR "$ac_define_dir"
9172_ACEOF
9173
9174
9175
9176
9177 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9178 if test "x$prefix" = xNONE; then
9179 test_prefix=/usr/local
9180 else
9181 test_prefix=$prefix
9182 fi
9183 else
9184 test_prefix=$exec_prefix
9185 fi
9186 value=0
9187 case ${ac_define_dir} in
9188 "${test_prefix}"|"${test_prefix}/"*|\
9189 '${exec_prefix}'|'${exec_prefix}/'*)
9190 value=1
9191 ;;
9192 esac
9193
9194cat >>confdefs.h <<_ACEOF
9195#define JIT_READER_DIR_RELOCATABLE $value
9196_ACEOF
9197
9198
9199
9200
9201
81ecdfbb
RW
9202# Check whether --with-expat was given.
9203if test "${with_expat+set}" = set; then :
9204 withval=$with_expat;
5c39566f
DJ
9205else
9206 with_expat=auto
81ecdfbb
RW
9207fi
9208
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9210$as_echo_n "checking whether to use expat... " >&6; }
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9212$as_echo "$with_expat" >&6; }
5c39566f
DJ
9213
9214if test "${with_expat}" = no; then
81ecdfbb
RW
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9216$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9217 HAVE_LIBEXPAT=no
9218else
9219
3841debe
DJ
9220
9221
9222
9223
9224
9225
9226
9227 use_additional=yes
9228
9229 acl_save_prefix="$prefix"
9230 prefix="$acl_final_prefix"
9231 acl_save_exec_prefix="$exec_prefix"
9232 exec_prefix="$acl_final_exec_prefix"
9233
9234 eval additional_includedir=\"$includedir\"
9235 eval additional_libdir=\"$libdir\"
9236
9237 exec_prefix="$acl_save_exec_prefix"
9238 prefix="$acl_save_prefix"
9239
9240
81ecdfbb
RW
9241# Check whether --with-libexpat-prefix was given.
9242if test "${with_libexpat_prefix+set}" = set; then :
9243 withval=$with_libexpat_prefix;
3841debe
DJ
9244 if test "X$withval" = "Xno"; then
9245 use_additional=no
9246 else
9247 if test "X$withval" = "X"; then
9248
9249 acl_save_prefix="$prefix"
9250 prefix="$acl_final_prefix"
9251 acl_save_exec_prefix="$exec_prefix"
9252 exec_prefix="$acl_final_exec_prefix"
9253
9254 eval additional_includedir=\"$includedir\"
9255 eval additional_libdir=\"$libdir\"
9256
9257 exec_prefix="$acl_save_exec_prefix"
9258 prefix="$acl_save_prefix"
9259
9260 else
9261 additional_includedir="$withval/include"
9262 additional_libdir="$withval/lib"
9263 fi
9264 fi
9265
81ecdfbb
RW
9266fi
9267
3841debe
DJ
9268 LIBEXPAT=
9269 LTLIBEXPAT=
9270 INCEXPAT=
9271 rpathdirs=
9272 ltrpathdirs=
9273 names_already_handled=
9274 names_next_round='expat '
9275 while test -n "$names_next_round"; do
9276 names_this_round="$names_next_round"
9277 names_next_round=
9278 for name in $names_this_round; do
9279 already_handled=
9280 for n in $names_already_handled; do
9281 if test "$n" = "$name"; then
9282 already_handled=yes
9283 break
9284 fi
9285 done
9286 if test -z "$already_handled"; then
9287 names_already_handled="$names_already_handled $name"
9288 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9289 eval value=\"\$HAVE_LIB$uppername\"
9290 if test -n "$value"; then
9291 if test "$value" = yes; then
9292 eval value=\"\$LIB$uppername\"
9293 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9294 eval value=\"\$LTLIB$uppername\"
9295 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9296 else
9297 :
9298 fi
9299 else
9300 found_dir=
9301 found_la=
9302 found_so=
9303 found_a=
9304 if test $use_additional = yes; then
9305 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9306 found_dir="$additional_libdir"
9307 found_so="$additional_libdir/lib$name.$shlibext"
9308 if test -f "$additional_libdir/lib$name.la"; then
9309 found_la="$additional_libdir/lib$name.la"
9310 fi
9311 else
9312 if test -f "$additional_libdir/lib$name.$libext"; then
9313 found_dir="$additional_libdir"
9314 found_a="$additional_libdir/lib$name.$libext"
9315 if test -f "$additional_libdir/lib$name.la"; then
9316 found_la="$additional_libdir/lib$name.la"
9317 fi
9318 fi
9319 fi
9320 fi
9321 if test "X$found_dir" = "X"; then
9322 for x in $LDFLAGS $LTLIBEXPAT; do
9323
9324 acl_save_prefix="$prefix"
9325 prefix="$acl_final_prefix"
9326 acl_save_exec_prefix="$exec_prefix"
9327 exec_prefix="$acl_final_exec_prefix"
9328 eval x=\"$x\"
9329 exec_prefix="$acl_save_exec_prefix"
9330 prefix="$acl_save_prefix"
9331
9332 case "$x" in
9333 -L*)
9334 dir=`echo "X$x" | sed -e 's/^X-L//'`
9335 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9336 found_dir="$dir"
9337 found_so="$dir/lib$name.$shlibext"
9338 if test -f "$dir/lib$name.la"; then
9339 found_la="$dir/lib$name.la"
9340 fi
9341 else
9342 if test -f "$dir/lib$name.$libext"; then
9343 found_dir="$dir"
9344 found_a="$dir/lib$name.$libext"
9345 if test -f "$dir/lib$name.la"; then
9346 found_la="$dir/lib$name.la"
9347 fi
9348 fi
9349 fi
9350 ;;
9351 esac
9352 if test "X$found_dir" != "X"; then
9353 break
9354 fi
9355 done
9356 fi
9357 if test "X$found_dir" != "X"; then
9358 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9359 if test "X$found_so" != "X"; then
9360 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9361 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9362 else
9363 haveit=
9364 for x in $ltrpathdirs; do
9365 if test "X$x" = "X$found_dir"; then
9366 haveit=yes
9367 break
9368 fi
9369 done
9370 if test -z "$haveit"; then
9371 ltrpathdirs="$ltrpathdirs $found_dir"
9372 fi
9373 if test "$hardcode_direct" = yes; then
9374 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9375 else
9376 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9377 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9378 haveit=
9379 for x in $rpathdirs; do
9380 if test "X$x" = "X$found_dir"; then
9381 haveit=yes
9382 break
9383 fi
9384 done
9385 if test -z "$haveit"; then
9386 rpathdirs="$rpathdirs $found_dir"
9387 fi
9388 else
9389 haveit=
9390 for x in $LDFLAGS $LIBEXPAT; do
9391
9392 acl_save_prefix="$prefix"
9393 prefix="$acl_final_prefix"
9394 acl_save_exec_prefix="$exec_prefix"
9395 exec_prefix="$acl_final_exec_prefix"
9396 eval x=\"$x\"
9397 exec_prefix="$acl_save_exec_prefix"
9398 prefix="$acl_save_prefix"
9399
9400 if test "X$x" = "X-L$found_dir"; then
9401 haveit=yes
9402 break
9403 fi
9404 done
9405 if test -z "$haveit"; then
9406 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9407 fi
9408 if test "$hardcode_minus_L" != no; then
9409 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9410 else
9411 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9412 fi
9413 fi
9414 fi
9415 fi
9416 else
9417 if test "X$found_a" != "X"; then
9418 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9419 else
9420 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9421 fi
9422 fi
9423 additional_includedir=
9424 case "$found_dir" in
9425 */lib | */lib/)
9426 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9427 additional_includedir="$basedir/include"
9428 ;;
9429 esac
9430 if test "X$additional_includedir" != "X"; then
9431 if test "X$additional_includedir" != "X/usr/include"; then
9432 haveit=
9433 if test "X$additional_includedir" = "X/usr/local/include"; then
9434 if test -n "$GCC"; then
9435 case $host_os in
9436 linux*) haveit=yes;;
9437 esac
9438 fi
9439 fi
9440 if test -z "$haveit"; then
9441 for x in $CPPFLAGS $INCEXPAT; do
9442
9443 acl_save_prefix="$prefix"
9444 prefix="$acl_final_prefix"
9445 acl_save_exec_prefix="$exec_prefix"
9446 exec_prefix="$acl_final_exec_prefix"
9447 eval x=\"$x\"
9448 exec_prefix="$acl_save_exec_prefix"
9449 prefix="$acl_save_prefix"
9450
9451 if test "X$x" = "X-I$additional_includedir"; then
9452 haveit=yes
9453 break
9454 fi
9455 done
9456 if test -z "$haveit"; then
9457 if test -d "$additional_includedir"; then
9458 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9459 fi
9460 fi
9461 fi
9462 fi
9463 fi
9464 if test -n "$found_la"; then
9465 save_libdir="$libdir"
9466 case "$found_la" in
9467 */* | *\\*) . "$found_la" ;;
9468 *) . "./$found_la" ;;
9469 esac
9470 libdir="$save_libdir"
9471 for dep in $dependency_libs; do
9472 case "$dep" in
9473 -L*)
9474 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9475 if test "X$additional_libdir" != "X/usr/lib"; then
9476 haveit=
9477 if test "X$additional_libdir" = "X/usr/local/lib"; then
9478 if test -n "$GCC"; then
9479 case $host_os in
9480 linux*) haveit=yes;;
9481 esac
9482 fi
9483 fi
9484 if test -z "$haveit"; then
9485 haveit=
9486 for x in $LDFLAGS $LIBEXPAT; do
9487
9488 acl_save_prefix="$prefix"
9489 prefix="$acl_final_prefix"
9490 acl_save_exec_prefix="$exec_prefix"
9491 exec_prefix="$acl_final_exec_prefix"
9492 eval x=\"$x\"
9493 exec_prefix="$acl_save_exec_prefix"
9494 prefix="$acl_save_prefix"
9495
9496 if test "X$x" = "X-L$additional_libdir"; then
9497 haveit=yes
9498 break
9499 fi
9500 done
9501 if test -z "$haveit"; then
9502 if test -d "$additional_libdir"; then
9503 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9504 fi
9505 fi
9506 haveit=
9507 for x in $LDFLAGS $LTLIBEXPAT; do
9508
9509 acl_save_prefix="$prefix"
9510 prefix="$acl_final_prefix"
9511 acl_save_exec_prefix="$exec_prefix"
9512 exec_prefix="$acl_final_exec_prefix"
9513 eval x=\"$x\"
9514 exec_prefix="$acl_save_exec_prefix"
9515 prefix="$acl_save_prefix"
9516
9517 if test "X$x" = "X-L$additional_libdir"; then
9518 haveit=yes
9519 break
9520 fi
9521 done
9522 if test -z "$haveit"; then
9523 if test -d "$additional_libdir"; then
9524 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9525 fi
9526 fi
9527 fi
9528 fi
9529 ;;
9530 -R*)
9531 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9532 if test "$enable_rpath" != no; then
9533 haveit=
9534 for x in $rpathdirs; do
9535 if test "X$x" = "X$dir"; then
9536 haveit=yes
9537 break
9538 fi
9539 done
9540 if test -z "$haveit"; then
9541 rpathdirs="$rpathdirs $dir"
9542 fi
9543 haveit=
9544 for x in $ltrpathdirs; do
9545 if test "X$x" = "X$dir"; then
9546 haveit=yes
9547 break
9548 fi
9549 done
9550 if test -z "$haveit"; then
9551 ltrpathdirs="$ltrpathdirs $dir"
9552 fi
9553 fi
9554 ;;
9555 -l*)
9556 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9557 ;;
9558 *.la)
9559 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9560 ;;
9561 *)
9562 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9563 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9564 ;;
81ecdfbb
RW
9565 esac
9566 done
9567 fi
9568 else
9569 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9570 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9571 fi
9572 fi
9573 fi
9574 done
9575 done
9576 if test "X$rpathdirs" != "X"; then
9577 if test -n "$hardcode_libdir_separator"; then
9578 alldirs=
9579 for found_dir in $rpathdirs; do
9580 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9581 done
9582 acl_save_libdir="$libdir"
9583 libdir="$alldirs"
9584 eval flag=\"$hardcode_libdir_flag_spec\"
9585 libdir="$acl_save_libdir"
9586 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9587 else
9588 for found_dir in $rpathdirs; do
9589 acl_save_libdir="$libdir"
9590 libdir="$found_dir"
9591 eval flag=\"$hardcode_libdir_flag_spec\"
9592 libdir="$acl_save_libdir"
9593 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9594 done
9595 fi
9596 fi
9597 if test "X$ltrpathdirs" != "X"; then
9598 for found_dir in $ltrpathdirs; do
9599 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9600 done
9601 fi
a9322a30
TT
9602
9603
81ecdfbb 9604 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9605
81ecdfbb
RW
9606 for element in $INCEXPAT; do
9607 haveit=
9608 for x in $CPPFLAGS; do
a9322a30 9609
81ecdfbb
RW
9610 acl_save_prefix="$prefix"
9611 prefix="$acl_final_prefix"
9612 acl_save_exec_prefix="$exec_prefix"
9613 exec_prefix="$acl_final_exec_prefix"
9614 eval x=\"$x\"
9615 exec_prefix="$acl_save_exec_prefix"
9616 prefix="$acl_save_prefix"
a8111142 9617
81ecdfbb
RW
9618 if test "X$x" = "X$element"; then
9619 haveit=yes
9620 break
9621 fi
9622 done
9623 if test -z "$haveit"; then
9624 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9625 fi
9626 done
a9322a30
TT
9627
9628
81ecdfbb
RW
9629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9630$as_echo_n "checking for libexpat... " >&6; }
9631if test "${ac_cv_libexpat+set}" = set; then :
9632 $as_echo_n "(cached) " >&6
bec39cab 9633else
bec39cab 9634
81ecdfbb
RW
9635 ac_save_LIBS="$LIBS"
9636 LIBS="$LIBS $LIBEXPAT"
9637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9638/* end confdefs.h. */
81ecdfbb
RW
9639#include "expat.h"
9640int
9641main ()
9642{
9643XML_Parser p = XML_ParserCreate (0);
9644 ;
9645 return 0;
9646}
bec39cab 9647_ACEOF
81ecdfbb
RW
9648if ac_fn_c_try_link "$LINENO"; then :
9649 ac_cv_libexpat=yes
c906108c 9650else
81ecdfbb 9651 ac_cv_libexpat=no
bec39cab 9652fi
81ecdfbb
RW
9653rm -f core conftest.err conftest.$ac_objext \
9654 conftest$ac_exeext conftest.$ac_ext
9655 LIBS="$ac_save_LIBS"
c906108c 9656
95ca63c4 9657fi
81ecdfbb
RW
9658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9659$as_echo "$ac_cv_libexpat" >&6; }
9660 if test "$ac_cv_libexpat" = yes; then
9661 HAVE_LIBEXPAT=yes
bec39cab 9662
81ecdfbb 9663$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9664
81ecdfbb
RW
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9666$as_echo_n "checking how to link with libexpat... " >&6; }
9667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9668$as_echo "$LIBEXPAT" >&6; }
9669 else
9670 HAVE_LIBEXPAT=no
9671 CPPFLAGS="$ac_save_CPPFLAGS"
9672 LIBEXPAT=
9673 LTLIBEXPAT=
9674 fi
95ca63c4
CF
9675
9676
9677
7cb9022a
MK
9678
9679
bec39cab 9680
81ecdfbb
RW
9681 if test "$HAVE_LIBEXPAT" != yes; then
9682 if test "$with_expat" = yes; then
9683 as_fn_error "expat is missing or unusable" "$LINENO" 5
9684 else
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9686$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9687 fi
9688 else
9689 save_LIBS=$LIBS
9690 LIBS="$LIBS $LIBEXPAT"
9691 for ac_func in XML_StopParser
9692do :
9693 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9694if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 9695 cat >>confdefs.h <<_ACEOF
81ecdfbb 9696#define HAVE_XML_STOPPARSER 1
bec39cab 9697_ACEOF
95ca63c4 9698
bec39cab 9699fi
bec39cab 9700done
95ca63c4 9701
81ecdfbb
RW
9702 LIBS=$save_LIBS
9703 fi
a9322a30
TT
9704fi
9705
2400729e
UW
9706
9707# Check whether --with-mpfr was given.
9708if test "${with_mpfr+set}" = set; then :
9709 withval=$with_mpfr;
9710else
9711 with_mpfr=auto
9712fi
9713
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9715$as_echo_n "checking whether to use MPFR... " >&6; }
9716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9717$as_echo "$with_mpfr" >&6; }
9718
9719if test "${with_mpfr}" = no; then
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9721$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9722 HAVE_LIBMPFR=no
9723else
9724
9725
9726
9727
9728
9729
9730
9731
9732 use_additional=yes
9733
9734 acl_save_prefix="$prefix"
9735 prefix="$acl_final_prefix"
9736 acl_save_exec_prefix="$exec_prefix"
9737 exec_prefix="$acl_final_exec_prefix"
9738
9739 eval additional_includedir=\"$includedir\"
9740 eval additional_libdir=\"$libdir\"
9741
9742 exec_prefix="$acl_save_exec_prefix"
9743 prefix="$acl_save_prefix"
9744
9745
9746# Check whether --with-libmpfr-prefix was given.
9747if test "${with_libmpfr_prefix+set}" = set; then :
9748 withval=$with_libmpfr_prefix;
9749 if test "X$withval" = "Xno"; then
9750 use_additional=no
9751 else
9752 if test "X$withval" = "X"; then
9753
9754 acl_save_prefix="$prefix"
9755 prefix="$acl_final_prefix"
9756 acl_save_exec_prefix="$exec_prefix"
9757 exec_prefix="$acl_final_exec_prefix"
9758
9759 eval additional_includedir=\"$includedir\"
9760 eval additional_libdir=\"$libdir\"
9761
9762 exec_prefix="$acl_save_exec_prefix"
9763 prefix="$acl_save_prefix"
9764
9765 else
9766 additional_includedir="$withval/include"
9767 additional_libdir="$withval/lib"
9768 fi
9769 fi
9770
9771fi
9772
9773 LIBMPFR=
9774 LTLIBMPFR=
9775 INCMPFR=
9776 rpathdirs=
9777 ltrpathdirs=
9778 names_already_handled=
9779 names_next_round='mpfr '
9780 while test -n "$names_next_round"; do
9781 names_this_round="$names_next_round"
9782 names_next_round=
9783 for name in $names_this_round; do
9784 already_handled=
9785 for n in $names_already_handled; do
9786 if test "$n" = "$name"; then
9787 already_handled=yes
9788 break
9789 fi
9790 done
9791 if test -z "$already_handled"; then
9792 names_already_handled="$names_already_handled $name"
9793 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9794 eval value=\"\$HAVE_LIB$uppername\"
9795 if test -n "$value"; then
9796 if test "$value" = yes; then
9797 eval value=\"\$LIB$uppername\"
9798 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9799 eval value=\"\$LTLIB$uppername\"
9800 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9801 else
9802 :
9803 fi
9804 else
9805 found_dir=
9806 found_la=
9807 found_so=
9808 found_a=
9809 if test $use_additional = yes; then
9810 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9811 found_dir="$additional_libdir"
9812 found_so="$additional_libdir/lib$name.$shlibext"
9813 if test -f "$additional_libdir/lib$name.la"; then
9814 found_la="$additional_libdir/lib$name.la"
9815 fi
9816 else
9817 if test -f "$additional_libdir/lib$name.$libext"; then
9818 found_dir="$additional_libdir"
9819 found_a="$additional_libdir/lib$name.$libext"
9820 if test -f "$additional_libdir/lib$name.la"; then
9821 found_la="$additional_libdir/lib$name.la"
9822 fi
9823 fi
9824 fi
9825 fi
9826 if test "X$found_dir" = "X"; then
9827 for x in $LDFLAGS $LTLIBMPFR; do
9828
9829 acl_save_prefix="$prefix"
9830 prefix="$acl_final_prefix"
9831 acl_save_exec_prefix="$exec_prefix"
9832 exec_prefix="$acl_final_exec_prefix"
9833 eval x=\"$x\"
9834 exec_prefix="$acl_save_exec_prefix"
9835 prefix="$acl_save_prefix"
9836
9837 case "$x" in
9838 -L*)
9839 dir=`echo "X$x" | sed -e 's/^X-L//'`
9840 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9841 found_dir="$dir"
9842 found_so="$dir/lib$name.$shlibext"
9843 if test -f "$dir/lib$name.la"; then
9844 found_la="$dir/lib$name.la"
9845 fi
9846 else
9847 if test -f "$dir/lib$name.$libext"; then
9848 found_dir="$dir"
9849 found_a="$dir/lib$name.$libext"
9850 if test -f "$dir/lib$name.la"; then
9851 found_la="$dir/lib$name.la"
9852 fi
9853 fi
9854 fi
9855 ;;
9856 esac
9857 if test "X$found_dir" != "X"; then
9858 break
9859 fi
9860 done
9861 fi
9862 if test "X$found_dir" != "X"; then
9863 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9864 if test "X$found_so" != "X"; then
9865 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9866 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9867 else
9868 haveit=
9869 for x in $ltrpathdirs; do
9870 if test "X$x" = "X$found_dir"; then
9871 haveit=yes
9872 break
9873 fi
9874 done
9875 if test -z "$haveit"; then
9876 ltrpathdirs="$ltrpathdirs $found_dir"
9877 fi
9878 if test "$hardcode_direct" = yes; then
9879 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9880 else
9881 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9882 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9883 haveit=
9884 for x in $rpathdirs; do
9885 if test "X$x" = "X$found_dir"; then
9886 haveit=yes
9887 break
9888 fi
9889 done
9890 if test -z "$haveit"; then
9891 rpathdirs="$rpathdirs $found_dir"
9892 fi
9893 else
9894 haveit=
9895 for x in $LDFLAGS $LIBMPFR; do
9896
9897 acl_save_prefix="$prefix"
9898 prefix="$acl_final_prefix"
9899 acl_save_exec_prefix="$exec_prefix"
9900 exec_prefix="$acl_final_exec_prefix"
9901 eval x=\"$x\"
9902 exec_prefix="$acl_save_exec_prefix"
9903 prefix="$acl_save_prefix"
9904
9905 if test "X$x" = "X-L$found_dir"; then
9906 haveit=yes
9907 break
9908 fi
9909 done
9910 if test -z "$haveit"; then
9911 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9912 fi
9913 if test "$hardcode_minus_L" != no; then
9914 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9915 else
9916 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9917 fi
9918 fi
9919 fi
9920 fi
9921 else
9922 if test "X$found_a" != "X"; then
9923 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9924 else
9925 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9926 fi
9927 fi
9928 additional_includedir=
9929 case "$found_dir" in
9930 */lib | */lib/)
9931 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9932 additional_includedir="$basedir/include"
9933 ;;
9934 esac
9935 if test "X$additional_includedir" != "X"; then
9936 if test "X$additional_includedir" != "X/usr/include"; then
9937 haveit=
9938 if test "X$additional_includedir" = "X/usr/local/include"; then
9939 if test -n "$GCC"; then
9940 case $host_os in
9941 linux*) haveit=yes;;
9942 esac
9943 fi
9944 fi
9945 if test -z "$haveit"; then
9946 for x in $CPPFLAGS $INCMPFR; do
9947
9948 acl_save_prefix="$prefix"
9949 prefix="$acl_final_prefix"
9950 acl_save_exec_prefix="$exec_prefix"
9951 exec_prefix="$acl_final_exec_prefix"
9952 eval x=\"$x\"
9953 exec_prefix="$acl_save_exec_prefix"
9954 prefix="$acl_save_prefix"
9955
9956 if test "X$x" = "X-I$additional_includedir"; then
9957 haveit=yes
9958 break
9959 fi
9960 done
9961 if test -z "$haveit"; then
9962 if test -d "$additional_includedir"; then
9963 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
9964 fi
9965 fi
9966 fi
9967 fi
9968 fi
9969 if test -n "$found_la"; then
9970 save_libdir="$libdir"
9971 case "$found_la" in
9972 */* | *\\*) . "$found_la" ;;
9973 *) . "./$found_la" ;;
9974 esac
9975 libdir="$save_libdir"
9976 for dep in $dependency_libs; do
9977 case "$dep" in
9978 -L*)
9979 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9980 if test "X$additional_libdir" != "X/usr/lib"; then
9981 haveit=
9982 if test "X$additional_libdir" = "X/usr/local/lib"; then
9983 if test -n "$GCC"; then
9984 case $host_os in
9985 linux*) haveit=yes;;
9986 esac
9987 fi
9988 fi
9989 if test -z "$haveit"; then
9990 haveit=
9991 for x in $LDFLAGS $LIBMPFR; do
9992
9993 acl_save_prefix="$prefix"
9994 prefix="$acl_final_prefix"
9995 acl_save_exec_prefix="$exec_prefix"
9996 exec_prefix="$acl_final_exec_prefix"
9997 eval x=\"$x\"
9998 exec_prefix="$acl_save_exec_prefix"
9999 prefix="$acl_save_prefix"
10000
10001 if test "X$x" = "X-L$additional_libdir"; then
10002 haveit=yes
10003 break
10004 fi
10005 done
10006 if test -z "$haveit"; then
10007 if test -d "$additional_libdir"; then
10008 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10009 fi
10010 fi
10011 haveit=
10012 for x in $LDFLAGS $LTLIBMPFR; do
10013
10014 acl_save_prefix="$prefix"
10015 prefix="$acl_final_prefix"
10016 acl_save_exec_prefix="$exec_prefix"
10017 exec_prefix="$acl_final_exec_prefix"
10018 eval x=\"$x\"
10019 exec_prefix="$acl_save_exec_prefix"
10020 prefix="$acl_save_prefix"
10021
10022 if test "X$x" = "X-L$additional_libdir"; then
10023 haveit=yes
10024 break
10025 fi
10026 done
10027 if test -z "$haveit"; then
10028 if test -d "$additional_libdir"; then
10029 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10030 fi
10031 fi
10032 fi
10033 fi
10034 ;;
10035 -R*)
10036 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10037 if test "$enable_rpath" != no; then
10038 haveit=
10039 for x in $rpathdirs; do
10040 if test "X$x" = "X$dir"; then
10041 haveit=yes
10042 break
10043 fi
10044 done
10045 if test -z "$haveit"; then
10046 rpathdirs="$rpathdirs $dir"
10047 fi
10048 haveit=
10049 for x in $ltrpathdirs; do
10050 if test "X$x" = "X$dir"; then
10051 haveit=yes
10052 break
10053 fi
10054 done
10055 if test -z "$haveit"; then
10056 ltrpathdirs="$ltrpathdirs $dir"
10057 fi
10058 fi
10059 ;;
10060 -l*)
10061 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10062 ;;
10063 *.la)
10064 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10065 ;;
10066 *)
10067 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10068 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10069 ;;
10070 esac
10071 done
10072 fi
10073 else
10074 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10075 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10076 fi
10077 fi
10078 fi
10079 done
10080 done
10081 if test "X$rpathdirs" != "X"; then
10082 if test -n "$hardcode_libdir_separator"; then
10083 alldirs=
10084 for found_dir in $rpathdirs; do
10085 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10086 done
10087 acl_save_libdir="$libdir"
10088 libdir="$alldirs"
10089 eval flag=\"$hardcode_libdir_flag_spec\"
10090 libdir="$acl_save_libdir"
10091 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10092 else
10093 for found_dir in $rpathdirs; do
10094 acl_save_libdir="$libdir"
10095 libdir="$found_dir"
10096 eval flag=\"$hardcode_libdir_flag_spec\"
10097 libdir="$acl_save_libdir"
10098 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10099 done
10100 fi
10101 fi
10102 if test "X$ltrpathdirs" != "X"; then
10103 for found_dir in $ltrpathdirs; do
10104 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10105 done
10106 fi
10107
10108
10109 ac_save_CPPFLAGS="$CPPFLAGS"
10110
10111 for element in $INCMPFR; do
10112 haveit=
10113 for x in $CPPFLAGS; do
10114
10115 acl_save_prefix="$prefix"
10116 prefix="$acl_final_prefix"
10117 acl_save_exec_prefix="$exec_prefix"
10118 exec_prefix="$acl_final_exec_prefix"
10119 eval x=\"$x\"
10120 exec_prefix="$acl_save_exec_prefix"
10121 prefix="$acl_save_prefix"
10122
10123 if test "X$x" = "X$element"; then
10124 haveit=yes
10125 break
10126 fi
10127 done
10128 if test -z "$haveit"; then
10129 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10130 fi
10131 done
10132
10133
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10135$as_echo_n "checking for libmpfr... " >&6; }
10136if test "${ac_cv_libmpfr+set}" = set; then :
10137 $as_echo_n "(cached) " >&6
10138else
10139
10140 ac_save_LIBS="$LIBS"
10141 LIBS="$LIBS $LIBMPFR"
10142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10143/* end confdefs.h. */
10144#include <mpfr.h>
10145int
10146main ()
10147{
10148mpfr_exp_t exp; mpfr_t x;
10149 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10150 ;
10151 return 0;
10152}
10153_ACEOF
10154if ac_fn_c_try_link "$LINENO"; then :
10155 ac_cv_libmpfr=yes
10156else
10157 ac_cv_libmpfr=no
10158fi
10159rm -f core conftest.err conftest.$ac_objext \
10160 conftest$ac_exeext conftest.$ac_ext
10161 LIBS="$ac_save_LIBS"
10162
10163fi
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10165$as_echo "$ac_cv_libmpfr" >&6; }
10166 if test "$ac_cv_libmpfr" = yes; then
10167 HAVE_LIBMPFR=yes
10168
10169$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10170
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10172$as_echo_n "checking how to link with libmpfr... " >&6; }
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10174$as_echo "$LIBMPFR" >&6; }
10175 else
10176 HAVE_LIBMPFR=no
10177 CPPFLAGS="$ac_save_CPPFLAGS"
10178 LIBMPFR=
10179 LTLIBMPFR=
10180 fi
10181
10182
10183
10184
10185
10186
10187 if test "$HAVE_LIBMPFR" != yes; then
10188 if test "$with_mpfr" = yes; then
10189 as_fn_error "MPFR is missing or unusable" "$LINENO" 5
10190 else
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10192$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10193 fi
10194 fi
10195fi
10196
d344e670
DE
10197# --------------------- #
10198# Check for libpython. #
10199# --------------------- #
10200
a9322a30 10201
a9322a30
TT
10202
10203
ec685c5e 10204
0c4a4063 10205
81ecdfbb
RW
10206# Check whether --with-python was given.
10207if test "${with_python+set}" = set; then :
10208 withval=$with_python;
bec39cab 10209else
81ecdfbb 10210 with_python=auto
bec39cab 10211fi
bec39cab 10212
81ecdfbb
RW
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10214$as_echo_n "checking whether to use python... " >&6; }
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10216$as_echo "$with_python" >&6; }
9a156167 10217
81ecdfbb
RW
10218if test "${with_python}" = no; then
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10220$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10221 have_libpython=no
bec39cab 10222else
81ecdfbb 10223 case "${with_python}" in
8c85a4e2 10224 [\\/]* | ?:[\\/]*)
ec685c5e
DE
10225 if test -d ${with_python}; then
10226 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10227 python_prog="${with_python}/bin/python"
0c4a4063 10228 python_prefix=
9c4ea6c5
JB
10229 # If python does not exit ${with_python}/bin, then try in
10230 # ${with_python}. On Windows/MinGW, this is where the Python
10231 # executable is.
10232 if test ! -x "${python_prog}"; then
10233 python_prog="${with_python}/python"
10234 python_prefix=
10235 fi
e7a30f46 10236 if test ! -x "${python_prog}"; then
ec685c5e
DE
10237 # Fall back to gdb 7.0/7.1 behaviour.
10238 python_prog=missing
0c4a4063 10239 python_prefix=${with_python}
ec685c5e 10240 fi
e7a30f46 10241 elif test -x "${with_python}"; then
ec685c5e
DE
10242 # While we can't run python compiled for $host (unless host == build),
10243 # the user could write a script that provides the needed information,
10244 # so we support that.
ec685c5e 10245 python_prog=${with_python}
0c4a4063 10246 python_prefix=
ec685c5e
DE
10247 else
10248 as_fn_error "invalid value for --with-python" "$LINENO" 5
10249 fi
81ecdfbb 10250 ;;
ec685c5e
DE
10251 */*)
10252 # Disallow --with-python=foo/bar.
81ecdfbb
RW
10253 as_fn_error "invalid value for --with-python" "$LINENO" 5
10254 ;;
ec685c5e
DE
10255 *)
10256 # The user has either specified auto, yes, or the name of the python
10257 # program assumed to be in $PATH.
10258 python_prefix=
10259 case "${with_python}" in
10260 yes | auto)
10261 if test ${build} = ${host}; then
10262 # Extract the first word of "python", so it can be a program name with args.
10263set dummy python; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if test "${ac_cv_path_python_prog_path+set}" = set; then :
10267 $as_echo_n "(cached) " >&6
10268else
10269 case $python_prog_path in
10270 [\\/]* | ?:[\\/]*)
10271 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10272 ;;
10273 *)
10274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277 IFS=$as_save_IFS
10278 test -z "$as_dir" && as_dir=.
10279 for ac_exec_ext in '' $ac_executable_extensions; do
10280 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10281 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10282 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283 break 2
10284 fi
10285done
10286 done
10287IFS=$as_save_IFS
10288
10289 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10290 ;;
10291esac
10292fi
10293python_prog_path=$ac_cv_path_python_prog_path
10294if test -n "$python_prog_path"; then
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10296$as_echo "$python_prog_path" >&6; }
10297else
10298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
10300fi
10301
10302
10303 if test "${python_prog_path}" = missing; then
10304 python_prog=missing
10305 else
10306 python_prog=${python_prog_path}
10307 fi
10308 else
10309 # Not much we can do except assume the cross-compiler will find the
10310 # right files.
10311 python_prog=missing
10312 fi
10313 ;;
10314 *)
10315 # While we can't run python compiled for $host (unless host == build),
10316 # the user could write a script that provides the needed information,
10317 # so we support that.
10318 python_prog="${with_python}"
10319 # Extract the first word of "${python_prog}", so it can be a program name with args.
10320set dummy ${python_prog}; ac_word=$2
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10322$as_echo_n "checking for $ac_word... " >&6; }
10323if test "${ac_cv_path_python_prog_path+set}" = set; then :
10324 $as_echo_n "(cached) " >&6
10325else
10326 case $python_prog_path in
10327 [\\/]* | ?:[\\/]*)
10328 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10329 ;;
10330 *)
10331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10332for as_dir in $PATH
10333do
10334 IFS=$as_save_IFS
10335 test -z "$as_dir" && as_dir=.
10336 for ac_exec_ext in '' $ac_executable_extensions; do
10337 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10338 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10340 break 2
10341 fi
10342done
10343 done
10344IFS=$as_save_IFS
10345
10346 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10347 ;;
10348esac
10349fi
10350python_prog_path=$ac_cv_path_python_prog_path
10351if test -n "$python_prog_path"; then
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10353$as_echo "$python_prog_path" >&6; }
10354else
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
10357fi
10358
10359
10360 if test "${python_prog_path}" = missing; then
10361 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
10362 fi
10363 ;;
10364 esac
81ecdfbb
RW
10365 esac
10366
ec685c5e 10367 if test "${python_prog}" != missing; then
e7a30f46
DE
10368 # We have a python program to use, but it may be too old.
10369 # Don't flag an error for --with-python=auto (the default).
10370 have_python_config=yes
ec685c5e
DE
10371 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10372 if test $? != 0; then
e7a30f46
DE
10373 have_python_config=failed
10374 if test "${with_python}" != auto; then
10375 as_fn_error "failure running python-config --includes" "$LINENO" 5
10376 fi
ec685c5e
DE
10377 fi
10378 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10379 if test $? != 0; then
e7a30f46
DE
10380 have_python_config=failed
10381 if test "${with_python}" != auto; then
10382 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
10383 fi
ec685c5e 10384 fi
0c4a4063
DE
10385 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10386 if test $? != 0; then
e7a30f46
DE
10387 have_python_config=failed
10388 if test "${with_python}" != auto; then
10389 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
10390 fi
0c4a4063 10391 fi
ec685c5e 10392 else
ac534cba
JB
10393 # We do not have a python executable we can use to determine where
10394 # to find the Python headers and libs. We cannot guess the include
10395 # path from the python_prefix either, because that include path
10396 # depends on the Python version. So, there is nothing much we can
10397 # do except assume that the compiler will be able to find those files.
10398 python_includes=
10399 python_libs=
0c4a4063 10400 have_python_config=no
ec685c5e 10401 fi
bec39cab 10402
ec685c5e
DE
10403 # If we have python-config, only try the configuration it provides.
10404 # Otherwise fallback on the old way of trying different versions of
10405 # python in turn.
81ecdfbb 10406
ec685c5e
DE
10407 have_libpython=no
10408 if test "${have_python_config}" = yes; then
c1039e3c
JB
10409 # Determine the Python version by extracting "-lpython<version>"
10410 # part of the python_libs. <version> is usually X.Y with X and Y
10411 # being decimal numbers, but can also be XY (seen on Windows).
10412 #
10413 # The extraction is performed using sed with a regular expression.
10414 # Initially, the regexp used was using the '?' quantifier to make
10415 # the dot in the version number optional. Unfortunately, this
10416 # does not work with non-GNU versions of sed because, because of
10417 # what looks like a limitation (the '?' quantifier does not work
10418 # with back-references). We work around this limitation by using
10419 # the '*' quantifier instead. It means that, in theory, we might
10420 # match unexpected version strings such as "-lpython2..7", but
10421 # this seems unlikely in practice. And even if that happens,
10422 # an error will be triggered later on, when checking that version
10423 # number.
ec685c5e 10424 python_version=`echo " ${python_libs} " \
c1039e3c 10425 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
10426 case "${python_version}" in
10427 python*)
ec685c5e
DE
10428
10429 version=${python_version}
10430
10431 new_CPPFLAGS=${python_includes}
10432 new_LIBS=${python_libs}
81ecdfbb
RW
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10434$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10435 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10436 save_LIBS=$LIBS
ec685c5e
DE
10437 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10438 LIBS="$LIBS $new_LIBS"
10439 found_usable_python=no
81ecdfbb 10440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10441/* end confdefs.h. */
ac534cba 10442#include "Python.h"
81ecdfbb
RW
10443int
10444main ()
10445{
10446Py_Initialize ();
10447 ;
10448 return 0;
10449}
bec39cab 10450_ACEOF
81ecdfbb 10451if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10452 have_libpython=${version}
10453 found_usable_python=yes
ac534cba
JB
10454 PYTHON_CPPFLAGS=$new_CPPFLAGS
10455 PYTHON_LIBS=$new_LIBS
9a156167 10456fi
81ecdfbb
RW
10457rm -f core conftest.err conftest.$ac_objext \
10458 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10459 CPPFLAGS=$save_CPPFLAGS
10460 LIBS=$save_LIBS
ec685c5e
DE
10461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10462$as_echo "${found_usable_python}" >&6; }
9a156167 10463
0c4a4063
DE
10464 ;;
10465 *)
ec685c5e 10466 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
10467 ;;
10468 esac
e7a30f46 10469 elif test "${have_python_config}" != failed; then
ec685c5e 10470 if test "${have_libpython}" = no; then
9a156167 10471
420697bb
TT
10472 version=python2.7
10473
10474 new_CPPFLAGS=${python_includes}
10475 new_LIBS="${python_libs} -lpython2.7"
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10477$as_echo_n "checking for ${version}... " >&6; }
10478 save_CPPFLAGS=$CPPFLAGS
10479 save_LIBS=$LIBS
10480 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10481 LIBS="$LIBS $new_LIBS"
10482 found_usable_python=no
10483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10484/* end confdefs.h. */
ac534cba 10485#include "Python.h"
420697bb
TT
10486int
10487main ()
10488{
10489Py_Initialize ();
10490 ;
10491 return 0;
10492}
10493_ACEOF
10494if ac_fn_c_try_link "$LINENO"; then :
10495 have_libpython=${version}
10496 found_usable_python=yes
ac534cba
JB
10497 PYTHON_CPPFLAGS=$new_CPPFLAGS
10498 PYTHON_LIBS=$new_LIBS
420697bb
TT
10499fi
10500rm -f core conftest.err conftest.$ac_objext \
10501 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10502 CPPFLAGS=$save_CPPFLAGS
10503 LIBS=$save_LIBS
420697bb
TT
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10505$as_echo "${found_usable_python}" >&6; }
10506
10507 fi
10508 if test "${have_libpython}" = no; then
10509
ec685c5e
DE
10510 version=python2.6
10511
10512 new_CPPFLAGS=${python_includes}
10513 new_LIBS="${python_libs} -lpython2.6"
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10515$as_echo_n "checking for ${version}... " >&6; }
10516 save_CPPFLAGS=$CPPFLAGS
10517 save_LIBS=$LIBS
10518 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10519 LIBS="$LIBS $new_LIBS"
10520 found_usable_python=no
10521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10522/* end confdefs.h. */
ac534cba 10523#include "Python.h"
ec685c5e
DE
10524int
10525main ()
10526{
10527Py_Initialize ();
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532if ac_fn_c_try_link "$LINENO"; then :
10533 have_libpython=${version}
10534 found_usable_python=yes
ac534cba
JB
10535 PYTHON_CPPFLAGS=$new_CPPFLAGS
10536 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
10537fi
10538rm -f core conftest.err conftest.$ac_objext \
10539 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10540 CPPFLAGS=$save_CPPFLAGS
10541 LIBS=$save_LIBS
ec685c5e
DE
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10543$as_echo "${found_usable_python}" >&6; }
9a156167 10544
81ecdfbb 10545 fi
ec685c5e 10546 if test ${have_libpython} = no; then
9a156167 10547
81ecdfbb 10548 version=python2.5
9a156167 10549
ec685c5e
DE
10550 new_CPPFLAGS=${python_includes}
10551 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10553$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10554 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10555 save_LIBS=$LIBS
ec685c5e
DE
10556 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10557 LIBS="$LIBS $new_LIBS"
10558 found_usable_python=no
81ecdfbb 10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10560/* end confdefs.h. */
ac534cba 10561#include "Python.h"
81ecdfbb
RW
10562int
10563main ()
10564{
10565Py_Initialize ();
10566 ;
10567 return 0;
10568}
436868fb 10569_ACEOF
81ecdfbb 10570if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10571 have_libpython=${version}
10572 found_usable_python=yes
ac534cba
JB
10573 PYTHON_CPPFLAGS=$new_CPPFLAGS
10574 PYTHON_LIBS=$new_LIBS
436868fb 10575fi
81ecdfbb
RW
10576rm -f core conftest.err conftest.$ac_objext \
10577 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10578 CPPFLAGS=$save_CPPFLAGS
10579 LIBS=$save_LIBS
ec685c5e
DE
10580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10581$as_echo "${found_usable_python}" >&6; }
a9322a30 10582
81ecdfbb 10583 fi
ec685c5e 10584 if test ${have_libpython} = no; then
a9322a30 10585
81ecdfbb 10586 version=python2.4
a9322a30 10587
ec685c5e
DE
10588 new_CPPFLAGS=${python_includes}
10589 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10591$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 10592 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10593 save_LIBS=$LIBS
ec685c5e
DE
10594 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10595 LIBS="$LIBS $new_LIBS"
10596 found_usable_python=no
81ecdfbb 10597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 10598/* end confdefs.h. */
ac534cba 10599#include "Python.h"
a9322a30
TT
10600int
10601main ()
10602{
81ecdfbb 10603Py_Initialize ();
a9322a30
TT
10604 ;
10605 return 0;
10606}
436868fb 10607_ACEOF
81ecdfbb 10608if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
10609 have_libpython=${version}
10610 found_usable_python=yes
ac534cba
JB
10611 PYTHON_CPPFLAGS=$new_CPPFLAGS
10612 PYTHON_LIBS=$new_LIBS
436868fb 10613fi
81ecdfbb
RW
10614rm -f core conftest.err conftest.$ac_objext \
10615 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10616 CPPFLAGS=$save_CPPFLAGS
10617 LIBS=$save_LIBS
ec685c5e
DE
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10619$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10620
ec685c5e
DE
10621 fi
10622 fi
9c4ea6c5 10623 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
10624
10625$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10626
9c4ea6c5 10627 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
10628
10629$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10630
9c4ea6c5 10631 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
10632
10633$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10634
9c4ea6c5 10635 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
10636
10637$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10638
81ecdfbb 10639 fi
ec685c5e
DE
10640
10641 if test "${have_libpython}" = no; then
81ecdfbb
RW
10642 case "${with_python}" in
10643 yes)
10644 as_fn_error "python is missing or unusable" "$LINENO" 5
10645 ;;
10646 auto)
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10648$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10649 ;;
10650 *)
10651 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
10652 ;;
10653 esac
0c4a4063
DE
10654 else
10655 if test -n "${python_prefix}"; then
10656
10657cat >>confdefs.h <<_ACEOF
10658#define WITH_PYTHON_PATH "${python_prefix}"
10659_ACEOF
10660
10661
10662 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10663 if test "x$prefix" = xNONE; then
10664 test_prefix=/usr/local
10665 else
10666 test_prefix=$prefix
10667 fi
10668 else
10669 test_prefix=$exec_prefix
10670 fi
10671 value=0
10672 case ${python_prefix} in
10673 "${test_prefix}"|"${test_prefix}/"*|\
10674 '${exec_prefix}'|'${exec_prefix}/'*)
10675 value=1
10676 ;;
10677 esac
10678
10679cat >>confdefs.h <<_ACEOF
10680#define PYTHON_PATH_RELOCATABLE $value
10681_ACEOF
10682
10683
10684 fi
81ecdfbb 10685 fi
436868fb 10686fi
436868fb 10687
ec685c5e 10688if test "${have_libpython}" != no; then
436868fb 10689
81ecdfbb 10690$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10691
81ecdfbb
RW
10692 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10693 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10694 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10695 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10696 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10697
81ecdfbb
RW
10698 # Flags needed to compile Python code (taken from python-config --cflags).
10699 # We cannot call python-config directly because it will output whatever was
10700 # used when compiling the Python interpreter itself, including flags which
10701 # would make the python-related objects be compiled differently from the
10702 # rest of GDB (e.g., -O2 and -fPIC).
10703 if test "${GCC}" = yes; then
10704 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10705 fi
436868fb 10706
81ecdfbb
RW
10707 if test "x${tentative_python_cflags}" != x; then
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10709$as_echo_n "checking compiler flags for python code... " >&6; }
10710 for flag in ${tentative_python_cflags}; do
10711 # Check that the compiler accepts it
10712 saved_CFLAGS="$CFLAGS"
10713 CFLAGS="$CFLAGS $flag"
10714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10715/* end confdefs.h. */
81ecdfbb 10716
a9322a30
TT
10717int
10718main ()
10719{
a9322a30
TT
10720
10721 ;
10722 return 0;
10723}
bec39cab 10724_ACEOF
81ecdfbb
RW
10725if ac_fn_c_try_compile "$LINENO"; then :
10726 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10727fi
81ecdfbb
RW
10728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10729 CFLAGS="$saved_CFLAGS"
10730 done
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10732$as_echo "${PYTHON_CFLAGS}" >&6; }
10733 fi
043b6510 10734
c83393b9
JB
10735 # On x64 Windows, Python's include headers, and pyconfig.h in
10736 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10737 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10738 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10739 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10740 # The issue was reported to the Python community, but still isn't
10741 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10742
043b6510 10743 case "$gdb_host" in
c83393b9
JB
10744 mingw64)
10745 if test "${GCC}" = yes; then
10746 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10747 fi
10748 ;;
043b6510 10749 esac
a8db4212
YPK
10750
10751 # Note that "python -m threading" cannot be used to check for
10752 # threading support due to a bug in Python 2.7.3
10753 # (http://bugs.python.org/issue15567).
10754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10755$as_echo_n "checking whether python supports threads... " >&6; }
10756 saved_CPPFLAGS="${CPPFLAGS}"
10757 CPPFLAGS="${PYTHON_CPPFLAGS}"
10758 # Note that the test is reversed so that python_has_threads=yes on
10759 # unexpected failures.
10760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10761/* end confdefs.h. */
10762
10763#include <Python.h>
10764#ifdef WITH_THREAD
10765# error
10766#endif
10767
10768_ACEOF
10769if ac_fn_c_try_cpp "$LINENO"; then :
10770 python_has_threads=no
10771else
10772 python_has_threads=yes
10773fi
10774rm -f conftest.err conftest.$ac_ext
10775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10776$as_echo "${python_has_threads}" >&6; }
10777 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 10778else
6dddc817
DE
10779 # Even if Python support is not compiled in, we need to have this file
10780 # included so that the "python" command, et.al., still exists.
8fd8d003 10781 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10782 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10783fi
9a156167 10784
a4a1c157
PA
10785# Work around Python http://bugs.python.org/issue10112. See also
10786# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10787# no effect. Note that the only test after this that uses Python is
10788# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10789# run without -export-dynamic too.
10790PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10791
10792
ed3ef339
DE
10793
10794
4df42755
DE
10795 if test "${have_libpython}" != no; then
10796 HAVE_PYTHON_TRUE=
10797 HAVE_PYTHON_FALSE='#'
10798else
10799 HAVE_PYTHON_TRUE='#'
10800 HAVE_PYTHON_FALSE=
10801fi
10802
ed3ef339
DE
10803
10804# -------------------- #
10805# Check for libguile. #
10806# -------------------- #
10807
10808
e1402065
DE
10809
10810
10811
10812
10813# Check whether --with-guile was given.
10814if test "${with_guile+set}" = set; then :
10815 withval=$with_guile;
10816else
10817 with_guile=auto
10818fi
10819
10820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10821$as_echo_n "checking whether to use guile... " >&6; }
10822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10823$as_echo "$with_guile" >&6; }
10824
ed3ef339
DE
10825# Extract the first word of "pkg-config", so it can be a program name with args.
10826set dummy pkg-config; ac_word=$2
10827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10828$as_echo_n "checking for $ac_word... " >&6; }
10829if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
10830 $as_echo_n "(cached) " >&6
10831else
10832 case $pkg_config_prog_path in
10833 [\\/]* | ?:[\\/]*)
10834 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10835 ;;
10836 *)
10837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10838for as_dir in $PATH
10839do
10840 IFS=$as_save_IFS
10841 test -z "$as_dir" && as_dir=.
10842 for ac_exec_ext in '' $ac_executable_extensions; do
10843 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10844 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10846 break 2
10847 fi
10848done
10849 done
10850IFS=$as_save_IFS
10851
10852 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10853 ;;
10854esac
10855fi
10856pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10857if test -n "$pkg_config_prog_path"; then
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10859$as_echo "$pkg_config_prog_path" >&6; }
10860else
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10862$as_echo "no" >&6; }
10863fi
10864
10865
10866
6e66f753 10867try_guile_versions="guile-2.0"
ed3ef339
DE
10868have_libguile=no
10869case "${with_guile}" in
10870no)
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10872$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10873 ;;
10874auto)
e1402065
DE
10875 if test "${pkg_config_prog_path}" = "missing"; then
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10877$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10878 else
ed3ef339
DE
10879
10880 pkg_config=${pkg_config_prog_path}
10881 guile_version_list=${try_guile_versions}
10882 flag_errors=no
10883
ed3ef339
DE
10884 found_usable_guile=checking
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10886$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10887 for guile_version in ${guile_version_list}; do
10888 ${pkg_config} --exists ${guile_version} 2>/dev/null
10889 if test $? != 0; then
10890 continue
10891 fi
10892 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10893 if test $? != 0; then
10894 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10895 fi
10896 new_LIBS=`${pkg_config} --libs ${guile_version}`
10897 if test $? != 0; then
10898 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10899 fi
10900 found_usable_guile=${guile_version}
10901 break
10902 done
10903 if test "${found_usable_guile}" = "checking"; then
10904 if test "${flag_errors}" = "yes"; then
10905 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10906 else
10907 found_usable_guile=no
10908 fi
10909 fi
10910 if test "${found_usable_guile}" != no; then
10911 save_CPPFLAGS=$CPPFLAGS
10912 save_LIBS=$LIBS
10913 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10914 LIBS="$LIBS $new_LIBS"
10915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10916/* end confdefs.h. */
10917#include "libguile.h"
10918int
10919main ()
10920{
10921scm_init_guile ();
10922 ;
10923 return 0;
10924}
10925_ACEOF
10926if ac_fn_c_try_link "$LINENO"; then :
10927 have_libguile=yes
10928 GUILE_CPPFLAGS=$new_CPPFLAGS
10929 GUILE_LIBS=$new_LIBS
10930else
10931 found_usable_guile=no
10932fi
10933rm -f core conftest.err conftest.$ac_objext \
10934 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
10935 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10936if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
10937
10938$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10939
10940
10941fi
10942
ed3ef339
DE
10943 CPPFLAGS=$save_CPPFLAGS
10944 LIBS=$save_LIBS
10945 if test "${found_usable_guile}" = no; then
10946 if test "${flag_errors}" = yes; then
10947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10949as_fn_error "linking guile version ${guile_version} test program failed
10950See \`config.log' for more details." "$LINENO" 5; }
10951 fi
10952 fi
10953 fi
10954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10955$as_echo "${found_usable_guile}" >&6; }
10956
e1402065 10957 fi
ed3ef339
DE
10958 ;;
10959yes)
e1402065
DE
10960 if test "${pkg_config_prog_path}" = "missing"; then
10961 as_fn_error "pkg-config not found" "$LINENO" 5
10962 fi
ed3ef339
DE
10963
10964 pkg_config=${pkg_config_prog_path}
10965 guile_version_list=${try_guile_versions}
10966 flag_errors=yes
10967
ed3ef339
DE
10968 found_usable_guile=checking
10969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10970$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10971 for guile_version in ${guile_version_list}; do
10972 ${pkg_config} --exists ${guile_version} 2>/dev/null
10973 if test $? != 0; then
10974 continue
10975 fi
10976 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10977 if test $? != 0; then
10978 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10979 fi
10980 new_LIBS=`${pkg_config} --libs ${guile_version}`
10981 if test $? != 0; then
10982 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10983 fi
10984 found_usable_guile=${guile_version}
10985 break
10986 done
10987 if test "${found_usable_guile}" = "checking"; then
10988 if test "${flag_errors}" = "yes"; then
10989 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10990 else
10991 found_usable_guile=no
10992 fi
10993 fi
10994 if test "${found_usable_guile}" != no; then
10995 save_CPPFLAGS=$CPPFLAGS
10996 save_LIBS=$LIBS
10997 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10998 LIBS="$LIBS $new_LIBS"
10999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11000/* end confdefs.h. */
11001#include "libguile.h"
11002int
11003main ()
11004{
11005scm_init_guile ();
11006 ;
11007 return 0;
11008}
11009_ACEOF
11010if ac_fn_c_try_link "$LINENO"; then :
11011 have_libguile=yes
11012 GUILE_CPPFLAGS=$new_CPPFLAGS
11013 GUILE_LIBS=$new_LIBS
11014else
11015 found_usable_guile=no
11016fi
11017rm -f core conftest.err conftest.$ac_objext \
11018 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
11019 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11020if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
11021
11022$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11023
11024
11025fi
11026
ed3ef339
DE
11027 CPPFLAGS=$save_CPPFLAGS
11028 LIBS=$save_LIBS
11029 if test "${found_usable_guile}" = no; then
11030 if test "${flag_errors}" = yes; then
11031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11032$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11033as_fn_error "linking guile version ${guile_version} test program failed
11034See \`config.log' for more details." "$LINENO" 5; }
11035 fi
11036 fi
11037 fi
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11039$as_echo "${found_usable_guile}" >&6; }
11040
11041 ;;
11042[\\/]* | ?:[\\/]*)
e1402065 11043 if test -x "${with_guile}"; then
ed3ef339
DE
11044
11045 pkg_config=${with_guile}
11046 guile_version_list=${try_guile_versions}
11047 flag_errors=yes
11048
ed3ef339
DE
11049 found_usable_guile=checking
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11051$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11052 for guile_version in ${guile_version_list}; do
11053 ${pkg_config} --exists ${guile_version} 2>/dev/null
11054 if test $? != 0; then
11055 continue
11056 fi
11057 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11058 if test $? != 0; then
11059 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11060 fi
11061 new_LIBS=`${pkg_config} --libs ${guile_version}`
11062 if test $? != 0; then
11063 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11064 fi
11065 found_usable_guile=${guile_version}
11066 break
11067 done
11068 if test "${found_usable_guile}" = "checking"; then
11069 if test "${flag_errors}" = "yes"; then
11070 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11071 else
11072 found_usable_guile=no
11073 fi
11074 fi
11075 if test "${found_usable_guile}" != no; then
11076 save_CPPFLAGS=$CPPFLAGS
11077 save_LIBS=$LIBS
11078 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11079 LIBS="$LIBS $new_LIBS"
11080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11081/* end confdefs.h. */
11082#include "libguile.h"
11083int
11084main ()
11085{
11086scm_init_guile ();
11087 ;
11088 return 0;
11089}
11090_ACEOF
11091if ac_fn_c_try_link "$LINENO"; then :
11092 have_libguile=yes
11093 GUILE_CPPFLAGS=$new_CPPFLAGS
11094 GUILE_LIBS=$new_LIBS
11095else
11096 found_usable_guile=no
11097fi
11098rm -f core conftest.err conftest.$ac_objext \
11099 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
11100 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11101if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
11102
11103$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11104
11105
11106fi
11107
ed3ef339
DE
11108 CPPFLAGS=$save_CPPFLAGS
11109 LIBS=$save_LIBS
11110 if test "${found_usable_guile}" = no; then
11111 if test "${flag_errors}" = yes; then
11112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11113$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11114as_fn_error "linking guile version ${guile_version} test program failed
11115See \`config.log' for more details." "$LINENO" 5; }
11116 fi
11117 fi
11118 fi
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11120$as_echo "${found_usable_guile}" >&6; }
11121
e1402065
DE
11122 else
11123 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
11124 fi
ed3ef339
DE
11125 ;;
11126"" | */*)
11127 # Disallow --with=guile="" and --with-guile=foo/bar.
11128 as_fn_error "invalid value for --with-guile" "$LINENO" 5
11129 ;;
11130*)
11131 # A space separate list of guile versions to try, in order.
e1402065
DE
11132 if test "${pkg_config_prog_path}" = "missing"; then
11133 as_fn_error "pkg-config not found" "$LINENO" 5
11134 fi
ed3ef339
DE
11135
11136 pkg_config=${pkg_config_prog_path}
11137 guile_version_list=${with_guile}
11138 flag_errors=yes
11139
ed3ef339
DE
11140 found_usable_guile=checking
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11142$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11143 for guile_version in ${guile_version_list}; do
11144 ${pkg_config} --exists ${guile_version} 2>/dev/null
11145 if test $? != 0; then
11146 continue
11147 fi
11148 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11149 if test $? != 0; then
11150 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11151 fi
11152 new_LIBS=`${pkg_config} --libs ${guile_version}`
11153 if test $? != 0; then
11154 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11155 fi
11156 found_usable_guile=${guile_version}
11157 break
11158 done
11159 if test "${found_usable_guile}" = "checking"; then
11160 if test "${flag_errors}" = "yes"; then
11161 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11162 else
11163 found_usable_guile=no
11164 fi
11165 fi
11166 if test "${found_usable_guile}" != no; then
11167 save_CPPFLAGS=$CPPFLAGS
11168 save_LIBS=$LIBS
11169 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11170 LIBS="$LIBS $new_LIBS"
11171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11172/* end confdefs.h. */
11173#include "libguile.h"
11174int
11175main ()
11176{
11177scm_init_guile ();
11178 ;
11179 return 0;
11180}
11181_ACEOF
11182if ac_fn_c_try_link "$LINENO"; then :
11183 have_libguile=yes
11184 GUILE_CPPFLAGS=$new_CPPFLAGS
11185 GUILE_LIBS=$new_LIBS
11186else
11187 found_usable_guile=no
11188fi
11189rm -f core conftest.err conftest.$ac_objext \
11190 conftest$ac_exeext conftest.$ac_ext
92fab5a6
AW
11191 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11192if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = x""yes; then :
11193
11194$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11195
11196
11197fi
11198
ed3ef339
DE
11199 CPPFLAGS=$save_CPPFLAGS
11200 LIBS=$save_LIBS
11201 if test "${found_usable_guile}" = no; then
11202 if test "${flag_errors}" = yes; then
11203 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11205as_fn_error "linking guile version ${guile_version} test program failed
11206See \`config.log' for more details." "$LINENO" 5; }
11207 fi
11208 fi
11209 fi
11210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11211$as_echo "${found_usable_guile}" >&6; }
11212
11213 ;;
11214esac
11215
e76c5d17 11216if test "${have_libguile}" != no; then
d342a0da
DE
11217 case "${with_guile}" in
11218 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11219
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11221$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11222if test "${ac_cv_guild_program_name+set}" = set; then :
11223 $as_echo_n "(cached) " >&6
11224else
d342a0da 11225 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11226
11227 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11228 # the 'guild' and 'bindir' variables. In that case, try to guess
11229 # what the program name is, at the risk of getting it wrong if
11230 # Guile was configured with '--program-suffix' or similar.
11231 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11232 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11233 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11234 fi
11235
11236fi
11237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11238$as_echo "$ac_cv_guild_program_name" >&6; }
11239
11240 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11241 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11242 fi
11243
11244 GUILD="$ac_cv_guild_program_name"
11245
11246
d342a0da
DE
11247 ;;
11248 *)
11249
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11251$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11252if test "${ac_cv_guild_program_name+set}" = set; then :
11253 $as_echo_n "(cached) " >&6
11254else
11255 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11256
11257 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11258 # the 'guild' and 'bindir' variables. In that case, try to guess
11259 # what the program name is, at the risk of getting it wrong if
11260 # Guile was configured with '--program-suffix' or similar.
11261 if test "x$ac_cv_guild_program_name" = "x"; then
11262 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11263 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11264 fi
11265
11266fi
11267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11268$as_echo "$ac_cv_guild_program_name" >&6; }
11269
11270 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11271 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11272 fi
11273
11274 GUILD="$ac_cv_guild_program_name"
11275
11276
11277 ;;
11278 esac
e76c5d17
DE
11279
11280
11281 if test "$cross_compiling" = no; then
11282 GUILD_TARGET_FLAG=
11283 else
11284 GUILD_TARGET_FLAG="--target=$host"
11285 fi
11286
11287
11288
11289
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11291$as_echo_n "checking whether guild supports this host... " >&6; }
11292if test "${ac_cv_guild_ok+set}" = set; then :
11293 $as_echo_n "(cached) " >&6
11294else
11295 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11296 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11297 ac_cv_guild_ok=yes
11298 else
11299 ac_cv_guild_ok=no
11300 fi
11301fi
11302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11303$as_echo "$ac_cv_guild_ok" >&6; }
11304
11305 if test "$ac_cv_guild_ok" = no; then
11306 have_libguile=no
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11308$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11309 fi
11310fi
11311
ed3ef339
DE
11312if test "${have_libguile}" != no; then
11313
11314$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11315
11316 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11317 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11318 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11319 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11320 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11321
11322 save_LIBS="$LIBS"
11323 save_CPPFLAGS="$CPPFLAGS"
11324 LIBS="$GUILE_LIBS"
11325 CPPFLAGS="$GUILE_CPPFLAGS"
11326 for ac_func in scm_new_smob
11327do :
11328 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11329if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
11330 cat >>confdefs.h <<_ACEOF
11331#define HAVE_SCM_NEW_SMOB 1
11332_ACEOF
11333
11334fi
11335done
11336
11337 LIBS="$save_LIBS"
11338 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11339else
11340 # Even if Guile support is not compiled in, we need to have these files
11341 # included.
bd810fff 11342 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11343 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11344fi
9a156167 11345
ac534cba 11346
4df42755
DE
11347 if test "${have_libguile}" != no; then
11348 HAVE_GUILE_TRUE=
11349 HAVE_GUILE_FALSE='#'
11350else
11351 HAVE_GUILE_TRUE='#'
11352 HAVE_GUILE_FALSE=
11353fi
11354
ac534cba 11355
d344e670
DE
11356# --------------------- #
11357# Check for libmcheck. #
11358# --------------------- #
11359
a8db4212
YPK
11360# Enable -lmcheck by default (it provides cheap-enough memory mangling),
11361# but turn it off if Python is enabled with threads, since -lmcheck is
11362# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11363# and for releases.
17ef446e
PA
11364if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11365 && $development; then
11366 libmcheck_default=yes
11367else
11368 libmcheck_default=no
a8db4212
YPK
11369fi
11370
17ef446e
PA
11371 # Check whether --enable-libmcheck was given.
11372if test "${enable_libmcheck+set}" = set; then :
11373 enableval=$enable_libmcheck; case "${enableval}" in
11374 yes | y) ENABLE_LIBMCHECK="yes" ;;
11375 no | n) ENABLE_LIBMCHECK="no" ;;
11376 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
11377 esac
11378fi
11379
11380
11381 if test -z "${ENABLE_LIBMCHECK}"; then
11382 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 11383 fi
17ef446e
PA
11384
11385 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
11387$as_echo_n "checking for main in -lmcheck... " >&6; }
11388if test "${ac_cv_lib_mcheck_main+set}" = set; then :
11389 $as_echo_n "(cached) " >&6
11390else
11391 ac_check_lib_save_LIBS=$LIBS
11392LIBS="-lmcheck $LIBS"
11393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11394/* end confdefs.h. */
11395
11396
11397int
11398main ()
11399{
11400return main ();
11401 ;
11402 return 0;
11403}
11404_ACEOF
11405if ac_fn_c_try_link "$LINENO"; then :
11406 ac_cv_lib_mcheck_main=yes
11407else
11408 ac_cv_lib_mcheck_main=no
11409fi
11410rm -f core conftest.err conftest.$ac_objext \
11411 conftest$ac_exeext conftest.$ac_ext
11412LIBS=$ac_check_lib_save_LIBS
11413fi
11414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11415$as_echo "$ac_cv_lib_mcheck_main" >&6; }
11416if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
11417 cat >>confdefs.h <<_ACEOF
11418#define HAVE_LIBMCHECK 1
11419_ACEOF
11420
11421 LIBS="-lmcheck $LIBS"
11422
11423fi
11424
17ef446e
PA
11425 fi
11426
11427
11428if test "$ENABLE_LIBMCHECK" = "yes" \
11429 -a "${have_libpython}" != "no" \
11430 -a "${python_has_threads}" = "yes" ; then
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11432$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
11433fi
11434
58bfce93
MM
11435
11436# Check whether --with-intel_pt was given.
11437if test "${with_intel_pt+set}" = set; then :
11438 withval=$with_intel_pt;
11439else
11440 with_intel_pt=auto
11441fi
11442
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11444$as_echo_n "checking whether to use intel pt... " >&6; }
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11446$as_echo "$with_intel_pt" >&6; }
11447
11448if test "${with_intel_pt}" = no; then
bc504a31
PA
11449 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11450$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
58bfce93
MM
11451 HAVE_LIBIPT=no
11452else
5599c404
MM
11453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11454/* end confdefs.h. */
11455
11456#include <linux/perf_event.h>
11457#ifndef PERF_ATTR_SIZE_VER5
11458# error
11459#endif
11460
11461_ACEOF
11462if ac_fn_c_try_cpp "$LINENO"; then :
11463 perf_event=yes
11464else
11465 perf_event=no
11466fi
11467rm -f conftest.err conftest.$ac_ext
11468 if test "$perf_event" != yes; then
11469 if test "$with_intel_pt" = yes; then
11470 as_fn_error "linux/perf_event.h missing or too old" "$LINENO" 5
11471 else
11472 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11473$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11474 fi
11475 fi
11476
58bfce93
MM
11477
11478
11479
11480
11481
11482
11483
11484
11485 use_additional=yes
11486
11487 acl_save_prefix="$prefix"
11488 prefix="$acl_final_prefix"
11489 acl_save_exec_prefix="$exec_prefix"
11490 exec_prefix="$acl_final_exec_prefix"
11491
11492 eval additional_includedir=\"$includedir\"
11493 eval additional_libdir=\"$libdir\"
11494
11495 exec_prefix="$acl_save_exec_prefix"
11496 prefix="$acl_save_prefix"
11497
11498
11499# Check whether --with-libipt-prefix was given.
11500if test "${with_libipt_prefix+set}" = set; then :
11501 withval=$with_libipt_prefix;
11502 if test "X$withval" = "Xno"; then
11503 use_additional=no
11504 else
11505 if test "X$withval" = "X"; then
11506
11507 acl_save_prefix="$prefix"
11508 prefix="$acl_final_prefix"
11509 acl_save_exec_prefix="$exec_prefix"
11510 exec_prefix="$acl_final_exec_prefix"
11511
11512 eval additional_includedir=\"$includedir\"
11513 eval additional_libdir=\"$libdir\"
11514
11515 exec_prefix="$acl_save_exec_prefix"
11516 prefix="$acl_save_prefix"
11517
11518 else
11519 additional_includedir="$withval/include"
11520 additional_libdir="$withval/lib"
11521 fi
11522 fi
11523
11524fi
11525
11526 LIBIPT=
11527 LTLIBIPT=
11528 INCIPT=
11529 rpathdirs=
11530 ltrpathdirs=
11531 names_already_handled=
11532 names_next_round='ipt '
11533 while test -n "$names_next_round"; do
11534 names_this_round="$names_next_round"
11535 names_next_round=
11536 for name in $names_this_round; do
11537 already_handled=
11538 for n in $names_already_handled; do
11539 if test "$n" = "$name"; then
11540 already_handled=yes
11541 break
11542 fi
11543 done
11544 if test -z "$already_handled"; then
11545 names_already_handled="$names_already_handled $name"
11546 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11547 eval value=\"\$HAVE_LIB$uppername\"
11548 if test -n "$value"; then
11549 if test "$value" = yes; then
11550 eval value=\"\$LIB$uppername\"
11551 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11552 eval value=\"\$LTLIB$uppername\"
11553 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11554 else
11555 :
11556 fi
11557 else
11558 found_dir=
11559 found_la=
11560 found_so=
11561 found_a=
11562 if test $use_additional = yes; then
11563 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11564 found_dir="$additional_libdir"
11565 found_so="$additional_libdir/lib$name.$shlibext"
11566 if test -f "$additional_libdir/lib$name.la"; then
11567 found_la="$additional_libdir/lib$name.la"
11568 fi
11569 else
11570 if test -f "$additional_libdir/lib$name.$libext"; then
11571 found_dir="$additional_libdir"
11572 found_a="$additional_libdir/lib$name.$libext"
11573 if test -f "$additional_libdir/lib$name.la"; then
11574 found_la="$additional_libdir/lib$name.la"
11575 fi
11576 fi
11577 fi
11578 fi
11579 if test "X$found_dir" = "X"; then
11580 for x in $LDFLAGS $LTLIBIPT; do
11581
11582 acl_save_prefix="$prefix"
11583 prefix="$acl_final_prefix"
11584 acl_save_exec_prefix="$exec_prefix"
11585 exec_prefix="$acl_final_exec_prefix"
11586 eval x=\"$x\"
11587 exec_prefix="$acl_save_exec_prefix"
11588 prefix="$acl_save_prefix"
11589
11590 case "$x" in
11591 -L*)
11592 dir=`echo "X$x" | sed -e 's/^X-L//'`
11593 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11594 found_dir="$dir"
11595 found_so="$dir/lib$name.$shlibext"
11596 if test -f "$dir/lib$name.la"; then
11597 found_la="$dir/lib$name.la"
11598 fi
11599 else
11600 if test -f "$dir/lib$name.$libext"; then
11601 found_dir="$dir"
11602 found_a="$dir/lib$name.$libext"
11603 if test -f "$dir/lib$name.la"; then
11604 found_la="$dir/lib$name.la"
11605 fi
11606 fi
11607 fi
11608 ;;
11609 esac
11610 if test "X$found_dir" != "X"; then
11611 break
11612 fi
11613 done
11614 fi
11615 if test "X$found_dir" != "X"; then
11616 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11617 if test "X$found_so" != "X"; then
11618 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11619 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11620 else
11621 haveit=
11622 for x in $ltrpathdirs; do
11623 if test "X$x" = "X$found_dir"; then
11624 haveit=yes
11625 break
11626 fi
11627 done
11628 if test -z "$haveit"; then
11629 ltrpathdirs="$ltrpathdirs $found_dir"
11630 fi
11631 if test "$hardcode_direct" = yes; then
11632 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11633 else
11634 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11635 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11636 haveit=
11637 for x in $rpathdirs; do
11638 if test "X$x" = "X$found_dir"; then
11639 haveit=yes
11640 break
11641 fi
11642 done
11643 if test -z "$haveit"; then
11644 rpathdirs="$rpathdirs $found_dir"
11645 fi
11646 else
11647 haveit=
11648 for x in $LDFLAGS $LIBIPT; do
11649
11650 acl_save_prefix="$prefix"
11651 prefix="$acl_final_prefix"
11652 acl_save_exec_prefix="$exec_prefix"
11653 exec_prefix="$acl_final_exec_prefix"
11654 eval x=\"$x\"
11655 exec_prefix="$acl_save_exec_prefix"
11656 prefix="$acl_save_prefix"
11657
11658 if test "X$x" = "X-L$found_dir"; then
11659 haveit=yes
11660 break
11661 fi
11662 done
11663 if test -z "$haveit"; then
11664 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11665 fi
11666 if test "$hardcode_minus_L" != no; then
11667 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11668 else
11669 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11670 fi
11671 fi
11672 fi
11673 fi
11674 else
11675 if test "X$found_a" != "X"; then
11676 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11677 else
11678 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11679 fi
11680 fi
11681 additional_includedir=
11682 case "$found_dir" in
11683 */lib | */lib/)
11684 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11685 additional_includedir="$basedir/include"
11686 ;;
11687 esac
11688 if test "X$additional_includedir" != "X"; then
11689 if test "X$additional_includedir" != "X/usr/include"; then
11690 haveit=
11691 if test "X$additional_includedir" = "X/usr/local/include"; then
11692 if test -n "$GCC"; then
11693 case $host_os in
11694 linux*) haveit=yes;;
11695 esac
11696 fi
11697 fi
11698 if test -z "$haveit"; then
11699 for x in $CPPFLAGS $INCIPT; do
11700
11701 acl_save_prefix="$prefix"
11702 prefix="$acl_final_prefix"
11703 acl_save_exec_prefix="$exec_prefix"
11704 exec_prefix="$acl_final_exec_prefix"
11705 eval x=\"$x\"
11706 exec_prefix="$acl_save_exec_prefix"
11707 prefix="$acl_save_prefix"
11708
11709 if test "X$x" = "X-I$additional_includedir"; then
11710 haveit=yes
11711 break
11712 fi
11713 done
11714 if test -z "$haveit"; then
11715 if test -d "$additional_includedir"; then
11716 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11717 fi
11718 fi
11719 fi
11720 fi
11721 fi
11722 if test -n "$found_la"; then
11723 save_libdir="$libdir"
11724 case "$found_la" in
11725 */* | *\\*) . "$found_la" ;;
11726 *) . "./$found_la" ;;
11727 esac
11728 libdir="$save_libdir"
11729 for dep in $dependency_libs; do
11730 case "$dep" in
11731 -L*)
11732 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11733 if test "X$additional_libdir" != "X/usr/lib"; then
11734 haveit=
11735 if test "X$additional_libdir" = "X/usr/local/lib"; then
11736 if test -n "$GCC"; then
11737 case $host_os in
11738 linux*) haveit=yes;;
11739 esac
11740 fi
11741 fi
11742 if test -z "$haveit"; then
11743 haveit=
11744 for x in $LDFLAGS $LIBIPT; do
11745
11746 acl_save_prefix="$prefix"
11747 prefix="$acl_final_prefix"
11748 acl_save_exec_prefix="$exec_prefix"
11749 exec_prefix="$acl_final_exec_prefix"
11750 eval x=\"$x\"
11751 exec_prefix="$acl_save_exec_prefix"
11752 prefix="$acl_save_prefix"
11753
11754 if test "X$x" = "X-L$additional_libdir"; then
11755 haveit=yes
11756 break
11757 fi
11758 done
11759 if test -z "$haveit"; then
11760 if test -d "$additional_libdir"; then
11761 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11762 fi
11763 fi
11764 haveit=
11765 for x in $LDFLAGS $LTLIBIPT; do
11766
11767 acl_save_prefix="$prefix"
11768 prefix="$acl_final_prefix"
11769 acl_save_exec_prefix="$exec_prefix"
11770 exec_prefix="$acl_final_exec_prefix"
11771 eval x=\"$x\"
11772 exec_prefix="$acl_save_exec_prefix"
11773 prefix="$acl_save_prefix"
11774
11775 if test "X$x" = "X-L$additional_libdir"; then
11776 haveit=yes
11777 break
11778 fi
11779 done
11780 if test -z "$haveit"; then
11781 if test -d "$additional_libdir"; then
11782 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11783 fi
11784 fi
11785 fi
11786 fi
11787 ;;
11788 -R*)
11789 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11790 if test "$enable_rpath" != no; then
11791 haveit=
11792 for x in $rpathdirs; do
11793 if test "X$x" = "X$dir"; then
11794 haveit=yes
11795 break
11796 fi
11797 done
11798 if test -z "$haveit"; then
11799 rpathdirs="$rpathdirs $dir"
11800 fi
11801 haveit=
11802 for x in $ltrpathdirs; do
11803 if test "X$x" = "X$dir"; then
11804 haveit=yes
11805 break
11806 fi
11807 done
11808 if test -z "$haveit"; then
11809 ltrpathdirs="$ltrpathdirs $dir"
11810 fi
11811 fi
11812 ;;
11813 -l*)
11814 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11815 ;;
11816 *.la)
11817 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11818 ;;
11819 *)
11820 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11821 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11822 ;;
11823 esac
11824 done
11825 fi
11826 else
11827 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11828 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11829 fi
11830 fi
11831 fi
11832 done
11833 done
11834 if test "X$rpathdirs" != "X"; then
11835 if test -n "$hardcode_libdir_separator"; then
11836 alldirs=
11837 for found_dir in $rpathdirs; do
11838 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11839 done
11840 acl_save_libdir="$libdir"
11841 libdir="$alldirs"
11842 eval flag=\"$hardcode_libdir_flag_spec\"
11843 libdir="$acl_save_libdir"
11844 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11845 else
11846 for found_dir in $rpathdirs; do
11847 acl_save_libdir="$libdir"
11848 libdir="$found_dir"
11849 eval flag=\"$hardcode_libdir_flag_spec\"
11850 libdir="$acl_save_libdir"
11851 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11852 done
11853 fi
11854 fi
11855 if test "X$ltrpathdirs" != "X"; then
11856 for found_dir in $ltrpathdirs; do
11857 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11858 done
11859 fi
11860
11861
11862 ac_save_CPPFLAGS="$CPPFLAGS"
11863
11864 for element in $INCIPT; do
11865 haveit=
11866 for x in $CPPFLAGS; do
11867
11868 acl_save_prefix="$prefix"
11869 prefix="$acl_final_prefix"
11870 acl_save_exec_prefix="$exec_prefix"
11871 exec_prefix="$acl_final_exec_prefix"
11872 eval x=\"$x\"
11873 exec_prefix="$acl_save_exec_prefix"
11874 prefix="$acl_save_prefix"
11875
11876 if test "X$x" = "X$element"; then
11877 haveit=yes
11878 break
11879 fi
11880 done
11881 if test -z "$haveit"; then
11882 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11883 fi
11884 done
11885
11886
11887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11888$as_echo_n "checking for libipt... " >&6; }
11889if test "${ac_cv_libipt+set}" = set; then :
11890 $as_echo_n "(cached) " >&6
11891else
11892
11893 ac_save_LIBS="$LIBS"
11894 LIBS="$LIBS $LIBIPT"
11895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11896/* end confdefs.h. */
11897#include "intel-pt.h"
11898int
11899main ()
11900{
11901pt_insn_alloc_decoder (0);
11902 ;
11903 return 0;
11904}
11905_ACEOF
11906if ac_fn_c_try_link "$LINENO"; then :
11907 ac_cv_libipt=yes
11908else
11909 ac_cv_libipt=no
11910fi
11911rm -f core conftest.err conftest.$ac_objext \
11912 conftest$ac_exeext conftest.$ac_ext
11913 LIBS="$ac_save_LIBS"
11914
11915fi
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11917$as_echo "$ac_cv_libipt" >&6; }
11918 if test "$ac_cv_libipt" = yes; then
11919 HAVE_LIBIPT=yes
11920
11921$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
11922
11923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
11924$as_echo_n "checking how to link with libipt... " >&6; }
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
11926$as_echo "$LIBIPT" >&6; }
11927 else
11928 HAVE_LIBIPT=no
11929 CPPFLAGS="$ac_save_CPPFLAGS"
11930 LIBIPT=
11931 LTLIBIPT=
11932 fi
11933
11934
11935
11936
11937
11938
11939 if test "$HAVE_LIBIPT" != yes; then
11940 if test "$with_intel_pt" = yes; then
11941 as_fn_error "libipt is missing or unusable" "$LINENO" 5
11942 else
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
11944$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
11945 fi
c56ccc05
MM
11946 else
11947 save_LIBS=$LIBS
11948 LIBS="$LIBS $LIBIPT"
11949 for ac_func in pt_insn_event
11950do :
11951 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
11952if test "x$ac_cv_func_pt_insn_event" = x""yes; then :
11953 cat >>confdefs.h <<_ACEOF
11954#define HAVE_PT_INSN_EVENT 1
11955_ACEOF
11956
11957fi
11958done
11959
11960 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
11961"
11962if test "x$ac_cv_member_struct_pt_insn_enabled" = x""yes; then :
11963
11964cat >>confdefs.h <<_ACEOF
11965#define HAVE_STRUCT_PT_INSN_ENABLED 1
11966_ACEOF
11967
11968
11969fi
11970ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
11971"
11972if test "x$ac_cv_member_struct_pt_insn_resynced" = x""yes; then :
11973
11974cat >>confdefs.h <<_ACEOF
11975#define HAVE_STRUCT_PT_INSN_RESYNCED 1
11976_ACEOF
11977
11978
11979fi
11980
11981 LIBS=$save_LIBS
58bfce93
MM
11982 fi
11983fi
11984
81ecdfbb
RW
11985# ------------------------- #
11986# Checks for header files. #
11987# ------------------------- #
c890192f 11988
81ecdfbb
RW
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11990$as_echo_n "checking for ANSI C header files... " >&6; }
11991if test "${ac_cv_header_stdc+set}" = set; then :
11992 $as_echo_n "(cached) " >&6
bec39cab 11993else
81ecdfbb 11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11995/* end confdefs.h. */
81ecdfbb
RW
11996#include <stdlib.h>
11997#include <stdarg.h>
11998#include <string.h>
11999#include <float.h>
12000
a9322a30
TT
12001int
12002main ()
12003{
a9322a30
TT
12004
12005 ;
12006 return 0;
12007}
bec39cab 12008_ACEOF
81ecdfbb
RW
12009if ac_fn_c_try_compile "$LINENO"; then :
12010 ac_cv_header_stdc=yes
bec39cab 12011else
81ecdfbb 12012 ac_cv_header_stdc=no
a9322a30 12013fi
81ecdfbb 12014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12015
81ecdfbb
RW
12016if test $ac_cv_header_stdc = yes; then
12017 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12019/* end confdefs.h. */
12020#include <string.h>
bec39cab 12021
81ecdfbb
RW
12022_ACEOF
12023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12024 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12025
bec39cab 12026else
81ecdfbb
RW
12027 ac_cv_header_stdc=no
12028fi
12029rm -f conftest*
12030
12031fi
12032
12033if test $ac_cv_header_stdc = yes; then
12034 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12036/* end confdefs.h. */
12037#include <stdlib.h>
12038
bec39cab 12039_ACEOF
81ecdfbb
RW
12040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12041 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 12042
81ecdfbb
RW
12043else
12044 ac_cv_header_stdc=no
12045fi
12046rm -f conftest*
bec39cab 12047
bec39cab 12048fi
81ecdfbb
RW
12049
12050if test $ac_cv_header_stdc = yes; then
12051 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12052 if test "$cross_compiling" = yes; then :
12053 :
bec39cab 12054else
81ecdfbb 12055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12056/* end confdefs.h. */
81ecdfbb
RW
12057#include <ctype.h>
12058#include <stdlib.h>
12059#if ((' ' & 0x0FF) == 0x020)
12060# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12061# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12062#else
12063# define ISLOWER(c) \
12064 (('a' <= (c) && (c) <= 'i') \
12065 || ('j' <= (c) && (c) <= 'r') \
12066 || ('s' <= (c) && (c) <= 'z'))
12067# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12068#endif
12069
12070#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12071int
12072main ()
12073{
81ecdfbb
RW
12074 int i;
12075 for (i = 0; i < 256; i++)
12076 if (XOR (islower (i), ISLOWER (i))
12077 || toupper (i) != TOUPPER (i))
12078 return 2;
a9322a30
TT
12079 return 0;
12080}
bec39cab 12081_ACEOF
81ecdfbb
RW
12082if ac_fn_c_try_run "$LINENO"; then :
12083
bec39cab 12084else
81ecdfbb
RW
12085 ac_cv_header_stdc=no
12086fi
12087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12088 conftest.$ac_objext conftest.beam conftest.$ac_ext
12089fi
bec39cab 12090
bec39cab 12091fi
a9322a30 12092fi
81ecdfbb
RW
12093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12094$as_echo "$ac_cv_header_stdc" >&6; }
12095if test $ac_cv_header_stdc = yes; then
bec39cab 12096
81ecdfbb 12097$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 12098
81ecdfbb 12099fi
bec39cab 12100
81ecdfbb 12101# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 12102for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 12103 thread_db.h \
81ecdfbb
RW
12104 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12105 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
44122162 12106 sys/reg.h sys/debugreg.h sys/select.h \
726e1356 12107 termios.h elf_hp.h \
9467110b 12108 dlfcn.h
81ecdfbb
RW
12109do :
12110 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12111ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12112eval as_val=\$$as_ac_Header
12113 if test "x$as_val" = x""yes; then :
bec39cab 12114 cat >>confdefs.h <<_ACEOF
81ecdfbb 12115#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12116_ACEOF
c906108c 12117
bec39cab 12118fi
81ecdfbb
RW
12119
12120done
12121
81ecdfbb
RW
12122for ac_header in sys/user.h
12123do :
12124 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12125# include <sys/param.h>
a9322a30
TT
12126#endif
12127
81ecdfbb
RW
12128"
12129if test "x$ac_cv_header_sys_user_h" = x""yes; then :
12130 cat >>confdefs.h <<_ACEOF
12131#define HAVE_SYS_USER_H 1
bec39cab 12132_ACEOF
bec39cab 12133
a9322a30 12134fi
bec39cab 12135
81ecdfbb 12136done
5ee754fc 12137
5ee754fc 12138
5007d765 12139for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
81ecdfbb
RW
12140do :
12141 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12142ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12143eval as_val=\$$as_ac_Header
12144 if test "x$as_val" = x""yes; then :
bec39cab 12145 cat >>confdefs.h <<_ACEOF
81ecdfbb 12146#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12147_ACEOF
5ee754fc
MK
12148
12149fi
12150
81ecdfbb 12151done
bec39cab 12152
81ecdfbb
RW
12153for ac_header in term.h
12154do :
12155 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12156# include <curses.h>
12157#endif
bec39cab 12158
81ecdfbb
RW
12159"
12160if test "x$ac_cv_header_term_h" = x""yes; then :
12161 cat >>confdefs.h <<_ACEOF
12162#define HAVE_TERM_H 1
a8111142 12163_ACEOF
a8111142 12164
a8111142 12165fi
a8111142 12166
81ecdfbb 12167done
a8111142
TT
12168
12169
81ecdfbb
RW
12170# ------------------------- #
12171# Checks for declarations. #
12172# ------------------------- #
a9322a30 12173
07697489
PA
12174
12175 # Check for presence and size of long long.
12176 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12177if test "x$ac_cv_type_long_long" = x""yes; then :
12178
12179cat >>confdefs.h <<_ACEOF
12180#define HAVE_LONG_LONG 1
12181_ACEOF
12182
12183# The cast to long int works around a bug in the HP C Compiler
12184# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12185# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12186# This bug is HP SR number 8606223364.
12187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12188$as_echo_n "checking size of long long... " >&6; }
12189if test "${ac_cv_sizeof_long_long+set}" = set; then :
12190 $as_echo_n "(cached) " >&6
12191else
12192 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12193
12194else
12195 if test "$ac_cv_type_long_long" = yes; then
12196 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12197$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12198{ as_fn_set_status 77
12199as_fn_error "cannot compute sizeof (long long)
12200See \`config.log' for more details." "$LINENO" 5; }; }
12201 else
12202 ac_cv_sizeof_long_long=0
12203 fi
12204fi
12205
12206fi
12207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12208$as_echo "$ac_cv_sizeof_long_long" >&6; }
12209
12210
12211
12212cat >>confdefs.h <<_ACEOF
12213#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12214_ACEOF
12215
12216
12217fi
12218
12219
12220 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
12221if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
12222 ac_have_decl=1
12223else
12224 ac_have_decl=0
12225fi
12226
12227cat >>confdefs.h <<_ACEOF
12228#define HAVE_DECL_BASENAME $ac_have_decl
12229_ACEOF
12230ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12231if test "x$ac_cv_have_decl_ffs" = x""yes; then :
12232 ac_have_decl=1
12233else
12234 ac_have_decl=0
12235fi
12236
12237cat >>confdefs.h <<_ACEOF
12238#define HAVE_DECL_FFS $ac_have_decl
12239_ACEOF
12240ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12241if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
12242 ac_have_decl=1
12243else
12244 ac_have_decl=0
12245fi
12246
12247cat >>confdefs.h <<_ACEOF
12248#define HAVE_DECL_ASPRINTF $ac_have_decl
12249_ACEOF
12250ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12251if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
12252 ac_have_decl=1
12253else
12254 ac_have_decl=0
12255fi
12256
12257cat >>confdefs.h <<_ACEOF
12258#define HAVE_DECL_VASPRINTF $ac_have_decl
12259_ACEOF
12260ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12261if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
12262 ac_have_decl=1
12263else
12264 ac_have_decl=0
12265fi
12266
12267cat >>confdefs.h <<_ACEOF
12268#define HAVE_DECL_SNPRINTF $ac_have_decl
12269_ACEOF
12270ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12271if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
12272 ac_have_decl=1
12273else
12274 ac_have_decl=0
12275fi
12276
12277cat >>confdefs.h <<_ACEOF
12278#define HAVE_DECL_VSNPRINTF $ac_have_decl
12279_ACEOF
12280
12281 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12282if test "x$ac_cv_have_decl_strtol" = x""yes; then :
12283 ac_have_decl=1
12284else
12285 ac_have_decl=0
12286fi
12287
12288cat >>confdefs.h <<_ACEOF
12289#define HAVE_DECL_STRTOL $ac_have_decl
12290_ACEOF
12291ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12292if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
12293 ac_have_decl=1
12294else
12295 ac_have_decl=0
12296fi
12297
12298cat >>confdefs.h <<_ACEOF
12299#define HAVE_DECL_STRTOUL $ac_have_decl
12300_ACEOF
12301ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12302if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
12303 ac_have_decl=1
12304else
12305 ac_have_decl=0
12306fi
12307
12308cat >>confdefs.h <<_ACEOF
12309#define HAVE_DECL_STRTOLL $ac_have_decl
12310_ACEOF
12311ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12312if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
12313 ac_have_decl=1
12314else
12315 ac_have_decl=0
12316fi
12317
12318cat >>confdefs.h <<_ACEOF
12319#define HAVE_DECL_STRTOULL $ac_have_decl
12320_ACEOF
12321
12322 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12323if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
12324 ac_have_decl=1
12325else
12326 ac_have_decl=0
12327fi
12328
12329cat >>confdefs.h <<_ACEOF
12330#define HAVE_DECL_STRVERSCMP $ac_have_decl
12331_ACEOF
12332
12333
12334
81ecdfbb
RW
12335ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
12336if test "x$ac_cv_have_decl_free" = x""yes; then :
12337 ac_have_decl=1
bec39cab 12338else
81ecdfbb
RW
12339 ac_have_decl=0
12340fi
12341
12342cat >>confdefs.h <<_ACEOF
12343#define HAVE_DECL_FREE $ac_have_decl
bec39cab 12344_ACEOF
81ecdfbb
RW
12345ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
12346if test "x$ac_cv_have_decl_malloc" = x""yes; then :
12347 ac_have_decl=1
12348else
12349 ac_have_decl=0
12350fi
12351
12352cat >>confdefs.h <<_ACEOF
12353#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 12354_ACEOF
81ecdfbb
RW
12355ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
12356if test "x$ac_cv_have_decl_realloc" = x""yes; then :
12357 ac_have_decl=1
bec39cab 12358else
81ecdfbb
RW
12359 ac_have_decl=0
12360fi
bec39cab 12361
81ecdfbb
RW
12362cat >>confdefs.h <<_ACEOF
12363#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 12364_ACEOF
81ecdfbb
RW
12365ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12366if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
12367 ac_have_decl=1
12368else
12369 ac_have_decl=0
5ee754fc 12370fi
81ecdfbb
RW
12371
12372cat >>confdefs.h <<_ACEOF
12373#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 12374_ACEOF
5ee754fc 12375
5ee754fc 12376
81ecdfbb
RW
12377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12378$as_echo_n "checking for LC_MESSAGES... " >&6; }
12379if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
12380 $as_echo_n "(cached) " >&6
bec39cab 12381else
81ecdfbb 12382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12383/* end confdefs.h. */
81ecdfbb 12384#include <locale.h>
a9322a30
TT
12385int
12386main ()
12387{
81ecdfbb 12388return LC_MESSAGES
a9322a30
TT
12389 ;
12390 return 0;
12391}
bec39cab 12392_ACEOF
81ecdfbb
RW
12393if ac_fn_c_try_link "$LINENO"; then :
12394 am_cv_val_LC_MESSAGES=yes
bec39cab 12395else
81ecdfbb
RW
12396 am_cv_val_LC_MESSAGES=no
12397fi
12398rm -f core conftest.err conftest.$ac_objext \
12399 conftest$ac_exeext conftest.$ac_ext
12400fi
12401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12402$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12403 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12404
81ecdfbb
RW
12405$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12406
12407 fi
12408
12409
12410# ----------------------- #
12411# Checks for structures. #
12412# ----------------------- #
12413
12414ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
12415if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
12416
12417cat >>confdefs.h <<_ACEOF
12418#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 12419_ACEOF
7eb368b3 12420
81ecdfbb 12421
7eb368b3 12422fi
81ecdfbb
RW
12423ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12424if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 12425
a9322a30
TT
12426cat >>confdefs.h <<_ACEOF
12427#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
12428_ACEOF
12429
a9322a30 12430
7eb368b3
NR
12431fi
12432
7eb368b3 12433
a9322a30
TT
12434# ------------------ #
12435# Checks for types. #
12436# ------------------ #
7eb368b3 12437
81ecdfbb 12438ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
12439#include <sys/socket.h>
12440
81ecdfbb
RW
12441"
12442if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 12443
a9322a30
TT
12444cat >>confdefs.h <<_ACEOF
12445#define HAVE_SOCKLEN_T 1
12446_ACEOF
12447
12448
12449fi
12450
12451
12452# ------------------------------------- #
12453# Checks for compiler characteristics. #
12454# ------------------------------------- #
12455
81ecdfbb
RW
12456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12457$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12458if test "${ac_cv_c_const+set}" = set; then :
12459 $as_echo_n "(cached) " >&6
a9322a30 12460else
81ecdfbb 12461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12462/* end confdefs.h. */
a9322a30
TT
12463
12464int
12465main ()
12466{
12467/* FIXME: Include the comments suggested by Paul. */
12468#ifndef __cplusplus
12469 /* Ultrix mips cc rejects this. */
12470 typedef int charset[2];
81ecdfbb 12471 const charset cs;
a9322a30 12472 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
12473 char const *const *pcpcc;
12474 char **ppc;
a9322a30
TT
12475 /* NEC SVR4.0.2 mips cc rejects this. */
12476 struct point {int x, y;};
12477 static struct point const zero = {0,0};
12478 /* AIX XL C 1.02.0.0 rejects this.
12479 It does not let you subtract one const X* pointer from another in
12480 an arm of an if-expression whose if-part is not a constant
12481 expression */
12482 const char *g = "string";
81ecdfbb 12483 pcpcc = &g + (g ? g-g : 0);
a9322a30 12484 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
12485 ++pcpcc;
12486 ppc = (char**) pcpcc;
12487 pcpcc = (char const *const *) ppc;
a9322a30
TT
12488 { /* SCO 3.2v4 cc rejects this. */
12489 char *t;
12490 char const *s = 0 ? (char *) 0 : (char const *) 0;
12491
12492 *t++ = 0;
81ecdfbb 12493 if (s) return 0;
a9322a30
TT
12494 }
12495 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12496 int x[] = {25, 17};
12497 const int *foo = &x[0];
12498 ++foo;
12499 }
12500 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12501 typedef const int *iptr;
12502 iptr p = 0;
12503 ++p;
12504 }
12505 { /* AIX XL C 1.02.0.0 rejects this saying
12506 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12507 struct s { int j; const int *ap[3]; };
12508 struct s *b; b->j = 5;
12509 }
12510 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12511 const int foo = 10;
81ecdfbb 12512 if (!foo) return 0;
a9322a30 12513 }
81ecdfbb 12514 return !cs[0] && !zero.x;
a9322a30
TT
12515#endif
12516
12517 ;
12518 return 0;
12519}
bec39cab 12520_ACEOF
81ecdfbb 12521if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12522 ac_cv_c_const=yes
5ee754fc 12523else
81ecdfbb 12524 ac_cv_c_const=no
5ee754fc 12525fi
81ecdfbb 12526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12527fi
81ecdfbb
RW
12528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12529$as_echo "$ac_cv_c_const" >&6; }
a9322a30 12530if test $ac_cv_c_const = no; then
bec39cab 12531
81ecdfbb 12532$as_echo "#define const /**/" >>confdefs.h
bec39cab 12533
5ee754fc 12534fi
bec39cab 12535
81ecdfbb
RW
12536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12537$as_echo_n "checking for inline... " >&6; }
12538if test "${ac_cv_c_inline+set}" = set; then :
12539 $as_echo_n "(cached) " >&6
bec39cab 12540else
a9322a30
TT
12541 ac_cv_c_inline=no
12542for ac_kw in inline __inline__ __inline; do
81ecdfbb 12543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12544/* end confdefs.h. */
a9322a30
TT
12545#ifndef __cplusplus
12546typedef int foo_t;
12547static $ac_kw foo_t static_foo () {return 0; }
12548$ac_kw foo_t foo () {return 0; }
12549#endif
12550
bec39cab 12551_ACEOF
81ecdfbb
RW
12552if ac_fn_c_try_compile "$LINENO"; then :
12553 ac_cv_c_inline=$ac_kw
bec39cab 12554fi
81ecdfbb
RW
12555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12556 test "$ac_cv_c_inline" != no && break
a9322a30 12557done
bec39cab 12558
5ee754fc 12559fi
81ecdfbb
RW
12560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12561$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 12562
a9322a30
TT
12563case $ac_cv_c_inline in
12564 inline | yes) ;;
12565 *)
12566 case $ac_cv_c_inline in
12567 no) ac_val=;;
12568 *) ac_val=$ac_cv_c_inline;;
12569 esac
12570 cat >>confdefs.h <<_ACEOF
12571#ifndef __cplusplus
12572#define inline $ac_val
12573#endif
12574_ACEOF
bec39cab
AC
12575 ;;
12576esac
bec39cab 12577
81ecdfbb
RW
12578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12579$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12580if test "${ac_cv_c_bigendian+set}" = set; then :
12581 $as_echo_n "(cached) " >&6
bec39cab 12582else
81ecdfbb
RW
12583 ac_cv_c_bigendian=unknown
12584 # See if we're dealing with a universal compiler.
12585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12586/* end confdefs.h. */
12587#ifndef __APPLE_CC__
12588 not a universal capable compiler
12589 #endif
12590 typedef int dummy;
12591
12592_ACEOF
12593if ac_fn_c_try_compile "$LINENO"; then :
12594
12595 # Check for potential -arch flags. It is not universal unless
12596 # there are at least two -arch flags with different values.
12597 ac_arch=
12598 ac_prev=
12599 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12600 if test -n "$ac_prev"; then
12601 case $ac_word in
12602 i?86 | x86_64 | ppc | ppc64)
12603 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12604 ac_arch=$ac_word
12605 else
12606 ac_cv_c_bigendian=universal
12607 break
12608 fi
12609 ;;
12610 esac
12611 ac_prev=
12612 elif test "x$ac_word" = "x-arch"; then
12613 ac_prev=arch
12614 fi
12615 done
12616fi
12617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12618 if test $ac_cv_c_bigendian = unknown; then
12619 # See if sys/param.h defines the BYTE_ORDER macro.
12620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12621/* end confdefs.h. */
a9322a30 12622#include <sys/types.h>
81ecdfbb 12623 #include <sys/param.h>
a9322a30
TT
12624
12625int
12626main ()
12627{
81ecdfbb
RW
12628#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12629 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12630 && LITTLE_ENDIAN)
12631 bogus endian macros
12632 #endif
a9322a30
TT
12633
12634 ;
12635 return 0;
12636}
bec39cab 12637_ACEOF
81ecdfbb 12638if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12639 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12641/* end confdefs.h. */
a9322a30 12642#include <sys/types.h>
81ecdfbb 12643 #include <sys/param.h>
a9322a30
TT
12644
12645int
12646main ()
12647{
12648#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
12649 not big endian
12650 #endif
a9322a30
TT
12651
12652 ;
12653 return 0;
12654}
bec39cab 12655_ACEOF
81ecdfbb 12656if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12657 ac_cv_c_bigendian=yes
5ee754fc 12658else
81ecdfbb 12659 ac_cv_c_bigendian=no
5ee754fc 12660fi
81ecdfbb
RW
12661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12662fi
12663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12664 fi
12665 if test $ac_cv_c_bigendian = unknown; then
12666 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12668/* end confdefs.h. */
12669#include <limits.h>
bec39cab 12670
81ecdfbb
RW
12671int
12672main ()
12673{
12674#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12675 bogus endian macros
12676 #endif
12677
12678 ;
12679 return 0;
12680}
7eb368b3 12681_ACEOF
81ecdfbb
RW
12682if ac_fn_c_try_compile "$LINENO"; then :
12683 # It does; now see whether it defined to _BIG_ENDIAN or not.
12684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 12685/* end confdefs.h. */
81ecdfbb
RW
12686#include <limits.h>
12687
7eb368b3
NR
12688int
12689main ()
12690{
81ecdfbb
RW
12691#ifndef _BIG_ENDIAN
12692 not big endian
12693 #endif
12694
7eb368b3
NR
12695 ;
12696 return 0;
12697}
12698_ACEOF
81ecdfbb 12699if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 12700 ac_cv_c_bigendian=yes
81ecdfbb
RW
12701else
12702 ac_cv_c_bigendian=no
a9322a30 12703fi
81ecdfbb 12704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 12705fi
81ecdfbb
RW
12706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12707 fi
12708 if test $ac_cv_c_bigendian = unknown; then
12709 # Compile a test program.
12710 if test "$cross_compiling" = yes; then :
12711 # Try to guess by grepping values from an object file.
12712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12713/* end confdefs.h. */
12714short int ascii_mm[] =
12715 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12716 short int ascii_ii[] =
12717 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12718 int use_ascii (int i) {
12719 return ascii_mm[i] + ascii_ii[i];
12720 }
12721 short int ebcdic_ii[] =
12722 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12723 short int ebcdic_mm[] =
12724 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12725 int use_ebcdic (int i) {
12726 return ebcdic_mm[i] + ebcdic_ii[i];
12727 }
12728 extern int foo;
7eb368b3 12729
81ecdfbb
RW
12730int
12731main ()
12732{
12733return use_ascii (foo) == use_ebcdic (foo);
12734 ;
12735 return 0;
12736}
12737_ACEOF
12738if ac_fn_c_try_compile "$LINENO"; then :
12739 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12740 ac_cv_c_bigendian=yes
12741 fi
12742 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12743 if test "$ac_cv_c_bigendian" = unknown; then
12744 ac_cv_c_bigendian=no
12745 else
12746 # finding both strings is unlikely to happen, but who knows?
12747 ac_cv_c_bigendian=unknown
12748 fi
12749 fi
7eb368b3 12750fi
81ecdfbb 12751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12752else
81ecdfbb 12753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12754/* end confdefs.h. */
81ecdfbb 12755$ac_includes_default
d3ea6809
MM
12756int
12757main ()
12758{
81ecdfbb
RW
12759
12760 /* Are we little or big endian? From Harbison&Steele. */
12761 union
12762 {
12763 long int l;
12764 char c[sizeof (long int)];
12765 } u;
12766 u.l = 1;
12767 return u.c[sizeof (long int) - 1] == 1;
12768
12769 ;
12770 return 0;
d3ea6809
MM
12771}
12772_ACEOF
81ecdfbb 12773if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12774 ac_cv_c_bigendian=no
d3ea6809 12775else
81ecdfbb 12776 ac_cv_c_bigendian=yes
d3ea6809 12777fi
81ecdfbb
RW
12778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12779 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 12780fi
a9322a30 12781
81ecdfbb
RW
12782 fi
12783fi
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12785$as_echo "$ac_cv_c_bigendian" >&6; }
12786 case $ac_cv_c_bigendian in #(
12787 yes)
12788 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12789;; #(
12790 no)
12791 ;; #(
12792 universal)
12793
12794$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12795
12796 ;; #(
12797 *)
12798 as_fn_error "unknown endianness
12799 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12800 esac
d3ea6809
MM
12801
12802
a9322a30
TT
12803# ------------------------------ #
12804# Checks for library functions. #
12805# ------------------------------ #
d3ea6809 12806
a9322a30 12807for ac_header in stdlib.h unistd.h
81ecdfbb
RW
12808do :
12809 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12810ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12811eval as_val=\$$as_ac_Header
12812 if test "x$as_val" = x""yes; then :
bec39cab 12813 cat >>confdefs.h <<_ACEOF
81ecdfbb 12814#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12815_ACEOF
b757528f 12816
b757528f 12817fi
bec39cab 12818
a9322a30 12819done
a3828db0 12820
a9322a30 12821for ac_func in getpagesize
81ecdfbb
RW
12822do :
12823 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12824if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 12825 cat >>confdefs.h <<_ACEOF
81ecdfbb 12826#define HAVE_GETPAGESIZE 1
bec39cab 12827_ACEOF
bcb3dc3d 12828
bcb3dc3d
MK
12829fi
12830done
12831
81ecdfbb
RW
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12833$as_echo_n "checking for working mmap... " >&6; }
12834if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
12835 $as_echo_n "(cached) " >&6
a9322a30 12836else
81ecdfbb 12837 if test "$cross_compiling" = yes; then :
a9322a30 12838 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12839else
81ecdfbb 12840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12841/* end confdefs.h. */
a9322a30
TT
12842$ac_includes_default
12843/* malloc might have been renamed as rpl_malloc. */
12844#undef malloc
bec39cab 12845
a9322a30
TT
12846/* Thanks to Mike Haertel and Jim Avera for this test.
12847 Here is a matrix of mmap possibilities:
12848 mmap private not fixed
12849 mmap private fixed at somewhere currently unmapped
12850 mmap private fixed at somewhere already mapped
12851 mmap shared not fixed
12852 mmap shared fixed at somewhere currently unmapped
12853 mmap shared fixed at somewhere already mapped
12854 For private mappings, we should verify that changes cannot be read()
12855 back from the file, nor mmap's back from the file at a different
12856 address. (There have been systems where private was not correctly
12857 implemented like the infamous i386 svr4.0, and systems where the
12858 VM page cache was not coherent with the file system buffer cache
12859 like early versions of FreeBSD and possibly contemporary NetBSD.)
12860 For shared mappings, we should conversely verify that changes get
12861 propagated back to all the places they're supposed to be.
bec39cab 12862
a9322a30
TT
12863 Grep wants private fixed already mapped.
12864 The main things grep needs to know about mmap are:
12865 * does it exist and is it safe to write into the mmap'd area
12866 * how to use it (BSD variants) */
8b9cf735 12867
a9322a30
TT
12868#include <fcntl.h>
12869#include <sys/mman.h>
8b9cf735 12870
81ecdfbb 12871#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12872char *malloc ();
a3828db0
MK
12873#endif
12874
a9322a30 12875/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12876#ifndef HAVE_GETPAGESIZE
a9322a30 12877/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 12878# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
12879# define HAVE_SYS_PARAM_H 1
12880# endif
12881
12882# ifdef _SC_PAGESIZE
12883# define getpagesize() sysconf(_SC_PAGESIZE)
12884# else /* no _SC_PAGESIZE */
81ecdfbb 12885# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12886# include <sys/param.h>
12887# ifdef EXEC_PAGESIZE
12888# define getpagesize() EXEC_PAGESIZE
12889# else /* no EXEC_PAGESIZE */
12890# ifdef NBPG
12891# define getpagesize() NBPG * CLSIZE
12892# ifndef CLSIZE
12893# define CLSIZE 1
12894# endif /* no CLSIZE */
12895# else /* no NBPG */
12896# ifdef NBPC
12897# define getpagesize() NBPC
12898# else /* no NBPC */
12899# ifdef PAGESIZE
12900# define getpagesize() PAGESIZE
12901# endif /* PAGESIZE */
12902# endif /* no NBPC */
12903# endif /* no NBPG */
12904# endif /* no EXEC_PAGESIZE */
12905# else /* no HAVE_SYS_PARAM_H */
12906# define getpagesize() 8192 /* punt totally */
12907# endif /* no HAVE_SYS_PARAM_H */
12908# endif /* no _SC_PAGESIZE */
12909
12910#endif /* no HAVE_GETPAGESIZE */
12911
bec39cab
AC
12912int
12913main ()
12914{
a9322a30
TT
12915 char *data, *data2, *data3;
12916 int i, pagesize;
12917 int fd;
12918
12919 pagesize = getpagesize ();
12920
12921 /* First, make a file with some known garbage in it. */
12922 data = (char *) malloc (pagesize);
12923 if (!data)
81ecdfbb 12924 return 1;
a9322a30
TT
12925 for (i = 0; i < pagesize; ++i)
12926 *(data + i) = rand ();
12927 umask (0);
12928 fd = creat ("conftest.mmap", 0600);
12929 if (fd < 0)
81ecdfbb 12930 return 1;
a9322a30 12931 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 12932 return 1;
a9322a30
TT
12933 close (fd);
12934
12935 /* Next, try to mmap the file at a fixed address which already has
12936 something else allocated at it. If we can, also make sure that
12937 we see the same garbage. */
12938 fd = open ("conftest.mmap", O_RDWR);
12939 if (fd < 0)
81ecdfbb 12940 return 1;
a9322a30
TT
12941 data2 = (char *) malloc (2 * pagesize);
12942 if (!data2)
81ecdfbb
RW
12943 return 1;
12944 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
12945 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12946 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 12947 return 1;
a9322a30
TT
12948 for (i = 0; i < pagesize; ++i)
12949 if (*(data + i) != *(data2 + i))
81ecdfbb 12950 return 1;
a9322a30
TT
12951
12952 /* Finally, make sure that changes to the mapped area do not
12953 percolate back to the file as seen by read(). (This is a bug on
12954 some variants of i386 svr4.0.) */
12955 for (i = 0; i < pagesize; ++i)
12956 *(data2 + i) = *(data2 + i) + 1;
12957 data3 = (char *) malloc (pagesize);
12958 if (!data3)
81ecdfbb 12959 return 1;
a9322a30 12960 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 12961 return 1;
a9322a30
TT
12962 for (i = 0; i < pagesize; ++i)
12963 if (*(data + i) != *(data3 + i))
81ecdfbb 12964 return 1;
a9322a30 12965 close (fd);
81ecdfbb 12966 return 0;
bec39cab
AC
12967}
12968_ACEOF
81ecdfbb 12969if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12970 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 12971else
81ecdfbb 12972 ac_cv_func_mmap_fixed_mapped=no
a3828db0 12973fi
81ecdfbb
RW
12974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12975 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 12976fi
81ecdfbb 12977
a9322a30 12978fi
81ecdfbb
RW
12979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12980$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
12981if test $ac_cv_func_mmap_fixed_mapped = yes; then
12982
81ecdfbb 12983$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 12984
086ec9eb 12985fi
a9322a30 12986rm -f conftest.mmap
a3828db0 12987
81ecdfbb
RW
12988ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12989if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 12990
a9322a30
TT
12991else
12992
12993cat >>confdefs.h <<_ACEOF
12994#define pid_t int
bec39cab 12995_ACEOF
086ec9eb
MK
12996
12997fi
12998
81ecdfbb
RW
12999for ac_header in vfork.h
13000do :
13001 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13002if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 13003 cat >>confdefs.h <<_ACEOF
81ecdfbb 13004#define HAVE_VFORK_H 1
bec39cab 13005_ACEOF
c906108c
SS
13006
13007fi
a9322a30 13008
a3828db0 13009done
c906108c 13010
a9322a30 13011for ac_func in fork vfork
81ecdfbb
RW
13012do :
13013 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13014ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13015eval as_val=\$$as_ac_var
13016 if test "x$as_val" = x""yes; then :
a3828db0 13017 cat >>confdefs.h <<_ACEOF
81ecdfbb 13018#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13019_ACEOF
b83266a0 13020
97bf5e38 13021fi
a3828db0 13022done
b83266a0 13023
a9322a30 13024if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13026$as_echo_n "checking for working fork... " >&6; }
13027if test "${ac_cv_func_fork_works+set}" = set; then :
13028 $as_echo_n "(cached) " >&6
a9322a30 13029else
81ecdfbb 13030 if test "$cross_compiling" = yes; then :
a9322a30
TT
13031 ac_cv_func_fork_works=cross
13032else
81ecdfbb
RW
13033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13034/* end confdefs.h. */
13035$ac_includes_default
13036int
13037main ()
13038{
13039
13040 /* By Ruediger Kuhlmann. */
13041 return fork () < 0;
13042
13043 ;
13044 return 0;
13045}
a9322a30 13046_ACEOF
81ecdfbb 13047if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13048 ac_cv_func_fork_works=yes
13049else
81ecdfbb 13050 ac_cv_func_fork_works=no
a9322a30 13051fi
81ecdfbb
RW
13052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13053 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13054fi
81ecdfbb 13055
a9322a30 13056fi
81ecdfbb
RW
13057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13058$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13059
13060else
13061 ac_cv_func_fork_works=$ac_cv_func_fork
13062fi
13063if test "x$ac_cv_func_fork_works" = xcross; then
13064 case $host in
13065 *-*-amigaos* | *-*-msdosdjgpp*)
13066 # Override, as these systems have only a dummy fork() stub
13067 ac_cv_func_fork_works=no
13068 ;;
13069 *)
13070 ac_cv_func_fork_works=yes
13071 ;;
13072 esac
81ecdfbb
RW
13073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13074$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13075fi
13076ac_cv_func_vfork_works=$ac_cv_func_vfork
13077if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13079$as_echo_n "checking for working vfork... " >&6; }
13080if test "${ac_cv_func_vfork_works+set}" = set; then :
13081 $as_echo_n "(cached) " >&6
a9322a30 13082else
81ecdfbb 13083 if test "$cross_compiling" = yes; then :
a9322a30
TT
13084 ac_cv_func_vfork_works=cross
13085else
81ecdfbb 13086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13087/* end confdefs.h. */
13088/* Thanks to Paul Eggert for this test. */
81ecdfbb 13089$ac_includes_default
a9322a30 13090#include <sys/wait.h>
81ecdfbb 13091#ifdef HAVE_VFORK_H
a9322a30
TT
13092# include <vfork.h>
13093#endif
13094/* On some sparc systems, changes by the child to local and incoming
13095 argument registers are propagated back to the parent. The compiler
13096 is told about this with #include <vfork.h>, but some compilers
13097 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13098 static variable whose address is put into a register that is
13099 clobbered by the vfork. */
13100static void
13101#ifdef __cplusplus
13102sparc_address_test (int arg)
13103# else
13104sparc_address_test (arg) int arg;
13105#endif
13106{
13107 static pid_t child;
13108 if (!child) {
13109 child = vfork ();
13110 if (child < 0) {
13111 perror ("vfork");
13112 _exit(2);
13113 }
13114 if (!child) {
13115 arg = getpid();
13116 write(-1, "", 0);
13117 _exit (arg);
13118 }
13119 }
13120}
13121
13122int
13123main ()
13124{
13125 pid_t parent = getpid ();
13126 pid_t child;
13127
13128 sparc_address_test (0);
13129
13130 child = vfork ();
13131
13132 if (child == 0) {
13133 /* Here is another test for sparc vfork register problems. This
13134 test uses lots of local variables, at least as many local
13135 variables as main has allocated so far including compiler
13136 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13137 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13138 reuse the register of parent for one of the local variables,
13139 since it will think that parent can't possibly be used any more
13140 in this routine. Assigning to the local variable will thus
13141 munge parent in the parent process. */
13142 pid_t
13143 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13144 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13145 /* Convince the compiler that p..p7 are live; otherwise, it might
13146 use the same hardware register for all 8 local variables. */
13147 if (p != p1 || p != p2 || p != p3 || p != p4
13148 || p != p5 || p != p6 || p != p7)
13149 _exit(1);
13150
13151 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13152 from child file descriptors. If the child closes a descriptor
13153 before it execs or exits, this munges the parent's descriptor
13154 as well. Test for this by closing stdout in the child. */
13155 _exit(close(fileno(stdout)) != 0);
13156 } else {
13157 int status;
13158 struct stat st;
13159
13160 while (wait(&status) != child)
13161 ;
81ecdfbb 13162 return (
a9322a30
TT
13163 /* Was there some problem with vforking? */
13164 child < 0
13165
13166 /* Did the child fail? (This shouldn't happen.) */
13167 || status
13168
13169 /* Did the vfork/compiler bug occur? */
13170 || parent != getpid()
13171
13172 /* Did the file descriptor bug occur? */
13173 || fstat(fileno(stdout), &st) != 0
13174 );
13175 }
13176}
13177_ACEOF
81ecdfbb 13178if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13179 ac_cv_func_vfork_works=yes
13180else
81ecdfbb 13181 ac_cv_func_vfork_works=no
a9322a30 13182fi
81ecdfbb
RW
13183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13184 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13185fi
81ecdfbb 13186
a9322a30 13187fi
81ecdfbb
RW
13188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13189$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13190
13191fi;
13192if test "x$ac_cv_func_fork_works" = xcross; then
13193 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13195$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13196fi
13197
13198if test "x$ac_cv_func_vfork_works" = xyes; then
13199
81ecdfbb 13200$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13201
13202else
13203
81ecdfbb 13204$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13205
13206fi
13207if test "x$ac_cv_func_fork_works" = xyes; then
13208
81ecdfbb 13209$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13210
13211fi
13212
cdf43629 13213for ac_func in getauxval getrusage getuid getgid \
bdca27a2 13214 pipe poll pread pread64 pwrite resize_term \
e671cd59 13215 sbrk getpgid setpgid setpgrp setsid \
9467110b 13216 sigaction sigprocmask sigsetmask socketpair \
110ed339 13217 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 13218 setrlimit getrlimit posix_madvise waitpid \
4b8b5e72 13219 ptrace64 sigaltstack mkdtemp setns
81ecdfbb
RW
13220do :
13221 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13222ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13223eval as_val=\$$as_ac_var
13224 if test "x$as_val" = x""yes; then :
6c7a06a3 13225 cat >>confdefs.h <<_ACEOF
81ecdfbb 13226#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13227_ACEOF
13228
13229fi
13230done
13231
13232
81ecdfbb
RW
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13234$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13235if test "${am_cv_langinfo_codeset+set}" = set; then :
13236 $as_echo_n "(cached) " >&6
6c7a06a3 13237else
81ecdfbb 13238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
13239/* end confdefs.h. */
13240#include <langinfo.h>
13241int
13242main ()
13243{
13244char* cs = nl_langinfo(CODESET);
bec39cab
AC
13245 ;
13246 return 0;
13247}
13248_ACEOF
81ecdfbb 13249if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 13250 am_cv_langinfo_codeset=yes
a4db0f07 13251else
81ecdfbb 13252 am_cv_langinfo_codeset=no
a4db0f07 13253fi
81ecdfbb
RW
13254rm -f core conftest.err conftest.$ac_objext \
13255 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 13256
a4db0f07 13257fi
81ecdfbb
RW
13258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13259$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
13260 if test $am_cv_langinfo_codeset = yes; then
13261
81ecdfbb 13262$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 13263
6c7a06a3 13264 fi
c906108c 13265
06825bd1 13266
3266f10b
TT
13267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13268$as_echo_n "checking for ANSI C header files... " >&6; }
13269if test "${ac_cv_header_stdc+set}" = set; then :
13270 $as_echo_n "(cached) " >&6
13271else
13272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273/* end confdefs.h. */
13274#include <stdlib.h>
13275#include <stdarg.h>
13276#include <string.h>
13277#include <float.h>
13278
13279int
13280main ()
13281{
13282
13283 ;
13284 return 0;
13285}
13286_ACEOF
13287if ac_fn_c_try_compile "$LINENO"; then :
13288 ac_cv_header_stdc=yes
13289else
13290 ac_cv_header_stdc=no
13291fi
13292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13293
13294if test $ac_cv_header_stdc = yes; then
13295 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13297/* end confdefs.h. */
13298#include <string.h>
13299
13300_ACEOF
13301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13302 $EGREP "memchr" >/dev/null 2>&1; then :
13303
13304else
13305 ac_cv_header_stdc=no
13306fi
13307rm -f conftest*
13308
13309fi
13310
13311if test $ac_cv_header_stdc = yes; then
13312 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13314/* end confdefs.h. */
13315#include <stdlib.h>
13316
13317_ACEOF
13318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13319 $EGREP "free" >/dev/null 2>&1; then :
13320
13321else
13322 ac_cv_header_stdc=no
13323fi
13324rm -f conftest*
13325
13326fi
13327
13328if test $ac_cv_header_stdc = yes; then
13329 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13330 if test "$cross_compiling" = yes; then :
13331 :
13332else
13333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13334/* end confdefs.h. */
13335#include <ctype.h>
13336#include <stdlib.h>
13337#if ((' ' & 0x0FF) == 0x020)
13338# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13339# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13340#else
13341# define ISLOWER(c) \
13342 (('a' <= (c) && (c) <= 'i') \
13343 || ('j' <= (c) && (c) <= 'r') \
13344 || ('s' <= (c) && (c) <= 'z'))
13345# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13346#endif
13347
13348#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13349int
13350main ()
13351{
13352 int i;
13353 for (i = 0; i < 256; i++)
13354 if (XOR (islower (i), ISLOWER (i))
13355 || toupper (i) != TOUPPER (i))
13356 return 2;
13357 return 0;
13358}
13359_ACEOF
13360if ac_fn_c_try_run "$LINENO"; then :
13361
13362else
13363 ac_cv_header_stdc=no
13364fi
13365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13366 conftest.$ac_objext conftest.beam conftest.$ac_ext
13367fi
13368
13369fi
13370fi
13371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13372$as_echo "$ac_cv_header_stdc" >&6; }
13373if test $ac_cv_header_stdc = yes; then
13374
13375$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13376
3266f10b
TT
13377fi
13378
13379 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13380# for constant arguments. Useless!
13381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13382$as_echo_n "checking for working alloca.h... " >&6; }
13383if test "${ac_cv_working_alloca_h+set}" = set; then :
13384 $as_echo_n "(cached) " >&6
13385else
13386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387/* end confdefs.h. */
13388#include <alloca.h>
13389int
13390main ()
13391{
13392char *p = (char *) alloca (2 * sizeof (int));
13393 if (p) return 0;
13394 ;
13395 return 0;
13396}
13397_ACEOF
13398if ac_fn_c_try_link "$LINENO"; then :
13399 ac_cv_working_alloca_h=yes
13400else
13401 ac_cv_working_alloca_h=no
13402fi
13403rm -f core conftest.err conftest.$ac_objext \
13404 conftest$ac_exeext conftest.$ac_ext
13405fi
13406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13407$as_echo "$ac_cv_working_alloca_h" >&6; }
13408if test $ac_cv_working_alloca_h = yes; then
13409
13410$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13411
13412fi
13413
13414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13415$as_echo_n "checking for alloca... " >&6; }
13416if test "${ac_cv_func_alloca_works+set}" = set; then :
13417 $as_echo_n "(cached) " >&6
13418else
13419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13420/* end confdefs.h. */
13421#ifdef __GNUC__
13422# define alloca __builtin_alloca
13423#else
13424# ifdef _MSC_VER
13425# include <malloc.h>
13426# define alloca _alloca
13427# else
13428# ifdef HAVE_ALLOCA_H
13429# include <alloca.h>
13430# else
13431# ifdef _AIX
13432 #pragma alloca
13433# else
13434# ifndef alloca /* predefined by HP cc +Olibcalls */
13435char *alloca ();
13436# endif
13437# endif
13438# endif
13439# endif
13440#endif
13441
13442int
13443main ()
13444{
13445char *p = (char *) alloca (1);
13446 if (p) return 0;
13447 ;
13448 return 0;
13449}
13450_ACEOF
13451if ac_fn_c_try_link "$LINENO"; then :
13452 ac_cv_func_alloca_works=yes
13453else
13454 ac_cv_func_alloca_works=no
13455fi
13456rm -f core conftest.err conftest.$ac_objext \
13457 conftest$ac_exeext conftest.$ac_ext
13458fi
13459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13460$as_echo "$ac_cv_func_alloca_works" >&6; }
13461
13462if test $ac_cv_func_alloca_works = yes; then
13463
13464$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13465
13466else
13467 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13468# that cause trouble. Some versions do not even contain alloca or
13469# contain a buggy version. If you still want to use their alloca,
13470# use ar to extract alloca.o from them instead of compiling alloca.c.
13471
13472ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13473
13474$as_echo "#define C_ALLOCA 1" >>confdefs.h
13475
13476
13477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13478$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13479if test "${ac_cv_os_cray+set}" = set; then :
13480 $as_echo_n "(cached) " >&6
13481else
13482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13483/* end confdefs.h. */
13484#if defined CRAY && ! defined CRAY2
13485webecray
13486#else
13487wenotbecray
13488#endif
13489
13490_ACEOF
13491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13492 $EGREP "webecray" >/dev/null 2>&1; then :
13493 ac_cv_os_cray=yes
13494else
13495 ac_cv_os_cray=no
13496fi
13497rm -f conftest*
13498
13499fi
13500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13501$as_echo "$ac_cv_os_cray" >&6; }
13502if test $ac_cv_os_cray = yes; then
13503 for ac_func in _getb67 GETB67 getb67; do
13504 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13505ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13506eval as_val=\$$as_ac_var
13507 if test "x$as_val" = x""yes; then :
13508
13509cat >>confdefs.h <<_ACEOF
13510#define CRAY_STACKSEG_END $ac_func
13511_ACEOF
13512
13513 break
13514fi
13515
13516 done
13517fi
13518
13519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13520$as_echo_n "checking stack direction for C alloca... " >&6; }
13521if test "${ac_cv_c_stack_direction+set}" = set; then :
13522 $as_echo_n "(cached) " >&6
13523else
13524 if test "$cross_compiling" = yes; then :
13525 ac_cv_c_stack_direction=0
13526else
13527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13528/* end confdefs.h. */
13529$ac_includes_default
13530int
13531find_stack_direction ()
13532{
13533 static char *addr = 0;
13534 auto char dummy;
13535 if (addr == 0)
13536 {
13537 addr = &dummy;
13538 return find_stack_direction ();
13539 }
13540 else
13541 return (&dummy > addr) ? 1 : -1;
13542}
13543
13544int
13545main ()
13546{
13547 return find_stack_direction () < 0;
13548}
13549_ACEOF
13550if ac_fn_c_try_run "$LINENO"; then :
13551 ac_cv_c_stack_direction=1
13552else
13553 ac_cv_c_stack_direction=-1
13554fi
13555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13556 conftest.$ac_objext conftest.beam conftest.$ac_ext
13557fi
13558
13559fi
13560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13561$as_echo "$ac_cv_c_stack_direction" >&6; }
13562cat >>confdefs.h <<_ACEOF
13563#define STACK_DIRECTION $ac_cv_c_stack_direction
13564_ACEOF
13565
13566
13567fi
13568
13569
13570
13571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13572$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13573if test "${am_cv_langinfo_codeset+set}" = set; then :
13574 $as_echo_n "(cached) " >&6
13575else
13576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13577/* end confdefs.h. */
13578#include <langinfo.h>
13579int
13580main ()
13581{
13582char* cs = nl_langinfo(CODESET);
13583 ;
13584 return 0;
13585}
13586_ACEOF
13587if ac_fn_c_try_link "$LINENO"; then :
13588 am_cv_langinfo_codeset=yes
13589else
13590 am_cv_langinfo_codeset=no
13591fi
13592rm -f core conftest.err conftest.$ac_objext \
13593 conftest$ac_exeext conftest.$ac_ext
13594
13595fi
13596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13597$as_echo "$am_cv_langinfo_codeset" >&6; }
13598 if test $am_cv_langinfo_codeset = yes; then
13599
13600$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13601
13602 fi
13603
13604
44122162 13605 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h
3266f10b
TT
13606do :
13607 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13608ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13609eval as_val=\$$as_ac_Header
13610 if test "x$as_val" = x""yes; then :
13611 cat >>confdefs.h <<_ACEOF
13612#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13613_ACEOF
13614
13615fi
13616
13617done
13618
13619
f348d89a 13620 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
3266f10b
TT
13621do :
13622 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13623ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13624eval as_val=\$$as_ac_var
13625 if test "x$as_val" = x""yes; then :
13626 cat >>confdefs.h <<_ACEOF
13627#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13628_ACEOF
13629
13630fi
13631done
13632
13633
13634 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13635if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13636 ac_have_decl=1
13637else
13638 ac_have_decl=0
13639fi
13640
13641cat >>confdefs.h <<_ACEOF
13642#define HAVE_DECL_STRERROR $ac_have_decl
13643_ACEOF
13644ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13645if test "x$ac_cv_have_decl_strstr" = x""yes; then :
13646 ac_have_decl=1
13647else
13648 ac_have_decl=0
13649fi
13650
13651cat >>confdefs.h <<_ACEOF
13652#define HAVE_DECL_STRSTR $ac_have_decl
13653_ACEOF
13654
13655
e9bcb658
GB
13656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13657$as_echo_n "checking for sigsetjmp... " >&6; }
13658if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
13659 $as_echo_n "(cached) " >&6
13660else
13661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13662/* end confdefs.h. */
13663
13664#include <setjmp.h>
13665
13666int
13667main ()
13668{
13669sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13670 ;
13671 return 0;
13672}
13673_ACEOF
13674if ac_fn_c_try_compile "$LINENO"; then :
13675 gdb_cv_func_sigsetjmp=yes
13676else
13677 gdb_cv_func_sigsetjmp=no
13678fi
13679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13680fi
13681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13682$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13683if test $gdb_cv_func_sigsetjmp = yes; then
13684
13685$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13686
13687fi
13688
3266f10b 13689
54019719
PA
13690# Check the return and argument types of ptrace.
13691
13692
54019719
PA
13693for ac_header in sys/ptrace.h ptrace.h
13694do :
13695 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13696ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13697eval as_val=\$$as_ac_Header
13698 if test "x$as_val" = x""yes; then :
13699 cat >>confdefs.h <<_ACEOF
13700#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13701_ACEOF
13702
13703fi
13704
13705done
13706
13707
a3828db0 13708gdb_ptrace_headers='
4ff70b84 13709#include <sys/types.h>
a3828db0
MK
13710#if HAVE_SYS_PTRACE_H
13711# include <sys/ptrace.h>
13712#endif
13713#if HAVE_UNISTD_H
13714# include <unistd.h>
13715#endif
13716'
13717# There is no point in checking if we don't have a prototype.
9b30624b 13718ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
81ecdfbb
RW
13719"
13720if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
13721 ac_have_decl=1
06825bd1 13722else
81ecdfbb 13723 ac_have_decl=0
06825bd1 13724fi
06825bd1 13725
a3828db0 13726cat >>confdefs.h <<_ACEOF
81ecdfbb 13727#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 13728_ACEOF
81ecdfbb 13729if test $ac_have_decl = 1; then :
bec39cab 13730
a3828db0 13731else
a3828db0
MK
13732
13733 : ${gdb_cv_func_ptrace_ret='int'}
13734 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13735
06825bd1
MK
13736fi
13737
064ef605
DJ
13738# Check return type. Varargs (used on GNU/Linux) conflict with the
13739# empty argument list, so check for that explicitly.
81ecdfbb
RW
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13741$as_echo_n "checking return type of ptrace... " >&6; }
13742if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
13743 $as_echo_n "(cached) " >&6
bec39cab 13744else
81ecdfbb 13745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13746/* end confdefs.h. */
a3828db0 13747$gdb_ptrace_headers
bec39cab
AC
13748int
13749main ()
13750{
064ef605
DJ
13751extern long ptrace (enum __ptrace_request, ...);
13752 ;
13753 return 0;
13754}
13755_ACEOF
9b30624b 13756if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
13757 gdb_cv_func_ptrace_ret='long'
13758else
81ecdfbb 13759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13760/* end confdefs.h. */
13761$gdb_ptrace_headers
13762int
13763main ()
13764{
a3828db0 13765extern int ptrace ();
bec39cab
AC
13766 ;
13767 return 0;
13768}
13769_ACEOF
9b30624b 13770if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13771 gdb_cv_func_ptrace_ret='int'
70f9f479 13772else
81ecdfbb 13773 gdb_cv_func_ptrace_ret='long'
70f9f479 13774fi
81ecdfbb 13775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 13776fi
81ecdfbb 13777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 13778fi
81ecdfbb
RW
13779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13780$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 13781
a3828db0
MK
13782cat >>confdefs.h <<_ACEOF
13783#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 13784_ACEOF
70f9f479 13785
a3828db0 13786# Check argument types.
81ecdfbb
RW
13787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13788$as_echo_n "checking types of arguments for ptrace... " >&6; }
13789if test "${gdb_cv_func_ptrace_args+set}" = set; then :
13790 $as_echo_n "(cached) " >&6
bec39cab 13791else
a3828db0 13792
81ecdfbb 13793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
13794/* end confdefs.h. */
13795$gdb_ptrace_headers
13796int
13797main ()
13798{
13799extern long ptrace (enum __ptrace_request, ...);
13800 ;
13801 return 0;
13802}
13803_ACEOF
9b30624b 13804if ac_fn_c_try_compile "$LINENO"; then :
54019719 13805 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
064ef605 13806else
064ef605 13807
a3828db0
MK
13808for gdb_arg1 in 'int' 'long'; do
13809 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 13810 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 13811 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 13812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13813/* end confdefs.h. */
a3828db0 13814$gdb_ptrace_headers
bec39cab
AC
13815int
13816main ()
13817{
a3828db0
MK
13818
13819extern $gdb_cv_func_ptrace_ret
13820 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13821
bec39cab
AC
13822 ;
13823 return 0;
13824}
13825_ACEOF
9b30624b 13826if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13827 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13828 break 4;
5c7f2947 13829fi
81ecdfbb 13830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 13831 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 13832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13833/* end confdefs.h. */
a3828db0 13834$gdb_ptrace_headers
bec39cab
AC
13835int
13836main ()
13837{
a3828db0
MK
13838
13839extern $gdb_cv_func_ptrace_ret
13840 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13841
bec39cab
AC
13842 ;
13843 return 0;
13844}
13845_ACEOF
9b30624b 13846if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
13847
13848gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13849 break 5;
78434e59 13850fi
81ecdfbb 13851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
13852 done
13853 done
13854 done
13855 done
13856done
13857# Provide a safe default value.
13858: ${gdb_cv_func_ptrace_args='int,int,long,long'}
13859
064ef605 13860fi
81ecdfbb 13861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 13862fi
81ecdfbb
RW
13863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13864$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
13865ac_save_IFS=$IFS; IFS=','
13866set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13867IFS=$ac_save_IFS
13868shift
bec39cab 13869
54019719
PA
13870cat >>confdefs.h <<_ACEOF
13871#define PTRACE_TYPE_ARG1 $1
13872_ACEOF
13873
13874
a3828db0
MK
13875cat >>confdefs.h <<_ACEOF
13876#define PTRACE_TYPE_ARG3 $3
13877_ACEOF
13878
96d7229d
LM
13879
13880cat >>confdefs.h <<_ACEOF
13881#define PTRACE_TYPE_ARG4 $4
13882_ACEOF
13883
a3828db0
MK
13884if test -n "$5"; then
13885
13886cat >>confdefs.h <<_ACEOF
13887#define PTRACE_TYPE_ARG5 $5
bec39cab 13888_ACEOF
78434e59
MK
13889
13890fi
13891
54019719 13892
a3828db0 13893if test "$cross_compiling" = no; then
81ecdfbb
RW
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13895$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13896if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13897 $as_echo_n "(cached) " >&6
a3828db0 13898else
81ecdfbb
RW
13899 if test "$cross_compiling" = yes; then :
13900 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 13901else
81ecdfbb 13902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13903/* end confdefs.h. */
81ecdfbb 13904$ac_includes_default
bec39cab
AC
13905int
13906main ()
13907{
a3828db0
MK
13908/* If this system has a BSD-style setpgrp which takes arguments,
13909 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
13910 exit successfully. */
81ecdfbb 13911 return setpgrp (1,1) != -1;
bec39cab
AC
13912 ;
13913 return 0;
13914}
13915_ACEOF
81ecdfbb 13916if ac_fn_c_try_run "$LINENO"; then :
a3828db0 13917 ac_cv_func_setpgrp_void=no
c906108c 13918else
81ecdfbb 13919 ac_cv_func_setpgrp_void=yes
c906108c 13920fi
81ecdfbb
RW
13921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13922 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 13923fi
81ecdfbb 13924
a3828db0 13925fi
81ecdfbb
RW
13926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13927$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
13928if test $ac_cv_func_setpgrp_void = yes; then
13929
81ecdfbb 13930$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
13931
13932fi
a3828db0
MK
13933
13934else
81ecdfbb
RW
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13936$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13937if test "${ac_cv_func_setpgrp_void+set}" = set; then :
13938 $as_echo_n "(cached) " >&6
97bf5e38 13939else
81ecdfbb 13940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13941/* end confdefs.h. */
a3828db0
MK
13942
13943#include <unistd.h>
13944
bec39cab
AC
13945int
13946main ()
13947{
a3828db0
MK
13948
13949 if (setpgrp(1,1) == -1)
13950 exit (0);
13951 else
13952 exit (1);
13953
bec39cab
AC
13954 ;
13955 return 0;
13956}
13957_ACEOF
81ecdfbb 13958if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 13959 ac_cv_func_setpgrp_void=no
c906108c 13960else
81ecdfbb 13961 ac_cv_func_setpgrp_void=yes
c906108c 13962fi
81ecdfbb 13963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 13964fi
81ecdfbb
RW
13965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
13966$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 13967if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 13968 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 13969
a3828db0 13970fi
c906108c
SS
13971fi
13972
db1ff28b
JK
13973# Assume we'll default to using the included libiberty regex.
13974gdb_use_included_regex=yes
13975
13976# However, if the system regex is GNU regex, then default to *not*
13977# using the included regex.
13978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
13979$as_echo_n "checking for GNU regex... " >&6; }
13980if test "${gdb_cv_have_gnu_regex+set}" = set; then :
13981 $as_echo_n "(cached) " >&6
13982else
13983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13984/* end confdefs.h. */
13985#include <gnu-versions.h>
13986int
13987main ()
13988{
13989#define REGEX_INTERFACE_VERSION 1
13990#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
13991# error "Version mismatch"
13992#endif
13993 ;
13994 return 0;
13995}
13996_ACEOF
13997if ac_fn_c_try_compile "$LINENO"; then :
13998 gdb_cv_have_gnu_regex=yes
13999else
14000 gdb_cv_have_gnu_regex=no
14001fi
14002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14003fi
14004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14005$as_echo "$gdb_cv_have_gnu_regex" >&6; }
14006if test $gdb_cv_have_gnu_regex = yes; then
14007 gdb_use_included_regex=no
14008fi
14009
14010
14011# Check whether --with-included-regex was given.
14012if test "${with_included_regex+set}" = set; then :
14013 withval=$with_included_regex; gdb_with_regex=$withval
14014else
14015 gdb_with_regex=$gdb_use_included_regex
14016fi
14017
14018if test "$gdb_with_regex" = yes; then
14019
14020$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14021
14022fi
14023
81ecdfbb
RW
14024# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14025ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14026#include <sys/proc.h>
14027
14028"
14029if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 14030
5c45e068 14031cat >>confdefs.h <<_ACEOF
a3828db0 14032#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 14033_ACEOF
c906108c 14034
5c45e068 14035
97bf5e38 14036fi
c906108c 14037
5c45e068 14038
a3828db0 14039# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
14040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14041$as_echo_n "checking for struct lwp... " >&6; }
14042if test "${gdb_cv_struct_lwp+set}" = set; then :
14043 $as_echo_n "(cached) " >&6
bec39cab 14044else
81ecdfbb 14045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14046/* end confdefs.h. */
a3828db0 14047#include <sys/param.h>
c49fbc6c 14048#define _KMEMUSER
a3828db0 14049#include <sys/lwp.h>
bec39cab
AC
14050int
14051main ()
14052{
a3828db0 14053struct lwp l;
bec39cab
AC
14054 ;
14055 return 0;
14056}
14057_ACEOF
81ecdfbb 14058if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14059 gdb_cv_struct_lwp=yes
c906108c 14060else
81ecdfbb 14061 gdb_cv_struct_lwp=no
c906108c 14062fi
81ecdfbb 14063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 14064fi
81ecdfbb
RW
14065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14066$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 14067if test $gdb_cv_struct_lwp = yes; then
c906108c 14068
81ecdfbb 14069$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 14070
97bf5e38 14071fi
c906108c 14072
a3828db0 14073# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
14074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14075$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
14076if test "${gdb_cv_struct_reg+set}" = set; then :
14077 $as_echo_n "(cached) " >&6
bec39cab 14078else
81ecdfbb 14079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14080/* end confdefs.h. */
a3828db0
MK
14081#include <sys/types.h>
14082#include <machine/reg.h>
bec39cab
AC
14083int
14084main ()
14085{
a3828db0 14086struct reg r;
bec39cab
AC
14087 ;
14088 return 0;
14089}
14090_ACEOF
81ecdfbb 14091if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14092 gdb_cv_struct_reg=yes
27ca5dad 14093else
81ecdfbb 14094 gdb_cv_struct_reg=no
27ca5dad 14095fi
81ecdfbb 14096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 14097fi
81ecdfbb
RW
14098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14099$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 14100if test $gdb_cv_struct_reg = yes; then
bec39cab 14101
81ecdfbb 14102$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
14103
14104fi
97bf5e38 14105
a3828db0
MK
14106# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14107# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
a6e69c1f
JB
14108ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14109#include <machine/reg.h>
81ecdfbb
RW
14110"
14111if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
14112
14113cat >>confdefs.h <<_ACEOF
a3828db0 14114#define HAVE_STRUCT_REG_R_FS 1
bec39cab 14115_ACEOF
3862412b 14116
5c45e068 14117
97bf5e38 14118fi
a6e69c1f
JB
14119ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14120#include <machine/reg.h>
81ecdfbb
RW
14121"
14122if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
14123
14124cat >>confdefs.h <<_ACEOF
a3828db0 14125#define HAVE_STRUCT_REG_R_GS 1
bec39cab 14126_ACEOF
3862412b 14127
5c45e068 14128
97bf5e38 14129fi
3862412b 14130
5c45e068 14131
6fea9e18
L
14132# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14133# Older amd64 Linux's don't have the fs_base and gs_base members of
14134# `struct user_regs_struct'.
f517c180
EA
14135ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
14136#include <sys/user.h>
6fea9e18
L
14137"
14138if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
14139
14140cat >>confdefs.h <<_ACEOF
14141#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14142_ACEOF
14143
14144
14145fi
f517c180
EA
14146ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
14147#include <sys/user.h>
6fea9e18
L
14148"
14149if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
14150
14151cat >>confdefs.h <<_ACEOF
14152#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14153_ACEOF
14154
14155
14156fi
14157
14158
a3828db0 14159# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
14160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14161$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14162if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
14163 $as_echo_n "(cached) " >&6
451928c5 14164else
81ecdfbb 14165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14166/* end confdefs.h. */
a3828db0 14167#include <sys/ptrace.h>
bec39cab
AC
14168int
14169main ()
14170{
a3828db0 14171PTRACE_GETREGS;
bec39cab
AC
14172 ;
14173 return 0;
14174}
14175_ACEOF
81ecdfbb 14176if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14177 gdb_cv_have_ptrace_getregs=yes
451928c5 14178else
81ecdfbb 14179 gdb_cv_have_ptrace_getregs=no
451928c5 14180fi
81ecdfbb 14181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14182fi
14183
81ecdfbb
RW
14184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14185$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 14186if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 14187
81ecdfbb 14188$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 14189
97bf5e38 14190fi
451928c5 14191
a3828db0 14192# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14194$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14195if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
14196 $as_echo_n "(cached) " >&6
451928c5 14197else
81ecdfbb 14198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14199/* end confdefs.h. */
a3828db0 14200#include <sys/ptrace.h>
bec39cab
AC
14201int
14202main ()
14203{
a3828db0 14204PTRACE_GETFPXREGS;
bec39cab
AC
14205 ;
14206 return 0;
14207}
14208_ACEOF
81ecdfbb 14209if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14210 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 14211else
81ecdfbb 14212 gdb_cv_have_ptrace_getfpxregs=no
451928c5 14213fi
81ecdfbb 14214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
14215fi
14216
81ecdfbb
RW
14217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14218$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 14219if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 14220
81ecdfbb 14221$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 14222
97bf5e38 14223fi
451928c5 14224
a3828db0 14225# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
14226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14227$as_echo_n "checking for PT_GETDBREGS... " >&6; }
14228if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
14229 $as_echo_n "(cached) " >&6
3862412b 14230else
81ecdfbb 14231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14232/* end confdefs.h. */
a3828db0
MK
14233#include <sys/types.h>
14234#include <sys/ptrace.h>
bec39cab
AC
14235int
14236main ()
14237{
a3828db0 14238PT_GETDBREGS;
bec39cab
AC
14239 ;
14240 return 0;
14241}
14242_ACEOF
81ecdfbb 14243if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14244 gdb_cv_have_pt_getdbregs=yes
3862412b 14245else
81ecdfbb 14246 gdb_cv_have_pt_getdbregs=no
3862412b 14247fi
81ecdfbb 14248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14249fi
14250
81ecdfbb
RW
14251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14252$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 14253if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 14254
81ecdfbb 14255$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 14256
97bf5e38 14257fi
3862412b 14258
a3828db0 14259# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
14260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14261$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14262if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
14263 $as_echo_n "(cached) " >&6
3862412b 14264else
81ecdfbb 14265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14266/* end confdefs.h. */
a3828db0
MK
14267#include <sys/types.h>
14268#include <sys/ptrace.h>
bec39cab
AC
14269int
14270main ()
14271{
a3828db0 14272PT_GETXMMREGS;
bec39cab
AC
14273 ;
14274 return 0;
14275}
14276_ACEOF
81ecdfbb 14277if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 14278 gdb_cv_have_pt_getxmmregs=yes
3862412b 14279else
81ecdfbb 14280 gdb_cv_have_pt_getxmmregs=no
3862412b 14281fi
81ecdfbb 14282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
14283fi
14284
81ecdfbb
RW
14285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14286$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 14287if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 14288
81ecdfbb 14289$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 14290
97bf5e38 14291fi
3862412b 14292
6e9567fe
JB
14293# See if <sys/ptrace.h> supports LWP names on FreeBSD
14294# Older FreeBSD versions don't have the pl_tdname member of
14295# `struct ptrace_lwpinfo'.
14296ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14297"
14298if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = x""yes; then :
14299
14300cat >>confdefs.h <<_ACEOF
14301#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14302_ACEOF
14303
14304
14305fi
14306
14307
e6cdd38e
JB
14308# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14309# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14310# FreeBSD 10.3.
14311ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
14312"
14313if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = x""yes; then :
14314
14315cat >>confdefs.h <<_ACEOF
14316#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14317_ACEOF
14318
14319
14320fi
14321
6e9567fe 14322
97bf5e38 14323if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14325$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14326 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
14327 $as_echo_n "(cached) " >&6
596c9d4b 14328else
81ecdfbb 14329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14330/* end confdefs.h. */
596c9d4b
KB
14331
14332#define _SYSCALL32
d30c5336
JK
14333/* Needed for new procfs interface on sparc-solaris. */
14334#define _STRUCTURED_PROC 1
596c9d4b 14335#include <sys/procfs.h>
bec39cab
AC
14336int
14337main ()
14338{
97bf5e38 14339gregset_t avar
bec39cab
AC
14340 ;
14341 return 0;
14342}
14343_ACEOF
81ecdfbb 14344if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14345 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 14346else
81ecdfbb 14347 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 14348
596c9d4b 14349fi
81ecdfbb 14350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
14351fi
14352
97bf5e38 14353 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 14354
81ecdfbb 14355$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
14356
14357 fi
81ecdfbb
RW
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14359$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 14360
81ecdfbb
RW
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14362$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14363 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
14364 $as_echo_n "(cached) " >&6
d84dd0c5 14365else
81ecdfbb 14366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14367/* end confdefs.h. */
97bf5e38
MK
14368
14369#define _SYSCALL32
d30c5336
JK
14370/* Needed for new procfs interface on sparc-solaris. */
14371#define _STRUCTURED_PROC 1
d84dd0c5 14372#include <sys/procfs.h>
bec39cab
AC
14373int
14374main ()
14375{
97bf5e38 14376fpregset_t avar
bec39cab
AC
14377 ;
14378 return 0;
14379}
14380_ACEOF
81ecdfbb 14381if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14382 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 14383else
81ecdfbb 14384 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 14385
d84dd0c5 14386fi
81ecdfbb 14387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
14388fi
14389
97bf5e38 14390 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 14391
81ecdfbb 14392$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 14393
97bf5e38 14394 fi
81ecdfbb
RW
14395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14396$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 14397
81ecdfbb
RW
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14399$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14400 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
14401 $as_echo_n "(cached) " >&6
c906108c 14402else
81ecdfbb 14403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14404/* end confdefs.h. */
c906108c 14405
97bf5e38 14406#define _SYSCALL32
d30c5336
JK
14407/* Needed for new procfs interface on sparc-solaris. */
14408#define _STRUCTURED_PROC 1
97bf5e38 14409#include <sys/procfs.h>
bec39cab
AC
14410int
14411main ()
14412{
97bf5e38 14413prgregset_t avar
bec39cab
AC
14414 ;
14415 return 0;
14416}
14417_ACEOF
81ecdfbb 14418if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14419 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 14420else
81ecdfbb 14421 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 14422
c906108c 14423fi
81ecdfbb 14424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14425fi
14426
97bf5e38 14427 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 14428
81ecdfbb 14429$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 14430
97bf5e38 14431 fi
81ecdfbb
RW
14432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14433$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 14434
81ecdfbb
RW
14435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14436$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14437 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
14438 $as_echo_n "(cached) " >&6
d45fe813 14439else
81ecdfbb 14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14441/* end confdefs.h. */
97bf5e38
MK
14442
14443#define _SYSCALL32
d30c5336
JK
14444/* Needed for new procfs interface on sparc-solaris. */
14445#define _STRUCTURED_PROC 1
97bf5e38 14446#include <sys/procfs.h>
bec39cab
AC
14447int
14448main ()
14449{
97bf5e38 14450prfpregset_t avar
bec39cab
AC
14451 ;
14452 return 0;
14453}
14454_ACEOF
81ecdfbb 14455if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14456 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 14457else
81ecdfbb 14458 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 14459
d45fe813 14460fi
81ecdfbb 14461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14462fi
14463
97bf5e38 14464 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 14465
81ecdfbb 14466$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 14467
97bf5e38 14468 fi
81ecdfbb
RW
14469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14470$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 14471
81ecdfbb
RW
14472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14473$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14474 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
14475 $as_echo_n "(cached) " >&6
d45fe813 14476else
81ecdfbb 14477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14478/* end confdefs.h. */
97bf5e38
MK
14479
14480#define _SYSCALL32
d30c5336
JK
14481/* Needed for new procfs interface on sparc-solaris. */
14482#define _STRUCTURED_PROC 1
97bf5e38 14483#include <sys/procfs.h>
bec39cab
AC
14484int
14485main ()
14486{
97bf5e38 14487prgregset32_t avar
bec39cab
AC
14488 ;
14489 return 0;
14490}
14491_ACEOF
81ecdfbb 14492if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14493 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 14494else
81ecdfbb 14495 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 14496
d45fe813 14497fi
81ecdfbb 14498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14499fi
14500
97bf5e38 14501 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 14502
81ecdfbb 14503$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 14504
97bf5e38 14505 fi
81ecdfbb
RW
14506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14507$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 14508
81ecdfbb
RW
14509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14510$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14511 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
14512 $as_echo_n "(cached) " >&6
d45fe813 14513else
81ecdfbb 14514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14515/* end confdefs.h. */
97bf5e38 14516
d45fe813 14517#define _SYSCALL32
d30c5336
JK
14518/* Needed for new procfs interface on sparc-solaris. */
14519#define _STRUCTURED_PROC 1
97bf5e38 14520#include <sys/procfs.h>
bec39cab
AC
14521int
14522main ()
14523{
97bf5e38 14524lwpid_t avar
bec39cab
AC
14525 ;
14526 return 0;
14527}
14528_ACEOF
81ecdfbb 14529if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14530 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 14531else
81ecdfbb 14532 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 14533
d45fe813 14534fi
81ecdfbb 14535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
14536fi
14537
97bf5e38 14538 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 14539
81ecdfbb 14540$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 14541
97bf5e38 14542 fi
81ecdfbb
RW
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14544$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 14545
81ecdfbb
RW
14546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14547$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14548 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
14549 $as_echo_n "(cached) " >&6
c906108c 14550else
81ecdfbb 14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14552/* end confdefs.h. */
c906108c 14553
97bf5e38 14554#define _SYSCALL32
d30c5336
JK
14555/* Needed for new procfs interface on sparc-solaris. */
14556#define _STRUCTURED_PROC 1
97bf5e38 14557#include <sys/procfs.h>
bec39cab
AC
14558int
14559main ()
14560{
97bf5e38 14561psaddr_t avar
bec39cab
AC
14562 ;
14563 return 0;
14564}
14565_ACEOF
81ecdfbb 14566if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 14567 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 14568else
81ecdfbb 14569 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 14570
c906108c 14571fi
81ecdfbb 14572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
14573fi
14574
97bf5e38 14575 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 14576
81ecdfbb 14577$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 14578
97bf5e38 14579 fi
81ecdfbb
RW
14580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14581$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 14582
97bf5e38
MK
14583
14584
14585
97bf5e38 14586 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
14587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14588$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14589 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
14590 $as_echo_n "(cached) " >&6
c906108c 14591else
81ecdfbb 14592 if test "$cross_compiling" = yes; then :
97bf5e38 14593 gdb_cv_prfpregset_t_broken=yes
c906108c 14594else
81ecdfbb 14595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14596/* end confdefs.h. */
97bf5e38
MK
14597#include <sys/procfs.h>
14598 int main ()
14599 {
14600 if (sizeof (prfpregset_t) == sizeof (void *))
14601 return 1;
14602 return 0;
14603 }
bec39cab 14604_ACEOF
81ecdfbb 14605if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14606 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
14607else
14608 gdb_cv_prfpregset_t_broken=yes
c906108c 14609fi
81ecdfbb
RW
14610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14611 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14612fi
81ecdfbb 14613
c906108c
SS
14614fi
14615
81ecdfbb
RW
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14617$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 14618 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 14619
81ecdfbb 14620$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 14621
97bf5e38
MK
14622 fi
14623 fi
c906108c 14624fi
c906108c 14625
bc8bcb4b 14626# Check if the compiler supports the `long long' type.
c906108c 14627
81ecdfbb
RW
14628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14629$as_echo_n "checking for long long support in compiler... " >&6; }
14630if test "${gdb_cv_c_long_long+set}" = set; then :
14631 $as_echo_n "(cached) " >&6
97bf5e38 14632else
81ecdfbb 14633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14634/* end confdefs.h. */
bc8bcb4b 14635extern long long foo;
bec39cab
AC
14636int
14637main ()
14638{
bc8bcb4b 14639switch (foo & 2) { case 0: return 1; }
bec39cab
AC
14640 ;
14641 return 0;
14642}
14643_ACEOF
81ecdfbb 14644if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
14645 gdb_cv_c_long_long=yes
14646else
81ecdfbb 14647 gdb_cv_c_long_long=no
97bf5e38 14648fi
81ecdfbb 14649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14650fi
81ecdfbb
RW
14651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14652$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
14653if test $gdb_cv_c_long_long != yes; then
14654 # libdecnumber requires long long.
14655 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
14656fi
14657
bc8bcb4b 14658# Check if the compiler and runtime support printing long longs.
97bf5e38 14659
81ecdfbb
RW
14660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14661$as_echo_n "checking for long long support in printf... " >&6; }
14662if test "${gdb_cv_printf_has_long_long+set}" = set; then :
14663 $as_echo_n "(cached) " >&6
97bf5e38 14664else
81ecdfbb 14665 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14666 gdb_cv_printf_has_long_long=no
14667else
81ecdfbb 14668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14669/* end confdefs.h. */
bc8bcb4b
MK
14670$ac_includes_default
14671int
14672main ()
14673{
14674char buf[32];
97bf5e38
MK
14675 long long l = 0;
14676 l = (l << 16) + 0x0123;
14677 l = (l << 16) + 0x4567;
14678 l = (l << 16) + 0x89ab;
14679 l = (l << 16) + 0xcdef;
14680 sprintf (buf, "0x%016llx", l);
14681 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
14682 ;
14683 return 0;
c906108c 14684}
bec39cab 14685_ACEOF
81ecdfbb 14686if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14687 gdb_cv_printf_has_long_long=yes
14688else
81ecdfbb 14689 gdb_cv_printf_has_long_long=no
97bf5e38 14690fi
81ecdfbb
RW
14691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14692 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14693fi
81ecdfbb 14694
97bf5e38 14695fi
81ecdfbb
RW
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14697$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 14698if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 14699
81ecdfbb 14700$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
14701
14702fi
97bf5e38 14703
1a619819
LM
14704# Check if the compiler and runtime support printing decfloats.
14705
81ecdfbb
RW
14706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14707$as_echo_n "checking for decfloat support in printf... " >&6; }
14708if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
14709 $as_echo_n "(cached) " >&6
1a619819 14710else
81ecdfbb 14711 if test "$cross_compiling" = yes; then :
1a619819
LM
14712 gdb_cv_printf_has_decfloat=no
14713else
81ecdfbb 14714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
14715/* end confdefs.h. */
14716$ac_includes_default
14717int
14718main ()
14719{
14720char buf[64];
14721 _Decimal32 d32 = 1.2345df;
14722 _Decimal64 d64 = 1.2345dd;
14723 _Decimal128 d128 = 1.2345dl;
14724 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14725 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14726 ;
14727 return 0;
14728}
14729_ACEOF
81ecdfbb 14730if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
14731 gdb_cv_printf_has_decfloat=yes
14732else
81ecdfbb 14733 gdb_cv_printf_has_decfloat=no
1a619819 14734fi
81ecdfbb
RW
14735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14736 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 14737fi
81ecdfbb 14738
1a619819 14739fi
81ecdfbb
RW
14740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14741$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
14742if test $gdb_cv_printf_has_decfloat = yes; then
14743
81ecdfbb 14744$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
14745
14746fi
14747
bc8bcb4b
MK
14748# Check if the compiler supports the `long double' type. We can't use
14749# AC_C_LONG_DOUBLE because that one does additional checks on the
14750# constants defined in <float.h> that fail on some systems,
14751# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 14752
81ecdfbb
RW
14753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14754$as_echo_n "checking for long double support in compiler... " >&6; }
14755if test "${gdb_cv_c_long_double+set}" = set; then :
14756 $as_echo_n "(cached) " >&6
97bf5e38 14757else
81ecdfbb 14758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14759/* end confdefs.h. */
97bf5e38 14760long double foo;
bec39cab 14761_ACEOF
81ecdfbb 14762if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 14763 gdb_cv_c_long_double=yes
97bf5e38 14764else
81ecdfbb 14765 gdb_cv_c_long_double=no
97bf5e38 14766fi
81ecdfbb 14767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 14768fi
81ecdfbb
RW
14769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14770$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 14771if test $gdb_cv_c_long_double = yes; then
c906108c 14772
81ecdfbb 14773$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14774
14775fi
14776
bc8bcb4b 14777# Check if the compiler and runtime support printing long doubles.
97bf5e38 14778
81ecdfbb
RW
14779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14780$as_echo_n "checking for long double support in printf... " >&6; }
14781if test "${gdb_cv_printf_has_long_double+set}" = set; then :
14782 $as_echo_n "(cached) " >&6
97bf5e38 14783else
81ecdfbb 14784 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14785 gdb_cv_printf_has_long_double=no
14786else
81ecdfbb 14787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14788/* end confdefs.h. */
bc8bcb4b
MK
14789$ac_includes_default
14790int
14791main ()
14792{
14793char buf[16];
97bf5e38
MK
14794 long double f = 3.141592653;
14795 sprintf (buf, "%Lg", f);
14796 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
14797 ;
14798 return 0;
97bf5e38 14799}
bec39cab 14800_ACEOF
81ecdfbb 14801if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 14802 gdb_cv_printf_has_long_double=yes
c906108c 14803else
81ecdfbb 14804 gdb_cv_printf_has_long_double=no
c906108c 14805fi
81ecdfbb
RW
14806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14807 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 14808fi
81ecdfbb 14809
c906108c 14810fi
81ecdfbb
RW
14811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14812$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 14813if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 14814
81ecdfbb 14815$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14816
14817fi
97bf5e38 14818
bc8bcb4b 14819# Check if the compiler and runtime support scanning long doubles.
97bf5e38 14820
81ecdfbb
RW
14821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14822$as_echo_n "checking for long double support in scanf... " >&6; }
14823if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
14824 $as_echo_n "(cached) " >&6
97bf5e38 14825else
81ecdfbb 14826 if test "$cross_compiling" = yes; then :
97bf5e38
MK
14827 gdb_cv_scanf_has_long_double=no
14828else
81ecdfbb 14829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14830/* end confdefs.h. */
bc8bcb4b
MK
14831#include <stdio.h>
14832int
14833main ()
14834{
14835char *buf = "3.141592653";
97bf5e38
MK
14836 long double f = 0;
14837 sscanf (buf, "%Lg", &f);
14838 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
14839 ;
14840 return 0;
97bf5e38 14841}
bec39cab 14842_ACEOF
81ecdfbb 14843if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
14844 gdb_cv_scanf_has_long_double=yes
14845else
81ecdfbb 14846 gdb_cv_scanf_has_long_double=no
97bf5e38 14847fi
81ecdfbb
RW
14848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14849 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 14850fi
81ecdfbb 14851
c906108c 14852fi
81ecdfbb
RW
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14854$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 14855if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 14856
81ecdfbb 14857$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
14858
14859fi
c906108c 14860
438013df
AO
14861case ${host_os} in
14862aix*)
81ecdfbb
RW
14863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14864$as_echo_n "checking for -bbigtoc option... " >&6; }
14865if test "${gdb_cv_bigtoc+set}" = set; then :
14866 $as_echo_n "(cached) " >&6
438013df 14867else
bec39cab 14868
438013df
AO
14869 SAVE_LDFLAGS=$LDFLAGS
14870
14871 case $GCC in
14872 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14873 *) gdb_cv_bigtoc=-bbigtoc ;;
14874 esac
14875
14876 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 14877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14878/* end confdefs.h. */
438013df 14879
bec39cab
AC
14880int
14881main ()
14882{
438013df 14883int i;
bec39cab
AC
14884 ;
14885 return 0;
14886}
14887_ACEOF
81ecdfbb 14888if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14889
81ecdfbb
RW
14890else
14891 gdb_cv_bigtoc=
438013df 14892fi
81ecdfbb
RW
14893rm -f core conftest.err conftest.$ac_objext \
14894 conftest$ac_exeext conftest.$ac_ext
ec76baa5 14895 LDFLAGS="${SAVE_LDFLAGS}"
438013df 14896
bec39cab 14897fi
81ecdfbb
RW
14898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
14899$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
14900 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
14901 ;;
14902esac
14903
38f6b338 14904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 14905$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
14906dynamic_list=false
14907if test "${gdb_native}" = yes; then
14908 # The dynamically loaded libthread_db needs access to symbols in the gdb
14909 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
14910 # may not be supported there.
14911 old_LDFLAGS="$LDFLAGS"
14912 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
14913 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
14914 LDFLAGS="$LDFLAGS $RDYNAMIC"
14915 if test "${have_libpython}" = no; then
14916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
14917/* end confdefs.h. */
14918
14919int
14920main ()
14921{
14922
14923 ;
14924 return 0;
14925}
14926_ACEOF
14927if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
14928 dynamic_list=true
14929fi
14930rm -f core conftest.err conftest.$ac_objext \
14931 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
14932 else
14933 # Workaround http://bugs.python.org/issue4434 where static
14934 # libpythonX.Y.a would get its symbols required for
14935 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
14936 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
14937
14938 # Note the workaround for Python
14939 # http://bugs.python.org/issue10112 earlier has removed
14940 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
14941 # here too, as otherwise it'd make this -Wl,--dynamic-list test
14942 # always pass.
38f6b338
JK
14943 old_CFLAGS="$CFLAGS"
14944 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
14945 old_LIBS="$LIBS"
14946 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
14947 old_CPPFLAGS="$CPPFLAGS"
14948 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 14949 if test "$cross_compiling" = yes; then :
3bebe2f2 14950 true
f6528abd 14951else
3bebe2f2
JK
14952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14953/* end confdefs.h. */
1b4f615e 14954#include "Python.h"
3bebe2f2
JK
14955int
14956main ()
14957{
14958int err;
38f6b338
JK
14959 Py_Initialize ();
14960 err = PyRun_SimpleString ("import itertools\n");
14961 Py_Finalize ();
14962 return err == 0 ? 0 : 1;
3bebe2f2
JK
14963 ;
14964 return 0;
14965}
14966_ACEOF
14967if ac_fn_c_try_run "$LINENO"; then :
14968 dynamic_list=true
14969fi
14970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14971 conftest.$ac_objext conftest.beam conftest.$ac_ext
14972fi
14973
8c1fb155 14974 LIBS="$old_LIBS"
38f6b338 14975 CFLAGS="$old_CFLAGS"
1b4f615e 14976 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
14977 fi
14978 LDFLAGS="$old_LDFLAGS"
14979fi
14980if $dynamic_list; then
14981 found="-Wl,--dynamic-list"
14982 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 14983else
38f6b338
JK
14984 found="-rdynamic"
14985 RDYNAMIC="-rdynamic"
f6528abd 14986fi
f6528abd 14987
38f6b338 14988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 14989$as_echo "$found" >&6; }
0407b3f1 14990
f6528abd 14991
0407b3f1 14992if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 14993 case ${host_os} in
d92419e5 14994 aix*)
81ecdfbb
RW
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
14996$as_echo_n "checking for AiX thread debugging library... " >&6; }
14997 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
14998 $as_echo_n "(cached) " >&6
bec39cab 14999else
81ecdfbb 15000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15001/* end confdefs.h. */
d92419e5 15002#include <sys/pthdebug.h>
bec39cab
AC
15003int
15004main ()
15005{
d92419e5
JB
15006#ifndef PTHDB_VERSION_3
15007 #error
15008 #endif
bec39cab
AC
15009 ;
15010 return 0;
15011}
15012_ACEOF
81ecdfbb 15013if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
15014 gdb_cv_have_aix_thread_debug=yes
15015else
81ecdfbb 15016 gdb_cv_have_aix_thread_debug=no
d92419e5 15017fi
81ecdfbb 15018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
15019fi
15020
81ecdfbb
RW
15021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15022$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
15023 if test $gdb_cv_have_aix_thread_debug = yes; then
15024 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 15025 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 15026 LIBS="$LIBS -lpthdebug"
d645e32e
JB
15027
15028 # Older versions of AIX do not provide the declaration for
15029 # the getthrds function (it appears that it was introduced
15030 # with AIX 6.x).
15031 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15032"
15033if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
15034 ac_have_decl=1
15035else
15036 ac_have_decl=0
15037fi
15038
15039cat >>confdefs.h <<_ACEOF
15040#define HAVE_DECL_GETTHRDS $ac_have_decl
15041_ACEOF
15042
d92419e5
JB
15043 fi
15044 ;;
c906108c 15045 esac
bec39cab 15046
c906108c
SS
15047fi
15048
3f47be5c 15049if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15051$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15052if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
15053 $as_echo_n "(cached) " >&6
bec39cab 15054else
81ecdfbb 15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15056/* end confdefs.h. */
3f47be5c 15057#include <thread_db.h>
bec39cab
AC
15058int
15059main ()
15060{
3f47be5c 15061int i = TD_NOTALLOC;
bec39cab
AC
15062 ;
15063 return 0;
15064}
15065_ACEOF
81ecdfbb 15066if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
15067 gdb_cv_thread_db_h_has_td_notalloc=yes
15068else
81ecdfbb 15069 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 15070
3f47be5c 15071fi
81ecdfbb 15072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 15073
bec39cab 15074fi
81ecdfbb
RW
15075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15076$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15078$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15079if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
15080 $as_echo_n "(cached) " >&6
59f80f10 15081else
81ecdfbb 15082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15083/* end confdefs.h. */
15084#include <thread_db.h>
15085int
15086main ()
15087{
15088int i = TD_VERSION;
15089 ;
15090 return 0;
15091}
15092_ACEOF
81ecdfbb 15093if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15094 gdb_cv_thread_db_h_has_td_version=yes
15095else
81ecdfbb 15096 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
15097
15098fi
81ecdfbb 15099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15100
15101fi
81ecdfbb
RW
15102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15103$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15105$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15106if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
15107 $as_echo_n "(cached) " >&6
59f80f10 15108else
81ecdfbb 15109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
15110/* end confdefs.h. */
15111#include <thread_db.h>
15112int
15113main ()
15114{
15115int i = TD_NOTLS;
15116 ;
15117 return 0;
15118}
15119_ACEOF
81ecdfbb 15120if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
15121 gdb_cv_thread_db_h_has_td_notls=yes
15122else
81ecdfbb 15123 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
15124
15125fi
81ecdfbb 15126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
15127
15128fi
81ecdfbb
RW
15129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15130$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
15131fi
15132if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 15133
81ecdfbb 15134$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 15135
59f80f10
DJ
15136fi
15137if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15138
81ecdfbb 15139$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
15140
15141fi
15142if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15143
81ecdfbb 15144$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 15145
3f47be5c
EZ
15146fi
15147
81ecdfbb
RW
15148ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15149"
15150if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
15151 ac_have_decl=1
10568435 15152else
81ecdfbb 15153 ac_have_decl=0
10568435 15154fi
10568435
JK
15155
15156cat >>confdefs.h <<_ACEOF
81ecdfbb 15157#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
15158_ACEOF
15159
15160
81ecdfbb
RW
15161if test "$cross_compiling" = yes; then :
15162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15163/* end confdefs.h. */
15164#include <sys/personality.h>
15165int
15166main ()
15167{
15168
15169# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15170# define ADDR_NO_RANDOMIZE 0x0040000
15171# endif
15172 /* Test the flag could be set and stays set. */
15173 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15174 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15175 return 1
15176 ;
15177 return 0;
15178}
15179_ACEOF
81ecdfbb 15180if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
15181 have_personality=true
15182else
81ecdfbb 15183 have_personality=false
10568435 15184fi
81ecdfbb
RW
15185rm -f core conftest.err conftest.$ac_objext \
15186 conftest$ac_exeext conftest.$ac_ext
10568435 15187else
81ecdfbb 15188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
15189/* end confdefs.h. */
15190#include <sys/personality.h>
15191int
15192main ()
15193{
15194
15195# if !HAVE_DECL_ADDR_NO_RANDOMIZE
15196# define ADDR_NO_RANDOMIZE 0x0040000
15197# endif
15198 /* Test the flag could be set and stays set. */
15199 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15200 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15201 return 1
15202 ;
15203 return 0;
15204}
15205_ACEOF
81ecdfbb 15206if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
15207 have_personality=true
15208else
81ecdfbb 15209 have_personality=false
10568435 15210fi
81ecdfbb
RW
15211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15212 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 15213fi
81ecdfbb 15214
10568435
JK
15215if $have_personality
15216then
15217
81ecdfbb 15218$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
15219
15220fi
15221
e655c1a2
PA
15222case $host_os in
15223 go32* | *djgpp*)
15224 gdbinit=gdb.ini
15225 ;;
15226 *)
15227 gdbinit=.gdbinit
15228 ;;
15229esac
15230
15231cat >>confdefs.h <<_ACEOF
15232#define GDBINIT "$gdbinit"
15233_ACEOF
15234
15235
fb40c209 15236
f83d8a90
DE
15237# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15238# except that the argument to --with-sysroot is optional.
15239# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15240if test "x$with_sysroot" = xyes; then
15241 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15242fi
bec39cab 15243
81ecdfbb
RW
15244# Check whether --with-sysroot was given.
15245if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
15246 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15247else
15248 TARGET_SYSTEM_ROOT=
15249fi
030292b7 15250
030292b7 15251
f83d8a90
DE
15252 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15253 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15254 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15255 ac_define_dir=`eval echo $ac_define_dir`
030292b7 15256
f83d8a90
DE
15257cat >>confdefs.h <<_ACEOF
15258#define TARGET_SYSTEM_ROOT "$ac_define_dir"
15259_ACEOF
bec39cab 15260
030292b7 15261
b14b1491 15262
f83d8a90
DE
15263
15264 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15265 if test "x$prefix" = xNONE; then
15266 test_prefix=/usr/local
15267 else
15268 test_prefix=$prefix
15269 fi
15270 else
15271 test_prefix=$exec_prefix
15272 fi
15273 value=0
15274 case ${ac_define_dir} in
15275 "${test_prefix}"|"${test_prefix}/"*|\
15276 '${exec_prefix}'|'${exec_prefix}/'*)
15277 value=1
15278 ;;
15279 esac
15280
15281cat >>confdefs.h <<_ACEOF
15282#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15283_ACEOF
030292b7
DJ
15284
15285
15286
16e7150e 15287
16e7150e 15288
81ecdfbb
RW
15289# Check whether --with-system-gdbinit was given.
15290if test "${with_system_gdbinit+set}" = set; then :
15291 withval=$with_system_gdbinit;
b14b1491
TT
15292 SYSTEM_GDBINIT=$withval
15293else
15294 SYSTEM_GDBINIT=
81ecdfbb
RW
15295fi
15296
16e7150e
JG
15297
15298 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15299 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 15300 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
15301 ac_define_dir=`eval echo $ac_define_dir`
15302
15303cat >>confdefs.h <<_ACEOF
15304#define SYSTEM_GDBINIT "$ac_define_dir"
15305_ACEOF
15306
15307
15308
0c4a4063 15309
b14b1491
TT
15310 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15311 if test "x$prefix" = xNONE; then
15312 test_prefix=/usr/local
15313 else
15314 test_prefix=$prefix
15315 fi
15316 else
15317 test_prefix=$exec_prefix
15318 fi
15319 value=0
15320 case ${ac_define_dir} in
15321 "${test_prefix}"|"${test_prefix}/"*|\
15322 '${exec_prefix}'|'${exec_prefix}/'*)
15323 value=1
15324 ;;
15325 esac
16e7150e 15326
b14b1491
TT
15327cat >>confdefs.h <<_ACEOF
15328#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
15329_ACEOF
15330
b14b1491 15331
16e7150e 15332
0c4a4063 15333
b835bb52 15334
81ecdfbb
RW
15335# Check whether --enable-werror was given.
15336if test "${enable_werror+set}" = set; then :
15337 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
15338 yes | y) ERROR_ON_WARNING="yes" ;;
15339 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 15340 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 15341 esac
81ecdfbb
RW
15342fi
15343
094a342e 15344
9a084706
PA
15345# Enable -Werror by default when using gcc. Turn it off for releases.
15346if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
15347 ERROR_ON_WARNING=yes
15348fi
15349
15350WERROR_CFLAGS=""
15351if test "${ERROR_ON_WARNING}" = yes ; then
15352 WERROR_CFLAGS="-Werror"
15353fi
15354
cf6de44d 15355# The options we'll try to enable.
aac331e4 15356build_warnings="-Wall -Wpointer-arith \
1cb5e2a4 15357-Wno-unused -Wunused-value -Wunused-function \
aac331e4 15358-Wno-switch -Wno-char-subscripts \
cf6de44d 15359-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
8465943a
SM
15360-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
15361-Wno-mismatched-tags"
3bc3d82a 15362
3526781e 15363case "${host}" in
4fa7574e
RO
15364 *-*-mingw32*)
15365 # Enable -Wno-format by default when using gcc on mingw since many
15366 # GCC versions complain about %I64.
15367 build_warnings="$build_warnings -Wno-format" ;;
15368 *-*-solaris*)
15369 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15370 # doesn't understand.
15371 build_warnings="$build_warnings -Wno-unknown-pragmas"
15372 # Solaris 11 <unistd.h> marks vfork deprecated.
15373 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
d3685d60 15374 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
15375esac
15376
81ecdfbb
RW
15377# Check whether --enable-build-warnings was given.
15378if test "${enable_build_warnings+set}" = set; then :
15379 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
15380 yes) ;;
15381 no) build_warnings="-w";;
15382 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15383 build_warnings="${build_warnings} ${t}";;
15384 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15385 build_warnings="${t} ${build_warnings}";;
15386 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15387esac
d4f3574e 15388if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 15389 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 15390fi
81ecdfbb
RW
15391fi
15392# Check whether --enable-gdb-build-warnings was given.
15393if test "${enable_gdb_build_warnings+set}" = set; then :
15394 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
15395 yes) ;;
15396 no) build_warnings="-w";;
15397 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15398 build_warnings="${build_warnings} ${t}";;
15399 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15400 build_warnings="${t} ${build_warnings}";;
15401 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15402esac
15403if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15404 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15405fi
81ecdfbb 15406fi
3bc3d82a
PA
15407
15408# The set of warnings supported by a C++ compiler is not the same as
15409# of the C compiler.
cf6de44d 15410ac_ext=cpp
3bc3d82a
PA
15411ac_cpp='$CXXCPP $CPPFLAGS'
15412ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15413ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15414ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15415
3bc3d82a 15416
81ecdfbb 15417WARN_CFLAGS=""
c906108c
SS
15418if test "x${build_warnings}" != x -a "x$GCC" = xyes
15419then
81ecdfbb
RW
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15421$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
15422 # Separate out the -Werror flag as some files just cannot be
15423 # compiled with it enabled.
15424 for w in ${build_warnings}; do
7544db95
PA
15425 # GCC does not complain about -Wno-unknown-warning. Invert
15426 # and test -Wunknown-warning instead.
15427 case $w in
15428 -Wno-*)
15429 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15430 *)
15431 wtest=$w ;;
15432 esac
15433
746a987d
AC
15434 case $w in
15435 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
15436 *)
15437 # Check whether GCC accepts it.
4536bbc6 15438 saved_CFLAGS="$CFLAGS"
3e019bdc 15439 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 15440 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 15441 CXXFLAGS="$CXXFLAGS -Werror $wtest"
54019719 15442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15443/* end confdefs.h. */
4536bbc6 15444
bec39cab
AC
15445int
15446main ()
15447{
4536bbc6 15448
bec39cab
AC
15449 ;
15450 return 0;
15451}
15452_ACEOF
3bc3d82a 15453if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 15454 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 15455fi
81ecdfbb 15456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 15457 CFLAGS="$saved_CFLAGS"
3bc3d82a 15458 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
15459 esac
15460 done
81ecdfbb
RW
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15462$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
15463fi
15464
15465
104c1213 15466
cf6de44d 15467ac_ext=c
3bc3d82a
PA
15468ac_cpp='$CPP $CPPFLAGS'
15469ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15470ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15471ac_compiler_gnu=$ac_cv_c_compiler_gnu
15472
3bc3d82a 15473
b835bb52 15474
7a292a7a 15475# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
15476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15477$as_echo_n "checking for cygwin... " >&6; }
15478if test "${gdb_cv_os_cygwin+set}" = set; then :
15479 $as_echo_n "(cached) " >&6
bec39cab 15480else
81ecdfbb 15481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15482/* end confdefs.h. */
7a292a7a
SS
15483
15484#if defined (__CYGWIN__) || defined (__CYGWIN32__)
15485lose
15486#endif
bec39cab 15487_ACEOF
7a292a7a 15488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 15489 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
15490 gdb_cv_os_cygwin=yes
15491else
7a292a7a
SS
15492 gdb_cv_os_cygwin=no
15493fi
15494rm -f conftest*
15495
15496fi
81ecdfbb
RW
15497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15498$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 15499
aff38e61 15500
3eb25fda 15501SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 15502case ${host} in
95cbc983
AC
15503 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15504 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 15505 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
15506esac
15507
15508
cd0fc7c3
SS
15509# libreadline needs libuser32.a in a cygwin environment
15510WIN32LIBS=
15511if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
15512 WIN32LIBS="-luser32"
15513 case "${target}" in
15514 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15515 ;;
15516 esac
cd0fc7c3 15517fi
c906108c 15518
b4505029
MM
15519# The ser-tcp.c module requires sockets.
15520case ${host} in
15521 *mingw32*)
15522
81ecdfbb 15523$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
15524
15525 WIN32LIBS="$WIN32LIBS -lws2_32"
15526 ;;
15527esac
15528
7a292a7a 15529
31d99776 15530# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
15531
15532 OLD_CFLAGS=$CFLAGS
15533 OLD_LDFLAGS=$LDFLAGS
15534 OLD_LIBS=$LIBS
15535 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15536 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15537 # always want our bfd.
15538 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15539 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15540 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 15541 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15542 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 15543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
15544$as_echo_n "checking for ELF support in BFD... " >&6; }
15545if test "${gdb_cv_var_elf+set}" = set; then :
15546 $as_echo_n "(cached) " >&6
31d99776 15547else
81ecdfbb 15548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
15549/* end confdefs.h. */
15550#include <stdlib.h>
def63ff0
TT
15551 #include "bfd.h"
15552 #include "elf-bfd.h"
31d99776
DJ
15553
15554int
15555main ()
15556{
def63ff0 15557return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
15558 ;
15559 return 0;
15560}
15561_ACEOF
81ecdfbb 15562if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
15563 gdb_cv_var_elf=yes
15564else
81ecdfbb 15565 gdb_cv_var_elf=no
31d99776 15566fi
81ecdfbb
RW
15567rm -f core conftest.err conftest.$ac_objext \
15568 conftest$ac_exeext conftest.$ac_ext
31d99776 15569fi
81ecdfbb
RW
15570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15571$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
15572 CFLAGS=$OLD_CFLAGS
15573 LDFLAGS=$OLD_LDFLAGS
15574 LIBS=$OLD_LIBS
31d99776 15575if test $gdb_cv_var_elf = yes; then
d4777acb 15576 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 15577
81ecdfbb 15578$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 15579
075ff26d
JK
15580 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15581 if test "$plugins" = "yes"; then
a48b32c0
L
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15583$as_echo_n "checking for library containing dlopen... " >&6; }
15584if test "${ac_cv_search_dlopen+set}" = set; then :
15585 $as_echo_n "(cached) " >&6
15586else
15587 ac_func_search_save_LIBS=$LIBS
15588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15589/* end confdefs.h. */
15590
15591/* Override any GCC internal prototype to avoid an error.
15592 Use char because int might match the return type of a GCC
15593 builtin and then its argument prototype would still apply. */
15594#ifdef __cplusplus
15595extern "C"
15596#endif
15597char dlopen ();
15598int
15599main ()
15600{
15601return dlopen ();
15602 ;
15603 return 0;
15604}
15605_ACEOF
15606for ac_lib in '' dl; do
15607 if test -z "$ac_lib"; then
15608 ac_res="none required"
15609 else
15610 ac_res=-l$ac_lib
15611 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15612 fi
15613 if ac_fn_c_try_link "$LINENO"; then :
15614 ac_cv_search_dlopen=$ac_res
15615fi
15616rm -f core conftest.err conftest.$ac_objext \
15617 conftest$ac_exeext
15618 if test "${ac_cv_search_dlopen+set}" = set; then :
15619 break
15620fi
15621done
15622if test "${ac_cv_search_dlopen+set}" = set; then :
15623
15624else
15625 ac_cv_search_dlopen=no
15626fi
15627rm conftest.$ac_ext
15628LIBS=$ac_func_search_save_LIBS
15629fi
15630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15631$as_echo "$ac_cv_search_dlopen" >&6; }
15632ac_res=$ac_cv_search_dlopen
15633if test "$ac_res" != no; then :
15634 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15635
15636fi
15637
075ff26d 15638 fi
31d99776 15639fi
31d99776 15640
4f05add4
TT
15641# Add macho support to GDB, but only if BFD includes it.
15642
15643 OLD_CFLAGS=$CFLAGS
15644 OLD_LDFLAGS=$LDFLAGS
15645 OLD_LIBS=$LIBS
15646 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15647 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15648 # always want our bfd.
15649 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
15650 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15651 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 15652 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 15653 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
15654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15655$as_echo_n "checking for Mach-O support in BFD... " >&6; }
15656if test "${gdb_cv_var_macho+set}" = set; then :
15657 $as_echo_n "(cached) " >&6
15658else
15659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15660/* end confdefs.h. */
15661#include <stdlib.h>
15662 #include "bfd.h"
15663 #include "mach-o.h"
15664
15665int
15666main ()
15667{
15668return bfd_mach_o_lookup_command (NULL, 0, NULL);
15669 ;
15670 return 0;
15671}
15672_ACEOF
15673if ac_fn_c_try_link "$LINENO"; then :
15674 gdb_cv_var_macho=yes
15675else
15676 gdb_cv_var_macho=no
15677fi
15678rm -f core conftest.err conftest.$ac_objext \
15679 conftest$ac_exeext conftest.$ac_ext
15680fi
15681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15682$as_echo "$gdb_cv_var_macho" >&6; }
15683 CFLAGS=$OLD_CFLAGS
15684 LDFLAGS=$OLD_LDFLAGS
15685 LIBS=$OLD_LIBS
15686if test $gdb_cv_var_macho = yes; then
15687 CONFIG_OBS="$CONFIG_OBS machoread.o"
15688fi
15689
121ce6e5
DJ
15690# Add any host-specific objects to GDB.
15691CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15692
608e2dbb
TT
15693# If building on ELF, look for lzma support for embedded compressed debug info.
15694if test $gdb_cv_var_elf = yes; then
15695
15696# Check whether --with-lzma was given.
15697if test "${with_lzma+set}" = set; then :
15698 withval=$with_lzma;
15699else
15700 with_lzma=auto
15701fi
15702
15703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15704$as_echo_n "checking whether to use lzma... " >&6; }
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15706$as_echo "$with_lzma" >&6; }
15707
15708 if test "${with_lzma}" != no; then
15709
15710
15711
15712
15713
15714
15715
15716
15717 use_additional=yes
15718
15719 acl_save_prefix="$prefix"
15720 prefix="$acl_final_prefix"
15721 acl_save_exec_prefix="$exec_prefix"
15722 exec_prefix="$acl_final_exec_prefix"
15723
15724 eval additional_includedir=\"$includedir\"
15725 eval additional_libdir=\"$libdir\"
15726
15727 exec_prefix="$acl_save_exec_prefix"
15728 prefix="$acl_save_prefix"
15729
15730
15731# Check whether --with-liblzma-prefix was given.
15732if test "${with_liblzma_prefix+set}" = set; then :
15733 withval=$with_liblzma_prefix;
15734 if test "X$withval" = "Xno"; then
15735 use_additional=no
15736 else
15737 if test "X$withval" = "X"; then
15738
15739 acl_save_prefix="$prefix"
15740 prefix="$acl_final_prefix"
15741 acl_save_exec_prefix="$exec_prefix"
15742 exec_prefix="$acl_final_exec_prefix"
15743
15744 eval additional_includedir=\"$includedir\"
15745 eval additional_libdir=\"$libdir\"
15746
15747 exec_prefix="$acl_save_exec_prefix"
15748 prefix="$acl_save_prefix"
15749
15750 else
15751 additional_includedir="$withval/include"
15752 additional_libdir="$withval/lib"
15753 fi
15754 fi
15755
15756fi
15757
15758 LIBLZMA=
15759 LTLIBLZMA=
15760 INCLZMA=
15761 rpathdirs=
15762 ltrpathdirs=
15763 names_already_handled=
15764 names_next_round='lzma '
15765 while test -n "$names_next_round"; do
15766 names_this_round="$names_next_round"
15767 names_next_round=
15768 for name in $names_this_round; do
15769 already_handled=
15770 for n in $names_already_handled; do
15771 if test "$n" = "$name"; then
15772 already_handled=yes
15773 break
15774 fi
15775 done
15776 if test -z "$already_handled"; then
15777 names_already_handled="$names_already_handled $name"
15778 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15779 eval value=\"\$HAVE_LIB$uppername\"
15780 if test -n "$value"; then
15781 if test "$value" = yes; then
15782 eval value=\"\$LIB$uppername\"
15783 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15784 eval value=\"\$LTLIB$uppername\"
15785 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15786 else
15787 :
15788 fi
15789 else
15790 found_dir=
15791 found_la=
15792 found_so=
15793 found_a=
15794 if test $use_additional = yes; then
15795 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15796 found_dir="$additional_libdir"
15797 found_so="$additional_libdir/lib$name.$shlibext"
15798 if test -f "$additional_libdir/lib$name.la"; then
15799 found_la="$additional_libdir/lib$name.la"
15800 fi
15801 else
15802 if test -f "$additional_libdir/lib$name.$libext"; then
15803 found_dir="$additional_libdir"
15804 found_a="$additional_libdir/lib$name.$libext"
15805 if test -f "$additional_libdir/lib$name.la"; then
15806 found_la="$additional_libdir/lib$name.la"
15807 fi
15808 fi
15809 fi
15810 fi
15811 if test "X$found_dir" = "X"; then
15812 for x in $LDFLAGS $LTLIBLZMA; 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 case "$x" in
15823 -L*)
15824 dir=`echo "X$x" | sed -e 's/^X-L//'`
15825 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15826 found_dir="$dir"
15827 found_so="$dir/lib$name.$shlibext"
15828 if test -f "$dir/lib$name.la"; then
15829 found_la="$dir/lib$name.la"
15830 fi
15831 else
15832 if test -f "$dir/lib$name.$libext"; then
15833 found_dir="$dir"
15834 found_a="$dir/lib$name.$libext"
15835 if test -f "$dir/lib$name.la"; then
15836 found_la="$dir/lib$name.la"
15837 fi
15838 fi
15839 fi
15840 ;;
15841 esac
15842 if test "X$found_dir" != "X"; then
15843 break
15844 fi
15845 done
15846 fi
15847 if test "X$found_dir" != "X"; then
15848 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15849 if test "X$found_so" != "X"; then
15850 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15851 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15852 else
15853 haveit=
15854 for x in $ltrpathdirs; do
15855 if test "X$x" = "X$found_dir"; then
15856 haveit=yes
15857 break
15858 fi
15859 done
15860 if test -z "$haveit"; then
15861 ltrpathdirs="$ltrpathdirs $found_dir"
15862 fi
15863 if test "$hardcode_direct" = yes; then
15864 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15865 else
15866 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15867 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15868 haveit=
15869 for x in $rpathdirs; do
15870 if test "X$x" = "X$found_dir"; then
15871 haveit=yes
15872 break
15873 fi
15874 done
15875 if test -z "$haveit"; then
15876 rpathdirs="$rpathdirs $found_dir"
15877 fi
15878 else
15879 haveit=
15880 for x in $LDFLAGS $LIBLZMA; do
15881
15882 acl_save_prefix="$prefix"
15883 prefix="$acl_final_prefix"
15884 acl_save_exec_prefix="$exec_prefix"
15885 exec_prefix="$acl_final_exec_prefix"
15886 eval x=\"$x\"
15887 exec_prefix="$acl_save_exec_prefix"
15888 prefix="$acl_save_prefix"
15889
15890 if test "X$x" = "X-L$found_dir"; then
15891 haveit=yes
15892 break
15893 fi
15894 done
15895 if test -z "$haveit"; then
15896 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
15897 fi
15898 if test "$hardcode_minus_L" != no; then
15899 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15900 else
15901 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
15902 fi
15903 fi
15904 fi
15905 fi
15906 else
15907 if test "X$found_a" != "X"; then
15908 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
15909 else
15910 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
15911 fi
15912 fi
15913 additional_includedir=
15914 case "$found_dir" in
15915 */lib | */lib/)
15916 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15917 additional_includedir="$basedir/include"
15918 ;;
15919 esac
15920 if test "X$additional_includedir" != "X"; then
15921 if test "X$additional_includedir" != "X/usr/include"; then
15922 haveit=
15923 if test "X$additional_includedir" = "X/usr/local/include"; then
15924 if test -n "$GCC"; then
15925 case $host_os in
15926 linux*) haveit=yes;;
15927 esac
15928 fi
15929 fi
15930 if test -z "$haveit"; then
15931 for x in $CPPFLAGS $INCLZMA; do
15932
15933 acl_save_prefix="$prefix"
15934 prefix="$acl_final_prefix"
15935 acl_save_exec_prefix="$exec_prefix"
15936 exec_prefix="$acl_final_exec_prefix"
15937 eval x=\"$x\"
15938 exec_prefix="$acl_save_exec_prefix"
15939 prefix="$acl_save_prefix"
15940
15941 if test "X$x" = "X-I$additional_includedir"; then
15942 haveit=yes
15943 break
15944 fi
15945 done
15946 if test -z "$haveit"; then
15947 if test -d "$additional_includedir"; then
15948 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
15949 fi
15950 fi
15951 fi
15952 fi
15953 fi
15954 if test -n "$found_la"; then
15955 save_libdir="$libdir"
15956 case "$found_la" in
15957 */* | *\\*) . "$found_la" ;;
15958 *) . "./$found_la" ;;
15959 esac
15960 libdir="$save_libdir"
15961 for dep in $dependency_libs; do
15962 case "$dep" in
15963 -L*)
15964 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15965 if test "X$additional_libdir" != "X/usr/lib"; then
15966 haveit=
15967 if test "X$additional_libdir" = "X/usr/local/lib"; then
15968 if test -n "$GCC"; then
15969 case $host_os in
15970 linux*) haveit=yes;;
15971 esac
15972 fi
15973 fi
15974 if test -z "$haveit"; then
15975 haveit=
15976 for x in $LDFLAGS $LIBLZMA; do
15977
15978 acl_save_prefix="$prefix"
15979 prefix="$acl_final_prefix"
15980 acl_save_exec_prefix="$exec_prefix"
15981 exec_prefix="$acl_final_exec_prefix"
15982 eval x=\"$x\"
15983 exec_prefix="$acl_save_exec_prefix"
15984 prefix="$acl_save_prefix"
15985
15986 if test "X$x" = "X-L$additional_libdir"; then
15987 haveit=yes
15988 break
15989 fi
15990 done
15991 if test -z "$haveit"; then
15992 if test -d "$additional_libdir"; then
15993 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
15994 fi
15995 fi
15996 haveit=
15997 for x in $LDFLAGS $LTLIBLZMA; do
15998
15999 acl_save_prefix="$prefix"
16000 prefix="$acl_final_prefix"
16001 acl_save_exec_prefix="$exec_prefix"
16002 exec_prefix="$acl_final_exec_prefix"
16003 eval x=\"$x\"
16004 exec_prefix="$acl_save_exec_prefix"
16005 prefix="$acl_save_prefix"
16006
16007 if test "X$x" = "X-L$additional_libdir"; then
16008 haveit=yes
16009 break
16010 fi
16011 done
16012 if test -z "$haveit"; then
16013 if test -d "$additional_libdir"; then
16014 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16015 fi
16016 fi
16017 fi
16018 fi
16019 ;;
16020 -R*)
16021 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16022 if test "$enable_rpath" != no; then
16023 haveit=
16024 for x in $rpathdirs; do
16025 if test "X$x" = "X$dir"; then
16026 haveit=yes
16027 break
16028 fi
16029 done
16030 if test -z "$haveit"; then
16031 rpathdirs="$rpathdirs $dir"
16032 fi
16033 haveit=
16034 for x in $ltrpathdirs; do
16035 if test "X$x" = "X$dir"; then
16036 haveit=yes
16037 break
16038 fi
16039 done
16040 if test -z "$haveit"; then
16041 ltrpathdirs="$ltrpathdirs $dir"
16042 fi
16043 fi
16044 ;;
16045 -l*)
16046 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16047 ;;
16048 *.la)
16049 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16050 ;;
16051 *)
16052 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16053 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16054 ;;
16055 esac
16056 done
16057 fi
16058 else
16059 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16060 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16061 fi
16062 fi
16063 fi
16064 done
16065 done
16066 if test "X$rpathdirs" != "X"; then
16067 if test -n "$hardcode_libdir_separator"; then
16068 alldirs=
16069 for found_dir in $rpathdirs; do
16070 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16071 done
16072 acl_save_libdir="$libdir"
16073 libdir="$alldirs"
16074 eval flag=\"$hardcode_libdir_flag_spec\"
16075 libdir="$acl_save_libdir"
16076 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16077 else
16078 for found_dir in $rpathdirs; do
16079 acl_save_libdir="$libdir"
16080 libdir="$found_dir"
16081 eval flag=\"$hardcode_libdir_flag_spec\"
16082 libdir="$acl_save_libdir"
16083 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16084 done
16085 fi
16086 fi
16087 if test "X$ltrpathdirs" != "X"; then
16088 for found_dir in $ltrpathdirs; do
16089 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16090 done
16091 fi
16092
16093
16094 ac_save_CPPFLAGS="$CPPFLAGS"
16095
16096 for element in $INCLZMA; do
16097 haveit=
16098 for x in $CPPFLAGS; do
16099
16100 acl_save_prefix="$prefix"
16101 prefix="$acl_final_prefix"
16102 acl_save_exec_prefix="$exec_prefix"
16103 exec_prefix="$acl_final_exec_prefix"
16104 eval x=\"$x\"
16105 exec_prefix="$acl_save_exec_prefix"
16106 prefix="$acl_save_prefix"
16107
16108 if test "X$x" = "X$element"; then
16109 haveit=yes
16110 break
16111 fi
16112 done
16113 if test -z "$haveit"; then
16114 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16115 fi
16116 done
16117
16118
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16120$as_echo_n "checking for liblzma... " >&6; }
16121if test "${ac_cv_liblzma+set}" = set; then :
16122 $as_echo_n "(cached) " >&6
16123else
16124
16125 ac_save_LIBS="$LIBS"
16126 LIBS="$LIBS $LIBLZMA"
16127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16128/* end confdefs.h. */
16129#include "lzma.h"
16130int
16131main ()
16132{
16133lzma_index_iter iter;
16134 lzma_index_iter_init (&iter, 0);
16135 lzma_mf_is_supported (LZMA_MF_HC3);
16136 ;
16137 return 0;
16138}
16139_ACEOF
16140if ac_fn_c_try_link "$LINENO"; then :
16141 ac_cv_liblzma=yes
16142else
16143 ac_cv_liblzma=no
16144fi
16145rm -f core conftest.err conftest.$ac_objext \
16146 conftest$ac_exeext conftest.$ac_ext
16147 LIBS="$ac_save_LIBS"
16148
16149fi
16150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16151$as_echo "$ac_cv_liblzma" >&6; }
16152 if test "$ac_cv_liblzma" = yes; then
16153 HAVE_LIBLZMA=yes
16154
16155$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16156
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16158$as_echo_n "checking how to link with liblzma... " >&6; }
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16160$as_echo "$LIBLZMA" >&6; }
16161 else
16162 HAVE_LIBLZMA=no
16163 CPPFLAGS="$ac_save_CPPFLAGS"
16164 LIBLZMA=
16165 LTLIBLZMA=
16166 fi
16167
16168
16169
16170
16171
16172
16173 if test "$HAVE_LIBLZMA" != yes; then
16174 if test "$with_lzma" = yes; then
16175 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
16176 fi
16177 fi
16178 fi
16179fi
16180
3fc11d3e
JM
16181LIBGUI="../libgui/src/libgui.a"
16182GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16183
16184
7a292a7a 16185
3fc11d3e
JM
16186WIN32LDAPP=
16187
16188
16189
d91670b9 16190case "${host}" in
686a5eed 16191*-*-cygwin* | *-*-mingw* )
d91670b9
CV
16192 configdir="win"
16193 ;;
16194*)
16195 configdir="unix"
16196 ;;
16197esac
3fc11d3e
JM
16198
16199GDBTKLIBS=
16200if test "${enable_gdbtk}" = "yes"; then
16201
d1c3b63a
KS
16202 # Gdbtk must have an absolute path to srcdir in order to run
16203 # properly when not installed.
16204 here=`pwd`
16205 cd ${srcdir}
16206 GDBTK_SRC_DIR=`pwd`
16207 cd $here
16208
bec39cab 16209
5062cc19
KS
16210 #
16211 # Ok, lets find the tcl configuration
16212 # First, look for one uninstalled.
16213 # the alternative search directory is invoked by --with-tcl
16214 #
3fc11d3e 16215
5062cc19
KS
16216 if test x"${no_tcl}" = x ; then
16217 # we reset no_tcl in case something fails here
16218 no_tcl=true
bec39cab 16219
81ecdfbb
RW
16220# Check whether --with-tcl was given.
16221if test "${with_tcl+set}" = set; then :
16222 withval=$with_tcl; with_tclconfig=${withval}
16223fi
16224
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16226$as_echo_n "checking for Tcl configuration... " >&6; }
16227 if test "${ac_cv_c_tclconfig+set}" = set; then :
16228 $as_echo_n "(cached) " >&6
3fc11d3e 16229else
bec39cab 16230
3fc11d3e 16231
5062cc19
KS
16232 # First check to see if --with-tcl was specified.
16233 case "${host}" in
16234 *-*-cygwin*) platDir="win" ;;
16235 *) platDir="unix" ;;
16236 esac
16237 if test x"${with_tclconfig}" != x ; then
16238 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16239 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16240 else
81ecdfbb 16241 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
16242 fi
16243 fi
16244
16245 # then check for a private Tcl installation
16246 if test x"${ac_cv_c_tclconfig}" = x ; then
16247 for i in \
16248 ../tcl \
16249 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16250 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16251 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16252 ../../tcl \
16253 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16254 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16255 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16256 ../../../tcl \
16257 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16258 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16259 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16260 if test -f "$i/$platDir/tclConfig.sh" ; then
16261 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16262 break
16263 fi
16264 done
16265 fi
16266
16267 # on Darwin, check in Framework installation locations
16268 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16269 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16270 `ls -d /Library/Frameworks 2>/dev/null` \
16271 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16272 `ls -d /System/Library/Frameworks 2>/dev/null` \
16273 ; do
16274 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16275 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16276 break
16277 fi
16278 done
16279 fi
16280
16281 # check in a few common install locations
16282 if test x"${ac_cv_c_tclconfig}" = x ; then
16283 for i in `ls -d ${libdir} 2>/dev/null` \
16284 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16285 `ls -d ${prefix}/lib 2>/dev/null` \
16286 `ls -d /usr/local/lib 2>/dev/null` \
16287 `ls -d /usr/contrib/lib 2>/dev/null` \
16288 `ls -d /usr/lib 2>/dev/null` \
16289 ; do
16290 if test -f "$i/tclConfig.sh" ; then
16291 ac_cv_c_tclconfig=`(cd $i; pwd)`
16292 break
16293 fi
16294 done
16295 fi
3fc11d3e 16296
5062cc19
KS
16297 # check in a few other private locations
16298 if test x"${ac_cv_c_tclconfig}" = x ; then
16299 for i in \
16300 ${srcdir}/../tcl \
16301 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16302 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16303 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16304 if test -f "$i/$platDir/tclConfig.sh" ; then
16305 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16306 break
16307 fi
16308 done
16309 fi
bec39cab 16310
3fc11d3e
JM
16311fi
16312
5062cc19
KS
16313
16314 if test x"${ac_cv_c_tclconfig}" = x ; then
16315 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
16316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16317$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
16318 else
16319 no_tcl=
16320 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
16321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16322$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
16323 fi
16324 fi
3fc11d3e 16325
bec39cab 16326
85541719
DE
16327 # If $no_tk is nonempty, then we can't do Tk, and there is no
16328 # point to doing Tcl.
bec39cab 16329
5062cc19
KS
16330 #
16331 # Ok, lets find the tk configuration
16332 # First, look for one uninstalled.
16333 # the alternative search directory is invoked by --with-tk
16334 #
3fc11d3e 16335
5062cc19
KS
16336 if test x"${no_tk}" = x ; then
16337 # we reset no_tk in case something fails here
16338 no_tk=true
bec39cab 16339
81ecdfbb
RW
16340# Check whether --with-tk was given.
16341if test "${with_tk+set}" = set; then :
16342 withval=$with_tk; with_tkconfig=${withval}
16343fi
16344
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16346$as_echo_n "checking for Tk configuration... " >&6; }
16347 if test "${ac_cv_c_tkconfig+set}" = set; then :
16348 $as_echo_n "(cached) " >&6
bec39cab 16349else
3fc11d3e
JM
16350
16351
5062cc19
KS
16352 # First check to see if --with-tkconfig was specified.
16353 if test x"${with_tkconfig}" != x ; then
16354 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16355 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16356 else
81ecdfbb 16357 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
16358 fi
16359 fi
3fc11d3e 16360
5062cc19
KS
16361 # then check for a private Tk library
16362 case "${host}" in
16363 *-*-cygwin*) platDir="win" ;;
16364 *) platDir="unix" ;;
16365 esac
16366 if test x"${ac_cv_c_tkconfig}" = x ; then
16367 for i in \
16368 ../tk \
16369 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16370 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16371 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16372 ../../tk \
16373 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16374 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16375 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16376 ../../../tk \
16377 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16378 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16379 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16380 if test -f "$i/$platDir/tkConfig.sh" ; then
16381 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16382 break
16383 fi
16384 done
16385 fi
16386
16387 # on Darwin, check in Framework installation locations
16388 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16389 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16390 `ls -d /Library/Frameworks 2>/dev/null` \
16391 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16392 `ls -d /System/Library/Frameworks 2>/dev/null` \
16393 ; do
16394 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16395 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16396 break
16397 fi
16398 done
16399 fi
16400
16401 # check in a few common install locations
16402 if test x"${ac_cv_c_tkconfig}" = x ; then
16403 for i in `ls -d ${libdir} 2>/dev/null` \
16404 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16405 `ls -d ${prefix}/lib 2>/dev/null` \
16406 `ls -d /usr/local/lib 2>/dev/null` \
16407 `ls -d /usr/contrib/lib 2>/dev/null` \
16408 `ls -d /usr/lib 2>/dev/null` \
16409 ; do
16410 if test -f "$i/tkConfig.sh" ; then
16411 ac_cv_c_tkconfig=`(cd $i; pwd)`
16412 break
16413 fi
16414 done
16415 fi
16416 # check in a few other private locations
16417 if test x"${ac_cv_c_tkconfig}" = x ; then
16418 for i in \
16419 ${srcdir}/../tk \
16420 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16421 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16422 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16423 if test -f "$i/$platDir/tkConfig.sh" ; then
16424 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16425 break
16426 fi
16427 done
16428 fi
3fc11d3e 16429
3fc11d3e
JM
16430fi
16431
16432
5062cc19
KS
16433 if test x"${ac_cv_c_tkconfig}" = x ; then
16434 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
16435 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16436$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
16437 else
16438 no_tk=
16439 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16441$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 16442 fi
3fc11d3e 16443 fi
dd2504ab 16444
dd2504ab 16445
85541719
DE
16446 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16447
81ecdfbb
RW
16448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16449$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
16450
16451 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16453$as_echo "loading" >&6; }
85541719
DE
16454 . ${TCL_BIN_DIR}/tclConfig.sh
16455 else
81ecdfbb
RW
16456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16457$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
16458 fi
16459
16460 # eval is required to do the TCL_DBGX substitution
16461 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16462 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16463
16464 # If the TCL_BIN_DIR is the build directory (not the install directory),
16465 # then set the common variable name to the value of the build variables.
16466 # For example, the variable TCL_LIB_SPEC will be set to the value
16467 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16468 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16469 # installed and uninstalled version of Tcl.
16470 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16471 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16472 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16473 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16474 elif test "`uname -s`" = "Darwin"; then
16475 # If Tcl was built as a framework, attempt to use the libraries
16476 # from the framework at the given location so that linking works
a68ffae9 16477 # against Tcl.framework installed in an arbitrary location.
85541719
DE
16478 case ${TCL_DEFS} in
16479 *TCL_FRAMEWORK*)
16480 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16481 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16482 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16483 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16484 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16485 break
16486 fi
16487 done
16488 fi
16489 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16490 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16491 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16492 fi
16493 ;;
16494 esac
16495 fi
16496
16497 # eval is required to do the TCL_DBGX substitution
16498 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16499 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16500 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16501 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517 # Check for in-tree tcl
16518 here=`pwd`
16519 cd ${srcdir}/..
16520 topdir=`pwd`
16521 cd ${here}
16522
16523 intree="no"
16524 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16525 intree="yes"
16526 fi
16527
16528 # Find Tcl private headers
16529 if test x"${intree}" = xno; then
16530
81ecdfbb
RW
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16532$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
16533 private_dir=""
16534 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16535 if test -f ${dir}/tclInt.h ; then
16536 private_dir=${dir}
16537 fi
16538
16539 if test x"${private_dir}" = x; then
81ecdfbb 16540 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
16541 else
16542 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16544$as_echo "${private_dir}" >&6; }
85541719
DE
16545 fi
16546
16547 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16548 TCL_LIBRARY="${TCL_LIB_SPEC}"
16549 TCL_DEPS=""
16550 else
16551 # If building tcl in the same src tree, private headers
16552 # are not needed, but we need to be sure to use the right
16553 # headers library
16554 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16555 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16556 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16557 fi
16558
16559
16560
16561
16562
81ecdfbb
RW
16563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16564$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 16565
5062cc19 16566 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16568$as_echo "loading" >&6; }
5062cc19 16569 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 16570 else
81ecdfbb
RW
16571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16572$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 16573 fi
bec39cab 16574
5062cc19
KS
16575 # eval is required to do the TK_DBGX substitution
16576 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16577 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16578
16579 # If the TK_BIN_DIR is the build directory (not the install directory),
16580 # then set the common variable name to the value of the build variables.
16581 # For example, the variable TK_LIB_SPEC will be set to the value
16582 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16583 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16584 # installed and uninstalled version of Tcl.
85541719 16585 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
16586 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16587 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16588 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16589 elif test "`uname -s`" = "Darwin"; then
16590 # If Tk was built as a framework, attempt to use the libraries
16591 # from the framework at the given location so that linking works
a68ffae9 16592 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
16593 case ${TK_DEFS} in
16594 *TK_FRAMEWORK*)
85541719 16595 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
16596 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16597 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16598 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16599 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16600 break
16601 fi
16602 done
16603 fi
85541719 16604 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
16605 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16606 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16607 fi
16608 ;;
16609 esac
3fc11d3e
JM
16610 fi
16611
5062cc19
KS
16612 # eval is required to do the TK_DBGX substitution
16613 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16614 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16615 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16616 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 16617
3fc11d3e
JM
16618
16619
bec39cab
AC
16620
16621
16622
16623
16624
16625
16626
3fc11d3e 16627
3fc11d3e 16628
bec39cab 16629
bec39cab 16630
85541719
DE
16631 # Check for in-tree Tk
16632 intree="no"
16633 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16634 intree="yes"
16635 fi
3fc11d3e 16636
85541719
DE
16637 # Find Tk private headers
16638 if test x"${intree}" = xno; then
3fc11d3e 16639
81ecdfbb
RW
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16641$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
16642 private_dir=""
16643 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16644 if test -f ${dir}/tkInt.h; then
16645 private_dir=${dir}
3fc11d3e 16646 fi
bec39cab 16647
5062cc19 16648 if test x"${private_dir}" = x; then
81ecdfbb 16649 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 16650 else
5062cc19 16651 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
16652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16653$as_echo "${private_dir}" >&6; }
3fc11d3e 16654 fi
3fc11d3e 16655
85541719
DE
16656 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16657 TK_LIBRARY=${TK_LIB_SPEC}
16658 TK_DEPS=""
16659 else
16660 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16661 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16662 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16663 fi
3fc11d3e
JM
16664
16665
3fc11d3e
JM
16666
16667
3fc11d3e 16668
85541719 16669 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 16670
85541719
DE
16671 # Include some libraries that Tcl and Tk want.
16672 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16673 # Yes, the ordering seems wrong here. But it isn't.
16674 # TK_LIBS is the list of libraries that need to be linked
16675 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16676 # were in LIBS then any link tests after this point would
16677 # try to include things like `$(LIBGUI)', which wouldn't work.
16678 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 16679
85541719
DE
16680 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16681 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16682 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16683 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16684 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16685 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16686 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 16687
85541719
DE
16688 if test x$gdb_cv_os_cygwin = xyes; then
16689 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16690 WIN32LDAPP="-Wl,--subsystem,console"
16691 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 16692 fi
ffc6a242 16693
81ecdfbb 16694 subdirs="$subdirs gdbtk"
3ace7edb 16695
85541719 16696 fi
3fc11d3e
JM
16697fi
16698
16699
16700
16701
16702
16703
16704
16705
81ecdfbb
RW
16706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16707$as_echo_n "checking for X... " >&6; }
bec39cab 16708
c906108c 16709
81ecdfbb
RW
16710# Check whether --with-x was given.
16711if test "${with_x+set}" = set; then :
16712 withval=$with_x;
16713fi
c906108c
SS
16714
16715# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16716if test "x$with_x" = xno; then
16717 # The user explicitly disabled X.
16718 have_x=disabled
16719else
81ecdfbb
RW
16720 case $x_includes,$x_libraries in #(
16721 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
16722 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
16723 $as_echo_n "(cached) " >&6
c906108c
SS
16724else
16725 # One or both of the vars are not set, and there is no cached value.
bec39cab 16726ac_x_includes=no ac_x_libraries=no
81ecdfbb 16727rm -f -r conftest.dir
bec39cab
AC
16728if mkdir conftest.dir; then
16729 cd conftest.dir
bec39cab 16730 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
16731incroot:
16732 @echo incroot='${INCROOT}'
16733usrlibdir:
16734 @echo usrlibdir='${USRLIBDIR}'
16735libdir:
16736 @echo libdir='${LIBDIR}'
16737_ACEOF
16738 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 16739 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
16740 for ac_var in incroot usrlibdir libdir; do
16741 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16742 done
c906108c 16743 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
16744 for ac_extension in a so sl dylib la dll; do
16745 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16746 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 16747 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
16748 fi
16749 done
16750 # Screen out bogus values from the imake configuration. They are
16751 # bogus both because they are the default anyway, and because
16752 # using them would break gcc on systems where it needs fixed includes.
bec39cab 16753 case $ac_im_incroot in
81ecdfbb 16754 /usr/include) ac_x_includes= ;;
bec39cab 16755 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 16756 esac
bec39cab 16757 case $ac_im_usrlibdir in
81ecdfbb 16758 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 16759 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
16760 esac
16761 fi
16762 cd ..
81ecdfbb 16763 rm -f -r conftest.dir
c906108c
SS
16764fi
16765
bec39cab
AC
16766# Standard set of common directories for X headers.
16767# Check X11 before X11Rn because it is often a symlink to the current release.
16768ac_x_header_dirs='
16769/usr/X11/include
81ecdfbb 16770/usr/X11R7/include
bec39cab
AC
16771/usr/X11R6/include
16772/usr/X11R5/include
16773/usr/X11R4/include
16774
16775/usr/include/X11
81ecdfbb 16776/usr/include/X11R7
bec39cab
AC
16777/usr/include/X11R6
16778/usr/include/X11R5
16779/usr/include/X11R4
16780
16781/usr/local/X11/include
81ecdfbb 16782/usr/local/X11R7/include
bec39cab
AC
16783/usr/local/X11R6/include
16784/usr/local/X11R5/include
16785/usr/local/X11R4/include
16786
16787/usr/local/include/X11
81ecdfbb 16788/usr/local/include/X11R7
bec39cab
AC
16789/usr/local/include/X11R6
16790/usr/local/include/X11R5
16791/usr/local/include/X11R4
16792
16793/usr/X386/include
16794/usr/x386/include
16795/usr/XFree86/include/X11
16796
16797/usr/include
16798/usr/local/include
16799/usr/unsupported/include
16800/usr/athena/include
16801/usr/local/x11r5/include
16802/usr/lpp/Xamples/include
16803
16804/usr/openwin/include
16805/usr/openwin/share/include'
16806
16807if test "$ac_x_includes" = no; then
81ecdfbb 16808 # Guess where to find include files, by looking for Xlib.h.
c906108c 16809 # First, try using that file with no special directory specified.
81ecdfbb 16810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16811/* end confdefs.h. */
81ecdfbb 16812#include <X11/Xlib.h>
bec39cab 16813_ACEOF
81ecdfbb 16814if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
16815 # We can compile using X headers with no special include directory.
16816ac_x_includes=
16817else
bec39cab 16818 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 16819 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
16820 ac_x_includes=$ac_dir
16821 break
16822 fi
16823done
c906108c 16824fi
bec39cab
AC
16825rm -f conftest.err conftest.$ac_ext
16826fi # $ac_x_includes = no
c906108c 16827
bec39cab 16828if test "$ac_x_libraries" = no; then
c906108c 16829 # Check for the libraries.
c906108c
SS
16830 # See if we find them without any special options.
16831 # Don't add to $LIBS permanently.
bec39cab 16832 ac_save_LIBS=$LIBS
81ecdfbb
RW
16833 LIBS="-lX11 $LIBS"
16834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16835/* end confdefs.h. */
81ecdfbb 16836#include <X11/Xlib.h>
bec39cab
AC
16837int
16838main ()
16839{
81ecdfbb 16840XrmInitialize ()
bec39cab
AC
16841 ;
16842 return 0;
16843}
16844_ACEOF
81ecdfbb 16845if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16846 LIBS=$ac_save_LIBS
c906108c
SS
16847# We can link X programs with no special library path.
16848ac_x_libraries=
16849else
81ecdfbb
RW
16850 LIBS=$ac_save_LIBS
16851for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 16852do
bec39cab 16853 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
16854 for ac_extension in a so sl dylib la dll; do
16855 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
16856 ac_x_libraries=$ac_dir
16857 break 2
16858 fi
16859 done
16860done
16861fi
81ecdfbb
RW
16862rm -f core conftest.err conftest.$ac_objext \
16863 conftest$ac_exeext conftest.$ac_ext
bec39cab 16864fi # $ac_x_libraries = no
c906108c 16865
81ecdfbb
RW
16866case $ac_x_includes,$ac_x_libraries in #(
16867 no,* | *,no | *\'*)
16868 # Didn't find X, or a directory has "'" in its name.
16869 ac_cv_have_x="have_x=no";; #(
16870 *)
16871 # Record where we found X for the cache.
16872 ac_cv_have_x="have_x=yes\
16873 ac_x_includes='$ac_x_includes'\
16874 ac_x_libraries='$ac_x_libraries'"
16875esac
c906108c 16876fi
81ecdfbb
RW
16877;; #(
16878 *) have_x=yes;;
16879 esac
c906108c
SS
16880 eval "$ac_cv_have_x"
16881fi # $with_x != no
16882
16883if test "$have_x" != yes; then
81ecdfbb
RW
16884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16885$as_echo "$have_x" >&6; }
c906108c
SS
16886 no_x=yes
16887else
16888 # If each of the values was on the command line, it overrides each guess.
16889 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16890 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16891 # Update the cache value to reflect the command line values.
81ecdfbb
RW
16892 ac_cv_have_x="have_x=yes\
16893 ac_x_includes='$x_includes'\
16894 ac_x_libraries='$x_libraries'"
16895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
16896$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
16897fi
16898
16899
bec39cab 16900# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 16901# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
16902# This code just checks for a few cases where we'd like to ignore those
16903# definitions, even when they're present in the '.mt' file. These cases
16904# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 16905# not part of the source tree.
7a292a7a 16906#
81ecdfbb
RW
16907# Check whether --enable-sim was given.
16908if test "${enable_sim+set}" = set; then :
16909 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
16910 echo "enableval = ${enableval}";
16911 case "${enableval}" in
16912 yes) ignore_sim=false ;;
16913 no) ignore_sim=true ;;
16914 *) ignore_sim=false ;;
16915 esac
16916else
16917 ignore_sim=false
81ecdfbb
RW
16918fi
16919
7a292a7a
SS
16920
16921if test ! -d "${srcdir}/../sim"; then
16922 ignore_sim=true
16923fi
16924
9b624dbe
UW
16925SIM=
16926SIM_OBS=
16927if test "${ignore_sim}" = "false"; then
16928 if test x"${gdb_sim}" != x ; then
16929 SIM="${gdb_sim}"
16930 SIM_OBS="remote-sim.o"
60ca704f 16931
81ecdfbb 16932$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 16933
976102cd
PA
16934
16935 # Some tdep code should only be compiled in when the ppc sim is
16936 # built. PR sim/13418.
16937 case $target in
16938 powerpc*-*-*)
16939
16940$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
16941
16942 ;;
16943 esac
9b624dbe 16944 fi
7a292a7a
SS
16945fi
16946
16947
16948
c906108c
SS
16949
16950
16951
16952
16953
16954
dfcd3bfb 16955
e56ac5c3
AC
16956
16957
b3a90332
AC
16958
16959
c35f4ffc 16960# List of host floatformats.
bec39cab
AC
16961
16962cat >>confdefs.h <<_ACEOF
c35f4ffc 16963#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 16964_ACEOF
c35f4ffc 16965
bec39cab
AC
16966
16967cat >>confdefs.h <<_ACEOF
c35f4ffc 16968#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
16969_ACEOF
16970
c35f4ffc 16971
bec39cab 16972cat >>confdefs.h <<_ACEOF
c35f4ffc 16973#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 16974_ACEOF
c35f4ffc
AC
16975
16976
c906108c
SS
16977# target_subdir is used by the testsuite to find the target libraries.
16978target_subdir=
16979if test "${host}" != "${target}"; then
16980 target_subdir="${target_alias}/"
16981fi
16982
16983
21ea5acd 16984# Import nat definitions.
2b351b19 16985nat_makefile_frag=/dev/null
771b4502 16986if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
16987 . ${srcdir}/configure.nat
16988 nativefile=$NAT_FILE
c906108c 16989fi
c906108c 16990
c906108c
SS
16991
16992
16993
21ea5acd
SDJ
16994
16995
16996
16997
16998
c906108c
SS
16999
17000
b00a8037 17001if test x"${gdb_osabi}" != x ; then
bec39cab
AC
17002
17003cat >>confdefs.h <<_ACEOF
b00a8037 17004#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 17005_ACEOF
b00a8037
DJ
17006
17007fi
17008
8dcde887 17009# Enable multi-ice-gdb-server.
81ecdfbb
RW
17010# Check whether --enable-multi-ice was given.
17011if test "${enable_multi_ice+set}" = set; then :
17012 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
17013 yes | no)
17014 ;;
81ecdfbb 17015 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 17016 esac
81ecdfbb 17017fi
b4e70030 17018
81ecdfbb
RW
17019if test "x$enable_multi_ice" = xyes; then
17020 subdirs="$subdirs multi-ice"
3ace7edb 17021
a85f51e7
DJ
17022fi
17023
496c0e1b
JB
17024# Check whether --enable-gdbserver was given.
17025if test "${enable_gdbserver+set}" = set; then :
17026 enableval=$enable_gdbserver; case "${enableval}" in
17027 yes| no|auto) ;;
17028 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
17029esac
17030else
17031 enable_gdbserver=auto
17032fi
17033
17034
17035# We only build gdbserver automatically in a native configuration, and
17036# only if the user did not explicitly disable its build.
17037if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
17038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17039$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 17040 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17042$as_echo "yes" >&6; }
17043 subdirs="$subdirs gdbserver"
3ace7edb 17044
496c0e1b 17045 gdbserver_build_enabled=yes
8dcde887 17046 else
81ecdfbb
RW
17047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17048$as_echo "no" >&6; }
8dcde887
MK
17049 fi
17050fi
17051
496c0e1b
JB
17052# If the user explicitly request the gdbserver to be built, verify that
17053# we were in fact able to enable it.
17054if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
17055 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
17056fi
17057
393fd4c3
YQ
17058# Check for babeltrace and babeltrace-ctf
17059
17060# Check whether --with-babeltrace was given.
17061if test "${with_babeltrace+set}" = set; then :
17062 withval=$with_babeltrace;
17063else
17064 with_babeltrace=auto
17065fi
17066
17067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17068$as_echo_n "checking whether to use babeltrace... " >&6; }
17069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17070$as_echo "$with_babeltrace" >&6; }
17071
17072if test "x$with_babeltrace" = "xno"; then
17073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17074$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17075else
17076 # Append -Werror to CFLAGS so that configure can catch the warning
17077 # "assignment from incompatible pointer type", which is related to
17078 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17079 # in GDB, while babeltrace 1.0.3 is broken.
17080 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17081 # safe to save and restore CFLAGS here.
17082 saved_CFLAGS=$CFLAGS
17083 CFLAGS="$CFLAGS -Werror"
17084
17085
17086
17087
17088
17089
17090
17091
17092 use_additional=yes
17093
17094 acl_save_prefix="$prefix"
17095 prefix="$acl_final_prefix"
17096 acl_save_exec_prefix="$exec_prefix"
17097 exec_prefix="$acl_final_exec_prefix"
17098
17099 eval additional_includedir=\"$includedir\"
17100 eval additional_libdir=\"$libdir\"
17101
17102 exec_prefix="$acl_save_exec_prefix"
17103 prefix="$acl_save_prefix"
17104
17105
17106# Check whether --with-libbabeltrace-prefix was given.
17107if test "${with_libbabeltrace_prefix+set}" = set; then :
17108 withval=$with_libbabeltrace_prefix;
17109 if test "X$withval" = "Xno"; then
17110 use_additional=no
17111 else
17112 if test "X$withval" = "X"; then
17113
17114 acl_save_prefix="$prefix"
17115 prefix="$acl_final_prefix"
17116 acl_save_exec_prefix="$exec_prefix"
17117 exec_prefix="$acl_final_exec_prefix"
17118
17119 eval additional_includedir=\"$includedir\"
17120 eval additional_libdir=\"$libdir\"
17121
17122 exec_prefix="$acl_save_exec_prefix"
17123 prefix="$acl_save_prefix"
17124
17125 else
17126 additional_includedir="$withval/include"
17127 additional_libdir="$withval/lib"
17128 fi
17129 fi
17130
17131fi
17132
17133 LIBBABELTRACE=
17134 LTLIBBABELTRACE=
17135 INCBABELTRACE=
17136 rpathdirs=
17137 ltrpathdirs=
17138 names_already_handled=
17139 names_next_round='babeltrace babeltrace-ctf'
17140 while test -n "$names_next_round"; do
17141 names_this_round="$names_next_round"
17142 names_next_round=
17143 for name in $names_this_round; do
17144 already_handled=
17145 for n in $names_already_handled; do
17146 if test "$n" = "$name"; then
17147 already_handled=yes
17148 break
17149 fi
17150 done
17151 if test -z "$already_handled"; then
17152 names_already_handled="$names_already_handled $name"
17153 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17154 eval value=\"\$HAVE_LIB$uppername\"
17155 if test -n "$value"; then
17156 if test "$value" = yes; then
17157 eval value=\"\$LIB$uppername\"
17158 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17159 eval value=\"\$LTLIB$uppername\"
17160 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17161 else
17162 :
17163 fi
17164 else
17165 found_dir=
17166 found_la=
17167 found_so=
17168 found_a=
17169 if test $use_additional = yes; then
17170 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17171 found_dir="$additional_libdir"
17172 found_so="$additional_libdir/lib$name.$shlibext"
17173 if test -f "$additional_libdir/lib$name.la"; then
17174 found_la="$additional_libdir/lib$name.la"
17175 fi
17176 else
17177 if test -f "$additional_libdir/lib$name.$libext"; then
17178 found_dir="$additional_libdir"
17179 found_a="$additional_libdir/lib$name.$libext"
17180 if test -f "$additional_libdir/lib$name.la"; then
17181 found_la="$additional_libdir/lib$name.la"
17182 fi
17183 fi
17184 fi
17185 fi
17186 if test "X$found_dir" = "X"; then
17187 for x in $LDFLAGS $LTLIBBABELTRACE; do
17188
17189 acl_save_prefix="$prefix"
17190 prefix="$acl_final_prefix"
17191 acl_save_exec_prefix="$exec_prefix"
17192 exec_prefix="$acl_final_exec_prefix"
17193 eval x=\"$x\"
17194 exec_prefix="$acl_save_exec_prefix"
17195 prefix="$acl_save_prefix"
17196
17197 case "$x" in
17198 -L*)
17199 dir=`echo "X$x" | sed -e 's/^X-L//'`
17200 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17201 found_dir="$dir"
17202 found_so="$dir/lib$name.$shlibext"
17203 if test -f "$dir/lib$name.la"; then
17204 found_la="$dir/lib$name.la"
17205 fi
17206 else
17207 if test -f "$dir/lib$name.$libext"; then
17208 found_dir="$dir"
17209 found_a="$dir/lib$name.$libext"
17210 if test -f "$dir/lib$name.la"; then
17211 found_la="$dir/lib$name.la"
17212 fi
17213 fi
17214 fi
17215 ;;
17216 esac
17217 if test "X$found_dir" != "X"; then
17218 break
17219 fi
17220 done
17221 fi
17222 if test "X$found_dir" != "X"; then
17223 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17224 if test "X$found_so" != "X"; then
17225 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17226 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17227 else
17228 haveit=
17229 for x in $ltrpathdirs; do
17230 if test "X$x" = "X$found_dir"; then
17231 haveit=yes
17232 break
17233 fi
17234 done
17235 if test -z "$haveit"; then
17236 ltrpathdirs="$ltrpathdirs $found_dir"
17237 fi
17238 if test "$hardcode_direct" = yes; then
17239 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17240 else
17241 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17242 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17243 haveit=
17244 for x in $rpathdirs; do
17245 if test "X$x" = "X$found_dir"; then
17246 haveit=yes
17247 break
17248 fi
17249 done
17250 if test -z "$haveit"; then
17251 rpathdirs="$rpathdirs $found_dir"
17252 fi
17253 else
17254 haveit=
17255 for x in $LDFLAGS $LIBBABELTRACE; do
17256
17257 acl_save_prefix="$prefix"
17258 prefix="$acl_final_prefix"
17259 acl_save_exec_prefix="$exec_prefix"
17260 exec_prefix="$acl_final_exec_prefix"
17261 eval x=\"$x\"
17262 exec_prefix="$acl_save_exec_prefix"
17263 prefix="$acl_save_prefix"
17264
17265 if test "X$x" = "X-L$found_dir"; then
17266 haveit=yes
17267 break
17268 fi
17269 done
17270 if test -z "$haveit"; then
17271 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17272 fi
17273 if test "$hardcode_minus_L" != no; then
17274 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17275 else
17276 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17277 fi
17278 fi
17279 fi
17280 fi
17281 else
17282 if test "X$found_a" != "X"; then
17283 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17284 else
17285 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17286 fi
17287 fi
17288 additional_includedir=
17289 case "$found_dir" in
17290 */lib | */lib/)
17291 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17292 additional_includedir="$basedir/include"
17293 ;;
17294 esac
17295 if test "X$additional_includedir" != "X"; then
17296 if test "X$additional_includedir" != "X/usr/include"; then
17297 haveit=
17298 if test "X$additional_includedir" = "X/usr/local/include"; then
17299 if test -n "$GCC"; then
17300 case $host_os in
17301 linux*) haveit=yes;;
17302 esac
17303 fi
17304 fi
17305 if test -z "$haveit"; then
17306 for x in $CPPFLAGS $INCBABELTRACE; do
17307
17308 acl_save_prefix="$prefix"
17309 prefix="$acl_final_prefix"
17310 acl_save_exec_prefix="$exec_prefix"
17311 exec_prefix="$acl_final_exec_prefix"
17312 eval x=\"$x\"
17313 exec_prefix="$acl_save_exec_prefix"
17314 prefix="$acl_save_prefix"
17315
17316 if test "X$x" = "X-I$additional_includedir"; then
17317 haveit=yes
17318 break
17319 fi
17320 done
17321 if test -z "$haveit"; then
17322 if test -d "$additional_includedir"; then
17323 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17324 fi
17325 fi
17326 fi
17327 fi
17328 fi
17329 if test -n "$found_la"; then
17330 save_libdir="$libdir"
17331 case "$found_la" in
17332 */* | *\\*) . "$found_la" ;;
17333 *) . "./$found_la" ;;
17334 esac
17335 libdir="$save_libdir"
17336 for dep in $dependency_libs; do
17337 case "$dep" in
17338 -L*)
17339 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17340 if test "X$additional_libdir" != "X/usr/lib"; then
17341 haveit=
17342 if test "X$additional_libdir" = "X/usr/local/lib"; then
17343 if test -n "$GCC"; then
17344 case $host_os in
17345 linux*) haveit=yes;;
17346 esac
17347 fi
17348 fi
17349 if test -z "$haveit"; then
17350 haveit=
17351 for x in $LDFLAGS $LIBBABELTRACE; do
17352
17353 acl_save_prefix="$prefix"
17354 prefix="$acl_final_prefix"
17355 acl_save_exec_prefix="$exec_prefix"
17356 exec_prefix="$acl_final_exec_prefix"
17357 eval x=\"$x\"
17358 exec_prefix="$acl_save_exec_prefix"
17359 prefix="$acl_save_prefix"
17360
17361 if test "X$x" = "X-L$additional_libdir"; then
17362 haveit=yes
17363 break
17364 fi
17365 done
17366 if test -z "$haveit"; then
17367 if test -d "$additional_libdir"; then
17368 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17369 fi
17370 fi
17371 haveit=
17372 for x in $LDFLAGS $LTLIBBABELTRACE; do
17373
17374 acl_save_prefix="$prefix"
17375 prefix="$acl_final_prefix"
17376 acl_save_exec_prefix="$exec_prefix"
17377 exec_prefix="$acl_final_exec_prefix"
17378 eval x=\"$x\"
17379 exec_prefix="$acl_save_exec_prefix"
17380 prefix="$acl_save_prefix"
17381
17382 if test "X$x" = "X-L$additional_libdir"; then
17383 haveit=yes
17384 break
17385 fi
17386 done
17387 if test -z "$haveit"; then
17388 if test -d "$additional_libdir"; then
17389 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17390 fi
17391 fi
17392 fi
17393 fi
17394 ;;
17395 -R*)
17396 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17397 if test "$enable_rpath" != no; then
17398 haveit=
17399 for x in $rpathdirs; do
17400 if test "X$x" = "X$dir"; then
17401 haveit=yes
17402 break
17403 fi
17404 done
17405 if test -z "$haveit"; then
17406 rpathdirs="$rpathdirs $dir"
17407 fi
17408 haveit=
17409 for x in $ltrpathdirs; do
17410 if test "X$x" = "X$dir"; then
17411 haveit=yes
17412 break
17413 fi
17414 done
17415 if test -z "$haveit"; then
17416 ltrpathdirs="$ltrpathdirs $dir"
17417 fi
17418 fi
17419 ;;
17420 -l*)
17421 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17422 ;;
17423 *.la)
17424 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17425 ;;
17426 *)
17427 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17428 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17429 ;;
17430 esac
17431 done
17432 fi
17433 else
17434 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17435 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17436 fi
17437 fi
17438 fi
17439 done
17440 done
17441 if test "X$rpathdirs" != "X"; then
17442 if test -n "$hardcode_libdir_separator"; then
17443 alldirs=
17444 for found_dir in $rpathdirs; do
17445 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17446 done
17447 acl_save_libdir="$libdir"
17448 libdir="$alldirs"
17449 eval flag=\"$hardcode_libdir_flag_spec\"
17450 libdir="$acl_save_libdir"
17451 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17452 else
17453 for found_dir in $rpathdirs; do
17454 acl_save_libdir="$libdir"
17455 libdir="$found_dir"
17456 eval flag=\"$hardcode_libdir_flag_spec\"
17457 libdir="$acl_save_libdir"
17458 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17459 done
17460 fi
17461 fi
17462 if test "X$ltrpathdirs" != "X"; then
17463 for found_dir in $ltrpathdirs; do
17464 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17465 done
17466 fi
17467
17468
17469 ac_save_CPPFLAGS="$CPPFLAGS"
17470
17471 for element in $INCBABELTRACE; do
17472 haveit=
17473 for x in $CPPFLAGS; do
17474
17475 acl_save_prefix="$prefix"
17476 prefix="$acl_final_prefix"
17477 acl_save_exec_prefix="$exec_prefix"
17478 exec_prefix="$acl_final_exec_prefix"
17479 eval x=\"$x\"
17480 exec_prefix="$acl_save_exec_prefix"
17481 prefix="$acl_save_prefix"
17482
17483 if test "X$x" = "X$element"; then
17484 haveit=yes
17485 break
17486 fi
17487 done
17488 if test -z "$haveit"; then
17489 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17490 fi
17491 done
17492
17493
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17495$as_echo_n "checking for libbabeltrace... " >&6; }
17496if test "${ac_cv_libbabeltrace+set}" = set; then :
17497 $as_echo_n "(cached) " >&6
17498else
17499
17500 ac_save_LIBS="$LIBS"
17501 LIBS="$LIBS $LIBBABELTRACE"
17502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17503/* end confdefs.h. */
17504#include <babeltrace/babeltrace.h>
17505 #include <babeltrace/ctf/events.h>
17506 #include <babeltrace/ctf/iterator.h>
17507int
17508main ()
17509{
17510struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17511 struct bt_ctf_event *event = NULL;
17512 const struct bt_definition *scope;
17513
13cdc2af 17514 pos->type = BT_SEEK_BEGIN;
65c749e7 17515 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
17516 scope = bt_ctf_get_top_level_scope (event,
17517 BT_STREAM_EVENT_HEADER);
17518 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17519
17520 ;
17521 return 0;
17522}
17523_ACEOF
17524if ac_fn_c_try_link "$LINENO"; then :
17525 ac_cv_libbabeltrace=yes
17526else
17527 ac_cv_libbabeltrace=no
17528fi
17529rm -f core conftest.err conftest.$ac_objext \
17530 conftest$ac_exeext conftest.$ac_ext
17531 LIBS="$ac_save_LIBS"
17532
17533fi
17534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17535$as_echo "$ac_cv_libbabeltrace" >&6; }
17536 if test "$ac_cv_libbabeltrace" = yes; then
17537 HAVE_LIBBABELTRACE=yes
17538
17539$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17540
17541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17542$as_echo_n "checking how to link with libbabeltrace... " >&6; }
17543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17544$as_echo "$LIBBABELTRACE" >&6; }
17545 else
17546 HAVE_LIBBABELTRACE=no
17547 CPPFLAGS="$ac_save_CPPFLAGS"
17548 LIBBABELTRACE=
17549 LTLIBBABELTRACE=
17550 fi
17551
17552
17553
17554
17555
17556
17557 CFLAGS=$saved_CFLAGS
17558
17559 if test "$HAVE_LIBBABELTRACE" != yes; then
17560 if test "$with_babeltrace" = yes; then
17561 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
17562 else
17563 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17564$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17565 fi
17566 fi
17567fi
17568
21ea5acd
SDJ
17569# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17570# empty version.
c906108c
SS
17571
17572files=
17573links=
5a2402b8 17574
c906108c
SS
17575rm -f nm.h
17576if test "${nativefile}" != ""; then
0f475e27
AC
17577 case "${nativefile}" in
17578 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17579 * ) GDB_NM_FILE="${nativefile}"
17580 esac
5a2402b8
AC
17581 files="${files} ${GDB_NM_FILE}"
17582 links="${links} nm.h"
60ca704f
SE
17583
17584cat >>confdefs.h <<_ACEOF
b78960be 17585#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 17586_ACEOF
5a2402b8 17587
c906108c 17588fi
5a2402b8
AC
17589
17590
e3487908
GKB
17591for ac_prog in xsltproc
17592do
17593 # Extract the first word of "$ac_prog", so it can be a program name with args.
17594set dummy $ac_prog; ac_word=$2
17595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17596$as_echo_n "checking for $ac_word... " >&6; }
17597if test "${ac_cv_path_XSLTPROC+set}" = set; then :
17598 $as_echo_n "(cached) " >&6
17599else
17600 case $XSLTPROC in
17601 [\\/]* | ?:[\\/]*)
17602 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17603 ;;
17604 *)
17605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17606for as_dir in $PATH
17607do
17608 IFS=$as_save_IFS
17609 test -z "$as_dir" && as_dir=.
17610 for ac_exec_ext in '' $ac_executable_extensions; do
17611 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17612 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17614 break 2
17615 fi
17616done
17617 done
17618IFS=$as_save_IFS
17619
17620 ;;
17621esac
17622fi
17623XSLTPROC=$ac_cv_path_XSLTPROC
17624if test -n "$XSLTPROC"; then
17625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17626$as_echo "$XSLTPROC" >&6; }
17627else
17628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17629$as_echo "no" >&6; }
17630fi
17631
17632
17633 test -n "$XSLTPROC" && break
17634done
17635test -n "$XSLTPROC" || XSLTPROC="missing"
17636
17637if test "x$USE_MAINTAINER_MODE" = xyes; then
17638 if test "${XSLTPROC}" = missing; then
17639 as_fn_error "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
17640 fi
17641fi
17642
17643
bec39cab
AC
17644ac_sources="$files"
17645ac_dests="$links"
17646while test -n "$ac_sources"; do
17647 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17648 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17649 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17650done
81ecdfbb 17651ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
17652
17653
c906108c
SS
17654
17655
c906108c 17656
81ecdfbb 17657$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 17658
bec39cab 17659
dcd1f979
TT
17660if $development; then
17661
17662$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17663
1e5ded6c
YQ
17664 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest.o selftest-arch.o"
17665 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
dcd1f979
TT
17666fi
17667
b292c783 17668
f6a88844
JM
17669 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17670 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17671 if test "x$GDB_TRANSFORM_NAME" = x; then
17672 GDB_TRANSFORM_NAME=gdb
17673 fi
17674
17675
17676
17677 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17678 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17679 if test "x$GCORE_TRANSFORM_NAME" = x; then
17680 GCORE_TRANSFORM_NAME=gcore
17681 fi
17682
b292c783
JK
17683
17684ac_config_files="$ac_config_files gcore"
17685
c971b7fa 17686ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb 17687
89a34d1b 17688
bec39cab
AC
17689cat >confcache <<\_ACEOF
17690# This file is a shell script that caches the results of configure
17691# tests run on this system so they can be shared between configure
17692# scripts and configure runs, see configure's option --config-cache.
17693# It is not useful on other systems. If it contains results you don't
17694# want to keep, you may remove or edit it.
17695#
17696# config.status only pays attention to the cache file if you give it
17697# the --recheck option to rerun configure.
17698#
17699# `ac_cv_env_foo' variables (set or unset) will be overridden when
17700# loading this file, other *unset* `ac_cv_foo' will be assigned the
17701# following values.
17702
17703_ACEOF
17704
17705# The following way of writing the cache mishandles newlines in values,
17706# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 17707# So, we kill variables containing newlines.
bec39cab
AC
17708# Ultrix sh set writes to stderr and can't be redirected directly,
17709# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
17710(
17711 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17712 eval ac_val=\$$ac_var
17713 case $ac_val in #(
17714 *${as_nl}*)
17715 case $ac_var in #(
17716 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17718 esac
17719 case $ac_var in #(
17720 _ | IFS | as_nl) ;; #(
17721 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17722 *) { eval $ac_var=; unset $ac_var;} ;;
17723 esac ;;
17724 esac
17725 done
17726
bec39cab 17727 (set) 2>&1 |
81ecdfbb
RW
17728 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17729 *${as_nl}ac_space=\ *)
17730 # `set' does not quote correctly, so add quotes: double-quote
17731 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
17732 sed -n \
17733 "s/'/'\\\\''/g;
17734 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 17735 ;; #(
bec39cab
AC
17736 *)
17737 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 17738 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 17739 ;;
81ecdfbb
RW
17740 esac |
17741 sort
17742) |
bec39cab 17743 sed '
81ecdfbb 17744 /^ac_cv_env_/b end
bec39cab 17745 t clear
81ecdfbb 17746 :clear
bec39cab
AC
17747 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17748 t end
81ecdfbb
RW
17749 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17750 :end' >>confcache
17751if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17752 if test -w "$cache_file"; then
17753 test "x$cache_file" != "x/dev/null" &&
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17755$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
17756 cat confcache >$cache_file
17757 else
81ecdfbb
RW
17758 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17759$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
17760 fi
17761fi
17762rm -f confcache
17763
17764test "x$prefix" = xNONE && prefix=$ac_default_prefix
17765# Let make expand exec_prefix.
17766test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17767
bec39cab
AC
17768DEFS=-DHAVE_CONFIG_H
17769
17770ac_libobjs=
17771ac_ltlibobjs=
17772for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17773 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
17774 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17775 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17776 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17777 # will be set to the directory where LIBOBJS objects are built.
17778 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17779 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
17780done
17781LIBOBJS=$ac_libobjs
17782
17783LTLIBOBJS=$ac_ltlibobjs
17784
17785
85981d60 17786if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
17787 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
17788Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 17789fi
4df42755
DE
17790if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17791 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
17792Usually this means the macro was only invoked conditionally." "$LINENO" 5
17793fi
17794if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17795 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
17796Usually this means the macro was only invoked conditionally." "$LINENO" 5
17797fi
81ecdfbb
RW
17798
17799
bec39cab 17800: ${CONFIG_STATUS=./config.status}
81ecdfbb 17801ac_write_fail=0
bec39cab
AC
17802ac_clean_files_save=$ac_clean_files
17803ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
17804{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17805$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17806as_write_fail=0
17807cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
17808#! $SHELL
17809# Generated by $as_me.
17810# Run this file to recreate the current configuration.
17811# Compiler output produced by configure, useful for debugging
17812# configure, is in config.log if it exists.
17813
17814debug=false
17815ac_cs_recheck=false
17816ac_cs_silent=false
bec39cab 17817
81ecdfbb
RW
17818SHELL=\${CONFIG_SHELL-$SHELL}
17819export SHELL
17820_ASEOF
17821cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17822## -------------------- ##
17823## M4sh Initialization. ##
17824## -------------------- ##
17825
17826# Be more Bourne compatible
17827DUALCASE=1; export DUALCASE # for MKS sh
17828if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
17829 emulate sh
17830 NULLCMD=:
81ecdfbb 17831 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
17832 # is contrary to our usage. Disable this feature.
17833 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
17834 setopt NO_GLOB_SUBST
17835else
17836 case `(set -o) 2>/dev/null` in #(
17837 *posix*) :
17838 set -o posix ;; #(
17839 *) :
17840 ;;
17841esac
bec39cab 17842fi
bec39cab 17843
81ecdfbb
RW
17844
17845as_nl='
17846'
17847export as_nl
17848# Printing a long string crashes Solaris 7 /usr/bin/printf.
17849as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17850as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17851as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17852# Prefer a ksh shell builtin over an external printf program on Solaris,
17853# but without wasting forks for bash or zsh.
17854if test -z "$BASH_VERSION$ZSH_VERSION" \
17855 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17856 as_echo='print -r --'
17857 as_echo_n='print -rn --'
17858elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17859 as_echo='printf %s\n'
17860 as_echo_n='printf %s'
17861else
17862 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17863 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17864 as_echo_n='/usr/ucb/echo -n'
17865 else
17866 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17867 as_echo_n_body='eval
17868 arg=$1;
17869 case $arg in #(
17870 *"$as_nl"*)
17871 expr "X$arg" : "X\\(.*\\)$as_nl";
17872 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17873 esac;
17874 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17875 '
17876 export as_echo_n_body
17877 as_echo_n='sh -c $as_echo_n_body as_echo'
17878 fi
17879 export as_echo_body
17880 as_echo='sh -c $as_echo_body as_echo'
17881fi
17882
17883# The user is always right.
17884if test "${PATH_SEPARATOR+set}" != set; then
17885 PATH_SEPARATOR=:
17886 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17887 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17888 PATH_SEPARATOR=';'
17889 }
bec39cab
AC
17890fi
17891
17892
81ecdfbb
RW
17893# IFS
17894# We need space, tab and new line, in precisely that order. Quoting is
17895# there to prevent editors from complaining about space-tab.
17896# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17897# splitting by setting IFS to empty value.)
17898IFS=" "" $as_nl"
17899
17900# Find who we are. Look in the path if we contain no directory separator.
17901case $0 in #((
17902 *[\\/]* ) as_myself=$0 ;;
17903 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17904for as_dir in $PATH
17905do
17906 IFS=$as_save_IFS
17907 test -z "$as_dir" && as_dir=.
17908 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17909 done
17910IFS=$as_save_IFS
17911
17912 ;;
17913esac
17914# We did not find ourselves, most probably we were run as `sh COMMAND'
17915# in which case we are not to be found in the path.
17916if test "x$as_myself" = x; then
17917 as_myself=$0
17918fi
17919if test ! -f "$as_myself"; then
17920 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17921 exit 1
17922fi
17923
17924# Unset variables that we do not need and which cause bugs (e.g. in
17925# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17926# suppresses any "Segmentation fault" message there. '((' could
17927# trigger a bug in pdksh 5.2.14.
17928for as_var in BASH_ENV ENV MAIL MAILPATH
17929do eval test x\${$as_var+set} = xset \
17930 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17931done
bec39cab
AC
17932PS1='$ '
17933PS2='> '
17934PS4='+ '
17935
17936# NLS nuisances.
81ecdfbb
RW
17937LC_ALL=C
17938export LC_ALL
17939LANGUAGE=C
17940export LANGUAGE
17941
17942# CDPATH.
17943(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17944
17945
17946# as_fn_error ERROR [LINENO LOG_FD]
17947# ---------------------------------
17948# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17949# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17950# script with status $?, using 1 if that was 0.
17951as_fn_error ()
17952{
17953 as_status=$?; test $as_status -eq 0 && as_status=1
17954 if test "$3"; then
17955 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17956 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
17957 fi
17958 $as_echo "$as_me: error: $1" >&2
17959 as_fn_exit $as_status
17960} # as_fn_error
17961
17962
17963# as_fn_set_status STATUS
17964# -----------------------
17965# Set $? to STATUS, without forking.
17966as_fn_set_status ()
17967{
17968 return $1
17969} # as_fn_set_status
17970
17971# as_fn_exit STATUS
17972# -----------------
17973# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17974as_fn_exit ()
17975{
17976 set +e
17977 as_fn_set_status $1
17978 exit $1
17979} # as_fn_exit
17980
17981# as_fn_unset VAR
17982# ---------------
17983# Portably unset VAR.
17984as_fn_unset ()
17985{
17986 { eval $1=; unset $1;}
17987}
17988as_unset=as_fn_unset
17989# as_fn_append VAR VALUE
17990# ----------------------
17991# Append the text in VALUE to the end of the definition contained in VAR. Take
17992# advantage of any shell optimizations that allow amortized linear growth over
17993# repeated appends, instead of the typical quadratic growth present in naive
17994# implementations.
17995if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17996 eval 'as_fn_append ()
17997 {
17998 eval $1+=\$2
17999 }'
18000else
18001 as_fn_append ()
18002 {
18003 eval $1=\$$1\$2
18004 }
18005fi # as_fn_append
18006
18007# as_fn_arith ARG...
18008# ------------------
18009# Perform arithmetic evaluation on the ARGs, and store the result in the
18010# global $as_val. Take advantage of shells that can avoid forks. The arguments
18011# must be portable across $(()) and expr.
18012if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18013 eval 'as_fn_arith ()
18014 {
18015 as_val=$(( $* ))
18016 }'
18017else
18018 as_fn_arith ()
18019 {
18020 as_val=`expr "$@" || test $? -eq 1`
18021 }
18022fi # as_fn_arith
bec39cab 18023
81ecdfbb
RW
18024
18025if expr a : '\(a\)' >/dev/null 2>&1 &&
18026 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
18027 as_expr=expr
18028else
18029 as_expr=false
18030fi
18031
81ecdfbb 18032if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
18033 as_basename=basename
18034else
18035 as_basename=false
18036fi
18037
81ecdfbb
RW
18038if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18039 as_dirname=dirname
18040else
18041 as_dirname=false
18042fi
bec39cab 18043
81ecdfbb 18044as_me=`$as_basename -- "$0" ||
bec39cab
AC
18045$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18046 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
18047 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18048$as_echo X/"$0" |
18049 sed '/^.*\/\([^/][^/]*\)\/*$/{
18050 s//\1/
18051 q
18052 }
18053 /^X\/\(\/\/\)$/{
18054 s//\1/
18055 q
18056 }
18057 /^X\/\(\/\).*/{
18058 s//\1/
18059 q
18060 }
18061 s/.*/./; q'`
b4e70030 18062
b4e70030
JB
18063# Avoid depending upon Character Ranges.
18064as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18065as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18066as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18067as_cr_digits='0123456789'
18068as_cr_alnum=$as_cr_Letters$as_cr_digits
18069
81ecdfbb
RW
18070ECHO_C= ECHO_N= ECHO_T=
18071case `echo -n x` in #(((((
18072-n*)
18073 case `echo 'xy\c'` in
18074 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18075 xy) ECHO_C='\c';;
18076 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18077 ECHO_T=' ';;
18078 esac;;
18079*)
18080 ECHO_N='-n';;
bec39cab
AC
18081esac
18082
81ecdfbb
RW
18083rm -f conf$$ conf$$.exe conf$$.file
18084if test -d conf$$.dir; then
18085 rm -f conf$$.dir/conf$$.file
bec39cab 18086else
81ecdfbb
RW
18087 rm -f conf$$.dir
18088 mkdir conf$$.dir 2>/dev/null
bec39cab 18089fi
81ecdfbb
RW
18090if (echo >conf$$.file) 2>/dev/null; then
18091 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 18092 as_ln_s='ln -s'
81ecdfbb
RW
18093 # ... but there are two gotchas:
18094 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18095 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18096 # In both cases, we have to default to `cp -p'.
18097 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18098 as_ln_s='cp -p'
18099 elif ln conf$$.file conf$$ 2>/dev/null; then
18100 as_ln_s=ln
18101 else
18102 as_ln_s='cp -p'
b4e70030 18103 fi
bec39cab
AC
18104else
18105 as_ln_s='cp -p'
18106fi
81ecdfbb
RW
18107rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18108rmdir conf$$.dir 2>/dev/null
18109
18110
18111# as_fn_mkdir_p
18112# -------------
18113# Create "$as_dir" as a directory, including parents if necessary.
18114as_fn_mkdir_p ()
18115{
18116
18117 case $as_dir in #(
18118 -*) as_dir=./$as_dir;;
18119 esac
18120 test -d "$as_dir" || eval $as_mkdir_p || {
18121 as_dirs=
18122 while :; do
18123 case $as_dir in #(
18124 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18125 *) as_qdir=$as_dir;;
18126 esac
18127 as_dirs="'$as_qdir' $as_dirs"
18128 as_dir=`$as_dirname -- "$as_dir" ||
18129$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18130 X"$as_dir" : 'X\(//\)[^/]' \| \
18131 X"$as_dir" : 'X\(//\)$' \| \
18132 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18133$as_echo X"$as_dir" |
18134 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18135 s//\1/
18136 q
18137 }
18138 /^X\(\/\/\)[^/].*/{
18139 s//\1/
18140 q
18141 }
18142 /^X\(\/\/\)$/{
18143 s//\1/
18144 q
18145 }
18146 /^X\(\/\).*/{
18147 s//\1/
18148 q
18149 }
18150 s/.*/./; q'`
18151 test -d "$as_dir" && break
18152 done
18153 test -z "$as_dirs" || eval "mkdir $as_dirs"
18154 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
18155
bec39cab 18156
81ecdfbb 18157} # as_fn_mkdir_p
bec39cab 18158if mkdir -p . 2>/dev/null; then
81ecdfbb 18159 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
18160else
18161 test -d ./-p && rmdir ./-p
18162 as_mkdir_p=false
18163fi
18164
81ecdfbb
RW
18165if test -x / >/dev/null 2>&1; then
18166 as_test_x='test -x'
18167else
18168 if ls -dL / >/dev/null 2>&1; then
18169 as_ls_L_option=L
18170 else
18171 as_ls_L_option=
18172 fi
18173 as_test_x='
18174 eval sh -c '\''
18175 if test -d "$1"; then
18176 test -d "$1/.";
18177 else
18178 case $1 in #(
18179 -*)set "./$1";;
18180 esac;
18181 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
18182 ???[sx]*):;;*)false;;esac;fi
18183 '\'' sh
18184 '
18185fi
18186as_executable_p=$as_test_x
bec39cab
AC
18187
18188# Sed expression to map a string onto a valid CPP name.
18189as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18190
18191# Sed expression to map a string onto a valid variable name.
18192as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18193
18194
bec39cab 18195exec 6>&1
81ecdfbb
RW
18196## ----------------------------------- ##
18197## Main body of $CONFIG_STATUS script. ##
18198## ----------------------------------- ##
18199_ASEOF
18200test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18201
18202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18203# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 18204# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
18205# values after options handling.
18206ac_log="
bec39cab 18207This file was extended by $as_me, which was
81ecdfbb 18208generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
18209
18210 CONFIG_FILES = $CONFIG_FILES
18211 CONFIG_HEADERS = $CONFIG_HEADERS
18212 CONFIG_LINKS = $CONFIG_LINKS
18213 CONFIG_COMMANDS = $CONFIG_COMMANDS
18214 $ $0 $@
18215
81ecdfbb
RW
18216on `(hostname || uname -n) 2>/dev/null | sed 1q`
18217"
18218
bec39cab
AC
18219_ACEOF
18220
81ecdfbb
RW
18221case $ac_config_files in *"
18222"*) set x $ac_config_files; shift; ac_config_files=$*;;
18223esac
234b45d4 18224
81ecdfbb
RW
18225case $ac_config_headers in *"
18226"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18227esac
b4e70030 18228
b4e70030 18229
81ecdfbb
RW
18230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18231# Files that config.status was made for.
18232config_files="$ac_config_files"
18233config_headers="$ac_config_headers"
18234config_links="$ac_config_links"
18235config_commands="$ac_config_commands"
234b45d4 18236
81ecdfbb 18237_ACEOF
b4e70030 18238
81ecdfbb 18239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 18240ac_cs_usage="\
81ecdfbb
RW
18241\`$as_me' instantiates files and other configuration actions
18242from templates according to the current configuration. Unless the files
18243and actions are specified as TAGs, all are instantiated by default.
234b45d4 18244
81ecdfbb 18245Usage: $0 [OPTION]... [TAG]...
234b45d4 18246
bec39cab 18247 -h, --help print this help, then exit
81ecdfbb
RW
18248 -V, --version print version number and configuration settings, then exit
18249 -q, --quiet, --silent
18250 do not print progress messages
bec39cab
AC
18251 -d, --debug don't remove temporary files
18252 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
18253 --file=FILE[:TEMPLATE]
18254 instantiate the configuration file FILE
18255 --header=FILE[:TEMPLATE]
18256 instantiate the configuration header FILE
234b45d4 18257
bec39cab
AC
18258Configuration files:
18259$config_files
234b45d4 18260
bec39cab
AC
18261Configuration headers:
18262$config_headers
234b45d4 18263
bec39cab
AC
18264Configuration links:
18265$config_links
234b45d4 18266
bec39cab
AC
18267Configuration commands:
18268$config_commands
18269
81ecdfbb 18270Report bugs to the package provider."
b4e70030 18271
81ecdfbb
RW
18272_ACEOF
18273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
18274ac_cs_version="\\
18275config.status
81ecdfbb
RW
18276configured by $0, generated by GNU Autoconf 2.64,
18277 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 18278
81ecdfbb 18279Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
18280This config.status script is free software; the Free Software Foundation
18281gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
18282
18283ac_pwd='$ac_pwd'
18284srcdir='$srcdir'
18285INSTALL='$INSTALL'
81ecdfbb
RW
18286AWK='$AWK'
18287test -n "\$AWK" || AWK=awk
bec39cab
AC
18288_ACEOF
18289
81ecdfbb
RW
18290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18291# The default lists apply if the user does not specify any file.
bec39cab
AC
18292ac_need_defaults=:
18293while test $# != 0
18294do
18295 case $1 in
18296 --*=*)
81ecdfbb
RW
18297 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18298 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 18299 ac_shift=:
c906108c 18300 ;;
81ecdfbb 18301 *)
bec39cab
AC
18302 ac_option=$1
18303 ac_optarg=$2
18304 ac_shift=shift
c906108c 18305 ;;
bec39cab 18306 esac
c906108c 18307
bec39cab
AC
18308 case $ac_option in
18309 # Handling of the options.
bec39cab
AC
18310 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18311 ac_cs_recheck=: ;;
81ecdfbb
RW
18312 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18313 $as_echo "$ac_cs_version"; exit ;;
18314 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
18315 debug=: ;;
18316 --file | --fil | --fi | --f )
18317 $ac_shift
81ecdfbb
RW
18318 case $ac_optarg in
18319 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18320 esac
18321 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
18322 ac_need_defaults=false;;
18323 --header | --heade | --head | --hea )
18324 $ac_shift
81ecdfbb
RW
18325 case $ac_optarg in
18326 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18327 esac
18328 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 18329 ac_need_defaults=false;;
81ecdfbb
RW
18330 --he | --h)
18331 # Conflict between --help and --header
18332 as_fn_error "ambiguous option: \`$1'
18333Try \`$0 --help' for more information.";;
18334 --help | --hel | -h )
18335 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
18336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18337 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18338 ac_cs_silent=: ;;
c906108c 18339
bec39cab 18340 # This is an error.
81ecdfbb
RW
18341 -*) as_fn_error "unrecognized option: \`$1'
18342Try \`$0 --help' for more information." ;;
c906108c 18343
81ecdfbb
RW
18344 *) as_fn_append ac_config_targets " $1"
18345 ac_need_defaults=false ;;
c906108c 18346
bec39cab
AC
18347 esac
18348 shift
18349done
c906108c 18350
bec39cab 18351ac_configure_extra_args=
c906108c 18352
bec39cab
AC
18353if $ac_cs_silent; then
18354 exec 6>/dev/null
18355 ac_configure_extra_args="$ac_configure_extra_args --silent"
18356fi
c906108c 18357
bec39cab 18358_ACEOF
81ecdfbb 18359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 18360if \$ac_cs_recheck; then
81ecdfbb
RW
18361 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18362 shift
18363 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18364 CONFIG_SHELL='$SHELL'
18365 export CONFIG_SHELL
18366 exec "\$@"
bec39cab
AC
18367fi
18368
18369_ACEOF
81ecdfbb
RW
18370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18371exec 5>>config.log
18372{
18373 echo
18374 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18375## Running $as_me. ##
18376_ASBOX
18377 $as_echo "$ac_log"
18378} >&5
bec39cab 18379
81ecdfbb
RW
18380_ACEOF
18381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 18382#
81ecdfbb 18383# INIT-COMMANDS
c906108c 18384#
a417dc56 18385ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 18386
bec39cab
AC
18387_ACEOF
18388
81ecdfbb 18389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 18390
81ecdfbb 18391# Handling of arguments.
bec39cab 18392for ac_config_target in $ac_config_targets
c906108c 18393do
81ecdfbb
RW
18394 case $ac_config_target in
18395 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18396 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 18397 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 18398 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 18399 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 18400 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 18401 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 18402 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 18403 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
18404
18405 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
18406 esac
18407done
18408
81ecdfbb 18409
bec39cab
AC
18410# If the user did not use the arguments to specify the items to instantiate,
18411# then the envvar interface is used. Set only those that are not.
18412# We use the long form for the default assignment because of an extremely
18413# bizarre bug on SunOS 4.1.3.
18414if $ac_need_defaults; then
18415 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18416 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18417 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18418 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18419fi
18420
b4e70030 18421# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 18422# simply because there is no reason against having it here, and in addition,
b4e70030 18423# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
18424# Hook for its removal unless debugging.
18425# Note that there is a small window in which the directory will not be cleaned:
18426# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
18427$debug ||
18428{
81ecdfbb
RW
18429 tmp=
18430 trap 'exit_status=$?
18431 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18432' 0
18433 trap 'as_fn_exit 1' 1 2 13 15
18434}
18435# Create a (secure) tmp directory for tmp files.
18436
18437{
18438 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18439 test -n "$tmp" && test -d "$tmp"
18440} ||
18441{
18442 tmp=./conf$$-$RANDOM
18443 (umask 077 && mkdir "$tmp")
18444} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
18445
18446# Set up the scripts for CONFIG_FILES section.
18447# No need to generate them if there are no CONFIG_FILES.
18448# This happens for instance with `./config.status config.h'.
18449if test -n "$CONFIG_FILES"; then
18450
18451if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18452 ac_cs_awk_getline=:
18453 ac_cs_awk_pipe_init=
18454 ac_cs_awk_read_file='
18455 while ((getline aline < (F[key])) > 0)
18456 print(aline)
18457 close(F[key])'
18458 ac_cs_awk_pipe_fini=
18459else
18460 ac_cs_awk_getline=false
18461 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18462 ac_cs_awk_read_file='
18463 print "|#_!!_#|"
18464 print "cat " F[key] " &&"
18465 '$ac_cs_awk_pipe_init
18466 # The final `:' finishes the AND list.
18467 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18468fi
18469ac_cr=`echo X | tr X '\015'`
18470# On cygwin, bash can eat \r inside `` if the user requested igncr.
18471# But we know of no other shell where ac_cr would be empty at this
18472# point, so we can use a bashism as a fallback.
18473if test "x$ac_cr" = x; then
18474 eval ac_cr=\$\'\\r\'
18475fi
18476ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18477if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18478 ac_cs_awk_cr='\r'
18479else
18480 ac_cs_awk_cr=$ac_cr
18481fi
18482
18483echo 'BEGIN {' >"$tmp/subs1.awk" &&
18484_ACEOF
18485
18486# Create commands to substitute file output variables.
18487{
18488 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18489 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
18490 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18491 echo "_ACAWK" &&
18492 echo "_ACEOF"
18493} >conf$$files.sh &&
18494. ./conf$$files.sh ||
18495 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18496rm -f conf$$files.sh
18497
18498{
18499 echo "cat >conf$$subs.awk <<_ACEOF" &&
18500 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18501 echo "_ACEOF"
18502} >conf$$subs.sh ||
18503 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18504ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
18505ac_delim='%!_!# '
18506for ac_last_try in false false false false false :; do
18507 . ./conf$$subs.sh ||
18508 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18509
18510 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18511 if test $ac_delim_n = $ac_delim_num; then
18512 break
18513 elif $ac_last_try; then
18514 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
18515 else
18516 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18517 fi
18518done
18519rm -f conf$$subs.sh
18520
18521cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18522cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
18523_ACEOF
18524sed -n '
18525h
18526s/^/S["/; s/!.*/"]=/
18527p
18528g
18529s/^[^!]*!//
18530:repl
18531t repl
18532s/'"$ac_delim"'$//
18533t delim
18534:nl
18535h
18536s/\(.\{148\}\).*/\1/
18537t more1
18538s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18539p
18540n
18541b repl
18542:more1
18543s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18544p
18545g
18546s/.\{148\}//
18547t nl
18548:delim
18549h
18550s/\(.\{148\}\).*/\1/
18551t more2
18552s/["\\]/\\&/g; s/^/"/; s/$/"/
18553p
18554b
18555:more2
18556s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18557p
18558g
18559s/.\{148\}//
18560t delim
18561' <conf$$subs.awk | sed '
18562/^[^""]/{
18563 N
18564 s/\n//
18565}
18566' >>$CONFIG_STATUS || ac_write_fail=1
18567rm -f conf$$subs.awk
18568cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18569_ACAWK
18570cat >>"\$tmp/subs1.awk" <<_ACAWK &&
18571 for (key in S) S_is_set[key] = 1
18572 FS = "\a"
18573 \$ac_cs_awk_pipe_init
18574}
18575{
18576 line = $ 0
18577 nfields = split(line, field, "@")
18578 substed = 0
18579 len = length(field[1])
18580 for (i = 2; i < nfields; i++) {
18581 key = field[i]
18582 keylen = length(key)
18583 if (S_is_set[key]) {
18584 value = S[key]
18585 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18586 len += length(value) + length(field[++i])
18587 substed = 1
18588 } else
18589 len += 1 + keylen
18590 }
18591 if (nfields == 3 && !substed) {
18592 key = field[2]
18593 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18594 \$ac_cs_awk_read_file
18595 next
18596 }
18597 }
18598 print line
b4e70030 18599}
81ecdfbb
RW
18600\$ac_cs_awk_pipe_fini
18601_ACAWK
18602_ACEOF
18603cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18604if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18605 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18606else
18607 cat
18608fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
18609 || as_fn_error "could not setup config files machinery" "$LINENO" 5
18610_ACEOF
18611
18612# VPATH may cause trouble with some makes, so we remove $(srcdir),
18613# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18614# trailing colons and then remove the whole line if VPATH becomes empty
18615# (actually we leave an empty line to preserve line numbers).
18616if test "x$srcdir" = x.; then
18617 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18618s/:*\$(srcdir):*/:/
18619s/:*\${srcdir}:*/:/
18620s/:*@srcdir@:*/:/
18621s/^\([^=]*=[ ]*\):*/\1/
18622s/:*$//
18623s/^[^=]*=[ ]*$//
18624}'
18625fi
18626
18627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18628fi # test -n "$CONFIG_FILES"
18629
18630# Set up the scripts for CONFIG_HEADERS section.
18631# No need to generate them if there are no CONFIG_HEADERS.
18632# This happens for instance with `./config.status Makefile'.
18633if test -n "$CONFIG_HEADERS"; then
18634cat >"$tmp/defines.awk" <<\_ACAWK ||
18635BEGIN {
18636_ACEOF
18637
18638# Transform confdefs.h into an awk script `defines.awk', embedded as
18639# here-document in config.status, that substitutes the proper values into
18640# config.h.in to produce config.h.
4e8d927d 18641
81ecdfbb
RW
18642# Create a delimiter string that does not exist in confdefs.h, to ease
18643# handling of long lines.
18644ac_delim='%!_!# '
18645for ac_last_try in false false :; do
18646 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
18647 if test -z "$ac_t"; then
18648 break
18649 elif $ac_last_try; then
18650 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
18651 else
18652 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18653 fi
18654done
4e8d927d 18655
81ecdfbb
RW
18656# For the awk script, D is an array of macro values keyed by name,
18657# likewise P contains macro parameters if any. Preserve backslash
18658# newline sequences.
18659
18660ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18661sed -n '
18662s/.\{148\}/&'"$ac_delim"'/g
18663t rset
18664:rset
18665s/^[ ]*#[ ]*define[ ][ ]*/ /
18666t def
18667d
18668:def
18669s/\\$//
18670t bsnl
18671s/["\\]/\\&/g
18672s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18673D["\1"]=" \3"/p
18674s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18675d
18676:bsnl
18677s/["\\]/\\&/g
18678s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18679D["\1"]=" \3\\\\\\n"\\/p
18680t cont
18681s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18682t cont
18683d
18684:cont
18685n
18686s/.\{148\}/&'"$ac_delim"'/g
18687t clear
18688:clear
18689s/\\$//
18690t bsnlc
18691s/["\\]/\\&/g; s/^/"/; s/$/"/p
18692d
18693:bsnlc
18694s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18695b cont
18696' <confdefs.h | sed '
18697s/'"$ac_delim"'/"\\\
18698"/g' >>$CONFIG_STATUS || ac_write_fail=1
18699
18700cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18701 for (key in D) D_is_set[key] = 1
18702 FS = "\a"
18703}
18704/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18705 line = \$ 0
18706 split(line, arg, " ")
18707 if (arg[1] == "#") {
18708 defundef = arg[2]
18709 mac1 = arg[3]
18710 } else {
18711 defundef = substr(arg[1], 2)
18712 mac1 = arg[2]
18713 }
18714 split(mac1, mac2, "(") #)
18715 macro = mac2[1]
18716 prefix = substr(line, 1, index(line, defundef) - 1)
18717 if (D_is_set[macro]) {
18718 # Preserve the white space surrounding the "#".
18719 print prefix "define", macro P[macro] D[macro]
18720 next
18721 } else {
18722 # Replace #undef with comments. This is necessary, for example,
18723 # in the case of _POSIX_SOURCE, which is predefined and required
18724 # on some systems where configure will not decide to define it.
18725 if (defundef == "undef") {
18726 print "/*", prefix defundef, macro, "*/"
18727 next
18728 }
18729 }
b4e70030 18730}
81ecdfbb
RW
18731{ print }
18732_ACAWK
b4e70030 18733_ACEOF
81ecdfbb
RW
18734cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18735 as_fn_error "could not setup config headers machinery" "$LINENO" 5
18736fi # test -n "$CONFIG_HEADERS"
4e8d927d 18737
4e8d927d 18738
81ecdfbb
RW
18739eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18740shift
18741for ac_tag
18742do
18743 case $ac_tag in
18744 :[FHLC]) ac_mode=$ac_tag; continue;;
18745 esac
18746 case $ac_mode$ac_tag in
18747 :[FHL]*:*);;
18748 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
18749 :[FH]-) ac_tag=-:-;;
18750 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18751 esac
18752 ac_save_IFS=$IFS
18753 IFS=:
18754 set x $ac_tag
18755 IFS=$ac_save_IFS
18756 shift
18757 ac_file=$1
18758 shift
4e8d927d 18759
81ecdfbb
RW
18760 case $ac_mode in
18761 :L) ac_source=$1;;
18762 :[FH])
18763 ac_file_inputs=
18764 for ac_f
18765 do
18766 case $ac_f in
18767 -) ac_f="$tmp/stdin";;
18768 *) # Look for the file first in the build tree, then in the source tree
18769 # (if the path is not absolute). The absolute path cannot be DOS-style,
18770 # because $ac_f cannot contain `:'.
18771 test -f "$ac_f" ||
18772 case $ac_f in
18773 [\\/$]*) false;;
18774 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18775 esac ||
18776 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18777 esac
18778 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18779 as_fn_append ac_file_inputs " '$ac_f'"
18780 done
18781
18782 # Let's still pretend it is `configure' which instantiates (i.e., don't
18783 # use $as_me), people would be surprised to read:
18784 # /* config.h. Generated by config.status. */
18785 configure_input='Generated from '`
18786 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18787 `' by configure.'
18788 if test x"$ac_file" != x-; then
18789 configure_input="$ac_file. $configure_input"
18790 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18791$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 18792 fi
81ecdfbb
RW
18793 # Neutralize special characters interpreted by sed in replacement strings.
18794 case $configure_input in #(
18795 *\&* | *\|* | *\\* )
18796 ac_sed_conf_input=`$as_echo "$configure_input" |
18797 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18798 *) ac_sed_conf_input=$configure_input;;
18799 esac
4e8d927d 18800
81ecdfbb
RW
18801 case $ac_tag in
18802 *:-:* | *:-) cat >"$tmp/stdin" \
18803 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
18804 esac
18805 ;;
c906108c
SS
18806 esac
18807
81ecdfbb 18808 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
18809$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18810 X"$ac_file" : 'X\(//\)[^/]' \| \
18811 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
18812 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18813$as_echo X"$ac_file" |
18814 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18815 s//\1/
18816 q
18817 }
18818 /^X\(\/\/\)[^/].*/{
18819 s//\1/
18820 q
18821 }
18822 /^X\(\/\/\)$/{
18823 s//\1/
18824 q
18825 }
18826 /^X\(\/\).*/{
18827 s//\1/
18828 q
18829 }
18830 s/.*/./; q'`
18831 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
18832 ac_builddir=.
18833
81ecdfbb
RW
18834case "$ac_dir" in
18835.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18836*)
18837 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18838 # A ".." for each directory in $ac_dir_suffix.
18839 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18840 case $ac_top_builddir_sub in
18841 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18842 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18843 esac ;;
18844esac
18845ac_abs_top_builddir=$ac_pwd
18846ac_abs_builddir=$ac_pwd$ac_dir_suffix
18847# for backward compatibility:
18848ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
18849
18850case $srcdir in
81ecdfbb 18851 .) # We are building in place.
bec39cab 18852 ac_srcdir=.
81ecdfbb
RW
18853 ac_top_srcdir=$ac_top_builddir_sub
18854 ac_abs_top_srcdir=$ac_pwd ;;
18855 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 18856 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
18857 ac_top_srcdir=$srcdir
18858 ac_abs_top_srcdir=$srcdir ;;
18859 *) # Relative name.
18860 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18861 ac_top_srcdir=$ac_top_build_prefix$srcdir
18862 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 18863esac
81ecdfbb 18864ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 18865
c906108c 18866
81ecdfbb
RW
18867 case $ac_mode in
18868 :F)
18869 #
18870 # CONFIG_FILE
18871 #
c906108c 18872
bec39cab
AC
18873 case $INSTALL in
18874 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 18875 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 18876 esac
81ecdfbb 18877_ACEOF
121ce6e5 18878
81ecdfbb
RW
18879cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18880# If the template does not know about datarootdir, expand it.
18881# FIXME: This hack should be removed a few years after 2.60.
18882ac_datarootdir_hack=; ac_datarootdir_seen=
18883ac_sed_dataroot='
18884/datarootdir/ {
18885 p
18886 q
18887}
18888/@datadir@/p
18889/@docdir@/p
18890/@infodir@/p
18891/@localedir@/p
18892/@mandir@/p'
18893case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18894*datarootdir*) ac_datarootdir_seen=yes;;
18895*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18897$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18898_ACEOF
18899cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18900 ac_datarootdir_hack='
18901 s&@datadir@&$datadir&g
18902 s&@docdir@&$docdir&g
18903 s&@infodir@&$infodir&g
18904 s&@localedir@&$localedir&g
18905 s&@mandir@&$mandir&g
18906 s&\\\${datarootdir}&$datarootdir&g' ;;
18907esac
4e8d927d 18908_ACEOF
81ecdfbb
RW
18909
18910# Neutralize VPATH when `$srcdir' = `.'.
18911# Shell code in configure.ac might set extrasub.
18912# FIXME: do we really want to maintain this feature?
18913cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18914ac_sed_extra="$ac_vpsub
bec39cab
AC
18915$extrasub
18916_ACEOF
81ecdfbb 18917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
18918:t
18919/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
18920s|@configure_input@|$ac_sed_conf_input|;t t
18921s&@top_builddir@&$ac_top_builddir_sub&;t t
18922s&@top_build_prefix@&$ac_top_build_prefix&;t t
18923s&@srcdir@&$ac_srcdir&;t t
18924s&@abs_srcdir@&$ac_abs_srcdir&;t t
18925s&@top_srcdir@&$ac_top_srcdir&;t t
18926s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18927s&@builddir@&$ac_builddir&;t t
18928s&@abs_builddir@&$ac_abs_builddir&;t t
18929s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18930s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
18931$ac_datarootdir_hack
18932"
18933eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18934if $ac_cs_awk_getline; then
18935 $AWK -f "$tmp/subs.awk"
18936else
18937 $AWK -f "$tmp/subs.awk" | $SHELL
18938fi >$tmp/out \
18939 || as_fn_error "could not create $ac_file" "$LINENO" 5
18940
18941test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18942 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18943 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18945which seems to be undefined. Please make sure it is defined." >&5
18946$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18947which seems to be undefined. Please make sure it is defined." >&2;}
18948
18949 rm -f "$tmp/stdin"
bec39cab 18950 case $ac_file in
81ecdfbb
RW
18951 -) cat "$tmp/out" && rm -f "$tmp/out";;
18952 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
18953 esac \
18954 || as_fn_error "could not create $ac_file" "$LINENO" 5
18955 ;;
18956 :H)
18957 #
18958 # CONFIG_HEADER
18959 #
bec39cab 18960 if test x"$ac_file" != x-; then
81ecdfbb
RW
18961 {
18962 $as_echo "/* $configure_input */" \
18963 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
18964 } >"$tmp/config.h" \
18965 || as_fn_error "could not create $ac_file" "$LINENO" 5
18966 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
18967 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18968$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 18969 else
81ecdfbb
RW
18970 rm -f "$ac_file"
18971 mv "$tmp/config.h" "$ac_file" \
18972 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
18973 fi
18974 else
81ecdfbb
RW
18975 $as_echo "/* $configure_input */" \
18976 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
18977 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 18978 fi
81ecdfbb
RW
18979 ;;
18980 :L)
18981 #
18982 # CONFIG_LINK
18983 #
c906108c 18984
81ecdfbb
RW
18985 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18986 :
b4e70030 18987 else
81ecdfbb
RW
18988 # Prefer the file from the source tree if names are identical.
18989 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18990 ac_source=$srcdir/$ac_source
18991 fi
b4e70030 18992
81ecdfbb
RW
18993 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18994$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 18995
81ecdfbb
RW
18996 if test ! -r "$ac_source"; then
18997 as_fn_error "$ac_source: file not found" "$LINENO" 5
18998 fi
18999 rm -f "$ac_file"
bec39cab 19000
81ecdfbb
RW
19001 # Try a relative symlink, then a hard link, then a copy.
19002 case $srcdir in
19003 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19004 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19005 esac
19006 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19007 ln "$ac_source" "$ac_file" 2>/dev/null ||
19008 cp -p "$ac_source" "$ac_file" ||
19009 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
19010 fi
19011 ;;
19012 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19013$as_echo "$as_me: executing $ac_file commands" >&6;}
19014 ;;
c906108c 19015 esac
b4e70030 19016
bec39cab 19017
81ecdfbb
RW
19018 case $ac_file$ac_mode in
19019 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 19020 "gcore":F) chmod +x gcore ;;
1e94266c
SM
19021 "Makefile":F)
19022case x$CONFIG_HEADERS in
19023xconfig.h:config.in)
19024echo > stamp-h ;;
19025esac
19026 ;;
19027 "gdb-gdb.gdb":F)
19028case x$CONFIG_HEADERS in
19029xconfig.h:config.in)
19030echo > stamp-h ;;
19031esac
19032 ;;
19033 "doc/Makefile":F)
19034case x$CONFIG_HEADERS in
19035xconfig.h:config.in)
19036echo > stamp-h ;;
19037esac
19038 ;;
19039 "data-directory/Makefile":F)
c906108c
SS
19040case x$CONFIG_HEADERS in
19041xconfig.h:config.in)
19042echo > stamp-h ;;
19043esac
bec39cab 19044 ;;
81ecdfbb 19045
bec39cab 19046 esac
81ecdfbb 19047done # for ac_tag
c906108c 19048
bec39cab 19049
81ecdfbb 19050as_fn_exit 0
bec39cab 19051_ACEOF
bec39cab
AC
19052ac_clean_files=$ac_clean_files_save
19053
81ecdfbb
RW
19054test $ac_write_fail = 0 ||
19055 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
19056
bec39cab
AC
19057
19058# configure is writing to config.log, and then calls config.status.
19059# config.status does its own redirection, appending to config.log.
19060# Unfortunately, on DOS this fails, as config.log is still kept open
19061# by configure, so config.status won't be able to write to it; its
19062# output is simply discarded. So we exec the FD to /dev/null,
19063# effectively closing config.log, so it can be properly (re)opened and
19064# appended to by config.status. When coming back to configure, we
19065# need to make the FD available again.
19066if test "$no_create" != yes; then
19067 ac_cs_success=:
19068 ac_config_status_args=
19069 test "$silent" = yes &&
19070 ac_config_status_args="$ac_config_status_args --quiet"
19071 exec 5>/dev/null
19072 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19073 exec 5>>config.log
19074 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19075 # would make configure fail if this is the last instruction.
81ecdfbb 19076 $ac_cs_success || as_fn_exit $?
bec39cab 19077fi
c906108c 19078
bec39cab 19079#
81ecdfbb 19080# CONFIG_SUBDIRS section.
bec39cab 19081#
c906108c
SS
19082if test "$no_recursion" != yes; then
19083
81ecdfbb
RW
19084 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19085 # so they do not pile up.
c906108c
SS
19086 ac_sub_configure_args=
19087 ac_prev=
fdc59709
PB
19088 eval "set x $ac_configure_args"
19089 shift
19090 for ac_arg
19091 do
c906108c
SS
19092 if test -n "$ac_prev"; then
19093 ac_prev=
19094 continue
19095 fi
bec39cab 19096 case $ac_arg in
c906108c
SS
19097 -cache-file | --cache-file | --cache-fil | --cache-fi \
19098 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19099 ac_prev=cache_file ;;
19100 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
19101 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19102 | --c=*)
19103 ;;
19104 --config-cache | -C)
c906108c
SS
19105 ;;
19106 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19107 ac_prev=srcdir ;;
19108 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19109 ;;
bec39cab
AC
19110 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19111 ac_prev=prefix ;;
19112 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19113 ;;
81ecdfbb
RW
19114 --disable-option-checking)
19115 ;;
fdc59709
PB
19116 *)
19117 case $ac_arg in
81ecdfbb 19118 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19119 esac
81ecdfbb 19120 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
19121 esac
19122 done
19123
bec39cab
AC
19124 # Always prepend --prefix to ensure using the same prefix
19125 # in subdir configurations.
fdc59709
PB
19126 ac_arg="--prefix=$prefix"
19127 case $ac_arg in
81ecdfbb 19128 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 19129 esac
81ecdfbb
RW
19130 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19131
19132 # Pass --silent
19133 if test "$silent" = yes; then
19134 ac_sub_configure_args="--silent $ac_sub_configure_args"
19135 fi
19136
19137 # Always prepend --disable-option-checking to silence warnings, since
19138 # different subdirs can have different --enable and --with options.
19139 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 19140
b4e70030 19141 ac_popdir=`pwd`
bec39cab 19142 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
19143
19144 # Do not complain, so a configure script can configure whichever
19145 # parts of a large source tree are present.
fdc59709 19146 test -d "$srcdir/$ac_dir" || continue
c906108c 19147
81ecdfbb
RW
19148 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19149 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19150 $as_echo "$ac_msg" >&6
19151 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
19152 ac_builddir=.
19153
81ecdfbb
RW
19154case "$ac_dir" in
19155.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19156*)
19157 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19158 # A ".." for each directory in $ac_dir_suffix.
19159 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19160 case $ac_top_builddir_sub in
19161 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19162 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19163 esac ;;
19164esac
19165ac_abs_top_builddir=$ac_pwd
19166ac_abs_builddir=$ac_pwd$ac_dir_suffix
19167# for backward compatibility:
19168ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
19169
19170case $srcdir in
81ecdfbb 19171 .) # We are building in place.
bec39cab 19172 ac_srcdir=.
81ecdfbb
RW
19173 ac_top_srcdir=$ac_top_builddir_sub
19174 ac_abs_top_srcdir=$ac_pwd ;;
19175 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 19176 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
19177 ac_top_srcdir=$srcdir
19178 ac_abs_top_srcdir=$srcdir ;;
19179 *) # Relative name.
19180 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19181 ac_top_srcdir=$ac_top_build_prefix$srcdir
19182 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 19183esac
81ecdfbb 19184ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 19185
c906108c 19186
fdc59709 19187 cd "$ac_dir"
c906108c
SS
19188
19189 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
19190 if test -f "$ac_srcdir/configure.gnu"; then
19191 ac_sub_configure=$ac_srcdir/configure.gnu
19192 elif test -f "$ac_srcdir/configure"; then
19193 ac_sub_configure=$ac_srcdir/configure
19194 elif test -f "$ac_srcdir/configure.in"; then
19195 # This should be Cygnus configure.
19196 ac_sub_configure=$ac_aux_dir/configure
c906108c 19197 else
81ecdfbb
RW
19198 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19199$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
19200 ac_sub_configure=
19201 fi
19202
19203 # The recursion is here.
19204 if test -n "$ac_sub_configure"; then
c906108c 19205 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
19206 case $cache_file in
19207 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
19208 *) # Relative name.
19209 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 19210 esac
c906108c 19211
81ecdfbb
RW
19212 { $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
19213$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 19214 # The eval makes quoting arguments work.
fdc59709
PB
19215 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19216 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 19217 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
19218 fi
19219
fdc59709 19220 cd "$ac_popdir"
c906108c
SS
19221 done
19222fi
81ecdfbb
RW
19223if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19225$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19226fi
c906108c 19227
This page took 2.8233 seconds and 4 git commands to generate.