Create libiberty.m4, have GDB and GDBserver use it
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
81ecdfbb
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
c906108c
SS
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
81ecdfbb
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
bec39cab 14
81ecdfbb
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
18 emulate sh
19 NULLCMD=:
81ecdfbb 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
bec39cab 31fi
bec39cab 32
81ecdfbb
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
bec39cab
AC
79fi
80
81
81ecdfbb
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
bec39cab
AC
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
81ecdfbb
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 184do
81ecdfbb
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 228 else
81ecdfbb
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
bec39cab 233 fi
81ecdfbb
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
bec39cab 263
81ecdfbb
RW
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
375 as_expr=expr
376else
377 as_expr=false
378fi
379
81ecdfbb 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
381 as_basename=basename
382else
383 as_basename=false
384fi
385
81ecdfbb
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
bec39cab 391
81ecdfbb 392as_me=`$as_basename -- "$0" ||
bec39cab
AC
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
bec39cab 410
b4e70030
JB
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 417
bec39cab 418
81ecdfbb
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
bec39cab 428 sed '
81ecdfbb
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
bec39cab 433 N
81ecdfbb
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 436 t loop
81ecdfbb 437 s/-\n.*//
bec39cab 438 ' >$as_me.lineno &&
81ecdfbb
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab
AC
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
bec39cab
AC
446 # Exit status is that of the last command.
447 exit
448}
449
81ecdfbb
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
bec39cab
AC
461esac
462
81ecdfbb
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
bec39cab 466else
81ecdfbb
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
bec39cab 469fi
81ecdfbb
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 472 as_ln_s='ln -s'
81ecdfbb
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
b4e70030 483 fi
bec39cab
AC
484else
485 as_ln_s='cp -p'
486fi
81ecdfbb
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
bec39cab
AC
489
490if mkdir -p . 2>/dev/null; then
81ecdfbb 491 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
81ecdfbb
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
bec39cab
AC
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
81ecdfbb 527exec 7<&0 </dev/null 6>&1
c906108c 528
bec39cab
AC
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
bec39cab
AC
534#
535# Initializations.
536#
c906108c 537ac_default_prefix=/usr/local
81ecdfbb 538ac_clean_files=
bec39cab 539ac_config_libobj_dir=.
81ecdfbb 540LIBOBJS=
bec39cab
AC
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
b4e70030 545
bec39cab
AC
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
81ecdfbb 552PACKAGE_URL=
bec39cab
AC
553
554ac_unique_file="main.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
81ecdfbb 558#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
559# include <sys/types.h>
560#endif
81ecdfbb 561#ifdef HAVE_SYS_STAT_H
bec39cab
AC
562# include <sys/stat.h>
563#endif
81ecdfbb 564#ifdef STDC_HEADERS
bec39cab
AC
565# include <stdlib.h>
566# include <stddef.h>
567#else
81ecdfbb 568# ifdef HAVE_STDLIB_H
bec39cab
AC
569# include <stdlib.h>
570# endif
571#endif
81ecdfbb
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
81ecdfbb 578#ifdef HAVE_STRINGS_H
bec39cab
AC
579# include <strings.h>
580#endif
81ecdfbb 581#ifdef HAVE_INTTYPES_H
bec39cab 582# include <inttypes.h>
bec39cab 583#endif
81ecdfbb
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
bec39cab
AC
588# include <unistd.h>
589#endif"
590
81ecdfbb 591enable_option_checking=no
c971b7fa 592ac_subst_vars='LTLIBOBJS
81ecdfbb 593LIBOBJS
b292c783
JK
594GCORE_TRANSFORM_NAME
595GDB_TRANSFORM_NAME
81ecdfbb 596GDB_NM_FILE
393fd4c3
YQ
597LTLIBBABELTRACE
598LIBBABELTRACE
599HAVE_LIBBABELTRACE
81ecdfbb
RW
600frags
601target_subdir
602CONFIG_UNINSTALL
603CONFIG_INSTALL
604CONFIG_CLEAN
605CONFIG_ALL
606CONFIG_SRCS
607CONFIG_DEPS
608CONFIG_OBS
609PROFILE_CFLAGS
610ENABLE_CFLAGS
611SIM_OBS
612SIM
613XMKMF
614GDBTK_SRC_DIR
615GDBTK_CFLAGS
616GDBTKLIBS
617X_LIBS
618X_LDFLAGS
619X_CFLAGS
620TK_XINCLUDES
621TK_DEPS
622TK_LIBRARY
623TK_INCLUDE
624TK_STUB_LIB_SPEC
625TK_STUB_LIB_FLAG
626TK_STUB_LIB_FILE
627TK_LIB_SPEC
628TK_LIB_FLAG
629TK_LIB_FILE
630TK_SRC_DIR
631TK_BIN_DIR
632TK_VERSION
633TCL_DEPS
634TCL_LIBRARY
635TCL_INCLUDE
636TCL_STUB_LIB_SPEC
637TCL_STUB_LIB_FLAG
638TCL_STUB_LIB_FILE
639TCL_LIB_SPEC
640TCL_LIB_FLAG
641TCL_LIB_FILE
642TCL_SRC_DIR
643TCL_BIN_DIR
644TCL_PATCH_LEVEL
645TCL_VERSION
646WIN32LDAPP
647GUI_CFLAGS_X
648LIBGUI
608e2dbb
TT
649LTLIBLZMA
650LIBLZMA
651HAVE_LIBLZMA
81ecdfbb
RW
652WIN32LIBS
653SER_HARDWIRE
654WERROR_CFLAGS
655WARN_CFLAGS
656SYSTEM_GDBINIT
81ecdfbb
RW
657TARGET_SYSTEM_ROOT
658CONFIG_LDFLAGS
f6528abd 659RDYNAMIC
81ecdfbb 660ALLOCA
4df42755
DE
661HAVE_GUILE_FALSE
662HAVE_GUILE_TRUE
ed3ef339
DE
663GUILE_LIBS
664GUILE_CPPFLAGS
e76c5d17
DE
665GUILD_TARGET_FLAG
666GUILD
ed3ef339 667pkg_config_prog_path
4df42755
DE
668HAVE_PYTHON_FALSE
669HAVE_PYTHON_TRUE
ac534cba
JB
670PYTHON_LIBS
671PYTHON_CPPFLAGS
81ecdfbb 672PYTHON_CFLAGS
ec685c5e 673python_prog_path
81ecdfbb
RW
674LTLIBEXPAT
675LIBEXPAT
676HAVE_LIBEXPAT
b8e0a31c 677JIT_READER_DIR
f997c383 678TARGET_PTR
39037522 679READLINE_TEXI_INCFLAG
81ecdfbb
RW
680READLINE_CFLAGS
681READLINE_DEPS
682READLINE
683MIG
684WINDRES
685DLLTOOL
c971b7fa 686AR
81ecdfbb
RW
687YFLAGS
688YACC
c971b7fa 689RANLIB
81ecdfbb 690LN_S
c971b7fa
PA
691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
694AWK
81ecdfbb
RW
695REPORT_BUGS_TEXI
696REPORT_BUGS_TO
697PKGVERSION
b292c783 698HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
699TARGET_OBS
700subdirs
701GDB_DATADIR
702DEBUGDIR
5048e516
JK
703MAKEINFO_EXTRA_FLAGS
704MAKEINFOFLAGS
705MAKEINFO
81ecdfbb
RW
706PACKAGE
707GNULIB_STDINT_H
81ecdfbb
RW
708CATOBJEXT
709GENCAT
710INSTOBJEXT
711DATADIRNAME
712CATALOGS
713POSUB
714GMSGFMT
715XGETTEXT
716INCINTL
717LIBINTL_DEP
718LIBINTL
719USE_NLS
720SET_MAKE
721GMAKE_FALSE
722GMAKE_TRUE
723MAKE
724CCDEPMODE
725DEPDIR
726am__leading_dot
4869db5e
RM
727INSTALL_STRIP_PROGRAM
728STRIP
729install_sh
81ecdfbb
RW
730target_os
731target_vendor
732target_cpu
733target
734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
c971b7fa
PA
742EGREP
743GREP
744CPP
81ecdfbb
RW
745OBJEXT
746EXEEXT
747ac_ct_CC
748CPPFLAGS
749LDFLAGS
750CFLAGS
751CC
752MAINT
753MAINTAINER_MODE_FALSE
754MAINTAINER_MODE_TRUE
755target_alias
756host_alias
757build_alias
758LIBS
759ECHO_T
760ECHO_N
761ECHO_C
762DEFS
763mandir
764localedir
765libdir
766psdir
767pdfdir
768dvidir
769htmldir
770infodir
771docdir
772oldincludedir
773includedir
774localstatedir
775sharedstatedir
776sysconfdir
777datadir
778datarootdir
779libexecdir
780sbindir
781bindir
782program_transform_name
783prefix
784exec_prefix
785PACKAGE_URL
786PACKAGE_BUGREPORT
787PACKAGE_STRING
788PACKAGE_VERSION
789PACKAGE_TARNAME
790PACKAGE_NAME
791PATH_SEPARATOR
792SHELL'
a4ce5b0d 793ac_subst_files='host_makefile_frag'
81ecdfbb
RW
794ac_user_opts='
795enable_option_checking
796enable_maintainer_mode
da2f07f1
JK
797enable_plugins
798enable_largefile
81ecdfbb
RW
799with_separate_debug_dir
800with_gdb_datadir
801with_relocated_sources
7349ff92 802with_auto_load_dir
bccbefd2 803with_auto_load_safe_path
81ecdfbb
RW
804enable_targets
805enable_64_bit_bfd
806enable_gdbcli
807enable_gdbmi
808enable_tui
809enable_gdbtk
05e7c244 810with_libunwind_ia64
81ecdfbb
RW
811with_curses
812enable_profiling
813with_pkgversion
814with_bugurl
b040ad30 815with_zlib
81ecdfbb 816with_libiconv_prefix
478aac75 817with_iconv_bin
81ecdfbb 818with_system_readline
b8e0a31c 819with_jit_reader_dir
81ecdfbb
RW
820with_expat
821with_gnu_ld
822enable_rpath
823with_libexpat_prefix
824with_python
ed3ef339 825with_guile
a8db4212 826enable_libmcheck
81ecdfbb
RW
827with_included_regex
828with_sysroot
829with_system_gdbinit
830enable_werror
831enable_build_warnings
832enable_gdb_build_warnings
608e2dbb
TT
833with_lzma
834with_liblzma_prefix
81ecdfbb
RW
835with_tcl
836with_tk
837with_x
838enable_sim
839enable_multi_ice
496c0e1b 840enable_gdbserver
393fd4c3
YQ
841with_babeltrace
842with_libbabeltrace_prefix
81ecdfbb
RW
843'
844 ac_precious_vars='build_alias
845host_alias
846target_alias
847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
852CPP
f06e05e0
JK
853MAKEINFO
854MAKEINFOFLAGS
81ecdfbb
RW
855YACC
856YFLAGS
857XMKMF'
5ae98d25 858ac_subdirs_all='testsuite
81ecdfbb
RW
859gdbtk
860multi-ice
861gdbserver'
c906108c
SS
862
863# Initialize some variables set by options.
bec39cab
AC
864ac_init_help=
865ac_init_version=false
81ecdfbb
RW
866ac_unrecognized_opts=
867ac_unrecognized_sep=
c906108c
SS
868# The variables have the same names as the options, with
869# dashes changed to underlines.
bec39cab 870cache_file=/dev/null
c906108c 871exec_prefix=NONE
c906108c 872no_create=
c906108c
SS
873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
878silent=
879site=
880srcdir=
c906108c
SS
881verbose=
882x_includes=NONE
883x_libraries=NONE
bec39cab
AC
884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 890# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
c906108c
SS
896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
c906108c
SS
899includedir='${prefix}/include'
900oldincludedir='/usr/include'
81ecdfbb
RW
901docdir='${datarootdir}/doc/${PACKAGE}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
c906108c 910
c906108c 911ac_prev=
81ecdfbb 912ac_dashdash=
c906108c
SS
913for ac_option
914do
c906108c
SS
915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
81ecdfbb 917 eval $ac_prev=\$ac_option
c906108c
SS
918 ac_prev=
919 continue
920 fi
921
81ecdfbb
RW
922 case $ac_option in
923 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *) ac_optarg=yes ;;
925 esac
c906108c
SS
926
927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
81ecdfbb
RW
929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
c906108c
SS
932
933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 936 bindir=$ac_optarg ;;
c906108c
SS
937
938 -build | --build | --buil | --bui | --bu)
bec39cab 939 ac_prev=build_alias ;;
c906108c 940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 941 build_alias=$ac_optarg ;;
c906108c
SS
942
943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
c906108c 952
81ecdfbb 953 -datadir | --datadir | --datadi | --datad)
c906108c 954 ac_prev=datadir ;;
81ecdfbb 955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 956 datadir=$ac_optarg ;;
c906108c 957
81ecdfbb
RW
958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
c906108c 965 -disable-* | --disable-*)
81ecdfbb 966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 967 # Reject names that are not valid shell variable names.
81ecdfbb
RW
968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969 as_fn_error "invalid feature name: $ac_useropt"
970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
c906108c
SS
990
991 -enable-* | --enable-*)
81ecdfbb 992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
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--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
b4e70030 1004 esac
81ecdfbb 1005 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1006
1007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
bec39cab 1014 exec_prefix=$ac_optarg ;;
c906108c
SS
1015
1016 -gas | --gas | --ga | --g)
1017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
1019
bec39cab
AC
1020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
c906108c
SS
1026
1027 -host | --host | --hos | --ho)
bec39cab 1028 ac_prev=host_alias ;;
c906108c 1029 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1030 host_alias=$ac_optarg ;;
c906108c 1031
81ecdfbb
RW
1032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
c906108c
SS
1038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1043 includedir=$ac_optarg ;;
c906108c
SS
1044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1048 infodir=$ac_optarg ;;
c906108c
SS
1049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1053 libdir=$ac_optarg ;;
c906108c
SS
1054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
bec39cab 1060 libexecdir=$ac_optarg ;;
c906108c 1061
81ecdfbb
RW
1062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
c906108c 1067 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1068 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1072 localstatedir=$ac_optarg ;;
c906108c
SS
1073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1077 mandir=$ac_optarg ;;
c906108c
SS
1078
1079 -nfp | --nfp | --nf)
1080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
1082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1084 | --no-cr | --no-c | -n)
c906108c
SS
1085 no_create=yes ;;
1086
1087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
1090
1091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1098 oldincludedir=$ac_optarg ;;
c906108c
SS
1099
1100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1103 prefix=$ac_optarg ;;
c906108c
SS
1104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1110 program_prefix=$ac_optarg ;;
c906108c
SS
1111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1117 program_suffix=$ac_optarg ;;
c906108c
SS
1118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1134 program_transform_name=$ac_optarg ;;
c906108c 1135
81ecdfbb
RW
1136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
c906108c
SS
1146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
1150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
bec39cab 1154 sbindir=$ac_optarg ;;
c906108c
SS
1155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
bec39cab 1165 sharedstatedir=$ac_optarg ;;
c906108c
SS
1166
1167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
bec39cab 1170 site=$ac_optarg ;;
3ace7edb 1171
c906108c
SS
1172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1175 srcdir=$ac_optarg ;;
c906108c
SS
1176
1177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1182 sysconfdir=$ac_optarg ;;
c906108c
SS
1183
1184 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1185 ac_prev=target_alias ;;
c906108c 1186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1187 target_alias=$ac_optarg ;;
c906108c
SS
1188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
bec39cab
AC
1192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
c906108c
SS
1194
1195 -with-* | --with-*)
81ecdfbb 1196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1197 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199 as_fn_error "invalid package name: $ac_useropt"
1200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
b4e70030 1208 esac
81ecdfbb 1209 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1210
1211 -without-* | --without-*)
81ecdfbb 1212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1213 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1215 as_fn_error "invalid package name: $ac_useropt"
1216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
c906108c
SS
1226
1227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
1230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1236 x_includes=$ac_optarg ;;
c906108c
SS
1237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1243 x_libraries=$ac_optarg ;;
c906108c 1244
81ecdfbb
RW
1245 -*) as_fn_error "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information."
c906108c
SS
1247 ;;
1248
bec39cab
AC
1249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
1254 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1255 esac
1256 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1257 export $ac_envvar ;;
1258
c906108c 1259 *)
bec39cab 1260 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1264 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1265 ;;
1266
1267 esac
1268done
1269
1270if test -n "$ac_prev"; then
bec39cab 1271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1272 as_fn_error "missing argument to $ac_option"
c906108c 1273fi
c906108c 1274
81ecdfbb
RW
1275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
1278 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1280 esac
81ecdfbb 1281fi
b4e70030 1282
81ecdfbb
RW
1283# Check all directory arguments for consistency.
1284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1287 libdir localedir mandir
b4e70030 1288do
81ecdfbb
RW
1289 eval ac_val=\$$ac_var
1290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
b4e70030 1297 case $ac_val in
81ecdfbb
RW
1298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1300 esac
81ecdfbb 1301 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1302done
1303
bec39cab
AC
1304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
1310
1311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
81ecdfbb 1315 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1316 If a cross compiler is detected then cross compile mode will be used." >&2
1317 elif test "x$build_alias" != "x$host_alias"; then
1318 cross_compiling=yes
1319 fi
1320fi
c906108c 1321
bec39cab
AC
1322ac_tool_prefix=
1323test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325test "$silent" = yes && exec 6>/dev/null
c906108c 1326
c906108c 1327
81ecdfbb
RW
1328ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329ac_ls_di=`ls -di .` &&
1330ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1331 as_fn_error "working directory cannot be determined"
1332test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1333 as_fn_error "pwd does not report name of working directory"
1334
1335
c906108c
SS
1336# Find the source files, if location was not specified.
1337if test -z "$srcdir"; then
1338 ac_srcdir_defaulted=yes
81ecdfbb
RW
1339 # Try the directory containing this script, then the parent directory.
1340 ac_confdir=`$as_dirname -- "$as_myself" ||
1341$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342 X"$as_myself" : 'X\(//\)[^/]' \| \
1343 X"$as_myself" : 'X\(//\)$' \| \
1344 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345$as_echo X"$as_myself" |
1346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)[^/].*/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\).*/{
1359 s//\1/
1360 q
1361 }
1362 s/.*/./; q'`
c906108c 1363 srcdir=$ac_confdir
81ecdfbb 1364 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1365 srcdir=..
1366 fi
1367else
1368 ac_srcdir_defaulted=no
1369fi
81ecdfbb
RW
1370if test ! -r "$srcdir/$ac_unique_file"; then
1371 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1372 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1373fi
1374ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375ac_abs_confdir=`(
1376 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1377 pwd)`
1378# When building in place, set srcdir=.
1379if test "$ac_abs_confdir" = "$ac_pwd"; then
1380 srcdir=.
1381fi
1382# Remove unnecessary trailing slashes from srcdir.
1383# Double slashes in file names in object file debugging info
1384# mess up M-x gdb in Emacs.
1385case $srcdir in
1386*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387esac
1388for ac_var in $ac_precious_vars; do
1389 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_env_${ac_var}_value=\$${ac_var}
1391 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393done
c906108c 1394
bec39cab
AC
1395#
1396# Report the --help message.
1397#
1398if test "$ac_init_help" = "long"; then
1399 # Omit some internal or obsolete options to make the list less imposing.
1400 # This message is too long to be a string in the A/UX 3.1 sh.
1401 cat <<_ACEOF
1402\`configure' configures this package to adapt to many kinds of systems.
1403
1404Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407VAR=VALUE. See below for descriptions of some of the useful variables.
1408
1409Defaults for the options are specified in brackets.
1410
1411Configuration:
1412 -h, --help display this help and exit
1413 --help=short display options specific to this package
1414 --help=recursive display the short help of all the included packages
1415 -V, --version display version information and exit
1416 -q, --quiet, --silent do not print \`checking...' messages
1417 --cache-file=FILE cache test results in FILE [disabled]
1418 -C, --config-cache alias for \`--cache-file=config.cache'
1419 -n, --no-create do not create output files
1420 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1421
bec39cab
AC
1422Installation directories:
1423 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1424 [$ac_default_prefix]
bec39cab 1425 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1426 [PREFIX]
bec39cab
AC
1427
1428By default, \`make install' will install all the files in
1429\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1430an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431for instance \`--prefix=\$HOME'.
1432
1433For better control, use the options below.
1434
1435Fine tuning of the installation directories:
81ecdfbb
RW
1436 --bindir=DIR user executables [EPREFIX/bin]
1437 --sbindir=DIR system admin executables [EPREFIX/sbin]
1438 --libexecdir=DIR program executables [EPREFIX/libexec]
1439 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1440 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1441 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1455_ACEOF
1456
1457 cat <<\_ACEOF
1458
9009e1ae
MR
1459Program names:
1460 --program-prefix=PREFIX prepend PREFIX to installed program names
1461 --program-suffix=SUFFIX append SUFFIX to installed program names
1462 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1463
bec39cab
AC
1464X features:
1465 --x-includes=DIR X include files are in DIR
1466 --x-libraries=DIR X library files are in DIR
1467
1468System types:
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1471 --target=TARGET configure for building compilers for TARGET [HOST]
1472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
1476
1477 cat <<\_ACEOF
1478
1479Optional Features:
81ecdfbb 1480 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1481 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1482 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1483 --enable-maintainer-mode enable make rules and dependencies not useful
1484 (and sometimes confusing) to the casual installer
2974be62 1485 --enable-plugins Enable support for plugins
da2f07f1 1486 --disable-largefile omit support for large files
a1220294
TT
1487 --enable-targets=TARGETS
1488 alternative target configurations
c0993dbe 1489 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1490 --disable-gdbcli disable command-line interface (CLI)
1491 --disable-gdbmi disable machine-interface (MI)
1492 --enable-tui enable full-screen terminal user interface (TUI)
1493 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1494 --enable-profiling enable profiling of GDB
3841debe 1495 --disable-rpath do not hardcode runtime library paths
17ef446e 1496 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1497 --enable-werror treat compile warnings as errors
32c1c914 1498 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1499 --enable-gdb-build-warnings
32c1c914 1500 enable GDB specific build-time compiler warnings if
a1220294 1501 gcc is used
32c1c914 1502 --enable-sim link gdb with simulator
bec39cab 1503 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1504 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1505 is auto)
bec39cab
AC
1506
1507Optional Packages:
1508 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1509 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1510 --with-separate-debug-dir=PATH
32c1c914 1511 look for global separate debug info in this path
62e4f60c 1512 [LIBDIR/debug]
b14b1491
TT
1513 --with-gdb-datadir=PATH look for global separate data files in this path
1514 [DATADIR/gdb]
29b0e8a2 1515 --with-relocated-sources=PATH
32c1c914 1516 automatically relocate this path for source files
7349ff92 1517 --with-auto-load-dir=PATH
aff139ff 1518 directories from which to load auto-loaded scripts
1564a261 1519 [$debugdir:$datadir/auto-load]
bccbefd2 1520 --with-auto-load-safe-path=PATH
aff139ff 1521 directories safe to hold auto-loaded files
7349ff92 1522 [--with-auto-load-dir]
bccbefd2
JK
1523 --without-auto-load-safe-path
1524 do not restrict auto-loaded files locations
05e7c244 1525 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1526 --with-curses use the curses library instead of the termcap
1527 library
c16158bc
JM
1528 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1529 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1530 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1531 --with-libiconv-prefix=DIR
1532 search for libiconv in DIR/include and DIR/lib
478aac75 1533 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1534 --with-system-readline use installed readline library
b8e0a31c
SD
1535 --with-jit-reader-dir=PATH
1536 directory to load the JIT readers from
5c39566f 1537 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1538 --with-gnu-ld assume the C compiler uses GNU ld default=no
1539 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1540 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1541 --with-python[=PYTHON] include python support
1542 (auto/yes/no/<python-program>)
ed3ef339
DE
1543 --with-guile[=GUILE] include guile support
1544 (auto/yes/no/<guile-version>/<pkg-config-program>)
a1220294
TT
1545 --without-included-regex
1546 don't use included regex; this is the default on
1547 systems with version 2 of the GNU C library (use
1548 with caution on other system)
81ecdfbb 1549 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1550 --with-system-gdbinit=PATH
32c1c914 1551 automatically load a system-wide gdbinit file
608e2dbb
TT
1552 --with-lzma support lzma compression (auto/yes/no)
1553 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1554 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1555 --with-tcl directory containing tcl configuration (tclConfig.sh)
1556 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1557 --with-x use the X Window System
393fd4c3
YQ
1558 --with-babeltrace include babeltrace support (auto/yes/no)
1559 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1560 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1561
1562Some influential environment variables:
1563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
81ecdfbb
RW
1567 LIBS libraries to pass to the linker, e.g. -l<library>
1568 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1569 you have headers in a nonstandard directory <include dir>
bec39cab 1570 CPP C preprocessor
f06e05e0
JK
1571 MAKEINFO Parent configure detects if it is of sufficient version.
1572 MAKEINFOFLAGS
1573 Parameters for MAKEINFO.
81ecdfbb
RW
1574 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1575 the first program found out of: `bison -y', `byacc', `yacc'.
1576 YFLAGS The list of arguments that will be passed by default to $YACC.
1577 This script will default YFLAGS to the empty string to avoid a
1578 default value of `-d' given by some make applications.
1579 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1580
1581Use these variables to override the choices made by `configure' or to help
1582it to find libraries and programs with nonstandard names/locations.
1583
81ecdfbb 1584Report bugs to the package provider.
bec39cab 1585_ACEOF
81ecdfbb 1586ac_status=$?
bec39cab
AC
1587fi
1588
1589if test "$ac_init_help" = "recursive"; then
1590 # If there are subdirs, report their specific --help.
bec39cab 1591 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1592 test -d "$ac_dir" ||
1593 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1594 continue
bec39cab
AC
1595 ac_builddir=.
1596
81ecdfbb
RW
1597case "$ac_dir" in
1598.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599*)
1600 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1601 # A ".." for each directory in $ac_dir_suffix.
1602 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1603 case $ac_top_builddir_sub in
1604 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1605 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1606 esac ;;
1607esac
1608ac_abs_top_builddir=$ac_pwd
1609ac_abs_builddir=$ac_pwd$ac_dir_suffix
1610# for backward compatibility:
1611ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1612
1613case $srcdir in
81ecdfbb 1614 .) # We are building in place.
bec39cab 1615 ac_srcdir=.
81ecdfbb
RW
1616 ac_top_srcdir=$ac_top_builddir_sub
1617 ac_abs_top_srcdir=$ac_pwd ;;
1618 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1619 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1620 ac_top_srcdir=$srcdir
1621 ac_abs_top_srcdir=$srcdir ;;
1622 *) # Relative name.
1623 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1624 ac_top_srcdir=$ac_top_build_prefix$srcdir
1625 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1626esac
81ecdfbb 1627ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1628
81ecdfbb
RW
1629 cd "$ac_dir" || { ac_status=$?; continue; }
1630 # Check for guested configure.
1631 if test -f "$ac_srcdir/configure.gnu"; then
1632 echo &&
1633 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1634 elif test -f "$ac_srcdir/configure"; then
1635 echo &&
1636 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1637 else
81ecdfbb
RW
1638 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1639 fi || ac_status=$?
1640 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1641 done
1642fi
1643
81ecdfbb 1644test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1645if $ac_init_version; then
1646 cat <<\_ACEOF
81ecdfbb
RW
1647configure
1648generated by GNU Autoconf 2.64
bec39cab 1649
81ecdfbb 1650Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1651This configure script is free software; the Free Software Foundation
1652gives unlimited permission to copy, distribute and modify it.
1653_ACEOF
81ecdfbb 1654 exit
bec39cab 1655fi
bec39cab 1656
81ecdfbb
RW
1657## ------------------------ ##
1658## Autoconf initialization. ##
1659## ------------------------ ##
bec39cab 1660
81ecdfbb
RW
1661# ac_fn_c_try_compile LINENO
1662# --------------------------
1663# Try to compile conftest.$ac_ext, and return whether this succeeded.
1664ac_fn_c_try_compile ()
1665{
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 rm -f conftest.$ac_objext
1668 if { { ac_try="$ac_compile"
1669case "(($ac_try" in
1670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1671 *) ac_try_echo=$ac_try;;
1672esac
1673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1674$as_echo "$ac_try_echo"; } >&5
1675 (eval "$ac_compile") 2>conftest.err
1676 ac_status=$?
1677 if test -s conftest.err; then
1678 grep -v '^ *+' conftest.err >conftest.er1
1679 cat conftest.er1 >&5
1680 mv -f conftest.er1 conftest.err
1681 fi
1682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1683 test $ac_status = 0; } && {
1684 test -z "$ac_c_werror_flag" ||
1685 test ! -s conftest.err
1686 } && test -s conftest.$ac_objext; then :
1687 ac_retval=0
1688else
1689 $as_echo "$as_me: failed program was:" >&5
1690sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1691
81ecdfbb
RW
1692 ac_retval=1
1693fi
1694 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1695 return $ac_retval
1696
1697} # ac_fn_c_try_compile
1698
1699# ac_fn_c_try_cpp LINENO
1700# ----------------------
1701# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1702ac_fn_c_try_cpp ()
bec39cab 1703{
81ecdfbb
RW
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1705 if { { ac_try="$ac_cpp conftest.$ac_ext"
1706case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709esac
1710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711$as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1713 ac_status=$?
1714 if test -s conftest.err; then
1715 grep -v '^ *+' conftest.err >conftest.er1
1716 cat conftest.er1 >&5
1717 mv -f conftest.er1 conftest.err
1718 fi
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } >/dev/null && {
1721 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1722 test ! -s conftest.err
1723 }; then :
1724 ac_retval=0
1725else
1726 $as_echo "$as_me: failed program was:" >&5
1727sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1728
81ecdfbb
RW
1729 ac_retval=1
1730fi
1731 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1732 return $ac_retval
bec39cab 1733
81ecdfbb 1734} # ac_fn_c_try_cpp
bec39cab 1735
81ecdfbb
RW
1736# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1737# -------------------------------------------------------
1738# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1739# the include files in INCLUDES and setting the cache variable VAR
1740# accordingly.
1741ac_fn_c_check_header_mongrel ()
1742{
1743 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1746$as_echo_n "checking for $2... " >&6; }
1747if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1748 $as_echo_n "(cached) " >&6
1749fi
1750eval ac_res=\$$3
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752$as_echo "$ac_res" >&6; }
1753else
1754 # Is the header compilable?
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1756$as_echo_n "checking $2 usability... " >&6; }
1757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h. */
1759$4
1760#include <$2>
1761_ACEOF
1762if ac_fn_c_try_compile "$LINENO"; then :
1763 ac_header_compiler=yes
1764else
1765 ac_header_compiler=no
1766fi
1767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1769$as_echo "$ac_header_compiler" >&6; }
bec39cab 1770
81ecdfbb
RW
1771# Is the header present?
1772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1773$as_echo_n "checking $2 presence... " >&6; }
1774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775/* end confdefs.h. */
1776#include <$2>
1777_ACEOF
1778if ac_fn_c_try_cpp "$LINENO"; then :
1779 ac_header_preproc=yes
1780else
1781 ac_header_preproc=no
1782fi
1783rm -f conftest.err conftest.$ac_ext
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1785$as_echo "$ac_header_preproc" >&6; }
bec39cab 1786
81ecdfbb
RW
1787# So? What about this header?
1788case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1789 yes:no: )
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1791$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1793$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1794 ;;
1795 no:yes:* )
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1797$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1799$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1801$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1803$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1805$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1806 ;;
1807esac
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809$as_echo_n "checking for $2... " >&6; }
1810if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1811 $as_echo_n "(cached) " >&6
1812else
1813 eval "$3=\$ac_header_compiler"
1814fi
1815eval ac_res=\$$3
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1817$as_echo "$ac_res" >&6; }
1818fi
1819 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1820
81ecdfbb 1821} # ac_fn_c_check_header_mongrel
bec39cab 1822
81ecdfbb
RW
1823# ac_fn_c_try_run LINENO
1824# ----------------------
1825# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1826# that executables *can* be run.
1827ac_fn_c_try_run ()
1828{
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 if { { ac_try="$ac_link"
1831case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_link") 2>&5
1838 ac_status=$?
1839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1841 { { case "(($ac_try" in
1842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1843 *) ac_try_echo=$ac_try;;
1844esac
1845eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1846$as_echo "$ac_try_echo"; } >&5
1847 (eval "$ac_try") 2>&5
1848 ac_status=$?
1849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850 test $ac_status = 0; }; }; then :
1851 ac_retval=0
1852else
1853 $as_echo "$as_me: program exited with status $ac_status" >&5
1854 $as_echo "$as_me: failed program was:" >&5
1855sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1856
81ecdfbb
RW
1857 ac_retval=$ac_status
1858fi
1859 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1860 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861 return $ac_retval
bec39cab 1862
81ecdfbb 1863} # ac_fn_c_try_run
bec39cab 1864
81ecdfbb
RW
1865# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1866# -------------------------------------------------------
1867# Tests whether HEADER exists and can be compiled using the include files in
1868# INCLUDES, setting the cache variable VAR accordingly.
1869ac_fn_c_check_header_compile ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
1874if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1875 $as_echo_n "(cached) " >&6
1876else
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$4
1880#include <$2>
bec39cab 1881_ACEOF
81ecdfbb
RW
1882if ac_fn_c_try_compile "$LINENO"; then :
1883 eval "$3=yes"
1884else
1885 eval "$3=no"
1886fi
1887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1888fi
1889eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891$as_echo "$ac_res" >&6; }
1892 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1893
81ecdfbb 1894} # ac_fn_c_check_header_compile
bec39cab 1895
2974be62
AM
1896# ac_fn_c_try_link LINENO
1897# -----------------------
1898# Try to link conftest.$ac_ext, and return whether this succeeded.
1899ac_fn_c_try_link ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 rm -f conftest.$ac_objext conftest$ac_exeext
1903 if { { ac_try="$ac_link"
1904case "(($ac_try" in
1905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1906 *) ac_try_echo=$ac_try;;
1907esac
1908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1909$as_echo "$ac_try_echo"; } >&5
1910 (eval "$ac_link") 2>conftest.err
1911 ac_status=$?
1912 if test -s conftest.err; then
1913 grep -v '^ *+' conftest.err >conftest.er1
1914 cat conftest.er1 >&5
1915 mv -f conftest.er1 conftest.err
1916 fi
1917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1918 test $ac_status = 0; } && {
1919 test -z "$ac_c_werror_flag" ||
1920 test ! -s conftest.err
1921 } && test -s conftest$ac_exeext && {
1922 test "$cross_compiling" = yes ||
1923 $as_test_x conftest$ac_exeext
1924 }; then :
1925 ac_retval=0
1926else
1927 $as_echo "$as_me: failed program was:" >&5
1928sed 's/^/| /' conftest.$ac_ext >&5
1929
1930 ac_retval=1
1931fi
1932 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1933 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1934 # interfere with the next link command; also delete a directory that is
1935 # left behind by Apple's compiler. We do this before executing the actions.
1936 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1937 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1938 return $ac_retval
1939
1940} # ac_fn_c_try_link
1941
81ecdfbb
RW
1942# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1943# --------------------------------------------
1944# Tries to find the compile-time value of EXPR in a program that includes
1945# INCLUDES, setting VAR accordingly. Returns whether the value could be
1946# computed
1947ac_fn_c_compute_int ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 if test "$cross_compiling" = yes; then
1951 # Depending upon the size, compute the lo and hi bounds.
1952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
1956main ()
1957{
1958static int test_array [1 - 2 * !(($2) >= 0)];
1959test_array [0] = 0
bec39cab 1960
81ecdfbb
RW
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 ac_lo=0 ac_mid=0
1967 while :; do
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$4
1971int
1972main ()
1973{
1974static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1975test_array [0] = 0
bec39cab 1976
81ecdfbb
RW
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982 ac_hi=$ac_mid; break
1983else
1984 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1985 if test $ac_lo -le $ac_mid; then
1986 ac_lo= ac_hi=
1987 break
1988 fi
1989 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1990fi
81ecdfbb
RW
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992 done
c906108c 1993else
81ecdfbb
RW
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !(($2) < 0)];
2001test_array [0] = 0
bec39cab 2002
81ecdfbb
RW
2003 ;
2004 return 0;
2005}
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 ac_hi=-1 ac_mid=-1
2009 while :; do
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2017test_array [0] = 0
bec39cab 2018
81ecdfbb
RW
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_lo=$ac_mid; break
2025else
2026 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2027 if test $ac_mid -le $ac_hi; then
2028 ac_lo= ac_hi=
2029 break
2030 fi
2031 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 done
2035else
2036 ac_lo= ac_hi=
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039fi
2040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041# Binary search between lo and hi bounds.
2042while test "x$ac_lo" != "x$ac_hi"; do
2043 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045/* end confdefs.h. */
2046$4
2047int
2048main ()
2049{
2050static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2051test_array [0] = 0
bec39cab 2052
81ecdfbb
RW
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=$ac_mid
2059else
2060 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2061fi
2062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2063done
2064case $ac_lo in #((
2065?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2066'') ac_retval=1 ;;
2067esac
2068 else
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072static long int longval () { return $2; }
2073static unsigned long int ulongval () { return $2; }
2074#include <stdio.h>
2075#include <stdlib.h>
2076int
2077main ()
2078{
bec39cab 2079
81ecdfbb
RW
2080 FILE *f = fopen ("conftest.val", "w");
2081 if (! f)
2082 return 1;
2083 if (($2) < 0)
2084 {
2085 long int i = longval ();
2086 if (i != ($2))
2087 return 1;
2088 fprintf (f, "%ld", i);
2089 }
2090 else
2091 {
2092 unsigned long int i = ulongval ();
2093 if (i != ($2))
2094 return 1;
2095 fprintf (f, "%lu", i);
2096 }
2097 /* Do not output a trailing newline, as this causes \r\n confusion
2098 on some platforms. */
2099 return ferror (f) || fclose (f) != 0;
bec39cab 2100
81ecdfbb
RW
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_run "$LINENO"; then :
2106 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2107else
2108 ac_retval=1
2109fi
2110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2111 conftest.$ac_objext conftest.beam conftest.$ac_ext
2112rm -f conftest.val
bec39cab 2113
81ecdfbb
RW
2114 fi
2115 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2116 return $ac_retval
bec39cab 2117
81ecdfbb 2118} # ac_fn_c_compute_int
bec39cab 2119
55a8c076
YQ
2120# ac_fn_c_check_func LINENO FUNC VAR
2121# ----------------------------------
2122# Tests whether FUNC exists, setting the cache variable VAR accordingly
2123ac_fn_c_check_func ()
81ecdfbb
RW
2124{
2125 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2127$as_echo_n "checking for $2... " >&6; }
2128if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2129 $as_echo_n "(cached) " >&6
2130else
81ecdfbb
RW
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
55a8c076
YQ
2133/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2134 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2135#define $2 innocuous_$2
2136
2137/* System header to define __stub macros and hopefully few prototypes,
2138 which can conflict with char $2 (); below.
2139 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2140 <limits.h> exists even on freestanding compilers. */
2141
2142#ifdef __STDC__
2143# include <limits.h>
2144#else
2145# include <assert.h>
2146#endif
2147
2148#undef $2
2149
2150/* Override any GCC internal prototype to avoid an error.
2151 Use char because int might match the return type of a GCC
2152 builtin and then its argument prototype would still apply. */
2153#ifdef __cplusplus
2154extern "C"
2155#endif
2156char $2 ();
2157/* The GNU C library defines this for functions which it implements
2158 to always fail with ENOSYS. Some functions are actually named
2159 something starting with __ and the normal name is an alias. */
2160#if defined __stub_$2 || defined __stub___$2
2161choke me
2162#endif
2163
2164int
2165main ()
2166{
2167return $2 ();
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_link "$LINENO"; then :
2173 eval "$3=yes"
2174else
2175 eval "$3=no"
2176fi
2177rm -f core conftest.err conftest.$ac_objext \
2178 conftest$ac_exeext conftest.$ac_ext
2179fi
2180eval ac_res=\$$3
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2182$as_echo "$ac_res" >&6; }
2183 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2184
2185} # ac_fn_c_check_func
2186
07697489
PA
2187# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2188# -------------------------------------------
2189# Tests whether TYPE exists after having included INCLUDES, setting cache
2190# variable VAR accordingly.
2191ac_fn_c_check_type ()
2192{
2193 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2195$as_echo_n "checking for $2... " >&6; }
2196if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2197 $as_echo_n "(cached) " >&6
2198else
2199 eval "$3=no"
2200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201/* end confdefs.h. */
2202$4
2203int
2204main ()
2205{
2206if (sizeof ($2))
2207 return 0;
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_compile "$LINENO"; then :
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215$4
2216int
2217main ()
2218{
2219if (sizeof (($2)))
2220 return 0;
2221 ;
2222 return 0;
2223}
2224_ACEOF
2225if ac_fn_c_try_compile "$LINENO"; then :
2226
2227else
2228 eval "$3=yes"
2229fi
2230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2231fi
2232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233fi
2234eval ac_res=\$$3
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2236$as_echo "$ac_res" >&6; }
2237 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2238
2239} # ac_fn_c_check_type
2240
770d76d7
PA
2241# ac_fn_c_check_decl LINENO SYMBOL VAR
2242# ------------------------------------
2243# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2244ac_fn_c_check_decl ()
2245{
2246 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247 as_decl_name=`echo $2|sed 's/ *(.*//'`
2248 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2250$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2251if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2252 $as_echo_n "(cached) " >&6
2253else
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h. */
2256$4
2257int
2258main ()
2259{
2260#ifndef $as_decl_name
2261#ifdef __cplusplus
2262 (void) $as_decl_use;
2263#else
2264 (void) $as_decl_name;
2265#endif
2266#endif
2267
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$3=yes"
2274else
2275 eval "$3=no"
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278fi
2279eval ac_res=\$$3
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2281$as_echo "$ac_res" >&6; }
2282 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2283
2284} # ac_fn_c_check_decl
2285
55a8c076
YQ
2286# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2287# ----------------------------------------------------
2288# Tries to find if the field MEMBER exists in type AGGR, after including
2289# INCLUDES, setting cache variable VAR accordingly.
2290ac_fn_c_check_member ()
2291{
2292 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2294$as_echo_n "checking for $2.$3... " >&6; }
2295if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2296 $as_echo_n "(cached) " >&6
2297else
2298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h. */
2300$5
2301int
2302main ()
2303{
2304static $2 ac_aggr;
2305if (ac_aggr.$3)
2306return 0;
2307 ;
2308 return 0;
2309}
2310_ACEOF
2311if ac_fn_c_try_compile "$LINENO"; then :
2312 eval "$4=yes"
2313else
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h. */
2316$5
2317int
2318main ()
2319{
2320static $2 ac_aggr;
2321if (sizeof ac_aggr.$3)
2322return 0;
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$4=yes"
2329else
2330 eval "$4=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335fi
2336eval ac_res=\$$4
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338$as_echo "$ac_res" >&6; }
2339 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2340
2341} # ac_fn_c_check_member
81ecdfbb
RW
2342cat >config.log <<_ACEOF
2343This file contains any messages produced by compilers while
2344running configure, to aid debugging if configure makes a mistake.
d5af19ba 2345
81ecdfbb
RW
2346It was created by $as_me, which was
2347generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2348
81ecdfbb 2349 $ $0 $@
413ccac7 2350
81ecdfbb
RW
2351_ACEOF
2352exec 5>>config.log
2353{
2354cat <<_ASUNAME
2355## --------- ##
2356## Platform. ##
2357## --------- ##
413ccac7 2358
81ecdfbb
RW
2359hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2360uname -m = `(uname -m) 2>/dev/null || echo unknown`
2361uname -r = `(uname -r) 2>/dev/null || echo unknown`
2362uname -s = `(uname -s) 2>/dev/null || echo unknown`
2363uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2364
81ecdfbb
RW
2365/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2366/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2367
81ecdfbb
RW
2368/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2369/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2370/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2371/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2372/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2373/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2374/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2375
81ecdfbb 2376_ASUNAME
bec39cab 2377
bec39cab
AC
2378as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2379for as_dir in $PATH
2380do
2381 IFS=$as_save_IFS
2382 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2383 $as_echo "PATH: $as_dir"
2384 done
2385IFS=$as_save_IFS
bec39cab 2386
81ecdfbb 2387} >&5
bec39cab 2388
81ecdfbb 2389cat >&5 <<_ACEOF
bec39cab 2390
bec39cab 2391
81ecdfbb
RW
2392## ----------- ##
2393## Core tests. ##
2394## ----------- ##
2395
2396_ACEOF
2397
2398
2399# Keep a trace of the command line.
2400# Strip out --no-create and --no-recursion so they do not pile up.
2401# Strip out --silent because we don't want to record it for future runs.
2402# Also quote any args containing shell meta-characters.
2403# Make two passes to allow for proper duplicate-argument suppression.
2404ac_configure_args=
2405ac_configure_args0=
2406ac_configure_args1=
2407ac_must_keep_next=false
2408for ac_pass in 1 2
2409do
2410 for ac_arg
2411 do
2412 case $ac_arg in
2413 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2414 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2415 | -silent | --silent | --silen | --sile | --sil)
2416 continue ;;
2417 *\'*)
2418 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2419 esac
2420 case $ac_pass in
2421 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2422 2)
2423 as_fn_append ac_configure_args1 " '$ac_arg'"
2424 if test $ac_must_keep_next = true; then
2425 ac_must_keep_next=false # Got value, back to normal.
2426 else
2427 case $ac_arg in
2428 *=* | --config-cache | -C | -disable-* | --disable-* \
2429 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2430 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2431 | -with-* | --with-* | -without-* | --without-* | --x)
2432 case "$ac_configure_args0 " in
2433 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2434 esac
2435 ;;
2436 -* ) ac_must_keep_next=true ;;
2437 esac
2438 fi
2439 as_fn_append ac_configure_args " '$ac_arg'"
2440 ;;
2441 esac
2442 done
2443done
2444{ ac_configure_args0=; unset ac_configure_args0;}
2445{ ac_configure_args1=; unset ac_configure_args1;}
2446
2447# When interrupted or exit'd, cleanup temporary files, and complete
2448# config.log. We remove comments because anyway the quotes in there
2449# would cause problems or look ugly.
2450# WARNING: Use '\'' to represent an apostrophe within the trap.
2451# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2452trap 'exit_status=$?
2453 # Save into config.log some information that might help in debugging.
2454 {
2455 echo
2456
2457 cat <<\_ASBOX
2458## ---------------- ##
2459## Cache variables. ##
2460## ---------------- ##
2461_ASBOX
2462 echo
2463 # The following way of writing the cache mishandles newlines in values,
2464(
2465 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2466 eval ac_val=\$$ac_var
2467 case $ac_val in #(
2468 *${as_nl}*)
2469 case $ac_var in #(
2470 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2471$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2472 esac
2473 case $ac_var in #(
2474 _ | IFS | as_nl) ;; #(
2475 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2476 *) { eval $ac_var=; unset $ac_var;} ;;
2477 esac ;;
2478 esac
2479 done
2480 (set) 2>&1 |
2481 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2482 *${as_nl}ac_space=\ *)
2483 sed -n \
2484 "s/'\''/'\''\\\\'\'''\''/g;
2485 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2486 ;; #(
2487 *)
2488 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2489 ;;
2490 esac |
2491 sort
2492)
2493 echo
2494
2495 cat <<\_ASBOX
2496## ----------------- ##
2497## Output variables. ##
2498## ----------------- ##
2499_ASBOX
2500 echo
2501 for ac_var in $ac_subst_vars
2502 do
2503 eval ac_val=\$$ac_var
2504 case $ac_val in
2505 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2506 esac
2507 $as_echo "$ac_var='\''$ac_val'\''"
2508 done | sort
2509 echo
2510
2511 if test -n "$ac_subst_files"; then
2512 cat <<\_ASBOX
2513## ------------------- ##
2514## File substitutions. ##
2515## ------------------- ##
2516_ASBOX
2517 echo
2518 for ac_var in $ac_subst_files
2519 do
2520 eval ac_val=\$$ac_var
2521 case $ac_val in
2522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2523 esac
2524 $as_echo "$ac_var='\''$ac_val'\''"
2525 done | sort
2526 echo
2527 fi
2528
2529 if test -s confdefs.h; then
2530 cat <<\_ASBOX
2531## ----------- ##
2532## confdefs.h. ##
2533## ----------- ##
2534_ASBOX
2535 echo
2536 cat confdefs.h
2537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
2540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
2542 } >&5
2543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2545 exit $exit_status
2546' 0
2547for ac_signal in 1 2 13 15; do
2548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
2553rm -f -r conftest* confdefs.h
2554
2555$as_echo "/* confdefs.h */" > confdefs.h
2556
2557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
2563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
2567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
2571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
2575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
2579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
2583
2584# Let the site file select an alternate cache file if it wants to.
2585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
2588if test -n "$CONFIG_SITE"; then
2589 ac_site_file1=$CONFIG_SITE
2590elif test "x$prefix" != xNONE; then
2591 ac_site_file1=$prefix/share/config.site
2592 ac_site_file2=$prefix/etc/config.site
2593else
2594 ac_site_file1=$ac_default_prefix/share/config.site
2595 ac_site_file2=$ac_default_prefix/etc/config.site
2596fi
2597for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2598do
2599 test "x$ac_site_file" = xNONE && continue
2600 if test -r "$ac_site_file"; then
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2602$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2603 sed 's/^/| /' "$ac_site_file" >&5
2604 . "$ac_site_file"
2605 fi
2606done
2607
2608if test -r "$cache_file"; then
2609 # Some versions of bash will fail to source /dev/null (special
2610 # files actually), so we avoid doing that.
2611 if test -f "$cache_file"; then
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613$as_echo "$as_me: loading cache $cache_file" >&6;}
2614 case $cache_file in
2615 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616 *) . "./$cache_file";;
2617 esac
2618 fi
2619else
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621$as_echo "$as_me: creating cache $cache_file" >&6;}
2622 >$cache_file
bec39cab
AC
2623fi
2624
81ecdfbb
RW
2625# Check that the precious variables saved in the cache have kept the same
2626# value.
2627ac_cache_corrupted=false
2628for ac_var in $ac_precious_vars; do
2629 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630 eval ac_new_set=\$ac_env_${ac_var}_set
2631 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632 eval ac_new_val=\$ac_env_${ac_var}_value
2633 case $ac_old_set,$ac_new_set in
2634 set,)
2635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2637 ac_cache_corrupted=: ;;
2638 ,set)
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2641 ac_cache_corrupted=: ;;
2642 ,);;
2643 *)
2644 if test "x$ac_old_val" != "x$ac_new_val"; then
2645 # differences in whitespace do not lead to failure.
2646 ac_old_val_w=`echo x $ac_old_val`
2647 ac_new_val_w=`echo x $ac_new_val`
2648 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651 ac_cache_corrupted=:
2652 else
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655 eval $ac_var=\$ac_old_val
2656 fi
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2658$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2660$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2661 fi;;
2662 esac
2663 # Pass precious variables to config.status.
2664 if test "$ac_new_set" = set; then
2665 case $ac_new_val in
2666 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2667 *) ac_arg=$ac_var=$ac_new_val ;;
2668 esac
2669 case " $ac_configure_args " in
2670 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2671 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2672 esac
2673 fi
2674done
2675if $ac_cache_corrupted; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2680 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2681fi
2682## -------------------- ##
2683## Main body of script. ##
2684## -------------------- ##
2685
2686ac_ext=c
2687ac_cpp='$CPP $CPPFLAGS'
2688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690ac_compiler_gnu=$ac_cv_c_compiler_gnu
2691
2692
2693
2694
2695
2696ac_config_headers="$ac_config_headers config.h:config.in"
2697
2698
2699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2700$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2701 # Check whether --enable-maintainer-mode was given.
2702if test "${enable_maintainer_mode+set}" = set; then :
2703 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2704else
2705 USE_MAINTAINER_MODE=no
2706fi
2707
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2709$as_echo "$USE_MAINTAINER_MODE" >&6; }
2710 if test $USE_MAINTAINER_MODE = yes; then
2711 MAINTAINER_MODE_TRUE=
2712 MAINTAINER_MODE_FALSE='#'
2713else
2714 MAINTAINER_MODE_TRUE='#'
2715 MAINTAINER_MODE_FALSE=
2716fi
2717
2718 MAINT=$MAINTAINER_MODE_TRUE
2719
2720
2721
17ef446e 2722# Set the 'development' global.
270c9937 2723. $srcdir/../bfd/development.sh
f5f1cdb6 2724
81ecdfbb
RW
2725ac_ext=c
2726ac_cpp='$CPP $CPPFLAGS'
2727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2729ac_compiler_gnu=$ac_cv_c_compiler_gnu
2730if test -n "$ac_tool_prefix"; then
2731 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2732set dummy ${ac_tool_prefix}gcc; ac_word=$2
2733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2734$as_echo_n "checking for $ac_word... " >&6; }
2735if test "${ac_cv_prog_CC+set}" = set; then :
2736 $as_echo_n "(cached) " >&6
c906108c
SS
2737else
2738 if test -n "$CC"; then
2739 ac_cv_prog_CC="$CC" # Let the user override the test.
2740else
bec39cab
AC
2741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2742for as_dir in $PATH
2743do
2744 IFS=$as_save_IFS
2745 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2746 for ac_exec_ext in '' $ac_executable_extensions; do
2747 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2748 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2750 break 2
2751 fi
2752done
81ecdfbb
RW
2753 done
2754IFS=$as_save_IFS
bec39cab 2755
c906108c
SS
2756fi
2757fi
bec39cab 2758CC=$ac_cv_prog_CC
c906108c 2759if test -n "$CC"; then
81ecdfbb
RW
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2761$as_echo "$CC" >&6; }
c906108c 2762else
81ecdfbb
RW
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2764$as_echo "no" >&6; }
c906108c
SS
2765fi
2766
81ecdfbb 2767
b4e70030
JB
2768fi
2769if test -z "$ac_cv_prog_CC"; then
2770 ac_ct_CC=$CC
81ecdfbb
RW
2771 # Extract the first word of "gcc", so it can be a program name with args.
2772set dummy gcc; ac_word=$2
2773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774$as_echo_n "checking for $ac_word... " >&6; }
2775if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2776 $as_echo_n "(cached) " >&6
b4e70030
JB
2777else
2778 if test -n "$ac_ct_CC"; then
2779 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2780else
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2786 for ac_exec_ext in '' $ac_executable_extensions; do
2787 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2788 ac_cv_prog_ac_ct_CC="gcc"
2789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2790 break 2
4e8d927d 2791 fi
b4e70030 2792done
81ecdfbb
RW
2793 done
2794IFS=$as_save_IFS
b4e70030
JB
2795
2796fi
2797fi
2798ac_ct_CC=$ac_cv_prog_ac_ct_CC
2799if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2801$as_echo "$ac_ct_CC" >&6; }
b4e70030 2802else
81ecdfbb
RW
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2804$as_echo "no" >&6; }
b4e70030
JB
2805fi
2806
81ecdfbb
RW
2807 if test "x$ac_ct_CC" = x; then
2808 CC=""
2809 else
2810 case $cross_compiling:$ac_tool_warned in
2811yes:)
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2814ac_tool_warned=yes ;;
2815esac
2816 CC=$ac_ct_CC
2817 fi
b4e70030
JB
2818else
2819 CC="$ac_cv_prog_CC"
2820fi
2821
c906108c 2822if test -z "$CC"; then
81ecdfbb
RW
2823 if test -n "$ac_tool_prefix"; then
2824 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2825set dummy ${ac_tool_prefix}cc; ac_word=$2
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2827$as_echo_n "checking for $ac_word... " >&6; }
2828if test "${ac_cv_prog_CC+set}" = set; then :
2829 $as_echo_n "(cached) " >&6
c906108c
SS
2830else
2831 if test -n "$CC"; then
2832 ac_cv_prog_CC="$CC" # Let the user override the test.
2833else
bec39cab
AC
2834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2835for as_dir in $PATH
2836do
2837 IFS=$as_save_IFS
2838 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2839 for ac_exec_ext in '' $ac_executable_extensions; do
2840 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2841 ac_cv_prog_CC="${ac_tool_prefix}cc"
2842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2843 break 2
2844 fi
2845done
81ecdfbb
RW
2846 done
2847IFS=$as_save_IFS
2848
2849fi
2850fi
2851CC=$ac_cv_prog_CC
2852if test -n "$CC"; then
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2854$as_echo "$CC" >&6; }
2855else
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2857$as_echo "no" >&6; }
2858fi
2859
2860
2861 fi
2862fi
2863if test -z "$CC"; then
2864 # Extract the first word of "cc", so it can be a program name with args.
2865set dummy cc; ac_word=$2
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2867$as_echo_n "checking for $ac_word... " >&6; }
2868if test "${ac_cv_prog_CC+set}" = set; then :
2869 $as_echo_n "(cached) " >&6
2870else
2871 if test -n "$CC"; then
2872 ac_cv_prog_CC="$CC" # Let the user override the test.
2873else
2874 ac_prog_rejected=no
2875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2876for as_dir in $PATH
2877do
2878 IFS=$as_save_IFS
2879 test -z "$as_dir" && as_dir=.
2880 for ac_exec_ext in '' $ac_executable_extensions; do
2881 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2882 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2883 ac_prog_rejected=yes
2884 continue
2885 fi
2886 ac_cv_prog_CC="cc"
2887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2888 break 2
2889 fi
2890done
2891 done
2892IFS=$as_save_IFS
bec39cab 2893
c906108c
SS
2894if test $ac_prog_rejected = yes; then
2895 # We found a bogon in the path, so make sure we never use it.
2896 set dummy $ac_cv_prog_CC
2897 shift
bec39cab 2898 if test $# != 0; then
c906108c
SS
2899 # We chose a different compiler from the bogus one.
2900 # However, it has the same basename, so the bogon will be chosen
2901 # first if we set CC to just the basename; use the full file name.
2902 shift
bec39cab 2903 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2904 fi
2905fi
2906fi
2907fi
bec39cab 2908CC=$ac_cv_prog_CC
c906108c 2909if test -n "$CC"; then
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2911$as_echo "$CC" >&6; }
c906108c 2912else
81ecdfbb
RW
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
c906108c
SS
2915fi
2916
81ecdfbb 2917
bec39cab
AC
2918fi
2919if test -z "$CC"; then
2920 if test -n "$ac_tool_prefix"; then
81ecdfbb 2921 for ac_prog in cl.exe
bec39cab
AC
2922 do
2923 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2924set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2926$as_echo_n "checking for $ac_word... " >&6; }
2927if test "${ac_cv_prog_CC+set}" = set; then :
2928 $as_echo_n "(cached) " >&6
c906108c
SS
2929else
2930 if test -n "$CC"; then
2931 ac_cv_prog_CC="$CC" # Let the user override the test.
2932else
bec39cab
AC
2933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2934for as_dir in $PATH
2935do
2936 IFS=$as_save_IFS
2937 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2938 for ac_exec_ext in '' $ac_executable_extensions; do
2939 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2940 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2942 break 2
2943 fi
2944done
81ecdfbb
RW
2945 done
2946IFS=$as_save_IFS
bec39cab 2947
c906108c
SS
2948fi
2949fi
bec39cab 2950CC=$ac_cv_prog_CC
c906108c 2951if test -n "$CC"; then
81ecdfbb
RW
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2953$as_echo "$CC" >&6; }
c906108c 2954else
81ecdfbb
RW
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2956$as_echo "no" >&6; }
c906108c 2957fi
bec39cab 2958
81ecdfbb 2959
bec39cab
AC
2960 test -n "$CC" && break
2961 done
2962fi
2963if test -z "$CC"; then
2964 ac_ct_CC=$CC
81ecdfbb 2965 for ac_prog in cl.exe
bec39cab
AC
2966do
2967 # Extract the first word of "$ac_prog", so it can be a program name with args.
2968set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2970$as_echo_n "checking for $ac_word... " >&6; }
2971if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2972 $as_echo_n "(cached) " >&6
bec39cab
AC
2973else
2974 if test -n "$ac_ct_CC"; then
2975 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2976else
2977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2978for as_dir in $PATH
2979do
2980 IFS=$as_save_IFS
2981 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2982 for ac_exec_ext in '' $ac_executable_extensions; do
2983 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2984 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2986 break 2
c906108c 2987 fi
bec39cab 2988done
81ecdfbb
RW
2989 done
2990IFS=$as_save_IFS
bec39cab
AC
2991
2992fi
2993fi
2994ac_ct_CC=$ac_cv_prog_ac_ct_CC
2995if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2997$as_echo "$ac_ct_CC" >&6; }
bec39cab 2998else
81ecdfbb
RW
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3000$as_echo "no" >&6; }
c906108c
SS
3001fi
3002
81ecdfbb 3003
bec39cab
AC
3004 test -n "$ac_ct_CC" && break
3005done
c906108c 3006
81ecdfbb
RW
3007 if test "x$ac_ct_CC" = x; then
3008 CC=""
3009 else
3010 case $cross_compiling:$ac_tool_warned in
3011yes:)
3012{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3013$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3014ac_tool_warned=yes ;;
3015esac
3016 CC=$ac_ct_CC
3017 fi
bec39cab
AC
3018fi
3019
3020fi
3021
3022
81ecdfbb
RW
3023test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3025as_fn_error "no acceptable C compiler found in \$PATH
3026See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3027
3028# Provide some information about the compiler.
81ecdfbb
RW
3029$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3030set X $ac_compile
3031ac_compiler=$2
3032for ac_option in --version -v -V -qversion; do
3033 { { ac_try="$ac_compiler $ac_option >&5"
3034case "(($ac_try" in
3035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3036 *) ac_try_echo=$ac_try;;
3037esac
3038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3039$as_echo "$ac_try_echo"; } >&5
3040 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3041 ac_status=$?
81ecdfbb
RW
3042 if test -s conftest.err; then
3043 sed '10a\
3044... rest of stderr output deleted ...
3045 10q' conftest.err >conftest.er1
3046 cat conftest.er1 >&5
3047 rm -f conftest.er1 conftest.err
3048 fi
3049 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3050 test $ac_status = 0; }
3051done
bec39cab 3052
81ecdfbb 3053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3054/* end confdefs.h. */
3055
3056int
3057main ()
3058{
3059
3060 ;
3061 return 0;
3062}
3063_ACEOF
3064ac_clean_files_save=$ac_clean_files
81ecdfbb 3065ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3066# Try to create an executable without -o first, disregard a.out.
3067# It will help us diagnose broken compilers, and finding out an intuition
3068# of exeext.
81ecdfbb
RW
3069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3070$as_echo_n "checking for C compiler default output file name... " >&6; }
3071ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3072
3073# The possible output files:
3074ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3075
3076ac_rmfiles=
3077for ac_file in $ac_files
3078do
3079 case $ac_file in
3080 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3081 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3082 esac
3083done
3084rm -f $ac_rmfiles
3085
3086if { { ac_try="$ac_link_default"
3087case "(($ac_try" in
3088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3089 *) ac_try_echo=$ac_try;;
3090esac
3091eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3092$as_echo "$ac_try_echo"; } >&5
3093 (eval "$ac_link_default") 2>&5
3094 ac_status=$?
3095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3096 test $ac_status = 0; }; then :
3097 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3098# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3099# in a Makefile. We should not override ac_cv_exeext if it was cached,
3100# so that the user can short-circuit this test for compilers unknown to
3101# Autoconf.
3102for ac_file in $ac_files ''
bec39cab
AC
3103do
3104 test -f "$ac_file" || continue
3105 case $ac_file in
81ecdfbb 3106 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3107 ;;
3108 [ab].out )
3109 # We found the default executable, but exeext='' is most
3110 # certainly right.
3111 break;;
3112 *.* )
81ecdfbb
RW
3113 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3114 then :; else
3115 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3116 fi
3117 # We set ac_cv_exeext here because the later test for it is not
3118 # safe: cross compilers may not add the suffix if given an `-o'
3119 # argument, so we may need to know it at that point already.
3120 # Even if this section looks crufty: it has the advantage of
3121 # actually working.
b4e70030
JB
3122 break;;
3123 * )
3124 break;;
bec39cab
AC
3125 esac
3126done
81ecdfbb
RW
3127test "$ac_cv_exeext" = no && ac_cv_exeext=
3128
bec39cab 3129else
81ecdfbb
RW
3130 ac_file=''
3131fi
3132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3133$as_echo "$ac_file" >&6; }
3134if test -z "$ac_file"; then :
3135 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3136sed 's/^/| /' conftest.$ac_ext >&5
3137
81ecdfbb
RW
3138{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140{ as_fn_set_status 77
3141as_fn_error "C compiler cannot create executables
3142See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3143fi
b4e70030 3144ac_exeext=$ac_cv_exeext
b4e70030 3145
81ecdfbb 3146# Check that the compiler produces executables we can run. If not, either
bec39cab 3147# the compiler is broken, or we cross compile.
81ecdfbb
RW
3148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3149$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3150# If not cross compiling, check that we can run a simple program.
3151if test "$cross_compiling" != yes; then
3152 if { ac_try='./$ac_file'
81ecdfbb
RW
3153 { { case "(($ac_try" in
3154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3155 *) ac_try_echo=$ac_try;;
3156esac
3157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3158$as_echo "$ac_try_echo"; } >&5
3159 (eval "$ac_try") 2>&5
bec39cab 3160 ac_status=$?
81ecdfbb
RW
3161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3162 test $ac_status = 0; }; }; then
bec39cab 3163 cross_compiling=no
c906108c 3164 else
bec39cab
AC
3165 if test "$cross_compiling" = maybe; then
3166 cross_compiling=yes
3167 else
81ecdfbb
RW
3168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3170as_fn_error "cannot run C compiled programs.
bec39cab 3171If you meant to cross compile, use \`--host'.
81ecdfbb 3172See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3173 fi
c906108c 3174 fi
bec39cab 3175fi
81ecdfbb
RW
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3177$as_echo "yes" >&6; }
bec39cab 3178
81ecdfbb 3179rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3180ac_clean_files=$ac_clean_files_save
81ecdfbb 3181# Check that the compiler produces executables we can run. If not, either
b4e70030 3182# the compiler is broken, or we cross compile.
81ecdfbb
RW
3183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3184$as_echo_n "checking whether we are cross compiling... " >&6; }
3185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3186$as_echo "$cross_compiling" >&6; }
3187
3188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3189$as_echo_n "checking for suffix of executables... " >&6; }
3190if { { ac_try="$ac_link"
3191case "(($ac_try" in
3192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193 *) ac_try_echo=$ac_try;;
3194esac
3195eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3196$as_echo "$ac_try_echo"; } >&5
3197 (eval "$ac_link") 2>&5
bec39cab 3198 ac_status=$?
81ecdfbb
RW
3199 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3200 test $ac_status = 0; }; then :
b4e70030
JB
3201 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3202# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3203# work properly (i.e., refer to `conftest.exe'), while it won't with
3204# `rm'.
3205for ac_file in conftest.exe conftest conftest.*; do
3206 test -f "$ac_file" || continue
3207 case $ac_file in
81ecdfbb 3208 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3209 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3210 break;;
3211 * ) break;;
3212 esac
3213done
c906108c 3214else
81ecdfbb
RW
3215 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3217as_fn_error "cannot compute suffix of executables: cannot compile and link
3218See \`config.log' for more details." "$LINENO" 5; }
c906108c 3219fi
b4e70030 3220rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3222$as_echo "$ac_cv_exeext" >&6; }
c906108c 3223
b4e70030 3224rm -f conftest.$ac_ext
bec39cab
AC
3225EXEEXT=$ac_cv_exeext
3226ac_exeext=$EXEEXT
81ecdfbb
RW
3227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3228$as_echo_n "checking for suffix of object files... " >&6; }
3229if test "${ac_cv_objext+set}" = set; then :
3230 $as_echo_n "(cached) " >&6
bec39cab 3231else
81ecdfbb 3232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3233/* end confdefs.h. */
3234
3235int
3236main ()
3237{
3238
3239 ;
3240 return 0;
3241}
3242_ACEOF
3243rm -f conftest.o conftest.obj
81ecdfbb
RW
3244if { { ac_try="$ac_compile"
3245case "(($ac_try" in
3246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3247 *) ac_try_echo=$ac_try;;
3248esac
3249eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3250$as_echo "$ac_try_echo"; } >&5
3251 (eval "$ac_compile") 2>&5
3252 ac_status=$?
3253 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3254 test $ac_status = 0; }; then :
3255 for ac_file in conftest.o conftest.obj conftest.*; do
3256 test -f "$ac_file" || continue;
bec39cab 3257 case $ac_file in
81ecdfbb 3258 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3259 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3260 break;;
3261 esac
3262done
c906108c 3263else
81ecdfbb 3264 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3265sed 's/^/| /' conftest.$ac_ext >&5
3266
81ecdfbb
RW
3267{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3269as_fn_error "cannot compute suffix of object files: cannot compile
3270See \`config.log' for more details." "$LINENO" 5; }
c906108c 3271fi
b4e70030 3272rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3273fi
81ecdfbb
RW
3274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3275$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3276OBJEXT=$ac_cv_objext
3277ac_objext=$OBJEXT
81ecdfbb
RW
3278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3279$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3280if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3281 $as_echo_n "(cached) " >&6
c906108c 3282else
81ecdfbb 3283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3284/* end confdefs.h. */
3285
3286int
3287main ()
3288{
3289#ifndef __GNUC__
3290 choke me
3291#endif
3292
3293 ;
3294 return 0;
3295}
3296_ACEOF
81ecdfbb 3297if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3298 ac_compiler_gnu=yes
3299else
81ecdfbb 3300 ac_compiler_gnu=no
bec39cab 3301fi
81ecdfbb 3302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3303ac_cv_c_compiler_gnu=$ac_compiler_gnu
3304
3305fi
81ecdfbb
RW
3306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3307$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3308if test $ac_compiler_gnu = yes; then
3309 GCC=yes
3310else
3311 GCC=
3312fi
bec39cab
AC
3313ac_test_CFLAGS=${CFLAGS+set}
3314ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3316$as_echo_n "checking whether $CC accepts -g... " >&6; }
3317if test "${ac_cv_prog_cc_g+set}" = set; then :
3318 $as_echo_n "(cached) " >&6
bec39cab 3319else
81ecdfbb
RW
3320 ac_save_c_werror_flag=$ac_c_werror_flag
3321 ac_c_werror_flag=yes
3322 ac_cv_prog_cc_g=no
3323 CFLAGS="-g"
3324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3325/* end confdefs.h. */
3326
3327int
3328main ()
3329{
3330
3331 ;
3332 return 0;
3333}
3334_ACEOF
81ecdfbb 3335if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3336 ac_cv_prog_cc_g=yes
3337else
81ecdfbb
RW
3338 CFLAGS=""
3339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3340/* end confdefs.h. */
3341
3342int
3343main ()
3344{
3345
3346 ;
3347 return 0;
3348}
3349_ACEOF
3350if ac_fn_c_try_compile "$LINENO"; then :
3351
3352else
3353 ac_c_werror_flag=$ac_save_c_werror_flag
3354 CFLAGS="-g"
3355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3356/* end confdefs.h. */
3357
3358int
3359main ()
3360{
c906108c 3361
81ecdfbb
RW
3362 ;
3363 return 0;
3364}
3365_ACEOF
3366if ac_fn_c_try_compile "$LINENO"; then :
3367 ac_cv_prog_cc_g=yes
3368fi
3369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3370fi
3371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3372fi
81ecdfbb
RW
3373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3374 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3375fi
81ecdfbb
RW
3376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3377$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3378if test "$ac_test_CFLAGS" = set; then
bec39cab 3379 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3380elif test $ac_cv_prog_cc_g = yes; then
3381 if test "$GCC" = yes; then
3382 CFLAGS="-g -O2"
3383 else
3384 CFLAGS="-g"
3385 fi
3386else
3387 if test "$GCC" = yes; then
3388 CFLAGS="-O2"
3389 else
3390 CFLAGS=
3391 fi
3392fi
81ecdfbb
RW
3393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3394$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3395if test "${ac_cv_prog_cc_c89+set}" = set; then :
3396 $as_echo_n "(cached) " >&6
bec39cab 3397else
81ecdfbb 3398 ac_cv_prog_cc_c89=no
bec39cab 3399ac_save_CC=$CC
81ecdfbb 3400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3401/* end confdefs.h. */
c906108c
SS
3402#include <stdarg.h>
3403#include <stdio.h>
3404#include <sys/types.h>
3405#include <sys/stat.h>
3406/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3407struct buf { int x; };
3408FILE * (*rcsopen) (struct buf *, struct stat *, int);
3409static char *e (p, i)
3410 char **p;
3411 int i;
3412{
3413 return p[i];
3414}
3415static char *f (char * (*g) (char **, int), char **p, ...)
3416{
3417 char *s;
3418 va_list v;
3419 va_start (v,p);
3420 s = g (p, va_arg (v,int));
3421 va_end (v);
3422 return s;
3423}
bec39cab
AC
3424
3425/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3426 function prototypes and stuff, but not '\xHH' hex character constants.
3427 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3428 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3429 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3430 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3431 that's true only with -std. */
bec39cab
AC
3432int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3433
81ecdfbb
RW
3434/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3435 inside strings and character constants. */
3436#define FOO(x) 'x'
3437int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3438
c906108c
SS
3439int test (int i, double x);
3440struct s1 {int (*f) (int a);};
3441struct s2 {int (*f) (double a);};
3442int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3443int argc;
3444char **argv;
bec39cab
AC
3445int
3446main ()
3447{
c906108c 3448return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3449 ;
3450 return 0;
3451}
3452_ACEOF
81ecdfbb
RW
3453for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3454 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3455do
3456 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3457 if ac_fn_c_try_compile "$LINENO"; then :
3458 ac_cv_prog_cc_c89=$ac_arg
c906108c 3459fi
81ecdfbb
RW
3460rm -f core conftest.err conftest.$ac_objext
3461 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3462done
81ecdfbb 3463rm -f conftest.$ac_ext
bec39cab 3464CC=$ac_save_CC
c906108c
SS
3465
3466fi
81ecdfbb
RW
3467# AC_CACHE_VAL
3468case "x$ac_cv_prog_cc_c89" in
3469 x)
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3471$as_echo "none needed" >&6; } ;;
3472 xno)
3473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3474$as_echo "unsupported" >&6; } ;;
bec39cab 3475 *)
81ecdfbb
RW
3476 CC="$CC $ac_cv_prog_cc_c89"
3477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3478$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3479esac
81ecdfbb 3480if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3481
b4e70030
JB
3482fi
3483
bec39cab
AC
3484ac_ext=c
3485ac_cpp='$CPP $CPPFLAGS'
3486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3488ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3489
60ca704f 3490
bec39cab
AC
3491ac_ext=c
3492ac_cpp='$CPP $CPPFLAGS'
3493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3495ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3497$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3498# On Suns, sometimes $CPP names a directory.
3499if test -n "$CPP" && test -d "$CPP"; then
3500 CPP=
8bb2c122 3501fi
bec39cab 3502if test -z "$CPP"; then
81ecdfbb
RW
3503 if test "${ac_cv_prog_CPP+set}" = set; then :
3504 $as_echo_n "(cached) " >&6
bec39cab
AC
3505else
3506 # Double quotes because CPP needs to be expanded
3507 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3508 do
3509 ac_preproc_ok=false
3510for ac_c_preproc_warn_flag in '' yes
3511do
3512 # Use a header file that comes with gcc, so configuring glibc
3513 # with a fresh cross-compiler works.
3514 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3515 # <limits.h> exists even on freestanding compilers.
3516 # On the NeXT, cc -E runs the code through the compiler's parser,
3517 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3519/* end confdefs.h. */
3520#ifdef __STDC__
3521# include <limits.h>
3522#else
3523# include <assert.h>
3524#endif
3525 Syntax error
3526_ACEOF
81ecdfbb 3527if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3528
81ecdfbb 3529else
bec39cab
AC
3530 # Broken: fails on valid input.
3531continue
3532fi
3533rm -f conftest.err conftest.$ac_ext
3534
81ecdfbb 3535 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3536 # can be detected and how.
81ecdfbb 3537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3538/* end confdefs.h. */
3539#include <ac_nonexistent.h>
3540_ACEOF
81ecdfbb 3541if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3542 # Broken: success on invalid input.
3543continue
8bb2c122 3544else
bec39cab
AC
3545 # Passes both tests.
3546ac_preproc_ok=:
3547break
8bb2c122 3548fi
bec39cab 3549rm -f conftest.err conftest.$ac_ext
8bb2c122 3550
bec39cab
AC
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
81ecdfbb 3554if $ac_preproc_ok; then :
bec39cab
AC
3555 break
3556fi
8bb2c122 3557
bec39cab
AC
3558 done
3559 ac_cv_prog_CPP=$CPP
ddc9cd0f 3560
c906108c 3561fi
bec39cab
AC
3562 CPP=$ac_cv_prog_CPP
3563else
3564 ac_cv_prog_CPP=$CPP
c906108c 3565fi
81ecdfbb
RW
3566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3567$as_echo "$CPP" >&6; }
bec39cab
AC
3568ac_preproc_ok=false
3569for ac_c_preproc_warn_flag in '' yes
3570do
3571 # Use a header file that comes with gcc, so configuring glibc
3572 # with a fresh cross-compiler works.
3573 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3574 # <limits.h> exists even on freestanding compilers.
3575 # On the NeXT, cc -E runs the code through the compiler's parser,
3576 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3578/* end confdefs.h. */
3579#ifdef __STDC__
3580# include <limits.h>
3581#else
3582# include <assert.h>
3583#endif
3584 Syntax error
3585_ACEOF
81ecdfbb 3586if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3587
81ecdfbb 3588else
bec39cab
AC
3589 # Broken: fails on valid input.
3590continue
3591fi
3592rm -f conftest.err conftest.$ac_ext
3593
81ecdfbb 3594 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3595 # can be detected and how.
81ecdfbb 3596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3597/* end confdefs.h. */
3598#include <ac_nonexistent.h>
3599_ACEOF
81ecdfbb 3600if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3601 # Broken: success on invalid input.
3602continue
c906108c 3603else
bec39cab
AC
3604 # Passes both tests.
3605ac_preproc_ok=:
3606break
c906108c 3607fi
bec39cab 3608rm -f conftest.err conftest.$ac_ext
c906108c 3609
bec39cab
AC
3610done
3611# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3612rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3613if $ac_preproc_ok; then :
3614
c906108c 3615else
81ecdfbb
RW
3616 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3618as_fn_error "C preprocessor \"$CPP\" fails sanity check
3619See \`config.log' for more details." "$LINENO" 5; }
c906108c 3620fi
c906108c 3621
bec39cab
AC
3622ac_ext=c
3623ac_cpp='$CPP $CPPFLAGS'
3624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3626ac_compiler_gnu=$ac_cv_c_compiler_gnu
3627
3628
81ecdfbb
RW
3629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3630$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3631if test "${ac_cv_path_GREP+set}" = set; then :
3632 $as_echo_n "(cached) " >&6
4e8d927d 3633else
81ecdfbb
RW
3634 if test -z "$GREP"; then
3635 ac_path_GREP_found=false
3636 # Loop through the user's path and test for each of PROGNAME-LIST
3637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
3642 for ac_prog in grep ggrep; do
3643 for ac_exec_ext in '' $ac_executable_extensions; do
3644 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3645 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3646# Check for GNU ac_path_GREP and select it if it is found.
3647 # Check for GNU $ac_path_GREP
3648case `"$ac_path_GREP" --version 2>&1` in
3649*GNU*)
3650 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3651*)
3652 ac_count=0
3653 $as_echo_n 0123456789 >"conftest.in"
3654 while :
3655 do
3656 cat "conftest.in" "conftest.in" >"conftest.tmp"
3657 mv "conftest.tmp" "conftest.in"
3658 cp "conftest.in" "conftest.nl"
3659 $as_echo 'GREP' >> "conftest.nl"
3660 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3661 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3662 as_fn_arith $ac_count + 1 && ac_count=$as_val
3663 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3664 # Best one so far, save it but keep looking for a better one
3665 ac_cv_path_GREP="$ac_path_GREP"
3666 ac_path_GREP_max=$ac_count
bec39cab 3667 fi
81ecdfbb
RW
3668 # 10*(2^10) chars as input seems more than enough
3669 test $ac_count -gt 10 && break
3670 done
3671 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3672esac
bec39cab 3673
81ecdfbb
RW
3674 $ac_path_GREP_found && break 3
3675 done
3676 done
3677 done
3678IFS=$as_save_IFS
3679 if test -z "$ac_cv_path_GREP"; then
3680 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3681 fi
c906108c 3682else
81ecdfbb 3683 ac_cv_path_GREP=$GREP
c906108c 3684fi
c906108c 3685
81ecdfbb
RW
3686fi
3687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3688$as_echo "$ac_cv_path_GREP" >&6; }
3689 GREP="$ac_cv_path_GREP"
c906108c 3690
c906108c 3691
81ecdfbb
RW
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3693$as_echo_n "checking for egrep... " >&6; }
3694if test "${ac_cv_path_EGREP+set}" = set; then :
3695 $as_echo_n "(cached) " >&6
783e057b 3696else
81ecdfbb
RW
3697 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3698 then ac_cv_path_EGREP="$GREP -E"
3699 else
3700 if test -z "$EGREP"; then
3701 ac_path_EGREP_found=false
3702 # Loop through the user's path and test for each of PROGNAME-LIST
3703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3704for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3705do
3706 IFS=$as_save_IFS
3707 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3708 for ac_prog in egrep; do
3709 for ac_exec_ext in '' $ac_executable_extensions; do
3710 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3711 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3712# Check for GNU ac_path_EGREP and select it if it is found.
3713 # Check for GNU $ac_path_EGREP
3714case `"$ac_path_EGREP" --version 2>&1` in
3715*GNU*)
3716 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3717*)
3718 ac_count=0
3719 $as_echo_n 0123456789 >"conftest.in"
3720 while :
3721 do
3722 cat "conftest.in" "conftest.in" >"conftest.tmp"
3723 mv "conftest.tmp" "conftest.in"
3724 cp "conftest.in" "conftest.nl"
3725 $as_echo 'EGREP' >> "conftest.nl"
3726 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3727 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3728 as_fn_arith $ac_count + 1 && ac_count=$as_val
3729 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3730 # Best one so far, save it but keep looking for a better one
3731 ac_cv_path_EGREP="$ac_path_EGREP"
3732 ac_path_EGREP_max=$ac_count
3733 fi
3734 # 10*(2^10) chars as input seems more than enough
3735 test $ac_count -gt 10 && break
3736 done
3737 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3738esac
bec39cab 3739
81ecdfbb
RW
3740 $ac_path_EGREP_found && break 3
3741 done
3742 done
3743 done
3744IFS=$as_save_IFS
3745 if test -z "$ac_cv_path_EGREP"; then
3746 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3747 fi
783e057b 3748else
81ecdfbb 3749 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3750fi
3751
81ecdfbb 3752 fi
783e057b 3753fi
81ecdfbb
RW
3754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3755$as_echo "$ac_cv_path_EGREP" >&6; }
3756 EGREP="$ac_cv_path_EGREP"
3757
783e057b 3758
81ecdfbb
RW
3759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3760$as_echo_n "checking for ANSI C header files... " >&6; }
3761if test "${ac_cv_header_stdc+set}" = set; then :
3762 $as_echo_n "(cached) " >&6
783e057b 3763else
81ecdfbb 3764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3765/* end confdefs.h. */
783e057b 3766#include <stdlib.h>
bec39cab 3767#include <stdarg.h>
783e057b
DJ
3768#include <string.h>
3769#include <float.h>
c906108c 3770
bec39cab
AC
3771int
3772main ()
3773{
c906108c 3774
bec39cab
AC
3775 ;
3776 return 0;
3777}
3778_ACEOF
81ecdfbb 3779if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3780 ac_cv_header_stdc=yes
c906108c 3781else
81ecdfbb 3782 ac_cv_header_stdc=no
c906108c 3783fi
81ecdfbb 3784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3785
783e057b
DJ
3786if test $ac_cv_header_stdc = yes; then
3787 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3789/* end confdefs.h. */
3790#include <string.h>
c906108c 3791
783e057b
DJ
3792_ACEOF
3793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3794 $EGREP "memchr" >/dev/null 2>&1; then :
3795
c906108c 3796else
783e057b 3797 ac_cv_header_stdc=no
c906108c 3798fi
783e057b 3799rm -f conftest*
c906108c
SS
3800
3801fi
3802
783e057b
DJ
3803if test $ac_cv_header_stdc = yes; then
3804 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3806/* end confdefs.h. */
3807#include <stdlib.h>
bec39cab 3808
783e057b
DJ
3809_ACEOF
3810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3811 $EGREP "free" >/dev/null 2>&1; then :
3812
bec39cab 3813else
783e057b 3814 ac_cv_header_stdc=no
bec39cab 3815fi
783e057b 3816rm -f conftest*
bec39cab
AC
3817
3818fi
bec39cab 3819
783e057b
DJ
3820if test $ac_cv_header_stdc = yes; then
3821 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3822 if test "$cross_compiling" = yes; then :
783e057b 3823 :
bec39cab 3824else
81ecdfbb 3825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3826/* end confdefs.h. */
3827#include <ctype.h>
81ecdfbb 3828#include <stdlib.h>
783e057b
DJ
3829#if ((' ' & 0x0FF) == 0x020)
3830# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3831# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3832#else
3833# define ISLOWER(c) \
3834 (('a' <= (c) && (c) <= 'i') \
3835 || ('j' <= (c) && (c) <= 'r') \
3836 || ('s' <= (c) && (c) <= 'z'))
3837# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3838#endif
3839
3840#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3841int
3842main ()
3843{
3844 int i;
3845 for (i = 0; i < 256; i++)
3846 if (XOR (islower (i), ISLOWER (i))
3847 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3848 return 2;
3849 return 0;
783e057b
DJ
3850}
3851_ACEOF
81ecdfbb 3852if ac_fn_c_try_run "$LINENO"; then :
783e057b 3853
81ecdfbb
RW
3854else
3855 ac_cv_header_stdc=no
783e057b 3856fi
81ecdfbb
RW
3857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3858 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3859fi
81ecdfbb 3860
783e057b
DJ
3861fi
3862fi
81ecdfbb
RW
3863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3864$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3865if test $ac_cv_header_stdc = yes; then
3866
81ecdfbb 3867$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3868
3869fi
3870
3871# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3872for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3873 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3874do :
3875 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3876ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3877"
3878eval as_val=\$$as_ac_Header
3879 if test "x$as_val" = x""yes; then :
783e057b 3880 cat >>confdefs.h <<_ACEOF
81ecdfbb 3881#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3882_ACEOF
3883
3884fi
3885
3886done
3887
3888
3889
81ecdfbb
RW
3890 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3891if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3892 MINIX=yes
3893else
3894 MINIX=
3895fi
3896
3897
3898 if test "$MINIX" = yes; then
3899
81ecdfbb 3900$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3901
3902
81ecdfbb 3903$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3904
3905
81ecdfbb 3906$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3907
3908 fi
3909
3910
81ecdfbb
RW
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3912$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3913if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3914 $as_echo_n "(cached) " >&6
783e057b 3915else
81ecdfbb 3916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3917/* end confdefs.h. */
3918
c971b7fa
PA
3919# define __EXTENSIONS__ 1
3920 $ac_includes_default
783e057b
DJ
3921int
3922main ()
3923{
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
81ecdfbb 3929if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3930 ac_cv_safe_to_define___extensions__=yes
3931else
81ecdfbb 3932 ac_cv_safe_to_define___extensions__=no
783e057b 3933fi
81ecdfbb 3934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3935fi
81ecdfbb
RW
3936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3937$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3938 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3939 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3940
81ecdfbb 3941 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3942
81ecdfbb 3943 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3944
81ecdfbb 3945 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3946
81ecdfbb 3947 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3948
3949
c971b7fa
PA
3950ac_aux_dir=
3951for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3952 for ac_t in install-sh install.sh shtool; do
3953 if test -f "$ac_dir/$ac_t"; then
3954 ac_aux_dir=$ac_dir
3955 ac_install_sh="$ac_aux_dir/$ac_t -c"
3956 break 2
3957 fi
3958 done
3959done
3960if test -z "$ac_aux_dir"; then
3961 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3962fi
770d76d7 3963
c971b7fa
PA
3964# These three variables are undocumented and unsupported,
3965# and are intended to be withdrawn in a future Autoconf release.
3966# They can cause serious problems if a builder's source tree is in a directory
3967# whose full name contains unusual characters.
3968ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3969ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3970ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3971
770d76d7 3972
c971b7fa
PA
3973# Make sure we can run config.sub.
3974$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3975 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3976
c971b7fa
PA
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3978$as_echo_n "checking build system type... " >&6; }
3979if test "${ac_cv_build+set}" = set; then :
3980 $as_echo_n "(cached) " >&6
770d76d7 3981else
c971b7fa
PA
3982 ac_build_alias=$build_alias
3983test "x$ac_build_alias" = x &&
3984 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3985test "x$ac_build_alias" = x &&
3986 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3987ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3988 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3989
770d76d7 3990fi
c971b7fa
PA
3991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3992$as_echo "$ac_cv_build" >&6; }
3993case $ac_cv_build in
3994*-*-*) ;;
3995*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3996esac
c971b7fa
PA
3997build=$ac_cv_build
3998ac_save_IFS=$IFS; IFS='-'
3999set x $ac_cv_build
4000shift
4001build_cpu=$1
4002build_vendor=$2
4003shift; shift
4004# Remember, the first character of IFS is used to create $*,
4005# except with old shells:
4006build_os=$*
4007IFS=$ac_save_IFS
4008case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4009
4010
c971b7fa
PA
4011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4012$as_echo_n "checking host system type... " >&6; }
4013if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
4014 $as_echo_n "(cached) " >&6
4015else
c971b7fa
PA
4016 if test "x$host_alias" = x; then
4017 ac_cv_host=$ac_cv_build
81ecdfbb 4018else
c971b7fa
PA
4019 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4020 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4021fi
81ecdfbb
RW
4022
4023fi
c971b7fa
PA
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4025$as_echo "$ac_cv_host" >&6; }
4026case $ac_cv_host in
4027*-*-*) ;;
4028*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4029esac
c971b7fa
PA
4030host=$ac_cv_host
4031ac_save_IFS=$IFS; IFS='-'
4032set x $ac_cv_host
4033shift
4034host_cpu=$1
4035host_vendor=$2
4036shift; shift
4037# Remember, the first character of IFS is used to create $*,
4038# except with old shells:
4039host_os=$*
4040IFS=$ac_save_IFS
4041case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4042
4043
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4045$as_echo_n "checking target system type... " >&6; }
4046if test "${ac_cv_target+set}" = set; then :
4047 $as_echo_n "(cached) " >&6
4048else
4049 if test "x$target_alias" = x; then
4050 ac_cv_target=$ac_cv_host
4051else
4052 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4053 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4054fi
4055
4056fi
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4058$as_echo "$ac_cv_target" >&6; }
4059case $ac_cv_target in
4060*-*-*) ;;
4061*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4062esac
4063target=$ac_cv_target
4064ac_save_IFS=$IFS; IFS='-'
4065set x $ac_cv_target
4066shift
4067target_cpu=$1
4068target_vendor=$2
4069shift; shift
4070# Remember, the first character of IFS is used to create $*,
4071# except with old shells:
4072target_os=$*
4073IFS=$ac_save_IFS
4074case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4075
4076
4077# The aliases save the names the user supplied, while $host etc.
4078# will get canonicalized.
4079test -n "$target_alias" &&
4080 test "$program_prefix$program_suffix$program_transform_name" = \
4081 NONENONEs,x,x, &&
4082 program_prefix=${target_alias}-
4083
4084# The tests for host and target for $enable_largefile require
4085# canonical names.
4086
4087
81ecdfbb 4088
da2f07f1
JK
4089# As the $enable_largefile decision depends on --enable-plugins we must set it
4090# even in directories otherwise not depending on the $plugins option.
4091
4092
2974be62
AM
4093 maybe_plugins=no
4094 for ac_header in dlfcn.h
4095do :
4096 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4097"
4098if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
4099 cat >>confdefs.h <<_ACEOF
4100#define HAVE_DLFCN_H 1
4101_ACEOF
4102 maybe_plugins=yes
4103fi
4104
4105done
4106
4107 for ac_header in windows.h
4108do :
4109 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4110"
4111if test "x$ac_cv_header_windows_h" = x""yes; then :
4112 cat >>confdefs.h <<_ACEOF
4113#define HAVE_WINDOWS_H 1
4114_ACEOF
4115 maybe_plugins=yes
4116fi
4117
4118done
4119
4120
4121 # Check whether --enable-plugins was given.
da2f07f1
JK
4122if test "${enable_plugins+set}" = set; then :
4123 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4124 no) plugins=no ;;
4125 *) plugins=yes
4126 if test "$maybe_plugins" != "yes" ; then
4127 as_fn_error "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4128 fi ;;
4129 esac
da2f07f1 4130else
2974be62
AM
4131 plugins=$maybe_plugins
4132
da2f07f1
JK
4133fi
4134
2974be62
AM
4135 if test "$plugins" = "yes"; then
4136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4137$as_echo_n "checking for library containing dlopen... " >&6; }
4138if test "${ac_cv_search_dlopen+set}" = set; then :
4139 $as_echo_n "(cached) " >&6
4140else
4141 ac_func_search_save_LIBS=$LIBS
4142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4143/* end confdefs.h. */
4144
4145/* Override any GCC internal prototype to avoid an error.
4146 Use char because int might match the return type of a GCC
4147 builtin and then its argument prototype would still apply. */
4148#ifdef __cplusplus
4149extern "C"
4150#endif
4151char dlopen ();
4152int
4153main ()
4154{
4155return dlopen ();
4156 ;
4157 return 0;
4158}
4159_ACEOF
4160for ac_lib in '' dl; do
4161 if test -z "$ac_lib"; then
4162 ac_res="none required"
4163 else
4164 ac_res=-l$ac_lib
4165 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4166 fi
4167 if ac_fn_c_try_link "$LINENO"; then :
4168 ac_cv_search_dlopen=$ac_res
4169fi
4170rm -f core conftest.err conftest.$ac_objext \
4171 conftest$ac_exeext
4172 if test "${ac_cv_search_dlopen+set}" = set; then :
4173 break
4174fi
4175done
4176if test "${ac_cv_search_dlopen+set}" = set; then :
4177
4178else
4179 ac_cv_search_dlopen=no
4180fi
4181rm conftest.$ac_ext
4182LIBS=$ac_func_search_save_LIBS
4183fi
4184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4185$as_echo "$ac_cv_search_dlopen" >&6; }
4186ac_res=$ac_cv_search_dlopen
4187if test "$ac_res" != no; then :
4188 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4189
4190fi
4191
4192 fi
da2f07f1
JK
4193
4194
4195case "${host}" in
4196 sparc-*-solaris*|i[3-7]86-*-solaris*)
4197 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4198 # are mutually exclusive; and without procfs support, the bfd/ elf module
4199 # cannot provide certain routines such as elfcore_write_prpsinfo
4200 # or elfcore_write_prstatus. So unless the user explicitly requested
4201 # large-file support through the --enable-largefile switch, disable
4202 # large-file support in favor of procfs support.
4203 test "${target}" = "${host}" -a "x$plugins" = xno \
4204 && : ${enable_largefile="no"}
4205 ;;
4206esac
4207
4208# Check whether --enable-largefile was given.
4209if test "${enable_largefile+set}" = set; then :
4210 enableval=$enable_largefile;
4211fi
4212
4213if test "$enable_largefile" != no; then
4214
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4216$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4217if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4218 $as_echo_n "(cached) " >&6
4219else
4220 ac_cv_sys_largefile_CC=no
4221 if test "$GCC" != yes; then
4222 ac_save_CC=$CC
4223 while :; do
4224 # IRIX 6.2 and later do not support large files by default,
4225 # so use the C compiler's -n32 option if that helps.
4226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h. */
4228#include <sys/types.h>
4229 /* Check that off_t can represent 2**63 - 1 correctly.
4230 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4231 since some C++ compilers masquerading as C compilers
4232 incorrectly reject 9223372036854775807. */
4233#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4234 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4235 && LARGE_OFF_T % 2147483647 == 1)
4236 ? 1 : -1];
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
4245 if ac_fn_c_try_compile "$LINENO"; then :
4246 break
4247fi
4248rm -f core conftest.err conftest.$ac_objext
4249 CC="$CC -n32"
4250 if ac_fn_c_try_compile "$LINENO"; then :
4251 ac_cv_sys_largefile_CC=' -n32'; break
4252fi
4253rm -f core conftest.err conftest.$ac_objext
4254 break
4255 done
4256 CC=$ac_save_CC
4257 rm -f conftest.$ac_ext
4258 fi
4259fi
4260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4261$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4262 if test "$ac_cv_sys_largefile_CC" != no; then
4263 CC=$CC$ac_cv_sys_largefile_CC
4264 fi
4265
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4267$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4268if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4269 $as_echo_n "(cached) " >&6
4270else
4271 while :; do
4272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4273/* end confdefs.h. */
4274#include <sys/types.h>
4275 /* Check that off_t can represent 2**63 - 1 correctly.
4276 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4277 since some C++ compilers masquerading as C compilers
4278 incorrectly reject 9223372036854775807. */
4279#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4280 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4281 && LARGE_OFF_T % 2147483647 == 1)
4282 ? 1 : -1];
4283int
4284main ()
4285{
4286
4287 ;
4288 return 0;
4289}
4290_ACEOF
4291if ac_fn_c_try_compile "$LINENO"; then :
4292 ac_cv_sys_file_offset_bits=no; break
4293fi
4294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4296/* end confdefs.h. */
4297#define _FILE_OFFSET_BITS 64
4298#include <sys/types.h>
4299 /* Check that off_t can represent 2**63 - 1 correctly.
4300 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4301 since some C++ compilers masquerading as C compilers
4302 incorrectly reject 9223372036854775807. */
4303#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4304 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4305 && LARGE_OFF_T % 2147483647 == 1)
4306 ? 1 : -1];
4307int
4308main ()
4309{
4310
4311 ;
4312 return 0;
4313}
4314_ACEOF
4315if ac_fn_c_try_compile "$LINENO"; then :
4316 ac_cv_sys_file_offset_bits=64; break
4317fi
4318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4319 ac_cv_sys_file_offset_bits=unknown
4320 break
4321done
4322fi
4323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4324$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4325case $ac_cv_sys_file_offset_bits in #(
4326 no | unknown) ;;
4327 *)
4328cat >>confdefs.h <<_ACEOF
4329#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4330_ACEOF
4331;;
4332esac
4333rm -rf conftest*
4334 if test $ac_cv_sys_file_offset_bits = unknown; then
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4336$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4337if test "${ac_cv_sys_large_files+set}" = set; then :
4338 $as_echo_n "(cached) " >&6
4339else
4340 while :; do
4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342/* end confdefs.h. */
4343#include <sys/types.h>
4344 /* Check that off_t can represent 2**63 - 1 correctly.
4345 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4346 since some C++ compilers masquerading as C compilers
4347 incorrectly reject 9223372036854775807. */
4348#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4349 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4350 && LARGE_OFF_T % 2147483647 == 1)
4351 ? 1 : -1];
4352int
4353main ()
4354{
4355
4356 ;
4357 return 0;
4358}
4359_ACEOF
4360if ac_fn_c_try_compile "$LINENO"; then :
4361 ac_cv_sys_large_files=no; break
4362fi
4363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365/* end confdefs.h. */
4366#define _LARGE_FILES 1
4367#include <sys/types.h>
4368 /* Check that off_t can represent 2**63 - 1 correctly.
4369 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4370 since some C++ compilers masquerading as C compilers
4371 incorrectly reject 9223372036854775807. */
4372#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4373 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4374 && LARGE_OFF_T % 2147483647 == 1)
4375 ? 1 : -1];
4376int
4377main ()
4378{
4379
4380 ;
4381 return 0;
4382}
4383_ACEOF
4384if ac_fn_c_try_compile "$LINENO"; then :
4385 ac_cv_sys_large_files=1; break
4386fi
4387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4388 ac_cv_sys_large_files=unknown
4389 break
4390done
4391fi
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4393$as_echo "$ac_cv_sys_large_files" >&6; }
4394case $ac_cv_sys_large_files in #(
4395 no | unknown) ;;
4396 *)
4397cat >>confdefs.h <<_ACEOF
4398#define _LARGE_FILES $ac_cv_sys_large_files
4399_ACEOF
4400;;
4401esac
4402rm -rf conftest*
4403 fi
4404fi
4405
4406
4407
81ecdfbb
RW
4408
4409
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4411$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4412if test "${am_cv_prog_cc_stdc+set}" = set; then :
4413 $as_echo_n "(cached) " >&6
4414else
4415 am_cv_prog_cc_stdc=no
4416ac_save_CC="$CC"
4417# Don't try gcc -ansi; that turns off useful extensions and
4418# breaks some systems' header files.
4419# AIX -qlanglvl=ansi
4420# Ultrix and OSF/1 -std1
4421# HP-UX 10.20 and later -Ae
4422# HP-UX older versions -Aa -D_HPUX_SOURCE
4423# SVR4 -Xc -D__EXTENSIONS__
4424for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4425do
783e057b 4426 CC="$ac_save_CC $ac_arg"
81ecdfbb 4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4428/* end confdefs.h. */
4429#include <stdarg.h>
4430#include <stdio.h>
4431#include <sys/types.h>
4432#include <sys/stat.h>
4433/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4434struct buf { int x; };
4435FILE * (*rcsopen) (struct buf *, struct stat *, int);
4436static char *e (p, i)
4437 char **p;
4438 int i;
4439{
4440 return p[i];
4441}
4442static char *f (char * (*g) (char **, int), char **p, ...)
4443{
4444 char *s;
4445 va_list v;
4446 va_start (v,p);
4447 s = g (p, va_arg (v,int));
4448 va_end (v);
4449 return s;
4450}
4451int test (int i, double x);
4452struct s1 {int (*f) (int a);};
4453struct s2 {int (*f) (double a);};
4454int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4455int argc;
4456char **argv;
4457
4458int
4459main ()
4460{
4461
4462return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4463
4464 ;
4465 return 0;
4466}
4467_ACEOF
81ecdfbb 4468if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4469 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4470fi
81ecdfbb 4471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4472done
4473CC="$ac_save_CC"
4474
4475fi
4476
4477if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4479$as_echo "none needed" >&6; }
783e057b 4480else
81ecdfbb
RW
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4482$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4483fi
4484case "x$am_cv_prog_cc_stdc" in
4485 x|xno) ;;
4486 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4487esac
4488
4869db5e
RM
4489# expand $ac_aux_dir to an absolute path
4490am_aux_dir=`cd $ac_aux_dir && pwd`
4491
4492if test x"${install_sh}" != xset; then
4493 case $am_aux_dir in
4494 *\ * | *\ *)
4495 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4496 *)
4497 install_sh="\${SHELL} $am_aux_dir/install-sh"
4498 esac
4499fi
4500
4501# Installed binaries are usually stripped using `strip' when the user
4502# run `make install-strip'. However `strip' might not be the right
4503# tool to use in cross-compilation environments, therefore Automake
4504# will honor the `STRIP' environment variable to overrule this program.
4505if test "$cross_compiling" != no; then
4506 if test -n "$ac_tool_prefix"; then
4507 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4508set dummy ${ac_tool_prefix}strip; ac_word=$2
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510$as_echo_n "checking for $ac_word... " >&6; }
4511if test "${ac_cv_prog_STRIP+set}" = set; then :
4512 $as_echo_n "(cached) " >&6
4513else
4514 if test -n "$STRIP"; then
4515 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4516else
4517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH
4519do
4520 IFS=$as_save_IFS
4521 test -z "$as_dir" && as_dir=.
4522 for ac_exec_ext in '' $ac_executable_extensions; do
4523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4524 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526 break 2
4527 fi
4528done
4529 done
4530IFS=$as_save_IFS
4531
4532fi
4533fi
4534STRIP=$ac_cv_prog_STRIP
4535if test -n "$STRIP"; then
4536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4537$as_echo "$STRIP" >&6; }
4538else
4539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
4541fi
4542
4543
4544fi
4545if test -z "$ac_cv_prog_STRIP"; then
4546 ac_ct_STRIP=$STRIP
4547 # Extract the first word of "strip", so it can be a program name with args.
4548set dummy strip; ac_word=$2
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4550$as_echo_n "checking for $ac_word... " >&6; }
4551if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
4552 $as_echo_n "(cached) " >&6
4553else
4554 if test -n "$ac_ct_STRIP"; then
4555 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4556else
4557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in $PATH
4559do
4560 IFS=$as_save_IFS
4561 test -z "$as_dir" && as_dir=.
4562 for ac_exec_ext in '' $ac_executable_extensions; do
4563 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4564 ac_cv_prog_ac_ct_STRIP="strip"
4565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566 break 2
4567 fi
4568done
4569 done
4570IFS=$as_save_IFS
4571
4572fi
4573fi
4574ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4575if test -n "$ac_ct_STRIP"; then
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4577$as_echo "$ac_ct_STRIP" >&6; }
4578else
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580$as_echo "no" >&6; }
4581fi
4582
4583 if test "x$ac_ct_STRIP" = x; then
4584 STRIP=":"
4585 else
4586 case $cross_compiling:$ac_tool_warned in
4587yes:)
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4590ac_tool_warned=yes ;;
4591esac
4592 STRIP=$ac_ct_STRIP
4593 fi
4594else
4595 STRIP="$ac_cv_prog_STRIP"
4596fi
4597
4598fi
4599INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4600
783e057b
DJ
4601
4602ac_aux_dir=
81ecdfbb
RW
4603for ac_dir in .. "$srcdir"/..; do
4604 for ac_t in install-sh install.sh shtool; do
4605 if test -f "$ac_dir/$ac_t"; then
4606 ac_aux_dir=$ac_dir
4607 ac_install_sh="$ac_aux_dir/$ac_t -c"
4608 break 2
4609 fi
4610 done
783e057b
DJ
4611done
4612if test -z "$ac_aux_dir"; then
81ecdfbb 4613 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4614fi
81ecdfbb
RW
4615
4616# These three variables are undocumented and unsupported,
4617# and are intended to be withdrawn in a future Autoconf release.
4618# They can cause serious problems if a builder's source tree is in a directory
4619# whose full name contains unusual characters.
4620ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4621ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4622ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4623
783e057b 4624
783e057b 4625
9009e1ae
MR
4626test "$program_prefix" != NONE &&
4627 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4628# Use a double $ so make ignores it.
4629test "$program_suffix" != NONE &&
4630 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4631# Double any \ or $.
4632# By default was `s,x,x', remove it if useless.
4633ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4634program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4635
81ecdfbb 4636
a417dc56
RW
4637# Dependency checking.
4638rm -rf .tst 2>/dev/null
4639mkdir .tst 2>/dev/null
4640if test -d .tst; then
4641 am__leading_dot=.
4642else
4643 am__leading_dot=_
4644fi
4645rmdir .tst 2>/dev/null
4646
4647DEPDIR="${am__leading_dot}deps"
4648
81ecdfbb 4649ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4650
4651
4652depcc="$CC" am_compiler_list=
4653
4654am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4656$as_echo_n "checking dependency style of $depcc... " >&6; }
4657if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4658 $as_echo_n "(cached) " >&6
a417dc56
RW
4659else
4660 if test -f "$am_depcomp"; then
4661 # We make a subdir and do the tests there. Otherwise we can end up
4662 # making bogus files that we don't know about and never remove. For
4663 # instance it was reported that on HP-UX the gcc test will end up
4664 # making a dummy file named `D' -- because `-MD' means `put the output
4665 # in D'.
4666 mkdir conftest.dir
4667 # Copy depcomp to subdir because otherwise we won't find it if we're
4668 # using a relative directory.
4669 cp "$am_depcomp" conftest.dir
4670 cd conftest.dir
4671 # We will build objects and dependencies in a subdirectory because
4672 # it helps to detect inapplicable dependency modes. For instance
4673 # both Tru64's cc and ICC support -MD to output dependencies as a
4674 # side effect of compilation, but ICC will put the dependencies in
4675 # the current directory while Tru64 will put them in the object
4676 # directory.
4677 mkdir sub
4678
4679 am_cv_CC_dependencies_compiler_type=none
4680 if test "$am_compiler_list" = ""; then
4681 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4682 fi
4683 for depmode in $am_compiler_list; do
4684 if test $depmode = none; then break; fi
4685
81ecdfbb 4686 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4687 # Setup a source with many dependencies, because some compilers
4688 # like to wrap large dependency lists on column 80 (with \), and
4689 # we should not choose a depcomp mode which is confused by this.
4690 #
4691 # We need to recreate these files for each test, as the compiler may
4692 # overwrite some of them when testing with obscure command lines.
4693 # This happens at least with the AIX C compiler.
4694 : > sub/conftest.c
4695 for i in 1 2 3 4 5 6; do
4696 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4697 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4698 # Solaris 8's {/usr,}/bin/sh.
4699 touch sub/conftst$i.h
4700 done
4701 echo "include sub/conftest.Po" > confmf
4702
4703 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4704 # mode. It turns out that the SunPro C++ compiler does not properly
4705 # handle `-M -o', and we need to detect this.
4706 depcmd="depmode=$depmode \
4707 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4708 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4709 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4710 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4711 if env $depcmd > conftest.err 2>&1 &&
4712 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4713 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4714 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4715 # icc doesn't choke on unknown options, it will just issue warnings
4716 # or remarks (even with -Werror). So we grep stderr for any message
4717 # that says an option was ignored or not supported.
4718 # When given -MP, icc 7.0 and 7.1 complain thusly:
4719 # icc: Command line warning: ignoring option '-M'; no argument required
4720 # The diagnosis changed in icc 8.0:
4721 # icc: Command line remark: option '-MP' not supported
4722 if (grep 'ignoring option' conftest.err ||
4723 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4724 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4725 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4726 break
4727 fi
4728 fi
81ecdfbb 4729 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4730 sed -e 's/^/| /' < conftest.err >&5
4731 done
4732
4733 cd ..
4734 rm -rf conftest.dir
4735else
4736 am_cv_CC_dependencies_compiler_type=none
4737fi
4738
4739fi
81ecdfbb
RW
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4741$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4742if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4743then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4744else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4745
4746fi
4747
4748
4749# Check for the 'make' the user wants to use.
4750for ac_prog in make
4751do
4752 # Extract the first word of "$ac_prog", so it can be a program name with args.
4753set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755$as_echo_n "checking for $ac_word... " >&6; }
4756if test "${ac_cv_prog_MAKE+set}" = set; then :
4757 $as_echo_n "(cached) " >&6
a417dc56
RW
4758else
4759 if test -n "$MAKE"; then
4760 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4761else
4762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763for as_dir in $PATH
4764do
4765 IFS=$as_save_IFS
4766 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4767 for ac_exec_ext in '' $ac_executable_extensions; do
4768 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4769 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4771 break 2
4772 fi
4773done
81ecdfbb
RW
4774 done
4775IFS=$as_save_IFS
a417dc56
RW
4776
4777fi
4778fi
4779MAKE=$ac_cv_prog_MAKE
4780if test -n "$MAKE"; then
81ecdfbb
RW
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4782$as_echo "$MAKE" >&6; }
a417dc56 4783else
81ecdfbb
RW
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4785$as_echo "no" >&6; }
a417dc56
RW
4786fi
4787
81ecdfbb 4788
a417dc56
RW
4789 test -n "$MAKE" && break
4790done
4791
4792MAKE_IS_GNU=
4793case "`$MAKE --version 2>&1 | sed 1q`" in
4794 *GNU*)
4795 MAKE_IS_GNU=yes
4796 ;;
4797esac
81ecdfbb 4798 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4799 GMAKE_TRUE=
4800 GMAKE_FALSE='#'
4801else
4802 GMAKE_TRUE='#'
4803 GMAKE_FALSE=
4804fi
4805
81ecdfbb
RW
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4807$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4808set x ${MAKE-make}
4809ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4810if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4811 $as_echo_n "(cached) " >&6
a417dc56
RW
4812else
4813 cat >conftest.make <<\_ACEOF
81ecdfbb 4814SHELL = /bin/sh
a417dc56 4815all:
81ecdfbb 4816 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4817_ACEOF
4818# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4819case `${MAKE-make} -f conftest.make 2>/dev/null` in
4820 *@@@%%%=?*=@@@%%%*)
4821 eval ac_cv_prog_make_${ac_make}_set=yes;;
4822 *)
4823 eval ac_cv_prog_make_${ac_make}_set=no;;
4824esac
a417dc56
RW
4825rm -f conftest.make
4826fi
81ecdfbb
RW
4827if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4829$as_echo "yes" >&6; }
a417dc56
RW
4830 SET_MAKE=
4831else
81ecdfbb
RW
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
a417dc56
RW
4834 SET_MAKE="MAKE=${MAKE-make}"
4835fi
4836
4837
648d586d
JB
4838gnulib_extra_configure_args=
4839# If large-file support is disabled, make sure gnulib does the same.
4840if test "$enable_largefile" = no; then
4841gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
4842fi
4843
c971b7fa
PA
4844# Configure gnulib. We need to build gnulib under some other
4845# directory not "gnulib", to avoid the problem of both GDB and
4846# GDBserver wanting to build it in the same directory, when building
4847# in the source dir.
783e057b 4848
c971b7fa
PA
4849 in_src="gnulib"
4850 in_build="build-gnulib"
648d586d 4851 in_extra_args="$gnulib_extra_configure_args"
c971b7fa
PA
4852
4853 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4854 # so they do not pile up.
4855 ac_sub_configure_args=
4856 ac_prev=
4857 eval "set x $ac_configure_args"
4858 shift
4859 for ac_arg
4860 do
4861 if test -n "$ac_prev"; then
4862 ac_prev=
4863 continue
4864 fi
4865 case $ac_arg in
4866 -cache-file | --cache-file | --cache-fil | --cache-fi \
4867 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4868 ac_prev=cache_file ;;
4869 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4870 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4871 | --c=*)
4872 ;;
4873 --config-cache | -C)
4874 ;;
4875 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4876 ac_prev=srcdir ;;
4877 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4878 ;;
4879 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4880 ac_prev=prefix ;;
4881 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4882 ;;
4883 --disable-option-checking)
4884 ;;
4885 *)
4886 case $ac_arg in
4887 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4888 esac
4889 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4890 esac
4891 done
4892
4893 # Always prepend --prefix to ensure using the same prefix
4894 # in subdir configurations.
4895 ac_arg="--prefix=$prefix"
4896 case $ac_arg in
4897 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4898 esac
4899 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4900
4901 # Pass --silent
4902 if test "$silent" = yes; then
4903 ac_sub_configure_args="--silent $ac_sub_configure_args"
4904 fi
4905
4906 # Always prepend --disable-option-checking to silence warnings, since
4907 # different subdirs can have different --enable and --with options.
4908 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4909
4910 ac_popdir=`pwd`
4911 ac_dir=$in_build
4912
4913 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4914 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4915 $as_echo "$ac_msg" >&6
4916 as_dir="$ac_dir"; as_fn_mkdir_p
4917
38ea300a
PA
4918 case $srcdir in
4919 [\\/]* | ?:[\\/]* )
4920 ac_srcdir=$srcdir/$in_src ;;
4921 *) # Relative name.
4922 ac_srcdir=../$srcdir/$in_src ;;
4923 esac
c971b7fa
PA
4924
4925 cd "$ac_dir"
4926
4927 ac_sub_configure=$ac_srcdir/configure
4928
4929 # Make the cache file name correct relative to the subdirectory.
4930 case $cache_file in
4931 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4932 *) # Relative name.
4933 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4934 esac
4935
648d586d
JB
4936 if test -n "$in_extra_args"; then
4937 # Add the extra args at the end.
4938 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
4939 fi
4940
c971b7fa
PA
4941 { $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
4942$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4943 # The eval makes quoting arguments work.
4944 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4945 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4946 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4947
4948 cd "$ac_popdir"
783e057b 4949
c971b7fa
PA
4950
4951
4952CONFIG_OBS=
4953CONFIG_DEPS=
4954CONFIG_SRCS=
4955ENABLE_CFLAGS=
4956
4957CONFIG_ALL=
4958CONFIG_CLEAN=
4959CONFIG_INSTALL=
4960CONFIG_UNINSTALL=
4961
4962# If we haven't got the data from the intl directory,
4963# assume NLS is disabled.
4964USE_NLS=no
4965LIBINTL=
4966LIBINTL_DEP=
4967INCINTL=
4968XGETTEXT=
4969GMSGFMT=
4970POSUB=
783e057b
DJ
4971
4972if test -f ../intl/config.intl; then
4973 . ../intl/config.intl
4974fi
81ecdfbb
RW
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4976$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4977if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4979$as_echo "no" >&6; }
783e057b 4980else
81ecdfbb
RW
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4982$as_echo "yes" >&6; }
783e057b 4983
81ecdfbb 4984$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4985
4986
81ecdfbb
RW
4987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4988$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4989 # Look for .po and .gmo files in the source directory.
4990 CATALOGS=
4991 XLINGUAS=
4992 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4993 # If there aren't any .gmo files the shell will give us the
4994 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4995 # weeded out.
4996 case "$cat" in *\**)
4997 continue;;
4998 esac
4999 # The quadruple backslash is collapsed to a double backslash
5000 # by the backticks, then collapsed again by the double quotes,
5001 # leaving us with one backslash in the sed expression (right
5002 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
5003 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
5004 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
5005 # The user is allowed to set LINGUAS to a list of languages to
5006 # install catalogs for. If it's empty that means "all of them."
5007 if test "x$LINGUAS" = x; then
5008 CATALOGS="$CATALOGS $cat"
5009 XLINGUAS="$XLINGUAS $lang"
5010 else
5011 case "$LINGUAS" in *$lang*)
5012 CATALOGS="$CATALOGS $cat"
5013 XLINGUAS="$XLINGUAS $lang"
5014 ;;
5015 esac
e28b3332
DJ
5016 fi
5017 done
c971b7fa
PA
5018 LINGUAS="$XLINGUAS"
5019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
5020$as_echo "$LINGUAS" >&6; }
5021
5022
5023 DATADIRNAME=share
5024
5025 INSTOBJEXT=.mo
5026
5027 GENCAT=gencat
5028
5029 CATOBJEXT=.gmo
e28b3332 5030
e28b3332
DJ
5031fi
5032
c971b7fa
PA
5033localedir='${datadir}/locale'
5034
5035
5036if test x"$USE_NLS" = xyes; then
5037 CONFIG_ALL="$CONFIG_ALL all-po"
5038 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
5039 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
5040 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 5041fi
e28b3332 5042
c971b7fa
PA
5043GNULIB=build-gnulib/import
5044
5045# For Makefile dependencies.
5046GNULIB_STDINT_H=
5047if test x"$STDINT_H" != x; then
5048 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
5049fi
5050
5051
c971b7fa
PA
5052PACKAGE=gdb
5053
5054cat >>confdefs.h <<_ACEOF
5055#define PACKAGE "$PACKAGE"
5056_ACEOF
5057
5058
5059
5060# We never need to detect it in this sub-configure.
5061# But preserve it for config.status --recheck.
5062
5063
5064
5065MAKEINFO_EXTRA_FLAGS=""
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
5067$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
5068if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
5069 $as_echo_n "(cached) " >&6
5070else
5071 echo '@clicksequence{a @click{} b}' >conftest.texinfo
5072 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
5073 gdb_cv_have_makeinfo_click=yes
5074 else
5075 gdb_cv_have_makeinfo_click=no
5076 fi
5077fi
5078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
5079$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
5080if test x"$gdb_cv_have_makeinfo_click" = xyes; then
5081 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
5082fi
e28b3332
DJ
5083
5084
bec39cab
AC
5085
5086
81ecdfbb
RW
5087# Check whether --with-separate-debug-dir was given.
5088if test "${with_separate_debug_dir+set}" = set; then :
5089 withval=$with_separate_debug_dir;
b14b1491
TT
5090 DEBUGDIR=$withval
5091else
5092 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
5093fi
5094
20e95c23 5095
783e057b
DJ
5096 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5097 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 5098 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 5099 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 5100
783e057b
DJ
5101cat >>confdefs.h <<_ACEOF
5102#define DEBUGDIR "$ac_define_dir"
20e95c23 5103_ACEOF
20e95c23 5104
20e95c23 5105
20e95c23 5106
0c4a4063 5107
b14b1491
TT
5108 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5109 if test "x$prefix" = xNONE; then
5110 test_prefix=/usr/local
5111 else
5112 test_prefix=$prefix
5113 fi
783e057b 5114 else
b14b1491 5115 test_prefix=$exec_prefix
783e057b 5116 fi
b14b1491
TT
5117 value=0
5118 case ${ac_define_dir} in
5119 "${test_prefix}"|"${test_prefix}/"*|\
5120 '${exec_prefix}'|'${exec_prefix}/'*)
5121 value=1
5122 ;;
5123 esac
5124
5125cat >>confdefs.h <<_ACEOF
5126#define DEBUGDIR_RELOCATABLE $value
5127_ACEOF
5128
5129
5130
0c4a4063 5131
f83d8a90
DE
5132# We can't pass paths as command line arguments.
5133# Mingw32 tries to be clever and will convert the paths for us.
5134# For example -DBINDIR="/usr/local/bin" passed on the command line may get
5135# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
5136# This breaks GDB's relocatable path conversions since paths passed in
5137# config.h would not get so translated, the path prefixes no longer match.
5138
5139 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5140 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5141 ac_define_dir=`eval echo $bindir`
5142 ac_define_dir=`eval echo $ac_define_dir`
5143
5144cat >>confdefs.h <<_ACEOF
5145#define BINDIR "$ac_define_dir"
5146_ACEOF
5147
5148
5149
b14b1491
TT
5150# GDB's datadir relocation
5151
5152
5153
81ecdfbb
RW
5154# Check whether --with-gdb-datadir was given.
5155if test "${with_gdb_datadir+set}" = set; then :
5156 withval=$with_gdb_datadir;
b14b1491 5157 GDB_DATADIR=$withval
20e95c23 5158else
b14b1491 5159 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
5160fi
5161
20e95c23 5162
b14b1491
TT
5163 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5164 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5165 ac_define_dir=`eval echo $GDB_DATADIR`
5166 ac_define_dir=`eval echo $ac_define_dir`
5167
5168cat >>confdefs.h <<_ACEOF
5169#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
5170_ACEOF
5171
b14b1491
TT
5172
5173
0c4a4063 5174
b14b1491
TT
5175 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
5176 if test "x$prefix" = xNONE; then
5177 test_prefix=/usr/local
5178 else
5179 test_prefix=$prefix
5180 fi
5181 else
5182 test_prefix=$exec_prefix
5183 fi
5184 value=0
5185 case ${ac_define_dir} in
5186 "${test_prefix}"|"${test_prefix}/"*|\
5187 '${exec_prefix}'|'${exec_prefix}/'*)
5188 value=1
5189 ;;
5190 esac
5191
5192cat >>confdefs.h <<_ACEOF
5193#define GDB_DATADIR_RELOCATABLE $value
5194_ACEOF
5195
5196
783e057b 5197
20e95c23 5198
0c4a4063 5199
81ecdfbb
RW
5200# Check whether --with-relocated-sources was given.
5201if test "${with_relocated_sources+set}" = set; then :
5202 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
5203
5204 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5205 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5206 ac_define_dir=`eval echo $reloc_srcdir`
5207 ac_define_dir=`eval echo $ac_define_dir`
5208
5209cat >>confdefs.h <<_ACEOF
5210#define RELOC_SRCDIR "$ac_define_dir"
5211_ACEOF
5212
5213
5214
81ecdfbb
RW
5215fi
5216
29b0e8a2 5217
7349ff92
JK
5218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
5219$as_echo_n "checking for default auto-load directory... " >&6; }
5220
5221# Check whether --with-auto-load-dir was given.
5222if test "${with_auto_load_dir+set}" = set; then :
5223 withval=$with_auto_load_dir;
5224else
1564a261 5225 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
5226fi
5227
1564a261 5228escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5229
5230 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5231 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5232 ac_define_dir=`eval echo $escape_dir`
5233 ac_define_dir=`eval echo $ac_define_dir`
5234
5235cat >>confdefs.h <<_ACEOF
5236#define AUTO_LOAD_DIR "$ac_define_dir"
5237_ACEOF
5238
5239
5240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5241$as_echo "$with_auto_load_dir" >&6; }
5242
bccbefd2
JK
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5244$as_echo_n "checking for default auto-load safe-path... " >&6; }
5245
5246# Check whether --with-auto-load-safe-path was given.
5247if test "${with_auto_load_safe_path+set}" = set; then :
5248 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5249 with_auto_load_safe_path="/"
5250 fi
bccbefd2 5251else
7349ff92 5252 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5253fi
5254
1564a261 5255escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5256
5257 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5258 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5259 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5260 ac_define_dir=`eval echo $ac_define_dir`
5261
5262cat >>confdefs.h <<_ACEOF
6dea1fbd 5263#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5264_ACEOF
5265
5266
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5268$as_echo "$with_auto_load_safe_path" >&6; }
5269
29b0e8a2 5270
20e95c23 5271
5ae98d25 5272subdirs="$subdirs testsuite"
20e95c23
DJ
5273
5274
783e057b 5275# Check whether to support alternative target configurations
81ecdfbb
RW
5276# Check whether --enable-targets was given.
5277if test "${enable_targets+set}" = set; then :
5278 enableval=$enable_targets; case "${enableval}" in
5279 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5280 ;;
5281 no) enable_targets= ;;
5282 *) enable_targets=$enableval ;;
5283esac
81ecdfbb
RW
5284fi
5285
20e95c23 5286
783e057b 5287# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5288# Check whether --enable-64-bit-bfd was given.
5289if test "${enable_64_bit_bfd+set}" = set; then :
5290 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5291 yes) want64=true ;;
5292 no) want64=false ;;
81ecdfbb 5293 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5294esac
5295else
5296 want64=false
81ecdfbb
RW
5297fi
5298
783e057b
DJ
5299# Provide defaults for some variables set by the per-host and per-target
5300# configuration.
5301gdb_host_obs=posix-hdep.o
20e95c23 5302
783e057b
DJ
5303if test "${target}" = "${host}"; then
5304 gdb_native=yes
5305else
5306 gdb_native=no
5307fi
20e95c23 5308
783e057b 5309. $srcdir/configure.host
20e95c23 5310
fb23d554
SDJ
5311# Add in the common host objects.
5312. $srcdir/common/common.host
5313gdb_host_obs="$gdb_host_obs $common_host_obs"
5314
783e057b 5315# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5316
783e057b
DJ
5317TARGET_OBS=
5318all_targets=
b292c783 5319HAVE_NATIVE_GCORE_TARGET=
20e95c23 5320
783e057b 5321for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5322do
783e057b
DJ
5323 if test "$targ_alias" = "all"; then
5324 all_targets=true
5325 else
5326 # Canonicalize the secondary target names.
5327 result=`$ac_config_sub $targ_alias 2>/dev/null`
5328 if test -n "$result"; then
5329 targ=$result
5330 else
5331 targ=$targ_alias
5332 fi
20e95c23 5333
783e057b 5334 . ${srcdir}/configure.tgt
20e95c23 5335
bf307134
JB
5336 if test -z "${gdb_target_obs}"; then :
5337 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5338fi
5339
783e057b
DJ
5340 # Target-specific object files
5341 for i in ${gdb_target_obs}; do
5342 case " $TARGET_OBS " in
5343 *" ${i} "*) ;;
5344 *)
5345 TARGET_OBS="$TARGET_OBS ${i}"
5346 ;;
5347 esac
5348 done
20e95c23 5349
783e057b
DJ
5350 # Check whether this target needs 64-bit CORE_ADDR
5351 if test x${want64} = xfalse; then
5352 . ${srcdir}/../bfd/config.bfd
5353 fi
b292c783
JK
5354
5355 # Check whether this target is native and supports gcore.
5356 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5357 && $gdb_have_gcore; then
5358 HAVE_NATIVE_GCORE_TARGET=1
5359 fi
783e057b 5360 fi
20e95c23
DJ
5361done
5362
783e057b
DJ
5363if test x${all_targets} = xtrue; then
5364
5365 # We want all 64-bit targets if we either:
5366 # - run on a 64-bit host or
5367 # - already require 64-bit support for some other target or
5368 # - the --enable-64-bit-bfd option was supplied
5369 # Otherwise we only support all 32-bit targets.
5370 #
5371 # NOTE: This test must be in sync with the corresponding
5372 # tests in BFD!
20e95c23 5373
783e057b 5374 if test x${want64} = xfalse; then
81ecdfbb
RW
5375 # The cast to long int works around a bug in the HP C Compiler
5376# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5377# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5378# This bug is HP SR number 8606223364.
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5380$as_echo_n "checking size of long... " >&6; }
5381if test "${ac_cv_sizeof_long+set}" = set; then :
5382 $as_echo_n "(cached) " >&6
c0993dbe 5383else
81ecdfbb 5384 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5385
81ecdfbb
RW
5386else
5387 if test "$ac_cv_type_long" = yes; then
5388 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5389$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5390{ as_fn_set_status 77
5391as_fn_error "cannot compute sizeof (long)
5392See \`config.log' for more details." "$LINENO" 5; }; }
5393 else
5394 ac_cv_sizeof_long=0
5395 fi
c0993dbe 5396fi
81ecdfbb 5397
c0993dbe 5398fi
81ecdfbb
RW
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5400$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5401
c0993dbe 5402
c0993dbe 5403
c0993dbe
UW
5404cat >>confdefs.h <<_ACEOF
5405#define SIZEOF_LONG $ac_cv_sizeof_long
5406_ACEOF
5407
5408
5409 if test "x${ac_cv_sizeof_long}" = "x8"; then
5410 want64=true
5411 fi
5412 fi
5413 if test x${want64} = xtrue; then
5414 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5415 else
5416 TARGET_OBS='$(ALL_TARGET_OBS)'
5417 fi
5418fi
5419
5420
5421
b292c783 5422
c0993dbe
UW
5423# For other settings, only the main target counts.
5424gdb_sim=
5425gdb_osabi=
5426build_gdbserver=
5427targ=$target; . ${srcdir}/configure.tgt
5428
5429# Fetch the default architecture and default target vector from BFD.
5430targ=$target; . $srcdir/../bfd/config.bfd
5431
5432# We only want the first architecture, so strip off the others if
5433# there is more than one.
5434targ_archs=`echo $targ_archs | sed 's/ .*//'`
5435
5436if test "x$targ_archs" != x; then
5437
5438cat >>confdefs.h <<_ACEOF
5439#define DEFAULT_BFD_ARCH $targ_archs
5440_ACEOF
5441
5442fi
5443if test "x$targ_defvec" != x; then
5444
5445cat >>confdefs.h <<_ACEOF
5446#define DEFAULT_BFD_VEC $targ_defvec
5447_ACEOF
5448
5449fi
5450
c0993dbe
UW
5451# The CLI cannot be disabled yet, but may be in the future.
5452
5453# Enable CLI.
81ecdfbb
RW
5454# Check whether --enable-gdbcli was given.
5455if test "${enable_gdbcli+set}" = set; then :
5456 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5457 yes)
5458 ;;
5459 no)
81ecdfbb 5460 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5461 *)
81ecdfbb 5462 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5463 esac
5464else
5465 enable_gdbcli=yes
81ecdfbb
RW
5466fi
5467
c0993dbe
UW
5468if test x"$enable_gdbcli" = xyes; then
5469 if test -d $srcdir/cli; then
5470 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5471 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5472 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5473 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5474 fi
5475fi
5476
5477# Enable MI.
81ecdfbb
RW
5478# Check whether --enable-gdbmi was given.
5479if test "${enable_gdbmi+set}" = set; then :
5480 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5481 yes | no)
5482 ;;
5483 *)
81ecdfbb 5484 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5485 esac
5486else
5487 enable_gdbmi=yes
81ecdfbb
RW
5488fi
5489
c0993dbe
UW
5490if test x"$enable_gdbmi" = xyes; then
5491 if test -d $srcdir/mi; then
5492 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5493 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5494 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5495 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5496 fi
5497fi
5498
5499# Enable TUI.
81ecdfbb
RW
5500# Check whether --enable-tui was given.
5501if test "${enable_tui+set}" = set; then :
5502 enableval=$enable_tui; case $enableval in
3ca64bd3 5503 yes | no | auto)
c0993dbe
UW
5504 ;;
5505 *)
81ecdfbb 5506 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5507 esac
5508else
3ca64bd3 5509 enable_tui=auto
81ecdfbb
RW
5510fi
5511
c0993dbe
UW
5512
5513# Enable gdbtk.
81ecdfbb
RW
5514# Check whether --enable-gdbtk was given.
5515if test "${enable_gdbtk+set}" = set; then :
5516 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5517 yes | no)
5518 ;;
5519 *)
81ecdfbb 5520 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5521 esac
5522else
5062cc19 5523 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5524 enable_gdbtk=yes
5525 else
5526 enable_gdbtk=no
5527 fi
81ecdfbb
RW
5528fi
5529
c0993dbe
UW
5530# We unconditionally disable gdbtk tests on selected platforms.
5531case $host_os in
5532 go32* | windows*)
81ecdfbb
RW
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5534$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5535 enable_gdbtk=no ;;
5536esac
5537
05e7c244 5538# Libunwind support for ia64.
bec39cab 5539
05e7c244
JK
5540
5541# Check whether --with-libunwind-ia64 was given.
5542if test "${with_libunwind_ia64+set}" = set; then :
5543 withval=$with_libunwind_ia64;
bec39cab 5544else
05e7c244
JK
5545 with_libunwind_ia64=auto
5546fi
bec39cab 5547
05e7c244
JK
5548
5549# Backward compatibility option.
5550if test "${with_libunwind+set}" = set; then
5551 if test x"$with_libunwind_ia64" != xauto; then
5552 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5553 fi
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5555$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5556 with_libunwind_ia64="$with_libunwind"
5557fi
5558
5559case "$with_libunwind_ia64" in
5560 yes | no)
5561 ;;
5562 auto)
5563 for ac_header in libunwind-ia64.h
81ecdfbb 5564do :
b54a8fd7
PA
5565 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5566if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5567 cat >>confdefs.h <<_ACEOF
b54a8fd7 5568#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5569_ACEOF
5570
5571fi
5572
5573done
5574
05e7c244
JK
5575 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5576 ;;
5577 *)
5578 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5579 ;;
5580esac
bec39cab 5581
05e7c244 5582if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5583 for ac_header in libunwind-ia64.h
81ecdfbb 5584do :
b54a8fd7
PA
5585 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5586if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5587 cat >>confdefs.h <<_ACEOF
b54a8fd7 5588#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5589_ACEOF
5590
5591fi
5592
5593done
5594
05e7c244
JK
5595 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5596 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5597 fi
5598 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5599 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5600 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5601fi
5602
cb01cfba
JB
5603opt_curses=no
5604
81ecdfbb
RW
5605# Check whether --with-curses was given.
5606if test "${with_curses+set}" = set; then :
5607 withval=$with_curses; opt_curses=$withval
5608fi
5609
cb01cfba 5610
76a39ba7 5611prefer_curses=no
cb01cfba 5612if test "$opt_curses" = "yes"; then
76a39ba7 5613 prefer_curses=yes
cb01cfba
JB
5614fi
5615
a9322a30 5616# Profiling support.
81ecdfbb
RW
5617# Check whether --enable-profiling was given.
5618if test "${enable_profiling+set}" = set; then :
5619 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5620 yes | no)
5621 ;;
5622 *)
81ecdfbb 5623 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5624 esac
5625else
5626 enable_profiling=no
81ecdfbb 5627fi
bec39cab 5628
a9322a30
TT
5629
5630for ac_func in monstartup _mcleanup
81ecdfbb
RW
5631do :
5632 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5633ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5634eval as_val=\$$as_ac_var
5635 if test "x$as_val" = x""yes; then :
5636 cat >>confdefs.h <<_ACEOF
5637#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5638_ACEOF
a9322a30 5639
81ecdfbb
RW
5640fi
5641done
a9322a30 5642
81ecdfbb
RW
5643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5644$as_echo_n "checking for _etext... " >&6; }
5645if test "${ac_cv_var__etext+set}" = set; then :
5646 $as_echo_n "(cached) " >&6
5647else
5648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5649/* end confdefs.h. */
5650#include <stdlib.h>
5651extern char _etext;
a9322a30
TT
5652
5653int
5654main ()
5655{
5656free (&_etext);
5657 ;
5658 return 0;
5659}
bec39cab 5660_ACEOF
81ecdfbb 5661if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5662 ac_cv_var__etext=yes
bec39cab 5663else
81ecdfbb 5664 ac_cv_var__etext=no
bec39cab 5665fi
81ecdfbb
RW
5666rm -f core conftest.err conftest.$ac_objext \
5667 conftest$ac_exeext conftest.$ac_ext
bec39cab 5668fi
81ecdfbb
RW
5669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5670$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5671if test $ac_cv_var__etext = yes; then
60ca704f 5672
81ecdfbb 5673$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5674
bec39cab 5675fi
81ecdfbb
RW
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5677$as_echo_n "checking for etext... " >&6; }
5678if test "${ac_cv_var_etext+set}" = set; then :
5679 $as_echo_n "(cached) " >&6
bec39cab 5680else
81ecdfbb 5681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5682/* end confdefs.h. */
a9322a30
TT
5683#include <stdlib.h>
5684extern char etext;
bec39cab
AC
5685
5686int
5687main ()
5688{
a9322a30 5689free (&etext);
bec39cab
AC
5690 ;
5691 return 0;
5692}
5693_ACEOF
81ecdfbb 5694if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5695 ac_cv_var_etext=yes
bec39cab 5696else
81ecdfbb 5697 ac_cv_var_etext=no
bec39cab 5698fi
81ecdfbb
RW
5699rm -f core conftest.err conftest.$ac_objext \
5700 conftest$ac_exeext conftest.$ac_ext
bec39cab 5701fi
81ecdfbb
RW
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5703$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5704if test $ac_cv_var_etext = yes; then
5705
81ecdfbb 5706$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5707
5708fi
a9322a30
TT
5709if test "$enable_profiling" = yes ; then
5710 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5711 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5712 fi
5713 PROFILE_CFLAGS=-pg
5714 OLD_CFLAGS="$CFLAGS"
5715 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5716
81ecdfbb
RW
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5718$as_echo_n "checking whether $CC supports -pg... " >&6; }
5719if test "${ac_cv_cc_supports_pg+set}" = set; then :
5720 $as_echo_n "(cached) " >&6
bec39cab 5721else
81ecdfbb 5722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5723/* end confdefs.h. */
bec39cab
AC
5724
5725int
5726main ()
5727{
a9322a30 5728int x;
bec39cab
AC
5729 ;
5730 return 0;
5731}
5732_ACEOF
81ecdfbb 5733if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5734 ac_cv_cc_supports_pg=yes
bec39cab 5735else
81ecdfbb 5736 ac_cv_cc_supports_pg=no
bec39cab 5737fi
81ecdfbb 5738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5739fi
81ecdfbb
RW
5740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5741$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5742
a9322a30 5743 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5744 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5745 fi
bec39cab 5746
a9322a30 5747 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5748fi
5749
c16158bc
JM
5750
5751
81ecdfbb
RW
5752# Check whether --with-pkgversion was given.
5753if test "${with_pkgversion+set}" = set; then :
5754 withval=$with_pkgversion; case "$withval" in
5755 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5756 no) PKGVERSION= ;;
5757 *) PKGVERSION="($withval) " ;;
5758 esac
5759else
5760 PKGVERSION="(GDB) "
5761
81ecdfbb 5762fi
c16158bc
JM
5763
5764
5765
5766
81ecdfbb
RW
5767
5768# Check whether --with-bugurl was given.
5769if test "${with_bugurl+set}" = set; then :
5770 withval=$with_bugurl; case "$withval" in
5771 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5772 no) BUGURL=
5773 ;;
5774 *) BUGURL="$withval"
5775 ;;
5776 esac
5777else
5778 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5779
81ecdfbb
RW
5780fi
5781
c16158bc
JM
5782 case ${BUGURL} in
5783 "")
5784 REPORT_BUGS_TO=
5785 REPORT_BUGS_TEXI=
5786 ;;
5787 *)
5788 REPORT_BUGS_TO="<$BUGURL>"
5789 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5790 ;;
5791 esac;
5792
5793
5794
5795
5796cat >>confdefs.h <<_ACEOF
5797#define PKGVERSION "$PKGVERSION"
5798_ACEOF
5799
5800
5801cat >>confdefs.h <<_ACEOF
5802#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5803_ACEOF
5804
5805
bec39cab
AC
5806# --------------------- #
5807# Checks for programs. #
5808# --------------------- #
5809
5810for ac_prog in gawk mawk nawk awk
5811do
5812 # Extract the first word of "$ac_prog", so it can be a program name with args.
5813set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5815$as_echo_n "checking for $ac_word... " >&6; }
5816if test "${ac_cv_prog_AWK+set}" = set; then :
5817 $as_echo_n "(cached) " >&6
bec39cab
AC
5818else
5819 if test -n "$AWK"; then
5820 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5821else
5822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5823for as_dir in $PATH
5824do
5825 IFS=$as_save_IFS
5826 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5827 for ac_exec_ext in '' $ac_executable_extensions; do
5828 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5829 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5831 break 2
5832 fi
5833done
81ecdfbb
RW
5834 done
5835IFS=$as_save_IFS
bec39cab
AC
5836
5837fi
5838fi
5839AWK=$ac_cv_prog_AWK
5840if test -n "$AWK"; then
81ecdfbb
RW
5841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5842$as_echo "$AWK" >&6; }
bec39cab 5843else
81ecdfbb
RW
5844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845$as_echo "no" >&6; }
bec39cab
AC
5846fi
5847
bec39cab 5848
81ecdfbb 5849 test -n "$AWK" && break
bec39cab
AC
5850done
5851
c971b7fa
PA
5852# Find a good install program. We prefer a C program (faster),
5853# so one script is as good as another. But avoid the broken or
5854# incompatible versions:
5855# SysV /etc/install, /usr/sbin/install
5856# SunOS /usr/etc/install
5857# IRIX /sbin/install
5858# AIX /bin/install
5859# AmigaOS /C/install, which installs bootblocks on floppy discs
5860# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5861# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5862# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5863# OS/2's system install, which has a completely different semantic
5864# ./install, which can be erroneously created by make from ./install.sh.
5865# Reject install programs that cannot install multiple files.
5866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5867$as_echo_n "checking for a BSD-compatible install... " >&6; }
5868if test -z "$INSTALL"; then
5869if test "${ac_cv_path_install+set}" = set; then :
5870 $as_echo_n "(cached) " >&6
5871else
5872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5873for as_dir in $PATH
5874do
5875 IFS=$as_save_IFS
5876 test -z "$as_dir" && as_dir=.
5877 # Account for people who put trailing slashes in PATH elements.
5878case $as_dir/ in #((
5879 ./ | .// | /[cC]/* | \
5880 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5881 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5882 /usr/ucb/* ) ;;
5883 *)
5884 # OSF1 and SCO ODT 3.0 have their own names for install.
5885 # Don't use installbsd from OSF since it installs stuff as root
5886 # by default.
5887 for ac_prog in ginstall scoinst install; do
5888 for ac_exec_ext in '' $ac_executable_extensions; do
5889 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5890 if test $ac_prog = install &&
5891 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5892 # AIX install. It has an incompatible calling convention.
5893 :
5894 elif test $ac_prog = install &&
5895 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5896 # program-specific install script used by HP pwplus--don't use.
5897 :
5898 else
5899 rm -rf conftest.one conftest.two conftest.dir
5900 echo one > conftest.one
5901 echo two > conftest.two
5902 mkdir conftest.dir
5903 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5904 test -s conftest.one && test -s conftest.two &&
5905 test -s conftest.dir/conftest.one &&
5906 test -s conftest.dir/conftest.two
5907 then
5908 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5909 break 3
5910 fi
5911 fi
5912 fi
5913 done
5914 done
5915 ;;
5916esac
5917
5918 done
5919IFS=$as_save_IFS
5920
5921rm -rf conftest.one conftest.two conftest.dir
5922
5923fi
5924 if test "${ac_cv_path_install+set}" = set; then
5925 INSTALL=$ac_cv_path_install
5926 else
5927 # As a last resort, use the slow shell script. Don't cache a
5928 # value for INSTALL within a source directory, because that will
5929 # break other packages using the cache if that directory is
5930 # removed, or if the value is a relative name.
5931 INSTALL=$ac_install_sh
5932 fi
5933fi
5934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5935$as_echo "$INSTALL" >&6; }
5936
5937# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5938# It thinks the first close brace ends the variable substitution.
5939test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5940
5941test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5942
5943test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5944
81ecdfbb
RW
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5946$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5947LN_S=$as_ln_s
5948if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5950$as_echo "yes" >&6; }
bec39cab 5951else
81ecdfbb
RW
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5953$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5954fi
5955
5956if test -n "$ac_tool_prefix"; then
5957 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5958set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5960$as_echo_n "checking for $ac_word... " >&6; }
5961if test "${ac_cv_prog_RANLIB+set}" = set; then :
5962 $as_echo_n "(cached) " >&6
bec39cab
AC
5963else
5964 if test -n "$RANLIB"; then
5965 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5966else
5967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5968for as_dir in $PATH
5969do
5970 IFS=$as_save_IFS
5971 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5972 for ac_exec_ext in '' $ac_executable_extensions; do
5973 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5974 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5976 break 2
5977 fi
5978done
81ecdfbb
RW
5979 done
5980IFS=$as_save_IFS
bec39cab
AC
5981
5982fi
5983fi
5984RANLIB=$ac_cv_prog_RANLIB
5985if test -n "$RANLIB"; then
81ecdfbb
RW
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5987$as_echo "$RANLIB" >&6; }
bec39cab 5988else
81ecdfbb
RW
5989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990$as_echo "no" >&6; }
bec39cab
AC
5991fi
5992
81ecdfbb 5993
bec39cab
AC
5994fi
5995if test -z "$ac_cv_prog_RANLIB"; then
5996 ac_ct_RANLIB=$RANLIB
5997 # Extract the first word of "ranlib", so it can be a program name with args.
5998set dummy ranlib; ac_word=$2
81ecdfbb
RW
5999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000$as_echo_n "checking for $ac_word... " >&6; }
6001if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6002 $as_echo_n "(cached) " >&6
bec39cab
AC
6003else
6004 if test -n "$ac_ct_RANLIB"; then
6005 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6006else
6007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010 IFS=$as_save_IFS
6011 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6012 for ac_exec_ext in '' $ac_executable_extensions; do
6013 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6014 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 6015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6016 break 2
6017 fi
6018done
81ecdfbb
RW
6019 done
6020IFS=$as_save_IFS
bec39cab 6021
bec39cab
AC
6022fi
6023fi
6024ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6025if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6027$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 6028else
81ecdfbb
RW
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
bec39cab
AC
6031fi
6032
81ecdfbb
RW
6033 if test "x$ac_ct_RANLIB" = x; then
6034 RANLIB=":"
6035 else
6036 case $cross_compiling:$ac_tool_warned in
6037yes:)
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6040ac_tool_warned=yes ;;
6041esac
6042 RANLIB=$ac_ct_RANLIB
6043 fi
bec39cab
AC
6044else
6045 RANLIB="$ac_cv_prog_RANLIB"
6046fi
6047
6048for ac_prog in 'bison -y' byacc
6049do
6050 # Extract the first word of "$ac_prog", so it can be a program name with args.
6051set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
6054if test "${ac_cv_prog_YACC+set}" = set; then :
6055 $as_echo_n "(cached) " >&6
bec39cab
AC
6056else
6057 if test -n "$YACC"; then
6058 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6059else
6060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063 IFS=$as_save_IFS
6064 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6065 for ac_exec_ext in '' $ac_executable_extensions; do
6066 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6067 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 6068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6069 break 2
6070 fi
6071done
81ecdfbb
RW
6072 done
6073IFS=$as_save_IFS
bec39cab
AC
6074
6075fi
6076fi
6077YACC=$ac_cv_prog_YACC
6078if test -n "$YACC"; then
81ecdfbb
RW
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6080$as_echo "$YACC" >&6; }
bec39cab 6081else
81ecdfbb
RW
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083$as_echo "no" >&6; }
bec39cab
AC
6084fi
6085
81ecdfbb 6086
bec39cab
AC
6087 test -n "$YACC" && break
6088done
6089test -n "$YACC" || YACC="yacc"
6090
6091
6092if test -n "$ac_tool_prefix"; then
6093 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6094set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096$as_echo_n "checking for $ac_word... " >&6; }
6097if test "${ac_cv_prog_AR+set}" = set; then :
6098 $as_echo_n "(cached) " >&6
bec39cab
AC
6099else
6100 if test -n "$AR"; then
6101 ac_cv_prog_AR="$AR" # Let the user override the test.
6102else
6103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6104for as_dir in $PATH
6105do
6106 IFS=$as_save_IFS
6107 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6108 for ac_exec_ext in '' $ac_executable_extensions; do
6109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6110 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 6111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6112 break 2
6113 fi
6114done
81ecdfbb
RW
6115 done
6116IFS=$as_save_IFS
bec39cab
AC
6117
6118fi
6119fi
6120AR=$ac_cv_prog_AR
6121if test -n "$AR"; then
81ecdfbb
RW
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6123$as_echo "$AR" >&6; }
bec39cab 6124else
81ecdfbb
RW
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126$as_echo "no" >&6; }
bec39cab
AC
6127fi
6128
81ecdfbb 6129
bec39cab
AC
6130fi
6131if test -z "$ac_cv_prog_AR"; then
6132 ac_ct_AR=$AR
6133 # Extract the first word of "ar", so it can be a program name with args.
6134set dummy ar; ac_word=$2
81ecdfbb
RW
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6136$as_echo_n "checking for $ac_word... " >&6; }
6137if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6138 $as_echo_n "(cached) " >&6
bec39cab
AC
6139else
6140 if test -n "$ac_ct_AR"; then
6141 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6142else
6143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144for as_dir in $PATH
6145do
6146 IFS=$as_save_IFS
6147 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6148 for ac_exec_ext in '' $ac_executable_extensions; do
6149 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6150 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 6151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6152 break 2
6153 fi
6154done
81ecdfbb
RW
6155 done
6156IFS=$as_save_IFS
bec39cab
AC
6157
6158fi
6159fi
6160ac_ct_AR=$ac_cv_prog_ac_ct_AR
6161if test -n "$ac_ct_AR"; then
81ecdfbb
RW
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6163$as_echo "$ac_ct_AR" >&6; }
bec39cab 6164else
81ecdfbb
RW
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6166$as_echo "no" >&6; }
bec39cab
AC
6167fi
6168
81ecdfbb
RW
6169 if test "x$ac_ct_AR" = x; then
6170 AR=""
6171 else
6172 case $cross_compiling:$ac_tool_warned in
6173yes:)
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6176ac_tool_warned=yes ;;
6177esac
6178 AR=$ac_ct_AR
6179 fi
bec39cab
AC
6180else
6181 AR="$ac_cv_prog_AR"
6182fi
6183
6184if test -n "$ac_tool_prefix"; then
6185 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6186set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
6190 $as_echo_n "(cached) " >&6
bec39cab
AC
6191else
6192 if test -n "$DLLTOOL"; then
6193 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6194else
6195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196for as_dir in $PATH
6197do
6198 IFS=$as_save_IFS
6199 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6200 for ac_exec_ext in '' $ac_executable_extensions; do
6201 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6202 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 6203 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6204 break 2
6205 fi
6206done
81ecdfbb
RW
6207 done
6208IFS=$as_save_IFS
bec39cab
AC
6209
6210fi
6211fi
6212DLLTOOL=$ac_cv_prog_DLLTOOL
6213if test -n "$DLLTOOL"; then
81ecdfbb
RW
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6215$as_echo "$DLLTOOL" >&6; }
bec39cab 6216else
81ecdfbb
RW
6217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218$as_echo "no" >&6; }
bec39cab
AC
6219fi
6220
81ecdfbb 6221
bec39cab
AC
6222fi
6223if test -z "$ac_cv_prog_DLLTOOL"; then
6224 ac_ct_DLLTOOL=$DLLTOOL
6225 # Extract the first word of "dlltool", so it can be a program name with args.
6226set dummy dlltool; ac_word=$2
81ecdfbb
RW
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6228$as_echo_n "checking for $ac_word... " >&6; }
6229if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
6230 $as_echo_n "(cached) " >&6
bec39cab
AC
6231else
6232 if test -n "$ac_ct_DLLTOOL"; then
6233 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6234else
6235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236for as_dir in $PATH
6237do
6238 IFS=$as_save_IFS
6239 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6240 for ac_exec_ext in '' $ac_executable_extensions; do
6241 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6242 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6244 break 2
6245 fi
6246done
81ecdfbb
RW
6247 done
6248IFS=$as_save_IFS
bec39cab
AC
6249
6250fi
6251fi
6252ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6253if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6255$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6256else
81ecdfbb
RW
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258$as_echo "no" >&6; }
bec39cab
AC
6259fi
6260
81ecdfbb
RW
6261 if test "x$ac_ct_DLLTOOL" = x; then
6262 DLLTOOL=""
6263 else
6264 case $cross_compiling:$ac_tool_warned in
6265yes:)
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6268ac_tool_warned=yes ;;
6269esac
6270 DLLTOOL=$ac_ct_DLLTOOL
6271 fi
bec39cab
AC
6272else
6273 DLLTOOL="$ac_cv_prog_DLLTOOL"
6274fi
6275
6276if test -n "$ac_tool_prefix"; then
6277 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6278set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280$as_echo_n "checking for $ac_word... " >&6; }
6281if test "${ac_cv_prog_WINDRES+set}" = set; then :
6282 $as_echo_n "(cached) " >&6
bec39cab
AC
6283else
6284 if test -n "$WINDRES"; then
6285 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6286else
6287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288for as_dir in $PATH
6289do
6290 IFS=$as_save_IFS
6291 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6292 for ac_exec_ext in '' $ac_executable_extensions; do
6293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6294 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6296 break 2
6297 fi
6298done
81ecdfbb
RW
6299 done
6300IFS=$as_save_IFS
bec39cab
AC
6301
6302fi
6303fi
6304WINDRES=$ac_cv_prog_WINDRES
6305if test -n "$WINDRES"; then
81ecdfbb
RW
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6307$as_echo "$WINDRES" >&6; }
bec39cab 6308else
81ecdfbb
RW
6309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310$as_echo "no" >&6; }
bec39cab
AC
6311fi
6312
81ecdfbb 6313
bec39cab
AC
6314fi
6315if test -z "$ac_cv_prog_WINDRES"; then
6316 ac_ct_WINDRES=$WINDRES
6317 # Extract the first word of "windres", so it can be a program name with args.
6318set dummy windres; ac_word=$2
81ecdfbb
RW
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6320$as_echo_n "checking for $ac_word... " >&6; }
6321if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6322 $as_echo_n "(cached) " >&6
bec39cab
AC
6323else
6324 if test -n "$ac_ct_WINDRES"; then
6325 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6326else
6327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6328for as_dir in $PATH
6329do
6330 IFS=$as_save_IFS
6331 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6332 for ac_exec_ext in '' $ac_executable_extensions; do
6333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6334 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6336 break 2
6337 fi
6338done
81ecdfbb
RW
6339 done
6340IFS=$as_save_IFS
bec39cab
AC
6341
6342fi
6343fi
6344ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6345if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6347$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6348else
81ecdfbb
RW
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }
c906108c 6351fi
bec39cab 6352
81ecdfbb
RW
6353 if test "x$ac_ct_WINDRES" = x; then
6354 WINDRES=""
6355 else
6356 case $cross_compiling:$ac_tool_warned in
6357yes:)
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6359$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6360ac_tool_warned=yes ;;
6361esac
6362 WINDRES=$ac_ct_WINDRES
6363 fi
c906108c 6364else
bec39cab 6365 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6366fi
6367
bec39cab 6368
036c3acb
TS
6369case $host_os in
6370 gnu*)
6371 # Needed for GNU Hurd hosts.
6372 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6373 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6374set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6376$as_echo_n "checking for $ac_word... " >&6; }
6377if test "${ac_cv_prog_MIG+set}" = set; then :
6378 $as_echo_n "(cached) " >&6
c906108c 6379else
bec39cab
AC
6380 if test -n "$MIG"; then
6381 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6382else
6383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6384for as_dir in $PATH
6385do
6386 IFS=$as_save_IFS
6387 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6388 for ac_exec_ext in '' $ac_executable_extensions; do
6389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6390 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6392 break 2
6393 fi
6394done
81ecdfbb
RW
6395 done
6396IFS=$as_save_IFS
bec39cab 6397
c906108c 6398fi
bec39cab
AC
6399fi
6400MIG=$ac_cv_prog_MIG
6401if test -n "$MIG"; then
81ecdfbb
RW
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6403$as_echo "$MIG" >&6; }
c906108c 6404else
81ecdfbb
RW
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; }
c906108c
SS
6407fi
6408
81ecdfbb 6409
bec39cab
AC
6410fi
6411if test -z "$ac_cv_prog_MIG"; then
6412 ac_ct_MIG=$MIG
6413 # Extract the first word of "mig", so it can be a program name with args.
6414set dummy mig; ac_word=$2
81ecdfbb
RW
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6418 $as_echo_n "(cached) " >&6
bec39cab
AC
6419else
6420 if test -n "$ac_ct_MIG"; then
6421 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6422else
6423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424for as_dir in $PATH
6425do
6426 IFS=$as_save_IFS
6427 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6428 for ac_exec_ext in '' $ac_executable_extensions; do
6429 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6430 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6431 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6432 break 2
6433 fi
6434done
81ecdfbb
RW
6435 done
6436IFS=$as_save_IFS
c906108c 6437
bec39cab
AC
6438fi
6439fi
6440ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6441if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6443$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6444else
81ecdfbb
RW
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6446$as_echo "no" >&6; }
bec39cab 6447fi
c906108c 6448
81ecdfbb
RW
6449 if test "x$ac_ct_MIG" = x; then
6450 MIG=""
6451 else
6452 case $cross_compiling:$ac_tool_warned in
6453yes:)
6454{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6455$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6456ac_tool_warned=yes ;;
6457esac
6458 MIG=$ac_ct_MIG
6459 fi
bec39cab
AC
6460else
6461 MIG="$ac_cv_prog_MIG"
6462fi
c906108c 6463
036c3acb
TS
6464 if test x"$MIG" = x; then
6465 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6466 fi
6467 ;;
6468esac
c906108c 6469
bec39cab
AC
6470# ---------------------- #
6471# Checks for libraries. #
6472# ---------------------- #
c906108c 6473
bec39cab 6474# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6476$as_echo_n "checking for main in -lm... " >&6; }
6477if test "${ac_cv_lib_m_main+set}" = set; then :
6478 $as_echo_n "(cached) " >&6
bec39cab
AC
6479else
6480 ac_check_lib_save_LIBS=$LIBS
6481LIBS="-lm $LIBS"
81ecdfbb 6482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6483/* end confdefs.h. */
c906108c 6484
c906108c 6485
bec39cab
AC
6486int
6487main ()
6488{
81ecdfbb 6489return main ();
bec39cab
AC
6490 ;
6491 return 0;
6492}
6493_ACEOF
81ecdfbb 6494if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6495 ac_cv_lib_m_main=yes
6496else
81ecdfbb 6497 ac_cv_lib_m_main=no
bec39cab 6498fi
81ecdfbb
RW
6499rm -f core conftest.err conftest.$ac_objext \
6500 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6501LIBS=$ac_check_lib_save_LIBS
6502fi
81ecdfbb
RW
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6504$as_echo "$ac_cv_lib_m_main" >&6; }
6505if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6506 cat >>confdefs.h <<_ACEOF
6507#define HAVE_LIBM 1
6508_ACEOF
6509
6510 LIBS="-lm $LIBS"
c906108c 6511
c906108c 6512fi
bec39cab
AC
6513
6514
6515# We need to link with -lw to get `wctype' on Solaris before Solaris
6516# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6517# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6518# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6519ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6520if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6521
c906108c 6522else
81ecdfbb
RW
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6524$as_echo_n "checking for wctype in -lw... " >&6; }
6525if test "${ac_cv_lib_w_wctype+set}" = set; then :
6526 $as_echo_n "(cached) " >&6
bec39cab
AC
6527else
6528 ac_check_lib_save_LIBS=$LIBS
6529LIBS="-lw $LIBS"
81ecdfbb 6530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6531/* end confdefs.h. */
c906108c 6532
81ecdfbb
RW
6533/* Override any GCC internal prototype to avoid an error.
6534 Use char because int might match the return type of a GCC
6535 builtin and then its argument prototype would still apply. */
bec39cab
AC
6536#ifdef __cplusplus
6537extern "C"
6538#endif
bec39cab
AC
6539char wctype ();
6540int
6541main ()
6542{
81ecdfbb 6543return wctype ();
bec39cab
AC
6544 ;
6545 return 0;
6546}
6547_ACEOF
81ecdfbb 6548if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6549 ac_cv_lib_w_wctype=yes
6550else
81ecdfbb 6551 ac_cv_lib_w_wctype=no
bec39cab 6552fi
81ecdfbb
RW
6553rm -f core conftest.err conftest.$ac_objext \
6554 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6555LIBS=$ac_check_lib_save_LIBS
6556fi
81ecdfbb
RW
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6558$as_echo "$ac_cv_lib_w_wctype" >&6; }
6559if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6560 cat >>confdefs.h <<_ACEOF
6561#define HAVE_LIBW 1
6562_ACEOF
c906108c 6563
bec39cab 6564 LIBS="-lw $LIBS"
c906108c 6565
bec39cab 6566fi
c906108c 6567
bec39cab 6568fi
c906108c 6569
ddc9cd0f 6570
bec39cab 6571# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6573$as_echo_n "checking for library containing gethostbyname... " >&6; }
6574if test "${ac_cv_search_gethostbyname+set}" = set; then :
6575 $as_echo_n "(cached) " >&6
bec39cab
AC
6576else
6577 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6579/* end confdefs.h. */
ddc9cd0f 6580
81ecdfbb
RW
6581/* Override any GCC internal prototype to avoid an error.
6582 Use char because int might match the return type of a GCC
6583 builtin and then its argument prototype would still apply. */
bec39cab
AC
6584#ifdef __cplusplus
6585extern "C"
6586#endif
bec39cab
AC
6587char gethostbyname ();
6588int
6589main ()
6590{
81ecdfbb 6591return gethostbyname ();
bec39cab
AC
6592 ;
6593 return 0;
6594}
6595_ACEOF
81ecdfbb
RW
6596for ac_lib in '' nsl; do
6597 if test -z "$ac_lib"; then
6598 ac_res="none required"
6599 else
6600 ac_res=-l$ac_lib
b4e70030 6601 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6602 fi
6603 if ac_fn_c_try_link "$LINENO"; then :
6604 ac_cv_search_gethostbyname=$ac_res
6605fi
6606rm -f core conftest.err conftest.$ac_objext \
6607 conftest$ac_exeext
6608 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6609 break
6610fi
6611done
6612if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6613
bec39cab 6614else
81ecdfbb 6615 ac_cv_search_gethostbyname=no
bec39cab 6616fi
81ecdfbb 6617rm conftest.$ac_ext
bec39cab
AC
6618LIBS=$ac_func_search_save_LIBS
6619fi
81ecdfbb
RW
6620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6621$as_echo "$ac_cv_search_gethostbyname" >&6; }
6622ac_res=$ac_cv_search_gethostbyname
6623if test "$ac_res" != no; then :
6624 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6625
bec39cab 6626fi
96baa820 6627
c906108c 6628
b4e70030 6629# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6631$as_echo_n "checking for library containing socketpair... " >&6; }
6632if test "${ac_cv_search_socketpair+set}" = set; then :
6633 $as_echo_n "(cached) " >&6
b4e70030
JB
6634else
6635 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6637/* end confdefs.h. */
6638
81ecdfbb
RW
6639/* Override any GCC internal prototype to avoid an error.
6640 Use char because int might match the return type of a GCC
6641 builtin and then its argument prototype would still apply. */
b4e70030
JB
6642#ifdef __cplusplus
6643extern "C"
6644#endif
b4e70030
JB
6645char socketpair ();
6646int
6647main ()
6648{
81ecdfbb 6649return socketpair ();
b4e70030
JB
6650 ;
6651 return 0;
6652}
6653_ACEOF
81ecdfbb
RW
6654for ac_lib in '' socket; do
6655 if test -z "$ac_lib"; then
6656 ac_res="none required"
6657 else
6658 ac_res=-l$ac_lib
b4e70030 6659 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6660 fi
6661 if ac_fn_c_try_link "$LINENO"; then :
6662 ac_cv_search_socketpair=$ac_res
6663fi
6664rm -f core conftest.err conftest.$ac_objext \
6665 conftest$ac_exeext
6666 if test "${ac_cv_search_socketpair+set}" = set; then :
6667 break
6668fi
6669done
6670if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6671
b4e70030 6672else
81ecdfbb 6673 ac_cv_search_socketpair=no
b4e70030 6674fi
81ecdfbb 6675rm conftest.$ac_ext
b4e70030
JB
6676LIBS=$ac_func_search_save_LIBS
6677fi
81ecdfbb
RW
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6679$as_echo "$ac_cv_search_socketpair" >&6; }
6680ac_res=$ac_cv_search_socketpair
6681if test "$ac_res" != no; then :
6682 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6683
6684fi
6685
6686
233a11ab 6687# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6688
6689 # See if the user specified whether he wants zlib support or not.
6690
6691# Check whether --with-zlib was given.
6692if test "${with_zlib+set}" = set; then :
6693 withval=$with_zlib;
6694else
6695 with_zlib=auto
6696fi
6697
6698
6699 if test "$with_zlib" != "no"; then
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6701$as_echo_n "checking for library containing zlibVersion... " >&6; }
6702if test "${ac_cv_search_zlibVersion+set}" = set; then :
6703 $as_echo_n "(cached) " >&6
233a11ab
CS
6704else
6705 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6707/* end confdefs.h. */
6708
81ecdfbb
RW
6709/* Override any GCC internal prototype to avoid an error.
6710 Use char because int might match the return type of a GCC
233a11ab 6711 builtin and then its argument prototype would still apply. */
233a11ab
CS
6712#ifdef __cplusplus
6713extern "C"
6714#endif
233a11ab
CS
6715char zlibVersion ();
6716int
6717main ()
6718{
81ecdfbb 6719return zlibVersion ();
233a11ab
CS
6720 ;
6721 return 0;
6722}
6723_ACEOF
81ecdfbb
RW
6724for ac_lib in '' z; do
6725 if test -z "$ac_lib"; then
6726 ac_res="none required"
233a11ab 6727 else
81ecdfbb
RW
6728 ac_res=-l$ac_lib
6729 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6730 fi
81ecdfbb
RW
6731 if ac_fn_c_try_link "$LINENO"; then :
6732 ac_cv_search_zlibVersion=$ac_res
233a11ab 6733fi
81ecdfbb
RW
6734rm -f core conftest.err conftest.$ac_objext \
6735 conftest$ac_exeext
6736 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6737 break
233a11ab 6738fi
81ecdfbb
RW
6739done
6740if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6741
233a11ab 6742else
81ecdfbb 6743 ac_cv_search_zlibVersion=no
233a11ab 6744fi
81ecdfbb
RW
6745rm conftest.$ac_ext
6746LIBS=$ac_func_search_save_LIBS
233a11ab 6747fi
81ecdfbb
RW
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6749$as_echo "$ac_cv_search_zlibVersion" >&6; }
6750ac_res=$ac_cv_search_zlibVersion
6751if test "$ac_res" != no; then :
6752 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6753 for ac_header in zlib.h
6754do :
6755 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6756if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6757 cat >>confdefs.h <<_ACEOF
81ecdfbb 6758#define HAVE_ZLIB_H 1
233a11ab
CS
6759_ACEOF
6760
6761fi
6762
6763done
6764
6765fi
6766
b040ad30
JB
6767 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6768 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6769 fi
6770 fi
6771
233a11ab 6772
77f120bf 6773# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6775$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6776if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6777 $as_echo_n "(cached) " >&6
bec39cab
AC
6778else
6779 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6781/* end confdefs.h. */
c906108c 6782
81ecdfbb
RW
6783/* Override any GCC internal prototype to avoid an error.
6784 Use char because int might match the return type of a GCC
6785 builtin and then its argument prototype would still apply. */
bec39cab
AC
6786#ifdef __cplusplus
6787extern "C"
6788#endif
77f120bf 6789char dlgetmodinfo ();
bec39cab
AC
6790int
6791main ()
6792{
81ecdfbb 6793return dlgetmodinfo ();
bec39cab
AC
6794 ;
6795 return 0;
6796}
6797_ACEOF
81ecdfbb
RW
6798for ac_lib in '' dl xpdl; do
6799 if test -z "$ac_lib"; then
6800 ac_res="none required"
6801 else
6802 ac_res=-l$ac_lib
b4e70030 6803 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6804 fi
6805 if ac_fn_c_try_link "$LINENO"; then :
6806 ac_cv_search_dlgetmodinfo=$ac_res
6807fi
6808rm -f core conftest.err conftest.$ac_objext \
6809 conftest$ac_exeext
6810 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6811 break
6812fi
6813done
6814if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6815
4e8d927d 6816else
81ecdfbb 6817 ac_cv_search_dlgetmodinfo=no
1ba607ad 6818fi
81ecdfbb 6819rm conftest.$ac_ext
bec39cab
AC
6820LIBS=$ac_func_search_save_LIBS
6821fi
81ecdfbb
RW
6822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6823$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6824ac_res=$ac_cv_search_dlgetmodinfo
6825if test "$ac_res" != no; then :
6826 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6827
8bb2c122 6828fi
8bb2c122 6829
8bb2c122 6830
77f120bf 6831
77f120bf 6832
6c7a06a3 6833
81ecdfbb
RW
6834# Check whether --with-libiconv-prefix was given.
6835if test "${with_libiconv_prefix+set}" = set; then :
6836 withval=$with_libiconv_prefix;
6c7a06a3 6837 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6838 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6839 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6840 done
6841
81ecdfbb
RW
6842fi
6843
6c7a06a3 6844
f18c4681 6845 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6846 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6847
81ecdfbb
RW
6848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6849$as_echo_n "checking for iconv... " >&6; }
6850if test "${am_cv_func_iconv+set}" = set; then :
6851 $as_echo_n "(cached) " >&6
d542061a 6852else
6c7a06a3
TT
6853
6854 am_cv_func_iconv="no, consider installing GNU libiconv"
6855 am_cv_lib_iconv=no
6856 am_cv_use_build_libiconv=no
f0f20949 6857 am_cv_build_libiconv_path=
4edb1e84
JB
6858
6859 # If libiconv is part of the build tree, then try using it over
6860 # any system iconv.
6861 if test -d ../libiconv; then
f18c4681
JB
6862 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6863 am_save_LIBS="$LIBS"
6864 am_save_CPPFLAGS="$CPPFLAGS"
6865 LIBS="$LIBS $lib_dir/libiconv.a"
6866 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6868/* end confdefs.h. */
6c7a06a3
TT
6869#include <stdlib.h>
6870#include <iconv.h>
d542061a
UW
6871int
6872main ()
6873{
6c7a06a3 6874iconv_t cd = iconv_open("","");
f18c4681
JB
6875 iconv(cd,NULL,NULL,NULL,NULL);
6876 iconv_close(cd);
d542061a
UW
6877 ;
6878 return 0;
6879}
6880_ACEOF
81ecdfbb 6881if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6882 am_cv_use_build_libiconv=yes
f0f20949 6883 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6884 am_cv_lib_iconv=yes
6885 am_cv_func_iconv=yes
d542061a 6886fi
81ecdfbb
RW
6887rm -f core conftest.err conftest.$ac_objext \
6888 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6889 LIBS="$am_save_LIBS"
6890 CPPFLAGS="$am_save_CPPFLAGS"
6891 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6892 break
6893 fi
6894 done
4edb1e84 6895 fi
94ae1714 6896
4edb1e84 6897 # Next, try to find iconv in libc.
6c7a06a3 6898 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6900/* end confdefs.h. */
6c7a06a3
TT
6901#include <stdlib.h>
6902#include <iconv.h>
d542061a
UW
6903int
6904main ()
6905{
6c7a06a3
TT
6906iconv_t cd = iconv_open("","");
6907 iconv(cd,NULL,NULL,NULL,NULL);
6908 iconv_close(cd);
d542061a
UW
6909 ;
6910 return 0;
6911}
6912_ACEOF
81ecdfbb 6913if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6914 am_cv_func_iconv=yes
d542061a 6915fi
81ecdfbb
RW
6916rm -f core conftest.err conftest.$ac_objext \
6917 conftest$ac_exeext conftest.$ac_ext
77f120bf 6918 fi
94ae1714 6919
4edb1e84
JB
6920 # If iconv was not in libc, try -liconv. In this case, arrange to
6921 # look in the libiconv prefix, if it was specified by the user.
6922 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6923 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6924 am_save_LIBS="$LIBS"
6925 if test -n "$LIBICONV_INCLUDE"; then
6926 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6927 LIBS="$LIBS $LIBICONV_LIBDIR"
6928 fi
6929 LIBS="$LIBS -liconv"
81ecdfbb 6930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6931/* end confdefs.h. */
6c7a06a3
TT
6932#include <stdlib.h>
6933#include <iconv.h>
bec39cab
AC
6934int
6935main ()
6936{
6c7a06a3
TT
6937iconv_t cd = iconv_open("","");
6938 iconv(cd,NULL,NULL,NULL,NULL);
6939 iconv_close(cd);
bec39cab
AC
6940 ;
6941 return 0;
6942}
6943_ACEOF
81ecdfbb 6944if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6945 am_cv_lib_iconv=yes
6c7a06a3 6946 am_cv_func_iconv=yes
627af7ea 6947fi
81ecdfbb
RW
6948rm -f core conftest.err conftest.$ac_objext \
6949 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6950 LIBS="$am_save_LIBS"
fc3b640d 6951 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6952 fi
6953
6954fi
81ecdfbb
RW
6955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6956$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6957
6958 # Set the various flags based on the cache variables. We can't rely
6959 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6960 LIBICONV=
6961 if test "$am_cv_lib_iconv" = yes; then
6962 LIBICONV="-liconv"
94ae1714
TT
6963 else
6964 LIBICONV_LIBDIR=
6965 LIBICONV_INCLUDE=
fc3b640d
TT
6966 fi
6967 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6968 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6969 LIBICONV_LIBDIR=""
fc3b640d
TT
6970 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6971 fi
6972 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6973 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6974
6c7a06a3
TT
6975 if test "$am_cv_func_iconv" = yes; then
6976
81ecdfbb 6977$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6978
81ecdfbb
RW
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6980$as_echo_n "checking for iconv declaration... " >&6; }
6981 if test "${am_cv_proto_iconv+set}" = set; then :
6982 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6983else
6984
81ecdfbb 6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6986/* end confdefs.h. */
6987
6c7a06a3
TT
6988#include <stdlib.h>
6989#include <iconv.h>
6990extern
b4e70030 6991#ifdef __cplusplus
6c7a06a3 6992"C"
b4e70030 6993#endif
6c7a06a3
TT
6994#if defined(__STDC__) || defined(__cplusplus)
6995size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6996#else
6997size_t iconv();
6998#endif
6999
b4e70030
JB
7000int
7001main ()
7002{
6c7a06a3 7003
b4e70030
JB
7004 ;
7005 return 0;
7006}
7007_ACEOF
81ecdfbb 7008if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 7009 am_cv_proto_iconv_arg1=""
4e8d927d 7010else
81ecdfbb 7011 am_cv_proto_iconv_arg1="const"
b4e70030 7012fi
81ecdfbb 7013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
7014 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);"
7015fi
7016
7017 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 7019 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
7020$as_echo "${ac_t:-
7021 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
7022
7023cat >>confdefs.h <<_ACEOF
7024#define ICONV_CONST $am_cv_proto_iconv_arg1
7025_ACEOF
7026
7027 fi
6c7a06a3
TT
7028
7029
478aac75
DE
7030# GDB may fork/exec the iconv program to get the list of supported character
7031# sets. Allow the user to specify where to find it.
7032# There are several factors affecting the choice of option name:
7033# - There is already --with-libiconv-prefix but we can't use it, it specifies
7034# the build-time location of libiconv files.
7035# - The program we need to find is iconv, which comes with glibc. The user
7036# doesn't necessarily have libiconv installed. Therefore naming this
7037# --with-libiconv-foo feels wrong.
7038# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
7039# defined to work on directories not files (though it really doesn't know
7040# the difference).
7041# - Calling this --with-iconv-prefix is perceived to cause too much confusion
7042# with --with-libiconv-prefix.
7043# Putting these together is why the option name is --with-iconv-bin.
7044
7045
7046# Check whether --with-iconv-bin was given.
7047if test "${with_iconv_bin+set}" = set; then :
7048 withval=$with_iconv_bin; iconv_bin="${withval}"
7049
7050cat >>confdefs.h <<_ACEOF
7051#define ICONV_BIN "${iconv_bin}"
7052_ACEOF
7053
7054
7055 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7056 if test "x$prefix" = xNONE; then
7057 test_prefix=/usr/local
7058 else
7059 test_prefix=$prefix
7060 fi
7061 else
7062 test_prefix=$exec_prefix
7063 fi
7064 value=0
7065 case ${iconv_bin} in
7066 "${test_prefix}"|"${test_prefix}/"*|\
7067 '${exec_prefix}'|'${exec_prefix}/'*)
7068 value=1
7069 ;;
7070 esac
7071
7072cat >>confdefs.h <<_ACEOF
7073#define ICONV_BIN_RELOCATABLE $value
7074_ACEOF
7075
7076
7077
7078fi
7079
7080
cb01cfba 7081# For the TUI, we need enhanced curses functionality.
bd8a8e1b 7082if test x"$enable_tui" != xno; then
cb01cfba
JB
7083 prefer_curses=yes
7084fi
7085
7086curses_found=no
7087if test x"$prefer_curses" = xyes; then
7088 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
7089 # curses library because the latter might not provide all the
7090 # functionality we need. However, this leads to problems on systems
7091 # where the linker searches /usr/local/lib, but the compiler doesn't
7092 # search /usr/local/include, if ncurses is installed in /usr/local. A
7093 # default installation of ncurses on alpha*-dec-osf* will lead to such
7094 # a situation.
81ecdfbb
RW
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
7096$as_echo_n "checking for library containing waddstr... " >&6; }
7097if test "${ac_cv_search_waddstr+set}" = set; then :
7098 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7099else
7100 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7102/* end confdefs.h. */
7103
81ecdfbb
RW
7104/* Override any GCC internal prototype to avoid an error.
7105 Use char because int might match the return type of a GCC
7106 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7107#ifdef __cplusplus
7108extern "C"
7109#endif
6c7a06a3
TT
7110char waddstr ();
7111int
7112main ()
7113{
81ecdfbb 7114return waddstr ();
6c7a06a3
TT
7115 ;
7116 return 0;
7117}
7118_ACEOF
81ecdfbb
RW
7119for ac_lib in '' ncurses cursesX curses; do
7120 if test -z "$ac_lib"; then
7121 ac_res="none required"
7122 else
7123 ac_res=-l$ac_lib
7124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7125 fi
7126 if ac_fn_c_try_link "$LINENO"; then :
7127 ac_cv_search_waddstr=$ac_res
7128fi
7129rm -f core conftest.err conftest.$ac_objext \
7130 conftest$ac_exeext
7131 if test "${ac_cv_search_waddstr+set}" = set; then :
7132 break
7133fi
7134done
7135if test "${ac_cv_search_waddstr+set}" = set; then :
7136
6c7a06a3 7137else
81ecdfbb
RW
7138 ac_cv_search_waddstr=no
7139fi
7140rm conftest.$ac_ext
7141LIBS=$ac_func_search_save_LIBS
7142fi
7143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
7144$as_echo "$ac_cv_search_waddstr" >&6; }
7145ac_res=$ac_cv_search_waddstr
7146if test "$ac_res" != no; then :
7147 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
7148
7149fi
7150
7151
cb01cfba
JB
7152 if test "$ac_cv_search_waddstr" != no; then
7153 curses_found=yes
7154 fi
7155fi
7156
7157# Check whether we should enable the TUI, but only do so if we really
7158# can.
7159if test x"$enable_tui" != xno; then
7160 if test -d $srcdir/tui; then
7161 if test "$curses_found" != no; then
6c7a06a3
TT
7162 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
7163 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
7164 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
7165 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
7166 else
7167 if test x"$enable_tui" = xyes; then
81ecdfbb 7168 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 7169 else
81ecdfbb
RW
7170 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
7171$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
7172 fi
7173 fi
7174 fi
7175fi
7176
7177# Since GDB uses Readline, we need termcap functionality. In many
7178# cases this will be provided by the curses library, but some systems
7179# have a seperate termcap library, or no curses library at all.
7180
7181case $host_os in
7182 cygwin*)
7183 if test -d $srcdir/libtermcap; then
7184 LIBS="../libtermcap/libtermcap.a $LIBS"
7185 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
7186 fi ;;
7187 go32* | *djgpp*)
7188 ac_cv_search_tgetent="none required"
7189 ;;
7190 *mingw32*)
03b79603 7191 if test x"$curses_found" != xyes; then
63413d85 7192 ac_cv_search_tgetent="none required"
532f44ed 7193 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
63413d85 7194 fi ;;
6c7a06a3
TT
7195esac
7196
7197# These are the libraries checked by Readline.
81ecdfbb
RW
7198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
7199$as_echo_n "checking for library containing tgetent... " >&6; }
7200if test "${ac_cv_search_tgetent+set}" = set; then :
7201 $as_echo_n "(cached) " >&6
6c7a06a3
TT
7202else
7203 ac_func_search_save_LIBS=$LIBS
81ecdfbb 7204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
7205/* end confdefs.h. */
7206
81ecdfbb
RW
7207/* Override any GCC internal prototype to avoid an error.
7208 Use char because int might match the return type of a GCC
7209 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7210#ifdef __cplusplus
7211extern "C"
7212#endif
6c7a06a3
TT
7213char tgetent ();
7214int
7215main ()
7216{
81ecdfbb 7217return tgetent ();
6c7a06a3
TT
7218 ;
7219 return 0;
7220}
7221_ACEOF
81ecdfbb
RW
7222for ac_lib in '' termcap tinfo curses ncurses; do
7223 if test -z "$ac_lib"; then
7224 ac_res="none required"
7225 else
7226 ac_res=-l$ac_lib
6c7a06a3 7227 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7228 fi
7229 if ac_fn_c_try_link "$LINENO"; then :
7230 ac_cv_search_tgetent=$ac_res
7231fi
7232rm -f core conftest.err conftest.$ac_objext \
7233 conftest$ac_exeext
7234 if test "${ac_cv_search_tgetent+set}" = set; then :
7235 break
7236fi
7237done
7238if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7239
6c7a06a3 7240else
81ecdfbb 7241 ac_cv_search_tgetent=no
6c7a06a3 7242fi
81ecdfbb 7243rm conftest.$ac_ext
6c7a06a3
TT
7244LIBS=$ac_func_search_save_LIBS
7245fi
81ecdfbb
RW
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7247$as_echo "$ac_cv_search_tgetent" >&6; }
7248ac_res=$ac_cv_search_tgetent
7249if test "$ac_res" != no; then :
7250 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7251
06825bd1
MK
7252fi
7253
06825bd1 7254
bec39cab 7255if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7256 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7257fi
7258
3841debe 7259
81ecdfbb
RW
7260# Check whether --with-system-readline was given.
7261if test "${with_system_readline+set}" = set; then :
7262 withval=$with_system_readline;
7263fi
6a30b0a5 7264
6a30b0a5
AS
7265
7266if test "$with_system_readline" = yes; then
7267 READLINE=-lreadline
7268 READLINE_DEPS=
7269 READLINE_CFLAGS=
39037522 7270 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7271else
7272 READLINE='$(READLINE_DIR)/libreadline.a'
7273 READLINE_DEPS='$(READLINE)'
7274 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7275 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7276fi
7277
7278
7279
7280
7281
f997c383
SD
7282# Generate jit-reader.h
7283
7284# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7285TARGET_PTR=
7286
7287# The cast to long int works around a bug in the HP C Compiler
7288# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7289# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7290# This bug is HP SR number 8606223364.
7291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7292$as_echo_n "checking size of unsigned long long... " >&6; }
7293if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7294 $as_echo_n "(cached) " >&6
7295else
7296 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7297
7298else
7299 if test "$ac_cv_type_unsigned_long_long" = yes; then
7300 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7302{ as_fn_set_status 77
7303as_fn_error "cannot compute sizeof (unsigned long long)
7304See \`config.log' for more details." "$LINENO" 5; }; }
7305 else
7306 ac_cv_sizeof_unsigned_long_long=0
7307 fi
7308fi
7309
7310fi
7311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7312$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7313
7314
7315
7316cat >>confdefs.h <<_ACEOF
7317#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7318_ACEOF
7319
7320
7321# The cast to long int works around a bug in the HP C Compiler
7322# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7323# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7324# This bug is HP SR number 8606223364.
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7326$as_echo_n "checking size of unsigned long... " >&6; }
7327if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7328 $as_echo_n "(cached) " >&6
7329else
7330 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7331
7332else
7333 if test "$ac_cv_type_unsigned_long" = yes; then
7334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7336{ as_fn_set_status 77
7337as_fn_error "cannot compute sizeof (unsigned long)
7338See \`config.log' for more details." "$LINENO" 5; }; }
7339 else
7340 ac_cv_sizeof_unsigned_long=0
7341 fi
7342fi
7343
7344fi
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7346$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7347
7348
7349
7350cat >>confdefs.h <<_ACEOF
7351#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7352_ACEOF
7353
7354
7355# The cast to long int works around a bug in the HP C Compiler
7356# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7357# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7358# This bug is HP SR number 8606223364.
7359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7360$as_echo_n "checking size of unsigned __int128... " >&6; }
7361if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7362 $as_echo_n "(cached) " >&6
7363else
7364 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7365
7366else
7367 if test "$ac_cv_type_unsigned___int128" = yes; then
7368 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7369$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7370{ as_fn_set_status 77
7371as_fn_error "cannot compute sizeof (unsigned __int128)
7372See \`config.log' for more details." "$LINENO" 5; }; }
7373 else
7374 ac_cv_sizeof_unsigned___int128=0
7375 fi
7376fi
7377
7378fi
7379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7380$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7381
7382
7383
7384cat >>confdefs.h <<_ACEOF
7385#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7386_ACEOF
7387
7388
7389
7390if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7391 TARGET_PTR="unsigned long"
7392elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7393 TARGET_PTR="unsigned long long"
7394elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7395 TARGET_PTR="unsigned __int128"
7396else
7397 TARGET_PTR="unsigned long"
7398fi
7399
7400
7401ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7402
7403
a2d08b9e
SD
7404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7405$as_echo_n "checking for library containing dlopen... " >&6; }
7406if test "${ac_cv_search_dlopen+set}" = set; then :
7407 $as_echo_n "(cached) " >&6
7408else
7409 ac_func_search_save_LIBS=$LIBS
7410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7411/* end confdefs.h. */
7412
7413/* Override any GCC internal prototype to avoid an error.
7414 Use char because int might match the return type of a GCC
7415 builtin and then its argument prototype would still apply. */
7416#ifdef __cplusplus
7417extern "C"
7418#endif
7419char dlopen ();
7420int
7421main ()
7422{
7423return dlopen ();
7424 ;
7425 return 0;
7426}
7427_ACEOF
7428for ac_lib in '' dl; do
7429 if test -z "$ac_lib"; then
7430 ac_res="none required"
7431 else
7432 ac_res=-l$ac_lib
7433 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7434 fi
7435 if ac_fn_c_try_link "$LINENO"; then :
7436 ac_cv_search_dlopen=$ac_res
7437fi
7438rm -f core conftest.err conftest.$ac_objext \
7439 conftest$ac_exeext
7440 if test "${ac_cv_search_dlopen+set}" = set; then :
7441 break
7442fi
7443done
7444if test "${ac_cv_search_dlopen+set}" = set; then :
7445
7446else
7447 ac_cv_search_dlopen=no
7448fi
7449rm conftest.$ac_ext
7450LIBS=$ac_func_search_save_LIBS
7451fi
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7453$as_echo "$ac_cv_search_dlopen" >&6; }
7454ac_res=$ac_cv_search_dlopen
7455if test "$ac_res" != no; then :
7456 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7457
7458fi
7459
7460
39037522 7461
b8e0a31c
SD
7462
7463# Check whether --with-jit-reader-dir was given.
7464if test "${with_jit_reader_dir+set}" = set; then :
7465 withval=$with_jit_reader_dir;
7466 JIT_READER_DIR=$withval
7467else
7468 JIT_READER_DIR=${libdir}/gdb
7469fi
7470
7471
7472 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7473 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7474 ac_define_dir=`eval echo $JIT_READER_DIR`
7475 ac_define_dir=`eval echo $ac_define_dir`
7476
7477cat >>confdefs.h <<_ACEOF
7478#define JIT_READER_DIR "$ac_define_dir"
7479_ACEOF
7480
7481
7482
7483
7484 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7485 if test "x$prefix" = xNONE; then
7486 test_prefix=/usr/local
7487 else
7488 test_prefix=$prefix
7489 fi
7490 else
7491 test_prefix=$exec_prefix
7492 fi
7493 value=0
7494 case ${ac_define_dir} in
7495 "${test_prefix}"|"${test_prefix}/"*|\
7496 '${exec_prefix}'|'${exec_prefix}/'*)
7497 value=1
7498 ;;
7499 esac
7500
7501cat >>confdefs.h <<_ACEOF
7502#define JIT_READER_DIR_RELOCATABLE $value
7503_ACEOF
7504
7505
7506
7507
7508
81ecdfbb
RW
7509# Check whether --with-expat was given.
7510if test "${with_expat+set}" = set; then :
7511 withval=$with_expat;
5c39566f
DJ
7512else
7513 with_expat=auto
81ecdfbb
RW
7514fi
7515
7516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7517$as_echo_n "checking whether to use expat... " >&6; }
7518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7519$as_echo "$with_expat" >&6; }
5c39566f
DJ
7520
7521if test "${with_expat}" = no; then
81ecdfbb
RW
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7523$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7524 HAVE_LIBEXPAT=no
7525else
7526
3841debe
DJ
7527 if test "X$prefix" = "XNONE"; then
7528 acl_final_prefix="$ac_default_prefix"
7529 else
7530 acl_final_prefix="$prefix"
7531 fi
7532 if test "X$exec_prefix" = "XNONE"; then
7533 acl_final_exec_prefix='${prefix}'
7534 else
7535 acl_final_exec_prefix="$exec_prefix"
7536 fi
7537 acl_save_prefix="$prefix"
7538 prefix="$acl_final_prefix"
7539 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7540 prefix="$acl_save_prefix"
7541
7542
81ecdfbb
RW
7543# Check whether --with-gnu-ld was given.
7544if test "${with_gnu_ld+set}" = set; then :
7545 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7546else
7547 with_gnu_ld=no
81ecdfbb
RW
7548fi
7549
3841debe
DJ
7550# Prepare PATH_SEPARATOR.
7551# The user is always right.
7552if test "${PATH_SEPARATOR+set}" != set; then
7553 echo "#! /bin/sh" >conf$$.sh
7554 echo "exit 0" >>conf$$.sh
7555 chmod +x conf$$.sh
7556 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7557 PATH_SEPARATOR=';'
7558 else
7559 PATH_SEPARATOR=:
7560 fi
7561 rm -f conf$$.sh
7562fi
7563ac_prog=ld
7564if test "$GCC" = yes; then
7565 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7567$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7568 case $host in
7569 *-*-mingw*)
7570 # gcc leaves a trailing carriage return which upsets mingw
7571 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7572 *)
7573 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7574 esac
7575 case $ac_prog in
7576 # Accept absolute paths.
7577 [\\/]* | [A-Za-z]:[\\/]*)
7578 re_direlt='/[^/][^/]*/\.\./'
7579 # Canonicalize the path of ld
7580 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7581 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7582 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7583 done
7584 test -z "$LD" && LD="$ac_prog"
7585 ;;
7586 "")
7587 # If it fails, then pretend we aren't using GCC.
7588 ac_prog=ld
7589 ;;
7590 *)
7591 # If it is relative, then search for the first ld in PATH.
7592 with_gnu_ld=unknown
7593 ;;
7594 esac
7595elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7597$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7598else
81ecdfbb
RW
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7600$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7601fi
81ecdfbb
RW
7602if test "${acl_cv_path_LD+set}" = set; then :
7603 $as_echo_n "(cached) " >&6
3841debe
DJ
7604else
7605 if test -z "$LD"; then
7606 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7607 for ac_dir in $PATH; do
7608 test -z "$ac_dir" && ac_dir=.
7609 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7610 acl_cv_path_LD="$ac_dir/$ac_prog"
7611 # Check to see if the program is GNU ld. I'd rather use --version,
7612 # but apparently some GNU ld's only accept -v.
7613 # Break only if it was the GNU/non-GNU ld that we prefer.
7614 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7615 test "$with_gnu_ld" != no && break
7616 else
7617 test "$with_gnu_ld" != yes && break
7618 fi
7619 fi
7620 done
7621 IFS="$ac_save_ifs"
7622else
7623 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7624fi
7625fi
7626
7627LD="$acl_cv_path_LD"
7628if test -n "$LD"; then
81ecdfbb
RW
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7630$as_echo "$LD" >&6; }
3841debe 7631else
81ecdfbb
RW
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633$as_echo "no" >&6; }
3841debe 7634fi
81ecdfbb
RW
7635test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7637$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7638if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7639 $as_echo_n "(cached) " >&6
3841debe
DJ
7640else
7641 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7642if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7643 acl_cv_prog_gnu_ld=yes
7644else
7645 acl_cv_prog_gnu_ld=no
7646fi
7647fi
81ecdfbb
RW
7648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7649$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7650with_gnu_ld=$acl_cv_prog_gnu_ld
7651
7652
7653
81ecdfbb
RW
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7655$as_echo_n "checking for shared library run path origin... " >&6; }
7656if test "${acl_cv_rpath+set}" = set; then :
7657 $as_echo_n "(cached) " >&6
3841debe
DJ
7658else
7659
7660 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7661 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7662 . ./conftest.sh
7663 rm -f ./conftest.sh
7664 acl_cv_rpath=done
7665
7666fi
81ecdfbb
RW
7667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7668$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7669 wl="$acl_cv_wl"
7670 libext="$acl_cv_libext"
7671 shlibext="$acl_cv_shlibext"
7672 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7673 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7674 hardcode_direct="$acl_cv_hardcode_direct"
7675 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7676 # Check whether --enable-rpath was given.
7677if test "${enable_rpath+set}" = set; then :
7678 enableval=$enable_rpath; :
3841debe
DJ
7679else
7680 enable_rpath=yes
81ecdfbb
RW
7681fi
7682
3841debe
DJ
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692 use_additional=yes
7693
7694 acl_save_prefix="$prefix"
7695 prefix="$acl_final_prefix"
7696 acl_save_exec_prefix="$exec_prefix"
7697 exec_prefix="$acl_final_exec_prefix"
7698
7699 eval additional_includedir=\"$includedir\"
7700 eval additional_libdir=\"$libdir\"
7701
7702 exec_prefix="$acl_save_exec_prefix"
7703 prefix="$acl_save_prefix"
7704
7705
81ecdfbb
RW
7706# Check whether --with-libexpat-prefix was given.
7707if test "${with_libexpat_prefix+set}" = set; then :
7708 withval=$with_libexpat_prefix;
3841debe
DJ
7709 if test "X$withval" = "Xno"; then
7710 use_additional=no
7711 else
7712 if test "X$withval" = "X"; then
7713
7714 acl_save_prefix="$prefix"
7715 prefix="$acl_final_prefix"
7716 acl_save_exec_prefix="$exec_prefix"
7717 exec_prefix="$acl_final_exec_prefix"
7718
7719 eval additional_includedir=\"$includedir\"
7720 eval additional_libdir=\"$libdir\"
7721
7722 exec_prefix="$acl_save_exec_prefix"
7723 prefix="$acl_save_prefix"
7724
7725 else
7726 additional_includedir="$withval/include"
7727 additional_libdir="$withval/lib"
7728 fi
7729 fi
7730
81ecdfbb
RW
7731fi
7732
3841debe
DJ
7733 LIBEXPAT=
7734 LTLIBEXPAT=
7735 INCEXPAT=
7736 rpathdirs=
7737 ltrpathdirs=
7738 names_already_handled=
7739 names_next_round='expat '
7740 while test -n "$names_next_round"; do
7741 names_this_round="$names_next_round"
7742 names_next_round=
7743 for name in $names_this_round; do
7744 already_handled=
7745 for n in $names_already_handled; do
7746 if test "$n" = "$name"; then
7747 already_handled=yes
7748 break
7749 fi
7750 done
7751 if test -z "$already_handled"; then
7752 names_already_handled="$names_already_handled $name"
7753 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7754 eval value=\"\$HAVE_LIB$uppername\"
7755 if test -n "$value"; then
7756 if test "$value" = yes; then
7757 eval value=\"\$LIB$uppername\"
7758 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7759 eval value=\"\$LTLIB$uppername\"
7760 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7761 else
7762 :
7763 fi
7764 else
7765 found_dir=
7766 found_la=
7767 found_so=
7768 found_a=
7769 if test $use_additional = yes; then
7770 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7771 found_dir="$additional_libdir"
7772 found_so="$additional_libdir/lib$name.$shlibext"
7773 if test -f "$additional_libdir/lib$name.la"; then
7774 found_la="$additional_libdir/lib$name.la"
7775 fi
7776 else
7777 if test -f "$additional_libdir/lib$name.$libext"; then
7778 found_dir="$additional_libdir"
7779 found_a="$additional_libdir/lib$name.$libext"
7780 if test -f "$additional_libdir/lib$name.la"; then
7781 found_la="$additional_libdir/lib$name.la"
7782 fi
7783 fi
7784 fi
7785 fi
7786 if test "X$found_dir" = "X"; then
7787 for x in $LDFLAGS $LTLIBEXPAT; do
7788
7789 acl_save_prefix="$prefix"
7790 prefix="$acl_final_prefix"
7791 acl_save_exec_prefix="$exec_prefix"
7792 exec_prefix="$acl_final_exec_prefix"
7793 eval x=\"$x\"
7794 exec_prefix="$acl_save_exec_prefix"
7795 prefix="$acl_save_prefix"
7796
7797 case "$x" in
7798 -L*)
7799 dir=`echo "X$x" | sed -e 's/^X-L//'`
7800 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7801 found_dir="$dir"
7802 found_so="$dir/lib$name.$shlibext"
7803 if test -f "$dir/lib$name.la"; then
7804 found_la="$dir/lib$name.la"
7805 fi
7806 else
7807 if test -f "$dir/lib$name.$libext"; then
7808 found_dir="$dir"
7809 found_a="$dir/lib$name.$libext"
7810 if test -f "$dir/lib$name.la"; then
7811 found_la="$dir/lib$name.la"
7812 fi
7813 fi
7814 fi
7815 ;;
7816 esac
7817 if test "X$found_dir" != "X"; then
7818 break
7819 fi
7820 done
7821 fi
7822 if test "X$found_dir" != "X"; then
7823 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7824 if test "X$found_so" != "X"; then
7825 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7826 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7827 else
7828 haveit=
7829 for x in $ltrpathdirs; do
7830 if test "X$x" = "X$found_dir"; then
7831 haveit=yes
7832 break
7833 fi
7834 done
7835 if test -z "$haveit"; then
7836 ltrpathdirs="$ltrpathdirs $found_dir"
7837 fi
7838 if test "$hardcode_direct" = yes; then
7839 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7840 else
7841 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7842 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7843 haveit=
7844 for x in $rpathdirs; do
7845 if test "X$x" = "X$found_dir"; then
7846 haveit=yes
7847 break
7848 fi
7849 done
7850 if test -z "$haveit"; then
7851 rpathdirs="$rpathdirs $found_dir"
7852 fi
7853 else
7854 haveit=
7855 for x in $LDFLAGS $LIBEXPAT; do
7856
7857 acl_save_prefix="$prefix"
7858 prefix="$acl_final_prefix"
7859 acl_save_exec_prefix="$exec_prefix"
7860 exec_prefix="$acl_final_exec_prefix"
7861 eval x=\"$x\"
7862 exec_prefix="$acl_save_exec_prefix"
7863 prefix="$acl_save_prefix"
7864
7865 if test "X$x" = "X-L$found_dir"; then
7866 haveit=yes
7867 break
7868 fi
7869 done
7870 if test -z "$haveit"; then
7871 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7872 fi
7873 if test "$hardcode_minus_L" != no; then
7874 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7875 else
7876 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7877 fi
7878 fi
7879 fi
7880 fi
7881 else
7882 if test "X$found_a" != "X"; then
7883 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7884 else
7885 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7886 fi
7887 fi
7888 additional_includedir=
7889 case "$found_dir" in
7890 */lib | */lib/)
7891 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7892 additional_includedir="$basedir/include"
7893 ;;
7894 esac
7895 if test "X$additional_includedir" != "X"; then
7896 if test "X$additional_includedir" != "X/usr/include"; then
7897 haveit=
7898 if test "X$additional_includedir" = "X/usr/local/include"; then
7899 if test -n "$GCC"; then
7900 case $host_os in
7901 linux*) haveit=yes;;
7902 esac
7903 fi
7904 fi
7905 if test -z "$haveit"; then
7906 for x in $CPPFLAGS $INCEXPAT; do
7907
7908 acl_save_prefix="$prefix"
7909 prefix="$acl_final_prefix"
7910 acl_save_exec_prefix="$exec_prefix"
7911 exec_prefix="$acl_final_exec_prefix"
7912 eval x=\"$x\"
7913 exec_prefix="$acl_save_exec_prefix"
7914 prefix="$acl_save_prefix"
7915
7916 if test "X$x" = "X-I$additional_includedir"; then
7917 haveit=yes
7918 break
7919 fi
7920 done
7921 if test -z "$haveit"; then
7922 if test -d "$additional_includedir"; then
7923 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7924 fi
7925 fi
7926 fi
7927 fi
7928 fi
7929 if test -n "$found_la"; then
7930 save_libdir="$libdir"
7931 case "$found_la" in
7932 */* | *\\*) . "$found_la" ;;
7933 *) . "./$found_la" ;;
7934 esac
7935 libdir="$save_libdir"
7936 for dep in $dependency_libs; do
7937 case "$dep" in
7938 -L*)
7939 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7940 if test "X$additional_libdir" != "X/usr/lib"; then
7941 haveit=
7942 if test "X$additional_libdir" = "X/usr/local/lib"; then
7943 if test -n "$GCC"; then
7944 case $host_os in
7945 linux*) haveit=yes;;
7946 esac
7947 fi
7948 fi
7949 if test -z "$haveit"; then
7950 haveit=
7951 for x in $LDFLAGS $LIBEXPAT; do
7952
7953 acl_save_prefix="$prefix"
7954 prefix="$acl_final_prefix"
7955 acl_save_exec_prefix="$exec_prefix"
7956 exec_prefix="$acl_final_exec_prefix"
7957 eval x=\"$x\"
7958 exec_prefix="$acl_save_exec_prefix"
7959 prefix="$acl_save_prefix"
7960
7961 if test "X$x" = "X-L$additional_libdir"; then
7962 haveit=yes
7963 break
7964 fi
7965 done
7966 if test -z "$haveit"; then
7967 if test -d "$additional_libdir"; then
7968 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7969 fi
7970 fi
7971 haveit=
7972 for x in $LDFLAGS $LTLIBEXPAT; do
7973
7974 acl_save_prefix="$prefix"
7975 prefix="$acl_final_prefix"
7976 acl_save_exec_prefix="$exec_prefix"
7977 exec_prefix="$acl_final_exec_prefix"
7978 eval x=\"$x\"
7979 exec_prefix="$acl_save_exec_prefix"
7980 prefix="$acl_save_prefix"
7981
7982 if test "X$x" = "X-L$additional_libdir"; then
7983 haveit=yes
7984 break
7985 fi
7986 done
7987 if test -z "$haveit"; then
7988 if test -d "$additional_libdir"; then
7989 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7990 fi
7991 fi
7992 fi
7993 fi
7994 ;;
7995 -R*)
7996 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7997 if test "$enable_rpath" != no; then
7998 haveit=
7999 for x in $rpathdirs; do
8000 if test "X$x" = "X$dir"; then
8001 haveit=yes
8002 break
8003 fi
8004 done
8005 if test -z "$haveit"; then
8006 rpathdirs="$rpathdirs $dir"
8007 fi
8008 haveit=
8009 for x in $ltrpathdirs; do
8010 if test "X$x" = "X$dir"; then
8011 haveit=yes
8012 break
8013 fi
8014 done
8015 if test -z "$haveit"; then
8016 ltrpathdirs="$ltrpathdirs $dir"
8017 fi
8018 fi
8019 ;;
8020 -l*)
8021 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8022 ;;
8023 *.la)
8024 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8025 ;;
8026 *)
8027 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
8028 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
8029 ;;
81ecdfbb
RW
8030 esac
8031 done
8032 fi
8033 else
8034 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
8035 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
8036 fi
8037 fi
8038 fi
8039 done
8040 done
8041 if test "X$rpathdirs" != "X"; then
8042 if test -n "$hardcode_libdir_separator"; then
8043 alldirs=
8044 for found_dir in $rpathdirs; do
8045 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8046 done
8047 acl_save_libdir="$libdir"
8048 libdir="$alldirs"
8049 eval flag=\"$hardcode_libdir_flag_spec\"
8050 libdir="$acl_save_libdir"
8051 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8052 else
8053 for found_dir in $rpathdirs; do
8054 acl_save_libdir="$libdir"
8055 libdir="$found_dir"
8056 eval flag=\"$hardcode_libdir_flag_spec\"
8057 libdir="$acl_save_libdir"
8058 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
8059 done
8060 fi
8061 fi
8062 if test "X$ltrpathdirs" != "X"; then
8063 for found_dir in $ltrpathdirs; do
8064 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
8065 done
8066 fi
a9322a30
TT
8067
8068
81ecdfbb 8069 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 8070
81ecdfbb
RW
8071 for element in $INCEXPAT; do
8072 haveit=
8073 for x in $CPPFLAGS; do
a9322a30 8074
81ecdfbb
RW
8075 acl_save_prefix="$prefix"
8076 prefix="$acl_final_prefix"
8077 acl_save_exec_prefix="$exec_prefix"
8078 exec_prefix="$acl_final_exec_prefix"
8079 eval x=\"$x\"
8080 exec_prefix="$acl_save_exec_prefix"
8081 prefix="$acl_save_prefix"
a8111142 8082
81ecdfbb
RW
8083 if test "X$x" = "X$element"; then
8084 haveit=yes
8085 break
8086 fi
8087 done
8088 if test -z "$haveit"; then
8089 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8090 fi
8091 done
a9322a30
TT
8092
8093
81ecdfbb
RW
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
8095$as_echo_n "checking for libexpat... " >&6; }
8096if test "${ac_cv_libexpat+set}" = set; then :
8097 $as_echo_n "(cached) " >&6
bec39cab 8098else
bec39cab 8099
81ecdfbb
RW
8100 ac_save_LIBS="$LIBS"
8101 LIBS="$LIBS $LIBEXPAT"
8102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8103/* end confdefs.h. */
81ecdfbb
RW
8104#include "expat.h"
8105int
8106main ()
8107{
8108XML_Parser p = XML_ParserCreate (0);
8109 ;
8110 return 0;
8111}
bec39cab 8112_ACEOF
81ecdfbb
RW
8113if ac_fn_c_try_link "$LINENO"; then :
8114 ac_cv_libexpat=yes
c906108c 8115else
81ecdfbb 8116 ac_cv_libexpat=no
bec39cab 8117fi
81ecdfbb
RW
8118rm -f core conftest.err conftest.$ac_objext \
8119 conftest$ac_exeext conftest.$ac_ext
8120 LIBS="$ac_save_LIBS"
c906108c 8121
95ca63c4 8122fi
81ecdfbb
RW
8123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
8124$as_echo "$ac_cv_libexpat" >&6; }
8125 if test "$ac_cv_libexpat" = yes; then
8126 HAVE_LIBEXPAT=yes
bec39cab 8127
81ecdfbb 8128$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 8129
81ecdfbb
RW
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
8131$as_echo_n "checking how to link with libexpat... " >&6; }
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
8133$as_echo "$LIBEXPAT" >&6; }
8134 else
8135 HAVE_LIBEXPAT=no
8136 CPPFLAGS="$ac_save_CPPFLAGS"
8137 LIBEXPAT=
8138 LTLIBEXPAT=
8139 fi
95ca63c4
CF
8140
8141
8142
7cb9022a
MK
8143
8144
bec39cab 8145
81ecdfbb
RW
8146 if test "$HAVE_LIBEXPAT" != yes; then
8147 if test "$with_expat" = yes; then
8148 as_fn_error "expat is missing or unusable" "$LINENO" 5
8149 else
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
8151$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
8152 fi
8153 else
8154 save_LIBS=$LIBS
8155 LIBS="$LIBS $LIBEXPAT"
8156 for ac_func in XML_StopParser
8157do :
8158 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
8159if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 8160 cat >>confdefs.h <<_ACEOF
81ecdfbb 8161#define HAVE_XML_STOPPARSER 1
bec39cab 8162_ACEOF
95ca63c4 8163
bec39cab 8164fi
bec39cab 8165done
95ca63c4 8166
81ecdfbb
RW
8167 LIBS=$save_LIBS
8168 fi
a9322a30
TT
8169fi
8170
d344e670
DE
8171# --------------------- #
8172# Check for libpython. #
8173# --------------------- #
8174
a9322a30 8175
a9322a30
TT
8176
8177
ec685c5e 8178
0c4a4063 8179
81ecdfbb
RW
8180# Check whether --with-python was given.
8181if test "${with_python+set}" = set; then :
8182 withval=$with_python;
bec39cab 8183else
81ecdfbb 8184 with_python=auto
bec39cab 8185fi
bec39cab 8186
81ecdfbb
RW
8187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
8188$as_echo_n "checking whether to use python... " >&6; }
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8190$as_echo "$with_python" >&6; }
9a156167 8191
81ecdfbb
RW
8192if test "${with_python}" = no; then
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
8194$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
8195 have_libpython=no
bec39cab 8196else
81ecdfbb 8197 case "${with_python}" in
8c85a4e2 8198 [\\/]* | ?:[\\/]*)
ec685c5e
DE
8199 if test -d ${with_python}; then
8200 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 8201 python_prog="${with_python}/bin/python"
0c4a4063 8202 python_prefix=
9c4ea6c5
JB
8203 # If python does not exit ${with_python}/bin, then try in
8204 # ${with_python}. On Windows/MinGW, this is where the Python
8205 # executable is.
8206 if test ! -x "${python_prog}"; then
8207 python_prog="${with_python}/python"
8208 python_prefix=
8209 fi
e7a30f46 8210 if test ! -x "${python_prog}"; then
ec685c5e
DE
8211 # Fall back to gdb 7.0/7.1 behaviour.
8212 python_prog=missing
0c4a4063 8213 python_prefix=${with_python}
ec685c5e 8214 fi
e7a30f46 8215 elif test -x "${with_python}"; then
ec685c5e
DE
8216 # While we can't run python compiled for $host (unless host == build),
8217 # the user could write a script that provides the needed information,
8218 # so we support that.
ec685c5e 8219 python_prog=${with_python}
0c4a4063 8220 python_prefix=
ec685c5e
DE
8221 else
8222 as_fn_error "invalid value for --with-python" "$LINENO" 5
8223 fi
81ecdfbb 8224 ;;
ec685c5e
DE
8225 */*)
8226 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8227 as_fn_error "invalid value for --with-python" "$LINENO" 5
8228 ;;
ec685c5e
DE
8229 *)
8230 # The user has either specified auto, yes, or the name of the python
8231 # program assumed to be in $PATH.
8232 python_prefix=
8233 case "${with_python}" in
8234 yes | auto)
8235 if test ${build} = ${host}; then
8236 # Extract the first word of "python", so it can be a program name with args.
8237set dummy python; ac_word=$2
8238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8239$as_echo_n "checking for $ac_word... " >&6; }
8240if test "${ac_cv_path_python_prog_path+set}" = set; then :
8241 $as_echo_n "(cached) " >&6
8242else
8243 case $python_prog_path in
8244 [\\/]* | ?:[\\/]*)
8245 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8246 ;;
8247 *)
8248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8249for as_dir in $PATH
8250do
8251 IFS=$as_save_IFS
8252 test -z "$as_dir" && as_dir=.
8253 for ac_exec_ext in '' $ac_executable_extensions; do
8254 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8255 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8257 break 2
8258 fi
8259done
8260 done
8261IFS=$as_save_IFS
8262
8263 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8264 ;;
8265esac
8266fi
8267python_prog_path=$ac_cv_path_python_prog_path
8268if test -n "$python_prog_path"; then
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8270$as_echo "$python_prog_path" >&6; }
8271else
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8273$as_echo "no" >&6; }
8274fi
8275
8276
8277 if test "${python_prog_path}" = missing; then
8278 python_prog=missing
8279 else
8280 python_prog=${python_prog_path}
8281 fi
8282 else
8283 # Not much we can do except assume the cross-compiler will find the
8284 # right files.
8285 python_prog=missing
8286 fi
8287 ;;
8288 *)
8289 # While we can't run python compiled for $host (unless host == build),
8290 # the user could write a script that provides the needed information,
8291 # so we support that.
8292 python_prog="${with_python}"
8293 # Extract the first word of "${python_prog}", so it can be a program name with args.
8294set dummy ${python_prog}; ac_word=$2
8295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8296$as_echo_n "checking for $ac_word... " >&6; }
8297if test "${ac_cv_path_python_prog_path+set}" = set; then :
8298 $as_echo_n "(cached) " >&6
8299else
8300 case $python_prog_path in
8301 [\\/]* | ?:[\\/]*)
8302 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8303 ;;
8304 *)
8305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8306for as_dir in $PATH
8307do
8308 IFS=$as_save_IFS
8309 test -z "$as_dir" && as_dir=.
8310 for ac_exec_ext in '' $ac_executable_extensions; do
8311 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8312 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8313 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8314 break 2
8315 fi
8316done
8317 done
8318IFS=$as_save_IFS
8319
8320 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8321 ;;
8322esac
8323fi
8324python_prog_path=$ac_cv_path_python_prog_path
8325if test -n "$python_prog_path"; then
8326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8327$as_echo "$python_prog_path" >&6; }
8328else
8329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8330$as_echo "no" >&6; }
8331fi
8332
8333
8334 if test "${python_prog_path}" = missing; then
8335 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8336 fi
8337 ;;
8338 esac
81ecdfbb
RW
8339 esac
8340
ec685c5e 8341 if test "${python_prog}" != missing; then
e7a30f46
DE
8342 # We have a python program to use, but it may be too old.
8343 # Don't flag an error for --with-python=auto (the default).
8344 have_python_config=yes
ec685c5e
DE
8345 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8346 if test $? != 0; then
e7a30f46
DE
8347 have_python_config=failed
8348 if test "${with_python}" != auto; then
8349 as_fn_error "failure running python-config --includes" "$LINENO" 5
8350 fi
ec685c5e
DE
8351 fi
8352 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8353 if test $? != 0; then
e7a30f46
DE
8354 have_python_config=failed
8355 if test "${with_python}" != auto; then
8356 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8357 fi
ec685c5e 8358 fi
0c4a4063
DE
8359 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8360 if test $? != 0; then
e7a30f46
DE
8361 have_python_config=failed
8362 if test "${with_python}" != auto; then
8363 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8364 fi
0c4a4063 8365 fi
ec685c5e 8366 else
ac534cba
JB
8367 # We do not have a python executable we can use to determine where
8368 # to find the Python headers and libs. We cannot guess the include
8369 # path from the python_prefix either, because that include path
8370 # depends on the Python version. So, there is nothing much we can
8371 # do except assume that the compiler will be able to find those files.
8372 python_includes=
8373 python_libs=
0c4a4063 8374 have_python_config=no
ec685c5e 8375 fi
bec39cab 8376
ec685c5e
DE
8377 # If we have python-config, only try the configuration it provides.
8378 # Otherwise fallback on the old way of trying different versions of
8379 # python in turn.
81ecdfbb 8380
ec685c5e
DE
8381 have_libpython=no
8382 if test "${have_python_config}" = yes; then
c1039e3c
JB
8383 # Determine the Python version by extracting "-lpython<version>"
8384 # part of the python_libs. <version> is usually X.Y with X and Y
8385 # being decimal numbers, but can also be XY (seen on Windows).
8386 #
8387 # The extraction is performed using sed with a regular expression.
8388 # Initially, the regexp used was using the '?' quantifier to make
8389 # the dot in the version number optional. Unfortunately, this
8390 # does not work with non-GNU versions of sed because, because of
8391 # what looks like a limitation (the '?' quantifier does not work
8392 # with back-references). We work around this limitation by using
8393 # the '*' quantifier instead. It means that, in theory, we might
8394 # match unexpected version strings such as "-lpython2..7", but
8395 # this seems unlikely in practice. And even if that happens,
8396 # an error will be triggered later on, when checking that version
8397 # number.
ec685c5e 8398 python_version=`echo " ${python_libs} " \
c1039e3c 8399 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8400 case "${python_version}" in
8401 python*)
ec685c5e
DE
8402
8403 version=${python_version}
8404
8405 new_CPPFLAGS=${python_includes}
8406 new_LIBS=${python_libs}
81ecdfbb
RW
8407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8408$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8409 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8410 save_LIBS=$LIBS
ec685c5e
DE
8411 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8412 LIBS="$LIBS $new_LIBS"
8413 found_usable_python=no
81ecdfbb 8414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8415/* end confdefs.h. */
ac534cba 8416#include "Python.h"
81ecdfbb
RW
8417int
8418main ()
8419{
8420Py_Initialize ();
8421 ;
8422 return 0;
8423}
bec39cab 8424_ACEOF
81ecdfbb 8425if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8426 have_libpython=${version}
8427 found_usable_python=yes
ac534cba
JB
8428 PYTHON_CPPFLAGS=$new_CPPFLAGS
8429 PYTHON_LIBS=$new_LIBS
9a156167 8430fi
81ecdfbb
RW
8431rm -f core conftest.err conftest.$ac_objext \
8432 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8433 CPPFLAGS=$save_CPPFLAGS
8434 LIBS=$save_LIBS
ec685c5e
DE
8435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8436$as_echo "${found_usable_python}" >&6; }
9a156167 8437
0c4a4063
DE
8438 ;;
8439 *)
ec685c5e 8440 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8441 ;;
8442 esac
e7a30f46 8443 elif test "${have_python_config}" != failed; then
ec685c5e 8444 if test "${have_libpython}" = no; then
9a156167 8445
420697bb
TT
8446 version=python2.7
8447
8448 new_CPPFLAGS=${python_includes}
8449 new_LIBS="${python_libs} -lpython2.7"
8450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8451$as_echo_n "checking for ${version}... " >&6; }
8452 save_CPPFLAGS=$CPPFLAGS
8453 save_LIBS=$LIBS
8454 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8455 LIBS="$LIBS $new_LIBS"
8456 found_usable_python=no
8457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8458/* end confdefs.h. */
ac534cba 8459#include "Python.h"
420697bb
TT
8460int
8461main ()
8462{
8463Py_Initialize ();
8464 ;
8465 return 0;
8466}
8467_ACEOF
8468if ac_fn_c_try_link "$LINENO"; then :
8469 have_libpython=${version}
8470 found_usable_python=yes
ac534cba
JB
8471 PYTHON_CPPFLAGS=$new_CPPFLAGS
8472 PYTHON_LIBS=$new_LIBS
420697bb
TT
8473fi
8474rm -f core conftest.err conftest.$ac_objext \
8475 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8476 CPPFLAGS=$save_CPPFLAGS
8477 LIBS=$save_LIBS
420697bb
TT
8478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8479$as_echo "${found_usable_python}" >&6; }
8480
8481 fi
8482 if test "${have_libpython}" = no; then
8483
ec685c5e
DE
8484 version=python2.6
8485
8486 new_CPPFLAGS=${python_includes}
8487 new_LIBS="${python_libs} -lpython2.6"
8488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8489$as_echo_n "checking for ${version}... " >&6; }
8490 save_CPPFLAGS=$CPPFLAGS
8491 save_LIBS=$LIBS
8492 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8493 LIBS="$LIBS $new_LIBS"
8494 found_usable_python=no
8495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8496/* end confdefs.h. */
ac534cba 8497#include "Python.h"
ec685c5e
DE
8498int
8499main ()
8500{
8501Py_Initialize ();
8502 ;
8503 return 0;
8504}
8505_ACEOF
8506if ac_fn_c_try_link "$LINENO"; then :
8507 have_libpython=${version}
8508 found_usable_python=yes
ac534cba
JB
8509 PYTHON_CPPFLAGS=$new_CPPFLAGS
8510 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8511fi
8512rm -f core conftest.err conftest.$ac_objext \
8513 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8514 CPPFLAGS=$save_CPPFLAGS
8515 LIBS=$save_LIBS
ec685c5e
DE
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8517$as_echo "${found_usable_python}" >&6; }
9a156167 8518
81ecdfbb 8519 fi
ec685c5e 8520 if test ${have_libpython} = no; then
9a156167 8521
81ecdfbb 8522 version=python2.5
9a156167 8523
ec685c5e
DE
8524 new_CPPFLAGS=${python_includes}
8525 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8527$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8528 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8529 save_LIBS=$LIBS
ec685c5e
DE
8530 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8531 LIBS="$LIBS $new_LIBS"
8532 found_usable_python=no
81ecdfbb 8533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8534/* end confdefs.h. */
ac534cba 8535#include "Python.h"
81ecdfbb
RW
8536int
8537main ()
8538{
8539Py_Initialize ();
8540 ;
8541 return 0;
8542}
436868fb 8543_ACEOF
81ecdfbb 8544if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8545 have_libpython=${version}
8546 found_usable_python=yes
ac534cba
JB
8547 PYTHON_CPPFLAGS=$new_CPPFLAGS
8548 PYTHON_LIBS=$new_LIBS
436868fb 8549fi
81ecdfbb
RW
8550rm -f core conftest.err conftest.$ac_objext \
8551 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8552 CPPFLAGS=$save_CPPFLAGS
8553 LIBS=$save_LIBS
ec685c5e
DE
8554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8555$as_echo "${found_usable_python}" >&6; }
a9322a30 8556
81ecdfbb 8557 fi
ec685c5e 8558 if test ${have_libpython} = no; then
a9322a30 8559
81ecdfbb 8560 version=python2.4
a9322a30 8561
ec685c5e
DE
8562 new_CPPFLAGS=${python_includes}
8563 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8565$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8566 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8567 save_LIBS=$LIBS
ec685c5e
DE
8568 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8569 LIBS="$LIBS $new_LIBS"
8570 found_usable_python=no
81ecdfbb 8571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8572/* end confdefs.h. */
ac534cba 8573#include "Python.h"
a9322a30
TT
8574int
8575main ()
8576{
81ecdfbb 8577Py_Initialize ();
a9322a30
TT
8578 ;
8579 return 0;
8580}
436868fb 8581_ACEOF
81ecdfbb 8582if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8583 have_libpython=${version}
8584 found_usable_python=yes
ac534cba
JB
8585 PYTHON_CPPFLAGS=$new_CPPFLAGS
8586 PYTHON_LIBS=$new_LIBS
436868fb 8587fi
81ecdfbb
RW
8588rm -f core conftest.err conftest.$ac_objext \
8589 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8590 CPPFLAGS=$save_CPPFLAGS
8591 LIBS=$save_LIBS
ec685c5e
DE
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8593$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8594
ec685c5e
DE
8595 fi
8596 fi
9c4ea6c5 8597 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8598
8599$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8600
9c4ea6c5 8601 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8602
8603$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8604
9c4ea6c5 8605 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8606
8607$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8608
9c4ea6c5 8609 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8610
8611$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8612
81ecdfbb 8613 fi
ec685c5e
DE
8614
8615 if test "${have_libpython}" = no; then
81ecdfbb
RW
8616 case "${with_python}" in
8617 yes)
8618 as_fn_error "python is missing or unusable" "$LINENO" 5
8619 ;;
8620 auto)
8621 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8622$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8623 ;;
8624 *)
8625 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8626 ;;
8627 esac
0c4a4063
DE
8628 else
8629 if test -n "${python_prefix}"; then
8630
8631cat >>confdefs.h <<_ACEOF
8632#define WITH_PYTHON_PATH "${python_prefix}"
8633_ACEOF
8634
8635
8636 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8637 if test "x$prefix" = xNONE; then
8638 test_prefix=/usr/local
8639 else
8640 test_prefix=$prefix
8641 fi
8642 else
8643 test_prefix=$exec_prefix
8644 fi
8645 value=0
8646 case ${python_prefix} in
8647 "${test_prefix}"|"${test_prefix}/"*|\
8648 '${exec_prefix}'|'${exec_prefix}/'*)
8649 value=1
8650 ;;
8651 esac
8652
8653cat >>confdefs.h <<_ACEOF
8654#define PYTHON_PATH_RELOCATABLE $value
8655_ACEOF
8656
8657
8658 fi
81ecdfbb 8659 fi
436868fb 8660fi
436868fb 8661
ec685c5e 8662if test "${have_libpython}" != no; then
436868fb 8663
81ecdfbb 8664$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8665
81ecdfbb
RW
8666 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8667 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8668 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8669 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8670 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8671
81ecdfbb
RW
8672 # Flags needed to compile Python code (taken from python-config --cflags).
8673 # We cannot call python-config directly because it will output whatever was
8674 # used when compiling the Python interpreter itself, including flags which
8675 # would make the python-related objects be compiled differently from the
8676 # rest of GDB (e.g., -O2 and -fPIC).
8677 if test "${GCC}" = yes; then
8678 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8679 fi
436868fb 8680
81ecdfbb
RW
8681 if test "x${tentative_python_cflags}" != x; then
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8683$as_echo_n "checking compiler flags for python code... " >&6; }
8684 for flag in ${tentative_python_cflags}; do
8685 # Check that the compiler accepts it
8686 saved_CFLAGS="$CFLAGS"
8687 CFLAGS="$CFLAGS $flag"
8688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8689/* end confdefs.h. */
81ecdfbb 8690
a9322a30
TT
8691int
8692main ()
8693{
a9322a30
TT
8694
8695 ;
8696 return 0;
8697}
bec39cab 8698_ACEOF
81ecdfbb
RW
8699if ac_fn_c_try_compile "$LINENO"; then :
8700 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8701fi
81ecdfbb
RW
8702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8703 CFLAGS="$saved_CFLAGS"
8704 done
8705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8706$as_echo "${PYTHON_CFLAGS}" >&6; }
8707 fi
043b6510 8708
c83393b9
JB
8709 # On x64 Windows, Python's include headers, and pyconfig.h in
8710 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8711 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8712 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8713 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8714 # The issue was reported to the Python community, but still isn't
8715 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8716
043b6510 8717 case "$gdb_host" in
c83393b9
JB
8718 mingw64)
8719 if test "${GCC}" = yes; then
8720 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8721 fi
8722 ;;
043b6510 8723 esac
a8db4212
YPK
8724
8725 # Note that "python -m threading" cannot be used to check for
8726 # threading support due to a bug in Python 2.7.3
8727 # (http://bugs.python.org/issue15567).
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8729$as_echo_n "checking whether python supports threads... " >&6; }
8730 saved_CPPFLAGS="${CPPFLAGS}"
8731 CPPFLAGS="${PYTHON_CPPFLAGS}"
8732 # Note that the test is reversed so that python_has_threads=yes on
8733 # unexpected failures.
8734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8735/* end confdefs.h. */
8736
8737#include <Python.h>
8738#ifdef WITH_THREAD
8739# error
8740#endif
8741
8742_ACEOF
8743if ac_fn_c_try_cpp "$LINENO"; then :
8744 python_has_threads=no
8745else
8746 python_has_threads=yes
8747fi
8748rm -f conftest.err conftest.$ac_ext
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8750$as_echo "${python_has_threads}" >&6; }
8751 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb 8752else
6dddc817
DE
8753 # Even if Python support is not compiled in, we need to have this file
8754 # included so that the "python" command, et.al., still exists.
8755 CONFIG_OBS="$CONFIG_OBS python.o"
8756 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 8757fi
9a156167 8758
ed3ef339
DE
8759
8760
4df42755
DE
8761 if test "${have_libpython}" != no; then
8762 HAVE_PYTHON_TRUE=
8763 HAVE_PYTHON_FALSE='#'
8764else
8765 HAVE_PYTHON_TRUE='#'
8766 HAVE_PYTHON_FALSE=
8767fi
8768
ed3ef339
DE
8769
8770# -------------------- #
8771# Check for libguile. #
8772# -------------------- #
8773
8774
e1402065
DE
8775
8776
8777
8778
8779# Check whether --with-guile was given.
8780if test "${with_guile+set}" = set; then :
8781 withval=$with_guile;
8782else
8783 with_guile=auto
8784fi
8785
8786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
8787$as_echo_n "checking whether to use guile... " >&6; }
8788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
8789$as_echo "$with_guile" >&6; }
8790
ed3ef339
DE
8791# Extract the first word of "pkg-config", so it can be a program name with args.
8792set dummy pkg-config; ac_word=$2
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8794$as_echo_n "checking for $ac_word... " >&6; }
8795if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
8796 $as_echo_n "(cached) " >&6
8797else
8798 case $pkg_config_prog_path in
8799 [\\/]* | ?:[\\/]*)
8800 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
8801 ;;
8802 *)
8803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8804for as_dir in $PATH
8805do
8806 IFS=$as_save_IFS
8807 test -z "$as_dir" && as_dir=.
8808 for ac_exec_ext in '' $ac_executable_extensions; do
8809 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8810 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
8811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8812 break 2
8813 fi
8814done
8815 done
8816IFS=$as_save_IFS
8817
8818 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
8819 ;;
8820esac
8821fi
8822pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
8823if test -n "$pkg_config_prog_path"; then
8824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
8825$as_echo "$pkg_config_prog_path" >&6; }
8826else
8827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8828$as_echo "no" >&6; }
8829fi
8830
8831
8832
214ab2da 8833try_guile_versions="guile-2.2 guile-2.0"
ed3ef339
DE
8834have_libguile=no
8835case "${with_guile}" in
8836no)
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
8838$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
8839 ;;
8840auto)
e1402065
DE
8841 if test "${pkg_config_prog_path}" = "missing"; then
8842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
8843$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
8844 else
ed3ef339
DE
8845
8846 pkg_config=${pkg_config_prog_path}
8847 guile_version_list=${try_guile_versions}
8848 flag_errors=no
8849
ed3ef339
DE
8850 found_usable_guile=checking
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8852$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8853 for guile_version in ${guile_version_list}; do
8854 ${pkg_config} --exists ${guile_version} 2>/dev/null
8855 if test $? != 0; then
8856 continue
8857 fi
8858 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8859 if test $? != 0; then
8860 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8861 fi
8862 new_LIBS=`${pkg_config} --libs ${guile_version}`
8863 if test $? != 0; then
8864 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8865 fi
8866 found_usable_guile=${guile_version}
8867 break
8868 done
8869 if test "${found_usable_guile}" = "checking"; then
8870 if test "${flag_errors}" = "yes"; then
8871 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8872 else
8873 found_usable_guile=no
8874 fi
8875 fi
8876 if test "${found_usable_guile}" != no; then
8877 save_CPPFLAGS=$CPPFLAGS
8878 save_LIBS=$LIBS
8879 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8880 LIBS="$LIBS $new_LIBS"
8881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8882/* end confdefs.h. */
8883#include "libguile.h"
8884int
8885main ()
8886{
8887scm_init_guile ();
8888 ;
8889 return 0;
8890}
8891_ACEOF
8892if ac_fn_c_try_link "$LINENO"; then :
8893 have_libguile=yes
8894 GUILE_CPPFLAGS=$new_CPPFLAGS
8895 GUILE_LIBS=$new_LIBS
8896else
8897 found_usable_guile=no
8898fi
8899rm -f core conftest.err conftest.$ac_objext \
8900 conftest$ac_exeext conftest.$ac_ext
8901 CPPFLAGS=$save_CPPFLAGS
8902 LIBS=$save_LIBS
8903 if test "${found_usable_guile}" = no; then
8904 if test "${flag_errors}" = yes; then
8905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8907as_fn_error "linking guile version ${guile_version} test program failed
8908See \`config.log' for more details." "$LINENO" 5; }
8909 fi
8910 fi
8911 fi
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8913$as_echo "${found_usable_guile}" >&6; }
8914
e1402065 8915 fi
ed3ef339
DE
8916 ;;
8917yes)
e1402065
DE
8918 if test "${pkg_config_prog_path}" = "missing"; then
8919 as_fn_error "pkg-config not found" "$LINENO" 5
8920 fi
ed3ef339
DE
8921
8922 pkg_config=${pkg_config_prog_path}
8923 guile_version_list=${try_guile_versions}
8924 flag_errors=yes
8925
ed3ef339
DE
8926 found_usable_guile=checking
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
8928$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
8929 for guile_version in ${guile_version_list}; do
8930 ${pkg_config} --exists ${guile_version} 2>/dev/null
8931 if test $? != 0; then
8932 continue
8933 fi
8934 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
8935 if test $? != 0; then
8936 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
8937 fi
8938 new_LIBS=`${pkg_config} --libs ${guile_version}`
8939 if test $? != 0; then
8940 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
8941 fi
8942 found_usable_guile=${guile_version}
8943 break
8944 done
8945 if test "${found_usable_guile}" = "checking"; then
8946 if test "${flag_errors}" = "yes"; then
8947 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
8948 else
8949 found_usable_guile=no
8950 fi
8951 fi
8952 if test "${found_usable_guile}" != no; then
8953 save_CPPFLAGS=$CPPFLAGS
8954 save_LIBS=$LIBS
8955 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8956 LIBS="$LIBS $new_LIBS"
8957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8958/* end confdefs.h. */
8959#include "libguile.h"
8960int
8961main ()
8962{
8963scm_init_guile ();
8964 ;
8965 return 0;
8966}
8967_ACEOF
8968if ac_fn_c_try_link "$LINENO"; then :
8969 have_libguile=yes
8970 GUILE_CPPFLAGS=$new_CPPFLAGS
8971 GUILE_LIBS=$new_LIBS
8972else
8973 found_usable_guile=no
8974fi
8975rm -f core conftest.err conftest.$ac_objext \
8976 conftest$ac_exeext conftest.$ac_ext
8977 CPPFLAGS=$save_CPPFLAGS
8978 LIBS=$save_LIBS
8979 if test "${found_usable_guile}" = no; then
8980 if test "${flag_errors}" = yes; then
8981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8983as_fn_error "linking guile version ${guile_version} test program failed
8984See \`config.log' for more details." "$LINENO" 5; }
8985 fi
8986 fi
8987 fi
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
8989$as_echo "${found_usable_guile}" >&6; }
8990
8991 ;;
8992[\\/]* | ?:[\\/]*)
e1402065 8993 if test -x "${with_guile}"; then
ed3ef339
DE
8994
8995 pkg_config=${with_guile}
8996 guile_version_list=${try_guile_versions}
8997 flag_errors=yes
8998
ed3ef339
DE
8999 found_usable_guile=checking
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9001$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9002 for guile_version in ${guile_version_list}; do
9003 ${pkg_config} --exists ${guile_version} 2>/dev/null
9004 if test $? != 0; then
9005 continue
9006 fi
9007 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9008 if test $? != 0; then
9009 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9010 fi
9011 new_LIBS=`${pkg_config} --libs ${guile_version}`
9012 if test $? != 0; then
9013 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9014 fi
9015 found_usable_guile=${guile_version}
9016 break
9017 done
9018 if test "${found_usable_guile}" = "checking"; then
9019 if test "${flag_errors}" = "yes"; then
9020 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9021 else
9022 found_usable_guile=no
9023 fi
9024 fi
9025 if test "${found_usable_guile}" != no; then
9026 save_CPPFLAGS=$CPPFLAGS
9027 save_LIBS=$LIBS
9028 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9029 LIBS="$LIBS $new_LIBS"
9030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9031/* end confdefs.h. */
9032#include "libguile.h"
9033int
9034main ()
9035{
9036scm_init_guile ();
9037 ;
9038 return 0;
9039}
9040_ACEOF
9041if ac_fn_c_try_link "$LINENO"; then :
9042 have_libguile=yes
9043 GUILE_CPPFLAGS=$new_CPPFLAGS
9044 GUILE_LIBS=$new_LIBS
9045else
9046 found_usable_guile=no
9047fi
9048rm -f core conftest.err conftest.$ac_objext \
9049 conftest$ac_exeext conftest.$ac_ext
9050 CPPFLAGS=$save_CPPFLAGS
9051 LIBS=$save_LIBS
9052 if test "${found_usable_guile}" = no; then
9053 if test "${flag_errors}" = yes; then
9054 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9056as_fn_error "linking guile version ${guile_version} test program failed
9057See \`config.log' for more details." "$LINENO" 5; }
9058 fi
9059 fi
9060 fi
9061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9062$as_echo "${found_usable_guile}" >&6; }
9063
e1402065
DE
9064 else
9065 as_fn_error "Guile config program not executable: ${with_guile}" "$LINENO" 5
9066 fi
ed3ef339
DE
9067 ;;
9068"" | */*)
9069 # Disallow --with=guile="" and --with-guile=foo/bar.
9070 as_fn_error "invalid value for --with-guile" "$LINENO" 5
9071 ;;
9072*)
9073 # A space separate list of guile versions to try, in order.
e1402065
DE
9074 if test "${pkg_config_prog_path}" = "missing"; then
9075 as_fn_error "pkg-config not found" "$LINENO" 5
9076 fi
ed3ef339
DE
9077
9078 pkg_config=${pkg_config_prog_path}
9079 guile_version_list=${with_guile}
9080 flag_errors=yes
9081
ed3ef339
DE
9082 found_usable_guile=checking
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
9084$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
9085 for guile_version in ${guile_version_list}; do
9086 ${pkg_config} --exists ${guile_version} 2>/dev/null
9087 if test $? != 0; then
9088 continue
9089 fi
9090 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
9091 if test $? != 0; then
9092 as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
9093 fi
9094 new_LIBS=`${pkg_config} --libs ${guile_version}`
9095 if test $? != 0; then
9096 as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
9097 fi
9098 found_usable_guile=${guile_version}
9099 break
9100 done
9101 if test "${found_usable_guile}" = "checking"; then
9102 if test "${flag_errors}" = "yes"; then
9103 as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
9104 else
9105 found_usable_guile=no
9106 fi
9107 fi
9108 if test "${found_usable_guile}" != no; then
9109 save_CPPFLAGS=$CPPFLAGS
9110 save_LIBS=$LIBS
9111 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
9112 LIBS="$LIBS $new_LIBS"
9113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9114/* end confdefs.h. */
9115#include "libguile.h"
9116int
9117main ()
9118{
9119scm_init_guile ();
9120 ;
9121 return 0;
9122}
9123_ACEOF
9124if ac_fn_c_try_link "$LINENO"; then :
9125 have_libguile=yes
9126 GUILE_CPPFLAGS=$new_CPPFLAGS
9127 GUILE_LIBS=$new_LIBS
9128else
9129 found_usable_guile=no
9130fi
9131rm -f core conftest.err conftest.$ac_objext \
9132 conftest$ac_exeext conftest.$ac_ext
9133 CPPFLAGS=$save_CPPFLAGS
9134 LIBS=$save_LIBS
9135 if test "${found_usable_guile}" = no; then
9136 if test "${flag_errors}" = yes; then
9137 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9139as_fn_error "linking guile version ${guile_version} test program failed
9140See \`config.log' for more details." "$LINENO" 5; }
9141 fi
9142 fi
9143 fi
9144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
9145$as_echo "${found_usable_guile}" >&6; }
9146
9147 ;;
9148esac
9149
e76c5d17 9150if test "${have_libguile}" != no; then
d342a0da
DE
9151 case "${with_guile}" in
9152 [\\/]* | ?:[\\/]*)
e76c5d17
DE
9153
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9155$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9156if test "${ac_cv_guild_program_name+set}" = set; then :
9157 $as_echo_n "(cached) " >&6
9158else
d342a0da 9159 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
9160
9161 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9162 # the 'guild' and 'bindir' variables. In that case, try to guess
9163 # what the program name is, at the risk of getting it wrong if
9164 # Guile was configured with '--program-suffix' or similar.
9165 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 9166 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
9167 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9168 fi
9169
9170fi
9171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9172$as_echo "$ac_cv_guild_program_name" >&6; }
9173
9174 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9175 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9176 fi
9177
9178 GUILD="$ac_cv_guild_program_name"
9179
9180
d342a0da
DE
9181 ;;
9182 *)
9183
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
9185$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
9186if test "${ac_cv_guild_program_name+set}" = set; then :
9187 $as_echo_n "(cached) " >&6
9188else
9189 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
9190
9191 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
9192 # the 'guild' and 'bindir' variables. In that case, try to guess
9193 # what the program name is, at the risk of getting it wrong if
9194 # Guile was configured with '--program-suffix' or similar.
9195 if test "x$ac_cv_guild_program_name" = "x"; then
9196 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
9197 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
9198 fi
9199
9200fi
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
9202$as_echo "$ac_cv_guild_program_name" >&6; }
9203
9204 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
9205 as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
9206 fi
9207
9208 GUILD="$ac_cv_guild_program_name"
9209
9210
9211 ;;
9212 esac
e76c5d17
DE
9213
9214
9215 if test "$cross_compiling" = no; then
9216 GUILD_TARGET_FLAG=
9217 else
9218 GUILD_TARGET_FLAG="--target=$host"
9219 fi
9220
9221
9222
9223
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
9225$as_echo_n "checking whether guild supports this host... " >&6; }
9226if test "${ac_cv_guild_ok+set}" = set; then :
9227 $as_echo_n "(cached) " >&6
9228else
9229 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
9230 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
9231 ac_cv_guild_ok=yes
9232 else
9233 ac_cv_guild_ok=no
9234 fi
9235fi
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
9237$as_echo "$ac_cv_guild_ok" >&6; }
9238
9239 if test "$ac_cv_guild_ok" = no; then
9240 have_libguile=no
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
9242$as_echo "$as_me: WARNING: disabling guile support" >&2;}
9243 fi
9244fi
9245
ed3ef339
DE
9246if test "${have_libguile}" != no; then
9247
9248$as_echo "#define HAVE_GUILE 1" >>confdefs.h
9249
9250 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
9251 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
9252 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
9253 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
9254 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
9255
9256 save_LIBS="$LIBS"
9257 save_CPPFLAGS="$CPPFLAGS"
9258 LIBS="$GUILE_LIBS"
9259 CPPFLAGS="$GUILE_CPPFLAGS"
9260 for ac_func in scm_new_smob
9261do :
9262 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
9263if test "x$ac_cv_func_scm_new_smob" = x""yes; then :
9264 cat >>confdefs.h <<_ACEOF
9265#define HAVE_SCM_NEW_SMOB 1
9266_ACEOF
9267
9268fi
9269done
9270
9271 LIBS="$save_LIBS"
9272 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
9273else
9274 # Even if Guile support is not compiled in, we need to have these files
9275 # included.
9276 CONFIG_OBS="$CONFIG_OBS guile.o"
9277 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
9278fi
9a156167 9279
ac534cba 9280
4df42755
DE
9281 if test "${have_libguile}" != no; then
9282 HAVE_GUILE_TRUE=
9283 HAVE_GUILE_FALSE='#'
9284else
9285 HAVE_GUILE_TRUE='#'
9286 HAVE_GUILE_FALSE=
9287fi
9288
ac534cba 9289
d344e670
DE
9290# --------------------- #
9291# Check for libmcheck. #
9292# --------------------- #
9293
a8db4212
YPK
9294# Enable -lmcheck by default (it provides cheap-enough memory mangling),
9295# but turn it off if Python is enabled with threads, since -lmcheck is
9296# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
9297# and for releases.
17ef446e
PA
9298if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
9299 && $development; then
9300 libmcheck_default=yes
9301else
9302 libmcheck_default=no
a8db4212
YPK
9303fi
9304
17ef446e
PA
9305 # Check whether --enable-libmcheck was given.
9306if test "${enable_libmcheck+set}" = set; then :
9307 enableval=$enable_libmcheck; case "${enableval}" in
9308 yes | y) ENABLE_LIBMCHECK="yes" ;;
9309 no | n) ENABLE_LIBMCHECK="no" ;;
9310 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
9311 esac
9312fi
9313
9314
9315 if test -z "${ENABLE_LIBMCHECK}"; then
9316 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 9317 fi
17ef446e
PA
9318
9319 if test "$ENABLE_LIBMCHECK" = "yes" ; then
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
9321$as_echo_n "checking for main in -lmcheck... " >&6; }
9322if test "${ac_cv_lib_mcheck_main+set}" = set; then :
9323 $as_echo_n "(cached) " >&6
9324else
9325 ac_check_lib_save_LIBS=$LIBS
9326LIBS="-lmcheck $LIBS"
9327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9328/* end confdefs.h. */
9329
9330
9331int
9332main ()
9333{
9334return main ();
9335 ;
9336 return 0;
9337}
9338_ACEOF
9339if ac_fn_c_try_link "$LINENO"; then :
9340 ac_cv_lib_mcheck_main=yes
9341else
9342 ac_cv_lib_mcheck_main=no
9343fi
9344rm -f core conftest.err conftest.$ac_objext \
9345 conftest$ac_exeext conftest.$ac_ext
9346LIBS=$ac_check_lib_save_LIBS
9347fi
9348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
9349$as_echo "$ac_cv_lib_mcheck_main" >&6; }
9350if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
9351 cat >>confdefs.h <<_ACEOF
9352#define HAVE_LIBMCHECK 1
9353_ACEOF
9354
9355 LIBS="-lmcheck $LIBS"
9356
9357fi
9358
17ef446e
PA
9359 fi
9360
9361
9362if test "$ENABLE_LIBMCHECK" = "yes" \
9363 -a "${have_libpython}" != "no" \
9364 -a "${python_has_threads}" = "yes" ; then
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
9366$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
9367fi
9368
81ecdfbb
RW
9369# ------------------------- #
9370# Checks for header files. #
9371# ------------------------- #
c890192f 9372
81ecdfbb
RW
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9374$as_echo_n "checking for ANSI C header files... " >&6; }
9375if test "${ac_cv_header_stdc+set}" = set; then :
9376 $as_echo_n "(cached) " >&6
bec39cab 9377else
81ecdfbb 9378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9379/* end confdefs.h. */
81ecdfbb
RW
9380#include <stdlib.h>
9381#include <stdarg.h>
9382#include <string.h>
9383#include <float.h>
9384
a9322a30
TT
9385int
9386main ()
9387{
a9322a30
TT
9388
9389 ;
9390 return 0;
9391}
bec39cab 9392_ACEOF
81ecdfbb
RW
9393if ac_fn_c_try_compile "$LINENO"; then :
9394 ac_cv_header_stdc=yes
bec39cab 9395else
81ecdfbb 9396 ac_cv_header_stdc=no
a9322a30 9397fi
81ecdfbb 9398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9399
81ecdfbb
RW
9400if test $ac_cv_header_stdc = yes; then
9401 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9403/* end confdefs.h. */
9404#include <string.h>
bec39cab 9405
81ecdfbb
RW
9406_ACEOF
9407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9408 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 9409
bec39cab 9410else
81ecdfbb
RW
9411 ac_cv_header_stdc=no
9412fi
9413rm -f conftest*
9414
9415fi
9416
9417if test $ac_cv_header_stdc = yes; then
9418 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9420/* end confdefs.h. */
9421#include <stdlib.h>
9422
bec39cab 9423_ACEOF
81ecdfbb
RW
9424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9425 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 9426
81ecdfbb
RW
9427else
9428 ac_cv_header_stdc=no
9429fi
9430rm -f conftest*
bec39cab 9431
bec39cab 9432fi
81ecdfbb
RW
9433
9434if test $ac_cv_header_stdc = yes; then
9435 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9436 if test "$cross_compiling" = yes; then :
9437 :
bec39cab 9438else
81ecdfbb 9439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9440/* end confdefs.h. */
81ecdfbb
RW
9441#include <ctype.h>
9442#include <stdlib.h>
9443#if ((' ' & 0x0FF) == 0x020)
9444# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9445# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9446#else
9447# define ISLOWER(c) \
9448 (('a' <= (c) && (c) <= 'i') \
9449 || ('j' <= (c) && (c) <= 'r') \
9450 || ('s' <= (c) && (c) <= 'z'))
9451# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9452#endif
9453
9454#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
9455int
9456main ()
9457{
81ecdfbb
RW
9458 int i;
9459 for (i = 0; i < 256; i++)
9460 if (XOR (islower (i), ISLOWER (i))
9461 || toupper (i) != TOUPPER (i))
9462 return 2;
a9322a30
TT
9463 return 0;
9464}
bec39cab 9465_ACEOF
81ecdfbb
RW
9466if ac_fn_c_try_run "$LINENO"; then :
9467
bec39cab 9468else
81ecdfbb
RW
9469 ac_cv_header_stdc=no
9470fi
9471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9472 conftest.$ac_objext conftest.beam conftest.$ac_ext
9473fi
bec39cab 9474
bec39cab 9475fi
a9322a30 9476fi
81ecdfbb
RW
9477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9478$as_echo "$ac_cv_header_stdc" >&6; }
9479if test $ac_cv_header_stdc = yes; then
bec39cab 9480
81ecdfbb 9481$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 9482
81ecdfbb 9483fi
bec39cab 9484
81ecdfbb 9485# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b 9486for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
161d1bec 9487 thread_db.h \
0080a2f6 9488 sys/fault.h \
81ecdfbb
RW
9489 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
9490 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
9491 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b 9492 termios.h termio.h \
3447c057 9493 sgtty.h elf_hp.h \
9467110b 9494 dlfcn.h
81ecdfbb
RW
9495do :
9496 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9497ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9498eval as_val=\$$as_ac_Header
9499 if test "x$as_val" = x""yes; then :
bec39cab 9500 cat >>confdefs.h <<_ACEOF
81ecdfbb 9501#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9502_ACEOF
c906108c 9503
bec39cab 9504fi
81ecdfbb
RW
9505
9506done
9507
81ecdfbb
RW
9508for ac_header in sys/proc.h
9509do :
9510 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
9511# include <sys/param.h>
9512#endif
c906108c 9513
81ecdfbb
RW
9514"
9515if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 9516 cat >>confdefs.h <<_ACEOF
81ecdfbb 9517#define HAVE_SYS_PROC_H 1
bec39cab 9518_ACEOF
5ee754fc 9519
bec39cab 9520fi
81ecdfbb
RW
9521
9522done
9523
9524for ac_header in sys/user.h
9525do :
9526 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
9527# include <sys/param.h>
a9322a30
TT
9528#endif
9529
81ecdfbb
RW
9530"
9531if test "x$ac_cv_header_sys_user_h" = x""yes; then :
9532 cat >>confdefs.h <<_ACEOF
9533#define HAVE_SYS_USER_H 1
bec39cab 9534_ACEOF
bec39cab 9535
a9322a30 9536fi
bec39cab 9537
81ecdfbb 9538done
5ee754fc 9539
5ee754fc 9540
81ecdfbb
RW
9541# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
9542# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
9543# think that we don't have <curses.h> if we're using GCC.
9544case $host_os in
9545 solaris2.[789])
9546 if test "$GCC" = yes; then
9547
9548$as_echo "#define _MSE_INT_H 1" >>confdefs.h
9549
9550 fi ;;
9551esac
9552for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
9553do :
9554 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9555ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9556eval as_val=\$$as_ac_Header
9557 if test "x$as_val" = x""yes; then :
bec39cab 9558 cat >>confdefs.h <<_ACEOF
81ecdfbb 9559#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9560_ACEOF
5ee754fc
MK
9561
9562fi
9563
81ecdfbb 9564done
bec39cab 9565
81ecdfbb
RW
9566for ac_header in term.h
9567do :
9568 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
9569# include <curses.h>
9570#endif
bec39cab 9571
81ecdfbb
RW
9572"
9573if test "x$ac_cv_header_term_h" = x""yes; then :
9574 cat >>confdefs.h <<_ACEOF
9575#define HAVE_TERM_H 1
a8111142 9576_ACEOF
a8111142 9577
a8111142 9578fi
a8111142 9579
81ecdfbb 9580done
a8111142
TT
9581
9582
81ecdfbb
RW
9583# ------------------------- #
9584# Checks for declarations. #
9585# ------------------------- #
a9322a30 9586
07697489
PA
9587
9588 # Check for presence and size of long long.
9589 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
9590if test "x$ac_cv_type_long_long" = x""yes; then :
9591
9592cat >>confdefs.h <<_ACEOF
9593#define HAVE_LONG_LONG 1
9594_ACEOF
9595
9596# The cast to long int works around a bug in the HP C Compiler
9597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9599# This bug is HP SR number 8606223364.
9600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9601$as_echo_n "checking size of long long... " >&6; }
9602if test "${ac_cv_sizeof_long_long+set}" = set; then :
9603 $as_echo_n "(cached) " >&6
9604else
9605 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
9606
9607else
9608 if test "$ac_cv_type_long_long" = yes; then
9609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9611{ as_fn_set_status 77
9612as_fn_error "cannot compute sizeof (long long)
9613See \`config.log' for more details." "$LINENO" 5; }; }
9614 else
9615 ac_cv_sizeof_long_long=0
9616 fi
9617fi
9618
9619fi
9620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9621$as_echo "$ac_cv_sizeof_long_long" >&6; }
9622
9623
9624
9625cat >>confdefs.h <<_ACEOF
9626#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9627_ACEOF
9628
9629
9630fi
9631
9632
9633 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
9634if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
9635 ac_have_decl=1
9636else
9637 ac_have_decl=0
9638fi
9639
9640cat >>confdefs.h <<_ACEOF
9641#define HAVE_DECL_BASENAME $ac_have_decl
9642_ACEOF
9643ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
9644if test "x$ac_cv_have_decl_ffs" = x""yes; then :
9645 ac_have_decl=1
9646else
9647 ac_have_decl=0
9648fi
9649
9650cat >>confdefs.h <<_ACEOF
9651#define HAVE_DECL_FFS $ac_have_decl
9652_ACEOF
9653ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
9654if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
9655 ac_have_decl=1
9656else
9657 ac_have_decl=0
9658fi
9659
9660cat >>confdefs.h <<_ACEOF
9661#define HAVE_DECL_ASPRINTF $ac_have_decl
9662_ACEOF
9663ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
9664if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
9665 ac_have_decl=1
9666else
9667 ac_have_decl=0
9668fi
9669
9670cat >>confdefs.h <<_ACEOF
9671#define HAVE_DECL_VASPRINTF $ac_have_decl
9672_ACEOF
9673ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9674if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9675 ac_have_decl=1
9676else
9677 ac_have_decl=0
9678fi
9679
9680cat >>confdefs.h <<_ACEOF
9681#define HAVE_DECL_SNPRINTF $ac_have_decl
9682_ACEOF
9683ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
9684if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
9685 ac_have_decl=1
9686else
9687 ac_have_decl=0
9688fi
9689
9690cat >>confdefs.h <<_ACEOF
9691#define HAVE_DECL_VSNPRINTF $ac_have_decl
9692_ACEOF
9693
9694 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
9695if test "x$ac_cv_have_decl_strtol" = x""yes; then :
9696 ac_have_decl=1
9697else
9698 ac_have_decl=0
9699fi
9700
9701cat >>confdefs.h <<_ACEOF
9702#define HAVE_DECL_STRTOL $ac_have_decl
9703_ACEOF
9704ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
9705if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
9706 ac_have_decl=1
9707else
9708 ac_have_decl=0
9709fi
9710
9711cat >>confdefs.h <<_ACEOF
9712#define HAVE_DECL_STRTOUL $ac_have_decl
9713_ACEOF
9714ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
9715if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
9716 ac_have_decl=1
9717else
9718 ac_have_decl=0
9719fi
9720
9721cat >>confdefs.h <<_ACEOF
9722#define HAVE_DECL_STRTOLL $ac_have_decl
9723_ACEOF
9724ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
9725if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
9726 ac_have_decl=1
9727else
9728 ac_have_decl=0
9729fi
9730
9731cat >>confdefs.h <<_ACEOF
9732#define HAVE_DECL_STRTOULL $ac_have_decl
9733_ACEOF
9734
9735 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
9736if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
9737 ac_have_decl=1
9738else
9739 ac_have_decl=0
9740fi
9741
9742cat >>confdefs.h <<_ACEOF
9743#define HAVE_DECL_STRVERSCMP $ac_have_decl
9744_ACEOF
9745
9746
9747
81ecdfbb
RW
9748ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
9749if test "x$ac_cv_have_decl_free" = x""yes; then :
9750 ac_have_decl=1
bec39cab 9751else
81ecdfbb
RW
9752 ac_have_decl=0
9753fi
9754
9755cat >>confdefs.h <<_ACEOF
9756#define HAVE_DECL_FREE $ac_have_decl
bec39cab 9757_ACEOF
81ecdfbb
RW
9758ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
9759if test "x$ac_cv_have_decl_malloc" = x""yes; then :
9760 ac_have_decl=1
9761else
9762 ac_have_decl=0
9763fi
9764
9765cat >>confdefs.h <<_ACEOF
9766#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 9767_ACEOF
81ecdfbb
RW
9768ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
9769if test "x$ac_cv_have_decl_realloc" = x""yes; then :
9770 ac_have_decl=1
bec39cab 9771else
81ecdfbb
RW
9772 ac_have_decl=0
9773fi
bec39cab 9774
81ecdfbb
RW
9775cat >>confdefs.h <<_ACEOF
9776#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 9777_ACEOF
81ecdfbb
RW
9778ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
9779if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
9780 ac_have_decl=1
9781else
9782 ac_have_decl=0
5ee754fc 9783fi
81ecdfbb
RW
9784
9785cat >>confdefs.h <<_ACEOF
9786#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 9787_ACEOF
5ee754fc 9788
5ee754fc 9789
81ecdfbb
RW
9790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
9791$as_echo_n "checking for LC_MESSAGES... " >&6; }
9792if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
9793 $as_echo_n "(cached) " >&6
bec39cab 9794else
81ecdfbb 9795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9796/* end confdefs.h. */
81ecdfbb 9797#include <locale.h>
a9322a30
TT
9798int
9799main ()
9800{
81ecdfbb 9801return LC_MESSAGES
a9322a30
TT
9802 ;
9803 return 0;
9804}
bec39cab 9805_ACEOF
81ecdfbb
RW
9806if ac_fn_c_try_link "$LINENO"; then :
9807 am_cv_val_LC_MESSAGES=yes
bec39cab 9808else
81ecdfbb
RW
9809 am_cv_val_LC_MESSAGES=no
9810fi
9811rm -f core conftest.err conftest.$ac_objext \
9812 conftest$ac_exeext conftest.$ac_ext
9813fi
9814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
9815$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
9816 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 9817
81ecdfbb
RW
9818$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
9819
9820 fi
9821
9822
9823# ----------------------- #
9824# Checks for structures. #
9825# ----------------------- #
9826
9827ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
9828if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
9829
9830cat >>confdefs.h <<_ACEOF
9831#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 9832_ACEOF
7eb368b3 9833
81ecdfbb 9834
7eb368b3 9835fi
81ecdfbb
RW
9836ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
9837if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 9838
a9322a30
TT
9839cat >>confdefs.h <<_ACEOF
9840#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
9841_ACEOF
9842
a9322a30 9843
7eb368b3
NR
9844fi
9845
7eb368b3 9846
a9322a30
TT
9847# ------------------ #
9848# Checks for types. #
9849# ------------------ #
7eb368b3 9850
81ecdfbb
RW
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9852$as_echo_n "checking return type of signal handlers... " >&6; }
9853if test "${ac_cv_type_signal+set}" = set; then :
9854 $as_echo_n "(cached) " >&6
bec39cab 9855else
81ecdfbb 9856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9857/* end confdefs.h. */
a9322a30
TT
9858#include <sys/types.h>
9859#include <signal.h>
7cb9022a 9860
a9322a30
TT
9861int
9862main ()
9863{
81ecdfbb 9864return *(signal (0, 0)) (0) == 1;
a9322a30
TT
9865 ;
9866 return 0;
9867}
bec39cab 9868_ACEOF
81ecdfbb
RW
9869if ac_fn_c_try_compile "$LINENO"; then :
9870 ac_cv_type_signal=int
bec39cab 9871else
81ecdfbb 9872 ac_cv_type_signal=void
bec39cab 9873fi
81ecdfbb 9874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9875fi
81ecdfbb
RW
9876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9877$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 9878
a9322a30
TT
9879cat >>confdefs.h <<_ACEOF
9880#define RETSIGTYPE $ac_cv_type_signal
9881_ACEOF
5ee754fc 9882
bec39cab 9883
81ecdfbb 9884ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
9885#include <sys/socket.h>
9886
81ecdfbb
RW
9887"
9888if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9889
a9322a30
TT
9890cat >>confdefs.h <<_ACEOF
9891#define HAVE_SOCKLEN_T 1
9892_ACEOF
9893
9894
9895fi
9896
9897
9898# ------------------------------------- #
9899# Checks for compiler characteristics. #
9900# ------------------------------------- #
9901
81ecdfbb
RW
9902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9903$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9904if test "${ac_cv_c_const+set}" = set; then :
9905 $as_echo_n "(cached) " >&6
a9322a30 9906else
81ecdfbb 9907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9908/* end confdefs.h. */
a9322a30
TT
9909
9910int
9911main ()
9912{
9913/* FIXME: Include the comments suggested by Paul. */
9914#ifndef __cplusplus
9915 /* Ultrix mips cc rejects this. */
9916 typedef int charset[2];
81ecdfbb 9917 const charset cs;
a9322a30 9918 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9919 char const *const *pcpcc;
9920 char **ppc;
a9322a30
TT
9921 /* NEC SVR4.0.2 mips cc rejects this. */
9922 struct point {int x, y;};
9923 static struct point const zero = {0,0};
9924 /* AIX XL C 1.02.0.0 rejects this.
9925 It does not let you subtract one const X* pointer from another in
9926 an arm of an if-expression whose if-part is not a constant
9927 expression */
9928 const char *g = "string";
81ecdfbb 9929 pcpcc = &g + (g ? g-g : 0);
a9322a30 9930 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9931 ++pcpcc;
9932 ppc = (char**) pcpcc;
9933 pcpcc = (char const *const *) ppc;
a9322a30
TT
9934 { /* SCO 3.2v4 cc rejects this. */
9935 char *t;
9936 char const *s = 0 ? (char *) 0 : (char const *) 0;
9937
9938 *t++ = 0;
81ecdfbb 9939 if (s) return 0;
a9322a30
TT
9940 }
9941 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9942 int x[] = {25, 17};
9943 const int *foo = &x[0];
9944 ++foo;
9945 }
9946 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9947 typedef const int *iptr;
9948 iptr p = 0;
9949 ++p;
9950 }
9951 { /* AIX XL C 1.02.0.0 rejects this saying
9952 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9953 struct s { int j; const int *ap[3]; };
9954 struct s *b; b->j = 5;
9955 }
9956 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9957 const int foo = 10;
81ecdfbb 9958 if (!foo) return 0;
a9322a30 9959 }
81ecdfbb 9960 return !cs[0] && !zero.x;
a9322a30
TT
9961#endif
9962
9963 ;
9964 return 0;
9965}
bec39cab 9966_ACEOF
81ecdfbb 9967if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9968 ac_cv_c_const=yes
5ee754fc 9969else
81ecdfbb 9970 ac_cv_c_const=no
5ee754fc 9971fi
81ecdfbb 9972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9973fi
81ecdfbb
RW
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9975$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9976if test $ac_cv_c_const = no; then
bec39cab 9977
81ecdfbb 9978$as_echo "#define const /**/" >>confdefs.h
bec39cab 9979
5ee754fc 9980fi
bec39cab 9981
81ecdfbb
RW
9982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9983$as_echo_n "checking for inline... " >&6; }
9984if test "${ac_cv_c_inline+set}" = set; then :
9985 $as_echo_n "(cached) " >&6
bec39cab 9986else
a9322a30
TT
9987 ac_cv_c_inline=no
9988for ac_kw in inline __inline__ __inline; do
81ecdfbb 9989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9990/* end confdefs.h. */
a9322a30
TT
9991#ifndef __cplusplus
9992typedef int foo_t;
9993static $ac_kw foo_t static_foo () {return 0; }
9994$ac_kw foo_t foo () {return 0; }
9995#endif
9996
bec39cab 9997_ACEOF
81ecdfbb
RW
9998if ac_fn_c_try_compile "$LINENO"; then :
9999 ac_cv_c_inline=$ac_kw
bec39cab 10000fi
81ecdfbb
RW
10001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10002 test "$ac_cv_c_inline" != no && break
a9322a30 10003done
bec39cab 10004
5ee754fc 10005fi
81ecdfbb
RW
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10007$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 10008
a9322a30
TT
10009case $ac_cv_c_inline in
10010 inline | yes) ;;
10011 *)
10012 case $ac_cv_c_inline in
10013 no) ac_val=;;
10014 *) ac_val=$ac_cv_c_inline;;
10015 esac
10016 cat >>confdefs.h <<_ACEOF
10017#ifndef __cplusplus
10018#define inline $ac_val
10019#endif
10020_ACEOF
bec39cab
AC
10021 ;;
10022esac
bec39cab 10023
81ecdfbb
RW
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10025$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10026if test "${ac_cv_c_bigendian+set}" = set; then :
10027 $as_echo_n "(cached) " >&6
bec39cab 10028else
81ecdfbb
RW
10029 ac_cv_c_bigendian=unknown
10030 # See if we're dealing with a universal compiler.
10031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10032/* end confdefs.h. */
10033#ifndef __APPLE_CC__
10034 not a universal capable compiler
10035 #endif
10036 typedef int dummy;
10037
10038_ACEOF
10039if ac_fn_c_try_compile "$LINENO"; then :
10040
10041 # Check for potential -arch flags. It is not universal unless
10042 # there are at least two -arch flags with different values.
10043 ac_arch=
10044 ac_prev=
10045 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10046 if test -n "$ac_prev"; then
10047 case $ac_word in
10048 i?86 | x86_64 | ppc | ppc64)
10049 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10050 ac_arch=$ac_word
10051 else
10052 ac_cv_c_bigendian=universal
10053 break
10054 fi
10055 ;;
10056 esac
10057 ac_prev=
10058 elif test "x$ac_word" = "x-arch"; then
10059 ac_prev=arch
10060 fi
10061 done
10062fi
10063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10064 if test $ac_cv_c_bigendian = unknown; then
10065 # See if sys/param.h defines the BYTE_ORDER macro.
10066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10067/* end confdefs.h. */
a9322a30 10068#include <sys/types.h>
81ecdfbb 10069 #include <sys/param.h>
a9322a30
TT
10070
10071int
10072main ()
10073{
81ecdfbb
RW
10074#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10075 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10076 && LITTLE_ENDIAN)
10077 bogus endian macros
10078 #endif
a9322a30
TT
10079
10080 ;
10081 return 0;
10082}
bec39cab 10083_ACEOF
81ecdfbb 10084if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10085 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 10086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10087/* end confdefs.h. */
a9322a30 10088#include <sys/types.h>
81ecdfbb 10089 #include <sys/param.h>
a9322a30
TT
10090
10091int
10092main ()
10093{
10094#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
10095 not big endian
10096 #endif
a9322a30
TT
10097
10098 ;
10099 return 0;
10100}
bec39cab 10101_ACEOF
81ecdfbb 10102if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10103 ac_cv_c_bigendian=yes
5ee754fc 10104else
81ecdfbb 10105 ac_cv_c_bigendian=no
5ee754fc 10106fi
81ecdfbb
RW
10107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10108fi
10109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10110 fi
10111 if test $ac_cv_c_bigendian = unknown; then
10112 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10114/* end confdefs.h. */
10115#include <limits.h>
bec39cab 10116
81ecdfbb
RW
10117int
10118main ()
10119{
10120#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10121 bogus endian macros
10122 #endif
10123
10124 ;
10125 return 0;
10126}
7eb368b3 10127_ACEOF
81ecdfbb
RW
10128if ac_fn_c_try_compile "$LINENO"; then :
10129 # It does; now see whether it defined to _BIG_ENDIAN or not.
10130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 10131/* end confdefs.h. */
81ecdfbb
RW
10132#include <limits.h>
10133
7eb368b3
NR
10134int
10135main ()
10136{
81ecdfbb
RW
10137#ifndef _BIG_ENDIAN
10138 not big endian
10139 #endif
10140
7eb368b3
NR
10141 ;
10142 return 0;
10143}
10144_ACEOF
81ecdfbb 10145if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 10146 ac_cv_c_bigendian=yes
81ecdfbb
RW
10147else
10148 ac_cv_c_bigendian=no
a9322a30 10149fi
81ecdfbb 10150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 10151fi
81ecdfbb
RW
10152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10153 fi
10154 if test $ac_cv_c_bigendian = unknown; then
10155 # Compile a test program.
10156 if test "$cross_compiling" = yes; then :
10157 # Try to guess by grepping values from an object file.
10158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10159/* end confdefs.h. */
10160short int ascii_mm[] =
10161 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10162 short int ascii_ii[] =
10163 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10164 int use_ascii (int i) {
10165 return ascii_mm[i] + ascii_ii[i];
10166 }
10167 short int ebcdic_ii[] =
10168 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10169 short int ebcdic_mm[] =
10170 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10171 int use_ebcdic (int i) {
10172 return ebcdic_mm[i] + ebcdic_ii[i];
10173 }
10174 extern int foo;
7eb368b3 10175
81ecdfbb
RW
10176int
10177main ()
10178{
10179return use_ascii (foo) == use_ebcdic (foo);
10180 ;
10181 return 0;
10182}
10183_ACEOF
10184if ac_fn_c_try_compile "$LINENO"; then :
10185 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10186 ac_cv_c_bigendian=yes
10187 fi
10188 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10189 if test "$ac_cv_c_bigendian" = unknown; then
10190 ac_cv_c_bigendian=no
10191 else
10192 # finding both strings is unlikely to happen, but who knows?
10193 ac_cv_c_bigendian=unknown
10194 fi
10195 fi
7eb368b3 10196fi
81ecdfbb 10197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 10198else
81ecdfbb 10199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10200/* end confdefs.h. */
81ecdfbb 10201$ac_includes_default
d3ea6809
MM
10202int
10203main ()
10204{
81ecdfbb
RW
10205
10206 /* Are we little or big endian? From Harbison&Steele. */
10207 union
10208 {
10209 long int l;
10210 char c[sizeof (long int)];
10211 } u;
10212 u.l = 1;
10213 return u.c[sizeof (long int) - 1] == 1;
10214
10215 ;
10216 return 0;
d3ea6809
MM
10217}
10218_ACEOF
81ecdfbb 10219if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10220 ac_cv_c_bigendian=no
d3ea6809 10221else
81ecdfbb 10222 ac_cv_c_bigendian=yes
d3ea6809 10223fi
81ecdfbb
RW
10224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10225 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10226fi
a9322a30 10227
81ecdfbb
RW
10228 fi
10229fi
10230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10231$as_echo "$ac_cv_c_bigendian" >&6; }
10232 case $ac_cv_c_bigendian in #(
10233 yes)
10234 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10235;; #(
10236 no)
10237 ;; #(
10238 universal)
10239
10240$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10241
10242 ;; #(
10243 *)
10244 as_fn_error "unknown endianness
10245 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
10246 esac
d3ea6809
MM
10247
10248
a9322a30
TT
10249# ------------------------------ #
10250# Checks for library functions. #
10251# ------------------------------ #
d3ea6809 10252
a9322a30 10253for ac_header in stdlib.h unistd.h
81ecdfbb
RW
10254do :
10255 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10256ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10257eval as_val=\$$as_ac_Header
10258 if test "x$as_val" = x""yes; then :
bec39cab 10259 cat >>confdefs.h <<_ACEOF
81ecdfbb 10260#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 10261_ACEOF
b757528f 10262
b757528f 10263fi
bec39cab 10264
a9322a30 10265done
a3828db0 10266
a9322a30 10267for ac_func in getpagesize
81ecdfbb
RW
10268do :
10269 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10270if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 10271 cat >>confdefs.h <<_ACEOF
81ecdfbb 10272#define HAVE_GETPAGESIZE 1
bec39cab 10273_ACEOF
bcb3dc3d 10274
bcb3dc3d
MK
10275fi
10276done
10277
81ecdfbb
RW
10278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10279$as_echo_n "checking for working mmap... " >&6; }
10280if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10281 $as_echo_n "(cached) " >&6
a9322a30 10282else
81ecdfbb 10283 if test "$cross_compiling" = yes; then :
a9322a30 10284 ac_cv_func_mmap_fixed_mapped=no
bec39cab 10285else
81ecdfbb 10286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10287/* end confdefs.h. */
a9322a30
TT
10288$ac_includes_default
10289/* malloc might have been renamed as rpl_malloc. */
10290#undef malloc
bec39cab 10291
a9322a30
TT
10292/* Thanks to Mike Haertel and Jim Avera for this test.
10293 Here is a matrix of mmap possibilities:
10294 mmap private not fixed
10295 mmap private fixed at somewhere currently unmapped
10296 mmap private fixed at somewhere already mapped
10297 mmap shared not fixed
10298 mmap shared fixed at somewhere currently unmapped
10299 mmap shared fixed at somewhere already mapped
10300 For private mappings, we should verify that changes cannot be read()
10301 back from the file, nor mmap's back from the file at a different
10302 address. (There have been systems where private was not correctly
10303 implemented like the infamous i386 svr4.0, and systems where the
10304 VM page cache was not coherent with the file system buffer cache
10305 like early versions of FreeBSD and possibly contemporary NetBSD.)
10306 For shared mappings, we should conversely verify that changes get
10307 propagated back to all the places they're supposed to be.
bec39cab 10308
a9322a30
TT
10309 Grep wants private fixed already mapped.
10310 The main things grep needs to know about mmap are:
10311 * does it exist and is it safe to write into the mmap'd area
10312 * how to use it (BSD variants) */
8b9cf735 10313
a9322a30
TT
10314#include <fcntl.h>
10315#include <sys/mman.h>
8b9cf735 10316
81ecdfbb 10317#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 10318char *malloc ();
a3828db0
MK
10319#endif
10320
a9322a30 10321/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 10322#ifndef HAVE_GETPAGESIZE
a9322a30 10323/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 10324# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
10325# define HAVE_SYS_PARAM_H 1
10326# endif
10327
10328# ifdef _SC_PAGESIZE
10329# define getpagesize() sysconf(_SC_PAGESIZE)
10330# else /* no _SC_PAGESIZE */
81ecdfbb 10331# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
10332# include <sys/param.h>
10333# ifdef EXEC_PAGESIZE
10334# define getpagesize() EXEC_PAGESIZE
10335# else /* no EXEC_PAGESIZE */
10336# ifdef NBPG
10337# define getpagesize() NBPG * CLSIZE
10338# ifndef CLSIZE
10339# define CLSIZE 1
10340# endif /* no CLSIZE */
10341# else /* no NBPG */
10342# ifdef NBPC
10343# define getpagesize() NBPC
10344# else /* no NBPC */
10345# ifdef PAGESIZE
10346# define getpagesize() PAGESIZE
10347# endif /* PAGESIZE */
10348# endif /* no NBPC */
10349# endif /* no NBPG */
10350# endif /* no EXEC_PAGESIZE */
10351# else /* no HAVE_SYS_PARAM_H */
10352# define getpagesize() 8192 /* punt totally */
10353# endif /* no HAVE_SYS_PARAM_H */
10354# endif /* no _SC_PAGESIZE */
10355
10356#endif /* no HAVE_GETPAGESIZE */
10357
bec39cab
AC
10358int
10359main ()
10360{
a9322a30
TT
10361 char *data, *data2, *data3;
10362 int i, pagesize;
10363 int fd;
10364
10365 pagesize = getpagesize ();
10366
10367 /* First, make a file with some known garbage in it. */
10368 data = (char *) malloc (pagesize);
10369 if (!data)
81ecdfbb 10370 return 1;
a9322a30
TT
10371 for (i = 0; i < pagesize; ++i)
10372 *(data + i) = rand ();
10373 umask (0);
10374 fd = creat ("conftest.mmap", 0600);
10375 if (fd < 0)
81ecdfbb 10376 return 1;
a9322a30 10377 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 10378 return 1;
a9322a30
TT
10379 close (fd);
10380
10381 /* Next, try to mmap the file at a fixed address which already has
10382 something else allocated at it. If we can, also make sure that
10383 we see the same garbage. */
10384 fd = open ("conftest.mmap", O_RDWR);
10385 if (fd < 0)
81ecdfbb 10386 return 1;
a9322a30
TT
10387 data2 = (char *) malloc (2 * pagesize);
10388 if (!data2)
81ecdfbb
RW
10389 return 1;
10390 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
10391 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10392 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 10393 return 1;
a9322a30
TT
10394 for (i = 0; i < pagesize; ++i)
10395 if (*(data + i) != *(data2 + i))
81ecdfbb 10396 return 1;
a9322a30
TT
10397
10398 /* Finally, make sure that changes to the mapped area do not
10399 percolate back to the file as seen by read(). (This is a bug on
10400 some variants of i386 svr4.0.) */
10401 for (i = 0; i < pagesize; ++i)
10402 *(data2 + i) = *(data2 + i) + 1;
10403 data3 = (char *) malloc (pagesize);
10404 if (!data3)
81ecdfbb 10405 return 1;
a9322a30 10406 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 10407 return 1;
a9322a30
TT
10408 for (i = 0; i < pagesize; ++i)
10409 if (*(data + i) != *(data3 + i))
81ecdfbb 10410 return 1;
a9322a30 10411 close (fd);
81ecdfbb 10412 return 0;
bec39cab
AC
10413}
10414_ACEOF
81ecdfbb 10415if ac_fn_c_try_run "$LINENO"; then :
a9322a30 10416 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 10417else
81ecdfbb 10418 ac_cv_func_mmap_fixed_mapped=no
a3828db0 10419fi
81ecdfbb
RW
10420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10421 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 10422fi
81ecdfbb 10423
a9322a30 10424fi
81ecdfbb
RW
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10426$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
10427if test $ac_cv_func_mmap_fixed_mapped = yes; then
10428
81ecdfbb 10429$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 10430
086ec9eb 10431fi
a9322a30 10432rm -f conftest.mmap
a3828db0 10433
81ecdfbb
RW
10434ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10435if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 10436
a9322a30
TT
10437else
10438
10439cat >>confdefs.h <<_ACEOF
10440#define pid_t int
bec39cab 10441_ACEOF
086ec9eb
MK
10442
10443fi
10444
81ecdfbb
RW
10445for ac_header in vfork.h
10446do :
10447 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
10448if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 10449 cat >>confdefs.h <<_ACEOF
81ecdfbb 10450#define HAVE_VFORK_H 1
bec39cab 10451_ACEOF
c906108c
SS
10452
10453fi
a9322a30 10454
a3828db0 10455done
c906108c 10456
a9322a30 10457for ac_func in fork vfork
81ecdfbb
RW
10458do :
10459 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10460ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10461eval as_val=\$$as_ac_var
10462 if test "x$as_val" = x""yes; then :
a3828db0 10463 cat >>confdefs.h <<_ACEOF
81ecdfbb 10464#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 10465_ACEOF
b83266a0 10466
97bf5e38 10467fi
a3828db0 10468done
b83266a0 10469
a9322a30 10470if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
10472$as_echo_n "checking for working fork... " >&6; }
10473if test "${ac_cv_func_fork_works+set}" = set; then :
10474 $as_echo_n "(cached) " >&6
a9322a30 10475else
81ecdfbb 10476 if test "$cross_compiling" = yes; then :
a9322a30
TT
10477 ac_cv_func_fork_works=cross
10478else
81ecdfbb
RW
10479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10480/* end confdefs.h. */
10481$ac_includes_default
10482int
10483main ()
10484{
10485
10486 /* By Ruediger Kuhlmann. */
10487 return fork () < 0;
10488
10489 ;
10490 return 0;
10491}
a9322a30 10492_ACEOF
81ecdfbb 10493if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10494 ac_cv_func_fork_works=yes
10495else
81ecdfbb 10496 ac_cv_func_fork_works=no
a9322a30 10497fi
81ecdfbb
RW
10498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10499 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10500fi
81ecdfbb 10501
a9322a30 10502fi
81ecdfbb
RW
10503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
10504$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
10505
10506else
10507 ac_cv_func_fork_works=$ac_cv_func_fork
10508fi
10509if test "x$ac_cv_func_fork_works" = xcross; then
10510 case $host in
10511 *-*-amigaos* | *-*-msdosdjgpp*)
10512 # Override, as these systems have only a dummy fork() stub
10513 ac_cv_func_fork_works=no
10514 ;;
10515 *)
10516 ac_cv_func_fork_works=yes
10517 ;;
10518 esac
81ecdfbb
RW
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10520$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10521fi
10522ac_cv_func_vfork_works=$ac_cv_func_vfork
10523if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
10525$as_echo_n "checking for working vfork... " >&6; }
10526if test "${ac_cv_func_vfork_works+set}" = set; then :
10527 $as_echo_n "(cached) " >&6
a9322a30 10528else
81ecdfbb 10529 if test "$cross_compiling" = yes; then :
a9322a30
TT
10530 ac_cv_func_vfork_works=cross
10531else
81ecdfbb 10532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
10533/* end confdefs.h. */
10534/* Thanks to Paul Eggert for this test. */
81ecdfbb 10535$ac_includes_default
a9322a30 10536#include <sys/wait.h>
81ecdfbb 10537#ifdef HAVE_VFORK_H
a9322a30
TT
10538# include <vfork.h>
10539#endif
10540/* On some sparc systems, changes by the child to local and incoming
10541 argument registers are propagated back to the parent. The compiler
10542 is told about this with #include <vfork.h>, but some compilers
10543 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10544 static variable whose address is put into a register that is
10545 clobbered by the vfork. */
10546static void
10547#ifdef __cplusplus
10548sparc_address_test (int arg)
10549# else
10550sparc_address_test (arg) int arg;
10551#endif
10552{
10553 static pid_t child;
10554 if (!child) {
10555 child = vfork ();
10556 if (child < 0) {
10557 perror ("vfork");
10558 _exit(2);
10559 }
10560 if (!child) {
10561 arg = getpid();
10562 write(-1, "", 0);
10563 _exit (arg);
10564 }
10565 }
10566}
10567
10568int
10569main ()
10570{
10571 pid_t parent = getpid ();
10572 pid_t child;
10573
10574 sparc_address_test (0);
10575
10576 child = vfork ();
10577
10578 if (child == 0) {
10579 /* Here is another test for sparc vfork register problems. This
10580 test uses lots of local variables, at least as many local
10581 variables as main has allocated so far including compiler
10582 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10583 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10584 reuse the register of parent for one of the local variables,
10585 since it will think that parent can't possibly be used any more
10586 in this routine. Assigning to the local variable will thus
10587 munge parent in the parent process. */
10588 pid_t
10589 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10590 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10591 /* Convince the compiler that p..p7 are live; otherwise, it might
10592 use the same hardware register for all 8 local variables. */
10593 if (p != p1 || p != p2 || p != p3 || p != p4
10594 || p != p5 || p != p6 || p != p7)
10595 _exit(1);
10596
10597 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10598 from child file descriptors. If the child closes a descriptor
10599 before it execs or exits, this munges the parent's descriptor
10600 as well. Test for this by closing stdout in the child. */
10601 _exit(close(fileno(stdout)) != 0);
10602 } else {
10603 int status;
10604 struct stat st;
10605
10606 while (wait(&status) != child)
10607 ;
81ecdfbb 10608 return (
a9322a30
TT
10609 /* Was there some problem with vforking? */
10610 child < 0
10611
10612 /* Did the child fail? (This shouldn't happen.) */
10613 || status
10614
10615 /* Did the vfork/compiler bug occur? */
10616 || parent != getpid()
10617
10618 /* Did the file descriptor bug occur? */
10619 || fstat(fileno(stdout), &st) != 0
10620 );
10621 }
10622}
10623_ACEOF
81ecdfbb 10624if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
10625 ac_cv_func_vfork_works=yes
10626else
81ecdfbb 10627 ac_cv_func_vfork_works=no
a9322a30 10628fi
81ecdfbb
RW
10629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10630 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 10631fi
81ecdfbb 10632
a9322a30 10633fi
81ecdfbb
RW
10634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
10635$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
10636
10637fi;
10638if test "x$ac_cv_func_fork_works" = xcross; then
10639 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10641$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
10642fi
10643
10644if test "x$ac_cv_func_vfork_works" = xyes; then
10645
81ecdfbb 10646$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
10647
10648else
10649
81ecdfbb 10650$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
10651
10652fi
10653if test "x$ac_cv_func_fork_works" = xyes; then
10654
81ecdfbb 10655$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
10656
10657fi
10658
cdf43629 10659for ac_func in getauxval getrusage getuid getgid \
bdca27a2 10660 pipe poll pread pread64 pwrite resize_term \
7313baad 10661 sbrk setpgid setpgrp setsid \
9467110b 10662 sigaction sigprocmask sigsetmask socketpair \
110ed339 10663 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
3332aaf2 10664 setrlimit getrlimit posix_madvise waitpid \
1bc1068a 10665 ptrace64 sigaltstack mkdtemp
81ecdfbb
RW
10666do :
10667 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10668ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10669eval as_val=\$$as_ac_var
10670 if test "x$as_val" = x""yes; then :
6c7a06a3 10671 cat >>confdefs.h <<_ACEOF
81ecdfbb 10672#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
10673_ACEOF
10674
10675fi
10676done
10677
10678
81ecdfbb
RW
10679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10680$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10681if test "${am_cv_langinfo_codeset+set}" = set; then :
10682 $as_echo_n "(cached) " >&6
6c7a06a3 10683else
81ecdfbb 10684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
10685/* end confdefs.h. */
10686#include <langinfo.h>
10687int
10688main ()
10689{
10690char* cs = nl_langinfo(CODESET);
bec39cab
AC
10691 ;
10692 return 0;
10693}
10694_ACEOF
81ecdfbb 10695if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 10696 am_cv_langinfo_codeset=yes
a4db0f07 10697else
81ecdfbb 10698 am_cv_langinfo_codeset=no
a4db0f07 10699fi
81ecdfbb
RW
10700rm -f core conftest.err conftest.$ac_objext \
10701 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10702
a4db0f07 10703fi
81ecdfbb
RW
10704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10705$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10706 if test $am_cv_langinfo_codeset = yes; then
10707
81ecdfbb 10708$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10709
6c7a06a3 10710 fi
c906108c 10711
06825bd1 10712
3266f10b
TT
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10714$as_echo_n "checking for ANSI C header files... " >&6; }
10715if test "${ac_cv_header_stdc+set}" = set; then :
10716 $as_echo_n "(cached) " >&6
10717else
10718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10719/* end confdefs.h. */
10720#include <stdlib.h>
10721#include <stdarg.h>
10722#include <string.h>
10723#include <float.h>
10724
10725int
10726main ()
10727{
10728
10729 ;
10730 return 0;
10731}
10732_ACEOF
10733if ac_fn_c_try_compile "$LINENO"; then :
10734 ac_cv_header_stdc=yes
10735else
10736 ac_cv_header_stdc=no
10737fi
10738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10739
10740if test $ac_cv_header_stdc = yes; then
10741 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10743/* end confdefs.h. */
10744#include <string.h>
10745
10746_ACEOF
10747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10748 $EGREP "memchr" >/dev/null 2>&1; then :
10749
10750else
10751 ac_cv_header_stdc=no
10752fi
10753rm -f conftest*
10754
10755fi
10756
10757if test $ac_cv_header_stdc = yes; then
10758 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10760/* end confdefs.h. */
10761#include <stdlib.h>
10762
10763_ACEOF
10764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10765 $EGREP "free" >/dev/null 2>&1; then :
10766
10767else
10768 ac_cv_header_stdc=no
10769fi
10770rm -f conftest*
10771
10772fi
10773
10774if test $ac_cv_header_stdc = yes; then
10775 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10776 if test "$cross_compiling" = yes; then :
10777 :
10778else
10779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10780/* end confdefs.h. */
10781#include <ctype.h>
10782#include <stdlib.h>
10783#if ((' ' & 0x0FF) == 0x020)
10784# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10785# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10786#else
10787# define ISLOWER(c) \
10788 (('a' <= (c) && (c) <= 'i') \
10789 || ('j' <= (c) && (c) <= 'r') \
10790 || ('s' <= (c) && (c) <= 'z'))
10791# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10792#endif
10793
10794#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10795int
10796main ()
10797{
10798 int i;
10799 for (i = 0; i < 256; i++)
10800 if (XOR (islower (i), ISLOWER (i))
10801 || toupper (i) != TOUPPER (i))
10802 return 2;
10803 return 0;
10804}
10805_ACEOF
10806if ac_fn_c_try_run "$LINENO"; then :
10807
10808else
10809 ac_cv_header_stdc=no
10810fi
10811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10812 conftest.$ac_objext conftest.beam conftest.$ac_ext
10813fi
10814
10815fi
10816fi
10817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10818$as_echo "$ac_cv_header_stdc" >&6; }
10819if test $ac_cv_header_stdc = yes; then
10820
10821$as_echo "#define STDC_HEADERS 1" >>confdefs.h
10822
3266f10b
TT
10823fi
10824
10825 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10826# for constant arguments. Useless!
10827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10828$as_echo_n "checking for working alloca.h... " >&6; }
10829if test "${ac_cv_working_alloca_h+set}" = set; then :
10830 $as_echo_n "(cached) " >&6
10831else
10832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10833/* end confdefs.h. */
10834#include <alloca.h>
10835int
10836main ()
10837{
10838char *p = (char *) alloca (2 * sizeof (int));
10839 if (p) return 0;
10840 ;
10841 return 0;
10842}
10843_ACEOF
10844if ac_fn_c_try_link "$LINENO"; then :
10845 ac_cv_working_alloca_h=yes
10846else
10847 ac_cv_working_alloca_h=no
10848fi
10849rm -f core conftest.err conftest.$ac_objext \
10850 conftest$ac_exeext conftest.$ac_ext
10851fi
10852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10853$as_echo "$ac_cv_working_alloca_h" >&6; }
10854if test $ac_cv_working_alloca_h = yes; then
10855
10856$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10857
10858fi
10859
10860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10861$as_echo_n "checking for alloca... " >&6; }
10862if test "${ac_cv_func_alloca_works+set}" = set; then :
10863 $as_echo_n "(cached) " >&6
10864else
10865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10866/* end confdefs.h. */
10867#ifdef __GNUC__
10868# define alloca __builtin_alloca
10869#else
10870# ifdef _MSC_VER
10871# include <malloc.h>
10872# define alloca _alloca
10873# else
10874# ifdef HAVE_ALLOCA_H
10875# include <alloca.h>
10876# else
10877# ifdef _AIX
10878 #pragma alloca
10879# else
10880# ifndef alloca /* predefined by HP cc +Olibcalls */
10881char *alloca ();
10882# endif
10883# endif
10884# endif
10885# endif
10886#endif
10887
10888int
10889main ()
10890{
10891char *p = (char *) alloca (1);
10892 if (p) return 0;
10893 ;
10894 return 0;
10895}
10896_ACEOF
10897if ac_fn_c_try_link "$LINENO"; then :
10898 ac_cv_func_alloca_works=yes
10899else
10900 ac_cv_func_alloca_works=no
10901fi
10902rm -f core conftest.err conftest.$ac_objext \
10903 conftest$ac_exeext conftest.$ac_ext
10904fi
10905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10906$as_echo "$ac_cv_func_alloca_works" >&6; }
10907
10908if test $ac_cv_func_alloca_works = yes; then
10909
10910$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10911
10912else
10913 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10914# that cause trouble. Some versions do not even contain alloca or
10915# contain a buggy version. If you still want to use their alloca,
10916# use ar to extract alloca.o from them instead of compiling alloca.c.
10917
10918ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10919
10920$as_echo "#define C_ALLOCA 1" >>confdefs.h
10921
10922
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10924$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10925if test "${ac_cv_os_cray+set}" = set; then :
10926 $as_echo_n "(cached) " >&6
10927else
10928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10929/* end confdefs.h. */
10930#if defined CRAY && ! defined CRAY2
10931webecray
10932#else
10933wenotbecray
10934#endif
10935
10936_ACEOF
10937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10938 $EGREP "webecray" >/dev/null 2>&1; then :
10939 ac_cv_os_cray=yes
10940else
10941 ac_cv_os_cray=no
10942fi
10943rm -f conftest*
10944
10945fi
10946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10947$as_echo "$ac_cv_os_cray" >&6; }
10948if test $ac_cv_os_cray = yes; then
10949 for ac_func in _getb67 GETB67 getb67; do
10950 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10951ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10952eval as_val=\$$as_ac_var
10953 if test "x$as_val" = x""yes; then :
10954
10955cat >>confdefs.h <<_ACEOF
10956#define CRAY_STACKSEG_END $ac_func
10957_ACEOF
10958
10959 break
10960fi
10961
10962 done
10963fi
10964
10965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10966$as_echo_n "checking stack direction for C alloca... " >&6; }
10967if test "${ac_cv_c_stack_direction+set}" = set; then :
10968 $as_echo_n "(cached) " >&6
10969else
10970 if test "$cross_compiling" = yes; then :
10971 ac_cv_c_stack_direction=0
10972else
10973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10974/* end confdefs.h. */
10975$ac_includes_default
10976int
10977find_stack_direction ()
10978{
10979 static char *addr = 0;
10980 auto char dummy;
10981 if (addr == 0)
10982 {
10983 addr = &dummy;
10984 return find_stack_direction ();
10985 }
10986 else
10987 return (&dummy > addr) ? 1 : -1;
10988}
10989
10990int
10991main ()
10992{
10993 return find_stack_direction () < 0;
10994}
10995_ACEOF
10996if ac_fn_c_try_run "$LINENO"; then :
10997 ac_cv_c_stack_direction=1
10998else
10999 ac_cv_c_stack_direction=-1
11000fi
11001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11002 conftest.$ac_objext conftest.beam conftest.$ac_ext
11003fi
11004
11005fi
11006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
11007$as_echo "$ac_cv_c_stack_direction" >&6; }
11008cat >>confdefs.h <<_ACEOF
11009#define STACK_DIRECTION $ac_cv_c_stack_direction
11010_ACEOF
11011
11012
11013fi
11014
11015
11016
11017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11018$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11019if test "${am_cv_langinfo_codeset+set}" = set; then :
11020 $as_echo_n "(cached) " >&6
11021else
11022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11023/* end confdefs.h. */
11024#include <langinfo.h>
11025int
11026main ()
11027{
11028char* cs = nl_langinfo(CODESET);
11029 ;
11030 return 0;
11031}
11032_ACEOF
11033if ac_fn_c_try_link "$LINENO"; then :
11034 am_cv_langinfo_codeset=yes
11035else
11036 am_cv_langinfo_codeset=no
11037fi
11038rm -f core conftest.err conftest.$ac_objext \
11039 conftest$ac_exeext conftest.$ac_ext
11040
11041fi
11042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11043$as_echo "$am_cv_langinfo_codeset" >&6; }
11044 if test $am_cv_langinfo_codeset = yes; then
11045
11046$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11047
11048 fi
11049
11050
a3d08894 11051 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h
3266f10b
TT
11052do :
11053 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11054ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11055eval as_val=\$$as_ac_Header
11056 if test "x$as_val" = x""yes; then :
11057 cat >>confdefs.h <<_ACEOF
11058#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11059_ACEOF
11060
11061fi
11062
11063done
11064
11065
11066 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
11067do :
11068 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11069ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11070eval as_val=\$$as_ac_var
11071 if test "x$as_val" = x""yes; then :
11072 cat >>confdefs.h <<_ACEOF
11073#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11074_ACEOF
11075
11076fi
11077done
11078
11079
11080 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
11081if test "x$ac_cv_have_decl_strerror" = x""yes; then :
11082 ac_have_decl=1
11083else
11084 ac_have_decl=0
11085fi
11086
11087cat >>confdefs.h <<_ACEOF
11088#define HAVE_DECL_STRERROR $ac_have_decl
11089_ACEOF
11090ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
11091if test "x$ac_cv_have_decl_strstr" = x""yes; then :
11092 ac_have_decl=1
11093else
11094 ac_have_decl=0
11095fi
11096
11097cat >>confdefs.h <<_ACEOF
11098#define HAVE_DECL_STRSTR $ac_have_decl
11099_ACEOF
11100
11101
e9bcb658
GB
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
11103$as_echo_n "checking for sigsetjmp... " >&6; }
11104if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
11105 $as_echo_n "(cached) " >&6
11106else
11107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11108/* end confdefs.h. */
11109
11110#include <setjmp.h>
11111
11112int
11113main ()
11114{
11115sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
11116 ;
11117 return 0;
11118}
11119_ACEOF
11120if ac_fn_c_try_compile "$LINENO"; then :
11121 gdb_cv_func_sigsetjmp=yes
11122else
11123 gdb_cv_func_sigsetjmp=no
11124fi
11125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11126fi
11127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
11128$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
11129if test $gdb_cv_func_sigsetjmp = yes; then
11130
11131$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
11132
11133fi
11134
3266f10b 11135
a3828db0
MK
11136# Check the return and argument types of ptrace. No canned test for
11137# this, so roll our own.
11138gdb_ptrace_headers='
4ff70b84 11139#include <sys/types.h>
a3828db0
MK
11140#if HAVE_SYS_PTRACE_H
11141# include <sys/ptrace.h>
11142#endif
11143#if HAVE_UNISTD_H
11144# include <unistd.h>
11145#endif
11146'
11147# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
11148ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
11149"
11150if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
11151 ac_have_decl=1
06825bd1 11152else
81ecdfbb 11153 ac_have_decl=0
06825bd1 11154fi
06825bd1 11155
a3828db0 11156cat >>confdefs.h <<_ACEOF
81ecdfbb 11157#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 11158_ACEOF
81ecdfbb 11159if test $ac_have_decl = 1; then :
bec39cab 11160
a3828db0 11161else
a3828db0
MK
11162
11163 : ${gdb_cv_func_ptrace_ret='int'}
11164 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
11165
06825bd1
MK
11166fi
11167
064ef605
DJ
11168# Check return type. Varargs (used on GNU/Linux) conflict with the
11169# empty argument list, so check for that explicitly.
81ecdfbb
RW
11170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
11171$as_echo_n "checking return type of ptrace... " >&6; }
11172if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
11173 $as_echo_n "(cached) " >&6
bec39cab 11174else
81ecdfbb 11175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11176/* end confdefs.h. */
a3828db0 11177$gdb_ptrace_headers
bec39cab
AC
11178int
11179main ()
11180{
064ef605
DJ
11181extern long ptrace (enum __ptrace_request, ...);
11182 ;
11183 return 0;
11184}
11185_ACEOF
81ecdfbb 11186if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11187 gdb_cv_func_ptrace_ret='long'
11188else
81ecdfbb 11189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11190/* end confdefs.h. */
11191$gdb_ptrace_headers
11192int
11193main ()
11194{
a3828db0 11195extern int ptrace ();
bec39cab
AC
11196 ;
11197 return 0;
11198}
11199_ACEOF
81ecdfbb 11200if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11201 gdb_cv_func_ptrace_ret='int'
70f9f479 11202else
81ecdfbb 11203 gdb_cv_func_ptrace_ret='long'
70f9f479 11204fi
81ecdfbb 11205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 11206fi
81ecdfbb 11207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 11208fi
81ecdfbb
RW
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
11210$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 11211
a3828db0
MK
11212cat >>confdefs.h <<_ACEOF
11213#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 11214_ACEOF
70f9f479 11215
a3828db0 11216# Check argument types.
81ecdfbb
RW
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
11218$as_echo_n "checking types of arguments for ptrace... " >&6; }
11219if test "${gdb_cv_func_ptrace_args+set}" = set; then :
11220 $as_echo_n "(cached) " >&6
bec39cab 11221else
a3828db0 11222
81ecdfbb 11223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
11224/* end confdefs.h. */
11225$gdb_ptrace_headers
11226int
11227main ()
11228{
11229extern long ptrace (enum __ptrace_request, ...);
11230 ;
11231 return 0;
11232}
11233_ACEOF
81ecdfbb 11234if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
11235 gdb_cv_func_ptrace_args='int,int,long,long'
11236else
064ef605 11237
a3828db0
MK
11238for gdb_arg1 in 'int' 'long'; do
11239 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 11240 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 11241 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 11242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11243/* end confdefs.h. */
a3828db0 11244$gdb_ptrace_headers
bec39cab
AC
11245int
11246main ()
11247{
a3828db0
MK
11248
11249extern $gdb_cv_func_ptrace_ret
11250 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
11251
bec39cab
AC
11252 ;
11253 return 0;
11254}
11255_ACEOF
81ecdfbb 11256if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11257 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
11258 break 4;
5c7f2947 11259fi
81ecdfbb 11260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 11261 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 11262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11263/* end confdefs.h. */
a3828db0 11264$gdb_ptrace_headers
bec39cab
AC
11265int
11266main ()
11267{
a3828db0
MK
11268
11269extern $gdb_cv_func_ptrace_ret
11270 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
11271
bec39cab
AC
11272 ;
11273 return 0;
11274}
11275_ACEOF
81ecdfbb 11276if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
11277
11278gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
11279 break 5;
78434e59 11280fi
81ecdfbb 11281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
11282 done
11283 done
11284 done
11285 done
11286done
11287# Provide a safe default value.
11288: ${gdb_cv_func_ptrace_args='int,int,long,long'}
11289
064ef605 11290fi
81ecdfbb 11291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 11292fi
81ecdfbb
RW
11293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
11294$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
11295ac_save_IFS=$IFS; IFS=','
11296set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
11297IFS=$ac_save_IFS
11298shift
bec39cab 11299
a3828db0
MK
11300cat >>confdefs.h <<_ACEOF
11301#define PTRACE_TYPE_ARG3 $3
11302_ACEOF
11303
96d7229d
LM
11304
11305cat >>confdefs.h <<_ACEOF
11306#define PTRACE_TYPE_ARG4 $4
11307_ACEOF
11308
a3828db0
MK
11309if test -n "$5"; then
11310
11311cat >>confdefs.h <<_ACEOF
11312#define PTRACE_TYPE_ARG5 $5
bec39cab 11313_ACEOF
78434e59
MK
11314
11315fi
11316
a3828db0 11317if test "$cross_compiling" = no; then
81ecdfbb
RW
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11319$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11320if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11321 $as_echo_n "(cached) " >&6
a3828db0 11322else
81ecdfbb
RW
11323 if test "$cross_compiling" = yes; then :
11324 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 11325else
81ecdfbb 11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11327/* end confdefs.h. */
81ecdfbb 11328$ac_includes_default
bec39cab
AC
11329int
11330main ()
11331{
a3828db0
MK
11332/* If this system has a BSD-style setpgrp which takes arguments,
11333 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
11334 exit successfully. */
81ecdfbb 11335 return setpgrp (1,1) != -1;
bec39cab
AC
11336 ;
11337 return 0;
11338}
11339_ACEOF
81ecdfbb 11340if ac_fn_c_try_run "$LINENO"; then :
a3828db0 11341 ac_cv_func_setpgrp_void=no
c906108c 11342else
81ecdfbb 11343 ac_cv_func_setpgrp_void=yes
c906108c 11344fi
81ecdfbb
RW
11345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11346 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11347fi
81ecdfbb 11348
a3828db0 11349fi
81ecdfbb
RW
11350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11351$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
11352if test $ac_cv_func_setpgrp_void = yes; then
11353
81ecdfbb 11354$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
11355
11356fi
a3828db0
MK
11357
11358else
81ecdfbb
RW
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
11360$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
11361if test "${ac_cv_func_setpgrp_void+set}" = set; then :
11362 $as_echo_n "(cached) " >&6
97bf5e38 11363else
81ecdfbb 11364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11365/* end confdefs.h. */
a3828db0
MK
11366
11367#include <unistd.h>
11368
bec39cab
AC
11369int
11370main ()
11371{
a3828db0
MK
11372
11373 if (setpgrp(1,1) == -1)
11374 exit (0);
11375 else
11376 exit (1);
11377
bec39cab
AC
11378 ;
11379 return 0;
11380}
11381_ACEOF
81ecdfbb 11382if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11383 ac_cv_func_setpgrp_void=no
c906108c 11384else
81ecdfbb 11385 ac_cv_func_setpgrp_void=yes
c906108c 11386fi
81ecdfbb 11387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11388fi
81ecdfbb
RW
11389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
11390$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 11391if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 11392 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 11393
a3828db0 11394fi
c906108c
SS
11395fi
11396
a3828db0
MK
11397# Assume we'll default to using the included libiberty regex.
11398gdb_use_included_regex=yes
11399
11400# However, if the system regex is GNU regex, then default to *not*
11401# using the included regex.
81ecdfbb
RW
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
11403$as_echo_n "checking for GNU regex... " >&6; }
11404if test "${gdb_cv_have_gnu_regex+set}" = set; then :
11405 $as_echo_n "(cached) " >&6
bec39cab 11406else
81ecdfbb 11407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11408/* end confdefs.h. */
a3828db0 11409#include <gnu-versions.h>
bec39cab
AC
11410int
11411main ()
11412{
81ecdfbb
RW
11413#define REGEX_INTERFACE_VERSION 1
11414#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
11415# error "Version mismatch"
11416#endif
5c45e068
MK
11417 ;
11418 return 0;
11419}
11420_ACEOF
81ecdfbb
RW
11421if ac_fn_c_try_compile "$LINENO"; then :
11422 gdb_cv_have_gnu_regex=yes
5c45e068 11423else
81ecdfbb
RW
11424 gdb_cv_have_gnu_regex=no
11425fi
11426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11427fi
11428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
11429$as_echo "$gdb_cv_have_gnu_regex" >&6; }
11430if test $gdb_cv_have_gnu_regex = yes; then
11431 gdb_use_included_regex=no
5c45e068 11432fi
81ecdfbb
RW
11433
11434
11435# Check whether --with-included-regex was given.
11436if test "${with_included_regex+set}" = set; then :
11437 withval=$with_included_regex; gdb_with_regex=$withval
11438else
11439 gdb_with_regex=$gdb_use_included_regex
c906108c 11440fi
81ecdfbb
RW
11441
11442if test "$gdb_with_regex" = yes; then
11443
11444$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
11445
c906108c 11446fi
81ecdfbb
RW
11447
11448# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
11449ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
11450#include <sys/proc.h>
11451
11452"
11453if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 11454
5c45e068 11455cat >>confdefs.h <<_ACEOF
a3828db0 11456#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 11457_ACEOF
c906108c 11458
5c45e068 11459
97bf5e38 11460fi
c906108c 11461
5c45e068 11462
a3828db0 11463# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
11464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
11465$as_echo_n "checking for struct lwp... " >&6; }
11466if test "${gdb_cv_struct_lwp+set}" = set; then :
11467 $as_echo_n "(cached) " >&6
bec39cab 11468else
81ecdfbb 11469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11470/* end confdefs.h. */
a3828db0
MK
11471#include <sys/param.h>
11472#include <sys/lwp.h>
bec39cab
AC
11473int
11474main ()
11475{
a3828db0 11476struct lwp l;
bec39cab
AC
11477 ;
11478 return 0;
11479}
11480_ACEOF
81ecdfbb 11481if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11482 gdb_cv_struct_lwp=yes
c906108c 11483else
81ecdfbb 11484 gdb_cv_struct_lwp=no
c906108c 11485fi
81ecdfbb 11486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11487fi
81ecdfbb
RW
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
11489$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 11490if test $gdb_cv_struct_lwp = yes; then
c906108c 11491
81ecdfbb 11492$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 11493
97bf5e38 11494fi
c906108c 11495
a3828db0 11496# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
11497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
11498$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
11499if test "${gdb_cv_struct_reg+set}" = set; then :
11500 $as_echo_n "(cached) " >&6
bec39cab 11501else
81ecdfbb 11502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11503/* end confdefs.h. */
a3828db0
MK
11504#include <sys/types.h>
11505#include <machine/reg.h>
bec39cab
AC
11506int
11507main ()
11508{
a3828db0 11509struct reg r;
bec39cab
AC
11510 ;
11511 return 0;
11512}
11513_ACEOF
81ecdfbb 11514if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11515 gdb_cv_struct_reg=yes
27ca5dad 11516else
81ecdfbb 11517 gdb_cv_struct_reg=no
27ca5dad 11518fi
81ecdfbb 11519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 11520fi
81ecdfbb
RW
11521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
11522$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 11523if test $gdb_cv_struct_reg = yes; then
bec39cab 11524
81ecdfbb 11525$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
11526
11527fi
97bf5e38 11528
a3828db0
MK
11529# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
11530# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
11531ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
11532"
11533if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
11534
11535cat >>confdefs.h <<_ACEOF
a3828db0 11536#define HAVE_STRUCT_REG_R_FS 1
bec39cab 11537_ACEOF
3862412b 11538
5c45e068 11539
97bf5e38 11540fi
81ecdfbb
RW
11541ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
11542"
11543if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
11544
11545cat >>confdefs.h <<_ACEOF
a3828db0 11546#define HAVE_STRUCT_REG_R_GS 1
bec39cab 11547_ACEOF
3862412b 11548
5c45e068 11549
97bf5e38 11550fi
3862412b 11551
5c45e068 11552
6fea9e18
L
11553# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
11554# Older amd64 Linux's don't have the fs_base and gs_base members of
11555# `struct user_regs_struct'.
11556ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
11557"
11558if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
11559
11560cat >>confdefs.h <<_ACEOF
11561#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
11562_ACEOF
11563
11564
11565fi
11566ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
11567"
11568if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
11569
11570cat >>confdefs.h <<_ACEOF
11571#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
11572_ACEOF
11573
11574
11575fi
11576
11577
a3828db0 11578# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
11579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
11580$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
11581if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
11582 $as_echo_n "(cached) " >&6
451928c5 11583else
81ecdfbb 11584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11585/* end confdefs.h. */
a3828db0 11586#include <sys/ptrace.h>
bec39cab
AC
11587int
11588main ()
11589{
a3828db0 11590PTRACE_GETREGS;
bec39cab
AC
11591 ;
11592 return 0;
11593}
11594_ACEOF
81ecdfbb 11595if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11596 gdb_cv_have_ptrace_getregs=yes
451928c5 11597else
81ecdfbb 11598 gdb_cv_have_ptrace_getregs=no
451928c5 11599fi
81ecdfbb 11600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11601fi
11602
81ecdfbb
RW
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
11604$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 11605if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 11606
81ecdfbb 11607$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 11608
97bf5e38 11609fi
451928c5 11610
a3828db0 11611# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
11612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
11613$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
11614if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
11615 $as_echo_n "(cached) " >&6
451928c5 11616else
81ecdfbb 11617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11618/* end confdefs.h. */
a3828db0 11619#include <sys/ptrace.h>
bec39cab
AC
11620int
11621main ()
11622{
a3828db0 11623PTRACE_GETFPXREGS;
bec39cab
AC
11624 ;
11625 return 0;
11626}
11627_ACEOF
81ecdfbb 11628if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11629 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 11630else
81ecdfbb 11631 gdb_cv_have_ptrace_getfpxregs=no
451928c5 11632fi
81ecdfbb 11633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
11634fi
11635
81ecdfbb
RW
11636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
11637$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 11638if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 11639
81ecdfbb 11640$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 11641
97bf5e38 11642fi
451928c5 11643
a3828db0 11644# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
11646$as_echo_n "checking for PT_GETDBREGS... " >&6; }
11647if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
11648 $as_echo_n "(cached) " >&6
3862412b 11649else
81ecdfbb 11650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11651/* end confdefs.h. */
a3828db0
MK
11652#include <sys/types.h>
11653#include <sys/ptrace.h>
bec39cab
AC
11654int
11655main ()
11656{
a3828db0 11657PT_GETDBREGS;
bec39cab
AC
11658 ;
11659 return 0;
11660}
11661_ACEOF
81ecdfbb 11662if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11663 gdb_cv_have_pt_getdbregs=yes
3862412b 11664else
81ecdfbb 11665 gdb_cv_have_pt_getdbregs=no
3862412b 11666fi
81ecdfbb 11667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11668fi
11669
81ecdfbb
RW
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
11671$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 11672if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 11673
81ecdfbb 11674$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 11675
97bf5e38 11676fi
3862412b 11677
a3828db0 11678# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
11679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
11680$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
11681if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
11682 $as_echo_n "(cached) " >&6
3862412b 11683else
81ecdfbb 11684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11685/* end confdefs.h. */
a3828db0
MK
11686#include <sys/types.h>
11687#include <sys/ptrace.h>
bec39cab
AC
11688int
11689main ()
11690{
a3828db0 11691PT_GETXMMREGS;
bec39cab
AC
11692 ;
11693 return 0;
11694}
11695_ACEOF
81ecdfbb 11696if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11697 gdb_cv_have_pt_getxmmregs=yes
3862412b 11698else
81ecdfbb 11699 gdb_cv_have_pt_getxmmregs=no
3862412b 11700fi
81ecdfbb 11701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11702fi
11703
81ecdfbb
RW
11704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11705$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11706if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11707
81ecdfbb 11708$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11709
97bf5e38 11710fi
3862412b 11711
05b4bd79 11712# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
11713
11714if test "${target}" = "${host}"; then
11715 case "${host}" in
7b00db47 11716 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 11717
81ecdfbb 11718$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11719
11720 ;;
c162e8c9 11721 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11722
81ecdfbb 11723$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11724
11725 ;;
11726 mips-sgi-irix5*)
11727 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11728
81ecdfbb 11729$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11730
11731 ;;
11732 esac
11733fi
11734
11735if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11737$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11738 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11739 $as_echo_n "(cached) " >&6
596c9d4b 11740else
81ecdfbb 11741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11742/* end confdefs.h. */
596c9d4b
KB
11743
11744#define _SYSCALL32
d30c5336
JK
11745/* Needed for new procfs interface on sparc-solaris. */
11746#define _STRUCTURED_PROC 1
596c9d4b 11747#include <sys/procfs.h>
bec39cab
AC
11748int
11749main ()
11750{
97bf5e38 11751gregset_t avar
bec39cab
AC
11752 ;
11753 return 0;
11754}
11755_ACEOF
81ecdfbb 11756if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11757 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11758else
81ecdfbb 11759 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11760
596c9d4b 11761fi
81ecdfbb 11762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11763fi
11764
97bf5e38 11765 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 11766
81ecdfbb 11767$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
11768
11769 fi
81ecdfbb
RW
11770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11771$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 11772
81ecdfbb
RW
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11774$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11775 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11776 $as_echo_n "(cached) " >&6
d84dd0c5 11777else
81ecdfbb 11778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11779/* end confdefs.h. */
97bf5e38
MK
11780
11781#define _SYSCALL32
d30c5336
JK
11782/* Needed for new procfs interface on sparc-solaris. */
11783#define _STRUCTURED_PROC 1
d84dd0c5 11784#include <sys/procfs.h>
bec39cab
AC
11785int
11786main ()
11787{
97bf5e38 11788fpregset_t avar
bec39cab
AC
11789 ;
11790 return 0;
11791}
11792_ACEOF
81ecdfbb 11793if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11794 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 11795else
81ecdfbb 11796 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 11797
d84dd0c5 11798fi
81ecdfbb 11799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
11800fi
11801
97bf5e38 11802 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11803
81ecdfbb 11804$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11805
97bf5e38 11806 fi
81ecdfbb
RW
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11808$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11809
81ecdfbb
RW
11810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11811$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11812 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11813 $as_echo_n "(cached) " >&6
c906108c 11814else
81ecdfbb 11815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11816/* end confdefs.h. */
c906108c 11817
97bf5e38 11818#define _SYSCALL32
d30c5336
JK
11819/* Needed for new procfs interface on sparc-solaris. */
11820#define _STRUCTURED_PROC 1
97bf5e38 11821#include <sys/procfs.h>
bec39cab
AC
11822int
11823main ()
11824{
97bf5e38 11825prgregset_t avar
bec39cab
AC
11826 ;
11827 return 0;
11828}
11829_ACEOF
81ecdfbb 11830if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11831 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11832else
81ecdfbb 11833 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11834
c906108c 11835fi
81ecdfbb 11836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11837fi
11838
97bf5e38 11839 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11840
81ecdfbb 11841$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11842
97bf5e38 11843 fi
81ecdfbb
RW
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11845$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11846
81ecdfbb
RW
11847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11848$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11849 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11850 $as_echo_n "(cached) " >&6
d45fe813 11851else
81ecdfbb 11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11853/* end confdefs.h. */
97bf5e38
MK
11854
11855#define _SYSCALL32
d30c5336
JK
11856/* Needed for new procfs interface on sparc-solaris. */
11857#define _STRUCTURED_PROC 1
97bf5e38 11858#include <sys/procfs.h>
bec39cab
AC
11859int
11860main ()
11861{
97bf5e38 11862prfpregset_t avar
bec39cab
AC
11863 ;
11864 return 0;
11865}
11866_ACEOF
81ecdfbb 11867if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11868 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11869else
81ecdfbb 11870 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11871
d45fe813 11872fi
81ecdfbb 11873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11874fi
11875
97bf5e38 11876 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11877
81ecdfbb 11878$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11879
97bf5e38 11880 fi
81ecdfbb
RW
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11882$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11883
81ecdfbb
RW
11884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11885$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11886 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11887 $as_echo_n "(cached) " >&6
d45fe813 11888else
81ecdfbb 11889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11890/* end confdefs.h. */
97bf5e38
MK
11891
11892#define _SYSCALL32
d30c5336
JK
11893/* Needed for new procfs interface on sparc-solaris. */
11894#define _STRUCTURED_PROC 1
97bf5e38 11895#include <sys/procfs.h>
bec39cab
AC
11896int
11897main ()
11898{
97bf5e38 11899prgregset32_t avar
bec39cab
AC
11900 ;
11901 return 0;
11902}
11903_ACEOF
81ecdfbb 11904if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11905 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11906else
81ecdfbb 11907 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11908
d45fe813 11909fi
81ecdfbb 11910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11911fi
11912
97bf5e38 11913 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11914
81ecdfbb 11915$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11916
97bf5e38 11917 fi
81ecdfbb
RW
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11919$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11920
81ecdfbb
RW
11921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11922$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11923 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11924 $as_echo_n "(cached) " >&6
d45fe813 11925else
81ecdfbb 11926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11927/* end confdefs.h. */
97bf5e38 11928
d45fe813 11929#define _SYSCALL32
d30c5336
JK
11930/* Needed for new procfs interface on sparc-solaris. */
11931#define _STRUCTURED_PROC 1
97bf5e38 11932#include <sys/procfs.h>
bec39cab
AC
11933int
11934main ()
11935{
97bf5e38 11936lwpid_t avar
bec39cab
AC
11937 ;
11938 return 0;
11939}
11940_ACEOF
81ecdfbb 11941if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11942 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11943else
81ecdfbb 11944 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11945
d45fe813 11946fi
81ecdfbb 11947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11948fi
11949
97bf5e38 11950 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11951
81ecdfbb 11952$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11953
97bf5e38 11954 fi
81ecdfbb
RW
11955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11956$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11957
81ecdfbb
RW
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11959$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11960 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11961 $as_echo_n "(cached) " >&6
c906108c 11962else
81ecdfbb 11963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11964/* end confdefs.h. */
c906108c 11965
97bf5e38 11966#define _SYSCALL32
d30c5336
JK
11967/* Needed for new procfs interface on sparc-solaris. */
11968#define _STRUCTURED_PROC 1
97bf5e38 11969#include <sys/procfs.h>
bec39cab
AC
11970int
11971main ()
11972{
97bf5e38 11973psaddr_t avar
bec39cab
AC
11974 ;
11975 return 0;
11976}
11977_ACEOF
81ecdfbb 11978if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11979 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11980else
81ecdfbb 11981 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11982
c906108c 11983fi
81ecdfbb 11984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11985fi
11986
97bf5e38 11987 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11988
81ecdfbb 11989$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11990
97bf5e38 11991 fi
81ecdfbb
RW
11992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11993$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11994
81ecdfbb
RW
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11996$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11997 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11998 $as_echo_n "(cached) " >&6
c906108c 11999else
81ecdfbb 12000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12001/* end confdefs.h. */
c906108c 12002
97bf5e38 12003#define _SYSCALL32
d30c5336
JK
12004/* Needed for new procfs interface on sparc-solaris. */
12005#define _STRUCTURED_PROC 1
97bf5e38 12006#include <sys/procfs.h>
bec39cab
AC
12007int
12008main ()
12009{
97bf5e38 12010prsysent_t avar
bec39cab
AC
12011 ;
12012 return 0;
12013}
12014_ACEOF
81ecdfbb 12015if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12016 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 12017else
81ecdfbb 12018 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 12019
c906108c 12020fi
81ecdfbb 12021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12022fi
12023
97bf5e38 12024 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 12025
81ecdfbb 12026$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 12027
97bf5e38 12028 fi
81ecdfbb
RW
12029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
12030$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 12031
81ecdfbb
RW
12032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
12033$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
12034 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
12035 $as_echo_n "(cached) " >&6
c906108c 12036else
81ecdfbb 12037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12038/* end confdefs.h. */
c906108c 12039
97bf5e38 12040#define _SYSCALL32
d30c5336
JK
12041/* Needed for new procfs interface on sparc-solaris. */
12042#define _STRUCTURED_PROC 1
97bf5e38 12043#include <sys/procfs.h>
bec39cab
AC
12044int
12045main ()
12046{
97bf5e38 12047pr_sigset_t avar
bec39cab
AC
12048 ;
12049 return 0;
12050}
12051_ACEOF
81ecdfbb 12052if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12053 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 12054else
81ecdfbb 12055 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 12056
c906108c 12057fi
81ecdfbb 12058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12059fi
12060
97bf5e38 12061 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 12062
81ecdfbb 12063$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 12064
97bf5e38 12065 fi
81ecdfbb
RW
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
12067$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 12068
81ecdfbb
RW
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
12070$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
12071 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
12072 $as_echo_n "(cached) " >&6
c906108c 12073else
81ecdfbb 12074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12075/* end confdefs.h. */
c906108c 12076
97bf5e38 12077#define _SYSCALL32
d30c5336
JK
12078/* Needed for new procfs interface on sparc-solaris. */
12079#define _STRUCTURED_PROC 1
97bf5e38 12080#include <sys/procfs.h>
bec39cab
AC
12081int
12082main ()
12083{
97bf5e38 12084pr_sigaction64_t avar
bec39cab
AC
12085 ;
12086 return 0;
12087}
12088_ACEOF
81ecdfbb 12089if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 12090 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 12091else
81ecdfbb 12092 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 12093
c906108c 12094fi
81ecdfbb 12095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
12096fi
12097
97bf5e38 12098 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 12099
81ecdfbb 12100$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 12101
97bf5e38 12102 fi
81ecdfbb
RW
12103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
12104$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 12105
81ecdfbb
RW
12106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
12107$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
12108 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
12109 $as_echo_n "(cached) " >&6
97bf5e38 12110else
81ecdfbb 12111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12112/* end confdefs.h. */
97bf5e38
MK
12113
12114#define _SYSCALL32
d30c5336
JK
12115/* Needed for new procfs interface on sparc-solaris. */
12116#define _STRUCTURED_PROC 1
97bf5e38 12117#include <sys/procfs.h>
bec39cab
AC
12118int
12119main ()
12120{
97bf5e38 12121pr_siginfo64_t avar
bec39cab
AC
12122 ;
12123 return 0;
12124}
12125_ACEOF
81ecdfbb 12126if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12127 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
12128else
81ecdfbb 12129 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 12130
97bf5e38 12131fi
81ecdfbb 12132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12133fi
c906108c 12134
97bf5e38 12135 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 12136
81ecdfbb 12137$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 12138
97bf5e38 12139 fi
81ecdfbb
RW
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
12141$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
12142
12143
97bf5e38
MK
12144
12145
12146
97bf5e38 12147 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
12149$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
12150 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
12151 $as_echo_n "(cached) " >&6
c906108c 12152else
81ecdfbb 12153 if test "$cross_compiling" = yes; then :
97bf5e38 12154 gdb_cv_prfpregset_t_broken=yes
c906108c 12155else
81ecdfbb 12156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12157/* end confdefs.h. */
97bf5e38
MK
12158#include <sys/procfs.h>
12159 int main ()
12160 {
12161 if (sizeof (prfpregset_t) == sizeof (void *))
12162 return 1;
12163 return 0;
12164 }
bec39cab 12165_ACEOF
81ecdfbb 12166if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12167 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
12168else
12169 gdb_cv_prfpregset_t_broken=yes
c906108c 12170fi
81ecdfbb
RW
12171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12172 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12173fi
81ecdfbb 12174
c906108c
SS
12175fi
12176
81ecdfbb
RW
12177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
12178$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 12179 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 12180
81ecdfbb 12181$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 12182
97bf5e38
MK
12183 fi
12184 fi
c906108c 12185fi
c906108c 12186
bc8bcb4b 12187# Check if the compiler supports the `long long' type.
c906108c 12188
81ecdfbb
RW
12189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
12190$as_echo_n "checking for long long support in compiler... " >&6; }
12191if test "${gdb_cv_c_long_long+set}" = set; then :
12192 $as_echo_n "(cached) " >&6
97bf5e38 12193else
81ecdfbb 12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12195/* end confdefs.h. */
bc8bcb4b 12196extern long long foo;
bec39cab
AC
12197int
12198main ()
12199{
bc8bcb4b 12200switch (foo & 2) { case 0: return 1; }
bec39cab
AC
12201 ;
12202 return 0;
12203}
12204_ACEOF
81ecdfbb 12205if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
12206 gdb_cv_c_long_long=yes
12207else
81ecdfbb 12208 gdb_cv_c_long_long=no
97bf5e38 12209fi
81ecdfbb 12210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12211fi
81ecdfbb
RW
12212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
12213$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
12214if test $gdb_cv_c_long_long != yes; then
12215 # libdecnumber requires long long.
12216 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
12217fi
12218
bc8bcb4b 12219# Check if the compiler and runtime support printing long longs.
97bf5e38 12220
81ecdfbb
RW
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
12222$as_echo_n "checking for long long support in printf... " >&6; }
12223if test "${gdb_cv_printf_has_long_long+set}" = set; then :
12224 $as_echo_n "(cached) " >&6
97bf5e38 12225else
81ecdfbb 12226 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12227 gdb_cv_printf_has_long_long=no
12228else
81ecdfbb 12229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12230/* end confdefs.h. */
bc8bcb4b
MK
12231$ac_includes_default
12232int
12233main ()
12234{
12235char buf[32];
97bf5e38
MK
12236 long long l = 0;
12237 l = (l << 16) + 0x0123;
12238 l = (l << 16) + 0x4567;
12239 l = (l << 16) + 0x89ab;
12240 l = (l << 16) + 0xcdef;
12241 sprintf (buf, "0x%016llx", l);
12242 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
12243 ;
12244 return 0;
c906108c 12245}
bec39cab 12246_ACEOF
81ecdfbb 12247if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12248 gdb_cv_printf_has_long_long=yes
12249else
81ecdfbb 12250 gdb_cv_printf_has_long_long=no
97bf5e38 12251fi
81ecdfbb
RW
12252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12253 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12254fi
81ecdfbb 12255
97bf5e38 12256fi
81ecdfbb
RW
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
12258$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 12259if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 12260
81ecdfbb 12261$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
12262
12263fi
97bf5e38 12264
1a619819
LM
12265# Check if the compiler and runtime support printing decfloats.
12266
81ecdfbb
RW
12267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
12268$as_echo_n "checking for decfloat support in printf... " >&6; }
12269if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
12270 $as_echo_n "(cached) " >&6
1a619819 12271else
81ecdfbb 12272 if test "$cross_compiling" = yes; then :
1a619819
LM
12273 gdb_cv_printf_has_decfloat=no
12274else
81ecdfbb 12275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
12276/* end confdefs.h. */
12277$ac_includes_default
12278int
12279main ()
12280{
12281char buf[64];
12282 _Decimal32 d32 = 1.2345df;
12283 _Decimal64 d64 = 1.2345dd;
12284 _Decimal128 d128 = 1.2345dl;
12285 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
12286 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
12287 ;
12288 return 0;
12289}
12290_ACEOF
81ecdfbb 12291if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
12292 gdb_cv_printf_has_decfloat=yes
12293else
81ecdfbb 12294 gdb_cv_printf_has_decfloat=no
1a619819 12295fi
81ecdfbb
RW
12296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12297 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 12298fi
81ecdfbb 12299
1a619819 12300fi
81ecdfbb
RW
12301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
12302$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
12303if test $gdb_cv_printf_has_decfloat = yes; then
12304
81ecdfbb 12305$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
12306
12307fi
12308
bc8bcb4b
MK
12309# Check if the compiler supports the `long double' type. We can't use
12310# AC_C_LONG_DOUBLE because that one does additional checks on the
12311# constants defined in <float.h> that fail on some systems,
12312# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 12313
81ecdfbb
RW
12314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
12315$as_echo_n "checking for long double support in compiler... " >&6; }
12316if test "${gdb_cv_c_long_double+set}" = set; then :
12317 $as_echo_n "(cached) " >&6
97bf5e38 12318else
81ecdfbb 12319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12320/* end confdefs.h. */
97bf5e38 12321long double foo;
bec39cab 12322_ACEOF
81ecdfbb 12323if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 12324 gdb_cv_c_long_double=yes
97bf5e38 12325else
81ecdfbb 12326 gdb_cv_c_long_double=no
97bf5e38 12327fi
81ecdfbb 12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 12329fi
81ecdfbb
RW
12330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
12331$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 12332if test $gdb_cv_c_long_double = yes; then
c906108c 12333
81ecdfbb 12334$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12335
12336fi
12337
bc8bcb4b 12338# Check if the compiler and runtime support printing long doubles.
97bf5e38 12339
81ecdfbb
RW
12340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
12341$as_echo_n "checking for long double support in printf... " >&6; }
12342if test "${gdb_cv_printf_has_long_double+set}" = set; then :
12343 $as_echo_n "(cached) " >&6
97bf5e38 12344else
81ecdfbb 12345 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12346 gdb_cv_printf_has_long_double=no
12347else
81ecdfbb 12348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12349/* end confdefs.h. */
bc8bcb4b
MK
12350$ac_includes_default
12351int
12352main ()
12353{
12354char buf[16];
97bf5e38
MK
12355 long double f = 3.141592653;
12356 sprintf (buf, "%Lg", f);
12357 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
12358 ;
12359 return 0;
97bf5e38 12360}
bec39cab 12361_ACEOF
81ecdfbb 12362if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 12363 gdb_cv_printf_has_long_double=yes
c906108c 12364else
81ecdfbb 12365 gdb_cv_printf_has_long_double=no
c906108c 12366fi
81ecdfbb
RW
12367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12368 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 12369fi
81ecdfbb 12370
c906108c 12371fi
81ecdfbb
RW
12372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
12373$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 12374if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 12375
81ecdfbb 12376$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12377
12378fi
97bf5e38 12379
bc8bcb4b 12380# Check if the compiler and runtime support scanning long doubles.
97bf5e38 12381
81ecdfbb
RW
12382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
12383$as_echo_n "checking for long double support in scanf... " >&6; }
12384if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
12385 $as_echo_n "(cached) " >&6
97bf5e38 12386else
81ecdfbb 12387 if test "$cross_compiling" = yes; then :
97bf5e38
MK
12388 gdb_cv_scanf_has_long_double=no
12389else
81ecdfbb 12390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12391/* end confdefs.h. */
bc8bcb4b
MK
12392#include <stdio.h>
12393int
12394main ()
12395{
12396char *buf = "3.141592653";
97bf5e38
MK
12397 long double f = 0;
12398 sscanf (buf, "%Lg", &f);
12399 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
12400 ;
12401 return 0;
97bf5e38 12402}
bec39cab 12403_ACEOF
81ecdfbb 12404if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
12405 gdb_cv_scanf_has_long_double=yes
12406else
81ecdfbb 12407 gdb_cv_scanf_has_long_double=no
97bf5e38 12408fi
81ecdfbb
RW
12409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12410 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 12411fi
81ecdfbb 12412
c906108c 12413fi
81ecdfbb
RW
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
12415$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 12416if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 12417
81ecdfbb 12418$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
12419
12420fi
c906108c 12421
438013df
AO
12422case ${host_os} in
12423aix*)
81ecdfbb
RW
12424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
12425$as_echo_n "checking for -bbigtoc option... " >&6; }
12426if test "${gdb_cv_bigtoc+set}" = set; then :
12427 $as_echo_n "(cached) " >&6
438013df 12428else
bec39cab 12429
438013df
AO
12430 SAVE_LDFLAGS=$LDFLAGS
12431
12432 case $GCC in
12433 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
12434 *) gdb_cv_bigtoc=-bbigtoc ;;
12435 esac
12436
12437 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 12438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12439/* end confdefs.h. */
438013df 12440
bec39cab
AC
12441int
12442main ()
12443{
438013df 12444int i;
bec39cab
AC
12445 ;
12446 return 0;
12447}
12448_ACEOF
81ecdfbb 12449if ac_fn_c_try_link "$LINENO"; then :
bec39cab 12450
81ecdfbb
RW
12451else
12452 gdb_cv_bigtoc=
438013df 12453fi
81ecdfbb
RW
12454rm -f core conftest.err conftest.$ac_objext \
12455 conftest$ac_exeext conftest.$ac_ext
ec76baa5 12456 LDFLAGS="${SAVE_LDFLAGS}"
438013df 12457
bec39cab 12458fi
81ecdfbb
RW
12459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
12460$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
12461 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
12462 ;;
12463esac
12464
38f6b338 12465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 12466$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
12467dynamic_list=false
12468if test "${gdb_native}" = yes; then
12469 # The dynamically loaded libthread_db needs access to symbols in the gdb
12470 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
12471 # may not be supported there.
12472 old_LDFLAGS="$LDFLAGS"
12473 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
12474 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
12475 LDFLAGS="$LDFLAGS $RDYNAMIC"
12476 if test "${have_libpython}" = no; then
12477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
12478/* end confdefs.h. */
12479
12480int
12481main ()
12482{
12483
12484 ;
12485 return 0;
12486}
12487_ACEOF
12488if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
12489 dynamic_list=true
12490fi
12491rm -f core conftest.err conftest.$ac_objext \
12492 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
12493 else
12494 # Workaround http://bugs.python.org/issue4434 where static
12495 # libpythonX.Y.a would get its symbols required for
12496 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
12497 # Problem does not happen for the recommended libpythonX.Y.so linkage.
12498 old_CFLAGS="$CFLAGS"
12499 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
12500 old_LIBS="$LIBS"
12501 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 12502 if test "$cross_compiling" = yes; then :
3bebe2f2 12503 true
f6528abd 12504else
3bebe2f2
JK
12505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12506/* end confdefs.h. */
12507#include "${have_libpython}/Python.h"
12508int
12509main ()
12510{
12511int err;
38f6b338
JK
12512 Py_Initialize ();
12513 err = PyRun_SimpleString ("import itertools\n");
12514 Py_Finalize ();
12515 return err == 0 ? 0 : 1;
3bebe2f2
JK
12516 ;
12517 return 0;
12518}
12519_ACEOF
12520if ac_fn_c_try_run "$LINENO"; then :
12521 dynamic_list=true
12522fi
12523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12524 conftest.$ac_objext conftest.beam conftest.$ac_ext
12525fi
12526
8c1fb155 12527 LIBS="$old_LIBS"
38f6b338
JK
12528 CFLAGS="$old_CFLAGS"
12529 fi
12530 LDFLAGS="$old_LDFLAGS"
12531fi
12532if $dynamic_list; then
12533 found="-Wl,--dynamic-list"
12534 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 12535else
38f6b338
JK
12536 found="-rdynamic"
12537 RDYNAMIC="-rdynamic"
f6528abd 12538fi
f6528abd 12539
38f6b338 12540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 12541$as_echo "$found" >&6; }
0407b3f1 12542
f6528abd 12543
0407b3f1 12544if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 12545 case ${host_os} in
c906108c 12546 solaris*)
d92419e5
JB
12547 # See if thread_db library is around for Solaris thread debugging.
12548 # Note that we must explicitly test for version 1 of the library
12549 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
12550 # the same API.
81ecdfbb
RW
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
12552$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 12553 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
12554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12555$as_echo "yes" >&6; }
60ca704f 12556
81ecdfbb 12557$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 12558
3483b318 12559 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 12560 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12562$as_echo_n "checking for dlopen in -ldl... " >&6; }
12563if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
12564 $as_echo_n "(cached) " >&6
c906108c 12565else
bec39cab 12566 ac_check_lib_save_LIBS=$LIBS
c906108c 12567LIBS="-ldl $LIBS"
81ecdfbb 12568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
12569/* end confdefs.h. */
12570
81ecdfbb
RW
12571/* Override any GCC internal prototype to avoid an error.
12572 Use char because int might match the return type of a GCC
12573 builtin and then its argument prototype would still apply. */
bec39cab
AC
12574#ifdef __cplusplus
12575extern "C"
12576#endif
bec39cab
AC
12577char dlopen ();
12578int
12579main ()
12580{
81ecdfbb 12581return dlopen ();
bec39cab
AC
12582 ;
12583 return 0;
12584}
12585_ACEOF
81ecdfbb 12586if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
12587 ac_cv_lib_dl_dlopen=yes
12588else
81ecdfbb 12589 ac_cv_lib_dl_dlopen=no
bec39cab 12590fi
81ecdfbb
RW
12591rm -f core conftest.err conftest.$ac_objext \
12592 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
12593LIBS=$ac_check_lib_save_LIBS
12594fi
81ecdfbb
RW
12595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12596$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12597if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
12598 cat >>confdefs.h <<_ACEOF
12599#define HAVE_LIBDL 1
12600_ACEOF
c906108c
SS
12601
12602 LIBS="-ldl $LIBS"
12603
c906108c
SS
12604fi
12605
f6528abd 12606 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
12607 # Sun randomly tweaked the prototypes in <proc_service.h>
12608 # at one point.
81ecdfbb
RW
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
12610$as_echo_n "checking if <proc_service.h> is old... " >&6; }
12611 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
12612 $as_echo_n "(cached) " >&6
c906108c 12613else
bec39cab 12614
81ecdfbb 12615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12616/* end confdefs.h. */
c906108c
SS
12617
12618 #include <proc_service.h>
12619 ps_err_e ps_pdwrite
12620 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 12621
bec39cab
AC
12622int
12623main ()
12624{
12625
12626 ;
12627 return 0;
12628}
12629_ACEOF
81ecdfbb 12630if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
12631 gdb_cv_proc_service_is_old=no
12632else
81ecdfbb 12633 gdb_cv_proc_service_is_old=yes
c906108c 12634fi
81ecdfbb 12635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12636
c906108c
SS
12637fi
12638
81ecdfbb
RW
12639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
12640$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 12641 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 12642
81ecdfbb 12643$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
12644
12645 fi
12646 else
81ecdfbb
RW
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12648$as_echo "no" >&6; }
c906108c
SS
12649 fi
12650 ;;
d92419e5 12651 aix*)
81ecdfbb
RW
12652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
12653$as_echo_n "checking for AiX thread debugging library... " >&6; }
12654 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
12655 $as_echo_n "(cached) " >&6
bec39cab 12656else
81ecdfbb 12657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12658/* end confdefs.h. */
d92419e5 12659#include <sys/pthdebug.h>
bec39cab
AC
12660int
12661main ()
12662{
d92419e5
JB
12663#ifndef PTHDB_VERSION_3
12664 #error
12665 #endif
bec39cab
AC
12666 ;
12667 return 0;
12668}
12669_ACEOF
81ecdfbb 12670if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
12671 gdb_cv_have_aix_thread_debug=yes
12672else
81ecdfbb 12673 gdb_cv_have_aix_thread_debug=no
d92419e5 12674fi
81ecdfbb 12675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
12676fi
12677
81ecdfbb
RW
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
12679$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
12680 if test $gdb_cv_have_aix_thread_debug = yes; then
12681 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 12682 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 12683 LIBS="$LIBS -lpthdebug"
d645e32e
JB
12684
12685 # Older versions of AIX do not provide the declaration for
12686 # the getthrds function (it appears that it was introduced
12687 # with AIX 6.x).
12688 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
12689"
12690if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
12691 ac_have_decl=1
12692else
12693 ac_have_decl=0
12694fi
12695
12696cat >>confdefs.h <<_ACEOF
12697#define HAVE_DECL_GETTHRDS $ac_have_decl
12698_ACEOF
12699
d92419e5
JB
12700 fi
12701 ;;
c906108c 12702 esac
bec39cab 12703
c906108c
SS
12704fi
12705
3f47be5c 12706if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12708$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12709if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12710 $as_echo_n "(cached) " >&6
bec39cab 12711else
81ecdfbb 12712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12713/* end confdefs.h. */
3f47be5c 12714#include <thread_db.h>
bec39cab
AC
12715int
12716main ()
12717{
3f47be5c 12718int i = TD_NOTALLOC;
bec39cab
AC
12719 ;
12720 return 0;
12721}
12722_ACEOF
81ecdfbb 12723if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12724 gdb_cv_thread_db_h_has_td_notalloc=yes
12725else
81ecdfbb 12726 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12727
3f47be5c 12728fi
81ecdfbb 12729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12730
bec39cab 12731fi
81ecdfbb
RW
12732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12733$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12735$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12736if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12737 $as_echo_n "(cached) " >&6
59f80f10 12738else
81ecdfbb 12739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12740/* end confdefs.h. */
12741#include <thread_db.h>
12742int
12743main ()
12744{
12745int i = TD_VERSION;
12746 ;
12747 return 0;
12748}
12749_ACEOF
81ecdfbb 12750if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12751 gdb_cv_thread_db_h_has_td_version=yes
12752else
81ecdfbb 12753 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12754
12755fi
81ecdfbb 12756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12757
12758fi
81ecdfbb
RW
12759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12760$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12762$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12763if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12764 $as_echo_n "(cached) " >&6
59f80f10 12765else
81ecdfbb 12766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12767/* end confdefs.h. */
12768#include <thread_db.h>
12769int
12770main ()
12771{
12772int i = TD_NOTLS;
12773 ;
12774 return 0;
12775}
12776_ACEOF
81ecdfbb 12777if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12778 gdb_cv_thread_db_h_has_td_notls=yes
12779else
81ecdfbb 12780 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12781
12782fi
81ecdfbb 12783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12784
12785fi
81ecdfbb
RW
12786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12787$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12788fi
12789if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12790
81ecdfbb 12791$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12792
59f80f10
DJ
12793fi
12794if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12795
81ecdfbb 12796$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12797
12798fi
12799if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12800
81ecdfbb 12801$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12802
3f47be5c
EZ
12803fi
12804
b757528f 12805if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12807$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12808if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12809 $as_echo_n "(cached) " >&6
bec39cab 12810else
81ecdfbb 12811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12812/* end confdefs.h. */
b757528f 12813#include <sys/syscall.h>
bec39cab
AC
12814int
12815main ()
12816{
b757528f 12817int i = __NR_tkill;
bec39cab
AC
12818 ;
12819 return 0;
12820}
12821_ACEOF
81ecdfbb 12822if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12823 gdb_cv_sys_syscall_h_has_tkill=yes
12824else
81ecdfbb 12825 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12826
b757528f 12827fi
81ecdfbb 12828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12829
bec39cab 12830fi
81ecdfbb
RW
12831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12832$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 12833fi
99c1d451
TT
12834if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12835 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12836if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 12837
81ecdfbb 12838$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 12839
99c1d451
TT
12840
12841fi
12842
b757528f
JJ
12843fi
12844
81ecdfbb
RW
12845ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12846"
12847if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12848 ac_have_decl=1
10568435 12849else
81ecdfbb 12850 ac_have_decl=0
10568435 12851fi
10568435
JK
12852
12853cat >>confdefs.h <<_ACEOF
81ecdfbb 12854#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12855_ACEOF
12856
12857
81ecdfbb
RW
12858if test "$cross_compiling" = yes; then :
12859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12860/* end confdefs.h. */
12861#include <sys/personality.h>
12862int
12863main ()
12864{
12865
12866# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12867# define ADDR_NO_RANDOMIZE 0x0040000
12868# endif
12869 /* Test the flag could be set and stays set. */
12870 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12871 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12872 return 1
12873 ;
12874 return 0;
12875}
12876_ACEOF
81ecdfbb 12877if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12878 have_personality=true
12879else
81ecdfbb 12880 have_personality=false
10568435 12881fi
81ecdfbb
RW
12882rm -f core conftest.err conftest.$ac_objext \
12883 conftest$ac_exeext conftest.$ac_ext
10568435 12884else
81ecdfbb 12885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12886/* end confdefs.h. */
12887#include <sys/personality.h>
12888int
12889main ()
12890{
12891
12892# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12893# define ADDR_NO_RANDOMIZE 0x0040000
12894# endif
12895 /* Test the flag could be set and stays set. */
12896 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12897 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12898 return 1
12899 ;
12900 return 0;
12901}
12902_ACEOF
81ecdfbb 12903if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12904 have_personality=true
12905else
81ecdfbb 12906 have_personality=false
10568435 12907fi
81ecdfbb
RW
12908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12909 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12910fi
81ecdfbb 12911
10568435
JK
12912if $have_personality
12913then
12914
81ecdfbb 12915$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12916
12917fi
12918
e655c1a2
PA
12919case $host_os in
12920 go32* | *djgpp*)
12921 gdbinit=gdb.ini
12922 ;;
12923 *)
12924 gdbinit=.gdbinit
12925 ;;
12926esac
12927
12928cat >>confdefs.h <<_ACEOF
12929#define GDBINIT "$gdbinit"
12930_ACEOF
12931
12932
fb40c209 12933
f83d8a90
DE
12934# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12935# except that the argument to --with-sysroot is optional.
12936# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12937if test "x$with_sysroot" = xyes; then
12938 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12939fi
bec39cab 12940
81ecdfbb
RW
12941# Check whether --with-sysroot was given.
12942if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12943 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12944else
12945 TARGET_SYSTEM_ROOT=
12946fi
030292b7 12947
030292b7 12948
f83d8a90
DE
12949 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12950 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12951 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12952 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12953
f83d8a90
DE
12954cat >>confdefs.h <<_ACEOF
12955#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12956_ACEOF
bec39cab 12957
030292b7 12958
b14b1491 12959
f83d8a90
DE
12960
12961 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12962 if test "x$prefix" = xNONE; then
12963 test_prefix=/usr/local
12964 else
12965 test_prefix=$prefix
12966 fi
12967 else
12968 test_prefix=$exec_prefix
12969 fi
12970 value=0
12971 case ${ac_define_dir} in
12972 "${test_prefix}"|"${test_prefix}/"*|\
12973 '${exec_prefix}'|'${exec_prefix}/'*)
12974 value=1
12975 ;;
12976 esac
12977
12978cat >>confdefs.h <<_ACEOF
12979#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12980_ACEOF
030292b7
DJ
12981
12982
12983
16e7150e 12984
16e7150e 12985
81ecdfbb
RW
12986# Check whether --with-system-gdbinit was given.
12987if test "${with_system_gdbinit+set}" = set; then :
12988 withval=$with_system_gdbinit;
b14b1491
TT
12989 SYSTEM_GDBINIT=$withval
12990else
12991 SYSTEM_GDBINIT=
81ecdfbb
RW
12992fi
12993
16e7150e
JG
12994
12995 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12996 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12997 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12998 ac_define_dir=`eval echo $ac_define_dir`
12999
13000cat >>confdefs.h <<_ACEOF
13001#define SYSTEM_GDBINIT "$ac_define_dir"
13002_ACEOF
13003
13004
13005
0c4a4063 13006
b14b1491
TT
13007 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
13008 if test "x$prefix" = xNONE; then
13009 test_prefix=/usr/local
13010 else
13011 test_prefix=$prefix
13012 fi
13013 else
13014 test_prefix=$exec_prefix
13015 fi
13016 value=0
13017 case ${ac_define_dir} in
13018 "${test_prefix}"|"${test_prefix}/"*|\
13019 '${exec_prefix}'|'${exec_prefix}/'*)
13020 value=1
13021 ;;
13022 esac
16e7150e 13023
b14b1491
TT
13024cat >>confdefs.h <<_ACEOF
13025#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
13026_ACEOF
13027
b14b1491 13028
16e7150e 13029
0c4a4063 13030
81ecdfbb
RW
13031# Check whether --enable-werror was given.
13032if test "${enable_werror+set}" = set; then :
13033 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
13034 yes | y) ERROR_ON_WARNING="yes" ;;
13035 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 13036 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 13037 esac
81ecdfbb
RW
13038fi
13039
094a342e 13040
a68ffae9
JK
13041# Enable -Werror by default when using gcc. Turn it off for releases.
13042if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
13043 ERROR_ON_WARNING=yes
13044fi
13045
13046WERROR_CFLAGS=""
13047if test "${ERROR_ON_WARNING}" = yes ; then
13048 WERROR_CFLAGS="-Werror"
13049fi
13050
aa79a185 13051build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
d3685d60 13052-Wpointer-sign \
1cb5e2a4 13053-Wno-unused -Wunused-value -Wunused-function \
352b3eda 13054-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
44d100c3 13055-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
dd9aa048 13056-Wold-style-declaration -Wold-style-definition"
a3b362c4 13057
3526781e
DJ
13058# Enable -Wno-format by default when using gcc on mingw since many
13059# GCC versions complain about %I64.
13060case "${host}" in
13061 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 13062 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
13063esac
13064
81ecdfbb
RW
13065# Check whether --enable-build-warnings was given.
13066if test "${enable_build_warnings+set}" = set; then :
13067 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
13068 yes) ;;
13069 no) build_warnings="-w";;
13070 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13071 build_warnings="${build_warnings} ${t}";;
13072 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13073 build_warnings="${t} ${build_warnings}";;
13074 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13075esac
d4f3574e 13076if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 13077 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 13078fi
81ecdfbb
RW
13079fi
13080# Check whether --enable-gdb-build-warnings was given.
13081if test "${enable_gdb_build_warnings+set}" = set; then :
13082 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
13083 yes) ;;
13084 no) build_warnings="-w";;
13085 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13086 build_warnings="${build_warnings} ${t}";;
13087 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
13088 build_warnings="${t} ${build_warnings}";;
13089 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
13090esac
13091if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
13092 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
13093fi
81ecdfbb
RW
13094fi
13095WARN_CFLAGS=""
c906108c
SS
13096if test "x${build_warnings}" != x -a "x$GCC" = xyes
13097then
81ecdfbb
RW
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
13099$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
13100 # Separate out the -Werror flag as some files just cannot be
13101 # compiled with it enabled.
13102 for w in ${build_warnings}; do
13103 case $w in
13104 -Werr*) WERROR_CFLAGS=-Werror ;;
13105 *) # Check that GCC accepts it
4536bbc6
AC
13106 saved_CFLAGS="$CFLAGS"
13107 CFLAGS="$CFLAGS $w"
81ecdfbb 13108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13109/* end confdefs.h. */
4536bbc6 13110
bec39cab
AC
13111int
13112main ()
13113{
4536bbc6 13114
bec39cab
AC
13115 ;
13116 return 0;
13117}
13118_ACEOF
81ecdfbb 13119if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 13120 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 13121fi
81ecdfbb 13122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 13123 CFLAGS="$saved_CFLAGS"
746a987d
AC
13124 esac
13125 done
81ecdfbb
RW
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
13127$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
13128fi
13129
13130
104c1213 13131
7a292a7a 13132# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
13133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
13134$as_echo_n "checking for cygwin... " >&6; }
13135if test "${gdb_cv_os_cygwin+set}" = set; then :
13136 $as_echo_n "(cached) " >&6
bec39cab 13137else
81ecdfbb 13138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13139/* end confdefs.h. */
7a292a7a
SS
13140
13141#if defined (__CYGWIN__) || defined (__CYGWIN32__)
13142lose
13143#endif
bec39cab 13144_ACEOF
7a292a7a 13145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 13146 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
13147 gdb_cv_os_cygwin=yes
13148else
7a292a7a
SS
13149 gdb_cv_os_cygwin=no
13150fi
13151rm -f conftest*
13152
13153fi
81ecdfbb
RW
13154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
13155$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 13156
aff38e61 13157
3eb25fda 13158SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 13159case ${host} in
95cbc983
AC
13160 *go32* ) SER_HARDWIRE=ser-go32.o ;;
13161 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 13162 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
13163esac
13164
13165
cd0fc7c3
SS
13166# libreadline needs libuser32.a in a cygwin environment
13167WIN32LIBS=
13168if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
13169 WIN32LIBS="-luser32"
13170 case "${target}" in
13171 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
13172 ;;
13173 esac
cd0fc7c3 13174fi
c906108c 13175
b4505029
MM
13176# The ser-tcp.c module requires sockets.
13177case ${host} in
13178 *mingw32*)
13179
81ecdfbb 13180$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
13181
13182 WIN32LIBS="$WIN32LIBS -lws2_32"
13183 ;;
13184esac
13185
7a292a7a 13186
31d99776 13187# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
13188
13189 OLD_CFLAGS=$CFLAGS
13190 OLD_LDFLAGS=$LDFLAGS
13191 OLD_LIBS=$LIBS
13192 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13193 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13194 # always want our bfd.
13195 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13196 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13197 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
def63ff0
TT
13198 LIBS="-lbfd -liberty $intl $LIBS"
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
13200$as_echo_n "checking for ELF support in BFD... " >&6; }
13201if test "${gdb_cv_var_elf+set}" = set; then :
13202 $as_echo_n "(cached) " >&6
31d99776 13203else
81ecdfbb 13204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
13205/* end confdefs.h. */
13206#include <stdlib.h>
def63ff0
TT
13207 #include "bfd.h"
13208 #include "elf-bfd.h"
31d99776
DJ
13209
13210int
13211main ()
13212{
def63ff0 13213return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
13214 ;
13215 return 0;
13216}
13217_ACEOF
81ecdfbb 13218if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
13219 gdb_cv_var_elf=yes
13220else
81ecdfbb 13221 gdb_cv_var_elf=no
31d99776 13222fi
81ecdfbb
RW
13223rm -f core conftest.err conftest.$ac_objext \
13224 conftest$ac_exeext conftest.$ac_ext
31d99776 13225fi
81ecdfbb
RW
13226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
13227$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
13228 CFLAGS=$OLD_CFLAGS
13229 LDFLAGS=$OLD_LDFLAGS
13230 LIBS=$OLD_LIBS
31d99776 13231if test $gdb_cv_var_elf = yes; then
d4777acb 13232 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 13233
81ecdfbb 13234$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 13235
075ff26d
JK
13236 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
13237 if test "$plugins" = "yes"; then
a48b32c0
L
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
13239$as_echo_n "checking for library containing dlopen... " >&6; }
13240if test "${ac_cv_search_dlopen+set}" = set; then :
13241 $as_echo_n "(cached) " >&6
13242else
13243 ac_func_search_save_LIBS=$LIBS
13244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13245/* end confdefs.h. */
13246
13247/* Override any GCC internal prototype to avoid an error.
13248 Use char because int might match the return type of a GCC
13249 builtin and then its argument prototype would still apply. */
13250#ifdef __cplusplus
13251extern "C"
13252#endif
13253char dlopen ();
13254int
13255main ()
13256{
13257return dlopen ();
13258 ;
13259 return 0;
13260}
13261_ACEOF
13262for ac_lib in '' dl; do
13263 if test -z "$ac_lib"; then
13264 ac_res="none required"
13265 else
13266 ac_res=-l$ac_lib
13267 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13268 fi
13269 if ac_fn_c_try_link "$LINENO"; then :
13270 ac_cv_search_dlopen=$ac_res
13271fi
13272rm -f core conftest.err conftest.$ac_objext \
13273 conftest$ac_exeext
13274 if test "${ac_cv_search_dlopen+set}" = set; then :
13275 break
13276fi
13277done
13278if test "${ac_cv_search_dlopen+set}" = set; then :
13279
13280else
13281 ac_cv_search_dlopen=no
13282fi
13283rm conftest.$ac_ext
13284LIBS=$ac_func_search_save_LIBS
13285fi
13286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
13287$as_echo "$ac_cv_search_dlopen" >&6; }
13288ac_res=$ac_cv_search_dlopen
13289if test "$ac_res" != no; then :
13290 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13291
13292fi
13293
075ff26d 13294 fi
31d99776 13295fi
31d99776 13296
4f05add4
TT
13297# Add macho support to GDB, but only if BFD includes it.
13298
13299 OLD_CFLAGS=$CFLAGS
13300 OLD_LDFLAGS=$LDFLAGS
13301 OLD_LIBS=$LIBS
13302 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13303 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13304 # always want our bfd.
13305 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13306 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13307 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
4f05add4
TT
13308 LIBS="-lbfd -liberty $intl $LIBS"
13309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
13310$as_echo_n "checking for Mach-O support in BFD... " >&6; }
13311if test "${gdb_cv_var_macho+set}" = set; then :
13312 $as_echo_n "(cached) " >&6
13313else
13314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13315/* end confdefs.h. */
13316#include <stdlib.h>
13317 #include "bfd.h"
13318 #include "mach-o.h"
13319
13320int
13321main ()
13322{
13323return bfd_mach_o_lookup_command (NULL, 0, NULL);
13324 ;
13325 return 0;
13326}
13327_ACEOF
13328if ac_fn_c_try_link "$LINENO"; then :
13329 gdb_cv_var_macho=yes
13330else
13331 gdb_cv_var_macho=no
13332fi
13333rm -f core conftest.err conftest.$ac_objext \
13334 conftest$ac_exeext conftest.$ac_ext
13335fi
13336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
13337$as_echo "$gdb_cv_var_macho" >&6; }
13338 CFLAGS=$OLD_CFLAGS
13339 LDFLAGS=$OLD_LDFLAGS
13340 LIBS=$OLD_LIBS
13341if test $gdb_cv_var_macho = yes; then
13342 CONFIG_OBS="$CONFIG_OBS machoread.o"
13343fi
13344
b2259038
TT
13345# Add SOM support to GDB, but only if BFD includes it.
13346
13347 OLD_CFLAGS=$CFLAGS
13348 OLD_LDFLAGS=$LDFLAGS
13349 OLD_LIBS=$LIBS
13350 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
13351 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
13352 # always want our bfd.
13353 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
13354 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
13355 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
b2259038
TT
13356 LIBS="-lbfd -liberty $intl $LIBS"
13357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
13358$as_echo_n "checking for SOM support in BFD... " >&6; }
13359if test "${gdb_cv_var_som+set}" = set; then :
13360 $as_echo_n "(cached) " >&6
13361else
13362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13363/* end confdefs.h. */
13364#include <stdlib.h>
13365 #include "bfd.h"
13366 #include "som.h"
13367
13368int
13369main ()
13370{
13371return bfd_som_attach_aux_hdr (NULL, 0, NULL);
13372 ;
13373 return 0;
13374}
13375_ACEOF
13376if ac_fn_c_try_link "$LINENO"; then :
13377 gdb_cv_var_som=yes
13378else
13379 gdb_cv_var_som=no
13380fi
13381rm -f core conftest.err conftest.$ac_objext \
13382 conftest$ac_exeext conftest.$ac_ext
13383fi
13384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
13385$as_echo "$gdb_cv_var_som" >&6; }
13386 CFLAGS=$OLD_CFLAGS
13387 LDFLAGS=$OLD_LDFLAGS
13388 LIBS=$OLD_LIBS
13389if test $gdb_cv_var_som = yes; then
13390 CONFIG_OBS="$CONFIG_OBS somread.o"
13391fi
13392
121ce6e5
DJ
13393# Add any host-specific objects to GDB.
13394CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
13395
608e2dbb
TT
13396# If building on ELF, look for lzma support for embedded compressed debug info.
13397if test $gdb_cv_var_elf = yes; then
13398
13399# Check whether --with-lzma was given.
13400if test "${with_lzma+set}" = set; then :
13401 withval=$with_lzma;
13402else
13403 with_lzma=auto
13404fi
13405
13406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
13407$as_echo_n "checking whether to use lzma... " >&6; }
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
13409$as_echo "$with_lzma" >&6; }
13410
13411 if test "${with_lzma}" != no; then
13412
13413
13414
13415
13416
13417
13418
13419
13420 use_additional=yes
13421
13422 acl_save_prefix="$prefix"
13423 prefix="$acl_final_prefix"
13424 acl_save_exec_prefix="$exec_prefix"
13425 exec_prefix="$acl_final_exec_prefix"
13426
13427 eval additional_includedir=\"$includedir\"
13428 eval additional_libdir=\"$libdir\"
13429
13430 exec_prefix="$acl_save_exec_prefix"
13431 prefix="$acl_save_prefix"
13432
13433
13434# Check whether --with-liblzma-prefix was given.
13435if test "${with_liblzma_prefix+set}" = set; then :
13436 withval=$with_liblzma_prefix;
13437 if test "X$withval" = "Xno"; then
13438 use_additional=no
13439 else
13440 if test "X$withval" = "X"; then
13441
13442 acl_save_prefix="$prefix"
13443 prefix="$acl_final_prefix"
13444 acl_save_exec_prefix="$exec_prefix"
13445 exec_prefix="$acl_final_exec_prefix"
13446
13447 eval additional_includedir=\"$includedir\"
13448 eval additional_libdir=\"$libdir\"
13449
13450 exec_prefix="$acl_save_exec_prefix"
13451 prefix="$acl_save_prefix"
13452
13453 else
13454 additional_includedir="$withval/include"
13455 additional_libdir="$withval/lib"
13456 fi
13457 fi
13458
13459fi
13460
13461 LIBLZMA=
13462 LTLIBLZMA=
13463 INCLZMA=
13464 rpathdirs=
13465 ltrpathdirs=
13466 names_already_handled=
13467 names_next_round='lzma '
13468 while test -n "$names_next_round"; do
13469 names_this_round="$names_next_round"
13470 names_next_round=
13471 for name in $names_this_round; do
13472 already_handled=
13473 for n in $names_already_handled; do
13474 if test "$n" = "$name"; then
13475 already_handled=yes
13476 break
13477 fi
13478 done
13479 if test -z "$already_handled"; then
13480 names_already_handled="$names_already_handled $name"
13481 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13482 eval value=\"\$HAVE_LIB$uppername\"
13483 if test -n "$value"; then
13484 if test "$value" = yes; then
13485 eval value=\"\$LIB$uppername\"
13486 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
13487 eval value=\"\$LTLIB$uppername\"
13488 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
13489 else
13490 :
13491 fi
13492 else
13493 found_dir=
13494 found_la=
13495 found_so=
13496 found_a=
13497 if test $use_additional = yes; then
13498 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
13499 found_dir="$additional_libdir"
13500 found_so="$additional_libdir/lib$name.$shlibext"
13501 if test -f "$additional_libdir/lib$name.la"; then
13502 found_la="$additional_libdir/lib$name.la"
13503 fi
13504 else
13505 if test -f "$additional_libdir/lib$name.$libext"; then
13506 found_dir="$additional_libdir"
13507 found_a="$additional_libdir/lib$name.$libext"
13508 if test -f "$additional_libdir/lib$name.la"; then
13509 found_la="$additional_libdir/lib$name.la"
13510 fi
13511 fi
13512 fi
13513 fi
13514 if test "X$found_dir" = "X"; then
13515 for x in $LDFLAGS $LTLIBLZMA; do
13516
13517 acl_save_prefix="$prefix"
13518 prefix="$acl_final_prefix"
13519 acl_save_exec_prefix="$exec_prefix"
13520 exec_prefix="$acl_final_exec_prefix"
13521 eval x=\"$x\"
13522 exec_prefix="$acl_save_exec_prefix"
13523 prefix="$acl_save_prefix"
13524
13525 case "$x" in
13526 -L*)
13527 dir=`echo "X$x" | sed -e 's/^X-L//'`
13528 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13529 found_dir="$dir"
13530 found_so="$dir/lib$name.$shlibext"
13531 if test -f "$dir/lib$name.la"; then
13532 found_la="$dir/lib$name.la"
13533 fi
13534 else
13535 if test -f "$dir/lib$name.$libext"; then
13536 found_dir="$dir"
13537 found_a="$dir/lib$name.$libext"
13538 if test -f "$dir/lib$name.la"; then
13539 found_la="$dir/lib$name.la"
13540 fi
13541 fi
13542 fi
13543 ;;
13544 esac
13545 if test "X$found_dir" != "X"; then
13546 break
13547 fi
13548 done
13549 fi
13550 if test "X$found_dir" != "X"; then
13551 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13552 if test "X$found_so" != "X"; then
13553 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13554 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13555 else
13556 haveit=
13557 for x in $ltrpathdirs; do
13558 if test "X$x" = "X$found_dir"; then
13559 haveit=yes
13560 break
13561 fi
13562 done
13563 if test -z "$haveit"; then
13564 ltrpathdirs="$ltrpathdirs $found_dir"
13565 fi
13566 if test "$hardcode_direct" = yes; then
13567 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13568 else
13569 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13570 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13571 haveit=
13572 for x in $rpathdirs; do
13573 if test "X$x" = "X$found_dir"; then
13574 haveit=yes
13575 break
13576 fi
13577 done
13578 if test -z "$haveit"; then
13579 rpathdirs="$rpathdirs $found_dir"
13580 fi
13581 else
13582 haveit=
13583 for x in $LDFLAGS $LIBLZMA; do
13584
13585 acl_save_prefix="$prefix"
13586 prefix="$acl_final_prefix"
13587 acl_save_exec_prefix="$exec_prefix"
13588 exec_prefix="$acl_final_exec_prefix"
13589 eval x=\"$x\"
13590 exec_prefix="$acl_save_exec_prefix"
13591 prefix="$acl_save_prefix"
13592
13593 if test "X$x" = "X-L$found_dir"; then
13594 haveit=yes
13595 break
13596 fi
13597 done
13598 if test -z "$haveit"; then
13599 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13600 fi
13601 if test "$hardcode_minus_L" != no; then
13602 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13603 else
13604 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13605 fi
13606 fi
13607 fi
13608 fi
13609 else
13610 if test "X$found_a" != "X"; then
13611 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13612 else
13613 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13614 fi
13615 fi
13616 additional_includedir=
13617 case "$found_dir" in
13618 */lib | */lib/)
13619 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13620 additional_includedir="$basedir/include"
13621 ;;
13622 esac
13623 if test "X$additional_includedir" != "X"; then
13624 if test "X$additional_includedir" != "X/usr/include"; then
13625 haveit=
13626 if test "X$additional_includedir" = "X/usr/local/include"; then
13627 if test -n "$GCC"; then
13628 case $host_os in
13629 linux*) haveit=yes;;
13630 esac
13631 fi
13632 fi
13633 if test -z "$haveit"; then
13634 for x in $CPPFLAGS $INCLZMA; do
13635
13636 acl_save_prefix="$prefix"
13637 prefix="$acl_final_prefix"
13638 acl_save_exec_prefix="$exec_prefix"
13639 exec_prefix="$acl_final_exec_prefix"
13640 eval x=\"$x\"
13641 exec_prefix="$acl_save_exec_prefix"
13642 prefix="$acl_save_prefix"
13643
13644 if test "X$x" = "X-I$additional_includedir"; then
13645 haveit=yes
13646 break
13647 fi
13648 done
13649 if test -z "$haveit"; then
13650 if test -d "$additional_includedir"; then
13651 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13652 fi
13653 fi
13654 fi
13655 fi
13656 fi
13657 if test -n "$found_la"; then
13658 save_libdir="$libdir"
13659 case "$found_la" in
13660 */* | *\\*) . "$found_la" ;;
13661 *) . "./$found_la" ;;
13662 esac
13663 libdir="$save_libdir"
13664 for dep in $dependency_libs; do
13665 case "$dep" in
13666 -L*)
13667 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13668 if test "X$additional_libdir" != "X/usr/lib"; then
13669 haveit=
13670 if test "X$additional_libdir" = "X/usr/local/lib"; then
13671 if test -n "$GCC"; then
13672 case $host_os in
13673 linux*) haveit=yes;;
13674 esac
13675 fi
13676 fi
13677 if test -z "$haveit"; then
13678 haveit=
13679 for x in $LDFLAGS $LIBLZMA; do
13680
13681 acl_save_prefix="$prefix"
13682 prefix="$acl_final_prefix"
13683 acl_save_exec_prefix="$exec_prefix"
13684 exec_prefix="$acl_final_exec_prefix"
13685 eval x=\"$x\"
13686 exec_prefix="$acl_save_exec_prefix"
13687 prefix="$acl_save_prefix"
13688
13689 if test "X$x" = "X-L$additional_libdir"; then
13690 haveit=yes
13691 break
13692 fi
13693 done
13694 if test -z "$haveit"; then
13695 if test -d "$additional_libdir"; then
13696 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13697 fi
13698 fi
13699 haveit=
13700 for x in $LDFLAGS $LTLIBLZMA; do
13701
13702 acl_save_prefix="$prefix"
13703 prefix="$acl_final_prefix"
13704 acl_save_exec_prefix="$exec_prefix"
13705 exec_prefix="$acl_final_exec_prefix"
13706 eval x=\"$x\"
13707 exec_prefix="$acl_save_exec_prefix"
13708 prefix="$acl_save_prefix"
13709
13710 if test "X$x" = "X-L$additional_libdir"; then
13711 haveit=yes
13712 break
13713 fi
13714 done
13715 if test -z "$haveit"; then
13716 if test -d "$additional_libdir"; then
13717 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13718 fi
13719 fi
13720 fi
13721 fi
13722 ;;
13723 -R*)
13724 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13725 if test "$enable_rpath" != no; then
13726 haveit=
13727 for x in $rpathdirs; do
13728 if test "X$x" = "X$dir"; then
13729 haveit=yes
13730 break
13731 fi
13732 done
13733 if test -z "$haveit"; then
13734 rpathdirs="$rpathdirs $dir"
13735 fi
13736 haveit=
13737 for x in $ltrpathdirs; do
13738 if test "X$x" = "X$dir"; then
13739 haveit=yes
13740 break
13741 fi
13742 done
13743 if test -z "$haveit"; then
13744 ltrpathdirs="$ltrpathdirs $dir"
13745 fi
13746 fi
13747 ;;
13748 -l*)
13749 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13750 ;;
13751 *.la)
13752 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13753 ;;
13754 *)
13755 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13756 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13757 ;;
13758 esac
13759 done
13760 fi
13761 else
13762 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13763 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13764 fi
13765 fi
13766 fi
13767 done
13768 done
13769 if test "X$rpathdirs" != "X"; then
13770 if test -n "$hardcode_libdir_separator"; then
13771 alldirs=
13772 for found_dir in $rpathdirs; do
13773 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13774 done
13775 acl_save_libdir="$libdir"
13776 libdir="$alldirs"
13777 eval flag=\"$hardcode_libdir_flag_spec\"
13778 libdir="$acl_save_libdir"
13779 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13780 else
13781 for found_dir in $rpathdirs; do
13782 acl_save_libdir="$libdir"
13783 libdir="$found_dir"
13784 eval flag=\"$hardcode_libdir_flag_spec\"
13785 libdir="$acl_save_libdir"
13786 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13787 done
13788 fi
13789 fi
13790 if test "X$ltrpathdirs" != "X"; then
13791 for found_dir in $ltrpathdirs; do
13792 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13793 done
13794 fi
13795
13796
13797 ac_save_CPPFLAGS="$CPPFLAGS"
13798
13799 for element in $INCLZMA; do
13800 haveit=
13801 for x in $CPPFLAGS; do
13802
13803 acl_save_prefix="$prefix"
13804 prefix="$acl_final_prefix"
13805 acl_save_exec_prefix="$exec_prefix"
13806 exec_prefix="$acl_final_exec_prefix"
13807 eval x=\"$x\"
13808 exec_prefix="$acl_save_exec_prefix"
13809 prefix="$acl_save_prefix"
13810
13811 if test "X$x" = "X$element"; then
13812 haveit=yes
13813 break
13814 fi
13815 done
13816 if test -z "$haveit"; then
13817 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13818 fi
13819 done
13820
13821
13822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13823$as_echo_n "checking for liblzma... " >&6; }
13824if test "${ac_cv_liblzma+set}" = set; then :
13825 $as_echo_n "(cached) " >&6
13826else
13827
13828 ac_save_LIBS="$LIBS"
13829 LIBS="$LIBS $LIBLZMA"
13830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13831/* end confdefs.h. */
13832#include "lzma.h"
13833int
13834main ()
13835{
13836lzma_index_iter iter;
13837 lzma_index_iter_init (&iter, 0);
13838 lzma_mf_is_supported (LZMA_MF_HC3);
13839 ;
13840 return 0;
13841}
13842_ACEOF
13843if ac_fn_c_try_link "$LINENO"; then :
13844 ac_cv_liblzma=yes
13845else
13846 ac_cv_liblzma=no
13847fi
13848rm -f core conftest.err conftest.$ac_objext \
13849 conftest$ac_exeext conftest.$ac_ext
13850 LIBS="$ac_save_LIBS"
13851
13852fi
13853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13854$as_echo "$ac_cv_liblzma" >&6; }
13855 if test "$ac_cv_liblzma" = yes; then
13856 HAVE_LIBLZMA=yes
13857
13858$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13859
13860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13861$as_echo_n "checking how to link with liblzma... " >&6; }
13862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13863$as_echo "$LIBLZMA" >&6; }
13864 else
13865 HAVE_LIBLZMA=no
13866 CPPFLAGS="$ac_save_CPPFLAGS"
13867 LIBLZMA=
13868 LTLIBLZMA=
13869 fi
13870
13871
13872
13873
13874
13875
13876 if test "$HAVE_LIBLZMA" != yes; then
13877 if test "$with_lzma" = yes; then
13878 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13879 fi
13880 fi
13881 fi
13882fi
13883
3fc11d3e
JM
13884LIBGUI="../libgui/src/libgui.a"
13885GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13886
13887
7a292a7a 13888
3fc11d3e
JM
13889WIN32LDAPP=
13890
13891
13892
d91670b9 13893case "${host}" in
686a5eed 13894*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13895 configdir="win"
13896 ;;
13897*)
13898 configdir="unix"
13899 ;;
13900esac
3fc11d3e
JM
13901
13902GDBTKLIBS=
13903if test "${enable_gdbtk}" = "yes"; then
13904
d1c3b63a
KS
13905 # Gdbtk must have an absolute path to srcdir in order to run
13906 # properly when not installed.
13907 here=`pwd`
13908 cd ${srcdir}
13909 GDBTK_SRC_DIR=`pwd`
13910 cd $here
13911
bec39cab 13912
5062cc19
KS
13913 #
13914 # Ok, lets find the tcl configuration
13915 # First, look for one uninstalled.
13916 # the alternative search directory is invoked by --with-tcl
13917 #
3fc11d3e 13918
5062cc19
KS
13919 if test x"${no_tcl}" = x ; then
13920 # we reset no_tcl in case something fails here
13921 no_tcl=true
bec39cab 13922
81ecdfbb
RW
13923# Check whether --with-tcl was given.
13924if test "${with_tcl+set}" = set; then :
13925 withval=$with_tcl; with_tclconfig=${withval}
13926fi
13927
13928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13929$as_echo_n "checking for Tcl configuration... " >&6; }
13930 if test "${ac_cv_c_tclconfig+set}" = set; then :
13931 $as_echo_n "(cached) " >&6
3fc11d3e 13932else
bec39cab 13933
3fc11d3e 13934
5062cc19
KS
13935 # First check to see if --with-tcl was specified.
13936 case "${host}" in
13937 *-*-cygwin*) platDir="win" ;;
13938 *) platDir="unix" ;;
13939 esac
13940 if test x"${with_tclconfig}" != x ; then
13941 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13942 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13943 else
81ecdfbb 13944 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13945 fi
13946 fi
13947
13948 # then check for a private Tcl installation
13949 if test x"${ac_cv_c_tclconfig}" = x ; then
13950 for i in \
13951 ../tcl \
13952 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13953 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13954 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13955 ../../tcl \
13956 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13957 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13958 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13959 ../../../tcl \
13960 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13961 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13962 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13963 if test -f "$i/$platDir/tclConfig.sh" ; then
13964 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13965 break
13966 fi
13967 done
13968 fi
13969
13970 # on Darwin, check in Framework installation locations
13971 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13972 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13973 `ls -d /Library/Frameworks 2>/dev/null` \
13974 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13975 `ls -d /System/Library/Frameworks 2>/dev/null` \
13976 ; do
13977 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13978 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13979 break
13980 fi
13981 done
13982 fi
13983
13984 # check in a few common install locations
13985 if test x"${ac_cv_c_tclconfig}" = x ; then
13986 for i in `ls -d ${libdir} 2>/dev/null` \
13987 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13988 `ls -d ${prefix}/lib 2>/dev/null` \
13989 `ls -d /usr/local/lib 2>/dev/null` \
13990 `ls -d /usr/contrib/lib 2>/dev/null` \
13991 `ls -d /usr/lib 2>/dev/null` \
13992 ; do
13993 if test -f "$i/tclConfig.sh" ; then
13994 ac_cv_c_tclconfig=`(cd $i; pwd)`
13995 break
13996 fi
13997 done
13998 fi
3fc11d3e 13999
5062cc19
KS
14000 # check in a few other private locations
14001 if test x"${ac_cv_c_tclconfig}" = x ; then
14002 for i in \
14003 ${srcdir}/../tcl \
14004 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
14005 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
14006 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
14007 if test -f "$i/$platDir/tclConfig.sh" ; then
14008 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
14009 break
14010 fi
14011 done
14012 fi
bec39cab 14013
3fc11d3e
JM
14014fi
14015
5062cc19
KS
14016
14017 if test x"${ac_cv_c_tclconfig}" = x ; then
14018 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
14019 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
14020$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
14021 else
14022 no_tcl=
14023 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
14025$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
14026 fi
14027 fi
3fc11d3e 14028
bec39cab 14029
85541719
DE
14030 # If $no_tk is nonempty, then we can't do Tk, and there is no
14031 # point to doing Tcl.
bec39cab 14032
5062cc19
KS
14033 #
14034 # Ok, lets find the tk configuration
14035 # First, look for one uninstalled.
14036 # the alternative search directory is invoked by --with-tk
14037 #
3fc11d3e 14038
5062cc19
KS
14039 if test x"${no_tk}" = x ; then
14040 # we reset no_tk in case something fails here
14041 no_tk=true
bec39cab 14042
81ecdfbb
RW
14043# Check whether --with-tk was given.
14044if test "${with_tk+set}" = set; then :
14045 withval=$with_tk; with_tkconfig=${withval}
14046fi
14047
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
14049$as_echo_n "checking for Tk configuration... " >&6; }
14050 if test "${ac_cv_c_tkconfig+set}" = set; then :
14051 $as_echo_n "(cached) " >&6
bec39cab 14052else
3fc11d3e
JM
14053
14054
5062cc19
KS
14055 # First check to see if --with-tkconfig was specified.
14056 if test x"${with_tkconfig}" != x ; then
14057 if test -f "${with_tkconfig}/tkConfig.sh" ; then
14058 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
14059 else
81ecdfbb 14060 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
14061 fi
14062 fi
3fc11d3e 14063
5062cc19
KS
14064 # then check for a private Tk library
14065 case "${host}" in
14066 *-*-cygwin*) platDir="win" ;;
14067 *) platDir="unix" ;;
14068 esac
14069 if test x"${ac_cv_c_tkconfig}" = x ; then
14070 for i in \
14071 ../tk \
14072 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14073 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
14074 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
14075 ../../tk \
14076 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14077 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
14078 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
14079 ../../../tk \
14080 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14081 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
14082 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
14083 if test -f "$i/$platDir/tkConfig.sh" ; then
14084 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14085 break
14086 fi
14087 done
14088 fi
14089
14090 # on Darwin, check in Framework installation locations
14091 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
14092 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
14093 `ls -d /Library/Frameworks 2>/dev/null` \
14094 `ls -d /Network/Library/Frameworks 2>/dev/null` \
14095 `ls -d /System/Library/Frameworks 2>/dev/null` \
14096 ; do
14097 if test -f "$i/Tk.framework/tkConfig.sh" ; then
14098 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
14099 break
14100 fi
14101 done
14102 fi
14103
14104 # check in a few common install locations
14105 if test x"${ac_cv_c_tkconfig}" = x ; then
14106 for i in `ls -d ${libdir} 2>/dev/null` \
14107 `ls -d ${exec_prefix}/lib 2>/dev/null` \
14108 `ls -d ${prefix}/lib 2>/dev/null` \
14109 `ls -d /usr/local/lib 2>/dev/null` \
14110 `ls -d /usr/contrib/lib 2>/dev/null` \
14111 `ls -d /usr/lib 2>/dev/null` \
14112 ; do
14113 if test -f "$i/tkConfig.sh" ; then
14114 ac_cv_c_tkconfig=`(cd $i; pwd)`
14115 break
14116 fi
14117 done
14118 fi
14119 # check in a few other private locations
14120 if test x"${ac_cv_c_tkconfig}" = x ; then
14121 for i in \
14122 ${srcdir}/../tk \
14123 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
14124 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
14125 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
14126 if test -f "$i/$platDir/tkConfig.sh" ; then
14127 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
14128 break
14129 fi
14130 done
14131 fi
3fc11d3e 14132
3fc11d3e
JM
14133fi
14134
14135
5062cc19
KS
14136 if test x"${ac_cv_c_tkconfig}" = x ; then
14137 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
14138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
14139$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
14140 else
14141 no_tk=
14142 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
14143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
14144$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 14145 fi
3fc11d3e 14146 fi
dd2504ab 14147
dd2504ab 14148
85541719
DE
14149 if test -z "${no_tcl}" -a -z "${no_tk}"; then
14150
81ecdfbb
RW
14151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
14152$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
14153
14154 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
14155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14156$as_echo "loading" >&6; }
85541719
DE
14157 . ${TCL_BIN_DIR}/tclConfig.sh
14158 else
81ecdfbb
RW
14159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
14160$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
14161 fi
14162
14163 # eval is required to do the TCL_DBGX substitution
14164 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
14165 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
14166
14167 # If the TCL_BIN_DIR is the build directory (not the install directory),
14168 # then set the common variable name to the value of the build variables.
14169 # For example, the variable TCL_LIB_SPEC will be set to the value
14170 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
14171 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
14172 # installed and uninstalled version of Tcl.
14173 if test -f "${TCL_BIN_DIR}/Makefile" ; then
14174 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
14175 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
14176 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
14177 elif test "`uname -s`" = "Darwin"; then
14178 # If Tcl was built as a framework, attempt to use the libraries
14179 # from the framework at the given location so that linking works
a68ffae9 14180 # against Tcl.framework installed in an arbitrary location.
85541719
DE
14181 case ${TCL_DEFS} in
14182 *TCL_FRAMEWORK*)
14183 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
14184 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
14185 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
14186 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
14187 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
14188 break
14189 fi
14190 done
14191 fi
14192 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
14193 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
14194 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
14195 fi
14196 ;;
14197 esac
14198 fi
14199
14200 # eval is required to do the TCL_DBGX substitution
14201 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
14202 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
14203 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
14204 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220 # Check for in-tree tcl
14221 here=`pwd`
14222 cd ${srcdir}/..
14223 topdir=`pwd`
14224 cd ${here}
14225
14226 intree="no"
14227 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
14228 intree="yes"
14229 fi
14230
14231 # Find Tcl private headers
14232 if test x"${intree}" = xno; then
14233
81ecdfbb
RW
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
14235$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
14236 private_dir=""
14237 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
14238 if test -f ${dir}/tclInt.h ; then
14239 private_dir=${dir}
14240 fi
14241
14242 if test x"${private_dir}" = x; then
81ecdfbb 14243 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
14244 else
14245 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14247$as_echo "${private_dir}" >&6; }
85541719
DE
14248 fi
14249
14250 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
14251 TCL_LIBRARY="${TCL_LIB_SPEC}"
14252 TCL_DEPS=""
14253 else
14254 # If building tcl in the same src tree, private headers
14255 # are not needed, but we need to be sure to use the right
14256 # headers library
14257 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
14258 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
14259 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
14260 fi
14261
14262
14263
14264
14265
81ecdfbb
RW
14266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
14267$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 14268
5062cc19 14269 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
14270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
14271$as_echo "loading" >&6; }
5062cc19 14272 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 14273 else
81ecdfbb
RW
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
14275$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 14276 fi
bec39cab 14277
5062cc19
KS
14278 # eval is required to do the TK_DBGX substitution
14279 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
14280 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
14281
14282 # If the TK_BIN_DIR is the build directory (not the install directory),
14283 # then set the common variable name to the value of the build variables.
14284 # For example, the variable TK_LIB_SPEC will be set to the value
14285 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
14286 # instead of TK_BUILD_LIB_SPEC since it will work with both an
14287 # installed and uninstalled version of Tcl.
85541719 14288 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
14289 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
14290 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
14291 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
14292 elif test "`uname -s`" = "Darwin"; then
14293 # If Tk was built as a framework, attempt to use the libraries
14294 # from the framework at the given location so that linking works
a68ffae9 14295 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
14296 case ${TK_DEFS} in
14297 *TK_FRAMEWORK*)
85541719 14298 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
14299 for i in "`cd ${TK_BIN_DIR}; pwd`" \
14300 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
14301 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
14302 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
14303 break
14304 fi
14305 done
14306 fi
85541719 14307 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
14308 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
14309 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
14310 fi
14311 ;;
14312 esac
3fc11d3e
JM
14313 fi
14314
5062cc19
KS
14315 # eval is required to do the TK_DBGX substitution
14316 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
14317 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
14318 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
14319 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 14320
3fc11d3e
JM
14321
14322
bec39cab
AC
14323
14324
14325
14326
14327
14328
14329
3fc11d3e 14330
3fc11d3e 14331
bec39cab 14332
bec39cab 14333
85541719
DE
14334 # Check for in-tree Tk
14335 intree="no"
14336 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
14337 intree="yes"
14338 fi
3fc11d3e 14339
85541719
DE
14340 # Find Tk private headers
14341 if test x"${intree}" = xno; then
3fc11d3e 14342
81ecdfbb
RW
14343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
14344$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
14345 private_dir=""
14346 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
14347 if test -f ${dir}/tkInt.h; then
14348 private_dir=${dir}
3fc11d3e 14349 fi
bec39cab 14350
5062cc19 14351 if test x"${private_dir}" = x; then
81ecdfbb 14352 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 14353 else
5062cc19 14354 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
14356$as_echo "${private_dir}" >&6; }
3fc11d3e 14357 fi
3fc11d3e 14358
85541719
DE
14359 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
14360 TK_LIBRARY=${TK_LIB_SPEC}
14361 TK_DEPS=""
14362 else
14363 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
14364 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
14365 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
14366 fi
3fc11d3e
JM
14367
14368
3fc11d3e
JM
14369
14370
3fc11d3e 14371
85541719 14372 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 14373
85541719
DE
14374 # Include some libraries that Tcl and Tk want.
14375 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
14376 # Yes, the ordering seems wrong here. But it isn't.
14377 # TK_LIBS is the list of libraries that need to be linked
14378 # after Tcl/Tk. Note that this isn't put into LIBS. If it
14379 # were in LIBS then any link tests after this point would
14380 # try to include things like `$(LIBGUI)', which wouldn't work.
14381 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 14382
85541719
DE
14383 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
14384 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
14385 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
14386 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
14387 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
14388 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
14389 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 14390
85541719
DE
14391 if test x$gdb_cv_os_cygwin = xyes; then
14392 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
14393 WIN32LDAPP="-Wl,--subsystem,console"
14394 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 14395 fi
ffc6a242 14396
81ecdfbb 14397 subdirs="$subdirs gdbtk"
3ace7edb 14398
85541719 14399 fi
3fc11d3e
JM
14400fi
14401
14402
14403
14404
14405
14406
14407
14408
81ecdfbb
RW
14409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
14410$as_echo_n "checking for X... " >&6; }
bec39cab 14411
c906108c 14412
81ecdfbb
RW
14413# Check whether --with-x was given.
14414if test "${with_x+set}" = set; then :
14415 withval=$with_x;
14416fi
c906108c
SS
14417
14418# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
14419if test "x$with_x" = xno; then
14420 # The user explicitly disabled X.
14421 have_x=disabled
14422else
81ecdfbb
RW
14423 case $x_includes,$x_libraries in #(
14424 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
14425 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
14426 $as_echo_n "(cached) " >&6
c906108c
SS
14427else
14428 # One or both of the vars are not set, and there is no cached value.
bec39cab 14429ac_x_includes=no ac_x_libraries=no
81ecdfbb 14430rm -f -r conftest.dir
bec39cab
AC
14431if mkdir conftest.dir; then
14432 cd conftest.dir
bec39cab 14433 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
14434incroot:
14435 @echo incroot='${INCROOT}'
14436usrlibdir:
14437 @echo usrlibdir='${USRLIBDIR}'
14438libdir:
14439 @echo libdir='${LIBDIR}'
14440_ACEOF
14441 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 14442 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
14443 for ac_var in incroot usrlibdir libdir; do
14444 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
14445 done
c906108c 14446 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
14447 for ac_extension in a so sl dylib la dll; do
14448 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
14449 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 14450 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
14451 fi
14452 done
14453 # Screen out bogus values from the imake configuration. They are
14454 # bogus both because they are the default anyway, and because
14455 # using them would break gcc on systems where it needs fixed includes.
bec39cab 14456 case $ac_im_incroot in
81ecdfbb 14457 /usr/include) ac_x_includes= ;;
bec39cab 14458 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 14459 esac
bec39cab 14460 case $ac_im_usrlibdir in
81ecdfbb 14461 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 14462 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
14463 esac
14464 fi
14465 cd ..
81ecdfbb 14466 rm -f -r conftest.dir
c906108c
SS
14467fi
14468
bec39cab
AC
14469# Standard set of common directories for X headers.
14470# Check X11 before X11Rn because it is often a symlink to the current release.
14471ac_x_header_dirs='
14472/usr/X11/include
81ecdfbb 14473/usr/X11R7/include
bec39cab
AC
14474/usr/X11R6/include
14475/usr/X11R5/include
14476/usr/X11R4/include
14477
14478/usr/include/X11
81ecdfbb 14479/usr/include/X11R7
bec39cab
AC
14480/usr/include/X11R6
14481/usr/include/X11R5
14482/usr/include/X11R4
14483
14484/usr/local/X11/include
81ecdfbb 14485/usr/local/X11R7/include
bec39cab
AC
14486/usr/local/X11R6/include
14487/usr/local/X11R5/include
14488/usr/local/X11R4/include
14489
14490/usr/local/include/X11
81ecdfbb 14491/usr/local/include/X11R7
bec39cab
AC
14492/usr/local/include/X11R6
14493/usr/local/include/X11R5
14494/usr/local/include/X11R4
14495
14496/usr/X386/include
14497/usr/x386/include
14498/usr/XFree86/include/X11
14499
14500/usr/include
14501/usr/local/include
14502/usr/unsupported/include
14503/usr/athena/include
14504/usr/local/x11r5/include
14505/usr/lpp/Xamples/include
14506
14507/usr/openwin/include
14508/usr/openwin/share/include'
14509
14510if test "$ac_x_includes" = no; then
81ecdfbb 14511 # Guess where to find include files, by looking for Xlib.h.
c906108c 14512 # First, try using that file with no special directory specified.
81ecdfbb 14513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14514/* end confdefs.h. */
81ecdfbb 14515#include <X11/Xlib.h>
bec39cab 14516_ACEOF
81ecdfbb 14517if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14518 # We can compile using X headers with no special include directory.
14519ac_x_includes=
14520else
bec39cab 14521 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14522 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14523 ac_x_includes=$ac_dir
14524 break
14525 fi
14526done
c906108c 14527fi
bec39cab
AC
14528rm -f conftest.err conftest.$ac_ext
14529fi # $ac_x_includes = no
c906108c 14530
bec39cab 14531if test "$ac_x_libraries" = no; then
c906108c 14532 # Check for the libraries.
c906108c
SS
14533 # See if we find them without any special options.
14534 # Don't add to $LIBS permanently.
bec39cab 14535 ac_save_LIBS=$LIBS
81ecdfbb
RW
14536 LIBS="-lX11 $LIBS"
14537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14538/* end confdefs.h. */
81ecdfbb 14539#include <X11/Xlib.h>
bec39cab
AC
14540int
14541main ()
14542{
81ecdfbb 14543XrmInitialize ()
bec39cab
AC
14544 ;
14545 return 0;
14546}
14547_ACEOF
81ecdfbb 14548if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14549 LIBS=$ac_save_LIBS
c906108c
SS
14550# We can link X programs with no special library path.
14551ac_x_libraries=
14552else
81ecdfbb
RW
14553 LIBS=$ac_save_LIBS
14554for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14555do
bec39cab 14556 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14557 for ac_extension in a so sl dylib la dll; do
14558 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14559 ac_x_libraries=$ac_dir
14560 break 2
14561 fi
14562 done
14563done
14564fi
81ecdfbb
RW
14565rm -f core conftest.err conftest.$ac_objext \
14566 conftest$ac_exeext conftest.$ac_ext
bec39cab 14567fi # $ac_x_libraries = no
c906108c 14568
81ecdfbb
RW
14569case $ac_x_includes,$ac_x_libraries in #(
14570 no,* | *,no | *\'*)
14571 # Didn't find X, or a directory has "'" in its name.
14572 ac_cv_have_x="have_x=no";; #(
14573 *)
14574 # Record where we found X for the cache.
14575 ac_cv_have_x="have_x=yes\
14576 ac_x_includes='$ac_x_includes'\
14577 ac_x_libraries='$ac_x_libraries'"
14578esac
c906108c 14579fi
81ecdfbb
RW
14580;; #(
14581 *) have_x=yes;;
14582 esac
c906108c
SS
14583 eval "$ac_cv_have_x"
14584fi # $with_x != no
14585
14586if test "$have_x" != yes; then
81ecdfbb
RW
14587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14588$as_echo "$have_x" >&6; }
c906108c
SS
14589 no_x=yes
14590else
14591 # If each of the values was on the command line, it overrides each guess.
14592 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14593 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14594 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14595 ac_cv_have_x="have_x=yes\
14596 ac_x_includes='$x_includes'\
14597 ac_x_libraries='$x_libraries'"
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14599$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14600fi
14601
14602
bec39cab 14603# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14604# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14605# This code just checks for a few cases where we'd like to ignore those
14606# definitions, even when they're present in the '.mt' file. These cases
14607# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14608# not part of the source tree.
7a292a7a 14609#
81ecdfbb
RW
14610# Check whether --enable-sim was given.
14611if test "${enable_sim+set}" = set; then :
14612 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14613 echo "enableval = ${enableval}";
14614 case "${enableval}" in
14615 yes) ignore_sim=false ;;
14616 no) ignore_sim=true ;;
14617 *) ignore_sim=false ;;
14618 esac
14619else
14620 ignore_sim=false
81ecdfbb
RW
14621fi
14622
7a292a7a
SS
14623
14624if test ! -d "${srcdir}/../sim"; then
14625 ignore_sim=true
14626fi
14627
9b624dbe
UW
14628SIM=
14629SIM_OBS=
14630if test "${ignore_sim}" = "false"; then
14631 if test x"${gdb_sim}" != x ; then
14632 SIM="${gdb_sim}"
14633 SIM_OBS="remote-sim.o"
60ca704f 14634
81ecdfbb 14635$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14636
9b624dbe 14637 fi
7a292a7a
SS
14638fi
14639
14640
14641
c906108c
SS
14642
14643
14644
14645
14646
14647
dfcd3bfb 14648
e56ac5c3
AC
14649
14650
b3a90332
AC
14651
14652
c35f4ffc 14653# List of host floatformats.
bec39cab
AC
14654
14655cat >>confdefs.h <<_ACEOF
c35f4ffc 14656#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14657_ACEOF
c35f4ffc 14658
bec39cab
AC
14659
14660cat >>confdefs.h <<_ACEOF
c35f4ffc 14661#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14662_ACEOF
14663
c35f4ffc 14664
bec39cab 14665cat >>confdefs.h <<_ACEOF
c35f4ffc 14666#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14667_ACEOF
c35f4ffc
AC
14668
14669
c906108c
SS
14670# target_subdir is used by the testsuite to find the target libraries.
14671target_subdir=
14672if test "${host}" != "${target}"; then
14673 target_subdir="${target_alias}/"
14674fi
14675
14676
14677frags=
771b4502 14678if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14679 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14680 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14681 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14682 fi
14683 frags="$frags $host_makefile_frag"
14684else
14685 host_makefile_frag=/dev/null
c906108c 14686fi
c906108c 14687
c906108c
SS
14688
14689
14690
771b4502 14691if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14692# We pick this up from the host configuration file (.mh) because we
14693# do not have a native configuration Makefile fragment.
c906108c
SS
14694nativefile=`sed -n '
14695s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14696' ${host_makefile_frag}`
c906108c
SS
14697fi
14698
14699
b00a8037 14700if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14701
14702cat >>confdefs.h <<_ACEOF
b00a8037 14703#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14704_ACEOF
b00a8037
DJ
14705
14706fi
14707
8dcde887 14708# Enable multi-ice-gdb-server.
81ecdfbb
RW
14709# Check whether --enable-multi-ice was given.
14710if test "${enable_multi_ice+set}" = set; then :
14711 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14712 yes | no)
14713 ;;
81ecdfbb 14714 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14715 esac
81ecdfbb 14716fi
b4e70030 14717
81ecdfbb
RW
14718if test "x$enable_multi_ice" = xyes; then
14719 subdirs="$subdirs multi-ice"
3ace7edb 14720
a85f51e7
DJ
14721fi
14722
496c0e1b
JB
14723# Check whether --enable-gdbserver was given.
14724if test "${enable_gdbserver+set}" = set; then :
14725 enableval=$enable_gdbserver; case "${enableval}" in
14726 yes| no|auto) ;;
14727 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14728esac
14729else
14730 enable_gdbserver=auto
14731fi
14732
14733
14734# We only build gdbserver automatically in a native configuration, and
14735# only if the user did not explicitly disable its build.
14736if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
14737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14738$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14739 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14741$as_echo "yes" >&6; }
14742 subdirs="$subdirs gdbserver"
3ace7edb 14743
496c0e1b 14744 gdbserver_build_enabled=yes
8dcde887 14745 else
81ecdfbb
RW
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14747$as_echo "no" >&6; }
8dcde887
MK
14748 fi
14749fi
14750
496c0e1b
JB
14751# If the user explicitly request the gdbserver to be built, verify that
14752# we were in fact able to enable it.
14753if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14754 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14755fi
14756
393fd4c3
YQ
14757# Check for babeltrace and babeltrace-ctf
14758
14759# Check whether --with-babeltrace was given.
14760if test "${with_babeltrace+set}" = set; then :
14761 withval=$with_babeltrace;
14762else
14763 with_babeltrace=auto
14764fi
14765
14766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14767$as_echo_n "checking whether to use babeltrace... " >&6; }
14768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14769$as_echo "$with_babeltrace" >&6; }
14770
14771if test "x$with_babeltrace" = "xno"; then
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14773$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14774else
14775 # Append -Werror to CFLAGS so that configure can catch the warning
14776 # "assignment from incompatible pointer type", which is related to
14777 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
14778 # in GDB, while babeltrace 1.0.3 is broken.
14779 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14780 # safe to save and restore CFLAGS here.
14781 saved_CFLAGS=$CFLAGS
14782 CFLAGS="$CFLAGS -Werror"
14783
14784
14785
14786
14787
14788
14789
14790
14791 use_additional=yes
14792
14793 acl_save_prefix="$prefix"
14794 prefix="$acl_final_prefix"
14795 acl_save_exec_prefix="$exec_prefix"
14796 exec_prefix="$acl_final_exec_prefix"
14797
14798 eval additional_includedir=\"$includedir\"
14799 eval additional_libdir=\"$libdir\"
14800
14801 exec_prefix="$acl_save_exec_prefix"
14802 prefix="$acl_save_prefix"
14803
14804
14805# Check whether --with-libbabeltrace-prefix was given.
14806if test "${with_libbabeltrace_prefix+set}" = set; then :
14807 withval=$with_libbabeltrace_prefix;
14808 if test "X$withval" = "Xno"; then
14809 use_additional=no
14810 else
14811 if test "X$withval" = "X"; then
14812
14813 acl_save_prefix="$prefix"
14814 prefix="$acl_final_prefix"
14815 acl_save_exec_prefix="$exec_prefix"
14816 exec_prefix="$acl_final_exec_prefix"
14817
14818 eval additional_includedir=\"$includedir\"
14819 eval additional_libdir=\"$libdir\"
14820
14821 exec_prefix="$acl_save_exec_prefix"
14822 prefix="$acl_save_prefix"
14823
14824 else
14825 additional_includedir="$withval/include"
14826 additional_libdir="$withval/lib"
14827 fi
14828 fi
14829
14830fi
14831
14832 LIBBABELTRACE=
14833 LTLIBBABELTRACE=
14834 INCBABELTRACE=
14835 rpathdirs=
14836 ltrpathdirs=
14837 names_already_handled=
14838 names_next_round='babeltrace babeltrace-ctf'
14839 while test -n "$names_next_round"; do
14840 names_this_round="$names_next_round"
14841 names_next_round=
14842 for name in $names_this_round; do
14843 already_handled=
14844 for n in $names_already_handled; do
14845 if test "$n" = "$name"; then
14846 already_handled=yes
14847 break
14848 fi
14849 done
14850 if test -z "$already_handled"; then
14851 names_already_handled="$names_already_handled $name"
14852 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14853 eval value=\"\$HAVE_LIB$uppername\"
14854 if test -n "$value"; then
14855 if test "$value" = yes; then
14856 eval value=\"\$LIB$uppername\"
14857 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14858 eval value=\"\$LTLIB$uppername\"
14859 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14860 else
14861 :
14862 fi
14863 else
14864 found_dir=
14865 found_la=
14866 found_so=
14867 found_a=
14868 if test $use_additional = yes; then
14869 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14870 found_dir="$additional_libdir"
14871 found_so="$additional_libdir/lib$name.$shlibext"
14872 if test -f "$additional_libdir/lib$name.la"; then
14873 found_la="$additional_libdir/lib$name.la"
14874 fi
14875 else
14876 if test -f "$additional_libdir/lib$name.$libext"; then
14877 found_dir="$additional_libdir"
14878 found_a="$additional_libdir/lib$name.$libext"
14879 if test -f "$additional_libdir/lib$name.la"; then
14880 found_la="$additional_libdir/lib$name.la"
14881 fi
14882 fi
14883 fi
14884 fi
14885 if test "X$found_dir" = "X"; then
14886 for x in $LDFLAGS $LTLIBBABELTRACE; do
14887
14888 acl_save_prefix="$prefix"
14889 prefix="$acl_final_prefix"
14890 acl_save_exec_prefix="$exec_prefix"
14891 exec_prefix="$acl_final_exec_prefix"
14892 eval x=\"$x\"
14893 exec_prefix="$acl_save_exec_prefix"
14894 prefix="$acl_save_prefix"
14895
14896 case "$x" in
14897 -L*)
14898 dir=`echo "X$x" | sed -e 's/^X-L//'`
14899 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14900 found_dir="$dir"
14901 found_so="$dir/lib$name.$shlibext"
14902 if test -f "$dir/lib$name.la"; then
14903 found_la="$dir/lib$name.la"
14904 fi
14905 else
14906 if test -f "$dir/lib$name.$libext"; then
14907 found_dir="$dir"
14908 found_a="$dir/lib$name.$libext"
14909 if test -f "$dir/lib$name.la"; then
14910 found_la="$dir/lib$name.la"
14911 fi
14912 fi
14913 fi
14914 ;;
14915 esac
14916 if test "X$found_dir" != "X"; then
14917 break
14918 fi
14919 done
14920 fi
14921 if test "X$found_dir" != "X"; then
14922 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14923 if test "X$found_so" != "X"; then
14924 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14925 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14926 else
14927 haveit=
14928 for x in $ltrpathdirs; do
14929 if test "X$x" = "X$found_dir"; then
14930 haveit=yes
14931 break
14932 fi
14933 done
14934 if test -z "$haveit"; then
14935 ltrpathdirs="$ltrpathdirs $found_dir"
14936 fi
14937 if test "$hardcode_direct" = yes; then
14938 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14939 else
14940 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14941 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14942 haveit=
14943 for x in $rpathdirs; do
14944 if test "X$x" = "X$found_dir"; then
14945 haveit=yes
14946 break
14947 fi
14948 done
14949 if test -z "$haveit"; then
14950 rpathdirs="$rpathdirs $found_dir"
14951 fi
14952 else
14953 haveit=
14954 for x in $LDFLAGS $LIBBABELTRACE; do
14955
14956 acl_save_prefix="$prefix"
14957 prefix="$acl_final_prefix"
14958 acl_save_exec_prefix="$exec_prefix"
14959 exec_prefix="$acl_final_exec_prefix"
14960 eval x=\"$x\"
14961 exec_prefix="$acl_save_exec_prefix"
14962 prefix="$acl_save_prefix"
14963
14964 if test "X$x" = "X-L$found_dir"; then
14965 haveit=yes
14966 break
14967 fi
14968 done
14969 if test -z "$haveit"; then
14970 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
14971 fi
14972 if test "$hardcode_minus_L" != no; then
14973 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14974 else
14975 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14976 fi
14977 fi
14978 fi
14979 fi
14980 else
14981 if test "X$found_a" != "X"; then
14982 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
14983 else
14984 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
14985 fi
14986 fi
14987 additional_includedir=
14988 case "$found_dir" in
14989 */lib | */lib/)
14990 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14991 additional_includedir="$basedir/include"
14992 ;;
14993 esac
14994 if test "X$additional_includedir" != "X"; then
14995 if test "X$additional_includedir" != "X/usr/include"; then
14996 haveit=
14997 if test "X$additional_includedir" = "X/usr/local/include"; then
14998 if test -n "$GCC"; then
14999 case $host_os in
15000 linux*) haveit=yes;;
15001 esac
15002 fi
15003 fi
15004 if test -z "$haveit"; then
15005 for x in $CPPFLAGS $INCBABELTRACE; do
15006
15007 acl_save_prefix="$prefix"
15008 prefix="$acl_final_prefix"
15009 acl_save_exec_prefix="$exec_prefix"
15010 exec_prefix="$acl_final_exec_prefix"
15011 eval x=\"$x\"
15012 exec_prefix="$acl_save_exec_prefix"
15013 prefix="$acl_save_prefix"
15014
15015 if test "X$x" = "X-I$additional_includedir"; then
15016 haveit=yes
15017 break
15018 fi
15019 done
15020 if test -z "$haveit"; then
15021 if test -d "$additional_includedir"; then
15022 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
15023 fi
15024 fi
15025 fi
15026 fi
15027 fi
15028 if test -n "$found_la"; then
15029 save_libdir="$libdir"
15030 case "$found_la" in
15031 */* | *\\*) . "$found_la" ;;
15032 *) . "./$found_la" ;;
15033 esac
15034 libdir="$save_libdir"
15035 for dep in $dependency_libs; do
15036 case "$dep" in
15037 -L*)
15038 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15039 if test "X$additional_libdir" != "X/usr/lib"; then
15040 haveit=
15041 if test "X$additional_libdir" = "X/usr/local/lib"; then
15042 if test -n "$GCC"; then
15043 case $host_os in
15044 linux*) haveit=yes;;
15045 esac
15046 fi
15047 fi
15048 if test -z "$haveit"; then
15049 haveit=
15050 for x in $LDFLAGS $LIBBABELTRACE; do
15051
15052 acl_save_prefix="$prefix"
15053 prefix="$acl_final_prefix"
15054 acl_save_exec_prefix="$exec_prefix"
15055 exec_prefix="$acl_final_exec_prefix"
15056 eval x=\"$x\"
15057 exec_prefix="$acl_save_exec_prefix"
15058 prefix="$acl_save_prefix"
15059
15060 if test "X$x" = "X-L$additional_libdir"; then
15061 haveit=yes
15062 break
15063 fi
15064 done
15065 if test -z "$haveit"; then
15066 if test -d "$additional_libdir"; then
15067 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
15068 fi
15069 fi
15070 haveit=
15071 for x in $LDFLAGS $LTLIBBABELTRACE; do
15072
15073 acl_save_prefix="$prefix"
15074 prefix="$acl_final_prefix"
15075 acl_save_exec_prefix="$exec_prefix"
15076 exec_prefix="$acl_final_exec_prefix"
15077 eval x=\"$x\"
15078 exec_prefix="$acl_save_exec_prefix"
15079 prefix="$acl_save_prefix"
15080
15081 if test "X$x" = "X-L$additional_libdir"; then
15082 haveit=yes
15083 break
15084 fi
15085 done
15086 if test -z "$haveit"; then
15087 if test -d "$additional_libdir"; then
15088 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
15089 fi
15090 fi
15091 fi
15092 fi
15093 ;;
15094 -R*)
15095 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15096 if test "$enable_rpath" != no; then
15097 haveit=
15098 for x in $rpathdirs; do
15099 if test "X$x" = "X$dir"; then
15100 haveit=yes
15101 break
15102 fi
15103 done
15104 if test -z "$haveit"; then
15105 rpathdirs="$rpathdirs $dir"
15106 fi
15107 haveit=
15108 for x in $ltrpathdirs; do
15109 if test "X$x" = "X$dir"; then
15110 haveit=yes
15111 break
15112 fi
15113 done
15114 if test -z "$haveit"; then
15115 ltrpathdirs="$ltrpathdirs $dir"
15116 fi
15117 fi
15118 ;;
15119 -l*)
15120 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15121 ;;
15122 *.la)
15123 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15124 ;;
15125 *)
15126 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
15127 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
15128 ;;
15129 esac
15130 done
15131 fi
15132 else
15133 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
15134 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
15135 fi
15136 fi
15137 fi
15138 done
15139 done
15140 if test "X$rpathdirs" != "X"; then
15141 if test -n "$hardcode_libdir_separator"; then
15142 alldirs=
15143 for found_dir in $rpathdirs; do
15144 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15145 done
15146 acl_save_libdir="$libdir"
15147 libdir="$alldirs"
15148 eval flag=\"$hardcode_libdir_flag_spec\"
15149 libdir="$acl_save_libdir"
15150 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15151 else
15152 for found_dir in $rpathdirs; do
15153 acl_save_libdir="$libdir"
15154 libdir="$found_dir"
15155 eval flag=\"$hardcode_libdir_flag_spec\"
15156 libdir="$acl_save_libdir"
15157 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
15158 done
15159 fi
15160 fi
15161 if test "X$ltrpathdirs" != "X"; then
15162 for found_dir in $ltrpathdirs; do
15163 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
15164 done
15165 fi
15166
15167
15168 ac_save_CPPFLAGS="$CPPFLAGS"
15169
15170 for element in $INCBABELTRACE; do
15171 haveit=
15172 for x in $CPPFLAGS; do
15173
15174 acl_save_prefix="$prefix"
15175 prefix="$acl_final_prefix"
15176 acl_save_exec_prefix="$exec_prefix"
15177 exec_prefix="$acl_final_exec_prefix"
15178 eval x=\"$x\"
15179 exec_prefix="$acl_save_exec_prefix"
15180 prefix="$acl_save_prefix"
15181
15182 if test "X$x" = "X$element"; then
15183 haveit=yes
15184 break
15185 fi
15186 done
15187 if test -z "$haveit"; then
15188 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15189 fi
15190 done
15191
15192
15193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
15194$as_echo_n "checking for libbabeltrace... " >&6; }
15195if test "${ac_cv_libbabeltrace+set}" = set; then :
15196 $as_echo_n "(cached) " >&6
15197else
15198
15199 ac_save_LIBS="$LIBS"
15200 LIBS="$LIBS $LIBBABELTRACE"
15201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15202/* end confdefs.h. */
15203#include <babeltrace/babeltrace.h>
15204 #include <babeltrace/ctf/events.h>
15205 #include <babeltrace/ctf/iterator.h>
15206int
15207main ()
15208{
15209struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
15210 struct bt_ctf_event *event = NULL;
15211 const struct bt_definition *scope;
15212
65c749e7 15213 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
15214 scope = bt_ctf_get_top_level_scope (event,
15215 BT_STREAM_EVENT_HEADER);
15216 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
15217
15218 ;
15219 return 0;
15220}
15221_ACEOF
15222if ac_fn_c_try_link "$LINENO"; then :
15223 ac_cv_libbabeltrace=yes
15224else
15225 ac_cv_libbabeltrace=no
15226fi
15227rm -f core conftest.err conftest.$ac_objext \
15228 conftest$ac_exeext conftest.$ac_ext
15229 LIBS="$ac_save_LIBS"
15230
15231fi
15232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
15233$as_echo "$ac_cv_libbabeltrace" >&6; }
15234 if test "$ac_cv_libbabeltrace" = yes; then
15235 HAVE_LIBBABELTRACE=yes
15236
15237$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
15238
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
15240$as_echo_n "checking how to link with libbabeltrace... " >&6; }
15241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
15242$as_echo "$LIBBABELTRACE" >&6; }
15243 else
15244 HAVE_LIBBABELTRACE=no
15245 CPPFLAGS="$ac_save_CPPFLAGS"
15246 LIBBABELTRACE=
15247 LTLIBBABELTRACE=
15248 fi
15249
15250
15251
15252
15253
15254
15255 CFLAGS=$saved_CFLAGS
15256
15257 if test "$HAVE_LIBBABELTRACE" != yes; then
15258 if test "$with_babeltrace" = yes; then
15259 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
15260 else
15261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
15262$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
15263 fi
15264 fi
15265fi
15266
db985757 15267# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 15268# to an empty version.
c906108c
SS
15269
15270files=
15271links=
5a2402b8 15272
c906108c
SS
15273rm -f nm.h
15274if test "${nativefile}" != ""; then
0f475e27
AC
15275 case "${nativefile}" in
15276 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
15277 * ) GDB_NM_FILE="${nativefile}"
15278 esac
5a2402b8
AC
15279 files="${files} ${GDB_NM_FILE}"
15280 links="${links} nm.h"
60ca704f
SE
15281
15282cat >>confdefs.h <<_ACEOF
b78960be 15283#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 15284_ACEOF
5a2402b8 15285
c906108c 15286fi
5a2402b8
AC
15287
15288
bec39cab
AC
15289ac_sources="$files"
15290ac_dests="$links"
15291while test -n "$ac_sources"; do
15292 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
15293 set $ac_sources; ac_source=$1; shift; ac_sources=$*
15294 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
15295done
81ecdfbb 15296ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
15297
15298
c906108c
SS
15299
15300
c906108c 15301
81ecdfbb 15302$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 15303
bec39cab 15304
b292c783 15305
f6a88844
JM
15306 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15307 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
15308 if test "x$GDB_TRANSFORM_NAME" = x; then
15309 GDB_TRANSFORM_NAME=gdb
15310 fi
15311
15312
15313
15314 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
15315 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
15316 if test "x$GCORE_TRANSFORM_NAME" = x; then
15317 GCORE_TRANSFORM_NAME=gcore
15318 fi
15319
b292c783
JK
15320
15321ac_config_files="$ac_config_files gcore"
15322
15323
c971b7fa 15324ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
15325
15326ac_config_commands="$ac_config_commands default"
89a34d1b 15327
bec39cab
AC
15328cat >confcache <<\_ACEOF
15329# This file is a shell script that caches the results of configure
15330# tests run on this system so they can be shared between configure
15331# scripts and configure runs, see configure's option --config-cache.
15332# It is not useful on other systems. If it contains results you don't
15333# want to keep, you may remove or edit it.
15334#
15335# config.status only pays attention to the cache file if you give it
15336# the --recheck option to rerun configure.
15337#
15338# `ac_cv_env_foo' variables (set or unset) will be overridden when
15339# loading this file, other *unset* `ac_cv_foo' will be assigned the
15340# following values.
15341
15342_ACEOF
15343
15344# The following way of writing the cache mishandles newlines in values,
15345# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 15346# So, we kill variables containing newlines.
bec39cab
AC
15347# Ultrix sh set writes to stderr and can't be redirected directly,
15348# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
15349(
15350 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15351 eval ac_val=\$$ac_var
15352 case $ac_val in #(
15353 *${as_nl}*)
15354 case $ac_var in #(
15355 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15356$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15357 esac
15358 case $ac_var in #(
15359 _ | IFS | as_nl) ;; #(
15360 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15361 *) { eval $ac_var=; unset $ac_var;} ;;
15362 esac ;;
15363 esac
15364 done
15365
bec39cab 15366 (set) 2>&1 |
81ecdfbb
RW
15367 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15368 *${as_nl}ac_space=\ *)
15369 # `set' does not quote correctly, so add quotes: double-quote
15370 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
15371 sed -n \
15372 "s/'/'\\\\''/g;
15373 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 15374 ;; #(
bec39cab
AC
15375 *)
15376 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 15377 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 15378 ;;
81ecdfbb
RW
15379 esac |
15380 sort
15381) |
bec39cab 15382 sed '
81ecdfbb 15383 /^ac_cv_env_/b end
bec39cab 15384 t clear
81ecdfbb 15385 :clear
bec39cab
AC
15386 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15387 t end
81ecdfbb
RW
15388 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15389 :end' >>confcache
15390if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15391 if test -w "$cache_file"; then
15392 test "x$cache_file" != "x/dev/null" &&
15393 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15394$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
15395 cat confcache >$cache_file
15396 else
81ecdfbb
RW
15397 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15398$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
15399 fi
15400fi
15401rm -f confcache
15402
15403test "x$prefix" = xNONE && prefix=$ac_default_prefix
15404# Let make expand exec_prefix.
15405test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15406
bec39cab
AC
15407DEFS=-DHAVE_CONFIG_H
15408
15409ac_libobjs=
15410ac_ltlibobjs=
15411for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15412 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
15413 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15414 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15415 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15416 # will be set to the directory where LIBOBJS objects are built.
15417 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15418 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
15419done
15420LIBOBJS=$ac_libobjs
15421
15422LTLIBOBJS=$ac_ltlibobjs
15423
15424
85981d60 15425if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
15426 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
15427Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 15428fi
a417dc56 15429if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
15430 as_fn_error "conditional \"GMAKE\" was never defined.
15431Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 15432fi
4df42755
DE
15433if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
15434 as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
15435Usually this means the macro was only invoked conditionally." "$LINENO" 5
15436fi
15437if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
15438 as_fn_error "conditional \"HAVE_GUILE\" was never defined.
15439Usually this means the macro was only invoked conditionally." "$LINENO" 5
15440fi
81ecdfbb
RW
15441
15442
bec39cab 15443: ${CONFIG_STATUS=./config.status}
81ecdfbb 15444ac_write_fail=0
bec39cab
AC
15445ac_clean_files_save=$ac_clean_files
15446ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
15447{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15448$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15449as_write_fail=0
15450cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
15451#! $SHELL
15452# Generated by $as_me.
15453# Run this file to recreate the current configuration.
15454# Compiler output produced by configure, useful for debugging
15455# configure, is in config.log if it exists.
15456
15457debug=false
15458ac_cs_recheck=false
15459ac_cs_silent=false
bec39cab 15460
81ecdfbb
RW
15461SHELL=\${CONFIG_SHELL-$SHELL}
15462export SHELL
15463_ASEOF
15464cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15465## -------------------- ##
15466## M4sh Initialization. ##
15467## -------------------- ##
15468
15469# Be more Bourne compatible
15470DUALCASE=1; export DUALCASE # for MKS sh
15471if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
15472 emulate sh
15473 NULLCMD=:
81ecdfbb 15474 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
15475 # is contrary to our usage. Disable this feature.
15476 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
15477 setopt NO_GLOB_SUBST
15478else
15479 case `(set -o) 2>/dev/null` in #(
15480 *posix*) :
15481 set -o posix ;; #(
15482 *) :
15483 ;;
15484esac
bec39cab 15485fi
bec39cab 15486
81ecdfbb
RW
15487
15488as_nl='
15489'
15490export as_nl
15491# Printing a long string crashes Solaris 7 /usr/bin/printf.
15492as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15493as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15494as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15495# Prefer a ksh shell builtin over an external printf program on Solaris,
15496# but without wasting forks for bash or zsh.
15497if test -z "$BASH_VERSION$ZSH_VERSION" \
15498 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15499 as_echo='print -r --'
15500 as_echo_n='print -rn --'
15501elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15502 as_echo='printf %s\n'
15503 as_echo_n='printf %s'
15504else
15505 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15506 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15507 as_echo_n='/usr/ucb/echo -n'
15508 else
15509 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15510 as_echo_n_body='eval
15511 arg=$1;
15512 case $arg in #(
15513 *"$as_nl"*)
15514 expr "X$arg" : "X\\(.*\\)$as_nl";
15515 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15516 esac;
15517 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15518 '
15519 export as_echo_n_body
15520 as_echo_n='sh -c $as_echo_n_body as_echo'
15521 fi
15522 export as_echo_body
15523 as_echo='sh -c $as_echo_body as_echo'
15524fi
15525
15526# The user is always right.
15527if test "${PATH_SEPARATOR+set}" != set; then
15528 PATH_SEPARATOR=:
15529 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15530 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15531 PATH_SEPARATOR=';'
15532 }
bec39cab
AC
15533fi
15534
15535
81ecdfbb
RW
15536# IFS
15537# We need space, tab and new line, in precisely that order. Quoting is
15538# there to prevent editors from complaining about space-tab.
15539# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15540# splitting by setting IFS to empty value.)
15541IFS=" "" $as_nl"
15542
15543# Find who we are. Look in the path if we contain no directory separator.
15544case $0 in #((
15545 *[\\/]* ) as_myself=$0 ;;
15546 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15547for as_dir in $PATH
15548do
15549 IFS=$as_save_IFS
15550 test -z "$as_dir" && as_dir=.
15551 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15552 done
15553IFS=$as_save_IFS
15554
15555 ;;
15556esac
15557# We did not find ourselves, most probably we were run as `sh COMMAND'
15558# in which case we are not to be found in the path.
15559if test "x$as_myself" = x; then
15560 as_myself=$0
15561fi
15562if test ! -f "$as_myself"; then
15563 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15564 exit 1
15565fi
15566
15567# Unset variables that we do not need and which cause bugs (e.g. in
15568# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15569# suppresses any "Segmentation fault" message there. '((' could
15570# trigger a bug in pdksh 5.2.14.
15571for as_var in BASH_ENV ENV MAIL MAILPATH
15572do eval test x\${$as_var+set} = xset \
15573 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15574done
bec39cab
AC
15575PS1='$ '
15576PS2='> '
15577PS4='+ '
15578
15579# NLS nuisances.
81ecdfbb
RW
15580LC_ALL=C
15581export LC_ALL
15582LANGUAGE=C
15583export LANGUAGE
15584
15585# CDPATH.
15586(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15587
15588
15589# as_fn_error ERROR [LINENO LOG_FD]
15590# ---------------------------------
15591# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15592# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15593# script with status $?, using 1 if that was 0.
15594as_fn_error ()
15595{
15596 as_status=$?; test $as_status -eq 0 && as_status=1
15597 if test "$3"; then
15598 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15599 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15600 fi
15601 $as_echo "$as_me: error: $1" >&2
15602 as_fn_exit $as_status
15603} # as_fn_error
15604
15605
15606# as_fn_set_status STATUS
15607# -----------------------
15608# Set $? to STATUS, without forking.
15609as_fn_set_status ()
15610{
15611 return $1
15612} # as_fn_set_status
15613
15614# as_fn_exit STATUS
15615# -----------------
15616# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15617as_fn_exit ()
15618{
15619 set +e
15620 as_fn_set_status $1
15621 exit $1
15622} # as_fn_exit
15623
15624# as_fn_unset VAR
15625# ---------------
15626# Portably unset VAR.
15627as_fn_unset ()
15628{
15629 { eval $1=; unset $1;}
15630}
15631as_unset=as_fn_unset
15632# as_fn_append VAR VALUE
15633# ----------------------
15634# Append the text in VALUE to the end of the definition contained in VAR. Take
15635# advantage of any shell optimizations that allow amortized linear growth over
15636# repeated appends, instead of the typical quadratic growth present in naive
15637# implementations.
15638if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15639 eval 'as_fn_append ()
15640 {
15641 eval $1+=\$2
15642 }'
15643else
15644 as_fn_append ()
15645 {
15646 eval $1=\$$1\$2
15647 }
15648fi # as_fn_append
15649
15650# as_fn_arith ARG...
15651# ------------------
15652# Perform arithmetic evaluation on the ARGs, and store the result in the
15653# global $as_val. Take advantage of shells that can avoid forks. The arguments
15654# must be portable across $(()) and expr.
15655if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15656 eval 'as_fn_arith ()
15657 {
15658 as_val=$(( $* ))
15659 }'
15660else
15661 as_fn_arith ()
15662 {
15663 as_val=`expr "$@" || test $? -eq 1`
15664 }
15665fi # as_fn_arith
bec39cab 15666
81ecdfbb
RW
15667
15668if expr a : '\(a\)' >/dev/null 2>&1 &&
15669 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15670 as_expr=expr
15671else
15672 as_expr=false
15673fi
15674
81ecdfbb 15675if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15676 as_basename=basename
15677else
15678 as_basename=false
15679fi
15680
81ecdfbb
RW
15681if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15682 as_dirname=dirname
15683else
15684 as_dirname=false
15685fi
bec39cab 15686
81ecdfbb 15687as_me=`$as_basename -- "$0" ||
bec39cab
AC
15688$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15689 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15690 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15691$as_echo X/"$0" |
15692 sed '/^.*\/\([^/][^/]*\)\/*$/{
15693 s//\1/
15694 q
15695 }
15696 /^X\/\(\/\/\)$/{
15697 s//\1/
15698 q
15699 }
15700 /^X\/\(\/\).*/{
15701 s//\1/
15702 q
15703 }
15704 s/.*/./; q'`
b4e70030 15705
b4e70030
JB
15706# Avoid depending upon Character Ranges.
15707as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15708as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15709as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15710as_cr_digits='0123456789'
15711as_cr_alnum=$as_cr_Letters$as_cr_digits
15712
81ecdfbb
RW
15713ECHO_C= ECHO_N= ECHO_T=
15714case `echo -n x` in #(((((
15715-n*)
15716 case `echo 'xy\c'` in
15717 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15718 xy) ECHO_C='\c';;
15719 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15720 ECHO_T=' ';;
15721 esac;;
15722*)
15723 ECHO_N='-n';;
bec39cab
AC
15724esac
15725
81ecdfbb
RW
15726rm -f conf$$ conf$$.exe conf$$.file
15727if test -d conf$$.dir; then
15728 rm -f conf$$.dir/conf$$.file
bec39cab 15729else
81ecdfbb
RW
15730 rm -f conf$$.dir
15731 mkdir conf$$.dir 2>/dev/null
bec39cab 15732fi
81ecdfbb
RW
15733if (echo >conf$$.file) 2>/dev/null; then
15734 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 15735 as_ln_s='ln -s'
81ecdfbb
RW
15736 # ... but there are two gotchas:
15737 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15738 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15739 # In both cases, we have to default to `cp -p'.
15740 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15741 as_ln_s='cp -p'
15742 elif ln conf$$.file conf$$ 2>/dev/null; then
15743 as_ln_s=ln
15744 else
15745 as_ln_s='cp -p'
b4e70030 15746 fi
bec39cab
AC
15747else
15748 as_ln_s='cp -p'
15749fi
81ecdfbb
RW
15750rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15751rmdir conf$$.dir 2>/dev/null
15752
15753
15754# as_fn_mkdir_p
15755# -------------
15756# Create "$as_dir" as a directory, including parents if necessary.
15757as_fn_mkdir_p ()
15758{
15759
15760 case $as_dir in #(
15761 -*) as_dir=./$as_dir;;
15762 esac
15763 test -d "$as_dir" || eval $as_mkdir_p || {
15764 as_dirs=
15765 while :; do
15766 case $as_dir in #(
15767 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15768 *) as_qdir=$as_dir;;
15769 esac
15770 as_dirs="'$as_qdir' $as_dirs"
15771 as_dir=`$as_dirname -- "$as_dir" ||
15772$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15773 X"$as_dir" : 'X\(//\)[^/]' \| \
15774 X"$as_dir" : 'X\(//\)$' \| \
15775 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15776$as_echo X"$as_dir" |
15777 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15778 s//\1/
15779 q
15780 }
15781 /^X\(\/\/\)[^/].*/{
15782 s//\1/
15783 q
15784 }
15785 /^X\(\/\/\)$/{
15786 s//\1/
15787 q
15788 }
15789 /^X\(\/\).*/{
15790 s//\1/
15791 q
15792 }
15793 s/.*/./; q'`
15794 test -d "$as_dir" && break
15795 done
15796 test -z "$as_dirs" || eval "mkdir $as_dirs"
15797 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15798
bec39cab 15799
81ecdfbb 15800} # as_fn_mkdir_p
bec39cab 15801if mkdir -p . 2>/dev/null; then
81ecdfbb 15802 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15803else
15804 test -d ./-p && rmdir ./-p
15805 as_mkdir_p=false
15806fi
15807
81ecdfbb
RW
15808if test -x / >/dev/null 2>&1; then
15809 as_test_x='test -x'
15810else
15811 if ls -dL / >/dev/null 2>&1; then
15812 as_ls_L_option=L
15813 else
15814 as_ls_L_option=
15815 fi
15816 as_test_x='
15817 eval sh -c '\''
15818 if test -d "$1"; then
15819 test -d "$1/.";
15820 else
15821 case $1 in #(
15822 -*)set "./$1";;
15823 esac;
15824 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15825 ???[sx]*):;;*)false;;esac;fi
15826 '\'' sh
15827 '
15828fi
15829as_executable_p=$as_test_x
bec39cab
AC
15830
15831# Sed expression to map a string onto a valid CPP name.
15832as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15833
15834# Sed expression to map a string onto a valid variable name.
15835as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15836
15837
bec39cab 15838exec 6>&1
81ecdfbb
RW
15839## ----------------------------------- ##
15840## Main body of $CONFIG_STATUS script. ##
15841## ----------------------------------- ##
15842_ASEOF
15843test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15844
15845cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15846# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15847# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15848# values after options handling.
15849ac_log="
bec39cab 15850This file was extended by $as_me, which was
81ecdfbb 15851generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15852
15853 CONFIG_FILES = $CONFIG_FILES
15854 CONFIG_HEADERS = $CONFIG_HEADERS
15855 CONFIG_LINKS = $CONFIG_LINKS
15856 CONFIG_COMMANDS = $CONFIG_COMMANDS
15857 $ $0 $@
15858
81ecdfbb
RW
15859on `(hostname || uname -n) 2>/dev/null | sed 1q`
15860"
15861
bec39cab
AC
15862_ACEOF
15863
81ecdfbb
RW
15864case $ac_config_files in *"
15865"*) set x $ac_config_files; shift; ac_config_files=$*;;
15866esac
234b45d4 15867
81ecdfbb
RW
15868case $ac_config_headers in *"
15869"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15870esac
b4e70030 15871
b4e70030 15872
81ecdfbb
RW
15873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15874# Files that config.status was made for.
15875config_files="$ac_config_files"
15876config_headers="$ac_config_headers"
15877config_links="$ac_config_links"
15878config_commands="$ac_config_commands"
234b45d4 15879
81ecdfbb 15880_ACEOF
b4e70030 15881
81ecdfbb 15882cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15883ac_cs_usage="\
81ecdfbb
RW
15884\`$as_me' instantiates files and other configuration actions
15885from templates according to the current configuration. Unless the files
15886and actions are specified as TAGs, all are instantiated by default.
234b45d4 15887
81ecdfbb 15888Usage: $0 [OPTION]... [TAG]...
234b45d4 15889
bec39cab 15890 -h, --help print this help, then exit
81ecdfbb
RW
15891 -V, --version print version number and configuration settings, then exit
15892 -q, --quiet, --silent
15893 do not print progress messages
bec39cab
AC
15894 -d, --debug don't remove temporary files
15895 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15896 --file=FILE[:TEMPLATE]
15897 instantiate the configuration file FILE
15898 --header=FILE[:TEMPLATE]
15899 instantiate the configuration header FILE
234b45d4 15900
bec39cab
AC
15901Configuration files:
15902$config_files
234b45d4 15903
bec39cab
AC
15904Configuration headers:
15905$config_headers
234b45d4 15906
bec39cab
AC
15907Configuration links:
15908$config_links
234b45d4 15909
bec39cab
AC
15910Configuration commands:
15911$config_commands
15912
81ecdfbb 15913Report bugs to the package provider."
b4e70030 15914
81ecdfbb
RW
15915_ACEOF
15916cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15917ac_cs_version="\\
15918config.status
81ecdfbb
RW
15919configured by $0, generated by GNU Autoconf 2.64,
15920 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15921
81ecdfbb 15922Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15923This config.status script is free software; the Free Software Foundation
15924gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15925
15926ac_pwd='$ac_pwd'
15927srcdir='$srcdir'
15928INSTALL='$INSTALL'
81ecdfbb
RW
15929AWK='$AWK'
15930test -n "\$AWK" || AWK=awk
bec39cab
AC
15931_ACEOF
15932
81ecdfbb
RW
15933cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15934# The default lists apply if the user does not specify any file.
bec39cab
AC
15935ac_need_defaults=:
15936while test $# != 0
15937do
15938 case $1 in
15939 --*=*)
81ecdfbb
RW
15940 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15941 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15942 ac_shift=:
c906108c 15943 ;;
81ecdfbb 15944 *)
bec39cab
AC
15945 ac_option=$1
15946 ac_optarg=$2
15947 ac_shift=shift
c906108c 15948 ;;
bec39cab 15949 esac
c906108c 15950
bec39cab
AC
15951 case $ac_option in
15952 # Handling of the options.
bec39cab
AC
15953 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15954 ac_cs_recheck=: ;;
81ecdfbb
RW
15955 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15956 $as_echo "$ac_cs_version"; exit ;;
15957 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15958 debug=: ;;
15959 --file | --fil | --fi | --f )
15960 $ac_shift
81ecdfbb
RW
15961 case $ac_optarg in
15962 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15963 esac
15964 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15965 ac_need_defaults=false;;
15966 --header | --heade | --head | --hea )
15967 $ac_shift
81ecdfbb
RW
15968 case $ac_optarg in
15969 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15970 esac
15971 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15972 ac_need_defaults=false;;
81ecdfbb
RW
15973 --he | --h)
15974 # Conflict between --help and --header
15975 as_fn_error "ambiguous option: \`$1'
15976Try \`$0 --help' for more information.";;
15977 --help | --hel | -h )
15978 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15979 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15980 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15981 ac_cs_silent=: ;;
c906108c 15982
bec39cab 15983 # This is an error.
81ecdfbb
RW
15984 -*) as_fn_error "unrecognized option: \`$1'
15985Try \`$0 --help' for more information." ;;
c906108c 15986
81ecdfbb
RW
15987 *) as_fn_append ac_config_targets " $1"
15988 ac_need_defaults=false ;;
c906108c 15989
bec39cab
AC
15990 esac
15991 shift
15992done
c906108c 15993
bec39cab 15994ac_configure_extra_args=
c906108c 15995
bec39cab
AC
15996if $ac_cs_silent; then
15997 exec 6>/dev/null
15998 ac_configure_extra_args="$ac_configure_extra_args --silent"
15999fi
c906108c 16000
bec39cab 16001_ACEOF
81ecdfbb 16002cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 16003if \$ac_cs_recheck; then
81ecdfbb
RW
16004 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16005 shift
16006 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16007 CONFIG_SHELL='$SHELL'
16008 export CONFIG_SHELL
16009 exec "\$@"
bec39cab
AC
16010fi
16011
16012_ACEOF
81ecdfbb
RW
16013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16014exec 5>>config.log
16015{
16016 echo
16017 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16018## Running $as_me. ##
16019_ASBOX
16020 $as_echo "$ac_log"
16021} >&5
bec39cab 16022
81ecdfbb
RW
16023_ACEOF
16024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 16025#
81ecdfbb 16026# INIT-COMMANDS
c906108c 16027#
a417dc56 16028ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 16029
bec39cab
AC
16030_ACEOF
16031
81ecdfbb 16032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 16033
81ecdfbb 16034# Handling of arguments.
bec39cab 16035for ac_config_target in $ac_config_targets
c906108c 16036do
81ecdfbb
RW
16037 case $ac_config_target in
16038 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
16039 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 16040 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 16041 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 16042 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 16043 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 16044 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 16045 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 16046 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
16047 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16048
16049 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
16050 esac
16051done
16052
81ecdfbb 16053
bec39cab
AC
16054# If the user did not use the arguments to specify the items to instantiate,
16055# then the envvar interface is used. Set only those that are not.
16056# We use the long form for the default assignment because of an extremely
16057# bizarre bug on SunOS 4.1.3.
16058if $ac_need_defaults; then
16059 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16060 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16061 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16062 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16063fi
16064
b4e70030 16065# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 16066# simply because there is no reason against having it here, and in addition,
b4e70030 16067# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
16068# Hook for its removal unless debugging.
16069# Note that there is a small window in which the directory will not be cleaned:
16070# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
16071$debug ||
16072{
81ecdfbb
RW
16073 tmp=
16074 trap 'exit_status=$?
16075 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
16076' 0
16077 trap 'as_fn_exit 1' 1 2 13 15
16078}
16079# Create a (secure) tmp directory for tmp files.
16080
16081{
16082 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
16083 test -n "$tmp" && test -d "$tmp"
16084} ||
16085{
16086 tmp=./conf$$-$RANDOM
16087 (umask 077 && mkdir "$tmp")
16088} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
16089
16090# Set up the scripts for CONFIG_FILES section.
16091# No need to generate them if there are no CONFIG_FILES.
16092# This happens for instance with `./config.status config.h'.
16093if test -n "$CONFIG_FILES"; then
16094
16095if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
16096 ac_cs_awk_getline=:
16097 ac_cs_awk_pipe_init=
16098 ac_cs_awk_read_file='
16099 while ((getline aline < (F[key])) > 0)
16100 print(aline)
16101 close(F[key])'
16102 ac_cs_awk_pipe_fini=
16103else
16104 ac_cs_awk_getline=false
16105 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
16106 ac_cs_awk_read_file='
16107 print "|#_!!_#|"
16108 print "cat " F[key] " &&"
16109 '$ac_cs_awk_pipe_init
16110 # The final `:' finishes the AND list.
16111 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
16112fi
16113ac_cr=`echo X | tr X '\015'`
16114# On cygwin, bash can eat \r inside `` if the user requested igncr.
16115# But we know of no other shell where ac_cr would be empty at this
16116# point, so we can use a bashism as a fallback.
16117if test "x$ac_cr" = x; then
16118 eval ac_cr=\$\'\\r\'
16119fi
16120ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16121if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16122 ac_cs_awk_cr='\r'
16123else
16124 ac_cs_awk_cr=$ac_cr
16125fi
16126
16127echo 'BEGIN {' >"$tmp/subs1.awk" &&
16128_ACEOF
16129
16130# Create commands to substitute file output variables.
16131{
16132 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
16133 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
16134 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
16135 echo "_ACAWK" &&
16136 echo "_ACEOF"
16137} >conf$$files.sh &&
16138. ./conf$$files.sh ||
16139 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16140rm -f conf$$files.sh
16141
16142{
16143 echo "cat >conf$$subs.awk <<_ACEOF" &&
16144 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16145 echo "_ACEOF"
16146} >conf$$subs.sh ||
16147 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16148ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
16149ac_delim='%!_!# '
16150for ac_last_try in false false false false false :; do
16151 . ./conf$$subs.sh ||
16152 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16153
16154 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16155 if test $ac_delim_n = $ac_delim_num; then
16156 break
16157 elif $ac_last_try; then
16158 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
16159 else
16160 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16161 fi
16162done
16163rm -f conf$$subs.sh
16164
16165cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16166cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
16167_ACEOF
16168sed -n '
16169h
16170s/^/S["/; s/!.*/"]=/
16171p
16172g
16173s/^[^!]*!//
16174:repl
16175t repl
16176s/'"$ac_delim"'$//
16177t delim
16178:nl
16179h
16180s/\(.\{148\}\).*/\1/
16181t more1
16182s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16183p
16184n
16185b repl
16186:more1
16187s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16188p
16189g
16190s/.\{148\}//
16191t nl
16192:delim
16193h
16194s/\(.\{148\}\).*/\1/
16195t more2
16196s/["\\]/\\&/g; s/^/"/; s/$/"/
16197p
16198b
16199:more2
16200s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16201p
16202g
16203s/.\{148\}//
16204t delim
16205' <conf$$subs.awk | sed '
16206/^[^""]/{
16207 N
16208 s/\n//
16209}
16210' >>$CONFIG_STATUS || ac_write_fail=1
16211rm -f conf$$subs.awk
16212cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16213_ACAWK
16214cat >>"\$tmp/subs1.awk" <<_ACAWK &&
16215 for (key in S) S_is_set[key] = 1
16216 FS = "\a"
16217 \$ac_cs_awk_pipe_init
16218}
16219{
16220 line = $ 0
16221 nfields = split(line, field, "@")
16222 substed = 0
16223 len = length(field[1])
16224 for (i = 2; i < nfields; i++) {
16225 key = field[i]
16226 keylen = length(key)
16227 if (S_is_set[key]) {
16228 value = S[key]
16229 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16230 len += length(value) + length(field[++i])
16231 substed = 1
16232 } else
16233 len += 1 + keylen
16234 }
16235 if (nfields == 3 && !substed) {
16236 key = field[2]
16237 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
16238 \$ac_cs_awk_read_file
16239 next
16240 }
16241 }
16242 print line
b4e70030 16243}
81ecdfbb
RW
16244\$ac_cs_awk_pipe_fini
16245_ACAWK
16246_ACEOF
16247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16248if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16249 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16250else
16251 cat
16252fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
16253 || as_fn_error "could not setup config files machinery" "$LINENO" 5
16254_ACEOF
16255
16256# VPATH may cause trouble with some makes, so we remove $(srcdir),
16257# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16258# trailing colons and then remove the whole line if VPATH becomes empty
16259# (actually we leave an empty line to preserve line numbers).
16260if test "x$srcdir" = x.; then
16261 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16262s/:*\$(srcdir):*/:/
16263s/:*\${srcdir}:*/:/
16264s/:*@srcdir@:*/:/
16265s/^\([^=]*=[ ]*\):*/\1/
16266s/:*$//
16267s/^[^=]*=[ ]*$//
16268}'
16269fi
16270
16271cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16272fi # test -n "$CONFIG_FILES"
16273
16274# Set up the scripts for CONFIG_HEADERS section.
16275# No need to generate them if there are no CONFIG_HEADERS.
16276# This happens for instance with `./config.status Makefile'.
16277if test -n "$CONFIG_HEADERS"; then
16278cat >"$tmp/defines.awk" <<\_ACAWK ||
16279BEGIN {
16280_ACEOF
16281
16282# Transform confdefs.h into an awk script `defines.awk', embedded as
16283# here-document in config.status, that substitutes the proper values into
16284# config.h.in to produce config.h.
4e8d927d 16285
81ecdfbb
RW
16286# Create a delimiter string that does not exist in confdefs.h, to ease
16287# handling of long lines.
16288ac_delim='%!_!# '
16289for ac_last_try in false false :; do
16290 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
16291 if test -z "$ac_t"; then
16292 break
16293 elif $ac_last_try; then
16294 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
16295 else
16296 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16297 fi
16298done
4e8d927d 16299
81ecdfbb
RW
16300# For the awk script, D is an array of macro values keyed by name,
16301# likewise P contains macro parameters if any. Preserve backslash
16302# newline sequences.
16303
16304ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16305sed -n '
16306s/.\{148\}/&'"$ac_delim"'/g
16307t rset
16308:rset
16309s/^[ ]*#[ ]*define[ ][ ]*/ /
16310t def
16311d
16312:def
16313s/\\$//
16314t bsnl
16315s/["\\]/\\&/g
16316s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16317D["\1"]=" \3"/p
16318s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16319d
16320:bsnl
16321s/["\\]/\\&/g
16322s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16323D["\1"]=" \3\\\\\\n"\\/p
16324t cont
16325s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16326t cont
16327d
16328:cont
16329n
16330s/.\{148\}/&'"$ac_delim"'/g
16331t clear
16332:clear
16333s/\\$//
16334t bsnlc
16335s/["\\]/\\&/g; s/^/"/; s/$/"/p
16336d
16337:bsnlc
16338s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16339b cont
16340' <confdefs.h | sed '
16341s/'"$ac_delim"'/"\\\
16342"/g' >>$CONFIG_STATUS || ac_write_fail=1
16343
16344cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16345 for (key in D) D_is_set[key] = 1
16346 FS = "\a"
16347}
16348/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16349 line = \$ 0
16350 split(line, arg, " ")
16351 if (arg[1] == "#") {
16352 defundef = arg[2]
16353 mac1 = arg[3]
16354 } else {
16355 defundef = substr(arg[1], 2)
16356 mac1 = arg[2]
16357 }
16358 split(mac1, mac2, "(") #)
16359 macro = mac2[1]
16360 prefix = substr(line, 1, index(line, defundef) - 1)
16361 if (D_is_set[macro]) {
16362 # Preserve the white space surrounding the "#".
16363 print prefix "define", macro P[macro] D[macro]
16364 next
16365 } else {
16366 # Replace #undef with comments. This is necessary, for example,
16367 # in the case of _POSIX_SOURCE, which is predefined and required
16368 # on some systems where configure will not decide to define it.
16369 if (defundef == "undef") {
16370 print "/*", prefix defundef, macro, "*/"
16371 next
16372 }
16373 }
b4e70030 16374}
81ecdfbb
RW
16375{ print }
16376_ACAWK
b4e70030 16377_ACEOF
81ecdfbb
RW
16378cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16379 as_fn_error "could not setup config headers machinery" "$LINENO" 5
16380fi # test -n "$CONFIG_HEADERS"
4e8d927d 16381
4e8d927d 16382
81ecdfbb
RW
16383eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
16384shift
16385for ac_tag
16386do
16387 case $ac_tag in
16388 :[FHLC]) ac_mode=$ac_tag; continue;;
16389 esac
16390 case $ac_mode$ac_tag in
16391 :[FHL]*:*);;
16392 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
16393 :[FH]-) ac_tag=-:-;;
16394 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16395 esac
16396 ac_save_IFS=$IFS
16397 IFS=:
16398 set x $ac_tag
16399 IFS=$ac_save_IFS
16400 shift
16401 ac_file=$1
16402 shift
4e8d927d 16403
81ecdfbb
RW
16404 case $ac_mode in
16405 :L) ac_source=$1;;
16406 :[FH])
16407 ac_file_inputs=
16408 for ac_f
16409 do
16410 case $ac_f in
16411 -) ac_f="$tmp/stdin";;
16412 *) # Look for the file first in the build tree, then in the source tree
16413 # (if the path is not absolute). The absolute path cannot be DOS-style,
16414 # because $ac_f cannot contain `:'.
16415 test -f "$ac_f" ||
16416 case $ac_f in
16417 [\\/$]*) false;;
16418 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16419 esac ||
16420 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16421 esac
16422 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16423 as_fn_append ac_file_inputs " '$ac_f'"
16424 done
16425
16426 # Let's still pretend it is `configure' which instantiates (i.e., don't
16427 # use $as_me), people would be surprised to read:
16428 # /* config.h. Generated by config.status. */
16429 configure_input='Generated from '`
16430 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16431 `' by configure.'
16432 if test x"$ac_file" != x-; then
16433 configure_input="$ac_file. $configure_input"
16434 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16435$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 16436 fi
81ecdfbb
RW
16437 # Neutralize special characters interpreted by sed in replacement strings.
16438 case $configure_input in #(
16439 *\&* | *\|* | *\\* )
16440 ac_sed_conf_input=`$as_echo "$configure_input" |
16441 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16442 *) ac_sed_conf_input=$configure_input;;
16443 esac
4e8d927d 16444
81ecdfbb
RW
16445 case $ac_tag in
16446 *:-:* | *:-) cat >"$tmp/stdin" \
16447 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
16448 esac
16449 ;;
c906108c
SS
16450 esac
16451
81ecdfbb 16452 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
16453$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16454 X"$ac_file" : 'X\(//\)[^/]' \| \
16455 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
16456 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16457$as_echo X"$ac_file" |
16458 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16459 s//\1/
16460 q
16461 }
16462 /^X\(\/\/\)[^/].*/{
16463 s//\1/
16464 q
16465 }
16466 /^X\(\/\/\)$/{
16467 s//\1/
16468 q
16469 }
16470 /^X\(\/\).*/{
16471 s//\1/
16472 q
16473 }
16474 s/.*/./; q'`
16475 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16476 ac_builddir=.
16477
81ecdfbb
RW
16478case "$ac_dir" in
16479.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16480*)
16481 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16482 # A ".." for each directory in $ac_dir_suffix.
16483 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16484 case $ac_top_builddir_sub in
16485 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16486 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16487 esac ;;
16488esac
16489ac_abs_top_builddir=$ac_pwd
16490ac_abs_builddir=$ac_pwd$ac_dir_suffix
16491# for backward compatibility:
16492ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16493
16494case $srcdir in
81ecdfbb 16495 .) # We are building in place.
bec39cab 16496 ac_srcdir=.
81ecdfbb
RW
16497 ac_top_srcdir=$ac_top_builddir_sub
16498 ac_abs_top_srcdir=$ac_pwd ;;
16499 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16500 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16501 ac_top_srcdir=$srcdir
16502 ac_abs_top_srcdir=$srcdir ;;
16503 *) # Relative name.
16504 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16505 ac_top_srcdir=$ac_top_build_prefix$srcdir
16506 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16507esac
81ecdfbb 16508ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 16509
c906108c 16510
81ecdfbb
RW
16511 case $ac_mode in
16512 :F)
16513 #
16514 # CONFIG_FILE
16515 #
c906108c 16516
bec39cab
AC
16517 case $INSTALL in
16518 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 16519 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 16520 esac
81ecdfbb 16521_ACEOF
121ce6e5 16522
81ecdfbb
RW
16523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16524# If the template does not know about datarootdir, expand it.
16525# FIXME: This hack should be removed a few years after 2.60.
16526ac_datarootdir_hack=; ac_datarootdir_seen=
16527ac_sed_dataroot='
16528/datarootdir/ {
16529 p
16530 q
16531}
16532/@datadir@/p
16533/@docdir@/p
16534/@infodir@/p
16535/@localedir@/p
16536/@mandir@/p'
16537case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16538*datarootdir*) ac_datarootdir_seen=yes;;
16539*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16541$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16542_ACEOF
16543cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16544 ac_datarootdir_hack='
16545 s&@datadir@&$datadir&g
16546 s&@docdir@&$docdir&g
16547 s&@infodir@&$infodir&g
16548 s&@localedir@&$localedir&g
16549 s&@mandir@&$mandir&g
16550 s&\\\${datarootdir}&$datarootdir&g' ;;
16551esac
4e8d927d 16552_ACEOF
81ecdfbb
RW
16553
16554# Neutralize VPATH when `$srcdir' = `.'.
16555# Shell code in configure.ac might set extrasub.
16556# FIXME: do we really want to maintain this feature?
16557cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16558ac_sed_extra="$ac_vpsub
bec39cab
AC
16559$extrasub
16560_ACEOF
81ecdfbb 16561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16562:t
16563/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16564s|@configure_input@|$ac_sed_conf_input|;t t
16565s&@top_builddir@&$ac_top_builddir_sub&;t t
16566s&@top_build_prefix@&$ac_top_build_prefix&;t t
16567s&@srcdir@&$ac_srcdir&;t t
16568s&@abs_srcdir@&$ac_abs_srcdir&;t t
16569s&@top_srcdir@&$ac_top_srcdir&;t t
16570s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16571s&@builddir@&$ac_builddir&;t t
16572s&@abs_builddir@&$ac_abs_builddir&;t t
16573s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16574s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
16575$ac_datarootdir_hack
16576"
16577eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16578if $ac_cs_awk_getline; then
16579 $AWK -f "$tmp/subs.awk"
16580else
16581 $AWK -f "$tmp/subs.awk" | $SHELL
16582fi >$tmp/out \
16583 || as_fn_error "could not create $ac_file" "$LINENO" 5
16584
16585test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16586 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16587 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16589which seems to be undefined. Please make sure it is defined." >&5
16590$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16591which seems to be undefined. Please make sure it is defined." >&2;}
16592
16593 rm -f "$tmp/stdin"
bec39cab 16594 case $ac_file in
81ecdfbb
RW
16595 -) cat "$tmp/out" && rm -f "$tmp/out";;
16596 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16597 esac \
16598 || as_fn_error "could not create $ac_file" "$LINENO" 5
16599 ;;
16600 :H)
16601 #
16602 # CONFIG_HEADER
16603 #
bec39cab 16604 if test x"$ac_file" != x-; then
81ecdfbb
RW
16605 {
16606 $as_echo "/* $configure_input */" \
16607 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16608 } >"$tmp/config.h" \
16609 || as_fn_error "could not create $ac_file" "$LINENO" 5
16610 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16612$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16613 else
81ecdfbb
RW
16614 rm -f "$ac_file"
16615 mv "$tmp/config.h" "$ac_file" \
16616 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
16617 fi
16618 else
81ecdfbb
RW
16619 $as_echo "/* $configure_input */" \
16620 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16621 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 16622 fi
81ecdfbb
RW
16623 ;;
16624 :L)
16625 #
16626 # CONFIG_LINK
16627 #
c906108c 16628
81ecdfbb
RW
16629 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16630 :
b4e70030 16631 else
81ecdfbb
RW
16632 # Prefer the file from the source tree if names are identical.
16633 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16634 ac_source=$srcdir/$ac_source
16635 fi
b4e70030 16636
81ecdfbb
RW
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16638$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 16639
81ecdfbb
RW
16640 if test ! -r "$ac_source"; then
16641 as_fn_error "$ac_source: file not found" "$LINENO" 5
16642 fi
16643 rm -f "$ac_file"
bec39cab 16644
81ecdfbb
RW
16645 # Try a relative symlink, then a hard link, then a copy.
16646 case $srcdir in
16647 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16648 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16649 esac
16650 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16651 ln "$ac_source" "$ac_file" 2>/dev/null ||
16652 cp -p "$ac_source" "$ac_file" ||
16653 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16654 fi
16655 ;;
16656 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16657$as_echo "$as_me: executing $ac_file commands" >&6;}
16658 ;;
c906108c 16659 esac
b4e70030 16660
bec39cab 16661
81ecdfbb
RW
16662 case $ac_file$ac_mode in
16663 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16664 "gcore":F) chmod +x gcore ;;
81ecdfbb 16665 "default":C)
c906108c
SS
16666case x$CONFIG_HEADERS in
16667xconfig.h:config.in)
16668echo > stamp-h ;;
16669esac
bec39cab 16670 ;;
81ecdfbb 16671
bec39cab 16672 esac
81ecdfbb 16673done # for ac_tag
c906108c 16674
bec39cab 16675
81ecdfbb 16676as_fn_exit 0
bec39cab 16677_ACEOF
bec39cab
AC
16678ac_clean_files=$ac_clean_files_save
16679
81ecdfbb
RW
16680test $ac_write_fail = 0 ||
16681 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16682
bec39cab
AC
16683
16684# configure is writing to config.log, and then calls config.status.
16685# config.status does its own redirection, appending to config.log.
16686# Unfortunately, on DOS this fails, as config.log is still kept open
16687# by configure, so config.status won't be able to write to it; its
16688# output is simply discarded. So we exec the FD to /dev/null,
16689# effectively closing config.log, so it can be properly (re)opened and
16690# appended to by config.status. When coming back to configure, we
16691# need to make the FD available again.
16692if test "$no_create" != yes; then
16693 ac_cs_success=:
16694 ac_config_status_args=
16695 test "$silent" = yes &&
16696 ac_config_status_args="$ac_config_status_args --quiet"
16697 exec 5>/dev/null
16698 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16699 exec 5>>config.log
16700 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16701 # would make configure fail if this is the last instruction.
81ecdfbb 16702 $ac_cs_success || as_fn_exit $?
bec39cab 16703fi
c906108c 16704
bec39cab 16705#
81ecdfbb 16706# CONFIG_SUBDIRS section.
bec39cab 16707#
c906108c
SS
16708if test "$no_recursion" != yes; then
16709
81ecdfbb
RW
16710 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16711 # so they do not pile up.
c906108c
SS
16712 ac_sub_configure_args=
16713 ac_prev=
fdc59709
PB
16714 eval "set x $ac_configure_args"
16715 shift
16716 for ac_arg
16717 do
c906108c
SS
16718 if test -n "$ac_prev"; then
16719 ac_prev=
16720 continue
16721 fi
bec39cab 16722 case $ac_arg in
c906108c
SS
16723 -cache-file | --cache-file | --cache-fil | --cache-fi \
16724 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16725 ac_prev=cache_file ;;
16726 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16727 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16728 | --c=*)
16729 ;;
16730 --config-cache | -C)
c906108c
SS
16731 ;;
16732 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16733 ac_prev=srcdir ;;
16734 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16735 ;;
bec39cab
AC
16736 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16737 ac_prev=prefix ;;
16738 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16739 ;;
81ecdfbb
RW
16740 --disable-option-checking)
16741 ;;
fdc59709
PB
16742 *)
16743 case $ac_arg in
81ecdfbb 16744 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16745 esac
81ecdfbb 16746 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16747 esac
16748 done
16749
bec39cab
AC
16750 # Always prepend --prefix to ensure using the same prefix
16751 # in subdir configurations.
fdc59709
PB
16752 ac_arg="--prefix=$prefix"
16753 case $ac_arg in
81ecdfbb 16754 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16755 esac
81ecdfbb
RW
16756 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16757
16758 # Pass --silent
16759 if test "$silent" = yes; then
16760 ac_sub_configure_args="--silent $ac_sub_configure_args"
16761 fi
16762
16763 # Always prepend --disable-option-checking to silence warnings, since
16764 # different subdirs can have different --enable and --with options.
16765 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16766
b4e70030 16767 ac_popdir=`pwd`
bec39cab 16768 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16769
16770 # Do not complain, so a configure script can configure whichever
16771 # parts of a large source tree are present.
fdc59709 16772 test -d "$srcdir/$ac_dir" || continue
c906108c 16773
81ecdfbb
RW
16774 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16775 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16776 $as_echo "$ac_msg" >&6
16777 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16778 ac_builddir=.
16779
81ecdfbb
RW
16780case "$ac_dir" in
16781.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16782*)
16783 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16784 # A ".." for each directory in $ac_dir_suffix.
16785 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16786 case $ac_top_builddir_sub in
16787 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16788 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16789 esac ;;
16790esac
16791ac_abs_top_builddir=$ac_pwd
16792ac_abs_builddir=$ac_pwd$ac_dir_suffix
16793# for backward compatibility:
16794ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16795
16796case $srcdir in
81ecdfbb 16797 .) # We are building in place.
bec39cab 16798 ac_srcdir=.
81ecdfbb
RW
16799 ac_top_srcdir=$ac_top_builddir_sub
16800 ac_abs_top_srcdir=$ac_pwd ;;
16801 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16802 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16803 ac_top_srcdir=$srcdir
16804 ac_abs_top_srcdir=$srcdir ;;
16805 *) # Relative name.
16806 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16807 ac_top_srcdir=$ac_top_build_prefix$srcdir
16808 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16809esac
81ecdfbb 16810ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16811
c906108c 16812
fdc59709 16813 cd "$ac_dir"
c906108c
SS
16814
16815 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16816 if test -f "$ac_srcdir/configure.gnu"; then
16817 ac_sub_configure=$ac_srcdir/configure.gnu
16818 elif test -f "$ac_srcdir/configure"; then
16819 ac_sub_configure=$ac_srcdir/configure
16820 elif test -f "$ac_srcdir/configure.in"; then
16821 # This should be Cygnus configure.
16822 ac_sub_configure=$ac_aux_dir/configure
c906108c 16823 else
81ecdfbb
RW
16824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16825$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16826 ac_sub_configure=
16827 fi
16828
16829 # The recursion is here.
16830 if test -n "$ac_sub_configure"; then
c906108c 16831 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16832 case $cache_file in
16833 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16834 *) # Relative name.
16835 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16836 esac
c906108c 16837
81ecdfbb
RW
16838 { $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
16839$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16840 # The eval makes quoting arguments work.
fdc59709
PB
16841 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16842 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16843 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16844 fi
16845
fdc59709 16846 cd "$ac_popdir"
c906108c
SS
16847 done
16848fi
81ecdfbb
RW
16849if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16851$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16852fi
c906108c
SS
16853
16854
16855exit 0
This page took 3.999319 seconds and 4 git commands to generate.