remove gdb_dirent.h
[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
ac534cba
JB
661PYTHON_LIBS
662PYTHON_CPPFLAGS
81ecdfbb 663PYTHON_CFLAGS
ec685c5e 664python_prog_path
81ecdfbb
RW
665LTLIBEXPAT
666LIBEXPAT
667HAVE_LIBEXPAT
b8e0a31c 668JIT_READER_DIR
f997c383 669TARGET_PTR
39037522 670READLINE_TEXI_INCFLAG
81ecdfbb
RW
671READLINE_CFLAGS
672READLINE_DEPS
673READLINE
674MIG
675WINDRES
676DLLTOOL
c971b7fa 677AR
81ecdfbb
RW
678YFLAGS
679YACC
c971b7fa 680RANLIB
81ecdfbb 681LN_S
c971b7fa
PA
682INSTALL_DATA
683INSTALL_SCRIPT
684INSTALL_PROGRAM
685AWK
81ecdfbb
RW
686REPORT_BUGS_TEXI
687REPORT_BUGS_TO
688PKGVERSION
b292c783 689HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
690TARGET_OBS
691subdirs
692GDB_DATADIR
693DEBUGDIR
5048e516
JK
694MAKEINFO_EXTRA_FLAGS
695MAKEINFOFLAGS
696MAKEINFO
81ecdfbb
RW
697PACKAGE
698GNULIB_STDINT_H
81ecdfbb
RW
699CATOBJEXT
700GENCAT
701INSTOBJEXT
702DATADIRNAME
703CATALOGS
704POSUB
705GMSGFMT
706XGETTEXT
707INCINTL
708LIBINTL_DEP
709LIBINTL
710USE_NLS
711SET_MAKE
712GMAKE_FALSE
713GMAKE_TRUE
714MAKE
715CCDEPMODE
716DEPDIR
717am__leading_dot
718target_os
719target_vendor
720target_cpu
721target
722host_os
723host_vendor
724host_cpu
725host
726build_os
727build_vendor
728build_cpu
729build
c971b7fa
PA
730EGREP
731GREP
732CPP
81ecdfbb
RW
733OBJEXT
734EXEEXT
735ac_ct_CC
736CPPFLAGS
737LDFLAGS
738CFLAGS
739CC
740MAINT
741MAINTAINER_MODE_FALSE
742MAINTAINER_MODE_TRUE
743target_alias
744host_alias
745build_alias
746LIBS
747ECHO_T
748ECHO_N
749ECHO_C
750DEFS
751mandir
752localedir
753libdir
754psdir
755pdfdir
756dvidir
757htmldir
758infodir
759docdir
760oldincludedir
761includedir
762localstatedir
763sharedstatedir
764sysconfdir
765datadir
766datarootdir
767libexecdir
768sbindir
769bindir
770program_transform_name
771prefix
772exec_prefix
773PACKAGE_URL
774PACKAGE_BUGREPORT
775PACKAGE_STRING
776PACKAGE_VERSION
777PACKAGE_TARNAME
778PACKAGE_NAME
779PATH_SEPARATOR
780SHELL'
a4ce5b0d 781ac_subst_files='host_makefile_frag'
81ecdfbb
RW
782ac_user_opts='
783enable_option_checking
784enable_maintainer_mode
da2f07f1
JK
785enable_plugins
786enable_largefile
81ecdfbb
RW
787with_separate_debug_dir
788with_gdb_datadir
789with_relocated_sources
7349ff92 790with_auto_load_dir
bccbefd2 791with_auto_load_safe_path
81ecdfbb
RW
792enable_targets
793enable_64_bit_bfd
794enable_gdbcli
795enable_gdbmi
796enable_tui
797enable_gdbtk
05e7c244 798with_libunwind_ia64
81ecdfbb
RW
799with_curses
800enable_profiling
801with_pkgversion
802with_bugurl
b040ad30 803with_zlib
81ecdfbb 804with_libiconv_prefix
478aac75 805with_iconv_bin
81ecdfbb 806with_system_readline
b8e0a31c 807with_jit_reader_dir
81ecdfbb
RW
808with_expat
809with_gnu_ld
810enable_rpath
811with_libexpat_prefix
812with_python
a8db4212 813enable_libmcheck
81ecdfbb
RW
814with_included_regex
815with_sysroot
816with_system_gdbinit
817enable_werror
818enable_build_warnings
819enable_gdb_build_warnings
608e2dbb
TT
820with_lzma
821with_liblzma_prefix
81ecdfbb
RW
822with_tcl
823with_tk
824with_x
825enable_sim
826enable_multi_ice
496c0e1b 827enable_gdbserver
393fd4c3
YQ
828with_babeltrace
829with_libbabeltrace_prefix
81ecdfbb
RW
830'
831 ac_precious_vars='build_alias
832host_alias
833target_alias
834CC
835CFLAGS
836LDFLAGS
837LIBS
838CPPFLAGS
839CPP
f06e05e0
JK
840MAKEINFO
841MAKEINFOFLAGS
81ecdfbb
RW
842YACC
843YFLAGS
844XMKMF'
5ae98d25 845ac_subdirs_all='testsuite
81ecdfbb
RW
846gdbtk
847multi-ice
848gdbserver'
c906108c
SS
849
850# Initialize some variables set by options.
bec39cab
AC
851ac_init_help=
852ac_init_version=false
81ecdfbb
RW
853ac_unrecognized_opts=
854ac_unrecognized_sep=
c906108c
SS
855# The variables have the same names as the options, with
856# dashes changed to underlines.
bec39cab 857cache_file=/dev/null
c906108c 858exec_prefix=NONE
c906108c 859no_create=
c906108c
SS
860no_recursion=
861prefix=NONE
862program_prefix=NONE
863program_suffix=NONE
864program_transform_name=s,x,x,
865silent=
866site=
867srcdir=
c906108c
SS
868verbose=
869x_includes=NONE
870x_libraries=NONE
bec39cab
AC
871
872# Installation directory options.
873# These are left unexpanded so users can "make install exec_prefix=/foo"
874# and all the variables that are supposed to be based on exec_prefix
875# by default will actually change.
876# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 877# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
878bindir='${exec_prefix}/bin'
879sbindir='${exec_prefix}/sbin'
880libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
881datarootdir='${prefix}/share'
882datadir='${datarootdir}'
c906108c
SS
883sysconfdir='${prefix}/etc'
884sharedstatedir='${prefix}/com'
885localstatedir='${prefix}/var'
c906108c
SS
886includedir='${prefix}/include'
887oldincludedir='/usr/include'
81ecdfbb
RW
888docdir='${datarootdir}/doc/${PACKAGE}'
889infodir='${datarootdir}/info'
890htmldir='${docdir}'
891dvidir='${docdir}'
892pdfdir='${docdir}'
893psdir='${docdir}'
894libdir='${exec_prefix}/lib'
895localedir='${datarootdir}/locale'
896mandir='${datarootdir}/man'
c906108c 897
c906108c 898ac_prev=
81ecdfbb 899ac_dashdash=
c906108c
SS
900for ac_option
901do
c906108c
SS
902 # If the previous option needs an argument, assign it.
903 if test -n "$ac_prev"; then
81ecdfbb 904 eval $ac_prev=\$ac_option
c906108c
SS
905 ac_prev=
906 continue
907 fi
908
81ecdfbb
RW
909 case $ac_option in
910 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
911 *) ac_optarg=yes ;;
912 esac
c906108c
SS
913
914 # Accept the important Cygnus configure options, so we can diagnose typos.
915
81ecdfbb
RW
916 case $ac_dashdash$ac_option in
917 --)
918 ac_dashdash=yes ;;
c906108c
SS
919
920 -bindir | --bindir | --bindi | --bind | --bin | --bi)
921 ac_prev=bindir ;;
922 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 923 bindir=$ac_optarg ;;
c906108c
SS
924
925 -build | --build | --buil | --bui | --bu)
bec39cab 926 ac_prev=build_alias ;;
c906108c 927 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 928 build_alias=$ac_optarg ;;
c906108c
SS
929
930 -cache-file | --cache-file | --cache-fil | --cache-fi \
931 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
932 ac_prev=cache_file ;;
933 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
934 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
935 cache_file=$ac_optarg ;;
936
937 --config-cache | -C)
938 cache_file=config.cache ;;
c906108c 939
81ecdfbb 940 -datadir | --datadir | --datadi | --datad)
c906108c 941 ac_prev=datadir ;;
81ecdfbb 942 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 943 datadir=$ac_optarg ;;
c906108c 944
81ecdfbb
RW
945 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
946 | --dataroo | --dataro | --datar)
947 ac_prev=datarootdir ;;
948 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
949 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
950 datarootdir=$ac_optarg ;;
951
c906108c 952 -disable-* | --disable-*)
81ecdfbb 953 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 954 # Reject names that are not valid shell variable names.
81ecdfbb
RW
955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
956 as_fn_error "invalid feature name: $ac_useropt"
957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=no ;;
967
968 -docdir | --docdir | --docdi | --doc | --do)
969 ac_prev=docdir ;;
970 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
971 docdir=$ac_optarg ;;
972
973 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
974 ac_prev=dvidir ;;
975 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
976 dvidir=$ac_optarg ;;
c906108c
SS
977
978 -enable-* | --enable-*)
81ecdfbb 979 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 980 # Reject names that are not valid shell variable names.
81ecdfbb
RW
981 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
982 as_fn_error "invalid feature name: $ac_useropt"
983 ac_useropt_orig=$ac_useropt
984 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
985 case $ac_user_opts in
986 *"
987"enable_$ac_useropt"
988"*) ;;
989 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
990 ac_unrecognized_sep=', ';;
b4e70030 991 esac
81ecdfbb 992 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
993
994 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
995 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
996 | --exec | --exe | --ex)
997 ac_prev=exec_prefix ;;
998 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
999 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1000 | --exec=* | --exe=* | --ex=*)
bec39cab 1001 exec_prefix=$ac_optarg ;;
c906108c
SS
1002
1003 -gas | --gas | --ga | --g)
1004 # Obsolete; use --with-gas.
1005 with_gas=yes ;;
1006
bec39cab
AC
1007 -help | --help | --hel | --he | -h)
1008 ac_init_help=long ;;
1009 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1010 ac_init_help=recursive ;;
1011 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1012 ac_init_help=short ;;
c906108c
SS
1013
1014 -host | --host | --hos | --ho)
bec39cab 1015 ac_prev=host_alias ;;
c906108c 1016 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1017 host_alias=$ac_optarg ;;
c906108c 1018
81ecdfbb
RW
1019 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1020 ac_prev=htmldir ;;
1021 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1022 | --ht=*)
1023 htmldir=$ac_optarg ;;
1024
c906108c
SS
1025 -includedir | --includedir | --includedi | --included | --include \
1026 | --includ | --inclu | --incl | --inc)
1027 ac_prev=includedir ;;
1028 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1029 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1030 includedir=$ac_optarg ;;
c906108c
SS
1031
1032 -infodir | --infodir | --infodi | --infod | --info | --inf)
1033 ac_prev=infodir ;;
1034 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1035 infodir=$ac_optarg ;;
c906108c
SS
1036
1037 -libdir | --libdir | --libdi | --libd)
1038 ac_prev=libdir ;;
1039 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1040 libdir=$ac_optarg ;;
c906108c
SS
1041
1042 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1043 | --libexe | --libex | --libe)
1044 ac_prev=libexecdir ;;
1045 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1046 | --libexe=* | --libex=* | --libe=*)
bec39cab 1047 libexecdir=$ac_optarg ;;
c906108c 1048
81ecdfbb
RW
1049 -localedir | --localedir | --localedi | --localed | --locale)
1050 ac_prev=localedir ;;
1051 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1052 localedir=$ac_optarg ;;
1053
c906108c 1054 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1055 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1056 ac_prev=localstatedir ;;
1057 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1058 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1059 localstatedir=$ac_optarg ;;
c906108c
SS
1060
1061 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1062 ac_prev=mandir ;;
1063 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1064 mandir=$ac_optarg ;;
c906108c
SS
1065
1066 -nfp | --nfp | --nf)
1067 # Obsolete; use --without-fp.
1068 with_fp=no ;;
1069
1070 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1071 | --no-cr | --no-c | -n)
c906108c
SS
1072 no_create=yes ;;
1073
1074 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1075 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1076 no_recursion=yes ;;
1077
1078 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1079 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1080 | --oldin | --oldi | --old | --ol | --o)
1081 ac_prev=oldincludedir ;;
1082 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1083 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1084 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1085 oldincludedir=$ac_optarg ;;
c906108c
SS
1086
1087 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1088 ac_prev=prefix ;;
1089 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1090 prefix=$ac_optarg ;;
c906108c
SS
1091
1092 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1093 | --program-pre | --program-pr | --program-p)
1094 ac_prev=program_prefix ;;
1095 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1096 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1097 program_prefix=$ac_optarg ;;
c906108c
SS
1098
1099 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1100 | --program-suf | --program-su | --program-s)
1101 ac_prev=program_suffix ;;
1102 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1103 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1104 program_suffix=$ac_optarg ;;
c906108c
SS
1105
1106 -program-transform-name | --program-transform-name \
1107 | --program-transform-nam | --program-transform-na \
1108 | --program-transform-n | --program-transform- \
1109 | --program-transform | --program-transfor \
1110 | --program-transfo | --program-transf \
1111 | --program-trans | --program-tran \
1112 | --progr-tra | --program-tr | --program-t)
1113 ac_prev=program_transform_name ;;
1114 -program-transform-name=* | --program-transform-name=* \
1115 | --program-transform-nam=* | --program-transform-na=* \
1116 | --program-transform-n=* | --program-transform-=* \
1117 | --program-transform=* | --program-transfor=* \
1118 | --program-transfo=* | --program-transf=* \
1119 | --program-trans=* | --program-tran=* \
1120 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1121 program_transform_name=$ac_optarg ;;
c906108c 1122
81ecdfbb
RW
1123 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1124 ac_prev=pdfdir ;;
1125 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1126 pdfdir=$ac_optarg ;;
1127
1128 -psdir | --psdir | --psdi | --psd | --ps)
1129 ac_prev=psdir ;;
1130 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1131 psdir=$ac_optarg ;;
1132
c906108c
SS
1133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134 | -silent | --silent | --silen | --sile | --sil)
1135 silent=yes ;;
1136
1137 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1138 ac_prev=sbindir ;;
1139 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1140 | --sbi=* | --sb=*)
bec39cab 1141 sbindir=$ac_optarg ;;
c906108c
SS
1142
1143 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1144 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1145 | --sharedst | --shareds | --shared | --share | --shar \
1146 | --sha | --sh)
1147 ac_prev=sharedstatedir ;;
1148 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1149 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1150 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1151 | --sha=* | --sh=*)
bec39cab 1152 sharedstatedir=$ac_optarg ;;
c906108c
SS
1153
1154 -site | --site | --sit)
1155 ac_prev=site ;;
1156 -site=* | --site=* | --sit=*)
bec39cab 1157 site=$ac_optarg ;;
3ace7edb 1158
c906108c
SS
1159 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1160 ac_prev=srcdir ;;
1161 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1162 srcdir=$ac_optarg ;;
c906108c
SS
1163
1164 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1165 | --syscon | --sysco | --sysc | --sys | --sy)
1166 ac_prev=sysconfdir ;;
1167 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1168 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1169 sysconfdir=$ac_optarg ;;
c906108c
SS
1170
1171 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1172 ac_prev=target_alias ;;
c906108c 1173 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1174 target_alias=$ac_optarg ;;
c906108c
SS
1175
1176 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1177 verbose=yes ;;
1178
bec39cab
AC
1179 -version | --version | --versio | --versi | --vers | -V)
1180 ac_init_version=: ;;
c906108c
SS
1181
1182 -with-* | --with-*)
81ecdfbb 1183 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1184 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1185 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1186 as_fn_error "invalid package name: $ac_useropt"
1187 ac_useropt_orig=$ac_useropt
1188 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1189 case $ac_user_opts in
1190 *"
1191"with_$ac_useropt"
1192"*) ;;
1193 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1194 ac_unrecognized_sep=', ';;
b4e70030 1195 esac
81ecdfbb 1196 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1197
1198 -without-* | --without-*)
81ecdfbb 1199 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1200 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1202 as_fn_error "invalid package name: $ac_useropt"
1203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=no ;;
c906108c
SS
1213
1214 --x)
1215 # Obsolete; use --with-x.
1216 with_x=yes ;;
1217
1218 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1219 | --x-incl | --x-inc | --x-in | --x-i)
1220 ac_prev=x_includes ;;
1221 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1222 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1223 x_includes=$ac_optarg ;;
c906108c
SS
1224
1225 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1226 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1227 ac_prev=x_libraries ;;
1228 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1229 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1230 x_libraries=$ac_optarg ;;
c906108c 1231
81ecdfbb
RW
1232 -*) as_fn_error "unrecognized option: \`$ac_option'
1233Try \`$0 --help' for more information."
c906108c
SS
1234 ;;
1235
bec39cab
AC
1236 *=*)
1237 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1238 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1239 case $ac_envvar in #(
1240 '' | [0-9]* | *[!_$as_cr_alnum]* )
1241 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1242 esac
1243 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1244 export $ac_envvar ;;
1245
c906108c 1246 *)
bec39cab 1247 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1248 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1249 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1250 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
bec39cab 1251 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
1252 ;;
1253
1254 esac
1255done
1256
1257if test -n "$ac_prev"; then
bec39cab 1258 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
81ecdfbb 1259 as_fn_error "missing argument to $ac_option"
c906108c 1260fi
c906108c 1261
81ecdfbb
RW
1262if test -n "$ac_unrecognized_opts"; then
1263 case $enable_option_checking in
1264 no) ;;
1265 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1266 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1267 esac
81ecdfbb 1268fi
b4e70030 1269
81ecdfbb
RW
1270# Check all directory arguments for consistency.
1271for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1272 datadir sysconfdir sharedstatedir localstatedir includedir \
1273 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1274 libdir localedir mandir
b4e70030 1275do
81ecdfbb
RW
1276 eval ac_val=\$$ac_var
1277 # Remove trailing slashes.
1278 case $ac_val in
1279 */ )
1280 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1281 eval $ac_var=\$ac_val;;
1282 esac
1283 # Be sure to have absolute directory names.
b4e70030 1284 case $ac_val in
81ecdfbb
RW
1285 [\\/$]* | ?:[\\/]* ) continue;;
1286 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1287 esac
81ecdfbb 1288 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1289done
1290
bec39cab
AC
1291# There might be people who depend on the old broken behavior: `$host'
1292# used to hold the argument of --host etc.
1293# FIXME: To remove some day.
1294build=$build_alias
1295host=$host_alias
1296target=$target_alias
1297
1298# FIXME: To remove some day.
1299if test "x$host_alias" != x; then
1300 if test "x$build_alias" = x; then
1301 cross_compiling=maybe
81ecdfbb 1302 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
bec39cab
AC
1303 If a cross compiler is detected then cross compile mode will be used." >&2
1304 elif test "x$build_alias" != "x$host_alias"; then
1305 cross_compiling=yes
1306 fi
1307fi
c906108c 1308
bec39cab
AC
1309ac_tool_prefix=
1310test -n "$host_alias" && ac_tool_prefix=$host_alias-
1311
1312test "$silent" = yes && exec 6>/dev/null
c906108c 1313
c906108c 1314
81ecdfbb
RW
1315ac_pwd=`pwd` && test -n "$ac_pwd" &&
1316ac_ls_di=`ls -di .` &&
1317ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1318 as_fn_error "working directory cannot be determined"
1319test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1320 as_fn_error "pwd does not report name of working directory"
1321
1322
c906108c
SS
1323# Find the source files, if location was not specified.
1324if test -z "$srcdir"; then
1325 ac_srcdir_defaulted=yes
81ecdfbb
RW
1326 # Try the directory containing this script, then the parent directory.
1327 ac_confdir=`$as_dirname -- "$as_myself" ||
1328$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1329 X"$as_myself" : 'X\(//\)[^/]' \| \
1330 X"$as_myself" : 'X\(//\)$' \| \
1331 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1332$as_echo X"$as_myself" |
1333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)[^/].*/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\/\)$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\).*/{
1346 s//\1/
1347 q
1348 }
1349 s/.*/./; q'`
c906108c 1350 srcdir=$ac_confdir
81ecdfbb 1351 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1352 srcdir=..
1353 fi
1354else
1355 ac_srcdir_defaulted=no
1356fi
81ecdfbb
RW
1357if test ! -r "$srcdir/$ac_unique_file"; then
1358 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1359 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1360fi
1361ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1362ac_abs_confdir=`(
1363 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1364 pwd)`
1365# When building in place, set srcdir=.
1366if test "$ac_abs_confdir" = "$ac_pwd"; then
1367 srcdir=.
1368fi
1369# Remove unnecessary trailing slashes from srcdir.
1370# Double slashes in file names in object file debugging info
1371# mess up M-x gdb in Emacs.
1372case $srcdir in
1373*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1374esac
1375for ac_var in $ac_precious_vars; do
1376 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1377 eval ac_env_${ac_var}_value=\$${ac_var}
1378 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1380done
c906108c 1381
bec39cab
AC
1382#
1383# Report the --help message.
1384#
1385if test "$ac_init_help" = "long"; then
1386 # Omit some internal or obsolete options to make the list less imposing.
1387 # This message is too long to be a string in the A/UX 3.1 sh.
1388 cat <<_ACEOF
1389\`configure' configures this package to adapt to many kinds of systems.
1390
1391Usage: $0 [OPTION]... [VAR=VALUE]...
1392
1393To assign environment variables (e.g., CC, CFLAGS...), specify them as
1394VAR=VALUE. See below for descriptions of some of the useful variables.
1395
1396Defaults for the options are specified in brackets.
1397
1398Configuration:
1399 -h, --help display this help and exit
1400 --help=short display options specific to this package
1401 --help=recursive display the short help of all the included packages
1402 -V, --version display version information and exit
1403 -q, --quiet, --silent do not print \`checking...' messages
1404 --cache-file=FILE cache test results in FILE [disabled]
1405 -C, --config-cache alias for \`--cache-file=config.cache'
1406 -n, --no-create do not create output files
1407 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1408
bec39cab
AC
1409Installation directories:
1410 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1411 [$ac_default_prefix]
bec39cab 1412 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1413 [PREFIX]
bec39cab
AC
1414
1415By default, \`make install' will install all the files in
1416\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1417an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1418for instance \`--prefix=\$HOME'.
1419
1420For better control, use the options below.
1421
1422Fine tuning of the installation directories:
81ecdfbb
RW
1423 --bindir=DIR user executables [EPREFIX/bin]
1424 --sbindir=DIR system admin executables [EPREFIX/sbin]
1425 --libexecdir=DIR program executables [EPREFIX/libexec]
1426 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1427 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1428 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1429 --libdir=DIR object code libraries [EPREFIX/lib]
1430 --includedir=DIR C header files [PREFIX/include]
1431 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1432 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1433 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1434 --infodir=DIR info documentation [DATAROOTDIR/info]
1435 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1436 --mandir=DIR man documentation [DATAROOTDIR/man]
1437 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1438 --htmldir=DIR html documentation [DOCDIR]
1439 --dvidir=DIR dvi documentation [DOCDIR]
1440 --pdfdir=DIR pdf documentation [DOCDIR]
1441 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1442_ACEOF
1443
1444 cat <<\_ACEOF
1445
9009e1ae
MR
1446Program names:
1447 --program-prefix=PREFIX prepend PREFIX to installed program names
1448 --program-suffix=SUFFIX append SUFFIX to installed program names
1449 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1450
bec39cab
AC
1451X features:
1452 --x-includes=DIR X include files are in DIR
1453 --x-libraries=DIR X library files are in DIR
1454
1455System types:
1456 --build=BUILD configure for building on BUILD [guessed]
1457 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1458 --target=TARGET configure for building compilers for TARGET [HOST]
1459_ACEOF
1460fi
1461
1462if test -n "$ac_init_help"; then
1463
1464 cat <<\_ACEOF
1465
1466Optional Features:
81ecdfbb 1467 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1468 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1469 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
1470 --enable-maintainer-mode enable make rules and dependencies not useful
1471 (and sometimes confusing) to the casual installer
da2f07f1
JK
1472 --enable-plugins Enable support for plugins (defaults no)
1473 --disable-largefile omit support for large files
a1220294
TT
1474 --enable-targets=TARGETS
1475 alternative target configurations
c0993dbe 1476 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1477 --disable-gdbcli disable command-line interface (CLI)
1478 --disable-gdbmi disable machine-interface (MI)
1479 --enable-tui enable full-screen terminal user interface (TUI)
1480 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1481 --enable-profiling enable profiling of GDB
3841debe 1482 --disable-rpath do not hardcode runtime library paths
17ef446e 1483 --enable-libmcheck Try linking with -lmcheck if available
a1220294 1484 --enable-werror treat compile warnings as errors
32c1c914 1485 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1486 --enable-gdb-build-warnings
32c1c914 1487 enable GDB specific build-time compiler warnings if
a1220294 1488 gcc is used
32c1c914 1489 --enable-sim link gdb with simulator
bec39cab 1490 --enable-multi-ice build the multi-ice-gdb-server
496c0e1b
JB
1491 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1492 is auto)
bec39cab
AC
1493
1494Optional Packages:
1495 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1496 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1497 --with-separate-debug-dir=PATH
32c1c914 1498 look for global separate debug info in this path
62e4f60c 1499 [LIBDIR/debug]
b14b1491
TT
1500 --with-gdb-datadir=PATH look for global separate data files in this path
1501 [DATADIR/gdb]
29b0e8a2 1502 --with-relocated-sources=PATH
32c1c914 1503 automatically relocate this path for source files
7349ff92 1504 --with-auto-load-dir=PATH
aff139ff 1505 directories from which to load auto-loaded scripts
1564a261 1506 [$debugdir:$datadir/auto-load]
bccbefd2 1507 --with-auto-load-safe-path=PATH
aff139ff 1508 directories safe to hold auto-loaded files
7349ff92 1509 [--with-auto-load-dir]
bccbefd2
JK
1510 --without-auto-load-safe-path
1511 do not restrict auto-loaded files locations
05e7c244 1512 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1513 --with-curses use the curses library instead of the termcap
1514 library
c16158bc
JM
1515 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1516 --with-bugurl=URL Direct users to URL to report a bug
b040ad30 1517 --with-zlib include zlib support (auto/yes/no) default=auto
a1220294
TT
1518 --with-libiconv-prefix=DIR
1519 search for libiconv in DIR/include and DIR/lib
478aac75 1520 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1521 --with-system-readline use installed readline library
b8e0a31c
SD
1522 --with-jit-reader-dir=PATH
1523 directory to load the JIT readers from
5c39566f 1524 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1525 --with-gnu-ld assume the C compiler uses GNU ld default=no
1526 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1527 --without-libexpat-prefix don't search for libexpat in includedir and libdir
0c4a4063
DE
1528 --with-python[=PYTHON] include python support
1529 (auto/yes/no/<python-program>)
a1220294
TT
1530 --without-included-regex
1531 don't use included regex; this is the default on
1532 systems with version 2 of the GNU C library (use
1533 with caution on other system)
81ecdfbb 1534 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1535 --with-system-gdbinit=PATH
32c1c914 1536 automatically load a system-wide gdbinit file
608e2dbb
TT
1537 --with-lzma support lzma compression (auto/yes/no)
1538 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1539 --without-liblzma-prefix don't search for liblzma in includedir and libdir
5062cc19
KS
1540 --with-tcl directory containing tcl configuration (tclConfig.sh)
1541 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1542 --with-x use the X Window System
393fd4c3
YQ
1543 --with-babeltrace include babeltrace support (auto/yes/no)
1544 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1545 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
bec39cab
AC
1546
1547Some influential environment variables:
1548 CC C compiler command
1549 CFLAGS C compiler flags
1550 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1551 nonstandard directory <lib dir>
81ecdfbb
RW
1552 LIBS libraries to pass to the linker, e.g. -l<library>
1553 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1554 you have headers in a nonstandard directory <include dir>
bec39cab 1555 CPP C preprocessor
f06e05e0
JK
1556 MAKEINFO Parent configure detects if it is of sufficient version.
1557 MAKEINFOFLAGS
1558 Parameters for MAKEINFO.
81ecdfbb
RW
1559 YACC The `Yet Another C Compiler' implementation to use. Defaults to
1560 the first program found out of: `bison -y', `byacc', `yacc'.
1561 YFLAGS The list of arguments that will be passed by default to $YACC.
1562 This script will default YFLAGS to the empty string to avoid a
1563 default value of `-d' given by some make applications.
1564 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1565
1566Use these variables to override the choices made by `configure' or to help
1567it to find libraries and programs with nonstandard names/locations.
1568
81ecdfbb 1569Report bugs to the package provider.
bec39cab 1570_ACEOF
81ecdfbb 1571ac_status=$?
bec39cab
AC
1572fi
1573
1574if test "$ac_init_help" = "recursive"; then
1575 # If there are subdirs, report their specific --help.
bec39cab 1576 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1577 test -d "$ac_dir" ||
1578 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1579 continue
bec39cab
AC
1580 ac_builddir=.
1581
81ecdfbb
RW
1582case "$ac_dir" in
1583.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584*)
1585 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1586 # A ".." for each directory in $ac_dir_suffix.
1587 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1588 case $ac_top_builddir_sub in
1589 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1591 esac ;;
1592esac
1593ac_abs_top_builddir=$ac_pwd
1594ac_abs_builddir=$ac_pwd$ac_dir_suffix
1595# for backward compatibility:
1596ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1597
1598case $srcdir in
81ecdfbb 1599 .) # We are building in place.
bec39cab 1600 ac_srcdir=.
81ecdfbb
RW
1601 ac_top_srcdir=$ac_top_builddir_sub
1602 ac_abs_top_srcdir=$ac_pwd ;;
1603 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1604 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1605 ac_top_srcdir=$srcdir
1606 ac_abs_top_srcdir=$srcdir ;;
1607 *) # Relative name.
1608 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1609 ac_top_srcdir=$ac_top_build_prefix$srcdir
1610 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1611esac
81ecdfbb 1612ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1613
81ecdfbb
RW
1614 cd "$ac_dir" || { ac_status=$?; continue; }
1615 # Check for guested configure.
1616 if test -f "$ac_srcdir/configure.gnu"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1619 elif test -f "$ac_srcdir/configure"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1622 else
81ecdfbb
RW
1623 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1624 fi || ac_status=$?
1625 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1626 done
1627fi
1628
81ecdfbb 1629test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1630if $ac_init_version; then
1631 cat <<\_ACEOF
81ecdfbb
RW
1632configure
1633generated by GNU Autoconf 2.64
bec39cab 1634
81ecdfbb 1635Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
1636This configure script is free software; the Free Software Foundation
1637gives unlimited permission to copy, distribute and modify it.
1638_ACEOF
81ecdfbb 1639 exit
bec39cab 1640fi
bec39cab 1641
81ecdfbb
RW
1642## ------------------------ ##
1643## Autoconf initialization. ##
1644## ------------------------ ##
bec39cab 1645
81ecdfbb
RW
1646# ac_fn_c_try_compile LINENO
1647# --------------------------
1648# Try to compile conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_compile ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 rm -f conftest.$ac_objext
1653 if { { ac_try="$ac_compile"
1654case "(($ac_try" in
1655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656 *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660 (eval "$ac_compile") 2>conftest.err
1661 ac_status=$?
1662 if test -s conftest.err; then
1663 grep -v '^ *+' conftest.err >conftest.er1
1664 cat conftest.er1 >&5
1665 mv -f conftest.er1 conftest.err
1666 fi
1667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668 test $ac_status = 0; } && {
1669 test -z "$ac_c_werror_flag" ||
1670 test ! -s conftest.err
1671 } && test -s conftest.$ac_objext; then :
1672 ac_retval=0
1673else
1674 $as_echo "$as_me: failed program was:" >&5
1675sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1676
81ecdfbb
RW
1677 ac_retval=1
1678fi
1679 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1680 return $ac_retval
1681
1682} # ac_fn_c_try_compile
1683
1684# ac_fn_c_try_cpp LINENO
1685# ----------------------
1686# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_cpp ()
bec39cab 1688{
81ecdfbb
RW
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 if { { ac_try="$ac_cpp conftest.$ac_ext"
1691case "(($ac_try" in
1692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1693 *) ac_try_echo=$ac_try;;
1694esac
1695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1696$as_echo "$ac_try_echo"; } >&5
1697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1698 ac_status=$?
1699 if test -s conftest.err; then
1700 grep -v '^ *+' conftest.err >conftest.er1
1701 cat conftest.er1 >&5
1702 mv -f conftest.er1 conftest.err
1703 fi
1704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705 test $ac_status = 0; } >/dev/null && {
1706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1707 test ! -s conftest.err
1708 }; then :
1709 ac_retval=0
1710else
1711 $as_echo "$as_me: failed program was:" >&5
1712sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1713
81ecdfbb
RW
1714 ac_retval=1
1715fi
1716 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1717 return $ac_retval
bec39cab 1718
81ecdfbb 1719} # ac_fn_c_try_cpp
bec39cab 1720
81ecdfbb
RW
1721# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1722# -------------------------------------------------------
1723# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1724# the include files in INCLUDES and setting the cache variable VAR
1725# accordingly.
1726ac_fn_c_check_header_mongrel ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1731$as_echo_n "checking for $2... " >&6; }
1732if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1733 $as_echo_n "(cached) " >&6
1734fi
1735eval ac_res=\$$3
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1737$as_echo "$ac_res" >&6; }
1738else
1739 # Is the header compilable?
1740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1741$as_echo_n "checking $2 usability... " >&6; }
1742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1743/* end confdefs.h. */
1744$4
1745#include <$2>
1746_ACEOF
1747if ac_fn_c_try_compile "$LINENO"; then :
1748 ac_header_compiler=yes
1749else
1750 ac_header_compiler=no
1751fi
1752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1754$as_echo "$ac_header_compiler" >&6; }
bec39cab 1755
81ecdfbb
RW
1756# Is the header present?
1757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1758$as_echo_n "checking $2 presence... " >&6; }
1759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1760/* end confdefs.h. */
1761#include <$2>
1762_ACEOF
1763if ac_fn_c_try_cpp "$LINENO"; then :
1764 ac_header_preproc=yes
1765else
1766 ac_header_preproc=no
1767fi
1768rm -f conftest.err conftest.$ac_ext
1769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1770$as_echo "$ac_header_preproc" >&6; }
bec39cab 1771
81ecdfbb
RW
1772# So? What about this header?
1773case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1774 yes:no: )
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1776$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1778$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1779 ;;
1780 no:yes:* )
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1782$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1784$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1786$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1788$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1790$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1791 ;;
1792esac
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1794$as_echo_n "checking for $2... " >&6; }
1795if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1796 $as_echo_n "(cached) " >&6
1797else
1798 eval "$3=\$ac_header_compiler"
1799fi
1800eval ac_res=\$$3
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1802$as_echo "$ac_res" >&6; }
1803fi
1804 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1805
81ecdfbb 1806} # ac_fn_c_check_header_mongrel
bec39cab 1807
81ecdfbb
RW
1808# ac_fn_c_try_run LINENO
1809# ----------------------
1810# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1811# that executables *can* be run.
1812ac_fn_c_try_run ()
1813{
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 if { { ac_try="$ac_link"
1816case "(($ac_try" in
1817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1818 *) ac_try_echo=$ac_try;;
1819esac
1820eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1821$as_echo "$ac_try_echo"; } >&5
1822 (eval "$ac_link") 2>&5
1823 ac_status=$?
1824 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1825 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1826 { { case "(($ac_try" in
1827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1828 *) ac_try_echo=$ac_try;;
1829esac
1830eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1831$as_echo "$ac_try_echo"; } >&5
1832 (eval "$ac_try") 2>&5
1833 ac_status=$?
1834 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1835 test $ac_status = 0; }; }; then :
1836 ac_retval=0
1837else
1838 $as_echo "$as_me: program exited with status $ac_status" >&5
1839 $as_echo "$as_me: failed program was:" >&5
1840sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1841
81ecdfbb
RW
1842 ac_retval=$ac_status
1843fi
1844 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1845 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1846 return $ac_retval
bec39cab 1847
81ecdfbb 1848} # ac_fn_c_try_run
bec39cab 1849
81ecdfbb
RW
1850# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1851# -------------------------------------------------------
1852# Tests whether HEADER exists and can be compiled using the include files in
1853# INCLUDES, setting the cache variable VAR accordingly.
1854ac_fn_c_check_header_compile ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
1859if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1860 $as_echo_n "(cached) " >&6
1861else
1862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1863/* end confdefs.h. */
1864$4
1865#include <$2>
bec39cab 1866_ACEOF
81ecdfbb
RW
1867if ac_fn_c_try_compile "$LINENO"; then :
1868 eval "$3=yes"
1869else
1870 eval "$3=no"
1871fi
1872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873fi
1874eval ac_res=\$$3
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876$as_echo "$ac_res" >&6; }
1877 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bec39cab 1878
81ecdfbb 1879} # ac_fn_c_check_header_compile
bec39cab 1880
81ecdfbb
RW
1881# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1882# --------------------------------------------
1883# Tries to find the compile-time value of EXPR in a program that includes
1884# INCLUDES, setting VAR accordingly. Returns whether the value could be
1885# computed
1886ac_fn_c_compute_int ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 if test "$cross_compiling" = yes; then
1890 # Depending upon the size, compute the lo and hi bounds.
1891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894int
1895main ()
1896{
1897static int test_array [1 - 2 * !(($2) >= 0)];
1898test_array [0] = 0
bec39cab 1899
81ecdfbb
RW
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905 ac_lo=0 ac_mid=0
1906 while :; do
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910int
1911main ()
1912{
1913static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1914test_array [0] = 0
bec39cab 1915
81ecdfbb
RW
1916 ;
1917 return 0;
1918}
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 ac_hi=$ac_mid; break
1922else
1923 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1924 if test $ac_lo -le $ac_mid; then
1925 ac_lo= ac_hi=
1926 break
1927 fi
1928 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 1929fi
81ecdfbb
RW
1930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1931 done
c906108c 1932else
81ecdfbb
RW
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939static int test_array [1 - 2 * !(($2) < 0)];
1940test_array [0] = 0
bec39cab 1941
81ecdfbb
RW
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 ac_hi=-1 ac_mid=-1
1948 while :; do
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1956test_array [0] = 0
bec39cab 1957
81ecdfbb
RW
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963 ac_lo=$ac_mid; break
1964else
1965 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1966 if test $ac_mid -le $ac_hi; then
1967 ac_lo= ac_hi=
1968 break
1969 fi
1970 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973 done
1974else
1975 ac_lo= ac_hi=
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980# Binary search between lo and hi bounds.
1981while test "x$ac_lo" != "x$ac_hi"; do
1982 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$4
1986int
1987main ()
1988{
1989static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1990test_array [0] = 0
bec39cab 1991
81ecdfbb
RW
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997 ac_hi=$ac_mid
1998else
1999 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2000fi
2001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2002done
2003case $ac_lo in #((
2004?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2005'') ac_retval=1 ;;
2006esac
2007 else
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011static long int longval () { return $2; }
2012static unsigned long int ulongval () { return $2; }
2013#include <stdio.h>
2014#include <stdlib.h>
2015int
2016main ()
2017{
bec39cab 2018
81ecdfbb
RW
2019 FILE *f = fopen ("conftest.val", "w");
2020 if (! f)
2021 return 1;
2022 if (($2) < 0)
2023 {
2024 long int i = longval ();
2025 if (i != ($2))
2026 return 1;
2027 fprintf (f, "%ld", i);
2028 }
2029 else
2030 {
2031 unsigned long int i = ulongval ();
2032 if (i != ($2))
2033 return 1;
2034 fprintf (f, "%lu", i);
2035 }
2036 /* Do not output a trailing newline, as this causes \r\n confusion
2037 on some platforms. */
2038 return ferror (f) || fclose (f) != 0;
bec39cab 2039
81ecdfbb
RW
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_run "$LINENO"; then :
2045 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2046else
2047 ac_retval=1
2048fi
2049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2050 conftest.$ac_objext conftest.beam conftest.$ac_ext
2051rm -f conftest.val
bec39cab 2052
81ecdfbb
RW
2053 fi
2054 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2055 return $ac_retval
bec39cab 2056
81ecdfbb 2057} # ac_fn_c_compute_int
bec39cab 2058
c971b7fa
PA
2059# ac_fn_c_try_link LINENO
2060# -----------------------
2061# Try to link conftest.$ac_ext, and return whether this succeeded.
2062ac_fn_c_try_link ()
2063{
2064 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065 rm -f conftest.$ac_objext conftest$ac_exeext
2066 if { { ac_try="$ac_link"
2067case "(($ac_try" in
2068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2069 *) ac_try_echo=$ac_try;;
2070esac
2071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2072$as_echo "$ac_try_echo"; } >&5
2073 (eval "$ac_link") 2>conftest.err
2074 ac_status=$?
2075 if test -s conftest.err; then
2076 grep -v '^ *+' conftest.err >conftest.er1
2077 cat conftest.er1 >&5
2078 mv -f conftest.er1 conftest.err
2079 fi
2080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2081 test $ac_status = 0; } && {
2082 test -z "$ac_c_werror_flag" ||
2083 test ! -s conftest.err
2084 } && test -s conftest$ac_exeext && {
2085 test "$cross_compiling" = yes ||
2086 $as_test_x conftest$ac_exeext
2087 }; then :
2088 ac_retval=0
2089else
2090 $as_echo "$as_me: failed program was:" >&5
2091sed 's/^/| /' conftest.$ac_ext >&5
2092
2093 ac_retval=1
2094fi
2095 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2096 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2097 # interfere with the next link command; also delete a directory that is
2098 # left behind by Apple's compiler. We do this before executing the actions.
2099 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2100 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2101 return $ac_retval
2102
2103} # ac_fn_c_try_link
2104
55a8c076
YQ
2105# ac_fn_c_check_func LINENO FUNC VAR
2106# ----------------------------------
2107# Tests whether FUNC exists, setting the cache variable VAR accordingly
2108ac_fn_c_check_func ()
81ecdfbb
RW
2109{
2110 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2112$as_echo_n "checking for $2... " >&6; }
2113if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2114 $as_echo_n "(cached) " >&6
2115else
81ecdfbb
RW
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
55a8c076
YQ
2118/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2119 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2120#define $2 innocuous_$2
2121
2122/* System header to define __stub macros and hopefully few prototypes,
2123 which can conflict with char $2 (); below.
2124 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2125 <limits.h> exists even on freestanding compilers. */
2126
2127#ifdef __STDC__
2128# include <limits.h>
2129#else
2130# include <assert.h>
2131#endif
2132
2133#undef $2
2134
2135/* Override any GCC internal prototype to avoid an error.
2136 Use char because int might match the return type of a GCC
2137 builtin and then its argument prototype would still apply. */
2138#ifdef __cplusplus
2139extern "C"
2140#endif
2141char $2 ();
2142/* The GNU C library defines this for functions which it implements
2143 to always fail with ENOSYS. Some functions are actually named
2144 something starting with __ and the normal name is an alias. */
2145#if defined __stub_$2 || defined __stub___$2
2146choke me
2147#endif
2148
2149int
2150main ()
2151{
2152return $2 ();
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_link "$LINENO"; then :
2158 eval "$3=yes"
2159else
2160 eval "$3=no"
2161fi
2162rm -f core conftest.err conftest.$ac_objext \
2163 conftest$ac_exeext conftest.$ac_ext
2164fi
2165eval ac_res=\$$3
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2167$as_echo "$ac_res" >&6; }
2168 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2169
2170} # ac_fn_c_check_func
2171
770d76d7
PA
2172# ac_fn_c_check_decl LINENO SYMBOL VAR
2173# ------------------------------------
2174# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2175ac_fn_c_check_decl ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 as_decl_name=`echo $2|sed 's/ *(.*//'`
2179 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2181$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2182if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2183 $as_echo_n "(cached) " >&6
2184else
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187$4
2188int
2189main ()
2190{
2191#ifndef $as_decl_name
2192#ifdef __cplusplus
2193 (void) $as_decl_use;
2194#else
2195 (void) $as_decl_name;
2196#endif
2197#endif
2198
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_compile "$LINENO"; then :
2204 eval "$3=yes"
2205else
2206 eval "$3=no"
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209fi
2210eval ac_res=\$$3
2211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2212$as_echo "$ac_res" >&6; }
2213 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2214
2215} # ac_fn_c_check_decl
2216
55a8c076
YQ
2217# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2218# ----------------------------------------------------
2219# Tries to find if the field MEMBER exists in type AGGR, after including
2220# INCLUDES, setting cache variable VAR accordingly.
2221ac_fn_c_check_member ()
2222{
2223 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2225$as_echo_n "checking for $2.$3... " >&6; }
2226if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2227 $as_echo_n "(cached) " >&6
2228else
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230/* end confdefs.h. */
2231$5
2232int
2233main ()
2234{
2235static $2 ac_aggr;
2236if (ac_aggr.$3)
2237return 0;
2238 ;
2239 return 0;
2240}
2241_ACEOF
2242if ac_fn_c_try_compile "$LINENO"; then :
2243 eval "$4=yes"
2244else
2245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h. */
2247$5
2248int
2249main ()
2250{
2251static $2 ac_aggr;
2252if (sizeof ac_aggr.$3)
2253return 0;
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$4=yes"
2260else
2261 eval "$4=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266fi
2267eval ac_res=\$$4
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2269$as_echo "$ac_res" >&6; }
2270 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2271
2272} # ac_fn_c_check_member
2273
2274# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2275# -------------------------------------------
2276# Tests whether TYPE exists after having included INCLUDES, setting cache
2277# variable VAR accordingly.
2278ac_fn_c_check_type ()
2279{
2280 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2282$as_echo_n "checking for $2... " >&6; }
2283if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2284 $as_echo_n "(cached) " >&6
2285else
2286 eval "$3=no"
2287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h. */
2289$4
2290int
2291main ()
2292{
2293if (sizeof ($2))
2294 return 0;
2295 ;
2296 return 0;
2297}
2298_ACEOF
2299if ac_fn_c_try_compile "$LINENO"; then :
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$4
2303int
2304main ()
2305{
2306if (sizeof (($2)))
2307 return 0;
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_compile "$LINENO"; then :
d5af19ba 2313
81ecdfbb
RW
2314else
2315 eval "$3=yes"
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
d5af19ba 2325
81ecdfbb
RW
2326} # ac_fn_c_check_type
2327cat >config.log <<_ACEOF
2328This file contains any messages produced by compilers while
2329running configure, to aid debugging if configure makes a mistake.
d5af19ba 2330
81ecdfbb
RW
2331It was created by $as_me, which was
2332generated by GNU Autoconf 2.64. Invocation command line was
b4e70030 2333
81ecdfbb 2334 $ $0 $@
413ccac7 2335
81ecdfbb
RW
2336_ACEOF
2337exec 5>>config.log
2338{
2339cat <<_ASUNAME
2340## --------- ##
2341## Platform. ##
2342## --------- ##
413ccac7 2343
81ecdfbb
RW
2344hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2345uname -m = `(uname -m) 2>/dev/null || echo unknown`
2346uname -r = `(uname -r) 2>/dev/null || echo unknown`
2347uname -s = `(uname -s) 2>/dev/null || echo unknown`
2348uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2349
81ecdfbb
RW
2350/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2351/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2352
81ecdfbb
RW
2353/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2354/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2355/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2356/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2357/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2358/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2359/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2360
81ecdfbb 2361_ASUNAME
bec39cab 2362
bec39cab
AC
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2368 $as_echo "PATH: $as_dir"
2369 done
2370IFS=$as_save_IFS
bec39cab 2371
81ecdfbb 2372} >&5
bec39cab 2373
81ecdfbb 2374cat >&5 <<_ACEOF
bec39cab 2375
bec39cab 2376
81ecdfbb
RW
2377## ----------- ##
2378## Core tests. ##
2379## ----------- ##
2380
2381_ACEOF
2382
2383
2384# Keep a trace of the command line.
2385# Strip out --no-create and --no-recursion so they do not pile up.
2386# Strip out --silent because we don't want to record it for future runs.
2387# Also quote any args containing shell meta-characters.
2388# Make two passes to allow for proper duplicate-argument suppression.
2389ac_configure_args=
2390ac_configure_args0=
2391ac_configure_args1=
2392ac_must_keep_next=false
2393for ac_pass in 1 2
2394do
2395 for ac_arg
2396 do
2397 case $ac_arg in
2398 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2399 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2400 | -silent | --silent | --silen | --sile | --sil)
2401 continue ;;
2402 *\'*)
2403 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2404 esac
2405 case $ac_pass in
2406 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2407 2)
2408 as_fn_append ac_configure_args1 " '$ac_arg'"
2409 if test $ac_must_keep_next = true; then
2410 ac_must_keep_next=false # Got value, back to normal.
2411 else
2412 case $ac_arg in
2413 *=* | --config-cache | -C | -disable-* | --disable-* \
2414 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2415 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2416 | -with-* | --with-* | -without-* | --without-* | --x)
2417 case "$ac_configure_args0 " in
2418 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2419 esac
2420 ;;
2421 -* ) ac_must_keep_next=true ;;
2422 esac
2423 fi
2424 as_fn_append ac_configure_args " '$ac_arg'"
2425 ;;
2426 esac
2427 done
2428done
2429{ ac_configure_args0=; unset ac_configure_args0;}
2430{ ac_configure_args1=; unset ac_configure_args1;}
2431
2432# When interrupted or exit'd, cleanup temporary files, and complete
2433# config.log. We remove comments because anyway the quotes in there
2434# would cause problems or look ugly.
2435# WARNING: Use '\'' to represent an apostrophe within the trap.
2436# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2437trap 'exit_status=$?
2438 # Save into config.log some information that might help in debugging.
2439 {
2440 echo
2441
2442 cat <<\_ASBOX
2443## ---------------- ##
2444## Cache variables. ##
2445## ---------------- ##
2446_ASBOX
2447 echo
2448 # The following way of writing the cache mishandles newlines in values,
2449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
2455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
2460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
2462 esac ;;
2463 esac
2464 done
2465 (set) 2>&1 |
2466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
2468 sed -n \
2469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
2472 *)
2473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2474 ;;
2475 esac |
2476 sort
2477)
2478 echo
2479
2480 cat <<\_ASBOX
2481## ----------------- ##
2482## Output variables. ##
2483## ----------------- ##
2484_ASBOX
2485 echo
2486 for ac_var in $ac_subst_vars
2487 do
2488 eval ac_val=\$$ac_var
2489 case $ac_val in
2490 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2491 esac
2492 $as_echo "$ac_var='\''$ac_val'\''"
2493 done | sort
2494 echo
2495
2496 if test -n "$ac_subst_files"; then
2497 cat <<\_ASBOX
2498## ------------------- ##
2499## File substitutions. ##
2500## ------------------- ##
2501_ASBOX
2502 echo
2503 for ac_var in $ac_subst_files
2504 do
2505 eval ac_val=\$$ac_var
2506 case $ac_val in
2507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2508 esac
2509 $as_echo "$ac_var='\''$ac_val'\''"
2510 done | sort
2511 echo
2512 fi
2513
2514 if test -s confdefs.h; then
2515 cat <<\_ASBOX
2516## ----------- ##
2517## confdefs.h. ##
2518## ----------- ##
2519_ASBOX
2520 echo
2521 cat confdefs.h
2522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
2525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
2527 } >&5
2528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2530 exit $exit_status
2531' 0
2532for ac_signal in 1 2 13 15; do
2533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
2538rm -f -r conftest* confdefs.h
2539
2540$as_echo "/* confdefs.h */" > confdefs.h
2541
2542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
2552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
2560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
2564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
2568
2569# Let the site file select an alternate cache file if it wants to.
2570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
2573if test -n "$CONFIG_SITE"; then
2574 ac_site_file1=$CONFIG_SITE
2575elif test "x$prefix" != xNONE; then
2576 ac_site_file1=$prefix/share/config.site
2577 ac_site_file2=$prefix/etc/config.site
2578else
2579 ac_site_file1=$ac_default_prefix/share/config.site
2580 ac_site_file2=$ac_default_prefix/etc/config.site
2581fi
2582for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2583do
2584 test "x$ac_site_file" = xNONE && continue
2585 if test -r "$ac_site_file"; then
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2587$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2588 sed 's/^/| /' "$ac_site_file" >&5
2589 . "$ac_site_file"
2590 fi
2591done
2592
2593if test -r "$cache_file"; then
2594 # Some versions of bash will fail to source /dev/null (special
2595 # files actually), so we avoid doing that.
2596 if test -f "$cache_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2598$as_echo "$as_me: loading cache $cache_file" >&6;}
2599 case $cache_file in
2600 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2601 *) . "./$cache_file";;
2602 esac
2603 fi
2604else
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2606$as_echo "$as_me: creating cache $cache_file" >&6;}
2607 >$cache_file
bec39cab
AC
2608fi
2609
81ecdfbb
RW
2610# Check that the precious variables saved in the cache have kept the same
2611# value.
2612ac_cache_corrupted=false
2613for ac_var in $ac_precious_vars; do
2614 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2615 eval ac_new_set=\$ac_env_${ac_var}_set
2616 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2617 eval ac_new_val=\$ac_env_${ac_var}_value
2618 case $ac_old_set,$ac_new_set in
2619 set,)
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2621$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2622 ac_cache_corrupted=: ;;
2623 ,set)
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2625$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2626 ac_cache_corrupted=: ;;
2627 ,);;
2628 *)
2629 if test "x$ac_old_val" != "x$ac_new_val"; then
2630 # differences in whitespace do not lead to failure.
2631 ac_old_val_w=`echo x $ac_old_val`
2632 ac_new_val_w=`echo x $ac_new_val`
2633 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2635$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2636 ac_cache_corrupted=:
2637 else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2639$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2640 eval $ac_var=\$ac_old_val
2641 fi
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2643$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2645$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2646 fi;;
2647 esac
2648 # Pass precious variables to config.status.
2649 if test "$ac_new_set" = set; then
2650 case $ac_new_val in
2651 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2652 *) ac_arg=$ac_var=$ac_new_val ;;
2653 esac
2654 case " $ac_configure_args " in
2655 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2656 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2657 esac
2658 fi
2659done
2660if $ac_cache_corrupted; then
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2664$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2665 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2666fi
2667## -------------------- ##
2668## Main body of script. ##
2669## -------------------- ##
2670
2671ac_ext=c
2672ac_cpp='$CPP $CPPFLAGS'
2673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
2676
2677
2678
2679
2680
2681ac_config_headers="$ac_config_headers config.h:config.in"
2682
2683
2684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2685$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2686 # Check whether --enable-maintainer-mode was given.
2687if test "${enable_maintainer_mode+set}" = set; then :
2688 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2689else
2690 USE_MAINTAINER_MODE=no
2691fi
2692
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2694$as_echo "$USE_MAINTAINER_MODE" >&6; }
2695 if test $USE_MAINTAINER_MODE = yes; then
2696 MAINTAINER_MODE_TRUE=
2697 MAINTAINER_MODE_FALSE='#'
2698else
2699 MAINTAINER_MODE_TRUE='#'
2700 MAINTAINER_MODE_FALSE=
2701fi
2702
2703 MAINT=$MAINTAINER_MODE_TRUE
2704
2705
2706
17ef446e
PA
2707# Set the 'development' global.
2708. $srcdir/development.sh
f5f1cdb6 2709
81ecdfbb
RW
2710ac_ext=c
2711ac_cpp='$CPP $CPPFLAGS'
2712ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2713ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2714ac_compiler_gnu=$ac_cv_c_compiler_gnu
2715if test -n "$ac_tool_prefix"; then
2716 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2717set dummy ${ac_tool_prefix}gcc; ac_word=$2
2718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2719$as_echo_n "checking for $ac_word... " >&6; }
2720if test "${ac_cv_prog_CC+set}" = set; then :
2721 $as_echo_n "(cached) " >&6
c906108c
SS
2722else
2723 if test -n "$CC"; then
2724 ac_cv_prog_CC="$CC" # Let the user override the test.
2725else
bec39cab
AC
2726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2727for as_dir in $PATH
2728do
2729 IFS=$as_save_IFS
2730 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2731 for ac_exec_ext in '' $ac_executable_extensions; do
2732 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2733 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2735 break 2
2736 fi
2737done
81ecdfbb
RW
2738 done
2739IFS=$as_save_IFS
bec39cab 2740
c906108c
SS
2741fi
2742fi
bec39cab 2743CC=$ac_cv_prog_CC
c906108c 2744if test -n "$CC"; then
81ecdfbb
RW
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2746$as_echo "$CC" >&6; }
c906108c 2747else
81ecdfbb
RW
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
c906108c
SS
2750fi
2751
81ecdfbb 2752
b4e70030
JB
2753fi
2754if test -z "$ac_cv_prog_CC"; then
2755 ac_ct_CC=$CC
81ecdfbb
RW
2756 # Extract the first word of "gcc", so it can be a program name with args.
2757set dummy gcc; ac_word=$2
2758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2759$as_echo_n "checking for $ac_word... " >&6; }
2760if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2761 $as_echo_n "(cached) " >&6
b4e70030
JB
2762else
2763 if test -n "$ac_ct_CC"; then
2764 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2765else
2766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2767for as_dir in $PATH
2768do
2769 IFS=$as_save_IFS
2770 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2771 for ac_exec_ext in '' $ac_executable_extensions; do
2772 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2773 ac_cv_prog_ac_ct_CC="gcc"
2774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 2775 break 2
4e8d927d 2776 fi
b4e70030 2777done
81ecdfbb
RW
2778 done
2779IFS=$as_save_IFS
b4e70030
JB
2780
2781fi
2782fi
2783ac_ct_CC=$ac_cv_prog_ac_ct_CC
2784if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2786$as_echo "$ac_ct_CC" >&6; }
b4e70030 2787else
81ecdfbb
RW
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2789$as_echo "no" >&6; }
b4e70030
JB
2790fi
2791
81ecdfbb
RW
2792 if test "x$ac_ct_CC" = x; then
2793 CC=""
2794 else
2795 case $cross_compiling:$ac_tool_warned in
2796yes:)
2797{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2798$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2799ac_tool_warned=yes ;;
2800esac
2801 CC=$ac_ct_CC
2802 fi
b4e70030
JB
2803else
2804 CC="$ac_cv_prog_CC"
2805fi
2806
c906108c 2807if test -z "$CC"; then
81ecdfbb
RW
2808 if test -n "$ac_tool_prefix"; then
2809 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2810set dummy ${ac_tool_prefix}cc; ac_word=$2
2811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2812$as_echo_n "checking for $ac_word... " >&6; }
2813if test "${ac_cv_prog_CC+set}" = set; then :
2814 $as_echo_n "(cached) " >&6
c906108c
SS
2815else
2816 if test -n "$CC"; then
2817 ac_cv_prog_CC="$CC" # Let the user override the test.
2818else
bec39cab
AC
2819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820for as_dir in $PATH
2821do
2822 IFS=$as_save_IFS
2823 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2824 for ac_exec_ext in '' $ac_executable_extensions; do
2825 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2826 ac_cv_prog_CC="${ac_tool_prefix}cc"
2827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2828 break 2
2829 fi
2830done
81ecdfbb
RW
2831 done
2832IFS=$as_save_IFS
2833
2834fi
2835fi
2836CC=$ac_cv_prog_CC
2837if test -n "$CC"; then
2838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2839$as_echo "$CC" >&6; }
2840else
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2842$as_echo "no" >&6; }
2843fi
2844
2845
2846 fi
2847fi
2848if test -z "$CC"; then
2849 # Extract the first word of "cc", so it can be a program name with args.
2850set dummy cc; ac_word=$2
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2852$as_echo_n "checking for $ac_word... " >&6; }
2853if test "${ac_cv_prog_CC+set}" = set; then :
2854 $as_echo_n "(cached) " >&6
2855else
2856 if test -n "$CC"; then
2857 ac_cv_prog_CC="$CC" # Let the user override the test.
2858else
2859 ac_prog_rejected=no
2860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2861for as_dir in $PATH
2862do
2863 IFS=$as_save_IFS
2864 test -z "$as_dir" && as_dir=.
2865 for ac_exec_ext in '' $ac_executable_extensions; do
2866 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2867 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2868 ac_prog_rejected=yes
2869 continue
2870 fi
2871 ac_cv_prog_CC="cc"
2872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2873 break 2
2874 fi
2875done
2876 done
2877IFS=$as_save_IFS
bec39cab 2878
c906108c
SS
2879if test $ac_prog_rejected = yes; then
2880 # We found a bogon in the path, so make sure we never use it.
2881 set dummy $ac_cv_prog_CC
2882 shift
bec39cab 2883 if test $# != 0; then
c906108c
SS
2884 # We chose a different compiler from the bogus one.
2885 # However, it has the same basename, so the bogon will be chosen
2886 # first if we set CC to just the basename; use the full file name.
2887 shift
bec39cab 2888 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
2889 fi
2890fi
2891fi
2892fi
bec39cab 2893CC=$ac_cv_prog_CC
c906108c 2894if test -n "$CC"; then
81ecdfbb
RW
2895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2896$as_echo "$CC" >&6; }
c906108c 2897else
81ecdfbb
RW
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2899$as_echo "no" >&6; }
c906108c
SS
2900fi
2901
81ecdfbb 2902
bec39cab
AC
2903fi
2904if test -z "$CC"; then
2905 if test -n "$ac_tool_prefix"; then
81ecdfbb 2906 for ac_prog in cl.exe
bec39cab
AC
2907 do
2908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
2910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2911$as_echo_n "checking for $ac_word... " >&6; }
2912if test "${ac_cv_prog_CC+set}" = set; then :
2913 $as_echo_n "(cached) " >&6
c906108c
SS
2914else
2915 if test -n "$CC"; then
2916 ac_cv_prog_CC="$CC" # Let the user override the test.
2917else
bec39cab
AC
2918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2919for as_dir in $PATH
2920do
2921 IFS=$as_save_IFS
2922 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2923 for ac_exec_ext in '' $ac_executable_extensions; do
2924 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2925 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 2926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
2927 break 2
2928 fi
2929done
81ecdfbb
RW
2930 done
2931IFS=$as_save_IFS
bec39cab 2932
c906108c
SS
2933fi
2934fi
bec39cab 2935CC=$ac_cv_prog_CC
c906108c 2936if test -n "$CC"; then
81ecdfbb
RW
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2938$as_echo "$CC" >&6; }
c906108c 2939else
81ecdfbb
RW
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2941$as_echo "no" >&6; }
c906108c 2942fi
bec39cab 2943
81ecdfbb 2944
bec39cab
AC
2945 test -n "$CC" && break
2946 done
2947fi
2948if test -z "$CC"; then
2949 ac_ct_CC=$CC
81ecdfbb 2950 for ac_prog in cl.exe
bec39cab
AC
2951do
2952 # Extract the first word of "$ac_prog", so it can be a program name with args.
2953set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
2954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2955$as_echo_n "checking for $ac_word... " >&6; }
2956if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2957 $as_echo_n "(cached) " >&6
bec39cab
AC
2958else
2959 if test -n "$ac_ct_CC"; then
2960 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2961else
2962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2963for as_dir in $PATH
2964do
2965 IFS=$as_save_IFS
2966 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2967 for ac_exec_ext in '' $ac_executable_extensions; do
2968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 2969 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 2970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 2971 break 2
c906108c 2972 fi
bec39cab 2973done
81ecdfbb
RW
2974 done
2975IFS=$as_save_IFS
bec39cab
AC
2976
2977fi
2978fi
2979ac_ct_CC=$ac_cv_prog_ac_ct_CC
2980if test -n "$ac_ct_CC"; then
81ecdfbb
RW
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2982$as_echo "$ac_ct_CC" >&6; }
bec39cab 2983else
81ecdfbb
RW
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2985$as_echo "no" >&6; }
c906108c
SS
2986fi
2987
81ecdfbb 2988
bec39cab
AC
2989 test -n "$ac_ct_CC" && break
2990done
c906108c 2991
81ecdfbb
RW
2992 if test "x$ac_ct_CC" = x; then
2993 CC=""
2994 else
2995 case $cross_compiling:$ac_tool_warned in
2996yes:)
2997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2999ac_tool_warned=yes ;;
3000esac
3001 CC=$ac_ct_CC
3002 fi
bec39cab
AC
3003fi
3004
3005fi
3006
3007
81ecdfbb
RW
3008test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3010as_fn_error "no acceptable C compiler found in \$PATH
3011See \`config.log' for more details." "$LINENO" 5; }
bec39cab
AC
3012
3013# Provide some information about the compiler.
81ecdfbb
RW
3014$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3015set X $ac_compile
3016ac_compiler=$2
3017for ac_option in --version -v -V -qversion; do
3018 { { ac_try="$ac_compiler $ac_option >&5"
3019case "(($ac_try" in
3020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3021 *) ac_try_echo=$ac_try;;
3022esac
3023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3024$as_echo "$ac_try_echo"; } >&5
3025 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3026 ac_status=$?
81ecdfbb
RW
3027 if test -s conftest.err; then
3028 sed '10a\
3029... rest of stderr output deleted ...
3030 10q' conftest.err >conftest.er1
3031 cat conftest.er1 >&5
3032 rm -f conftest.er1 conftest.err
3033 fi
3034 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3035 test $ac_status = 0; }
3036done
bec39cab 3037
81ecdfbb 3038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3039/* end confdefs.h. */
3040
3041int
3042main ()
3043{
3044
3045 ;
3046 return 0;
3047}
3048_ACEOF
3049ac_clean_files_save=$ac_clean_files
81ecdfbb 3050ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
bec39cab
AC
3051# Try to create an executable without -o first, disregard a.out.
3052# It will help us diagnose broken compilers, and finding out an intuition
3053# of exeext.
81ecdfbb
RW
3054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3055$as_echo_n "checking for C compiler default output file name... " >&6; }
3056ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3057
3058# The possible output files:
3059ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3060
3061ac_rmfiles=
3062for ac_file in $ac_files
3063do
3064 case $ac_file in
3065 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3066 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3067 esac
3068done
3069rm -f $ac_rmfiles
3070
3071if { { ac_try="$ac_link_default"
3072case "(($ac_try" in
3073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3074 *) ac_try_echo=$ac_try;;
3075esac
3076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3077$as_echo "$ac_try_echo"; } >&5
3078 (eval "$ac_link_default") 2>&5
3079 ac_status=$?
3080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3081 test $ac_status = 0; }; then :
3082 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3083# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3084# in a Makefile. We should not override ac_cv_exeext if it was cached,
3085# so that the user can short-circuit this test for compilers unknown to
3086# Autoconf.
3087for ac_file in $ac_files ''
bec39cab
AC
3088do
3089 test -f "$ac_file" || continue
3090 case $ac_file in
81ecdfbb 3091 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3092 ;;
3093 [ab].out )
3094 # We found the default executable, but exeext='' is most
3095 # certainly right.
3096 break;;
3097 *.* )
81ecdfbb
RW
3098 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3099 then :; else
3100 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3101 fi
3102 # We set ac_cv_exeext here because the later test for it is not
3103 # safe: cross compilers may not add the suffix if given an `-o'
3104 # argument, so we may need to know it at that point already.
3105 # Even if this section looks crufty: it has the advantage of
3106 # actually working.
b4e70030
JB
3107 break;;
3108 * )
3109 break;;
bec39cab
AC
3110 esac
3111done
81ecdfbb
RW
3112test "$ac_cv_exeext" = no && ac_cv_exeext=
3113
bec39cab 3114else
81ecdfbb
RW
3115 ac_file=''
3116fi
3117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3118$as_echo "$ac_file" >&6; }
3119if test -z "$ac_file"; then :
3120 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3121sed 's/^/| /' conftest.$ac_ext >&5
3122
81ecdfbb
RW
3123{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3125{ as_fn_set_status 77
3126as_fn_error "C compiler cannot create executables
3127See \`config.log' for more details." "$LINENO" 5; }; }
bec39cab 3128fi
b4e70030 3129ac_exeext=$ac_cv_exeext
b4e70030 3130
81ecdfbb 3131# Check that the compiler produces executables we can run. If not, either
bec39cab 3132# the compiler is broken, or we cross compile.
81ecdfbb
RW
3133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3134$as_echo_n "checking whether the C compiler works... " >&6; }
bec39cab
AC
3135# If not cross compiling, check that we can run a simple program.
3136if test "$cross_compiling" != yes; then
3137 if { ac_try='./$ac_file'
81ecdfbb
RW
3138 { { case "(($ac_try" in
3139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3140 *) ac_try_echo=$ac_try;;
3141esac
3142eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3143$as_echo "$ac_try_echo"; } >&5
3144 (eval "$ac_try") 2>&5
bec39cab 3145 ac_status=$?
81ecdfbb
RW
3146 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3147 test $ac_status = 0; }; }; then
bec39cab 3148 cross_compiling=no
c906108c 3149 else
bec39cab
AC
3150 if test "$cross_compiling" = maybe; then
3151 cross_compiling=yes
3152 else
81ecdfbb
RW
3153 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3155as_fn_error "cannot run C compiled programs.
bec39cab 3156If you meant to cross compile, use \`--host'.
81ecdfbb 3157See \`config.log' for more details." "$LINENO" 5; }
bec39cab 3158 fi
c906108c 3159 fi
bec39cab 3160fi
81ecdfbb
RW
3161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3162$as_echo "yes" >&6; }
bec39cab 3163
81ecdfbb 3164rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
b4e70030 3165ac_clean_files=$ac_clean_files_save
81ecdfbb 3166# Check that the compiler produces executables we can run. If not, either
b4e70030 3167# the compiler is broken, or we cross compile.
81ecdfbb
RW
3168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3169$as_echo_n "checking whether we are cross compiling... " >&6; }
3170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3171$as_echo "$cross_compiling" >&6; }
3172
3173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3174$as_echo_n "checking for suffix of executables... " >&6; }
3175if { { ac_try="$ac_link"
3176case "(($ac_try" in
3177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3178 *) ac_try_echo=$ac_try;;
3179esac
3180eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3181$as_echo "$ac_try_echo"; } >&5
3182 (eval "$ac_link") 2>&5
bec39cab 3183 ac_status=$?
81ecdfbb
RW
3184 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3185 test $ac_status = 0; }; then :
b4e70030
JB
3186 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3187# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3188# work properly (i.e., refer to `conftest.exe'), while it won't with
3189# `rm'.
3190for ac_file in conftest.exe conftest conftest.*; do
3191 test -f "$ac_file" || continue
3192 case $ac_file in
81ecdfbb 3193 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3194 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3195 break;;
3196 * ) break;;
3197 esac
3198done
c906108c 3199else
81ecdfbb
RW
3200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3202as_fn_error "cannot compute suffix of executables: cannot compile and link
3203See \`config.log' for more details." "$LINENO" 5; }
c906108c 3204fi
b4e70030 3205rm -f conftest$ac_cv_exeext
81ecdfbb
RW
3206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3207$as_echo "$ac_cv_exeext" >&6; }
c906108c 3208
b4e70030 3209rm -f conftest.$ac_ext
bec39cab
AC
3210EXEEXT=$ac_cv_exeext
3211ac_exeext=$EXEEXT
81ecdfbb
RW
3212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3213$as_echo_n "checking for suffix of object files... " >&6; }
3214if test "${ac_cv_objext+set}" = set; then :
3215 $as_echo_n "(cached) " >&6
bec39cab 3216else
81ecdfbb 3217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3218/* end confdefs.h. */
3219
3220int
3221main ()
3222{
3223
3224 ;
3225 return 0;
3226}
3227_ACEOF
3228rm -f conftest.o conftest.obj
81ecdfbb
RW
3229if { { ac_try="$ac_compile"
3230case "(($ac_try" in
3231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3232 *) ac_try_echo=$ac_try;;
3233esac
3234eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3235$as_echo "$ac_try_echo"; } >&5
3236 (eval "$ac_compile") 2>&5
3237 ac_status=$?
3238 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3239 test $ac_status = 0; }; then :
3240 for ac_file in conftest.o conftest.obj conftest.*; do
3241 test -f "$ac_file" || continue;
bec39cab 3242 case $ac_file in
81ecdfbb 3243 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3244 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3245 break;;
3246 esac
3247done
c906108c 3248else
81ecdfbb 3249 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3250sed 's/^/| /' conftest.$ac_ext >&5
3251
81ecdfbb
RW
3252{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3254as_fn_error "cannot compute suffix of object files: cannot compile
3255See \`config.log' for more details." "$LINENO" 5; }
c906108c 3256fi
b4e70030 3257rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3258fi
81ecdfbb
RW
3259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3260$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3261OBJEXT=$ac_cv_objext
3262ac_objext=$OBJEXT
81ecdfbb
RW
3263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3264$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3265if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3266 $as_echo_n "(cached) " >&6
c906108c 3267else
81ecdfbb 3268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3269/* end confdefs.h. */
3270
3271int
3272main ()
3273{
3274#ifndef __GNUC__
3275 choke me
3276#endif
3277
3278 ;
3279 return 0;
3280}
3281_ACEOF
81ecdfbb 3282if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3283 ac_compiler_gnu=yes
3284else
81ecdfbb 3285 ac_compiler_gnu=no
bec39cab 3286fi
81ecdfbb 3287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3288ac_cv_c_compiler_gnu=$ac_compiler_gnu
3289
3290fi
81ecdfbb
RW
3291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3292$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3293if test $ac_compiler_gnu = yes; then
3294 GCC=yes
3295else
3296 GCC=
3297fi
bec39cab
AC
3298ac_test_CFLAGS=${CFLAGS+set}
3299ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3301$as_echo_n "checking whether $CC accepts -g... " >&6; }
3302if test "${ac_cv_prog_cc_g+set}" = set; then :
3303 $as_echo_n "(cached) " >&6
bec39cab 3304else
81ecdfbb
RW
3305 ac_save_c_werror_flag=$ac_c_werror_flag
3306 ac_c_werror_flag=yes
3307 ac_cv_prog_cc_g=no
3308 CFLAGS="-g"
3309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3310/* end confdefs.h. */
3311
3312int
3313main ()
3314{
3315
3316 ;
3317 return 0;
3318}
3319_ACEOF
81ecdfbb 3320if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3321 ac_cv_prog_cc_g=yes
3322else
81ecdfbb
RW
3323 CFLAGS=""
3324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3325/* end confdefs.h. */
3326
3327int
3328main ()
3329{
3330
3331 ;
3332 return 0;
3333}
3334_ACEOF
3335if ac_fn_c_try_compile "$LINENO"; then :
3336
3337else
3338 ac_c_werror_flag=$ac_save_c_werror_flag
3339 CFLAGS="-g"
3340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3341/* end confdefs.h. */
3342
3343int
3344main ()
3345{
c906108c 3346
81ecdfbb
RW
3347 ;
3348 return 0;
3349}
3350_ACEOF
3351if ac_fn_c_try_compile "$LINENO"; then :
3352 ac_cv_prog_cc_g=yes
3353fi
3354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3355fi
3356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3357fi
81ecdfbb
RW
3358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3359 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3360fi
81ecdfbb
RW
3361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3362$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3363if test "$ac_test_CFLAGS" = set; then
bec39cab 3364 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3365elif test $ac_cv_prog_cc_g = yes; then
3366 if test "$GCC" = yes; then
3367 CFLAGS="-g -O2"
3368 else
3369 CFLAGS="-g"
3370 fi
3371else
3372 if test "$GCC" = yes; then
3373 CFLAGS="-O2"
3374 else
3375 CFLAGS=
3376 fi
3377fi
81ecdfbb
RW
3378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3379$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3380if test "${ac_cv_prog_cc_c89+set}" = set; then :
3381 $as_echo_n "(cached) " >&6
bec39cab 3382else
81ecdfbb 3383 ac_cv_prog_cc_c89=no
bec39cab 3384ac_save_CC=$CC
81ecdfbb 3385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3386/* end confdefs.h. */
c906108c
SS
3387#include <stdarg.h>
3388#include <stdio.h>
3389#include <sys/types.h>
3390#include <sys/stat.h>
3391/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3392struct buf { int x; };
3393FILE * (*rcsopen) (struct buf *, struct stat *, int);
3394static char *e (p, i)
3395 char **p;
3396 int i;
3397{
3398 return p[i];
3399}
3400static char *f (char * (*g) (char **, int), char **p, ...)
3401{
3402 char *s;
3403 va_list v;
3404 va_start (v,p);
3405 s = g (p, va_arg (v,int));
3406 va_end (v);
3407 return s;
3408}
bec39cab
AC
3409
3410/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3411 function prototypes and stuff, but not '\xHH' hex character constants.
3412 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3413 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3414 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3415 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3416 that's true only with -std. */
bec39cab
AC
3417int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3418
81ecdfbb
RW
3419/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3420 inside strings and character constants. */
3421#define FOO(x) 'x'
3422int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3423
c906108c
SS
3424int test (int i, double x);
3425struct s1 {int (*f) (int a);};
3426struct s2 {int (*f) (double a);};
3427int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3428int argc;
3429char **argv;
bec39cab
AC
3430int
3431main ()
3432{
c906108c 3433return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3434 ;
3435 return 0;
3436}
3437_ACEOF
81ecdfbb
RW
3438for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3439 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3440do
3441 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3442 if ac_fn_c_try_compile "$LINENO"; then :
3443 ac_cv_prog_cc_c89=$ac_arg
c906108c 3444fi
81ecdfbb
RW
3445rm -f core conftest.err conftest.$ac_objext
3446 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3447done
81ecdfbb 3448rm -f conftest.$ac_ext
bec39cab 3449CC=$ac_save_CC
c906108c
SS
3450
3451fi
81ecdfbb
RW
3452# AC_CACHE_VAL
3453case "x$ac_cv_prog_cc_c89" in
3454 x)
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3456$as_echo "none needed" >&6; } ;;
3457 xno)
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3459$as_echo "unsupported" >&6; } ;;
bec39cab 3460 *)
81ecdfbb
RW
3461 CC="$CC $ac_cv_prog_cc_c89"
3462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3463$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3464esac
81ecdfbb 3465if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3466
b4e70030
JB
3467fi
3468
bec39cab
AC
3469ac_ext=c
3470ac_cpp='$CPP $CPPFLAGS'
3471ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3472ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3473ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3474
60ca704f 3475
bec39cab
AC
3476ac_ext=c
3477ac_cpp='$CPP $CPPFLAGS'
3478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3480ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
3481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3482$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
3483# On Suns, sometimes $CPP names a directory.
3484if test -n "$CPP" && test -d "$CPP"; then
3485 CPP=
8bb2c122 3486fi
bec39cab 3487if test -z "$CPP"; then
81ecdfbb
RW
3488 if test "${ac_cv_prog_CPP+set}" = set; then :
3489 $as_echo_n "(cached) " >&6
bec39cab
AC
3490else
3491 # Double quotes because CPP needs to be expanded
3492 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3493 do
3494 ac_preproc_ok=false
3495for ac_c_preproc_warn_flag in '' yes
3496do
3497 # Use a header file that comes with gcc, so configuring glibc
3498 # with a fresh cross-compiler works.
3499 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3500 # <limits.h> exists even on freestanding compilers.
3501 # On the NeXT, cc -E runs the code through the compiler's parser,
3502 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3504/* end confdefs.h. */
3505#ifdef __STDC__
3506# include <limits.h>
3507#else
3508# include <assert.h>
3509#endif
3510 Syntax error
3511_ACEOF
81ecdfbb 3512if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3513
81ecdfbb 3514else
bec39cab
AC
3515 # Broken: fails on valid input.
3516continue
3517fi
3518rm -f conftest.err conftest.$ac_ext
3519
81ecdfbb 3520 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3521 # can be detected and how.
81ecdfbb 3522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3523/* end confdefs.h. */
3524#include <ac_nonexistent.h>
3525_ACEOF
81ecdfbb 3526if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3527 # Broken: success on invalid input.
3528continue
8bb2c122 3529else
bec39cab
AC
3530 # Passes both tests.
3531ac_preproc_ok=:
3532break
8bb2c122 3533fi
bec39cab 3534rm -f conftest.err conftest.$ac_ext
8bb2c122 3535
bec39cab
AC
3536done
3537# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3538rm -f conftest.err conftest.$ac_ext
81ecdfbb 3539if $ac_preproc_ok; then :
bec39cab
AC
3540 break
3541fi
8bb2c122 3542
bec39cab
AC
3543 done
3544 ac_cv_prog_CPP=$CPP
ddc9cd0f 3545
c906108c 3546fi
bec39cab
AC
3547 CPP=$ac_cv_prog_CPP
3548else
3549 ac_cv_prog_CPP=$CPP
c906108c 3550fi
81ecdfbb
RW
3551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3552$as_echo "$CPP" >&6; }
bec39cab
AC
3553ac_preproc_ok=false
3554for ac_c_preproc_warn_flag in '' yes
3555do
3556 # Use a header file that comes with gcc, so configuring glibc
3557 # with a fresh cross-compiler works.
3558 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3559 # <limits.h> exists even on freestanding compilers.
3560 # On the NeXT, cc -E runs the code through the compiler's parser,
3561 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 3562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3563/* end confdefs.h. */
3564#ifdef __STDC__
3565# include <limits.h>
3566#else
3567# include <assert.h>
3568#endif
3569 Syntax error
3570_ACEOF
81ecdfbb 3571if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 3572
81ecdfbb 3573else
bec39cab
AC
3574 # Broken: fails on valid input.
3575continue
3576fi
3577rm -f conftest.err conftest.$ac_ext
3578
81ecdfbb 3579 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 3580 # can be detected and how.
81ecdfbb 3581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3582/* end confdefs.h. */
3583#include <ac_nonexistent.h>
3584_ACEOF
81ecdfbb 3585if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
3586 # Broken: success on invalid input.
3587continue
c906108c 3588else
bec39cab
AC
3589 # Passes both tests.
3590ac_preproc_ok=:
3591break
c906108c 3592fi
bec39cab 3593rm -f conftest.err conftest.$ac_ext
c906108c 3594
bec39cab
AC
3595done
3596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3597rm -f conftest.err conftest.$ac_ext
81ecdfbb
RW
3598if $ac_preproc_ok; then :
3599
c906108c 3600else
81ecdfbb
RW
3601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3603as_fn_error "C preprocessor \"$CPP\" fails sanity check
3604See \`config.log' for more details." "$LINENO" 5; }
c906108c 3605fi
c906108c 3606
bec39cab
AC
3607ac_ext=c
3608ac_cpp='$CPP $CPPFLAGS'
3609ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3610ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3611ac_compiler_gnu=$ac_cv_c_compiler_gnu
3612
3613
81ecdfbb
RW
3614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3615$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3616if test "${ac_cv_path_GREP+set}" = set; then :
3617 $as_echo_n "(cached) " >&6
4e8d927d 3618else
81ecdfbb
RW
3619 if test -z "$GREP"; then
3620 ac_path_GREP_found=false
3621 # Loop through the user's path and test for each of PROGNAME-LIST
3622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3623for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3624do
3625 IFS=$as_save_IFS
3626 test -z "$as_dir" && as_dir=.
3627 for ac_prog in grep ggrep; do
3628 for ac_exec_ext in '' $ac_executable_extensions; do
3629 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3630 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3631# Check for GNU ac_path_GREP and select it if it is found.
3632 # Check for GNU $ac_path_GREP
3633case `"$ac_path_GREP" --version 2>&1` in
3634*GNU*)
3635 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3636*)
3637 ac_count=0
3638 $as_echo_n 0123456789 >"conftest.in"
3639 while :
3640 do
3641 cat "conftest.in" "conftest.in" >"conftest.tmp"
3642 mv "conftest.tmp" "conftest.in"
3643 cp "conftest.in" "conftest.nl"
3644 $as_echo 'GREP' >> "conftest.nl"
3645 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3646 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3647 as_fn_arith $ac_count + 1 && ac_count=$as_val
3648 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3649 # Best one so far, save it but keep looking for a better one
3650 ac_cv_path_GREP="$ac_path_GREP"
3651 ac_path_GREP_max=$ac_count
bec39cab 3652 fi
81ecdfbb
RW
3653 # 10*(2^10) chars as input seems more than enough
3654 test $ac_count -gt 10 && break
3655 done
3656 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3657esac
bec39cab 3658
81ecdfbb
RW
3659 $ac_path_GREP_found && break 3
3660 done
3661 done
3662 done
3663IFS=$as_save_IFS
3664 if test -z "$ac_cv_path_GREP"; then
3665 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3666 fi
c906108c 3667else
81ecdfbb 3668 ac_cv_path_GREP=$GREP
c906108c 3669fi
c906108c 3670
81ecdfbb
RW
3671fi
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3673$as_echo "$ac_cv_path_GREP" >&6; }
3674 GREP="$ac_cv_path_GREP"
c906108c 3675
c906108c 3676
81ecdfbb
RW
3677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3678$as_echo_n "checking for egrep... " >&6; }
3679if test "${ac_cv_path_EGREP+set}" = set; then :
3680 $as_echo_n "(cached) " >&6
783e057b 3681else
81ecdfbb
RW
3682 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3683 then ac_cv_path_EGREP="$GREP -E"
3684 else
3685 if test -z "$EGREP"; then
3686 ac_path_EGREP_found=false
3687 # Loop through the user's path and test for each of PROGNAME-LIST
3688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3689for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
3690do
3691 IFS=$as_save_IFS
3692 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
3693 for ac_prog in egrep; do
3694 for ac_exec_ext in '' $ac_executable_extensions; do
3695 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3696 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3697# Check for GNU ac_path_EGREP and select it if it is found.
3698 # Check for GNU $ac_path_EGREP
3699case `"$ac_path_EGREP" --version 2>&1` in
3700*GNU*)
3701 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3702*)
3703 ac_count=0
3704 $as_echo_n 0123456789 >"conftest.in"
3705 while :
3706 do
3707 cat "conftest.in" "conftest.in" >"conftest.tmp"
3708 mv "conftest.tmp" "conftest.in"
3709 cp "conftest.in" "conftest.nl"
3710 $as_echo 'EGREP' >> "conftest.nl"
3711 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3712 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3713 as_fn_arith $ac_count + 1 && ac_count=$as_val
3714 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3715 # Best one so far, save it but keep looking for a better one
3716 ac_cv_path_EGREP="$ac_path_EGREP"
3717 ac_path_EGREP_max=$ac_count
3718 fi
3719 # 10*(2^10) chars as input seems more than enough
3720 test $ac_count -gt 10 && break
3721 done
3722 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3723esac
bec39cab 3724
81ecdfbb
RW
3725 $ac_path_EGREP_found && break 3
3726 done
3727 done
3728 done
3729IFS=$as_save_IFS
3730 if test -z "$ac_cv_path_EGREP"; then
3731 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 3732 fi
783e057b 3733else
81ecdfbb 3734 ac_cv_path_EGREP=$EGREP
783e057b
DJ
3735fi
3736
81ecdfbb 3737 fi
783e057b 3738fi
81ecdfbb
RW
3739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3740$as_echo "$ac_cv_path_EGREP" >&6; }
3741 EGREP="$ac_cv_path_EGREP"
3742
783e057b 3743
81ecdfbb
RW
3744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3745$as_echo_n "checking for ANSI C header files... " >&6; }
3746if test "${ac_cv_header_stdc+set}" = set; then :
3747 $as_echo_n "(cached) " >&6
783e057b 3748else
81ecdfbb 3749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3750/* end confdefs.h. */
783e057b 3751#include <stdlib.h>
bec39cab 3752#include <stdarg.h>
783e057b
DJ
3753#include <string.h>
3754#include <float.h>
c906108c 3755
bec39cab
AC
3756int
3757main ()
3758{
c906108c 3759
bec39cab
AC
3760 ;
3761 return 0;
3762}
3763_ACEOF
81ecdfbb 3764if ac_fn_c_try_compile "$LINENO"; then :
783e057b 3765 ac_cv_header_stdc=yes
c906108c 3766else
81ecdfbb 3767 ac_cv_header_stdc=no
c906108c 3768fi
81ecdfbb 3769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 3770
783e057b
DJ
3771if test $ac_cv_header_stdc = yes; then
3772 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 3773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3774/* end confdefs.h. */
3775#include <string.h>
c906108c 3776
783e057b
DJ
3777_ACEOF
3778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3779 $EGREP "memchr" >/dev/null 2>&1; then :
3780
c906108c 3781else
783e057b 3782 ac_cv_header_stdc=no
c906108c 3783fi
783e057b 3784rm -f conftest*
c906108c
SS
3785
3786fi
3787
783e057b
DJ
3788if test $ac_cv_header_stdc = yes; then
3789 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 3790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3791/* end confdefs.h. */
3792#include <stdlib.h>
bec39cab 3793
783e057b
DJ
3794_ACEOF
3795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
3796 $EGREP "free" >/dev/null 2>&1; then :
3797
bec39cab 3798else
783e057b 3799 ac_cv_header_stdc=no
bec39cab 3800fi
783e057b 3801rm -f conftest*
bec39cab
AC
3802
3803fi
bec39cab 3804
783e057b
DJ
3805if test $ac_cv_header_stdc = yes; then
3806 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 3807 if test "$cross_compiling" = yes; then :
783e057b 3808 :
bec39cab 3809else
81ecdfbb 3810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3811/* end confdefs.h. */
3812#include <ctype.h>
81ecdfbb 3813#include <stdlib.h>
783e057b
DJ
3814#if ((' ' & 0x0FF) == 0x020)
3815# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3816# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3817#else
3818# define ISLOWER(c) \
3819 (('a' <= (c) && (c) <= 'i') \
3820 || ('j' <= (c) && (c) <= 'r') \
3821 || ('s' <= (c) && (c) <= 'z'))
3822# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3823#endif
3824
3825#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3826int
3827main ()
3828{
3829 int i;
3830 for (i = 0; i < 256; i++)
3831 if (XOR (islower (i), ISLOWER (i))
3832 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
3833 return 2;
3834 return 0;
783e057b
DJ
3835}
3836_ACEOF
81ecdfbb 3837if ac_fn_c_try_run "$LINENO"; then :
783e057b 3838
81ecdfbb
RW
3839else
3840 ac_cv_header_stdc=no
783e057b 3841fi
81ecdfbb
RW
3842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3843 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 3844fi
81ecdfbb 3845
783e057b
DJ
3846fi
3847fi
81ecdfbb
RW
3848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3849$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
3850if test $ac_cv_header_stdc = yes; then
3851
81ecdfbb 3852$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
3853
3854fi
3855
3856# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
3857for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3858 inttypes.h stdint.h unistd.h
81ecdfbb
RW
3859do :
3860 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3861ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3862"
3863eval as_val=\$$as_ac_Header
3864 if test "x$as_val" = x""yes; then :
783e057b 3865 cat >>confdefs.h <<_ACEOF
81ecdfbb 3866#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
3867_ACEOF
3868
3869fi
3870
3871done
3872
3873
3874
81ecdfbb
RW
3875 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
3876if test "x$ac_cv_header_minix_config_h" = x""yes; then :
783e057b
DJ
3877 MINIX=yes
3878else
3879 MINIX=
3880fi
3881
3882
3883 if test "$MINIX" = yes; then
3884
81ecdfbb 3885$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
3886
3887
81ecdfbb 3888$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
3889
3890
81ecdfbb 3891$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
3892
3893 fi
3894
3895
81ecdfbb
RW
3896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3897$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
3898if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
3899 $as_echo_n "(cached) " >&6
783e057b 3900else
81ecdfbb 3901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
3902/* end confdefs.h. */
3903
c971b7fa
PA
3904# define __EXTENSIONS__ 1
3905 $ac_includes_default
783e057b
DJ
3906int
3907main ()
3908{
3909
3910 ;
3911 return 0;
3912}
3913_ACEOF
81ecdfbb 3914if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
3915 ac_cv_safe_to_define___extensions__=yes
3916else
81ecdfbb 3917 ac_cv_safe_to_define___extensions__=no
783e057b 3918fi
81ecdfbb 3919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 3920fi
81ecdfbb
RW
3921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3922$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 3923 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 3924 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 3925
81ecdfbb 3926 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 3927
81ecdfbb 3928 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 3929
81ecdfbb 3930 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 3931
81ecdfbb 3932 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
3933
3934
c971b7fa
PA
3935ac_aux_dir=
3936for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3937 for ac_t in install-sh install.sh shtool; do
3938 if test -f "$ac_dir/$ac_t"; then
3939 ac_aux_dir=$ac_dir
3940 ac_install_sh="$ac_aux_dir/$ac_t -c"
3941 break 2
3942 fi
3943 done
3944done
3945if test -z "$ac_aux_dir"; then
3946 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3947fi
770d76d7 3948
c971b7fa
PA
3949# These three variables are undocumented and unsupported,
3950# and are intended to be withdrawn in a future Autoconf release.
3951# They can cause serious problems if a builder's source tree is in a directory
3952# whose full name contains unusual characters.
3953ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3954ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3955ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 3956
770d76d7 3957
c971b7fa
PA
3958# Make sure we can run config.sub.
3959$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3960 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 3961
c971b7fa
PA
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3963$as_echo_n "checking build system type... " >&6; }
3964if test "${ac_cv_build+set}" = set; then :
3965 $as_echo_n "(cached) " >&6
770d76d7 3966else
c971b7fa
PA
3967 ac_build_alias=$build_alias
3968test "x$ac_build_alias" = x &&
3969 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3970test "x$ac_build_alias" = x &&
3971 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3972ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3973 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3974
770d76d7 3975fi
c971b7fa
PA
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3977$as_echo "$ac_cv_build" >&6; }
3978case $ac_cv_build in
3979*-*-*) ;;
3980*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
770d76d7 3981esac
c971b7fa
PA
3982build=$ac_cv_build
3983ac_save_IFS=$IFS; IFS='-'
3984set x $ac_cv_build
3985shift
3986build_cpu=$1
3987build_vendor=$2
3988shift; shift
3989# Remember, the first character of IFS is used to create $*,
3990# except with old shells:
3991build_os=$*
3992IFS=$ac_save_IFS
3993case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
3994
3995
c971b7fa
PA
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3997$as_echo_n "checking host system type... " >&6; }
3998if test "${ac_cv_host+set}" = set; then :
81ecdfbb
RW
3999 $as_echo_n "(cached) " >&6
4000else
c971b7fa
PA
4001 if test "x$host_alias" = x; then
4002 ac_cv_host=$ac_cv_build
81ecdfbb 4003else
c971b7fa
PA
4004 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4005 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4006fi
81ecdfbb
RW
4007
4008fi
c971b7fa
PA
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4010$as_echo "$ac_cv_host" >&6; }
4011case $ac_cv_host in
4012*-*-*) ;;
4013*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4014esac
c971b7fa
PA
4015host=$ac_cv_host
4016ac_save_IFS=$IFS; IFS='-'
4017set x $ac_cv_host
4018shift
4019host_cpu=$1
4020host_vendor=$2
4021shift; shift
4022# Remember, the first character of IFS is used to create $*,
4023# except with old shells:
4024host_os=$*
4025IFS=$ac_save_IFS
4026case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4027
4028
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4030$as_echo_n "checking target system type... " >&6; }
4031if test "${ac_cv_target+set}" = set; then :
4032 $as_echo_n "(cached) " >&6
4033else
4034 if test "x$target_alias" = x; then
4035 ac_cv_target=$ac_cv_host
4036else
4037 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4038 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4039fi
4040
4041fi
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4043$as_echo "$ac_cv_target" >&6; }
4044case $ac_cv_target in
4045*-*-*) ;;
4046*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
4047esac
4048target=$ac_cv_target
4049ac_save_IFS=$IFS; IFS='-'
4050set x $ac_cv_target
4051shift
4052target_cpu=$1
4053target_vendor=$2
4054shift; shift
4055# Remember, the first character of IFS is used to create $*,
4056# except with old shells:
4057target_os=$*
4058IFS=$ac_save_IFS
4059case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4060
4061
4062# The aliases save the names the user supplied, while $host etc.
4063# will get canonicalized.
4064test -n "$target_alias" &&
4065 test "$program_prefix$program_suffix$program_transform_name" = \
4066 NONENONEs,x,x, &&
4067 program_prefix=${target_alias}-
4068
4069# The tests for host and target for $enable_largefile require
4070# canonical names.
4071
4072
81ecdfbb 4073
da2f07f1
JK
4074# As the $enable_largefile decision depends on --enable-plugins we must set it
4075# even in directories otherwise not depending on the $plugins option.
4076
4077
4078# Check whether --enable-plugins was given.
4079if test "${enable_plugins+set}" = set; then :
4080 enableval=$enable_plugins; case "${enableval}" in
4081 yes | "") plugins=yes ;;
4082 no) plugins=no ;;
4083 *) plugins=yes ;;
4084 esac
4085else
4086 plugins=no
4087fi
4088
4089
4090
4091case "${host}" in
4092 sparc-*-solaris*|i[3-7]86-*-solaris*)
4093 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4094 # are mutually exclusive; and without procfs support, the bfd/ elf module
4095 # cannot provide certain routines such as elfcore_write_prpsinfo
4096 # or elfcore_write_prstatus. So unless the user explicitly requested
4097 # large-file support through the --enable-largefile switch, disable
4098 # large-file support in favor of procfs support.
4099 test "${target}" = "${host}" -a "x$plugins" = xno \
4100 && : ${enable_largefile="no"}
4101 ;;
4102esac
4103
4104# Check whether --enable-largefile was given.
4105if test "${enable_largefile+set}" = set; then :
4106 enableval=$enable_largefile;
4107fi
4108
4109if test "$enable_largefile" != no; then
4110
4111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4112$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4113if test "${ac_cv_sys_largefile_CC+set}" = set; then :
4114 $as_echo_n "(cached) " >&6
4115else
4116 ac_cv_sys_largefile_CC=no
4117 if test "$GCC" != yes; then
4118 ac_save_CC=$CC
4119 while :; do
4120 # IRIX 6.2 and later do not support large files by default,
4121 # so use the C compiler's -n32 option if that helps.
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4123/* end confdefs.h. */
4124#include <sys/types.h>
4125 /* Check that off_t can represent 2**63 - 1 correctly.
4126 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4127 since some C++ compilers masquerading as C compilers
4128 incorrectly reject 9223372036854775807. */
4129#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4130 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4131 && LARGE_OFF_T % 2147483647 == 1)
4132 ? 1 : -1];
4133int
4134main ()
4135{
4136
4137 ;
4138 return 0;
4139}
4140_ACEOF
4141 if ac_fn_c_try_compile "$LINENO"; then :
4142 break
4143fi
4144rm -f core conftest.err conftest.$ac_objext
4145 CC="$CC -n32"
4146 if ac_fn_c_try_compile "$LINENO"; then :
4147 ac_cv_sys_largefile_CC=' -n32'; break
4148fi
4149rm -f core conftest.err conftest.$ac_objext
4150 break
4151 done
4152 CC=$ac_save_CC
4153 rm -f conftest.$ac_ext
4154 fi
4155fi
4156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4157$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4158 if test "$ac_cv_sys_largefile_CC" != no; then
4159 CC=$CC$ac_cv_sys_largefile_CC
4160 fi
4161
4162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4163$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4164if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4165 $as_echo_n "(cached) " >&6
4166else
4167 while :; do
4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4169/* end confdefs.h. */
4170#include <sys/types.h>
4171 /* Check that off_t can represent 2**63 - 1 correctly.
4172 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4173 since some C++ compilers masquerading as C compilers
4174 incorrectly reject 9223372036854775807. */
4175#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4176 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4177 && LARGE_OFF_T % 2147483647 == 1)
4178 ? 1 : -1];
4179int
4180main ()
4181{
4182
4183 ;
4184 return 0;
4185}
4186_ACEOF
4187if ac_fn_c_try_compile "$LINENO"; then :
4188 ac_cv_sys_file_offset_bits=no; break
4189fi
4190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4192/* end confdefs.h. */
4193#define _FILE_OFFSET_BITS 64
4194#include <sys/types.h>
4195 /* Check that off_t can represent 2**63 - 1 correctly.
4196 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4197 since some C++ compilers masquerading as C compilers
4198 incorrectly reject 9223372036854775807. */
4199#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4200 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4201 && LARGE_OFF_T % 2147483647 == 1)
4202 ? 1 : -1];
4203int
4204main ()
4205{
4206
4207 ;
4208 return 0;
4209}
4210_ACEOF
4211if ac_fn_c_try_compile "$LINENO"; then :
4212 ac_cv_sys_file_offset_bits=64; break
4213fi
4214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4215 ac_cv_sys_file_offset_bits=unknown
4216 break
4217done
4218fi
4219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4220$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4221case $ac_cv_sys_file_offset_bits in #(
4222 no | unknown) ;;
4223 *)
4224cat >>confdefs.h <<_ACEOF
4225#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4226_ACEOF
4227;;
4228esac
4229rm -rf conftest*
4230 if test $ac_cv_sys_file_offset_bits = unknown; then
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4232$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4233if test "${ac_cv_sys_large_files+set}" = set; then :
4234 $as_echo_n "(cached) " >&6
4235else
4236 while :; do
4237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4238/* end confdefs.h. */
4239#include <sys/types.h>
4240 /* Check that off_t can represent 2**63 - 1 correctly.
4241 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4242 since some C++ compilers masquerading as C compilers
4243 incorrectly reject 9223372036854775807. */
4244#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4245 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4246 && LARGE_OFF_T % 2147483647 == 1)
4247 ? 1 : -1];
4248int
4249main ()
4250{
4251
4252 ;
4253 return 0;
4254}
4255_ACEOF
4256if ac_fn_c_try_compile "$LINENO"; then :
4257 ac_cv_sys_large_files=no; break
4258fi
4259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4261/* end confdefs.h. */
4262#define _LARGE_FILES 1
4263#include <sys/types.h>
4264 /* Check that off_t can represent 2**63 - 1 correctly.
4265 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4266 since some C++ compilers masquerading as C compilers
4267 incorrectly reject 9223372036854775807. */
4268#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4269 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4270 && LARGE_OFF_T % 2147483647 == 1)
4271 ? 1 : -1];
4272int
4273main ()
4274{
4275
4276 ;
4277 return 0;
4278}
4279_ACEOF
4280if ac_fn_c_try_compile "$LINENO"; then :
4281 ac_cv_sys_large_files=1; break
4282fi
4283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4284 ac_cv_sys_large_files=unknown
4285 break
4286done
4287fi
4288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4289$as_echo "$ac_cv_sys_large_files" >&6; }
4290case $ac_cv_sys_large_files in #(
4291 no | unknown) ;;
4292 *)
4293cat >>confdefs.h <<_ACEOF
4294#define _LARGE_FILES $ac_cv_sys_large_files
4295_ACEOF
4296;;
4297esac
4298rm -rf conftest*
4299 fi
4300fi
4301
4302
4303
81ecdfbb
RW
4304
4305
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4307$as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4308if test "${am_cv_prog_cc_stdc+set}" = set; then :
4309 $as_echo_n "(cached) " >&6
4310else
4311 am_cv_prog_cc_stdc=no
4312ac_save_CC="$CC"
4313# Don't try gcc -ansi; that turns off useful extensions and
4314# breaks some systems' header files.
4315# AIX -qlanglvl=ansi
4316# Ultrix and OSF/1 -std1
4317# HP-UX 10.20 and later -Ae
4318# HP-UX older versions -Aa -D_HPUX_SOURCE
4319# SVR4 -Xc -D__EXTENSIONS__
4320for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4321do
783e057b 4322 CC="$ac_save_CC $ac_arg"
81ecdfbb 4323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4324/* end confdefs.h. */
4325#include <stdarg.h>
4326#include <stdio.h>
4327#include <sys/types.h>
4328#include <sys/stat.h>
4329/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4330struct buf { int x; };
4331FILE * (*rcsopen) (struct buf *, struct stat *, int);
4332static char *e (p, i)
4333 char **p;
4334 int i;
4335{
4336 return p[i];
4337}
4338static char *f (char * (*g) (char **, int), char **p, ...)
4339{
4340 char *s;
4341 va_list v;
4342 va_start (v,p);
4343 s = g (p, va_arg (v,int));
4344 va_end (v);
4345 return s;
4346}
4347int test (int i, double x);
4348struct s1 {int (*f) (int a);};
4349struct s2 {int (*f) (double a);};
4350int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4351int argc;
4352char **argv;
4353
4354int
4355main ()
4356{
4357
4358return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4359
4360 ;
4361 return 0;
4362}
4363_ACEOF
81ecdfbb 4364if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4365 am_cv_prog_cc_stdc="$ac_arg"; break
783e057b 4366fi
81ecdfbb 4367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b
DJ
4368done
4369CC="$ac_save_CC"
4370
4371fi
4372
4373if test -z "$am_cv_prog_cc_stdc"; then
81ecdfbb
RW
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4375$as_echo "none needed" >&6; }
783e057b 4376else
81ecdfbb
RW
4377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4378$as_echo "$am_cv_prog_cc_stdc" >&6; }
783e057b
DJ
4379fi
4380case "x$am_cv_prog_cc_stdc" in
4381 x|xno) ;;
4382 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4383esac
4384
4385
4386ac_aux_dir=
81ecdfbb
RW
4387for ac_dir in .. "$srcdir"/..; do
4388 for ac_t in install-sh install.sh shtool; do
4389 if test -f "$ac_dir/$ac_t"; then
4390 ac_aux_dir=$ac_dir
4391 ac_install_sh="$ac_aux_dir/$ac_t -c"
4392 break 2
4393 fi
4394 done
783e057b
DJ
4395done
4396if test -z "$ac_aux_dir"; then
81ecdfbb 4397 as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 4398fi
81ecdfbb
RW
4399
4400# These three variables are undocumented and unsupported,
4401# and are intended to be withdrawn in a future Autoconf release.
4402# They can cause serious problems if a builder's source tree is in a directory
4403# whose full name contains unusual characters.
4404ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4405ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4406ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4407
783e057b 4408
783e057b 4409
9009e1ae
MR
4410test "$program_prefix" != NONE &&
4411 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4412# Use a double $ so make ignores it.
4413test "$program_suffix" != NONE &&
4414 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4415# Double any \ or $.
4416# By default was `s,x,x', remove it if useless.
4417ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4418program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4419
81ecdfbb 4420
a417dc56
RW
4421# Dependency checking.
4422rm -rf .tst 2>/dev/null
4423mkdir .tst 2>/dev/null
4424if test -d .tst; then
4425 am__leading_dot=.
4426else
4427 am__leading_dot=_
4428fi
4429rmdir .tst 2>/dev/null
4430
4431DEPDIR="${am__leading_dot}deps"
4432
81ecdfbb 4433ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
4434
4435
4436depcc="$CC" am_compiler_list=
4437
4438am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
4439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4440$as_echo_n "checking dependency style of $depcc... " >&6; }
4441if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4442 $as_echo_n "(cached) " >&6
a417dc56
RW
4443else
4444 if test -f "$am_depcomp"; then
4445 # We make a subdir and do the tests there. Otherwise we can end up
4446 # making bogus files that we don't know about and never remove. For
4447 # instance it was reported that on HP-UX the gcc test will end up
4448 # making a dummy file named `D' -- because `-MD' means `put the output
4449 # in D'.
4450 mkdir conftest.dir
4451 # Copy depcomp to subdir because otherwise we won't find it if we're
4452 # using a relative directory.
4453 cp "$am_depcomp" conftest.dir
4454 cd conftest.dir
4455 # We will build objects and dependencies in a subdirectory because
4456 # it helps to detect inapplicable dependency modes. For instance
4457 # both Tru64's cc and ICC support -MD to output dependencies as a
4458 # side effect of compilation, but ICC will put the dependencies in
4459 # the current directory while Tru64 will put them in the object
4460 # directory.
4461 mkdir sub
4462
4463 am_cv_CC_dependencies_compiler_type=none
4464 if test "$am_compiler_list" = ""; then
4465 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4466 fi
4467 for depmode in $am_compiler_list; do
4468 if test $depmode = none; then break; fi
4469
81ecdfbb 4470 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
4471 # Setup a source with many dependencies, because some compilers
4472 # like to wrap large dependency lists on column 80 (with \), and
4473 # we should not choose a depcomp mode which is confused by this.
4474 #
4475 # We need to recreate these files for each test, as the compiler may
4476 # overwrite some of them when testing with obscure command lines.
4477 # This happens at least with the AIX C compiler.
4478 : > sub/conftest.c
4479 for i in 1 2 3 4 5 6; do
4480 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4481 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4482 # Solaris 8's {/usr,}/bin/sh.
4483 touch sub/conftst$i.h
4484 done
4485 echo "include sub/conftest.Po" > confmf
4486
4487 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4488 # mode. It turns out that the SunPro C++ compiler does not properly
4489 # handle `-M -o', and we need to detect this.
4490 depcmd="depmode=$depmode \
4491 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
4492 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4493 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
4494 echo "| $depcmd" | sed -e 's/ */ /g' >&5
4495 if env $depcmd > conftest.err 2>&1 &&
4496 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
4497 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
4498 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
4499 # icc doesn't choke on unknown options, it will just issue warnings
4500 # or remarks (even with -Werror). So we grep stderr for any message
4501 # that says an option was ignored or not supported.
4502 # When given -MP, icc 7.0 and 7.1 complain thusly:
4503 # icc: Command line warning: ignoring option '-M'; no argument required
4504 # The diagnosis changed in icc 8.0:
4505 # icc: Command line remark: option '-MP' not supported
4506 if (grep 'ignoring option' conftest.err ||
4507 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4508 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 4509 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
4510 break
4511 fi
4512 fi
81ecdfbb 4513 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
4514 sed -e 's/^/| /' < conftest.err >&5
4515 done
4516
4517 cd ..
4518 rm -rf conftest.dir
4519else
4520 am_cv_CC_dependencies_compiler_type=none
4521fi
4522
4523fi
81ecdfbb
RW
4524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4525$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 4526if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
81ecdfbb 4527then as_fn_error "no usable dependency style found" "$LINENO" 5
a417dc56
RW
4528else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4529
4530fi
4531
4532
4533# Check for the 'make' the user wants to use.
4534for ac_prog in make
4535do
4536 # Extract the first word of "$ac_prog", so it can be a program name with args.
4537set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
4538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4539$as_echo_n "checking for $ac_word... " >&6; }
4540if test "${ac_cv_prog_MAKE+set}" = set; then :
4541 $as_echo_n "(cached) " >&6
a417dc56
RW
4542else
4543 if test -n "$MAKE"; then
4544 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
4545else
4546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4547for as_dir in $PATH
4548do
4549 IFS=$as_save_IFS
4550 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4551 for ac_exec_ext in '' $ac_executable_extensions; do
4552 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
a417dc56 4553 ac_cv_prog_MAKE="$ac_prog"
81ecdfbb 4554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a417dc56
RW
4555 break 2
4556 fi
4557done
81ecdfbb
RW
4558 done
4559IFS=$as_save_IFS
a417dc56
RW
4560
4561fi
4562fi
4563MAKE=$ac_cv_prog_MAKE
4564if test -n "$MAKE"; then
81ecdfbb
RW
4565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4566$as_echo "$MAKE" >&6; }
a417dc56 4567else
81ecdfbb
RW
4568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4569$as_echo "no" >&6; }
a417dc56
RW
4570fi
4571
81ecdfbb 4572
a417dc56
RW
4573 test -n "$MAKE" && break
4574done
4575
4576MAKE_IS_GNU=
4577case "`$MAKE --version 2>&1 | sed 1q`" in
4578 *GNU*)
4579 MAKE_IS_GNU=yes
4580 ;;
4581esac
81ecdfbb 4582 if test "$MAKE_IS_GNU" = yes; then
a417dc56
RW
4583 GMAKE_TRUE=
4584 GMAKE_FALSE='#'
4585else
4586 GMAKE_TRUE='#'
4587 GMAKE_FALSE=
4588fi
4589
81ecdfbb
RW
4590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4591$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4592set x ${MAKE-make}
4593ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4594if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
4595 $as_echo_n "(cached) " >&6
a417dc56
RW
4596else
4597 cat >conftest.make <<\_ACEOF
81ecdfbb 4598SHELL = /bin/sh
a417dc56 4599all:
81ecdfbb 4600 @echo '@@@%%%=$(MAKE)=@@@%%%'
a417dc56
RW
4601_ACEOF
4602# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
4603case `${MAKE-make} -f conftest.make 2>/dev/null` in
4604 *@@@%%%=?*=@@@%%%*)
4605 eval ac_cv_prog_make_${ac_make}_set=yes;;
4606 *)
4607 eval ac_cv_prog_make_${ac_make}_set=no;;
4608esac
a417dc56
RW
4609rm -f conftest.make
4610fi
81ecdfbb
RW
4611if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4613$as_echo "yes" >&6; }
a417dc56
RW
4614 SET_MAKE=
4615else
81ecdfbb
RW
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4617$as_echo "no" >&6; }
a417dc56
RW
4618 SET_MAKE="MAKE=${MAKE-make}"
4619fi
4620
4621
c971b7fa
PA
4622# Configure gnulib. We need to build gnulib under some other
4623# directory not "gnulib", to avoid the problem of both GDB and
4624# GDBserver wanting to build it in the same directory, when building
4625# in the source dir.
783e057b 4626
c971b7fa
PA
4627 in_src="gnulib"
4628 in_build="build-gnulib"
4629
4630 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
4631 # so they do not pile up.
4632 ac_sub_configure_args=
4633 ac_prev=
4634 eval "set x $ac_configure_args"
4635 shift
4636 for ac_arg
4637 do
4638 if test -n "$ac_prev"; then
4639 ac_prev=
4640 continue
4641 fi
4642 case $ac_arg in
4643 -cache-file | --cache-file | --cache-fil | --cache-fi \
4644 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4645 ac_prev=cache_file ;;
4646 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4647 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4648 | --c=*)
4649 ;;
4650 --config-cache | -C)
4651 ;;
4652 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4653 ac_prev=srcdir ;;
4654 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4655 ;;
4656 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
4657 ac_prev=prefix ;;
4658 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
4659 ;;
4660 --disable-option-checking)
4661 ;;
4662 *)
4663 case $ac_arg in
4664 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4665 esac
4666 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
4667 esac
4668 done
4669
4670 # Always prepend --prefix to ensure using the same prefix
4671 # in subdir configurations.
4672 ac_arg="--prefix=$prefix"
4673 case $ac_arg in
4674 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4675 esac
4676 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
4677
4678 # Pass --silent
4679 if test "$silent" = yes; then
4680 ac_sub_configure_args="--silent $ac_sub_configure_args"
4681 fi
4682
4683 # Always prepend --disable-option-checking to silence warnings, since
4684 # different subdirs can have different --enable and --with options.
4685 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
4686
4687 ac_popdir=`pwd`
4688 ac_dir=$in_build
4689
4690 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
4691 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
4692 $as_echo "$ac_msg" >&6
4693 as_dir="$ac_dir"; as_fn_mkdir_p
4694
38ea300a
PA
4695 case $srcdir in
4696 [\\/]* | ?:[\\/]* )
4697 ac_srcdir=$srcdir/$in_src ;;
4698 *) # Relative name.
4699 ac_srcdir=../$srcdir/$in_src ;;
4700 esac
c971b7fa
PA
4701
4702 cd "$ac_dir"
4703
4704 ac_sub_configure=$ac_srcdir/configure
4705
4706 # Make the cache file name correct relative to the subdirectory.
4707 case $cache_file in
4708 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
4709 *) # Relative name.
4710 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
4711 esac
4712
4713 { $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
4714$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
4715 # The eval makes quoting arguments work.
4716 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
4717 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
4718 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
4719
4720 cd "$ac_popdir"
783e057b 4721
c971b7fa
PA
4722
4723
4724CONFIG_OBS=
4725CONFIG_DEPS=
4726CONFIG_SRCS=
4727ENABLE_CFLAGS=
4728
4729CONFIG_ALL=
4730CONFIG_CLEAN=
4731CONFIG_INSTALL=
4732CONFIG_UNINSTALL=
4733
4734# If we haven't got the data from the intl directory,
4735# assume NLS is disabled.
4736USE_NLS=no
4737LIBINTL=
4738LIBINTL_DEP=
4739INCINTL=
4740XGETTEXT=
4741GMSGFMT=
4742POSUB=
783e057b
DJ
4743
4744if test -f ../intl/config.intl; then
4745 . ../intl/config.intl
4746fi
81ecdfbb
RW
4747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
4748$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 4749if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4751$as_echo "no" >&6; }
783e057b 4752else
81ecdfbb
RW
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4754$as_echo "yes" >&6; }
783e057b 4755
81ecdfbb 4756$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
4757
4758
81ecdfbb
RW
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
4760$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
4761 # Look for .po and .gmo files in the source directory.
4762 CATALOGS=
4763 XLINGUAS=
4764 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
4765 # If there aren't any .gmo files the shell will give us the
4766 # literal string "../path/to/srcdir/po/*.gmo" which has to be
4767 # weeded out.
4768 case "$cat" in *\**)
4769 continue;;
4770 esac
4771 # The quadruple backslash is collapsed to a double backslash
4772 # by the backticks, then collapsed again by the double quotes,
4773 # leaving us with one backslash in the sed expression (right
4774 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
4775 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
4776 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
4777 # The user is allowed to set LINGUAS to a list of languages to
4778 # install catalogs for. If it's empty that means "all of them."
4779 if test "x$LINGUAS" = x; then
4780 CATALOGS="$CATALOGS $cat"
4781 XLINGUAS="$XLINGUAS $lang"
4782 else
4783 case "$LINGUAS" in *$lang*)
4784 CATALOGS="$CATALOGS $cat"
4785 XLINGUAS="$XLINGUAS $lang"
4786 ;;
4787 esac
e28b3332
DJ
4788 fi
4789 done
c971b7fa
PA
4790 LINGUAS="$XLINGUAS"
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
4792$as_echo "$LINGUAS" >&6; }
4793
4794
4795 DATADIRNAME=share
4796
4797 INSTOBJEXT=.mo
4798
4799 GENCAT=gencat
4800
4801 CATOBJEXT=.gmo
e28b3332 4802
e28b3332
DJ
4803fi
4804
c971b7fa
PA
4805localedir='${datadir}/locale'
4806
4807
4808if test x"$USE_NLS" = xyes; then
4809 CONFIG_ALL="$CONFIG_ALL all-po"
4810 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
4811 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
4812 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 4813fi
e28b3332 4814
c971b7fa
PA
4815GNULIB=build-gnulib/import
4816
4817# For Makefile dependencies.
4818GNULIB_STDINT_H=
4819if test x"$STDINT_H" != x; then
4820 GNULIB_STDINT_H=$GNULIB/$STDINT_H
e28b3332
DJ
4821fi
4822
4823
c971b7fa
PA
4824PACKAGE=gdb
4825
4826cat >>confdefs.h <<_ACEOF
4827#define PACKAGE "$PACKAGE"
4828_ACEOF
4829
4830
4831
4832# We never need to detect it in this sub-configure.
4833# But preserve it for config.status --recheck.
4834
4835
4836
4837MAKEINFO_EXTRA_FLAGS=""
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
4839$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
4840if test "${gdb_cv_have_makeinfo_click+set}" = set; then :
4841 $as_echo_n "(cached) " >&6
4842else
4843 echo '@clicksequence{a @click{} b}' >conftest.texinfo
4844 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
4845 gdb_cv_have_makeinfo_click=yes
4846 else
4847 gdb_cv_have_makeinfo_click=no
4848 fi
4849fi
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
4851$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
4852if test x"$gdb_cv_have_makeinfo_click" = xyes; then
4853 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
4854fi
e28b3332
DJ
4855
4856
bec39cab
AC
4857
4858
81ecdfbb
RW
4859# Check whether --with-separate-debug-dir was given.
4860if test "${with_separate_debug_dir+set}" = set; then :
4861 withval=$with_separate_debug_dir;
b14b1491
TT
4862 DEBUGDIR=$withval
4863else
4864 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
4865fi
4866
20e95c23 4867
783e057b
DJ
4868 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4869 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 4870 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 4871 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 4872
783e057b
DJ
4873cat >>confdefs.h <<_ACEOF
4874#define DEBUGDIR "$ac_define_dir"
20e95c23 4875_ACEOF
20e95c23 4876
20e95c23 4877
20e95c23 4878
0c4a4063 4879
b14b1491
TT
4880 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4881 if test "x$prefix" = xNONE; then
4882 test_prefix=/usr/local
4883 else
4884 test_prefix=$prefix
4885 fi
783e057b 4886 else
b14b1491 4887 test_prefix=$exec_prefix
783e057b 4888 fi
b14b1491
TT
4889 value=0
4890 case ${ac_define_dir} in
4891 "${test_prefix}"|"${test_prefix}/"*|\
4892 '${exec_prefix}'|'${exec_prefix}/'*)
4893 value=1
4894 ;;
4895 esac
4896
4897cat >>confdefs.h <<_ACEOF
4898#define DEBUGDIR_RELOCATABLE $value
4899_ACEOF
4900
4901
4902
0c4a4063 4903
f83d8a90
DE
4904# We can't pass paths as command line arguments.
4905# Mingw32 tries to be clever and will convert the paths for us.
4906# For example -DBINDIR="/usr/local/bin" passed on the command line may get
4907# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
4908# This breaks GDB's relocatable path conversions since paths passed in
4909# config.h would not get so translated, the path prefixes no longer match.
4910
4911 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4912 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4913 ac_define_dir=`eval echo $bindir`
4914 ac_define_dir=`eval echo $ac_define_dir`
4915
4916cat >>confdefs.h <<_ACEOF
4917#define BINDIR "$ac_define_dir"
4918_ACEOF
4919
4920
4921
b14b1491
TT
4922# GDB's datadir relocation
4923
4924
4925
81ecdfbb
RW
4926# Check whether --with-gdb-datadir was given.
4927if test "${with_gdb_datadir+set}" = set; then :
4928 withval=$with_gdb_datadir;
b14b1491 4929 GDB_DATADIR=$withval
20e95c23 4930else
b14b1491 4931 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
4932fi
4933
20e95c23 4934
b14b1491
TT
4935 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4936 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4937 ac_define_dir=`eval echo $GDB_DATADIR`
4938 ac_define_dir=`eval echo $ac_define_dir`
4939
4940cat >>confdefs.h <<_ACEOF
4941#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
4942_ACEOF
4943
b14b1491
TT
4944
4945
0c4a4063 4946
b14b1491
TT
4947 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
4948 if test "x$prefix" = xNONE; then
4949 test_prefix=/usr/local
4950 else
4951 test_prefix=$prefix
4952 fi
4953 else
4954 test_prefix=$exec_prefix
4955 fi
4956 value=0
4957 case ${ac_define_dir} in
4958 "${test_prefix}"|"${test_prefix}/"*|\
4959 '${exec_prefix}'|'${exec_prefix}/'*)
4960 value=1
4961 ;;
4962 esac
4963
4964cat >>confdefs.h <<_ACEOF
4965#define GDB_DATADIR_RELOCATABLE $value
4966_ACEOF
4967
4968
783e057b 4969
20e95c23 4970
0c4a4063 4971
81ecdfbb
RW
4972# Check whether --with-relocated-sources was given.
4973if test "${with_relocated_sources+set}" = set; then :
4974 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
4975
4976 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
4977 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4978 ac_define_dir=`eval echo $reloc_srcdir`
4979 ac_define_dir=`eval echo $ac_define_dir`
4980
4981cat >>confdefs.h <<_ACEOF
4982#define RELOC_SRCDIR "$ac_define_dir"
4983_ACEOF
4984
4985
4986
81ecdfbb
RW
4987fi
4988
29b0e8a2 4989
7349ff92
JK
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
4991$as_echo_n "checking for default auto-load directory... " >&6; }
4992
4993# Check whether --with-auto-load-dir was given.
4994if test "${with_auto_load_dir+set}" = set; then :
4995 withval=$with_auto_load_dir;
4996else
1564a261 4997 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
4998fi
4999
1564a261 5000escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
5001
5002 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5003 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5004 ac_define_dir=`eval echo $escape_dir`
5005 ac_define_dir=`eval echo $ac_define_dir`
5006
5007cat >>confdefs.h <<_ACEOF
5008#define AUTO_LOAD_DIR "$ac_define_dir"
5009_ACEOF
5010
5011
5012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
5013$as_echo "$with_auto_load_dir" >&6; }
5014
bccbefd2
JK
5015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
5016$as_echo_n "checking for default auto-load safe-path... " >&6; }
5017
5018# Check whether --with-auto-load-safe-path was given.
5019if test "${with_auto_load_safe_path+set}" = set; then :
5020 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
5021 with_auto_load_safe_path="/"
5022 fi
bccbefd2 5023else
7349ff92 5024 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
5025fi
5026
1564a261 5027escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
5028
5029 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
5030 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 5031 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
5032 ac_define_dir=`eval echo $ac_define_dir`
5033
5034cat >>confdefs.h <<_ACEOF
6dea1fbd 5035#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
5036_ACEOF
5037
5038
5039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
5040$as_echo "$with_auto_load_safe_path" >&6; }
5041
29b0e8a2 5042
20e95c23 5043
5ae98d25 5044subdirs="$subdirs testsuite"
20e95c23
DJ
5045
5046
783e057b 5047# Check whether to support alternative target configurations
81ecdfbb
RW
5048# Check whether --enable-targets was given.
5049if test "${enable_targets+set}" = set; then :
5050 enableval=$enable_targets; case "${enableval}" in
5051 yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
5052 ;;
5053 no) enable_targets= ;;
5054 *) enable_targets=$enableval ;;
5055esac
81ecdfbb
RW
5056fi
5057
20e95c23 5058
783e057b 5059# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
5060# Check whether --enable-64-bit-bfd was given.
5061if test "${enable_64_bit_bfd+set}" = set; then :
5062 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
5063 yes) want64=true ;;
5064 no) want64=false ;;
81ecdfbb 5065 *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
5066esac
5067else
5068 want64=false
81ecdfbb
RW
5069fi
5070
783e057b
DJ
5071# Provide defaults for some variables set by the per-host and per-target
5072# configuration.
5073gdb_host_obs=posix-hdep.o
20e95c23 5074
783e057b
DJ
5075if test "${target}" = "${host}"; then
5076 gdb_native=yes
5077else
5078 gdb_native=no
5079fi
20e95c23 5080
783e057b 5081. $srcdir/configure.host
20e95c23 5082
783e057b 5083# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 5084
783e057b
DJ
5085TARGET_OBS=
5086all_targets=
b292c783 5087HAVE_NATIVE_GCORE_TARGET=
20e95c23 5088
783e057b 5089for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 5090do
783e057b
DJ
5091 if test "$targ_alias" = "all"; then
5092 all_targets=true
5093 else
5094 # Canonicalize the secondary target names.
5095 result=`$ac_config_sub $targ_alias 2>/dev/null`
5096 if test -n "$result"; then
5097 targ=$result
5098 else
5099 targ=$targ_alias
5100 fi
20e95c23 5101
783e057b 5102 . ${srcdir}/configure.tgt
20e95c23 5103
bf307134
JB
5104 if test -z "${gdb_target_obs}"; then :
5105 as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
5106fi
5107
783e057b
DJ
5108 # Target-specific object files
5109 for i in ${gdb_target_obs}; do
5110 case " $TARGET_OBS " in
5111 *" ${i} "*) ;;
5112 *)
5113 TARGET_OBS="$TARGET_OBS ${i}"
5114 ;;
5115 esac
5116 done
20e95c23 5117
783e057b
DJ
5118 # Check whether this target needs 64-bit CORE_ADDR
5119 if test x${want64} = xfalse; then
5120 . ${srcdir}/../bfd/config.bfd
5121 fi
b292c783
JK
5122
5123 # Check whether this target is native and supports gcore.
5124 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
5125 && $gdb_have_gcore; then
5126 HAVE_NATIVE_GCORE_TARGET=1
5127 fi
783e057b 5128 fi
20e95c23
DJ
5129done
5130
783e057b
DJ
5131if test x${all_targets} = xtrue; then
5132
5133 # We want all 64-bit targets if we either:
5134 # - run on a 64-bit host or
5135 # - already require 64-bit support for some other target or
5136 # - the --enable-64-bit-bfd option was supplied
5137 # Otherwise we only support all 32-bit targets.
5138 #
5139 # NOTE: This test must be in sync with the corresponding
5140 # tests in BFD!
20e95c23 5141
783e057b 5142 if test x${want64} = xfalse; then
81ecdfbb
RW
5143 # The cast to long int works around a bug in the HP C Compiler
5144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5146# This bug is HP SR number 8606223364.
5147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5148$as_echo_n "checking size of long... " >&6; }
5149if test "${ac_cv_sizeof_long+set}" = set; then :
5150 $as_echo_n "(cached) " >&6
c0993dbe 5151else
81ecdfbb 5152 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 5153
81ecdfbb
RW
5154else
5155 if test "$ac_cv_type_long" = yes; then
5156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5158{ as_fn_set_status 77
5159as_fn_error "cannot compute sizeof (long)
5160See \`config.log' for more details." "$LINENO" 5; }; }
5161 else
5162 ac_cv_sizeof_long=0
5163 fi
c0993dbe 5164fi
81ecdfbb 5165
c0993dbe 5166fi
81ecdfbb
RW
5167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5168$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 5169
c0993dbe 5170
c0993dbe 5171
c0993dbe
UW
5172cat >>confdefs.h <<_ACEOF
5173#define SIZEOF_LONG $ac_cv_sizeof_long
5174_ACEOF
5175
5176
5177 if test "x${ac_cv_sizeof_long}" = "x8"; then
5178 want64=true
5179 fi
5180 fi
5181 if test x${want64} = xtrue; then
5182 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
5183 else
5184 TARGET_OBS='$(ALL_TARGET_OBS)'
5185 fi
5186fi
5187
5188
5189
b292c783 5190
c0993dbe
UW
5191# For other settings, only the main target counts.
5192gdb_sim=
5193gdb_osabi=
5194build_gdbserver=
5195targ=$target; . ${srcdir}/configure.tgt
5196
5197# Fetch the default architecture and default target vector from BFD.
5198targ=$target; . $srcdir/../bfd/config.bfd
5199
5200# We only want the first architecture, so strip off the others if
5201# there is more than one.
5202targ_archs=`echo $targ_archs | sed 's/ .*//'`
5203
5204if test "x$targ_archs" != x; then
5205
5206cat >>confdefs.h <<_ACEOF
5207#define DEFAULT_BFD_ARCH $targ_archs
5208_ACEOF
5209
5210fi
5211if test "x$targ_defvec" != x; then
5212
5213cat >>confdefs.h <<_ACEOF
5214#define DEFAULT_BFD_VEC $targ_defvec
5215_ACEOF
5216
5217fi
5218
c0993dbe
UW
5219# The CLI cannot be disabled yet, but may be in the future.
5220
5221# Enable CLI.
81ecdfbb
RW
5222# Check whether --enable-gdbcli was given.
5223if test "${enable_gdbcli+set}" = set; then :
5224 enableval=$enable_gdbcli; case $enableval in
c0993dbe
UW
5225 yes)
5226 ;;
5227 no)
81ecdfbb 5228 as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
c0993dbe 5229 *)
81ecdfbb 5230 as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
c0993dbe
UW
5231 esac
5232else
5233 enable_gdbcli=yes
81ecdfbb
RW
5234fi
5235
c0993dbe
UW
5236if test x"$enable_gdbcli" = xyes; then
5237 if test -d $srcdir/cli; then
5238 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
5239 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
5240 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
5241 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
5242 fi
5243fi
5244
5245# Enable MI.
81ecdfbb
RW
5246# Check whether --enable-gdbmi was given.
5247if test "${enable_gdbmi+set}" = set; then :
5248 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
5249 yes | no)
5250 ;;
5251 *)
81ecdfbb 5252 as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
5253 esac
5254else
5255 enable_gdbmi=yes
81ecdfbb
RW
5256fi
5257
c0993dbe
UW
5258if test x"$enable_gdbmi" = xyes; then
5259 if test -d $srcdir/mi; then
5260 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
5261 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
5262 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
5263 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
5264 fi
5265fi
5266
5267# Enable TUI.
81ecdfbb
RW
5268# Check whether --enable-tui was given.
5269if test "${enable_tui+set}" = set; then :
5270 enableval=$enable_tui; case $enableval in
3ca64bd3 5271 yes | no | auto)
c0993dbe
UW
5272 ;;
5273 *)
81ecdfbb 5274 as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
5275 esac
5276else
3ca64bd3 5277 enable_tui=auto
81ecdfbb
RW
5278fi
5279
c0993dbe
UW
5280
5281# Enable gdbtk.
81ecdfbb
RW
5282# Check whether --enable-gdbtk was given.
5283if test "${enable_gdbtk+set}" = set; then :
5284 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
5285 yes | no)
5286 ;;
5287 *)
81ecdfbb 5288 as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
5289 esac
5290else
5062cc19 5291 if test -d $srcdir/gdbtk; then
c0993dbe
UW
5292 enable_gdbtk=yes
5293 else
5294 enable_gdbtk=no
5295 fi
81ecdfbb
RW
5296fi
5297
c0993dbe
UW
5298# We unconditionally disable gdbtk tests on selected platforms.
5299case $host_os in
5300 go32* | windows*)
81ecdfbb
RW
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
5302$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
5303 enable_gdbtk=no ;;
5304esac
5305
05e7c244 5306# Libunwind support for ia64.
bec39cab 5307
05e7c244
JK
5308
5309# Check whether --with-libunwind-ia64 was given.
5310if test "${with_libunwind_ia64+set}" = set; then :
5311 withval=$with_libunwind_ia64;
bec39cab 5312else
05e7c244
JK
5313 with_libunwind_ia64=auto
5314fi
bec39cab 5315
05e7c244
JK
5316
5317# Backward compatibility option.
5318if test "${with_libunwind+set}" = set; then
5319 if test x"$with_libunwind_ia64" != xauto; then
5320 as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
5321 fi
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
5323$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
5324 with_libunwind_ia64="$with_libunwind"
5325fi
5326
5327case "$with_libunwind_ia64" in
5328 yes | no)
5329 ;;
5330 auto)
5331 for ac_header in libunwind-ia64.h
81ecdfbb 5332do :
b54a8fd7
PA
5333 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5334if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5335 cat >>confdefs.h <<_ACEOF
b54a8fd7 5336#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5337_ACEOF
5338
5339fi
5340
5341done
5342
05e7c244
JK
5343 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
5344 ;;
5345 *)
5346 as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
5347 ;;
5348esac
bec39cab 5349
05e7c244 5350if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 5351 for ac_header in libunwind-ia64.h
81ecdfbb 5352do :
b54a8fd7
PA
5353 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
5354if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then :
bec39cab 5355 cat >>confdefs.h <<_ACEOF
b54a8fd7 5356#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
5357_ACEOF
5358
5359fi
5360
5361done
5362
05e7c244
JK
5363 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
5364 as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
5365 fi
5366 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
5367 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
5368 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
5369fi
5370
cb01cfba
JB
5371opt_curses=no
5372
81ecdfbb
RW
5373# Check whether --with-curses was given.
5374if test "${with_curses+set}" = set; then :
5375 withval=$with_curses; opt_curses=$withval
5376fi
5377
cb01cfba 5378
76a39ba7 5379prefer_curses=no
cb01cfba 5380if test "$opt_curses" = "yes"; then
76a39ba7 5381 prefer_curses=yes
cb01cfba
JB
5382fi
5383
a9322a30 5384# Profiling support.
81ecdfbb
RW
5385# Check whether --enable-profiling was given.
5386if test "${enable_profiling+set}" = set; then :
5387 enableval=$enable_profiling; case $enableval in
a9322a30
TT
5388 yes | no)
5389 ;;
5390 *)
81ecdfbb 5391 as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
5392 esac
5393else
5394 enable_profiling=no
81ecdfbb 5395fi
bec39cab 5396
a9322a30
TT
5397
5398for ac_func in monstartup _mcleanup
81ecdfbb
RW
5399do :
5400 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5401ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5402eval as_val=\$$as_ac_var
5403 if test "x$as_val" = x""yes; then :
5404 cat >>confdefs.h <<_ACEOF
5405#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 5406_ACEOF
a9322a30 5407
81ecdfbb
RW
5408fi
5409done
a9322a30 5410
81ecdfbb
RW
5411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
5412$as_echo_n "checking for _etext... " >&6; }
5413if test "${ac_cv_var__etext+set}" = set; then :
5414 $as_echo_n "(cached) " >&6
5415else
5416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5417/* end confdefs.h. */
5418#include <stdlib.h>
5419extern char _etext;
a9322a30
TT
5420
5421int
5422main ()
5423{
5424free (&_etext);
5425 ;
5426 return 0;
5427}
bec39cab 5428_ACEOF
81ecdfbb 5429if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5430 ac_cv_var__etext=yes
bec39cab 5431else
81ecdfbb 5432 ac_cv_var__etext=no
bec39cab 5433fi
81ecdfbb
RW
5434rm -f core conftest.err conftest.$ac_objext \
5435 conftest$ac_exeext conftest.$ac_ext
bec39cab 5436fi
81ecdfbb
RW
5437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
5438$as_echo "$ac_cv_var__etext" >&6; }
a9322a30 5439if test $ac_cv_var__etext = yes; then
60ca704f 5440
81ecdfbb 5441$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 5442
bec39cab 5443fi
81ecdfbb
RW
5444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
5445$as_echo_n "checking for etext... " >&6; }
5446if test "${ac_cv_var_etext+set}" = set; then :
5447 $as_echo_n "(cached) " >&6
bec39cab 5448else
81ecdfbb 5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5450/* end confdefs.h. */
a9322a30
TT
5451#include <stdlib.h>
5452extern char etext;
bec39cab
AC
5453
5454int
5455main ()
5456{
a9322a30 5457free (&etext);
bec39cab
AC
5458 ;
5459 return 0;
5460}
5461_ACEOF
81ecdfbb 5462if ac_fn_c_try_link "$LINENO"; then :
a9322a30 5463 ac_cv_var_etext=yes
bec39cab 5464else
81ecdfbb 5465 ac_cv_var_etext=no
bec39cab 5466fi
81ecdfbb
RW
5467rm -f core conftest.err conftest.$ac_objext \
5468 conftest$ac_exeext conftest.$ac_ext
bec39cab 5469fi
81ecdfbb
RW
5470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
5471$as_echo "$ac_cv_var_etext" >&6; }
a9322a30
TT
5472if test $ac_cv_var_etext = yes; then
5473
81ecdfbb 5474$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
5475
5476fi
a9322a30
TT
5477if test "$enable_profiling" = yes ; then
5478 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
81ecdfbb 5479 as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
5480 fi
5481 PROFILE_CFLAGS=-pg
5482 OLD_CFLAGS="$CFLAGS"
5483 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 5484
81ecdfbb
RW
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
5486$as_echo_n "checking whether $CC supports -pg... " >&6; }
5487if test "${ac_cv_cc_supports_pg+set}" = set; then :
5488 $as_echo_n "(cached) " >&6
bec39cab 5489else
81ecdfbb 5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 5491/* end confdefs.h. */
bec39cab
AC
5492
5493int
5494main ()
5495{
a9322a30 5496int x;
bec39cab
AC
5497 ;
5498 return 0;
5499}
5500_ACEOF
81ecdfbb 5501if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 5502 ac_cv_cc_supports_pg=yes
bec39cab 5503else
81ecdfbb 5504 ac_cv_cc_supports_pg=no
bec39cab 5505fi
81ecdfbb 5506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 5507fi
81ecdfbb
RW
5508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
5509$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 5510
a9322a30 5511 if test $ac_cv_cc_supports_pg = no; then
81ecdfbb 5512 as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 5513 fi
bec39cab 5514
a9322a30 5515 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
5516fi
5517
c16158bc
JM
5518
5519
81ecdfbb
RW
5520# Check whether --with-pkgversion was given.
5521if test "${with_pkgversion+set}" = set; then :
5522 withval=$with_pkgversion; case "$withval" in
5523 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
5524 no) PKGVERSION= ;;
5525 *) PKGVERSION="($withval) " ;;
5526 esac
5527else
5528 PKGVERSION="(GDB) "
5529
81ecdfbb 5530fi
c16158bc
JM
5531
5532
5533
5534
81ecdfbb
RW
5535
5536# Check whether --with-bugurl was given.
5537if test "${with_bugurl+set}" = set; then :
5538 withval=$with_bugurl; case "$withval" in
5539 yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
5540 no) BUGURL=
5541 ;;
5542 *) BUGURL="$withval"
5543 ;;
5544 esac
5545else
5546 BUGURL="http://www.gnu.org/software/gdb/bugs/"
5547
81ecdfbb
RW
5548fi
5549
c16158bc
JM
5550 case ${BUGURL} in
5551 "")
5552 REPORT_BUGS_TO=
5553 REPORT_BUGS_TEXI=
5554 ;;
5555 *)
5556 REPORT_BUGS_TO="<$BUGURL>"
5557 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
5558 ;;
5559 esac;
5560
5561
5562
5563
5564cat >>confdefs.h <<_ACEOF
5565#define PKGVERSION "$PKGVERSION"
5566_ACEOF
5567
5568
5569cat >>confdefs.h <<_ACEOF
5570#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
5571_ACEOF
5572
5573
bec39cab
AC
5574# --------------------- #
5575# Checks for programs. #
5576# --------------------- #
5577
5578for ac_prog in gawk mawk nawk awk
5579do
5580 # Extract the first word of "$ac_prog", so it can be a program name with args.
5581set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583$as_echo_n "checking for $ac_word... " >&6; }
5584if test "${ac_cv_prog_AWK+set}" = set; then :
5585 $as_echo_n "(cached) " >&6
bec39cab
AC
5586else
5587 if test -n "$AWK"; then
5588 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5589else
5590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5591for as_dir in $PATH
5592do
5593 IFS=$as_save_IFS
5594 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5595 for ac_exec_ext in '' $ac_executable_extensions; do
5596 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5597 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 5598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5599 break 2
5600 fi
5601done
81ecdfbb
RW
5602 done
5603IFS=$as_save_IFS
bec39cab
AC
5604
5605fi
5606fi
5607AWK=$ac_cv_prog_AWK
5608if test -n "$AWK"; then
81ecdfbb
RW
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5610$as_echo "$AWK" >&6; }
bec39cab 5611else
81ecdfbb
RW
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5613$as_echo "no" >&6; }
bec39cab
AC
5614fi
5615
bec39cab 5616
81ecdfbb 5617 test -n "$AWK" && break
bec39cab
AC
5618done
5619
c971b7fa
PA
5620# Find a good install program. We prefer a C program (faster),
5621# so one script is as good as another. But avoid the broken or
5622# incompatible versions:
5623# SysV /etc/install, /usr/sbin/install
5624# SunOS /usr/etc/install
5625# IRIX /sbin/install
5626# AIX /bin/install
5627# AmigaOS /C/install, which installs bootblocks on floppy discs
5628# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5629# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5630# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5631# OS/2's system install, which has a completely different semantic
5632# ./install, which can be erroneously created by make from ./install.sh.
5633# Reject install programs that cannot install multiple files.
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5635$as_echo_n "checking for a BSD-compatible install... " >&6; }
5636if test -z "$INSTALL"; then
5637if test "${ac_cv_path_install+set}" = set; then :
5638 $as_echo_n "(cached) " >&6
5639else
5640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641for as_dir in $PATH
5642do
5643 IFS=$as_save_IFS
5644 test -z "$as_dir" && as_dir=.
5645 # Account for people who put trailing slashes in PATH elements.
5646case $as_dir/ in #((
5647 ./ | .// | /[cC]/* | \
5648 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5649 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5650 /usr/ucb/* ) ;;
5651 *)
5652 # OSF1 and SCO ODT 3.0 have their own names for install.
5653 # Don't use installbsd from OSF since it installs stuff as root
5654 # by default.
5655 for ac_prog in ginstall scoinst install; do
5656 for ac_exec_ext in '' $ac_executable_extensions; do
5657 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5658 if test $ac_prog = install &&
5659 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5660 # AIX install. It has an incompatible calling convention.
5661 :
5662 elif test $ac_prog = install &&
5663 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5664 # program-specific install script used by HP pwplus--don't use.
5665 :
5666 else
5667 rm -rf conftest.one conftest.two conftest.dir
5668 echo one > conftest.one
5669 echo two > conftest.two
5670 mkdir conftest.dir
5671 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5672 test -s conftest.one && test -s conftest.two &&
5673 test -s conftest.dir/conftest.one &&
5674 test -s conftest.dir/conftest.two
5675 then
5676 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5677 break 3
5678 fi
5679 fi
5680 fi
5681 done
5682 done
5683 ;;
5684esac
5685
5686 done
5687IFS=$as_save_IFS
5688
5689rm -rf conftest.one conftest.two conftest.dir
5690
5691fi
5692 if test "${ac_cv_path_install+set}" = set; then
5693 INSTALL=$ac_cv_path_install
5694 else
5695 # As a last resort, use the slow shell script. Don't cache a
5696 # value for INSTALL within a source directory, because that will
5697 # break other packages using the cache if that directory is
5698 # removed, or if the value is a relative name.
5699 INSTALL=$ac_install_sh
5700 fi
5701fi
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5703$as_echo "$INSTALL" >&6; }
5704
5705# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5706# It thinks the first close brace ends the variable substitution.
5707test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5708
5709test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5710
5711test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 5712
81ecdfbb
RW
5713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5714$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
5715LN_S=$as_ln_s
5716if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5718$as_echo "yes" >&6; }
bec39cab 5719else
81ecdfbb
RW
5720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5721$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
5722fi
5723
5724if test -n "$ac_tool_prefix"; then
5725 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5726set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
5727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5728$as_echo_n "checking for $ac_word... " >&6; }
5729if test "${ac_cv_prog_RANLIB+set}" = set; then :
5730 $as_echo_n "(cached) " >&6
bec39cab
AC
5731else
5732 if test -n "$RANLIB"; then
5733 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5734else
5735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736for as_dir in $PATH
5737do
5738 IFS=$as_save_IFS
5739 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5740 for ac_exec_ext in '' $ac_executable_extensions; do
5741 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5742 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 5743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5744 break 2
5745 fi
5746done
81ecdfbb
RW
5747 done
5748IFS=$as_save_IFS
bec39cab
AC
5749
5750fi
5751fi
5752RANLIB=$ac_cv_prog_RANLIB
5753if test -n "$RANLIB"; then
81ecdfbb
RW
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5755$as_echo "$RANLIB" >&6; }
bec39cab 5756else
81ecdfbb
RW
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758$as_echo "no" >&6; }
bec39cab
AC
5759fi
5760
81ecdfbb 5761
bec39cab
AC
5762fi
5763if test -z "$ac_cv_prog_RANLIB"; then
5764 ac_ct_RANLIB=$RANLIB
5765 # Extract the first word of "ranlib", so it can be a program name with args.
5766set dummy ranlib; ac_word=$2
81ecdfbb
RW
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768$as_echo_n "checking for $ac_word... " >&6; }
5769if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5770 $as_echo_n "(cached) " >&6
bec39cab
AC
5771else
5772 if test -n "$ac_ct_RANLIB"; then
5773 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5774else
5775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5776for as_dir in $PATH
5777do
5778 IFS=$as_save_IFS
5779 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5780 for ac_exec_ext in '' $ac_executable_extensions; do
5781 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5782 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 5783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5784 break 2
5785 fi
5786done
81ecdfbb
RW
5787 done
5788IFS=$as_save_IFS
bec39cab 5789
bec39cab
AC
5790fi
5791fi
5792ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5793if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5795$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 5796else
81ecdfbb
RW
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5798$as_echo "no" >&6; }
bec39cab
AC
5799fi
5800
81ecdfbb
RW
5801 if test "x$ac_ct_RANLIB" = x; then
5802 RANLIB=":"
5803 else
5804 case $cross_compiling:$ac_tool_warned in
5805yes:)
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5807$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5808ac_tool_warned=yes ;;
5809esac
5810 RANLIB=$ac_ct_RANLIB
5811 fi
bec39cab
AC
5812else
5813 RANLIB="$ac_cv_prog_RANLIB"
5814fi
5815
5816for ac_prog in 'bison -y' byacc
5817do
5818 # Extract the first word of "$ac_prog", so it can be a program name with args.
5819set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
5820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5821$as_echo_n "checking for $ac_word... " >&6; }
5822if test "${ac_cv_prog_YACC+set}" = set; then :
5823 $as_echo_n "(cached) " >&6
bec39cab
AC
5824else
5825 if test -n "$YACC"; then
5826 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5827else
5828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829for as_dir in $PATH
5830do
5831 IFS=$as_save_IFS
5832 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5833 for ac_exec_ext in '' $ac_executable_extensions; do
5834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5835 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 5836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5837 break 2
5838 fi
5839done
81ecdfbb
RW
5840 done
5841IFS=$as_save_IFS
bec39cab
AC
5842
5843fi
5844fi
5845YACC=$ac_cv_prog_YACC
5846if test -n "$YACC"; then
81ecdfbb
RW
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5848$as_echo "$YACC" >&6; }
bec39cab 5849else
81ecdfbb
RW
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5851$as_echo "no" >&6; }
bec39cab
AC
5852fi
5853
81ecdfbb 5854
bec39cab
AC
5855 test -n "$YACC" && break
5856done
5857test -n "$YACC" || YACC="yacc"
5858
5859
5860if test -n "$ac_tool_prefix"; then
5861 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5862set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if test "${ac_cv_prog_AR+set}" = set; then :
5866 $as_echo_n "(cached) " >&6
bec39cab
AC
5867else
5868 if test -n "$AR"; then
5869 ac_cv_prog_AR="$AR" # Let the user override the test.
5870else
5871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5872for as_dir in $PATH
5873do
5874 IFS=$as_save_IFS
5875 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5876 for ac_exec_ext in '' $ac_executable_extensions; do
5877 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5878 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 5879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5880 break 2
5881 fi
5882done
81ecdfbb
RW
5883 done
5884IFS=$as_save_IFS
bec39cab
AC
5885
5886fi
5887fi
5888AR=$ac_cv_prog_AR
5889if test -n "$AR"; then
81ecdfbb
RW
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5891$as_echo "$AR" >&6; }
bec39cab 5892else
81ecdfbb
RW
5893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894$as_echo "no" >&6; }
bec39cab
AC
5895fi
5896
81ecdfbb 5897
bec39cab
AC
5898fi
5899if test -z "$ac_cv_prog_AR"; then
5900 ac_ct_AR=$AR
5901 # Extract the first word of "ar", so it can be a program name with args.
5902set dummy ar; ac_word=$2
81ecdfbb
RW
5903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5904$as_echo_n "checking for $ac_word... " >&6; }
5905if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5906 $as_echo_n "(cached) " >&6
bec39cab
AC
5907else
5908 if test -n "$ac_ct_AR"; then
5909 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5910else
5911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5912for as_dir in $PATH
5913do
5914 IFS=$as_save_IFS
5915 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5916 for ac_exec_ext in '' $ac_executable_extensions; do
5917 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5918 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 5919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5920 break 2
5921 fi
5922done
81ecdfbb
RW
5923 done
5924IFS=$as_save_IFS
bec39cab
AC
5925
5926fi
5927fi
5928ac_ct_AR=$ac_cv_prog_ac_ct_AR
5929if test -n "$ac_ct_AR"; then
81ecdfbb
RW
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5931$as_echo "$ac_ct_AR" >&6; }
bec39cab 5932else
81ecdfbb
RW
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5934$as_echo "no" >&6; }
bec39cab
AC
5935fi
5936
81ecdfbb
RW
5937 if test "x$ac_ct_AR" = x; then
5938 AR=""
5939 else
5940 case $cross_compiling:$ac_tool_warned in
5941yes:)
5942{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5943$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5944ac_tool_warned=yes ;;
5945esac
5946 AR=$ac_ct_AR
5947 fi
bec39cab
AC
5948else
5949 AR="$ac_cv_prog_AR"
5950fi
5951
5952if test -n "$ac_tool_prefix"; then
5953 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5954set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956$as_echo_n "checking for $ac_word... " >&6; }
5957if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
5958 $as_echo_n "(cached) " >&6
bec39cab
AC
5959else
5960 if test -n "$DLLTOOL"; then
5961 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5962else
5963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5964for as_dir in $PATH
5965do
5966 IFS=$as_save_IFS
5967 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
5968 for ac_exec_ext in '' $ac_executable_extensions; do
5969 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 5970 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 5971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
5972 break 2
5973 fi
5974done
81ecdfbb
RW
5975 done
5976IFS=$as_save_IFS
bec39cab
AC
5977
5978fi
5979fi
5980DLLTOOL=$ac_cv_prog_DLLTOOL
5981if test -n "$DLLTOOL"; then
81ecdfbb
RW
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5983$as_echo "$DLLTOOL" >&6; }
bec39cab 5984else
81ecdfbb
RW
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }
bec39cab
AC
5987fi
5988
81ecdfbb 5989
bec39cab
AC
5990fi
5991if test -z "$ac_cv_prog_DLLTOOL"; then
5992 ac_ct_DLLTOOL=$DLLTOOL
5993 # Extract the first word of "dlltool", so it can be a program name with args.
5994set dummy dlltool; ac_word=$2
81ecdfbb
RW
5995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996$as_echo_n "checking for $ac_word... " >&6; }
5997if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
5998 $as_echo_n "(cached) " >&6
bec39cab
AC
5999else
6000 if test -n "$ac_ct_DLLTOOL"; then
6001 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6002else
6003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006 IFS=$as_save_IFS
6007 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6008 for ac_exec_ext in '' $ac_executable_extensions; do
6009 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6010 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 6011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6012 break 2
6013 fi
6014done
81ecdfbb
RW
6015 done
6016IFS=$as_save_IFS
bec39cab
AC
6017
6018fi
6019fi
6020ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6021if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6023$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 6024else
81ecdfbb
RW
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026$as_echo "no" >&6; }
bec39cab
AC
6027fi
6028
81ecdfbb
RW
6029 if test "x$ac_ct_DLLTOOL" = x; then
6030 DLLTOOL=""
6031 else
6032 case $cross_compiling:$ac_tool_warned in
6033yes:)
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6035$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6036ac_tool_warned=yes ;;
6037esac
6038 DLLTOOL=$ac_ct_DLLTOOL
6039 fi
bec39cab
AC
6040else
6041 DLLTOOL="$ac_cv_prog_DLLTOOL"
6042fi
6043
6044if test -n "$ac_tool_prefix"; then
6045 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6046set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6048$as_echo_n "checking for $ac_word... " >&6; }
6049if test "${ac_cv_prog_WINDRES+set}" = set; then :
6050 $as_echo_n "(cached) " >&6
bec39cab
AC
6051else
6052 if test -n "$WINDRES"; then
6053 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6054else
6055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056for as_dir in $PATH
6057do
6058 IFS=$as_save_IFS
6059 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6060 for ac_exec_ext in '' $ac_executable_extensions; do
6061 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6062 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 6063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6064 break 2
6065 fi
6066done
81ecdfbb
RW
6067 done
6068IFS=$as_save_IFS
bec39cab
AC
6069
6070fi
6071fi
6072WINDRES=$ac_cv_prog_WINDRES
6073if test -n "$WINDRES"; then
81ecdfbb
RW
6074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
6075$as_echo "$WINDRES" >&6; }
bec39cab 6076else
81ecdfbb
RW
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078$as_echo "no" >&6; }
bec39cab
AC
6079fi
6080
81ecdfbb 6081
bec39cab
AC
6082fi
6083if test -z "$ac_cv_prog_WINDRES"; then
6084 ac_ct_WINDRES=$WINDRES
6085 # Extract the first word of "windres", so it can be a program name with args.
6086set dummy windres; ac_word=$2
81ecdfbb
RW
6087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6088$as_echo_n "checking for $ac_word... " >&6; }
6089if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
6090 $as_echo_n "(cached) " >&6
bec39cab
AC
6091else
6092 if test -n "$ac_ct_WINDRES"; then
6093 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6094else
6095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6096for as_dir in $PATH
6097do
6098 IFS=$as_save_IFS
6099 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6100 for ac_exec_ext in '' $ac_executable_extensions; do
6101 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6102 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 6103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6104 break 2
6105 fi
6106done
81ecdfbb
RW
6107 done
6108IFS=$as_save_IFS
bec39cab
AC
6109
6110fi
6111fi
6112ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6113if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
6115$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 6116else
81ecdfbb
RW
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6118$as_echo "no" >&6; }
c906108c 6119fi
bec39cab 6120
81ecdfbb
RW
6121 if test "x$ac_ct_WINDRES" = x; then
6122 WINDRES=""
6123 else
6124 case $cross_compiling:$ac_tool_warned in
6125yes:)
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6128ac_tool_warned=yes ;;
6129esac
6130 WINDRES=$ac_ct_WINDRES
6131 fi
c906108c 6132else
bec39cab 6133 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
6134fi
6135
bec39cab 6136
036c3acb
TS
6137case $host_os in
6138 gnu*)
6139 # Needed for GNU Hurd hosts.
6140 if test -n "$ac_tool_prefix"; then
bec39cab
AC
6141 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
6142set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6144$as_echo_n "checking for $ac_word... " >&6; }
6145if test "${ac_cv_prog_MIG+set}" = set; then :
6146 $as_echo_n "(cached) " >&6
c906108c 6147else
bec39cab
AC
6148 if test -n "$MIG"; then
6149 ac_cv_prog_MIG="$MIG" # Let the user override the test.
6150else
6151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6152for as_dir in $PATH
6153do
6154 IFS=$as_save_IFS
6155 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6156 for ac_exec_ext in '' $ac_executable_extensions; do
6157 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6158 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 6159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6160 break 2
6161 fi
6162done
81ecdfbb
RW
6163 done
6164IFS=$as_save_IFS
bec39cab 6165
c906108c 6166fi
bec39cab
AC
6167fi
6168MIG=$ac_cv_prog_MIG
6169if test -n "$MIG"; then
81ecdfbb
RW
6170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
6171$as_echo "$MIG" >&6; }
c906108c 6172else
81ecdfbb
RW
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6174$as_echo "no" >&6; }
c906108c
SS
6175fi
6176
81ecdfbb 6177
bec39cab
AC
6178fi
6179if test -z "$ac_cv_prog_MIG"; then
6180 ac_ct_MIG=$MIG
6181 # Extract the first word of "mig", so it can be a program name with args.
6182set dummy mig; ac_word=$2
81ecdfbb
RW
6183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6184$as_echo_n "checking for $ac_word... " >&6; }
6185if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then :
6186 $as_echo_n "(cached) " >&6
bec39cab
AC
6187else
6188 if test -n "$ac_ct_MIG"; then
6189 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
6190else
6191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192for as_dir in $PATH
6193do
6194 IFS=$as_save_IFS
6195 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
6196 for ac_exec_ext in '' $ac_executable_extensions; do
6197 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
bec39cab 6198 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 6199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
6200 break 2
6201 fi
6202done
81ecdfbb
RW
6203 done
6204IFS=$as_save_IFS
c906108c 6205
bec39cab
AC
6206fi
6207fi
6208ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
6209if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
6211$as_echo "$ac_ct_MIG" >&6; }
bec39cab 6212else
81ecdfbb
RW
6213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6214$as_echo "no" >&6; }
bec39cab 6215fi
c906108c 6216
81ecdfbb
RW
6217 if test "x$ac_ct_MIG" = x; then
6218 MIG=""
6219 else
6220 case $cross_compiling:$ac_tool_warned in
6221yes:)
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6223$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6224ac_tool_warned=yes ;;
6225esac
6226 MIG=$ac_ct_MIG
6227 fi
bec39cab
AC
6228else
6229 MIG="$ac_cv_prog_MIG"
6230fi
c906108c 6231
036c3acb
TS
6232 if test x"$MIG" = x; then
6233 as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5
6234 fi
6235 ;;
6236esac
c906108c 6237
bec39cab
AC
6238# ---------------------- #
6239# Checks for libraries. #
6240# ---------------------- #
c906108c 6241
bec39cab 6242# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
6243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
6244$as_echo_n "checking for main in -lm... " >&6; }
6245if test "${ac_cv_lib_m_main+set}" = set; then :
6246 $as_echo_n "(cached) " >&6
bec39cab
AC
6247else
6248 ac_check_lib_save_LIBS=$LIBS
6249LIBS="-lm $LIBS"
81ecdfbb 6250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6251/* end confdefs.h. */
c906108c 6252
c906108c 6253
bec39cab
AC
6254int
6255main ()
6256{
81ecdfbb 6257return main ();
bec39cab
AC
6258 ;
6259 return 0;
6260}
6261_ACEOF
81ecdfbb 6262if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6263 ac_cv_lib_m_main=yes
6264else
81ecdfbb 6265 ac_cv_lib_m_main=no
bec39cab 6266fi
81ecdfbb
RW
6267rm -f core conftest.err conftest.$ac_objext \
6268 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6269LIBS=$ac_check_lib_save_LIBS
6270fi
81ecdfbb
RW
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
6272$as_echo "$ac_cv_lib_m_main" >&6; }
6273if test "x$ac_cv_lib_m_main" = x""yes; then :
bec39cab
AC
6274 cat >>confdefs.h <<_ACEOF
6275#define HAVE_LIBM 1
6276_ACEOF
6277
6278 LIBS="-lm $LIBS"
c906108c 6279
c906108c 6280fi
bec39cab
AC
6281
6282
6283# We need to link with -lw to get `wctype' on Solaris before Solaris
6284# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
6285# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
6286# is known to have this problem). Therefore we avoid libw if we can.
81ecdfbb
RW
6287ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
6288if test "x$ac_cv_func_wctype" = x""yes; then :
bec39cab 6289
c906108c 6290else
81ecdfbb
RW
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5
6292$as_echo_n "checking for wctype in -lw... " >&6; }
6293if test "${ac_cv_lib_w_wctype+set}" = set; then :
6294 $as_echo_n "(cached) " >&6
bec39cab
AC
6295else
6296 ac_check_lib_save_LIBS=$LIBS
6297LIBS="-lw $LIBS"
81ecdfbb 6298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6299/* end confdefs.h. */
c906108c 6300
81ecdfbb
RW
6301/* Override any GCC internal prototype to avoid an error.
6302 Use char because int might match the return type of a GCC
6303 builtin and then its argument prototype would still apply. */
bec39cab
AC
6304#ifdef __cplusplus
6305extern "C"
6306#endif
bec39cab
AC
6307char wctype ();
6308int
6309main ()
6310{
81ecdfbb 6311return wctype ();
bec39cab
AC
6312 ;
6313 return 0;
6314}
6315_ACEOF
81ecdfbb 6316if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
6317 ac_cv_lib_w_wctype=yes
6318else
81ecdfbb 6319 ac_cv_lib_w_wctype=no
bec39cab 6320fi
81ecdfbb
RW
6321rm -f core conftest.err conftest.$ac_objext \
6322 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
6323LIBS=$ac_check_lib_save_LIBS
6324fi
81ecdfbb
RW
6325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5
6326$as_echo "$ac_cv_lib_w_wctype" >&6; }
6327if test "x$ac_cv_lib_w_wctype" = x""yes; then :
bec39cab
AC
6328 cat >>confdefs.h <<_ACEOF
6329#define HAVE_LIBW 1
6330_ACEOF
c906108c 6331
bec39cab 6332 LIBS="-lw $LIBS"
c906108c 6333
bec39cab 6334fi
c906108c 6335
bec39cab 6336fi
c906108c 6337
ddc9cd0f 6338
bec39cab 6339# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
6340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
6341$as_echo_n "checking for library containing gethostbyname... " >&6; }
6342if test "${ac_cv_search_gethostbyname+set}" = set; then :
6343 $as_echo_n "(cached) " >&6
bec39cab
AC
6344else
6345 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6347/* end confdefs.h. */
ddc9cd0f 6348
81ecdfbb
RW
6349/* Override any GCC internal prototype to avoid an error.
6350 Use char because int might match the return type of a GCC
6351 builtin and then its argument prototype would still apply. */
bec39cab
AC
6352#ifdef __cplusplus
6353extern "C"
6354#endif
bec39cab
AC
6355char gethostbyname ();
6356int
6357main ()
6358{
81ecdfbb 6359return gethostbyname ();
bec39cab
AC
6360 ;
6361 return 0;
6362}
6363_ACEOF
81ecdfbb
RW
6364for ac_lib in '' nsl; do
6365 if test -z "$ac_lib"; then
6366 ac_res="none required"
6367 else
6368 ac_res=-l$ac_lib
b4e70030 6369 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6370 fi
6371 if ac_fn_c_try_link "$LINENO"; then :
6372 ac_cv_search_gethostbyname=$ac_res
6373fi
6374rm -f core conftest.err conftest.$ac_objext \
6375 conftest$ac_exeext
6376 if test "${ac_cv_search_gethostbyname+set}" = set; then :
6377 break
6378fi
6379done
6380if test "${ac_cv_search_gethostbyname+set}" = set; then :
ddc9cd0f 6381
bec39cab 6382else
81ecdfbb 6383 ac_cv_search_gethostbyname=no
bec39cab 6384fi
81ecdfbb 6385rm conftest.$ac_ext
bec39cab
AC
6386LIBS=$ac_func_search_save_LIBS
6387fi
81ecdfbb
RW
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
6389$as_echo "$ac_cv_search_gethostbyname" >&6; }
6390ac_res=$ac_cv_search_gethostbyname
6391if test "$ac_res" != no; then :
6392 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 6393
bec39cab 6394fi
96baa820 6395
c906108c 6396
b4e70030 6397# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
6399$as_echo_n "checking for library containing socketpair... " >&6; }
6400if test "${ac_cv_search_socketpair+set}" = set; then :
6401 $as_echo_n "(cached) " >&6
b4e70030
JB
6402else
6403 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6405/* end confdefs.h. */
6406
81ecdfbb
RW
6407/* Override any GCC internal prototype to avoid an error.
6408 Use char because int might match the return type of a GCC
6409 builtin and then its argument prototype would still apply. */
b4e70030
JB
6410#ifdef __cplusplus
6411extern "C"
6412#endif
b4e70030
JB
6413char socketpair ();
6414int
6415main ()
6416{
81ecdfbb 6417return socketpair ();
b4e70030
JB
6418 ;
6419 return 0;
6420}
6421_ACEOF
81ecdfbb
RW
6422for ac_lib in '' socket; do
6423 if test -z "$ac_lib"; then
6424 ac_res="none required"
6425 else
6426 ac_res=-l$ac_lib
b4e70030 6427 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6428 fi
6429 if ac_fn_c_try_link "$LINENO"; then :
6430 ac_cv_search_socketpair=$ac_res
6431fi
6432rm -f core conftest.err conftest.$ac_objext \
6433 conftest$ac_exeext
6434 if test "${ac_cv_search_socketpair+set}" = set; then :
6435 break
6436fi
6437done
6438if test "${ac_cv_search_socketpair+set}" = set; then :
b4e70030 6439
b4e70030 6440else
81ecdfbb 6441 ac_cv_search_socketpair=no
b4e70030 6442fi
81ecdfbb 6443rm conftest.$ac_ext
b4e70030
JB
6444LIBS=$ac_func_search_save_LIBS
6445fi
81ecdfbb
RW
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
6447$as_echo "$ac_cv_search_socketpair" >&6; }
6448ac_res=$ac_cv_search_socketpair
6449if test "$ac_res" != no; then :
6450 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
6451
6452fi
6453
6454
233a11ab 6455# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30
JB
6456
6457 # See if the user specified whether he wants zlib support or not.
6458
6459# Check whether --with-zlib was given.
6460if test "${with_zlib+set}" = set; then :
6461 withval=$with_zlib;
6462else
6463 with_zlib=auto
6464fi
6465
6466
6467 if test "$with_zlib" != "no"; then
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
81ecdfbb
RW
6469$as_echo_n "checking for library containing zlibVersion... " >&6; }
6470if test "${ac_cv_search_zlibVersion+set}" = set; then :
6471 $as_echo_n "(cached) " >&6
233a11ab
CS
6472else
6473 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
233a11ab
CS
6475/* end confdefs.h. */
6476
81ecdfbb
RW
6477/* Override any GCC internal prototype to avoid an error.
6478 Use char because int might match the return type of a GCC
233a11ab 6479 builtin and then its argument prototype would still apply. */
233a11ab
CS
6480#ifdef __cplusplus
6481extern "C"
6482#endif
233a11ab
CS
6483char zlibVersion ();
6484int
6485main ()
6486{
81ecdfbb 6487return zlibVersion ();
233a11ab
CS
6488 ;
6489 return 0;
6490}
6491_ACEOF
81ecdfbb
RW
6492for ac_lib in '' z; do
6493 if test -z "$ac_lib"; then
6494 ac_res="none required"
233a11ab 6495 else
81ecdfbb
RW
6496 ac_res=-l$ac_lib
6497 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
233a11ab 6498 fi
81ecdfbb
RW
6499 if ac_fn_c_try_link "$LINENO"; then :
6500 ac_cv_search_zlibVersion=$ac_res
233a11ab 6501fi
81ecdfbb
RW
6502rm -f core conftest.err conftest.$ac_objext \
6503 conftest$ac_exeext
6504 if test "${ac_cv_search_zlibVersion+set}" = set; then :
6505 break
233a11ab 6506fi
81ecdfbb
RW
6507done
6508if test "${ac_cv_search_zlibVersion+set}" = set; then :
233a11ab 6509
233a11ab 6510else
81ecdfbb 6511 ac_cv_search_zlibVersion=no
233a11ab 6512fi
81ecdfbb
RW
6513rm conftest.$ac_ext
6514LIBS=$ac_func_search_save_LIBS
233a11ab 6515fi
81ecdfbb
RW
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
6517$as_echo "$ac_cv_search_zlibVersion" >&6; }
6518ac_res=$ac_cv_search_zlibVersion
6519if test "$ac_res" != no; then :
6520 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6521 for ac_header in zlib.h
6522do :
6523 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
6524if test "x$ac_cv_header_zlib_h" = x""yes; then :
233a11ab 6525 cat >>confdefs.h <<_ACEOF
81ecdfbb 6526#define HAVE_ZLIB_H 1
233a11ab
CS
6527_ACEOF
6528
6529fi
6530
6531done
6532
6533fi
6534
b040ad30
JB
6535 if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
6536 as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
6537 fi
6538 fi
6539
233a11ab 6540
77f120bf 6541# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
81ecdfbb
RW
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5
6543$as_echo_n "checking for library containing dlgetmodinfo... " >&6; }
6544if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6545 $as_echo_n "(cached) " >&6
bec39cab
AC
6546else
6547 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6549/* end confdefs.h. */
c906108c 6550
81ecdfbb
RW
6551/* Override any GCC internal prototype to avoid an error.
6552 Use char because int might match the return type of a GCC
6553 builtin and then its argument prototype would still apply. */
bec39cab
AC
6554#ifdef __cplusplus
6555extern "C"
6556#endif
77f120bf 6557char dlgetmodinfo ();
bec39cab
AC
6558int
6559main ()
6560{
81ecdfbb 6561return dlgetmodinfo ();
bec39cab
AC
6562 ;
6563 return 0;
6564}
6565_ACEOF
81ecdfbb
RW
6566for ac_lib in '' dl xpdl; do
6567 if test -z "$ac_lib"; then
6568 ac_res="none required"
6569 else
6570 ac_res=-l$ac_lib
b4e70030 6571 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
6572 fi
6573 if ac_fn_c_try_link "$LINENO"; then :
6574 ac_cv_search_dlgetmodinfo=$ac_res
6575fi
6576rm -f core conftest.err conftest.$ac_objext \
6577 conftest$ac_exeext
6578 if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
6579 break
6580fi
6581done
6582if test "${ac_cv_search_dlgetmodinfo+set}" = set; then :
b4e70030 6583
4e8d927d 6584else
81ecdfbb 6585 ac_cv_search_dlgetmodinfo=no
1ba607ad 6586fi
81ecdfbb 6587rm conftest.$ac_ext
bec39cab
AC
6588LIBS=$ac_func_search_save_LIBS
6589fi
81ecdfbb
RW
6590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5
6591$as_echo "$ac_cv_search_dlgetmodinfo" >&6; }
6592ac_res=$ac_cv_search_dlgetmodinfo
6593if test "$ac_res" != no; then :
6594 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
c906108c 6595
8bb2c122 6596fi
8bb2c122 6597
8bb2c122 6598
77f120bf 6599
77f120bf 6600
6c7a06a3 6601
81ecdfbb
RW
6602# Check whether --with-libiconv-prefix was given.
6603if test "${with_libiconv_prefix+set}" = set; then :
6604 withval=$with_libiconv_prefix;
6c7a06a3 6605 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
6606 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
6607 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
6608 done
6609
81ecdfbb
RW
6610fi
6611
6c7a06a3 6612
f18c4681 6613 BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs"
6c7a06a3
TT
6614 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
6615
81ecdfbb
RW
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
6617$as_echo_n "checking for iconv... " >&6; }
6618if test "${am_cv_func_iconv+set}" = set; then :
6619 $as_echo_n "(cached) " >&6
d542061a 6620else
6c7a06a3
TT
6621
6622 am_cv_func_iconv="no, consider installing GNU libiconv"
6623 am_cv_lib_iconv=no
6624 am_cv_use_build_libiconv=no
f0f20949 6625 am_cv_build_libiconv_path=
4edb1e84
JB
6626
6627 # If libiconv is part of the build tree, then try using it over
6628 # any system iconv.
6629 if test -d ../libiconv; then
f18c4681
JB
6630 for lib_dir in $BUILD_LIBICONV_LIBDIRS; do
6631 am_save_LIBS="$LIBS"
6632 am_save_CPPFLAGS="$CPPFLAGS"
6633 LIBS="$LIBS $lib_dir/libiconv.a"
6634 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
6635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6636/* end confdefs.h. */
6c7a06a3
TT
6637#include <stdlib.h>
6638#include <iconv.h>
d542061a
UW
6639int
6640main ()
6641{
6c7a06a3 6642iconv_t cd = iconv_open("","");
f18c4681
JB
6643 iconv(cd,NULL,NULL,NULL,NULL);
6644 iconv_close(cd);
d542061a
UW
6645 ;
6646 return 0;
6647}
6648_ACEOF
81ecdfbb 6649if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6650 am_cv_use_build_libiconv=yes
f0f20949 6651 am_cv_build_libiconv_path=$lib_dir/libiconv.a
f18c4681
JB
6652 am_cv_lib_iconv=yes
6653 am_cv_func_iconv=yes
d542061a 6654fi
81ecdfbb
RW
6655rm -f core conftest.err conftest.$ac_objext \
6656 conftest$ac_exeext conftest.$ac_ext
f18c4681
JB
6657 LIBS="$am_save_LIBS"
6658 CPPFLAGS="$am_save_CPPFLAGS"
6659 if test "$am_cv_use_build_libiconv" = "yes"; then
f18c4681
JB
6660 break
6661 fi
6662 done
4edb1e84 6663 fi
94ae1714 6664
4edb1e84 6665 # Next, try to find iconv in libc.
6c7a06a3 6666 if test "$am_cv_func_iconv" != yes; then
81ecdfbb 6667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 6668/* end confdefs.h. */
6c7a06a3
TT
6669#include <stdlib.h>
6670#include <iconv.h>
d542061a
UW
6671int
6672main ()
6673{
6c7a06a3
TT
6674iconv_t cd = iconv_open("","");
6675 iconv(cd,NULL,NULL,NULL,NULL);
6676 iconv_close(cd);
d542061a
UW
6677 ;
6678 return 0;
6679}
6680_ACEOF
81ecdfbb 6681if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6682 am_cv_func_iconv=yes
d542061a 6683fi
81ecdfbb
RW
6684rm -f core conftest.err conftest.$ac_objext \
6685 conftest$ac_exeext conftest.$ac_ext
77f120bf 6686 fi
94ae1714 6687
4edb1e84
JB
6688 # If iconv was not in libc, try -liconv. In this case, arrange to
6689 # look in the libiconv prefix, if it was specified by the user.
6690 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 6691 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84
JB
6692 am_save_LIBS="$LIBS"
6693 if test -n "$LIBICONV_INCLUDE"; then
6694 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6695 LIBS="$LIBS $LIBICONV_LIBDIR"
6696 fi
6697 LIBS="$LIBS -liconv"
81ecdfbb 6698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 6699/* end confdefs.h. */
6c7a06a3
TT
6700#include <stdlib.h>
6701#include <iconv.h>
bec39cab
AC
6702int
6703main ()
6704{
6c7a06a3
TT
6705iconv_t cd = iconv_open("","");
6706 iconv(cd,NULL,NULL,NULL,NULL);
6707 iconv_close(cd);
bec39cab
AC
6708 ;
6709 return 0;
6710}
6711_ACEOF
81ecdfbb 6712if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 6713 am_cv_lib_iconv=yes
6c7a06a3 6714 am_cv_func_iconv=yes
627af7ea 6715fi
81ecdfbb
RW
6716rm -f core conftest.err conftest.$ac_objext \
6717 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 6718 LIBS="$am_save_LIBS"
fc3b640d 6719 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
6720 fi
6721
6722fi
81ecdfbb
RW
6723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
6724$as_echo "$am_cv_func_iconv" >&6; }
94ae1714
TT
6725
6726 # Set the various flags based on the cache variables. We can't rely
6727 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
6728 LIBICONV=
6729 if test "$am_cv_lib_iconv" = yes; then
6730 LIBICONV="-liconv"
94ae1714
TT
6731 else
6732 LIBICONV_LIBDIR=
6733 LIBICONV_INCLUDE=
fc3b640d
TT
6734 fi
6735 if test "$am_cv_use_build_libiconv" = yes; then
f0f20949 6736 LIBICONV="$am_cv_build_libiconv_path"
f18c4681 6737 LIBICONV_LIBDIR=""
fc3b640d
TT
6738 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
6739 fi
6740 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
6741 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 6742
6c7a06a3
TT
6743 if test "$am_cv_func_iconv" = yes; then
6744
81ecdfbb 6745$as_echo "#define HAVE_ICONV 1" >>confdefs.h
6c7a06a3 6746
81ecdfbb
RW
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
6748$as_echo_n "checking for iconv declaration... " >&6; }
6749 if test "${am_cv_proto_iconv+set}" = set; then :
6750 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6751else
6752
81ecdfbb 6753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
6754/* end confdefs.h. */
6755
6c7a06a3
TT
6756#include <stdlib.h>
6757#include <iconv.h>
6758extern
b4e70030 6759#ifdef __cplusplus
6c7a06a3 6760"C"
b4e70030 6761#endif
6c7a06a3
TT
6762#if defined(__STDC__) || defined(__cplusplus)
6763size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6764#else
6765size_t iconv();
6766#endif
6767
b4e70030
JB
6768int
6769main ()
6770{
6c7a06a3 6771
b4e70030
JB
6772 ;
6773 return 0;
6774}
6775_ACEOF
81ecdfbb 6776if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 6777 am_cv_proto_iconv_arg1=""
4e8d927d 6778else
81ecdfbb 6779 am_cv_proto_iconv_arg1="const"
b4e70030 6780fi
81ecdfbb 6781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
6782 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);"
6783fi
6784
6785 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 6786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 6787 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
6788$as_echo "${ac_t:-
6789 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
6790
6791cat >>confdefs.h <<_ACEOF
6792#define ICONV_CONST $am_cv_proto_iconv_arg1
6793_ACEOF
6794
6795 fi
6c7a06a3
TT
6796
6797
478aac75
DE
6798# GDB may fork/exec the iconv program to get the list of supported character
6799# sets. Allow the user to specify where to find it.
6800# There are several factors affecting the choice of option name:
6801# - There is already --with-libiconv-prefix but we can't use it, it specifies
6802# the build-time location of libiconv files.
6803# - The program we need to find is iconv, which comes with glibc. The user
6804# doesn't necessarily have libiconv installed. Therefore naming this
6805# --with-libiconv-foo feels wrong.
6806# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
6807# defined to work on directories not files (though it really doesn't know
6808# the difference).
6809# - Calling this --with-iconv-prefix is perceived to cause too much confusion
6810# with --with-libiconv-prefix.
6811# Putting these together is why the option name is --with-iconv-bin.
6812
6813
6814# Check whether --with-iconv-bin was given.
6815if test "${with_iconv_bin+set}" = set; then :
6816 withval=$with_iconv_bin; iconv_bin="${withval}"
6817
6818cat >>confdefs.h <<_ACEOF
6819#define ICONV_BIN "${iconv_bin}"
6820_ACEOF
6821
6822
6823 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6824 if test "x$prefix" = xNONE; then
6825 test_prefix=/usr/local
6826 else
6827 test_prefix=$prefix
6828 fi
6829 else
6830 test_prefix=$exec_prefix
6831 fi
6832 value=0
6833 case ${iconv_bin} in
6834 "${test_prefix}"|"${test_prefix}/"*|\
6835 '${exec_prefix}'|'${exec_prefix}/'*)
6836 value=1
6837 ;;
6838 esac
6839
6840cat >>confdefs.h <<_ACEOF
6841#define ICONV_BIN_RELOCATABLE $value
6842_ACEOF
6843
6844
6845
6846fi
6847
6848
6c7a06a3
TT
6849# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
6850# There is a very specific comment in /usr/include/curses.h explaining that
6851# termcap routines built into libcurses must not be used.
6852#
6853# The symptoms we observed so far is GDB unexpectedly changing
6854# the terminal settings when tgetent is called - this is particularly
6855# visible as the output is missing carriage returns, and so rapidly
6856# becomes very hard to read.
6857#
6858# The readline configure script has already decided that libtermcap
6859# was enough for its purposes, and so decided to build readline using
6860# libtermcap. Since the TUI mode requires curses, building GDB with
6861# TUI enabled results in both libraries to be used at the same time,
6862# which is not allowed. This basically means that GDB with TUI is
6863# broken on alpha-osf.
6864
6865case $host_os in
6bcc772d
RO
6866 osf* )
6867 if test x"$enable_tui" = xyes; then
81ecdfbb 6868 as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5
6c7a06a3 6869 fi
6bcc772d 6870 if test x"$enable_tui" = xauto; then
6c7a06a3
TT
6871 enable_tui=no
6872 fi
6873 ;;
6874esac
6875
cb01cfba 6876# For the TUI, we need enhanced curses functionality.
bd8a8e1b 6877if test x"$enable_tui" != xno; then
cb01cfba
JB
6878 prefer_curses=yes
6879fi
6880
6881curses_found=no
6882if test x"$prefer_curses" = xyes; then
6883 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
6884 # curses library because the latter might not provide all the
6885 # functionality we need. However, this leads to problems on systems
6886 # where the linker searches /usr/local/lib, but the compiler doesn't
6887 # search /usr/local/include, if ncurses is installed in /usr/local. A
6888 # default installation of ncurses on alpha*-dec-osf* will lead to such
6889 # a situation.
81ecdfbb
RW
6890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
6891$as_echo_n "checking for library containing waddstr... " >&6; }
6892if test "${ac_cv_search_waddstr+set}" = set; then :
6893 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6894else
6895 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6897/* end confdefs.h. */
6898
81ecdfbb
RW
6899/* Override any GCC internal prototype to avoid an error.
6900 Use char because int might match the return type of a GCC
6901 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
6902#ifdef __cplusplus
6903extern "C"
6904#endif
6c7a06a3
TT
6905char waddstr ();
6906int
6907main ()
6908{
81ecdfbb 6909return waddstr ();
6c7a06a3
TT
6910 ;
6911 return 0;
6912}
6913_ACEOF
81ecdfbb
RW
6914for ac_lib in '' ncurses cursesX curses; do
6915 if test -z "$ac_lib"; then
6916 ac_res="none required"
6917 else
6918 ac_res=-l$ac_lib
6919 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6920 fi
6921 if ac_fn_c_try_link "$LINENO"; then :
6922 ac_cv_search_waddstr=$ac_res
6923fi
6924rm -f core conftest.err conftest.$ac_objext \
6925 conftest$ac_exeext
6926 if test "${ac_cv_search_waddstr+set}" = set; then :
6927 break
6928fi
6929done
6930if test "${ac_cv_search_waddstr+set}" = set; then :
6931
6c7a06a3 6932else
81ecdfbb
RW
6933 ac_cv_search_waddstr=no
6934fi
6935rm conftest.$ac_ext
6936LIBS=$ac_func_search_save_LIBS
6937fi
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
6939$as_echo "$ac_cv_search_waddstr" >&6; }
6940ac_res=$ac_cv_search_waddstr
6941if test "$ac_res" != no; then :
6942 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
6943
6944fi
6945
6946
cb01cfba
JB
6947 if test "$ac_cv_search_waddstr" != no; then
6948 curses_found=yes
6949 fi
6950fi
6951
6952# Check whether we should enable the TUI, but only do so if we really
6953# can.
6954if test x"$enable_tui" != xno; then
6955 if test -d $srcdir/tui; then
6956 if test "$curses_found" != no; then
6c7a06a3
TT
6957 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
6958 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
6959 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
6960 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
6961 else
6962 if test x"$enable_tui" = xyes; then
81ecdfbb 6963 as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 6964 else
81ecdfbb
RW
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
6966$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
6967 fi
6968 fi
6969 fi
6970fi
6971
6972# Since GDB uses Readline, we need termcap functionality. In many
6973# cases this will be provided by the curses library, but some systems
6974# have a seperate termcap library, or no curses library at all.
6975
6976case $host_os in
6977 cygwin*)
6978 if test -d $srcdir/libtermcap; then
6979 LIBS="../libtermcap/libtermcap.a $LIBS"
6980 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
6981 fi ;;
6982 go32* | *djgpp*)
6983 ac_cv_search_tgetent="none required"
6984 ;;
6985 *mingw32*)
6986 ac_cv_search_tgetent="none required"
6987 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
6988 ;;
6989esac
6990
6991# These are the libraries checked by Readline.
81ecdfbb
RW
6992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
6993$as_echo_n "checking for library containing tgetent... " >&6; }
6994if test "${ac_cv_search_tgetent+set}" = set; then :
6995 $as_echo_n "(cached) " >&6
6c7a06a3
TT
6996else
6997 ac_func_search_save_LIBS=$LIBS
81ecdfbb 6998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
6999/* end confdefs.h. */
7000
81ecdfbb
RW
7001/* Override any GCC internal prototype to avoid an error.
7002 Use char because int might match the return type of a GCC
7003 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
7004#ifdef __cplusplus
7005extern "C"
7006#endif
6c7a06a3
TT
7007char tgetent ();
7008int
7009main ()
7010{
81ecdfbb 7011return tgetent ();
6c7a06a3
TT
7012 ;
7013 return 0;
7014}
7015_ACEOF
81ecdfbb
RW
7016for ac_lib in '' termcap tinfo curses ncurses; do
7017 if test -z "$ac_lib"; then
7018 ac_res="none required"
7019 else
7020 ac_res=-l$ac_lib
6c7a06a3 7021 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
7022 fi
7023 if ac_fn_c_try_link "$LINENO"; then :
7024 ac_cv_search_tgetent=$ac_res
7025fi
7026rm -f core conftest.err conftest.$ac_objext \
7027 conftest$ac_exeext
7028 if test "${ac_cv_search_tgetent+set}" = set; then :
7029 break
7030fi
7031done
7032if test "${ac_cv_search_tgetent+set}" = set; then :
6c7a06a3 7033
6c7a06a3 7034else
81ecdfbb 7035 ac_cv_search_tgetent=no
6c7a06a3 7036fi
81ecdfbb 7037rm conftest.$ac_ext
6c7a06a3
TT
7038LIBS=$ac_func_search_save_LIBS
7039fi
81ecdfbb
RW
7040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
7041$as_echo "$ac_cv_search_tgetent" >&6; }
7042ac_res=$ac_cv_search_tgetent
7043if test "$ac_res" != no; then :
7044 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 7045
06825bd1
MK
7046fi
7047
06825bd1 7048
bec39cab 7049if test "$ac_cv_search_tgetent" = no; then
81ecdfbb 7050 as_fn_error "no termcap library found" "$LINENO" 5
8ee53726
MK
7051fi
7052
3841debe 7053
81ecdfbb
RW
7054# Check whether --with-system-readline was given.
7055if test "${with_system_readline+set}" = set; then :
7056 withval=$with_system_readline;
7057fi
6a30b0a5 7058
6a30b0a5
AS
7059
7060if test "$with_system_readline" = yes; then
7061 READLINE=-lreadline
7062 READLINE_DEPS=
7063 READLINE_CFLAGS=
39037522 7064 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
7065else
7066 READLINE='$(READLINE_DIR)/libreadline.a'
7067 READLINE_DEPS='$(READLINE)'
7068 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 7069 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
7070fi
7071
7072
7073
7074
7075
f997c383
SD
7076# Generate jit-reader.h
7077
7078# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
7079TARGET_PTR=
7080
7081# The cast to long int works around a bug in the HP C Compiler
7082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7084# This bug is HP SR number 8606223364.
7085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
7086$as_echo_n "checking size of unsigned long long... " >&6; }
7087if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then :
7088 $as_echo_n "(cached) " >&6
7089else
7090 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
7091
7092else
7093 if test "$ac_cv_type_unsigned_long_long" = yes; then
7094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7096{ as_fn_set_status 77
7097as_fn_error "cannot compute sizeof (unsigned long long)
7098See \`config.log' for more details." "$LINENO" 5; }; }
7099 else
7100 ac_cv_sizeof_unsigned_long_long=0
7101 fi
7102fi
7103
7104fi
7105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
7106$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
7107
7108
7109
7110cat >>confdefs.h <<_ACEOF
7111#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
7112_ACEOF
7113
7114
7115# The cast to long int works around a bug in the HP C Compiler
7116# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7117# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7118# This bug is HP SR number 8606223364.
7119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
7120$as_echo_n "checking size of unsigned long... " >&6; }
7121if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
7122 $as_echo_n "(cached) " >&6
7123else
7124 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
7125
7126else
7127 if test "$ac_cv_type_unsigned_long" = yes; then
7128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7130{ as_fn_set_status 77
7131as_fn_error "cannot compute sizeof (unsigned long)
7132See \`config.log' for more details." "$LINENO" 5; }; }
7133 else
7134 ac_cv_sizeof_unsigned_long=0
7135 fi
7136fi
7137
7138fi
7139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
7140$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
7141
7142
7143
7144cat >>confdefs.h <<_ACEOF
7145#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7146_ACEOF
7147
7148
7149# The cast to long int works around a bug in the HP C Compiler
7150# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7151# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7152# This bug is HP SR number 8606223364.
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
7154$as_echo_n "checking size of unsigned __int128... " >&6; }
7155if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then :
7156 $as_echo_n "(cached) " >&6
7157else
7158 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
7159
7160else
7161 if test "$ac_cv_type_unsigned___int128" = yes; then
7162 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7164{ as_fn_set_status 77
7165as_fn_error "cannot compute sizeof (unsigned __int128)
7166See \`config.log' for more details." "$LINENO" 5; }; }
7167 else
7168 ac_cv_sizeof_unsigned___int128=0
7169 fi
7170fi
7171
7172fi
7173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
7174$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
7175
7176
7177
7178cat >>confdefs.h <<_ACEOF
7179#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
7180_ACEOF
7181
7182
7183
7184if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
7185 TARGET_PTR="unsigned long"
7186elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
7187 TARGET_PTR="unsigned long long"
7188elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
7189 TARGET_PTR="unsigned __int128"
7190else
7191 TARGET_PTR="unsigned long"
7192fi
7193
7194
7195ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
7196
7197
a2d08b9e
SD
7198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
7199$as_echo_n "checking for library containing dlopen... " >&6; }
7200if test "${ac_cv_search_dlopen+set}" = set; then :
7201 $as_echo_n "(cached) " >&6
7202else
7203 ac_func_search_save_LIBS=$LIBS
7204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7205/* end confdefs.h. */
7206
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. */
7210#ifdef __cplusplus
7211extern "C"
7212#endif
7213char dlopen ();
7214int
7215main ()
7216{
7217return dlopen ();
7218 ;
7219 return 0;
7220}
7221_ACEOF
7222for ac_lib in '' dl; do
7223 if test -z "$ac_lib"; then
7224 ac_res="none required"
7225 else
7226 ac_res=-l$ac_lib
7227 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7228 fi
7229 if ac_fn_c_try_link "$LINENO"; then :
7230 ac_cv_search_dlopen=$ac_res
7231fi
7232rm -f core conftest.err conftest.$ac_objext \
7233 conftest$ac_exeext
7234 if test "${ac_cv_search_dlopen+set}" = set; then :
7235 break
7236fi
7237done
7238if test "${ac_cv_search_dlopen+set}" = set; then :
7239
7240else
7241 ac_cv_search_dlopen=no
7242fi
7243rm conftest.$ac_ext
7244LIBS=$ac_func_search_save_LIBS
7245fi
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
7247$as_echo "$ac_cv_search_dlopen" >&6; }
7248ac_res=$ac_cv_search_dlopen
7249if test "$ac_res" != no; then :
7250 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7251
7252fi
7253
7254
39037522 7255
b8e0a31c
SD
7256
7257# Check whether --with-jit-reader-dir was given.
7258if test "${with_jit_reader_dir+set}" = set; then :
7259 withval=$with_jit_reader_dir;
7260 JIT_READER_DIR=$withval
7261else
7262 JIT_READER_DIR=${libdir}/gdb
7263fi
7264
7265
7266 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7267 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7268 ac_define_dir=`eval echo $JIT_READER_DIR`
7269 ac_define_dir=`eval echo $ac_define_dir`
7270
7271cat >>confdefs.h <<_ACEOF
7272#define JIT_READER_DIR "$ac_define_dir"
7273_ACEOF
7274
7275
7276
7277
7278 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7279 if test "x$prefix" = xNONE; then
7280 test_prefix=/usr/local
7281 else
7282 test_prefix=$prefix
7283 fi
7284 else
7285 test_prefix=$exec_prefix
7286 fi
7287 value=0
7288 case ${ac_define_dir} in
7289 "${test_prefix}"|"${test_prefix}/"*|\
7290 '${exec_prefix}'|'${exec_prefix}/'*)
7291 value=1
7292 ;;
7293 esac
7294
7295cat >>confdefs.h <<_ACEOF
7296#define JIT_READER_DIR_RELOCATABLE $value
7297_ACEOF
7298
7299
7300
7301
7302
81ecdfbb
RW
7303# Check whether --with-expat was given.
7304if test "${with_expat+set}" = set; then :
7305 withval=$with_expat;
5c39566f
DJ
7306else
7307 with_expat=auto
81ecdfbb
RW
7308fi
7309
7310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
7311$as_echo_n "checking whether to use expat... " >&6; }
7312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
7313$as_echo "$with_expat" >&6; }
5c39566f
DJ
7314
7315if test "${with_expat}" = no; then
81ecdfbb
RW
7316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
7317$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
7318 HAVE_LIBEXPAT=no
7319else
7320
3841debe
DJ
7321 if test "X$prefix" = "XNONE"; then
7322 acl_final_prefix="$ac_default_prefix"
7323 else
7324 acl_final_prefix="$prefix"
7325 fi
7326 if test "X$exec_prefix" = "XNONE"; then
7327 acl_final_exec_prefix='${prefix}'
7328 else
7329 acl_final_exec_prefix="$exec_prefix"
7330 fi
7331 acl_save_prefix="$prefix"
7332 prefix="$acl_final_prefix"
7333 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7334 prefix="$acl_save_prefix"
7335
7336
81ecdfbb
RW
7337# Check whether --with-gnu-ld was given.
7338if test "${with_gnu_ld+set}" = set; then :
7339 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
3841debe
DJ
7340else
7341 with_gnu_ld=no
81ecdfbb
RW
7342fi
7343
3841debe
DJ
7344# Prepare PATH_SEPARATOR.
7345# The user is always right.
7346if test "${PATH_SEPARATOR+set}" != set; then
7347 echo "#! /bin/sh" >conf$$.sh
7348 echo "exit 0" >>conf$$.sh
7349 chmod +x conf$$.sh
7350 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7351 PATH_SEPARATOR=';'
7352 else
7353 PATH_SEPARATOR=:
7354 fi
7355 rm -f conf$$.sh
7356fi
7357ac_prog=ld
7358if test "$GCC" = yes; then
7359 # Check if gcc -print-prog-name=ld gives a path.
81ecdfbb
RW
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7361$as_echo_n "checking for ld used by GCC... " >&6; }
3841debe
DJ
7362 case $host in
7363 *-*-mingw*)
7364 # gcc leaves a trailing carriage return which upsets mingw
7365 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7366 *)
7367 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7368 esac
7369 case $ac_prog in
7370 # Accept absolute paths.
7371 [\\/]* | [A-Za-z]:[\\/]*)
7372 re_direlt='/[^/][^/]*/\.\./'
7373 # Canonicalize the path of ld
7374 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7375 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7376 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7377 done
7378 test -z "$LD" && LD="$ac_prog"
7379 ;;
7380 "")
7381 # If it fails, then pretend we aren't using GCC.
7382 ac_prog=ld
7383 ;;
7384 *)
7385 # If it is relative, then search for the first ld in PATH.
7386 with_gnu_ld=unknown
7387 ;;
7388 esac
7389elif test "$with_gnu_ld" = yes; then
81ecdfbb
RW
7390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7391$as_echo_n "checking for GNU ld... " >&6; }
3841debe 7392else
81ecdfbb
RW
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7394$as_echo_n "checking for non-GNU ld... " >&6; }
3841debe 7395fi
81ecdfbb
RW
7396if test "${acl_cv_path_LD+set}" = set; then :
7397 $as_echo_n "(cached) " >&6
3841debe
DJ
7398else
7399 if test -z "$LD"; then
7400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7401 for ac_dir in $PATH; do
7402 test -z "$ac_dir" && ac_dir=.
7403 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7404 acl_cv_path_LD="$ac_dir/$ac_prog"
7405 # Check to see if the program is GNU ld. I'd rather use --version,
7406 # but apparently some GNU ld's only accept -v.
7407 # Break only if it was the GNU/non-GNU ld that we prefer.
7408 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7409 test "$with_gnu_ld" != no && break
7410 else
7411 test "$with_gnu_ld" != yes && break
7412 fi
7413 fi
7414 done
7415 IFS="$ac_save_ifs"
7416else
7417 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7418fi
7419fi
7420
7421LD="$acl_cv_path_LD"
7422if test -n "$LD"; then
81ecdfbb
RW
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7424$as_echo "$LD" >&6; }
3841debe 7425else
81ecdfbb
RW
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7427$as_echo "no" >&6; }
3841debe 7428fi
81ecdfbb
RW
7429test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
7430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7431$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7432if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7433 $as_echo_n "(cached) " >&6
3841debe
DJ
7434else
7435 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7436if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7437 acl_cv_prog_gnu_ld=yes
7438else
7439 acl_cv_prog_gnu_ld=no
7440fi
7441fi
81ecdfbb
RW
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7443$as_echo "$acl_cv_prog_gnu_ld" >&6; }
3841debe
DJ
7444with_gnu_ld=$acl_cv_prog_gnu_ld
7445
7446
7447
81ecdfbb
RW
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7449$as_echo_n "checking for shared library run path origin... " >&6; }
7450if test "${acl_cv_rpath+set}" = set; then :
7451 $as_echo_n "(cached) " >&6
3841debe
DJ
7452else
7453
7454 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7455 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7456 . ./conftest.sh
7457 rm -f ./conftest.sh
7458 acl_cv_rpath=done
7459
7460fi
81ecdfbb
RW
7461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7462$as_echo "$acl_cv_rpath" >&6; }
3841debe
DJ
7463 wl="$acl_cv_wl"
7464 libext="$acl_cv_libext"
7465 shlibext="$acl_cv_shlibext"
7466 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7467 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7468 hardcode_direct="$acl_cv_hardcode_direct"
7469 hardcode_minus_L="$acl_cv_hardcode_minus_L"
81ecdfbb
RW
7470 # Check whether --enable-rpath was given.
7471if test "${enable_rpath+set}" = set; then :
7472 enableval=$enable_rpath; :
3841debe
DJ
7473else
7474 enable_rpath=yes
81ecdfbb
RW
7475fi
7476
3841debe
DJ
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486 use_additional=yes
7487
7488 acl_save_prefix="$prefix"
7489 prefix="$acl_final_prefix"
7490 acl_save_exec_prefix="$exec_prefix"
7491 exec_prefix="$acl_final_exec_prefix"
7492
7493 eval additional_includedir=\"$includedir\"
7494 eval additional_libdir=\"$libdir\"
7495
7496 exec_prefix="$acl_save_exec_prefix"
7497 prefix="$acl_save_prefix"
7498
7499
81ecdfbb
RW
7500# Check whether --with-libexpat-prefix was given.
7501if test "${with_libexpat_prefix+set}" = set; then :
7502 withval=$with_libexpat_prefix;
3841debe
DJ
7503 if test "X$withval" = "Xno"; then
7504 use_additional=no
7505 else
7506 if test "X$withval" = "X"; then
7507
7508 acl_save_prefix="$prefix"
7509 prefix="$acl_final_prefix"
7510 acl_save_exec_prefix="$exec_prefix"
7511 exec_prefix="$acl_final_exec_prefix"
7512
7513 eval additional_includedir=\"$includedir\"
7514 eval additional_libdir=\"$libdir\"
7515
7516 exec_prefix="$acl_save_exec_prefix"
7517 prefix="$acl_save_prefix"
7518
7519 else
7520 additional_includedir="$withval/include"
7521 additional_libdir="$withval/lib"
7522 fi
7523 fi
7524
81ecdfbb
RW
7525fi
7526
3841debe
DJ
7527 LIBEXPAT=
7528 LTLIBEXPAT=
7529 INCEXPAT=
7530 rpathdirs=
7531 ltrpathdirs=
7532 names_already_handled=
7533 names_next_round='expat '
7534 while test -n "$names_next_round"; do
7535 names_this_round="$names_next_round"
7536 names_next_round=
7537 for name in $names_this_round; do
7538 already_handled=
7539 for n in $names_already_handled; do
7540 if test "$n" = "$name"; then
7541 already_handled=yes
7542 break
7543 fi
7544 done
7545 if test -z "$already_handled"; then
7546 names_already_handled="$names_already_handled $name"
7547 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7548 eval value=\"\$HAVE_LIB$uppername\"
7549 if test -n "$value"; then
7550 if test "$value" = yes; then
7551 eval value=\"\$LIB$uppername\"
7552 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
7553 eval value=\"\$LTLIB$uppername\"
7554 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
7555 else
7556 :
7557 fi
7558 else
7559 found_dir=
7560 found_la=
7561 found_so=
7562 found_a=
7563 if test $use_additional = yes; then
7564 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
7565 found_dir="$additional_libdir"
7566 found_so="$additional_libdir/lib$name.$shlibext"
7567 if test -f "$additional_libdir/lib$name.la"; then
7568 found_la="$additional_libdir/lib$name.la"
7569 fi
7570 else
7571 if test -f "$additional_libdir/lib$name.$libext"; then
7572 found_dir="$additional_libdir"
7573 found_a="$additional_libdir/lib$name.$libext"
7574 if test -f "$additional_libdir/lib$name.la"; then
7575 found_la="$additional_libdir/lib$name.la"
7576 fi
7577 fi
7578 fi
7579 fi
7580 if test "X$found_dir" = "X"; then
7581 for x in $LDFLAGS $LTLIBEXPAT; do
7582
7583 acl_save_prefix="$prefix"
7584 prefix="$acl_final_prefix"
7585 acl_save_exec_prefix="$exec_prefix"
7586 exec_prefix="$acl_final_exec_prefix"
7587 eval x=\"$x\"
7588 exec_prefix="$acl_save_exec_prefix"
7589 prefix="$acl_save_prefix"
7590
7591 case "$x" in
7592 -L*)
7593 dir=`echo "X$x" | sed -e 's/^X-L//'`
7594 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
7595 found_dir="$dir"
7596 found_so="$dir/lib$name.$shlibext"
7597 if test -f "$dir/lib$name.la"; then
7598 found_la="$dir/lib$name.la"
7599 fi
7600 else
7601 if test -f "$dir/lib$name.$libext"; then
7602 found_dir="$dir"
7603 found_a="$dir/lib$name.$libext"
7604 if test -f "$dir/lib$name.la"; then
7605 found_la="$dir/lib$name.la"
7606 fi
7607 fi
7608 fi
7609 ;;
7610 esac
7611 if test "X$found_dir" != "X"; then
7612 break
7613 fi
7614 done
7615 fi
7616 if test "X$found_dir" != "X"; then
7617 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
7618 if test "X$found_so" != "X"; then
7619 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7620 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7621 else
7622 haveit=
7623 for x in $ltrpathdirs; do
7624 if test "X$x" = "X$found_dir"; then
7625 haveit=yes
7626 break
7627 fi
7628 done
7629 if test -z "$haveit"; then
7630 ltrpathdirs="$ltrpathdirs $found_dir"
7631 fi
7632 if test "$hardcode_direct" = yes; then
7633 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7634 else
7635 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7636 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7637 haveit=
7638 for x in $rpathdirs; do
7639 if test "X$x" = "X$found_dir"; then
7640 haveit=yes
7641 break
7642 fi
7643 done
7644 if test -z "$haveit"; then
7645 rpathdirs="$rpathdirs $found_dir"
7646 fi
7647 else
7648 haveit=
7649 for x in $LDFLAGS $LIBEXPAT; do
7650
7651 acl_save_prefix="$prefix"
7652 prefix="$acl_final_prefix"
7653 acl_save_exec_prefix="$exec_prefix"
7654 exec_prefix="$acl_final_exec_prefix"
7655 eval x=\"$x\"
7656 exec_prefix="$acl_save_exec_prefix"
7657 prefix="$acl_save_prefix"
7658
7659 if test "X$x" = "X-L$found_dir"; then
7660 haveit=yes
7661 break
7662 fi
7663 done
7664 if test -z "$haveit"; then
7665 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
7666 fi
7667 if test "$hardcode_minus_L" != no; then
7668 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
7669 else
7670 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7671 fi
7672 fi
7673 fi
7674 fi
7675 else
7676 if test "X$found_a" != "X"; then
7677 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
7678 else
7679 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
7680 fi
7681 fi
7682 additional_includedir=
7683 case "$found_dir" in
7684 */lib | */lib/)
7685 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7686 additional_includedir="$basedir/include"
7687 ;;
7688 esac
7689 if test "X$additional_includedir" != "X"; then
7690 if test "X$additional_includedir" != "X/usr/include"; then
7691 haveit=
7692 if test "X$additional_includedir" = "X/usr/local/include"; then
7693 if test -n "$GCC"; then
7694 case $host_os in
7695 linux*) haveit=yes;;
7696 esac
7697 fi
7698 fi
7699 if test -z "$haveit"; then
7700 for x in $CPPFLAGS $INCEXPAT; do
7701
7702 acl_save_prefix="$prefix"
7703 prefix="$acl_final_prefix"
7704 acl_save_exec_prefix="$exec_prefix"
7705 exec_prefix="$acl_final_exec_prefix"
7706 eval x=\"$x\"
7707 exec_prefix="$acl_save_exec_prefix"
7708 prefix="$acl_save_prefix"
7709
7710 if test "X$x" = "X-I$additional_includedir"; then
7711 haveit=yes
7712 break
7713 fi
7714 done
7715 if test -z "$haveit"; then
7716 if test -d "$additional_includedir"; then
7717 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
7718 fi
7719 fi
7720 fi
7721 fi
7722 fi
7723 if test -n "$found_la"; then
7724 save_libdir="$libdir"
7725 case "$found_la" in
7726 */* | *\\*) . "$found_la" ;;
7727 *) . "./$found_la" ;;
7728 esac
7729 libdir="$save_libdir"
7730 for dep in $dependency_libs; do
7731 case "$dep" in
7732 -L*)
7733 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7734 if test "X$additional_libdir" != "X/usr/lib"; then
7735 haveit=
7736 if test "X$additional_libdir" = "X/usr/local/lib"; then
7737 if test -n "$GCC"; then
7738 case $host_os in
7739 linux*) haveit=yes;;
7740 esac
7741 fi
7742 fi
7743 if test -z "$haveit"; then
7744 haveit=
7745 for x in $LDFLAGS $LIBEXPAT; do
7746
7747 acl_save_prefix="$prefix"
7748 prefix="$acl_final_prefix"
7749 acl_save_exec_prefix="$exec_prefix"
7750 exec_prefix="$acl_final_exec_prefix"
7751 eval x=\"$x\"
7752 exec_prefix="$acl_save_exec_prefix"
7753 prefix="$acl_save_prefix"
7754
7755 if test "X$x" = "X-L$additional_libdir"; then
7756 haveit=yes
7757 break
7758 fi
7759 done
7760 if test -z "$haveit"; then
7761 if test -d "$additional_libdir"; then
7762 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
7763 fi
7764 fi
7765 haveit=
7766 for x in $LDFLAGS $LTLIBEXPAT; do
7767
7768 acl_save_prefix="$prefix"
7769 prefix="$acl_final_prefix"
7770 acl_save_exec_prefix="$exec_prefix"
7771 exec_prefix="$acl_final_exec_prefix"
7772 eval x=\"$x\"
7773 exec_prefix="$acl_save_exec_prefix"
7774 prefix="$acl_save_prefix"
7775
7776 if test "X$x" = "X-L$additional_libdir"; then
7777 haveit=yes
7778 break
7779 fi
7780 done
7781 if test -z "$haveit"; then
7782 if test -d "$additional_libdir"; then
7783 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
7784 fi
7785 fi
7786 fi
7787 fi
7788 ;;
7789 -R*)
7790 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7791 if test "$enable_rpath" != no; then
7792 haveit=
7793 for x in $rpathdirs; do
7794 if test "X$x" = "X$dir"; then
7795 haveit=yes
7796 break
7797 fi
7798 done
7799 if test -z "$haveit"; then
7800 rpathdirs="$rpathdirs $dir"
7801 fi
7802 haveit=
7803 for x in $ltrpathdirs; do
7804 if test "X$x" = "X$dir"; then
7805 haveit=yes
7806 break
7807 fi
7808 done
7809 if test -z "$haveit"; then
7810 ltrpathdirs="$ltrpathdirs $dir"
7811 fi
7812 fi
7813 ;;
7814 -l*)
7815 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7816 ;;
7817 *.la)
7818 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7819 ;;
7820 *)
7821 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
7822 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
7823 ;;
81ecdfbb
RW
7824 esac
7825 done
7826 fi
7827 else
7828 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
7829 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
7830 fi
7831 fi
7832 fi
7833 done
7834 done
7835 if test "X$rpathdirs" != "X"; then
7836 if test -n "$hardcode_libdir_separator"; then
7837 alldirs=
7838 for found_dir in $rpathdirs; do
7839 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
7840 done
7841 acl_save_libdir="$libdir"
7842 libdir="$alldirs"
7843 eval flag=\"$hardcode_libdir_flag_spec\"
7844 libdir="$acl_save_libdir"
7845 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7846 else
7847 for found_dir in $rpathdirs; do
7848 acl_save_libdir="$libdir"
7849 libdir="$found_dir"
7850 eval flag=\"$hardcode_libdir_flag_spec\"
7851 libdir="$acl_save_libdir"
7852 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
7853 done
7854 fi
7855 fi
7856 if test "X$ltrpathdirs" != "X"; then
7857 for found_dir in $ltrpathdirs; do
7858 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
7859 done
7860 fi
a9322a30
TT
7861
7862
81ecdfbb 7863 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 7864
81ecdfbb
RW
7865 for element in $INCEXPAT; do
7866 haveit=
7867 for x in $CPPFLAGS; do
a9322a30 7868
81ecdfbb
RW
7869 acl_save_prefix="$prefix"
7870 prefix="$acl_final_prefix"
7871 acl_save_exec_prefix="$exec_prefix"
7872 exec_prefix="$acl_final_exec_prefix"
7873 eval x=\"$x\"
7874 exec_prefix="$acl_save_exec_prefix"
7875 prefix="$acl_save_prefix"
a8111142 7876
81ecdfbb
RW
7877 if test "X$x" = "X$element"; then
7878 haveit=yes
7879 break
7880 fi
7881 done
7882 if test -z "$haveit"; then
7883 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7884 fi
7885 done
a9322a30
TT
7886
7887
81ecdfbb
RW
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
7889$as_echo_n "checking for libexpat... " >&6; }
7890if test "${ac_cv_libexpat+set}" = set; then :
7891 $as_echo_n "(cached) " >&6
bec39cab 7892else
bec39cab 7893
81ecdfbb
RW
7894 ac_save_LIBS="$LIBS"
7895 LIBS="$LIBS $LIBEXPAT"
7896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7897/* end confdefs.h. */
81ecdfbb
RW
7898#include "expat.h"
7899int
7900main ()
7901{
7902XML_Parser p = XML_ParserCreate (0);
7903 ;
7904 return 0;
7905}
bec39cab 7906_ACEOF
81ecdfbb
RW
7907if ac_fn_c_try_link "$LINENO"; then :
7908 ac_cv_libexpat=yes
c906108c 7909else
81ecdfbb 7910 ac_cv_libexpat=no
bec39cab 7911fi
81ecdfbb
RW
7912rm -f core conftest.err conftest.$ac_objext \
7913 conftest$ac_exeext conftest.$ac_ext
7914 LIBS="$ac_save_LIBS"
c906108c 7915
95ca63c4 7916fi
81ecdfbb
RW
7917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
7918$as_echo "$ac_cv_libexpat" >&6; }
7919 if test "$ac_cv_libexpat" = yes; then
7920 HAVE_LIBEXPAT=yes
bec39cab 7921
81ecdfbb 7922$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 7923
81ecdfbb
RW
7924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
7925$as_echo_n "checking how to link with libexpat... " >&6; }
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
7927$as_echo "$LIBEXPAT" >&6; }
7928 else
7929 HAVE_LIBEXPAT=no
7930 CPPFLAGS="$ac_save_CPPFLAGS"
7931 LIBEXPAT=
7932 LTLIBEXPAT=
7933 fi
95ca63c4
CF
7934
7935
7936
7cb9022a
MK
7937
7938
bec39cab 7939
81ecdfbb
RW
7940 if test "$HAVE_LIBEXPAT" != yes; then
7941 if test "$with_expat" = yes; then
7942 as_fn_error "expat is missing or unusable" "$LINENO" 5
7943 else
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
7945$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
7946 fi
7947 else
7948 save_LIBS=$LIBS
7949 LIBS="$LIBS $LIBEXPAT"
7950 for ac_func in XML_StopParser
7951do :
7952 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
7953if test "x$ac_cv_func_XML_StopParser" = x""yes; then :
bec39cab 7954 cat >>confdefs.h <<_ACEOF
81ecdfbb 7955#define HAVE_XML_STOPPARSER 1
bec39cab 7956_ACEOF
95ca63c4 7957
bec39cab 7958fi
bec39cab 7959done
95ca63c4 7960
81ecdfbb
RW
7961 LIBS=$save_LIBS
7962 fi
a9322a30
TT
7963fi
7964
a9322a30 7965
a9322a30
TT
7966
7967
ec685c5e 7968
0c4a4063 7969
81ecdfbb
RW
7970# Check whether --with-python was given.
7971if test "${with_python+set}" = set; then :
7972 withval=$with_python;
bec39cab 7973else
81ecdfbb 7974 with_python=auto
bec39cab 7975fi
bec39cab 7976
81ecdfbb
RW
7977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
7978$as_echo_n "checking whether to use python... " >&6; }
7979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7980$as_echo "$with_python" >&6; }
9a156167 7981
81ecdfbb
RW
7982if test "${with_python}" = no; then
7983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
7984$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
7985 have_libpython=no
bec39cab 7986else
81ecdfbb 7987 case "${with_python}" in
8c85a4e2 7988 [\\/]* | ?:[\\/]*)
ec685c5e
DE
7989 if test -d ${with_python}; then
7990 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 7991 python_prog="${with_python}/bin/python"
0c4a4063 7992 python_prefix=
9c4ea6c5
JB
7993 # If python does not exit ${with_python}/bin, then try in
7994 # ${with_python}. On Windows/MinGW, this is where the Python
7995 # executable is.
7996 if test ! -x "${python_prog}"; then
7997 python_prog="${with_python}/python"
7998 python_prefix=
7999 fi
e7a30f46 8000 if test ! -x "${python_prog}"; then
ec685c5e
DE
8001 # Fall back to gdb 7.0/7.1 behaviour.
8002 python_prog=missing
0c4a4063 8003 python_prefix=${with_python}
ec685c5e 8004 fi
e7a30f46 8005 elif test -x "${with_python}"; then
ec685c5e
DE
8006 # While we can't run python compiled for $host (unless host == build),
8007 # the user could write a script that provides the needed information,
8008 # so we support that.
ec685c5e 8009 python_prog=${with_python}
0c4a4063 8010 python_prefix=
ec685c5e
DE
8011 else
8012 as_fn_error "invalid value for --with-python" "$LINENO" 5
8013 fi
81ecdfbb 8014 ;;
ec685c5e
DE
8015 */*)
8016 # Disallow --with-python=foo/bar.
81ecdfbb
RW
8017 as_fn_error "invalid value for --with-python" "$LINENO" 5
8018 ;;
ec685c5e
DE
8019 *)
8020 # The user has either specified auto, yes, or the name of the python
8021 # program assumed to be in $PATH.
8022 python_prefix=
8023 case "${with_python}" in
8024 yes | auto)
8025 if test ${build} = ${host}; then
8026 # Extract the first word of "python", so it can be a program name with args.
8027set dummy python; ac_word=$2
8028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8029$as_echo_n "checking for $ac_word... " >&6; }
8030if test "${ac_cv_path_python_prog_path+set}" = set; then :
8031 $as_echo_n "(cached) " >&6
8032else
8033 case $python_prog_path in
8034 [\\/]* | ?:[\\/]*)
8035 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8036 ;;
8037 *)
8038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8039for as_dir in $PATH
8040do
8041 IFS=$as_save_IFS
8042 test -z "$as_dir" && as_dir=.
8043 for ac_exec_ext in '' $ac_executable_extensions; do
8044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8045 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8047 break 2
8048 fi
8049done
8050 done
8051IFS=$as_save_IFS
8052
8053 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8054 ;;
8055esac
8056fi
8057python_prog_path=$ac_cv_path_python_prog_path
8058if test -n "$python_prog_path"; then
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8060$as_echo "$python_prog_path" >&6; }
8061else
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8063$as_echo "no" >&6; }
8064fi
8065
8066
8067 if test "${python_prog_path}" = missing; then
8068 python_prog=missing
8069 else
8070 python_prog=${python_prog_path}
8071 fi
8072 else
8073 # Not much we can do except assume the cross-compiler will find the
8074 # right files.
8075 python_prog=missing
8076 fi
8077 ;;
8078 *)
8079 # While we can't run python compiled for $host (unless host == build),
8080 # the user could write a script that provides the needed information,
8081 # so we support that.
8082 python_prog="${with_python}"
8083 # Extract the first word of "${python_prog}", so it can be a program name with args.
8084set dummy ${python_prog}; ac_word=$2
8085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8086$as_echo_n "checking for $ac_word... " >&6; }
8087if test "${ac_cv_path_python_prog_path+set}" = set; then :
8088 $as_echo_n "(cached) " >&6
8089else
8090 case $python_prog_path in
8091 [\\/]* | ?:[\\/]*)
8092 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
8093 ;;
8094 *)
8095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8096for as_dir in $PATH
8097do
8098 IFS=$as_save_IFS
8099 test -z "$as_dir" && as_dir=.
8100 for ac_exec_ext in '' $ac_executable_extensions; do
8101 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8102 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
8103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8104 break 2
8105 fi
8106done
8107 done
8108IFS=$as_save_IFS
8109
8110 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
8111 ;;
8112esac
8113fi
8114python_prog_path=$ac_cv_path_python_prog_path
8115if test -n "$python_prog_path"; then
8116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
8117$as_echo "$python_prog_path" >&6; }
8118else
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8120$as_echo "no" >&6; }
8121fi
8122
8123
8124 if test "${python_prog_path}" = missing; then
8125 as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5
8126 fi
8127 ;;
8128 esac
81ecdfbb
RW
8129 esac
8130
ec685c5e 8131 if test "${python_prog}" != missing; then
e7a30f46
DE
8132 # We have a python program to use, but it may be too old.
8133 # Don't flag an error for --with-python=auto (the default).
8134 have_python_config=yes
ec685c5e
DE
8135 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
8136 if test $? != 0; then
e7a30f46
DE
8137 have_python_config=failed
8138 if test "${with_python}" != auto; then
8139 as_fn_error "failure running python-config --includes" "$LINENO" 5
8140 fi
ec685c5e
DE
8141 fi
8142 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
8143 if test $? != 0; then
e7a30f46
DE
8144 have_python_config=failed
8145 if test "${with_python}" != auto; then
8146 as_fn_error "failure running python-config --ldflags" "$LINENO" 5
8147 fi
ec685c5e 8148 fi
0c4a4063
DE
8149 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
8150 if test $? != 0; then
e7a30f46
DE
8151 have_python_config=failed
8152 if test "${with_python}" != auto; then
8153 as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
8154 fi
0c4a4063 8155 fi
ec685c5e 8156 else
ac534cba
JB
8157 # We do not have a python executable we can use to determine where
8158 # to find the Python headers and libs. We cannot guess the include
8159 # path from the python_prefix either, because that include path
8160 # depends on the Python version. So, there is nothing much we can
8161 # do except assume that the compiler will be able to find those files.
8162 python_includes=
8163 python_libs=
0c4a4063 8164 have_python_config=no
ec685c5e 8165 fi
bec39cab 8166
ec685c5e
DE
8167 # If we have python-config, only try the configuration it provides.
8168 # Otherwise fallback on the old way of trying different versions of
8169 # python in turn.
81ecdfbb 8170
ec685c5e
DE
8171 have_libpython=no
8172 if test "${have_python_config}" = yes; then
c1039e3c
JB
8173 # Determine the Python version by extracting "-lpython<version>"
8174 # part of the python_libs. <version> is usually X.Y with X and Y
8175 # being decimal numbers, but can also be XY (seen on Windows).
8176 #
8177 # The extraction is performed using sed with a regular expression.
8178 # Initially, the regexp used was using the '?' quantifier to make
8179 # the dot in the version number optional. Unfortunately, this
8180 # does not work with non-GNU versions of sed because, because of
8181 # what looks like a limitation (the '?' quantifier does not work
8182 # with back-references). We work around this limitation by using
8183 # the '*' quantifier instead. It means that, in theory, we might
8184 # match unexpected version strings such as "-lpython2..7", but
8185 # this seems unlikely in practice. And even if that happens,
8186 # an error will be triggered later on, when checking that version
8187 # number.
ec685c5e 8188 python_version=`echo " ${python_libs} " \
c1039e3c 8189 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
0c4a4063
DE
8190 case "${python_version}" in
8191 python*)
ec685c5e
DE
8192
8193 version=${python_version}
8194
8195 new_CPPFLAGS=${python_includes}
8196 new_LIBS=${python_libs}
81ecdfbb
RW
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8198$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8199 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8200 save_LIBS=$LIBS
ec685c5e
DE
8201 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8202 LIBS="$LIBS $new_LIBS"
8203 found_usable_python=no
81ecdfbb 8204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8205/* end confdefs.h. */
ac534cba 8206#include "Python.h"
81ecdfbb
RW
8207int
8208main ()
8209{
8210Py_Initialize ();
8211 ;
8212 return 0;
8213}
bec39cab 8214_ACEOF
81ecdfbb 8215if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8216 have_libpython=${version}
8217 found_usable_python=yes
ac534cba
JB
8218 PYTHON_CPPFLAGS=$new_CPPFLAGS
8219 PYTHON_LIBS=$new_LIBS
9a156167 8220fi
81ecdfbb
RW
8221rm -f core conftest.err conftest.$ac_objext \
8222 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8223 CPPFLAGS=$save_CPPFLAGS
8224 LIBS=$save_LIBS
ec685c5e
DE
8225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8226$as_echo "${found_usable_python}" >&6; }
9a156167 8227
0c4a4063
DE
8228 ;;
8229 *)
ec685c5e 8230 as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
0c4a4063
DE
8231 ;;
8232 esac
e7a30f46 8233 elif test "${have_python_config}" != failed; then
ec685c5e 8234 if test "${have_libpython}" = no; then
9a156167 8235
420697bb
TT
8236 version=python2.7
8237
8238 new_CPPFLAGS=${python_includes}
8239 new_LIBS="${python_libs} -lpython2.7"
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8241$as_echo_n "checking for ${version}... " >&6; }
8242 save_CPPFLAGS=$CPPFLAGS
8243 save_LIBS=$LIBS
8244 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8245 LIBS="$LIBS $new_LIBS"
8246 found_usable_python=no
8247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8248/* end confdefs.h. */
ac534cba 8249#include "Python.h"
420697bb
TT
8250int
8251main ()
8252{
8253Py_Initialize ();
8254 ;
8255 return 0;
8256}
8257_ACEOF
8258if ac_fn_c_try_link "$LINENO"; then :
8259 have_libpython=${version}
8260 found_usable_python=yes
ac534cba
JB
8261 PYTHON_CPPFLAGS=$new_CPPFLAGS
8262 PYTHON_LIBS=$new_LIBS
420697bb
TT
8263fi
8264rm -f core conftest.err conftest.$ac_objext \
8265 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8266 CPPFLAGS=$save_CPPFLAGS
8267 LIBS=$save_LIBS
420697bb
TT
8268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8269$as_echo "${found_usable_python}" >&6; }
8270
8271 fi
8272 if test "${have_libpython}" = no; then
8273
ec685c5e
DE
8274 version=python2.6
8275
8276 new_CPPFLAGS=${python_includes}
8277 new_LIBS="${python_libs} -lpython2.6"
8278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8279$as_echo_n "checking for ${version}... " >&6; }
8280 save_CPPFLAGS=$CPPFLAGS
8281 save_LIBS=$LIBS
8282 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8283 LIBS="$LIBS $new_LIBS"
8284 found_usable_python=no
8285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8286/* end confdefs.h. */
ac534cba 8287#include "Python.h"
ec685c5e
DE
8288int
8289main ()
8290{
8291Py_Initialize ();
8292 ;
8293 return 0;
8294}
8295_ACEOF
8296if ac_fn_c_try_link "$LINENO"; then :
8297 have_libpython=${version}
8298 found_usable_python=yes
ac534cba
JB
8299 PYTHON_CPPFLAGS=$new_CPPFLAGS
8300 PYTHON_LIBS=$new_LIBS
ec685c5e
DE
8301fi
8302rm -f core conftest.err conftest.$ac_objext \
8303 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8304 CPPFLAGS=$save_CPPFLAGS
8305 LIBS=$save_LIBS
ec685c5e
DE
8306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8307$as_echo "${found_usable_python}" >&6; }
9a156167 8308
81ecdfbb 8309 fi
ec685c5e 8310 if test ${have_libpython} = no; then
9a156167 8311
81ecdfbb 8312 version=python2.5
9a156167 8313
ec685c5e
DE
8314 new_CPPFLAGS=${python_includes}
8315 new_LIBS="${python_libs} -lpython2.5"
81ecdfbb
RW
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8317$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8318 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8319 save_LIBS=$LIBS
ec685c5e
DE
8320 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8321 LIBS="$LIBS $new_LIBS"
8322 found_usable_python=no
81ecdfbb 8323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8324/* end confdefs.h. */
ac534cba 8325#include "Python.h"
81ecdfbb
RW
8326int
8327main ()
8328{
8329Py_Initialize ();
8330 ;
8331 return 0;
8332}
436868fb 8333_ACEOF
81ecdfbb 8334if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8335 have_libpython=${version}
8336 found_usable_python=yes
ac534cba
JB
8337 PYTHON_CPPFLAGS=$new_CPPFLAGS
8338 PYTHON_LIBS=$new_LIBS
436868fb 8339fi
81ecdfbb
RW
8340rm -f core conftest.err conftest.$ac_objext \
8341 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8342 CPPFLAGS=$save_CPPFLAGS
8343 LIBS=$save_LIBS
ec685c5e
DE
8344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8345$as_echo "${found_usable_python}" >&6; }
a9322a30 8346
81ecdfbb 8347 fi
ec685c5e 8348 if test ${have_libpython} = no; then
a9322a30 8349
81ecdfbb 8350 version=python2.4
a9322a30 8351
ec685c5e
DE
8352 new_CPPFLAGS=${python_includes}
8353 new_LIBS="${python_libs} -lpython2.4"
81ecdfbb
RW
8354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
8355$as_echo_n "checking for ${version}... " >&6; }
ec685c5e 8356 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 8357 save_LIBS=$LIBS
ec685c5e
DE
8358 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
8359 LIBS="$LIBS $new_LIBS"
8360 found_usable_python=no
81ecdfbb 8361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
436868fb 8362/* end confdefs.h. */
ac534cba 8363#include "Python.h"
a9322a30
TT
8364int
8365main ()
8366{
81ecdfbb 8367Py_Initialize ();
a9322a30
TT
8368 ;
8369 return 0;
8370}
436868fb 8371_ACEOF
81ecdfbb 8372if ac_fn_c_try_link "$LINENO"; then :
ec685c5e
DE
8373 have_libpython=${version}
8374 found_usable_python=yes
ac534cba
JB
8375 PYTHON_CPPFLAGS=$new_CPPFLAGS
8376 PYTHON_LIBS=$new_LIBS
436868fb 8377fi
81ecdfbb
RW
8378rm -f core conftest.err conftest.$ac_objext \
8379 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
8380 CPPFLAGS=$save_CPPFLAGS
8381 LIBS=$save_LIBS
ec685c5e
DE
8382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
8383$as_echo "${found_usable_python}" >&6; }
81ecdfbb 8384
ec685c5e
DE
8385 fi
8386 fi
9c4ea6c5 8387 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
11763c18
TT
8388
8389$as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
8390
9c4ea6c5 8391 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
ec685c5e
DE
8392
8393$as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
8394
9c4ea6c5 8395 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
ec685c5e
DE
8396
8397$as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
8398
9c4ea6c5 8399 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
81ecdfbb
RW
8400
8401$as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
8402
81ecdfbb 8403 fi
ec685c5e
DE
8404
8405 if test "${have_libpython}" = no; then
81ecdfbb
RW
8406 case "${with_python}" in
8407 yes)
8408 as_fn_error "python is missing or unusable" "$LINENO" 5
8409 ;;
8410 auto)
8411 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
8412$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
8413 ;;
8414 *)
8415 as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
8416 ;;
8417 esac
0c4a4063
DE
8418 else
8419 if test -n "${python_prefix}"; then
8420
8421cat >>confdefs.h <<_ACEOF
8422#define WITH_PYTHON_PATH "${python_prefix}"
8423_ACEOF
8424
8425
8426 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8427 if test "x$prefix" = xNONE; then
8428 test_prefix=/usr/local
8429 else
8430 test_prefix=$prefix
8431 fi
8432 else
8433 test_prefix=$exec_prefix
8434 fi
8435 value=0
8436 case ${python_prefix} in
8437 "${test_prefix}"|"${test_prefix}/"*|\
8438 '${exec_prefix}'|'${exec_prefix}/'*)
8439 value=1
8440 ;;
8441 esac
8442
8443cat >>confdefs.h <<_ACEOF
8444#define PYTHON_PATH_RELOCATABLE $value
8445_ACEOF
8446
8447
8448 fi
81ecdfbb 8449 fi
436868fb 8450fi
436868fb 8451
ec685c5e 8452if test "${have_libpython}" != no; then
436868fb 8453
81ecdfbb 8454$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 8455
81ecdfbb
RW
8456 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
8457 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
8458 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 8459 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 8460 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 8461
81ecdfbb
RW
8462 # Flags needed to compile Python code (taken from python-config --cflags).
8463 # We cannot call python-config directly because it will output whatever was
8464 # used when compiling the Python interpreter itself, including flags which
8465 # would make the python-related objects be compiled differently from the
8466 # rest of GDB (e.g., -O2 and -fPIC).
8467 if test "${GCC}" = yes; then
8468 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
8469 fi
436868fb 8470
81ecdfbb
RW
8471 if test "x${tentative_python_cflags}" != x; then
8472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
8473$as_echo_n "checking compiler flags for python code... " >&6; }
8474 for flag in ${tentative_python_cflags}; do
8475 # Check that the compiler accepts it
8476 saved_CFLAGS="$CFLAGS"
8477 CFLAGS="$CFLAGS $flag"
8478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8479/* end confdefs.h. */
81ecdfbb 8480
a9322a30
TT
8481int
8482main ()
8483{
a9322a30
TT
8484
8485 ;
8486 return 0;
8487}
bec39cab 8488_ACEOF
81ecdfbb
RW
8489if ac_fn_c_try_compile "$LINENO"; then :
8490 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 8491fi
81ecdfbb
RW
8492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8493 CFLAGS="$saved_CFLAGS"
8494 done
8495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
8496$as_echo "${PYTHON_CFLAGS}" >&6; }
8497 fi
043b6510
JB
8498
8499 # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
8500 # #if _SGIAPI
8501 # #define siginfo __siginfo
8502 # #endif
8503 # The problem is that including Python causes some XOPEN macros to be
8504 # unilaterally defined, and that in turn causes _SGIAPI to evaluate
8505 # to false. So, we work around this issue by defining siginfo ourself
8506 # though the command-line.
c83393b9
JB
8507 #
8508 # On x64 Windows, Python's include headers, and pyconfig.h in
8509 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
8510 # version of Windows. Unfortunately, MS_WIN64 is only defined if
8511 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
8512 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
8513 # The issue was reported to the Python community, but still isn't
8514 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
8515
043b6510
JB
8516 case "$gdb_host" in
8517 irix*) if test "${GCC}" = yes; then
8518 CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
8519 fi
8520 ;;
c83393b9
JB
8521 mingw64)
8522 if test "${GCC}" = yes; then
8523 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
8524 fi
8525 ;;
043b6510 8526 esac
a8db4212
YPK
8527
8528 # Note that "python -m threading" cannot be used to check for
8529 # threading support due to a bug in Python 2.7.3
8530 # (http://bugs.python.org/issue15567).
8531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
8532$as_echo_n "checking whether python supports threads... " >&6; }
8533 saved_CPPFLAGS="${CPPFLAGS}"
8534 CPPFLAGS="${PYTHON_CPPFLAGS}"
8535 # Note that the test is reversed so that python_has_threads=yes on
8536 # unexpected failures.
8537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8538/* end confdefs.h. */
8539
8540#include <Python.h>
8541#ifdef WITH_THREAD
8542# error
8543#endif
8544
8545_ACEOF
8546if ac_fn_c_try_cpp "$LINENO"; then :
8547 python_has_threads=no
8548else
8549 python_has_threads=yes
8550fi
8551rm -f conftest.err conftest.$ac_ext
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
8553$as_echo "${python_has_threads}" >&6; }
8554 CPPFLAGS="${saved_CPPFLAGS}"
81ecdfbb
RW
8555else
8556 # Even if Python support is not compiled in, we need to have these files
88a1906b
DE
8557 # included.
8558 CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o"
8559 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \
8560 python/py-prettyprint.c python/py-auto-load.c"
a9322a30 8561fi
9a156167 8562
9a156167 8563
ac534cba
JB
8564
8565
a8db4212
YPK
8566# Enable -lmcheck by default (it provides cheap-enough memory mangling),
8567# but turn it off if Python is enabled with threads, since -lmcheck is
8568# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
8569# and for releases.
17ef446e
PA
8570if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
8571 && $development; then
8572 libmcheck_default=yes
8573else
8574 libmcheck_default=no
a8db4212
YPK
8575fi
8576
17ef446e
PA
8577 # Check whether --enable-libmcheck was given.
8578if test "${enable_libmcheck+set}" = set; then :
8579 enableval=$enable_libmcheck; case "${enableval}" in
8580 yes | y) ENABLE_LIBMCHECK="yes" ;;
8581 no | n) ENABLE_LIBMCHECK="no" ;;
8582 *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
8583 esac
8584fi
8585
8586
8587 if test -z "${ENABLE_LIBMCHECK}"; then
8588 ENABLE_LIBMCHECK=${libmcheck_default}
a8db4212 8589 fi
17ef446e
PA
8590
8591 if test "$ENABLE_LIBMCHECK" = "yes" ; then
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
a8db4212
YPK
8593$as_echo_n "checking for main in -lmcheck... " >&6; }
8594if test "${ac_cv_lib_mcheck_main+set}" = set; then :
8595 $as_echo_n "(cached) " >&6
8596else
8597 ac_check_lib_save_LIBS=$LIBS
8598LIBS="-lmcheck $LIBS"
8599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8600/* end confdefs.h. */
8601
8602
8603int
8604main ()
8605{
8606return main ();
8607 ;
8608 return 0;
8609}
8610_ACEOF
8611if ac_fn_c_try_link "$LINENO"; then :
8612 ac_cv_lib_mcheck_main=yes
8613else
8614 ac_cv_lib_mcheck_main=no
8615fi
8616rm -f core conftest.err conftest.$ac_objext \
8617 conftest$ac_exeext conftest.$ac_ext
8618LIBS=$ac_check_lib_save_LIBS
8619fi
8620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
8621$as_echo "$ac_cv_lib_mcheck_main" >&6; }
8622if test "x$ac_cv_lib_mcheck_main" = x""yes; then :
8623 cat >>confdefs.h <<_ACEOF
8624#define HAVE_LIBMCHECK 1
8625_ACEOF
8626
8627 LIBS="-lmcheck $LIBS"
8628
8629fi
8630
17ef446e
PA
8631 fi
8632
8633
8634if test "$ENABLE_LIBMCHECK" = "yes" \
8635 -a "${have_libpython}" != "no" \
8636 -a "${python_has_threads}" = "yes" ; then
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
8638$as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
a8db4212
YPK
8639fi
8640
81ecdfbb
RW
8641# ------------------------- #
8642# Checks for header files. #
8643# ------------------------- #
c890192f 8644
81ecdfbb
RW
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8646$as_echo_n "checking for ANSI C header files... " >&6; }
8647if test "${ac_cv_header_stdc+set}" = set; then :
8648 $as_echo_n "(cached) " >&6
bec39cab 8649else
81ecdfbb 8650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8651/* end confdefs.h. */
81ecdfbb
RW
8652#include <stdlib.h>
8653#include <stdarg.h>
8654#include <string.h>
8655#include <float.h>
8656
a9322a30
TT
8657int
8658main ()
8659{
a9322a30
TT
8660
8661 ;
8662 return 0;
8663}
bec39cab 8664_ACEOF
81ecdfbb
RW
8665if ac_fn_c_try_compile "$LINENO"; then :
8666 ac_cv_header_stdc=yes
bec39cab 8667else
81ecdfbb 8668 ac_cv_header_stdc=no
a9322a30 8669fi
81ecdfbb 8670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8671
81ecdfbb
RW
8672if test $ac_cv_header_stdc = yes; then
8673 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8675/* end confdefs.h. */
8676#include <string.h>
bec39cab 8677
81ecdfbb
RW
8678_ACEOF
8679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8680 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 8681
bec39cab 8682else
81ecdfbb
RW
8683 ac_cv_header_stdc=no
8684fi
8685rm -f conftest*
8686
8687fi
8688
8689if test $ac_cv_header_stdc = yes; then
8690 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8692/* end confdefs.h. */
8693#include <stdlib.h>
8694
bec39cab 8695_ACEOF
81ecdfbb
RW
8696if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8697 $EGREP "free" >/dev/null 2>&1; then :
06825bd1 8698
81ecdfbb
RW
8699else
8700 ac_cv_header_stdc=no
8701fi
8702rm -f conftest*
bec39cab 8703
bec39cab 8704fi
81ecdfbb
RW
8705
8706if test $ac_cv_header_stdc = yes; then
8707 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8708 if test "$cross_compiling" = yes; then :
8709 :
bec39cab 8710else
81ecdfbb 8711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8712/* end confdefs.h. */
81ecdfbb
RW
8713#include <ctype.h>
8714#include <stdlib.h>
8715#if ((' ' & 0x0FF) == 0x020)
8716# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8717# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8718#else
8719# define ISLOWER(c) \
8720 (('a' <= (c) && (c) <= 'i') \
8721 || ('j' <= (c) && (c) <= 'r') \
8722 || ('s' <= (c) && (c) <= 'z'))
8723# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8724#endif
8725
8726#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
8727int
8728main ()
8729{
81ecdfbb
RW
8730 int i;
8731 for (i = 0; i < 256; i++)
8732 if (XOR (islower (i), ISLOWER (i))
8733 || toupper (i) != TOUPPER (i))
8734 return 2;
a9322a30
TT
8735 return 0;
8736}
bec39cab 8737_ACEOF
81ecdfbb
RW
8738if ac_fn_c_try_run "$LINENO"; then :
8739
bec39cab 8740else
81ecdfbb
RW
8741 ac_cv_header_stdc=no
8742fi
8743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8744 conftest.$ac_objext conftest.beam conftest.$ac_ext
8745fi
bec39cab 8746
bec39cab 8747fi
a9322a30 8748fi
81ecdfbb
RW
8749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8750$as_echo "$ac_cv_header_stdc" >&6; }
8751if test $ac_cv_header_stdc = yes; then
bec39cab 8752
81ecdfbb 8753$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5ee754fc 8754
81ecdfbb 8755fi
bec39cab 8756
81ecdfbb 8757# elf_hp.h is for HP/UX 64-bit shared library support.
9467110b
TT
8758for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
8759 thread_db.h stddef.h \
8760 stdlib.h sys/fault.h \
81ecdfbb
RW
8761 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
8762 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
8763 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
9467110b
TT
8764 termios.h termio.h \
8765 sgtty.h unistd.h elf_hp.h \
8766 dlfcn.h
81ecdfbb
RW
8767do :
8768 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8769ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8770eval as_val=\$$as_ac_Header
8771 if test "x$as_val" = x""yes; then :
bec39cab 8772 cat >>confdefs.h <<_ACEOF
81ecdfbb 8773#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8774_ACEOF
c906108c 8775
bec39cab 8776fi
81ecdfbb
RW
8777
8778done
8779
81ecdfbb
RW
8780for ac_header in sys/proc.h
8781do :
8782 ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H
8783# include <sys/param.h>
8784#endif
c906108c 8785
81ecdfbb
RW
8786"
8787if test "x$ac_cv_header_sys_proc_h" = x""yes; then :
bec39cab 8788 cat >>confdefs.h <<_ACEOF
81ecdfbb 8789#define HAVE_SYS_PROC_H 1
bec39cab 8790_ACEOF
5ee754fc 8791
bec39cab 8792fi
81ecdfbb
RW
8793
8794done
8795
8796for ac_header in sys/user.h
8797do :
8798 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
8799# include <sys/param.h>
a9322a30
TT
8800#endif
8801
81ecdfbb
RW
8802"
8803if test "x$ac_cv_header_sys_user_h" = x""yes; then :
8804 cat >>confdefs.h <<_ACEOF
8805#define HAVE_SYS_USER_H 1
bec39cab 8806_ACEOF
bec39cab 8807
a9322a30 8808fi
bec39cab 8809
81ecdfbb 8810done
5ee754fc 8811
5ee754fc 8812
81ecdfbb
RW
8813# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
8814# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
8815# think that we don't have <curses.h> if we're using GCC.
8816case $host_os in
8817 solaris2.[789])
8818 if test "$GCC" = yes; then
8819
8820$as_echo "#define _MSE_INT_H 1" >>confdefs.h
8821
8822 fi ;;
8823esac
8824for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
8825do :
8826 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8827ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8828eval as_val=\$$as_ac_Header
8829 if test "x$as_val" = x""yes; then :
bec39cab 8830 cat >>confdefs.h <<_ACEOF
81ecdfbb 8831#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 8832_ACEOF
5ee754fc
MK
8833
8834fi
8835
81ecdfbb 8836done
bec39cab 8837
81ecdfbb
RW
8838for ac_header in term.h
8839do :
8840 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
8841# include <curses.h>
8842#endif
bec39cab 8843
81ecdfbb
RW
8844"
8845if test "x$ac_cv_header_term_h" = x""yes; then :
8846 cat >>confdefs.h <<_ACEOF
8847#define HAVE_TERM_H 1
a8111142 8848_ACEOF
a8111142 8849
a8111142 8850fi
a8111142 8851
81ecdfbb 8852done
a8111142
TT
8853
8854
81ecdfbb
RW
8855# ------------------------- #
8856# Checks for declarations. #
8857# ------------------------- #
a9322a30 8858
81ecdfbb
RW
8859ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
8860if test "x$ac_cv_have_decl_free" = x""yes; then :
8861 ac_have_decl=1
bec39cab 8862else
81ecdfbb
RW
8863 ac_have_decl=0
8864fi
8865
8866cat >>confdefs.h <<_ACEOF
8867#define HAVE_DECL_FREE $ac_have_decl
bec39cab 8868_ACEOF
81ecdfbb
RW
8869ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
8870if test "x$ac_cv_have_decl_malloc" = x""yes; then :
8871 ac_have_decl=1
8872else
8873 ac_have_decl=0
8874fi
8875
8876cat >>confdefs.h <<_ACEOF
8877#define HAVE_DECL_MALLOC $ac_have_decl
bec39cab 8878_ACEOF
81ecdfbb
RW
8879ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
8880if test "x$ac_cv_have_decl_realloc" = x""yes; then :
8881 ac_have_decl=1
bec39cab 8882else
81ecdfbb
RW
8883 ac_have_decl=0
8884fi
bec39cab 8885
81ecdfbb
RW
8886cat >>confdefs.h <<_ACEOF
8887#define HAVE_DECL_REALLOC $ac_have_decl
bec39cab 8888_ACEOF
81ecdfbb
RW
8889ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
8890if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
8891 ac_have_decl=1
8892else
8893 ac_have_decl=0
5ee754fc 8894fi
81ecdfbb
RW
8895
8896cat >>confdefs.h <<_ACEOF
8897#define HAVE_DECL_SNPRINTF $ac_have_decl
a9322a30 8898_ACEOF
5ee754fc 8899
5ee754fc 8900
81ecdfbb
RW
8901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
8902$as_echo_n "checking for LC_MESSAGES... " >&6; }
8903if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
8904 $as_echo_n "(cached) " >&6
bec39cab 8905else
81ecdfbb 8906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8907/* end confdefs.h. */
81ecdfbb 8908#include <locale.h>
a9322a30
TT
8909int
8910main ()
8911{
81ecdfbb 8912return LC_MESSAGES
a9322a30
TT
8913 ;
8914 return 0;
8915}
bec39cab 8916_ACEOF
81ecdfbb
RW
8917if ac_fn_c_try_link "$LINENO"; then :
8918 am_cv_val_LC_MESSAGES=yes
bec39cab 8919else
81ecdfbb
RW
8920 am_cv_val_LC_MESSAGES=no
8921fi
8922rm -f core conftest.err conftest.$ac_objext \
8923 conftest$ac_exeext conftest.$ac_ext
8924fi
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
8926$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
8927 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 8928
81ecdfbb
RW
8929$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
8930
8931 fi
8932
8933
8934# ----------------------- #
8935# Checks for structures. #
8936# ----------------------- #
8937
8938ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
8939if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
8940
8941cat >>confdefs.h <<_ACEOF
8942#define HAVE_STRUCT_STAT_ST_BLOCKS 1
7eb368b3 8943_ACEOF
7eb368b3 8944
81ecdfbb 8945
7eb368b3 8946fi
81ecdfbb
RW
8947ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
8948if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
7eb368b3 8949
a9322a30
TT
8950cat >>confdefs.h <<_ACEOF
8951#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
8952_ACEOF
8953
a9322a30 8954
7eb368b3
NR
8955fi
8956
7eb368b3 8957
a9322a30
TT
8958# ------------------ #
8959# Checks for types. #
8960# ------------------ #
7eb368b3 8961
81ecdfbb
RW
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
8963$as_echo_n "checking return type of signal handlers... " >&6; }
8964if test "${ac_cv_type_signal+set}" = set; then :
8965 $as_echo_n "(cached) " >&6
bec39cab 8966else
81ecdfbb 8967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8968/* end confdefs.h. */
a9322a30
TT
8969#include <sys/types.h>
8970#include <signal.h>
7cb9022a 8971
a9322a30
TT
8972int
8973main ()
8974{
81ecdfbb 8975return *(signal (0, 0)) (0) == 1;
a9322a30
TT
8976 ;
8977 return 0;
8978}
bec39cab 8979_ACEOF
81ecdfbb
RW
8980if ac_fn_c_try_compile "$LINENO"; then :
8981 ac_cv_type_signal=int
bec39cab 8982else
81ecdfbb 8983 ac_cv_type_signal=void
bec39cab 8984fi
81ecdfbb 8985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 8986fi
81ecdfbb
RW
8987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
8988$as_echo "$ac_cv_type_signal" >&6; }
bec39cab 8989
a9322a30
TT
8990cat >>confdefs.h <<_ACEOF
8991#define RETSIGTYPE $ac_cv_type_signal
8992_ACEOF
5ee754fc 8993
bec39cab 8994
81ecdfbb 8995ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
a9322a30
TT
8996#include <sys/socket.h>
8997
81ecdfbb
RW
8998"
8999if test "x$ac_cv_type_socklen_t" = x""yes; then :
bec39cab 9000
a9322a30
TT
9001cat >>confdefs.h <<_ACEOF
9002#define HAVE_SOCKLEN_T 1
9003_ACEOF
9004
9005
9006fi
9007
9008
9009# ------------------------------------- #
9010# Checks for compiler characteristics. #
9011# ------------------------------------- #
9012
81ecdfbb
RW
9013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9014$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9015if test "${ac_cv_c_const+set}" = set; then :
9016 $as_echo_n "(cached) " >&6
a9322a30 9017else
81ecdfbb 9018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9019/* end confdefs.h. */
a9322a30
TT
9020
9021int
9022main ()
9023{
9024/* FIXME: Include the comments suggested by Paul. */
9025#ifndef __cplusplus
9026 /* Ultrix mips cc rejects this. */
9027 typedef int charset[2];
81ecdfbb 9028 const charset cs;
a9322a30 9029 /* SunOS 4.1.1 cc rejects this. */
81ecdfbb
RW
9030 char const *const *pcpcc;
9031 char **ppc;
a9322a30
TT
9032 /* NEC SVR4.0.2 mips cc rejects this. */
9033 struct point {int x, y;};
9034 static struct point const zero = {0,0};
9035 /* AIX XL C 1.02.0.0 rejects this.
9036 It does not let you subtract one const X* pointer from another in
9037 an arm of an if-expression whose if-part is not a constant
9038 expression */
9039 const char *g = "string";
81ecdfbb 9040 pcpcc = &g + (g ? g-g : 0);
a9322a30 9041 /* HPUX 7.0 cc rejects these. */
81ecdfbb
RW
9042 ++pcpcc;
9043 ppc = (char**) pcpcc;
9044 pcpcc = (char const *const *) ppc;
a9322a30
TT
9045 { /* SCO 3.2v4 cc rejects this. */
9046 char *t;
9047 char const *s = 0 ? (char *) 0 : (char const *) 0;
9048
9049 *t++ = 0;
81ecdfbb 9050 if (s) return 0;
a9322a30
TT
9051 }
9052 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9053 int x[] = {25, 17};
9054 const int *foo = &x[0];
9055 ++foo;
9056 }
9057 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9058 typedef const int *iptr;
9059 iptr p = 0;
9060 ++p;
9061 }
9062 { /* AIX XL C 1.02.0.0 rejects this saying
9063 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9064 struct s { int j; const int *ap[3]; };
9065 struct s *b; b->j = 5;
9066 }
9067 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9068 const int foo = 10;
81ecdfbb 9069 if (!foo) return 0;
a9322a30 9070 }
81ecdfbb 9071 return !cs[0] && !zero.x;
a9322a30
TT
9072#endif
9073
9074 ;
9075 return 0;
9076}
bec39cab 9077_ACEOF
81ecdfbb 9078if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9079 ac_cv_c_const=yes
5ee754fc 9080else
81ecdfbb 9081 ac_cv_c_const=no
5ee754fc 9082fi
81ecdfbb 9083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 9084fi
81ecdfbb
RW
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9086$as_echo "$ac_cv_c_const" >&6; }
a9322a30 9087if test $ac_cv_c_const = no; then
bec39cab 9088
81ecdfbb 9089$as_echo "#define const /**/" >>confdefs.h
bec39cab 9090
5ee754fc 9091fi
bec39cab 9092
81ecdfbb
RW
9093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9094$as_echo_n "checking for inline... " >&6; }
9095if test "${ac_cv_c_inline+set}" = set; then :
9096 $as_echo_n "(cached) " >&6
bec39cab 9097else
a9322a30
TT
9098 ac_cv_c_inline=no
9099for ac_kw in inline __inline__ __inline; do
81ecdfbb 9100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9101/* end confdefs.h. */
a9322a30
TT
9102#ifndef __cplusplus
9103typedef int foo_t;
9104static $ac_kw foo_t static_foo () {return 0; }
9105$ac_kw foo_t foo () {return 0; }
9106#endif
9107
bec39cab 9108_ACEOF
81ecdfbb
RW
9109if ac_fn_c_try_compile "$LINENO"; then :
9110 ac_cv_c_inline=$ac_kw
bec39cab 9111fi
81ecdfbb
RW
9112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9113 test "$ac_cv_c_inline" != no && break
a9322a30 9114done
bec39cab 9115
5ee754fc 9116fi
81ecdfbb
RW
9117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9118$as_echo "$ac_cv_c_inline" >&6; }
5ee754fc 9119
a9322a30
TT
9120case $ac_cv_c_inline in
9121 inline | yes) ;;
9122 *)
9123 case $ac_cv_c_inline in
9124 no) ac_val=;;
9125 *) ac_val=$ac_cv_c_inline;;
9126 esac
9127 cat >>confdefs.h <<_ACEOF
9128#ifndef __cplusplus
9129#define inline $ac_val
9130#endif
9131_ACEOF
bec39cab
AC
9132 ;;
9133esac
bec39cab 9134
81ecdfbb
RW
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9136$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9137if test "${ac_cv_c_bigendian+set}" = set; then :
9138 $as_echo_n "(cached) " >&6
bec39cab 9139else
81ecdfbb
RW
9140 ac_cv_c_bigendian=unknown
9141 # See if we're dealing with a universal compiler.
9142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9143/* end confdefs.h. */
9144#ifndef __APPLE_CC__
9145 not a universal capable compiler
9146 #endif
9147 typedef int dummy;
9148
9149_ACEOF
9150if ac_fn_c_try_compile "$LINENO"; then :
9151
9152 # Check for potential -arch flags. It is not universal unless
9153 # there are at least two -arch flags with different values.
9154 ac_arch=
9155 ac_prev=
9156 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9157 if test -n "$ac_prev"; then
9158 case $ac_word in
9159 i?86 | x86_64 | ppc | ppc64)
9160 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9161 ac_arch=$ac_word
9162 else
9163 ac_cv_c_bigendian=universal
9164 break
9165 fi
9166 ;;
9167 esac
9168 ac_prev=
9169 elif test "x$ac_word" = "x-arch"; then
9170 ac_prev=arch
9171 fi
9172 done
9173fi
9174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9175 if test $ac_cv_c_bigendian = unknown; then
9176 # See if sys/param.h defines the BYTE_ORDER macro.
9177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9178/* end confdefs.h. */
a9322a30 9179#include <sys/types.h>
81ecdfbb 9180 #include <sys/param.h>
a9322a30
TT
9181
9182int
9183main ()
9184{
81ecdfbb
RW
9185#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9186 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9187 && LITTLE_ENDIAN)
9188 bogus endian macros
9189 #endif
a9322a30
TT
9190
9191 ;
9192 return 0;
9193}
bec39cab 9194_ACEOF
81ecdfbb 9195if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9196 # It does; now see whether it defined to BIG_ENDIAN or not.
81ecdfbb 9197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9198/* end confdefs.h. */
a9322a30 9199#include <sys/types.h>
81ecdfbb 9200 #include <sys/param.h>
a9322a30
TT
9201
9202int
9203main ()
9204{
9205#if BYTE_ORDER != BIG_ENDIAN
81ecdfbb
RW
9206 not big endian
9207 #endif
a9322a30
TT
9208
9209 ;
9210 return 0;
9211}
bec39cab 9212_ACEOF
81ecdfbb 9213if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9214 ac_cv_c_bigendian=yes
5ee754fc 9215else
81ecdfbb 9216 ac_cv_c_bigendian=no
5ee754fc 9217fi
81ecdfbb
RW
9218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9219fi
9220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9221 fi
9222 if test $ac_cv_c_bigendian = unknown; then
9223 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9225/* end confdefs.h. */
9226#include <limits.h>
bec39cab 9227
81ecdfbb
RW
9228int
9229main ()
9230{
9231#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9232 bogus endian macros
9233 #endif
9234
9235 ;
9236 return 0;
9237}
7eb368b3 9238_ACEOF
81ecdfbb
RW
9239if ac_fn_c_try_compile "$LINENO"; then :
9240 # It does; now see whether it defined to _BIG_ENDIAN or not.
9241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7eb368b3 9242/* end confdefs.h. */
81ecdfbb
RW
9243#include <limits.h>
9244
7eb368b3
NR
9245int
9246main ()
9247{
81ecdfbb
RW
9248#ifndef _BIG_ENDIAN
9249 not big endian
9250 #endif
9251
7eb368b3
NR
9252 ;
9253 return 0;
9254}
9255_ACEOF
81ecdfbb 9256if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 9257 ac_cv_c_bigendian=yes
81ecdfbb
RW
9258else
9259 ac_cv_c_bigendian=no
a9322a30 9260fi
81ecdfbb 9261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 9262fi
81ecdfbb
RW
9263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9264 fi
9265 if test $ac_cv_c_bigendian = unknown; then
9266 # Compile a test program.
9267 if test "$cross_compiling" = yes; then :
9268 # Try to guess by grepping values from an object file.
9269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9270/* end confdefs.h. */
9271short int ascii_mm[] =
9272 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9273 short int ascii_ii[] =
9274 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9275 int use_ascii (int i) {
9276 return ascii_mm[i] + ascii_ii[i];
9277 }
9278 short int ebcdic_ii[] =
9279 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9280 short int ebcdic_mm[] =
9281 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9282 int use_ebcdic (int i) {
9283 return ebcdic_mm[i] + ebcdic_ii[i];
9284 }
9285 extern int foo;
7eb368b3 9286
81ecdfbb
RW
9287int
9288main ()
9289{
9290return use_ascii (foo) == use_ebcdic (foo);
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295if ac_fn_c_try_compile "$LINENO"; then :
9296 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9297 ac_cv_c_bigendian=yes
9298 fi
9299 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9300 if test "$ac_cv_c_bigendian" = unknown; then
9301 ac_cv_c_bigendian=no
9302 else
9303 # finding both strings is unlikely to happen, but who knows?
9304 ac_cv_c_bigendian=unknown
9305 fi
9306 fi
7eb368b3 9307fi
81ecdfbb 9308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 9309else
81ecdfbb 9310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9311/* end confdefs.h. */
81ecdfbb 9312$ac_includes_default
d3ea6809
MM
9313int
9314main ()
9315{
81ecdfbb
RW
9316
9317 /* Are we little or big endian? From Harbison&Steele. */
9318 union
9319 {
9320 long int l;
9321 char c[sizeof (long int)];
9322 } u;
9323 u.l = 1;
9324 return u.c[sizeof (long int) - 1] == 1;
9325
9326 ;
9327 return 0;
d3ea6809
MM
9328}
9329_ACEOF
81ecdfbb 9330if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9331 ac_cv_c_bigendian=no
d3ea6809 9332else
81ecdfbb 9333 ac_cv_c_bigendian=yes
d3ea6809 9334fi
81ecdfbb
RW
9335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9336 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9337fi
a9322a30 9338
81ecdfbb
RW
9339 fi
9340fi
9341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9342$as_echo "$ac_cv_c_bigendian" >&6; }
9343 case $ac_cv_c_bigendian in #(
9344 yes)
9345 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9346;; #(
9347 no)
9348 ;; #(
9349 universal)
9350
9351$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9352
9353 ;; #(
9354 *)
9355 as_fn_error "unknown endianness
9356 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9357 esac
d3ea6809
MM
9358
9359
a9322a30
TT
9360# ------------------------------ #
9361# Checks for library functions. #
9362# ------------------------------ #
d3ea6809 9363
a9322a30
TT
9364# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9365# for constant arguments. Useless!
81ecdfbb
RW
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9367$as_echo_n "checking for working alloca.h... " >&6; }
9368if test "${ac_cv_working_alloca_h+set}" = set; then :
9369 $as_echo_n "(cached) " >&6
d3ea6809 9370else
81ecdfbb 9371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3ea6809 9372/* end confdefs.h. */
a9322a30 9373#include <alloca.h>
bec39cab
AC
9374int
9375main ()
9376{
a9322a30 9377char *p = (char *) alloca (2 * sizeof (int));
81ecdfbb 9378 if (p) return 0;
bec39cab
AC
9379 ;
9380 return 0;
9381}
9382_ACEOF
81ecdfbb 9383if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9384 ac_cv_working_alloca_h=yes
bec39cab 9385else
81ecdfbb 9386 ac_cv_working_alloca_h=no
bec39cab 9387fi
81ecdfbb
RW
9388rm -f core conftest.err conftest.$ac_objext \
9389 conftest$ac_exeext conftest.$ac_ext
bec39cab 9390fi
81ecdfbb
RW
9391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9392$as_echo "$ac_cv_working_alloca_h" >&6; }
a9322a30
TT
9393if test $ac_cv_working_alloca_h = yes; then
9394
81ecdfbb 9395$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c906108c 9396
c906108c 9397fi
bec39cab 9398
81ecdfbb
RW
9399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9400$as_echo_n "checking for alloca... " >&6; }
9401if test "${ac_cv_func_alloca_works+set}" = set; then :
9402 $as_echo_n "(cached) " >&6
bec39cab 9403else
81ecdfbb 9404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9405/* end confdefs.h. */
a9322a30
TT
9406#ifdef __GNUC__
9407# define alloca __builtin_alloca
b4e70030 9408#else
a9322a30
TT
9409# ifdef _MSC_VER
9410# include <malloc.h>
9411# define alloca _alloca
9412# else
81ecdfbb 9413# ifdef HAVE_ALLOCA_H
a9322a30
TT
9414# include <alloca.h>
9415# else
9416# ifdef _AIX
9417 #pragma alloca
9418# else
9419# ifndef alloca /* predefined by HP cc +Olibcalls */
9420char *alloca ();
9421# endif
9422# endif
9423# endif
9424# endif
c906108c 9425#endif
97bf5e38 9426
bec39cab
AC
9427int
9428main ()
9429{
a9322a30 9430char *p = (char *) alloca (1);
81ecdfbb 9431 if (p) return 0;
bec39cab
AC
9432 ;
9433 return 0;
9434}
9435_ACEOF
81ecdfbb 9436if ac_fn_c_try_link "$LINENO"; then :
a9322a30 9437 ac_cv_func_alloca_works=yes
bec39cab 9438else
81ecdfbb 9439 ac_cv_func_alloca_works=no
bec39cab 9440fi
81ecdfbb
RW
9441rm -f core conftest.err conftest.$ac_objext \
9442 conftest$ac_exeext conftest.$ac_ext
bec39cab 9443fi
81ecdfbb
RW
9444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9445$as_echo "$ac_cv_func_alloca_works" >&6; }
a9322a30
TT
9446
9447if test $ac_cv_func_alloca_works = yes; then
9448
81ecdfbb 9449$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c906108c 9450
a9322a30
TT
9451else
9452 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9453# that cause trouble. Some versions do not even contain alloca or
9454# contain a buggy version. If you still want to use their alloca,
9455# use ar to extract alloca.o from them instead of compiling alloca.c.
9456
81ecdfbb 9457ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a9322a30 9458
81ecdfbb 9459$as_echo "#define C_ALLOCA 1" >>confdefs.h
c906108c 9460
bec39cab 9461
81ecdfbb
RW
9462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9463$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9464if test "${ac_cv_os_cray+set}" = set; then :
9465 $as_echo_n "(cached) " >&6
a9322a30 9466else
81ecdfbb 9467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30 9468/* end confdefs.h. */
81ecdfbb 9469#if defined CRAY && ! defined CRAY2
a9322a30
TT
9470webecray
9471#else
9472wenotbecray
9473#endif
9474
9475_ACEOF
9476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 9477 $EGREP "webecray" >/dev/null 2>&1; then :
a9322a30
TT
9478 ac_cv_os_cray=yes
9479else
81ecdfbb 9480 ac_cv_os_cray=no
bec39cab 9481fi
81ecdfbb
RW
9482rm -f conftest*
9483
bec39cab 9484fi
81ecdfbb
RW
9485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9486$as_echo "$ac_cv_os_cray" >&6; }
9487if test $ac_cv_os_cray = yes; then
9488 for ac_func in _getb67 GETB67 getb67; do
9489 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9490ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9491eval as_val=\$$as_ac_var
9492 if test "x$as_val" = x""yes; then :
a9322a30
TT
9493
9494cat >>confdefs.h <<_ACEOF
9495#define CRAY_STACKSEG_END $ac_func
bec39cab 9496_ACEOF
c906108c 9497
a9322a30 9498 break
c906108c
SS
9499fi
9500
a9322a30
TT
9501 done
9502fi
bec39cab 9503
81ecdfbb
RW
9504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9505$as_echo_n "checking stack direction for C alloca... " >&6; }
9506if test "${ac_cv_c_stack_direction+set}" = set; then :
9507 $as_echo_n "(cached) " >&6
a9322a30 9508else
81ecdfbb 9509 if test "$cross_compiling" = yes; then :
a9322a30 9510 ac_cv_c_stack_direction=0
bec39cab 9511else
81ecdfbb 9512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9513/* end confdefs.h. */
81ecdfbb 9514$ac_includes_default
a9322a30
TT
9515int
9516find_stack_direction ()
b4e70030 9517{
a9322a30
TT
9518 static char *addr = 0;
9519 auto char dummy;
9520 if (addr == 0)
9521 {
9522 addr = &dummy;
9523 return find_stack_direction ();
9524 }
9525 else
9526 return (&dummy > addr) ? 1 : -1;
b4e70030 9527}
b757528f 9528
bec39cab
AC
9529int
9530main ()
9531{
81ecdfbb 9532 return find_stack_direction () < 0;
bec39cab
AC
9533}
9534_ACEOF
81ecdfbb 9535if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9536 ac_cv_c_stack_direction=1
9537else
81ecdfbb 9538 ac_cv_c_stack_direction=-1
a9322a30 9539fi
81ecdfbb
RW
9540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9541 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9542fi
a9322a30 9543
81ecdfbb
RW
9544fi
9545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9546$as_echo "$ac_cv_c_stack_direction" >&6; }
a9322a30
TT
9547cat >>confdefs.h <<_ACEOF
9548#define STACK_DIRECTION $ac_cv_c_stack_direction
9549_ACEOF
9550
9551
9552fi
9553
a9322a30 9554for ac_header in stdlib.h unistd.h
81ecdfbb
RW
9555do :
9556 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9557ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9558eval as_val=\$$as_ac_Header
9559 if test "x$as_val" = x""yes; then :
bec39cab 9560 cat >>confdefs.h <<_ACEOF
81ecdfbb 9561#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 9562_ACEOF
b757528f 9563
b757528f 9564fi
bec39cab 9565
a9322a30 9566done
a3828db0 9567
a9322a30 9568for ac_func in getpagesize
81ecdfbb
RW
9569do :
9570 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9571if test "x$ac_cv_func_getpagesize" = x""yes; then :
bec39cab 9572 cat >>confdefs.h <<_ACEOF
81ecdfbb 9573#define HAVE_GETPAGESIZE 1
bec39cab 9574_ACEOF
bcb3dc3d 9575
bcb3dc3d
MK
9576fi
9577done
9578
81ecdfbb
RW
9579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9580$as_echo_n "checking for working mmap... " >&6; }
9581if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9582 $as_echo_n "(cached) " >&6
a9322a30 9583else
81ecdfbb 9584 if test "$cross_compiling" = yes; then :
a9322a30 9585 ac_cv_func_mmap_fixed_mapped=no
bec39cab 9586else
81ecdfbb 9587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9588/* end confdefs.h. */
a9322a30
TT
9589$ac_includes_default
9590/* malloc might have been renamed as rpl_malloc. */
9591#undef malloc
bec39cab 9592
a9322a30
TT
9593/* Thanks to Mike Haertel and Jim Avera for this test.
9594 Here is a matrix of mmap possibilities:
9595 mmap private not fixed
9596 mmap private fixed at somewhere currently unmapped
9597 mmap private fixed at somewhere already mapped
9598 mmap shared not fixed
9599 mmap shared fixed at somewhere currently unmapped
9600 mmap shared fixed at somewhere already mapped
9601 For private mappings, we should verify that changes cannot be read()
9602 back from the file, nor mmap's back from the file at a different
9603 address. (There have been systems where private was not correctly
9604 implemented like the infamous i386 svr4.0, and systems where the
9605 VM page cache was not coherent with the file system buffer cache
9606 like early versions of FreeBSD and possibly contemporary NetBSD.)
9607 For shared mappings, we should conversely verify that changes get
9608 propagated back to all the places they're supposed to be.
bec39cab 9609
a9322a30
TT
9610 Grep wants private fixed already mapped.
9611 The main things grep needs to know about mmap are:
9612 * does it exist and is it safe to write into the mmap'd area
9613 * how to use it (BSD variants) */
8b9cf735 9614
a9322a30
TT
9615#include <fcntl.h>
9616#include <sys/mman.h>
8b9cf735 9617
81ecdfbb 9618#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 9619char *malloc ();
a3828db0
MK
9620#endif
9621
a9322a30 9622/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 9623#ifndef HAVE_GETPAGESIZE
a9322a30 9624/* Assume that all systems that can run configure have sys/param.h. */
81ecdfbb 9625# ifndef HAVE_SYS_PARAM_H
a9322a30
TT
9626# define HAVE_SYS_PARAM_H 1
9627# endif
9628
9629# ifdef _SC_PAGESIZE
9630# define getpagesize() sysconf(_SC_PAGESIZE)
9631# else /* no _SC_PAGESIZE */
81ecdfbb 9632# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
9633# include <sys/param.h>
9634# ifdef EXEC_PAGESIZE
9635# define getpagesize() EXEC_PAGESIZE
9636# else /* no EXEC_PAGESIZE */
9637# ifdef NBPG
9638# define getpagesize() NBPG * CLSIZE
9639# ifndef CLSIZE
9640# define CLSIZE 1
9641# endif /* no CLSIZE */
9642# else /* no NBPG */
9643# ifdef NBPC
9644# define getpagesize() NBPC
9645# else /* no NBPC */
9646# ifdef PAGESIZE
9647# define getpagesize() PAGESIZE
9648# endif /* PAGESIZE */
9649# endif /* no NBPC */
9650# endif /* no NBPG */
9651# endif /* no EXEC_PAGESIZE */
9652# else /* no HAVE_SYS_PARAM_H */
9653# define getpagesize() 8192 /* punt totally */
9654# endif /* no HAVE_SYS_PARAM_H */
9655# endif /* no _SC_PAGESIZE */
9656
9657#endif /* no HAVE_GETPAGESIZE */
9658
bec39cab
AC
9659int
9660main ()
9661{
a9322a30
TT
9662 char *data, *data2, *data3;
9663 int i, pagesize;
9664 int fd;
9665
9666 pagesize = getpagesize ();
9667
9668 /* First, make a file with some known garbage in it. */
9669 data = (char *) malloc (pagesize);
9670 if (!data)
81ecdfbb 9671 return 1;
a9322a30
TT
9672 for (i = 0; i < pagesize; ++i)
9673 *(data + i) = rand ();
9674 umask (0);
9675 fd = creat ("conftest.mmap", 0600);
9676 if (fd < 0)
81ecdfbb 9677 return 1;
a9322a30 9678 if (write (fd, data, pagesize) != pagesize)
81ecdfbb 9679 return 1;
a9322a30
TT
9680 close (fd);
9681
9682 /* Next, try to mmap the file at a fixed address which already has
9683 something else allocated at it. If we can, also make sure that
9684 we see the same garbage. */
9685 fd = open ("conftest.mmap", O_RDWR);
9686 if (fd < 0)
81ecdfbb 9687 return 1;
a9322a30
TT
9688 data2 = (char *) malloc (2 * pagesize);
9689 if (!data2)
81ecdfbb
RW
9690 return 1;
9691 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
a9322a30
TT
9692 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9693 MAP_PRIVATE | MAP_FIXED, fd, 0L))
81ecdfbb 9694 return 1;
a9322a30
TT
9695 for (i = 0; i < pagesize; ++i)
9696 if (*(data + i) != *(data2 + i))
81ecdfbb 9697 return 1;
a9322a30
TT
9698
9699 /* Finally, make sure that changes to the mapped area do not
9700 percolate back to the file as seen by read(). (This is a bug on
9701 some variants of i386 svr4.0.) */
9702 for (i = 0; i < pagesize; ++i)
9703 *(data2 + i) = *(data2 + i) + 1;
9704 data3 = (char *) malloc (pagesize);
9705 if (!data3)
81ecdfbb 9706 return 1;
a9322a30 9707 if (read (fd, data3, pagesize) != pagesize)
81ecdfbb 9708 return 1;
a9322a30
TT
9709 for (i = 0; i < pagesize; ++i)
9710 if (*(data + i) != *(data3 + i))
81ecdfbb 9711 return 1;
a9322a30 9712 close (fd);
81ecdfbb 9713 return 0;
bec39cab
AC
9714}
9715_ACEOF
81ecdfbb 9716if ac_fn_c_try_run "$LINENO"; then :
a9322a30 9717 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 9718else
81ecdfbb 9719 ac_cv_func_mmap_fixed_mapped=no
a3828db0 9720fi
81ecdfbb
RW
9721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9722 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 9723fi
81ecdfbb 9724
a9322a30 9725fi
81ecdfbb
RW
9726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9727$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
9728if test $ac_cv_func_mmap_fixed_mapped = yes; then
9729
81ecdfbb 9730$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 9731
086ec9eb 9732fi
a9322a30 9733rm -f conftest.mmap
a3828db0 9734
81ecdfbb
RW
9735ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9736if test "x$ac_cv_type_pid_t" = x""yes; then :
bec39cab 9737
a9322a30
TT
9738else
9739
9740cat >>confdefs.h <<_ACEOF
9741#define pid_t int
bec39cab 9742_ACEOF
086ec9eb
MK
9743
9744fi
9745
81ecdfbb
RW
9746for ac_header in vfork.h
9747do :
9748 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
9749if test "x$ac_cv_header_vfork_h" = x""yes; then :
a3828db0 9750 cat >>confdefs.h <<_ACEOF
81ecdfbb 9751#define HAVE_VFORK_H 1
bec39cab 9752_ACEOF
c906108c
SS
9753
9754fi
a9322a30 9755
a3828db0 9756done
c906108c 9757
a9322a30 9758for ac_func in fork vfork
81ecdfbb
RW
9759do :
9760 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9761ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9762eval as_val=\$$as_ac_var
9763 if test "x$as_val" = x""yes; then :
a3828db0 9764 cat >>confdefs.h <<_ACEOF
81ecdfbb 9765#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 9766_ACEOF
b83266a0 9767
97bf5e38 9768fi
a3828db0 9769done
b83266a0 9770
a9322a30 9771if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9773$as_echo_n "checking for working fork... " >&6; }
9774if test "${ac_cv_func_fork_works+set}" = set; then :
9775 $as_echo_n "(cached) " >&6
a9322a30 9776else
81ecdfbb 9777 if test "$cross_compiling" = yes; then :
a9322a30
TT
9778 ac_cv_func_fork_works=cross
9779else
81ecdfbb
RW
9780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9781/* end confdefs.h. */
9782$ac_includes_default
9783int
9784main ()
9785{
9786
9787 /* By Ruediger Kuhlmann. */
9788 return fork () < 0;
9789
9790 ;
9791 return 0;
9792}
a9322a30 9793_ACEOF
81ecdfbb 9794if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9795 ac_cv_func_fork_works=yes
9796else
81ecdfbb 9797 ac_cv_func_fork_works=no
a9322a30 9798fi
81ecdfbb
RW
9799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9800 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9801fi
81ecdfbb 9802
a9322a30 9803fi
81ecdfbb
RW
9804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9805$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
9806
9807else
9808 ac_cv_func_fork_works=$ac_cv_func_fork
9809fi
9810if test "x$ac_cv_func_fork_works" = xcross; then
9811 case $host in
9812 *-*-amigaos* | *-*-msdosdjgpp*)
9813 # Override, as these systems have only a dummy fork() stub
9814 ac_cv_func_fork_works=no
9815 ;;
9816 *)
9817 ac_cv_func_fork_works=yes
9818 ;;
9819 esac
81ecdfbb
RW
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9821$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9822fi
9823ac_cv_func_vfork_works=$ac_cv_func_vfork
9824if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9826$as_echo_n "checking for working vfork... " >&6; }
9827if test "${ac_cv_func_vfork_works+set}" = set; then :
9828 $as_echo_n "(cached) " >&6
a9322a30 9829else
81ecdfbb 9830 if test "$cross_compiling" = yes; then :
a9322a30
TT
9831 ac_cv_func_vfork_works=cross
9832else
81ecdfbb 9833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
9834/* end confdefs.h. */
9835/* Thanks to Paul Eggert for this test. */
81ecdfbb 9836$ac_includes_default
a9322a30 9837#include <sys/wait.h>
81ecdfbb 9838#ifdef HAVE_VFORK_H
a9322a30
TT
9839# include <vfork.h>
9840#endif
9841/* On some sparc systems, changes by the child to local and incoming
9842 argument registers are propagated back to the parent. The compiler
9843 is told about this with #include <vfork.h>, but some compilers
9844 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9845 static variable whose address is put into a register that is
9846 clobbered by the vfork. */
9847static void
9848#ifdef __cplusplus
9849sparc_address_test (int arg)
9850# else
9851sparc_address_test (arg) int arg;
9852#endif
9853{
9854 static pid_t child;
9855 if (!child) {
9856 child = vfork ();
9857 if (child < 0) {
9858 perror ("vfork");
9859 _exit(2);
9860 }
9861 if (!child) {
9862 arg = getpid();
9863 write(-1, "", 0);
9864 _exit (arg);
9865 }
9866 }
9867}
9868
9869int
9870main ()
9871{
9872 pid_t parent = getpid ();
9873 pid_t child;
9874
9875 sparc_address_test (0);
9876
9877 child = vfork ();
9878
9879 if (child == 0) {
9880 /* Here is another test for sparc vfork register problems. This
9881 test uses lots of local variables, at least as many local
9882 variables as main has allocated so far including compiler
9883 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9884 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9885 reuse the register of parent for one of the local variables,
9886 since it will think that parent can't possibly be used any more
9887 in this routine. Assigning to the local variable will thus
9888 munge parent in the parent process. */
9889 pid_t
9890 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9891 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9892 /* Convince the compiler that p..p7 are live; otherwise, it might
9893 use the same hardware register for all 8 local variables. */
9894 if (p != p1 || p != p2 || p != p3 || p != p4
9895 || p != p5 || p != p6 || p != p7)
9896 _exit(1);
9897
9898 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9899 from child file descriptors. If the child closes a descriptor
9900 before it execs or exits, this munges the parent's descriptor
9901 as well. Test for this by closing stdout in the child. */
9902 _exit(close(fileno(stdout)) != 0);
9903 } else {
9904 int status;
9905 struct stat st;
9906
9907 while (wait(&status) != child)
9908 ;
81ecdfbb 9909 return (
a9322a30
TT
9910 /* Was there some problem with vforking? */
9911 child < 0
9912
9913 /* Did the child fail? (This shouldn't happen.) */
9914 || status
9915
9916 /* Did the vfork/compiler bug occur? */
9917 || parent != getpid()
9918
9919 /* Did the file descriptor bug occur? */
9920 || fstat(fileno(stdout), &st) != 0
9921 );
9922 }
9923}
9924_ACEOF
81ecdfbb 9925if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
9926 ac_cv_func_vfork_works=yes
9927else
81ecdfbb 9928 ac_cv_func_vfork_works=no
a9322a30 9929fi
81ecdfbb
RW
9930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9931 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 9932fi
81ecdfbb 9933
a9322a30 9934fi
81ecdfbb
RW
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9936$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
9937
9938fi;
9939if test "x$ac_cv_func_fork_works" = xcross; then
9940 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9942$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
9943fi
9944
9945if test "x$ac_cv_func_vfork_works" = xyes; then
9946
81ecdfbb 9947$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
9948
9949else
9950
81ecdfbb 9951$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
9952
9953fi
9954if test "x$ac_cv_func_fork_works" = xyes; then
9955
81ecdfbb 9956$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
9957
9958fi
9959
7313baad 9960for ac_func in canonicalize_file_name realpath getrusage getuid getgid \
b9e7b9c3 9961 pipe poll pread pread64 pwrite readlink resize_term \
7313baad 9962 sbrk setpgid setpgrp setsid \
9467110b 9963 sigaction sigprocmask sigsetmask socketpair \
110ed339 9964 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
614c279d 9965 setrlimit getrlimit posix_madvise waitpid lstat \
9467110b 9966 ptrace64
81ecdfbb
RW
9967do :
9968 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9969ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9970eval as_val=\$$as_ac_var
9971 if test "x$as_val" = x""yes; then :
6c7a06a3 9972 cat >>confdefs.h <<_ACEOF
81ecdfbb 9973#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
9974_ACEOF
9975
9976fi
9977done
9978
9979
81ecdfbb
RW
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9981$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9982if test "${am_cv_langinfo_codeset+set}" = set; then :
9983 $as_echo_n "(cached) " >&6
6c7a06a3 9984else
81ecdfbb 9985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9986/* end confdefs.h. */
9987#include <langinfo.h>
9988int
9989main ()
9990{
9991char* cs = nl_langinfo(CODESET);
bec39cab
AC
9992 ;
9993 return 0;
9994}
9995_ACEOF
81ecdfbb 9996if ac_fn_c_try_link "$LINENO"; then :
6c7a06a3 9997 am_cv_langinfo_codeset=yes
a4db0f07 9998else
81ecdfbb 9999 am_cv_langinfo_codeset=no
a4db0f07 10000fi
81ecdfbb
RW
10001rm -f core conftest.err conftest.$ac_objext \
10002 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10003
a4db0f07 10004fi
81ecdfbb
RW
10005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10006$as_echo "$am_cv_langinfo_codeset" >&6; }
6c7a06a3
TT
10007 if test $am_cv_langinfo_codeset = yes; then
10008
81ecdfbb 10009$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
a4db0f07 10010
6c7a06a3 10011 fi
c906108c 10012
06825bd1 10013
3266f10b
TT
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10015$as_echo_n "checking for ANSI C header files... " >&6; }
10016if test "${ac_cv_header_stdc+set}" = set; then :
10017 $as_echo_n "(cached) " >&6
10018else
10019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10020/* end confdefs.h. */
10021#include <stdlib.h>
10022#include <stdarg.h>
10023#include <string.h>
10024#include <float.h>
10025
10026int
10027main ()
10028{
10029
10030 ;
10031 return 0;
10032}
10033_ACEOF
10034if ac_fn_c_try_compile "$LINENO"; then :
10035 ac_cv_header_stdc=yes
10036else
10037 ac_cv_header_stdc=no
10038fi
10039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10040
10041if test $ac_cv_header_stdc = yes; then
10042 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10044/* end confdefs.h. */
10045#include <string.h>
10046
10047_ACEOF
10048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10049 $EGREP "memchr" >/dev/null 2>&1; then :
10050
10051else
10052 ac_cv_header_stdc=no
10053fi
10054rm -f conftest*
10055
10056fi
10057
10058if test $ac_cv_header_stdc = yes; then
10059 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10061/* end confdefs.h. */
10062#include <stdlib.h>
10063
10064_ACEOF
10065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10066 $EGREP "free" >/dev/null 2>&1; then :
10067
10068else
10069 ac_cv_header_stdc=no
10070fi
10071rm -f conftest*
10072
10073fi
10074
10075if test $ac_cv_header_stdc = yes; then
10076 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10077 if test "$cross_compiling" = yes; then :
10078 :
10079else
10080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10081/* end confdefs.h. */
10082#include <ctype.h>
10083#include <stdlib.h>
10084#if ((' ' & 0x0FF) == 0x020)
10085# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10086# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10087#else
10088# define ISLOWER(c) \
10089 (('a' <= (c) && (c) <= 'i') \
10090 || ('j' <= (c) && (c) <= 'r') \
10091 || ('s' <= (c) && (c) <= 'z'))
10092# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10093#endif
10094
10095#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10096int
10097main ()
10098{
10099 int i;
10100 for (i = 0; i < 256; i++)
10101 if (XOR (islower (i), ISLOWER (i))
10102 || toupper (i) != TOUPPER (i))
10103 return 2;
10104 return 0;
10105}
10106_ACEOF
10107if ac_fn_c_try_run "$LINENO"; then :
10108
10109else
10110 ac_cv_header_stdc=no
10111fi
10112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10113 conftest.$ac_objext conftest.beam conftest.$ac_ext
10114fi
10115
10116fi
10117fi
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10119$as_echo "$ac_cv_header_stdc" >&6; }
10120if test $ac_cv_header_stdc = yes; then
10121
10122$as_echo "#define STDC_HEADERS 1" >>confdefs.h
10123
3266f10b
TT
10124fi
10125
10126 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10127# for constant arguments. Useless!
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10129$as_echo_n "checking for working alloca.h... " >&6; }
10130if test "${ac_cv_working_alloca_h+set}" = set; then :
10131 $as_echo_n "(cached) " >&6
10132else
10133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10134/* end confdefs.h. */
10135#include <alloca.h>
10136int
10137main ()
10138{
10139char *p = (char *) alloca (2 * sizeof (int));
10140 if (p) return 0;
10141 ;
10142 return 0;
10143}
10144_ACEOF
10145if ac_fn_c_try_link "$LINENO"; then :
10146 ac_cv_working_alloca_h=yes
10147else
10148 ac_cv_working_alloca_h=no
10149fi
10150rm -f core conftest.err conftest.$ac_objext \
10151 conftest$ac_exeext conftest.$ac_ext
10152fi
10153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10154$as_echo "$ac_cv_working_alloca_h" >&6; }
10155if test $ac_cv_working_alloca_h = yes; then
10156
10157$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10158
10159fi
10160
10161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10162$as_echo_n "checking for alloca... " >&6; }
10163if test "${ac_cv_func_alloca_works+set}" = set; then :
10164 $as_echo_n "(cached) " >&6
10165else
10166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10167/* end confdefs.h. */
10168#ifdef __GNUC__
10169# define alloca __builtin_alloca
10170#else
10171# ifdef _MSC_VER
10172# include <malloc.h>
10173# define alloca _alloca
10174# else
10175# ifdef HAVE_ALLOCA_H
10176# include <alloca.h>
10177# else
10178# ifdef _AIX
10179 #pragma alloca
10180# else
10181# ifndef alloca /* predefined by HP cc +Olibcalls */
10182char *alloca ();
10183# endif
10184# endif
10185# endif
10186# endif
10187#endif
10188
10189int
10190main ()
10191{
10192char *p = (char *) alloca (1);
10193 if (p) return 0;
10194 ;
10195 return 0;
10196}
10197_ACEOF
10198if ac_fn_c_try_link "$LINENO"; then :
10199 ac_cv_func_alloca_works=yes
10200else
10201 ac_cv_func_alloca_works=no
10202fi
10203rm -f core conftest.err conftest.$ac_objext \
10204 conftest$ac_exeext conftest.$ac_ext
10205fi
10206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10207$as_echo "$ac_cv_func_alloca_works" >&6; }
10208
10209if test $ac_cv_func_alloca_works = yes; then
10210
10211$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10212
10213else
10214 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10215# that cause trouble. Some versions do not even contain alloca or
10216# contain a buggy version. If you still want to use their alloca,
10217# use ar to extract alloca.o from them instead of compiling alloca.c.
10218
10219ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10220
10221$as_echo "#define C_ALLOCA 1" >>confdefs.h
10222
10223
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10225$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10226if test "${ac_cv_os_cray+set}" = set; then :
10227 $as_echo_n "(cached) " >&6
10228else
10229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10230/* end confdefs.h. */
10231#if defined CRAY && ! defined CRAY2
10232webecray
10233#else
10234wenotbecray
10235#endif
10236
10237_ACEOF
10238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10239 $EGREP "webecray" >/dev/null 2>&1; then :
10240 ac_cv_os_cray=yes
10241else
10242 ac_cv_os_cray=no
10243fi
10244rm -f conftest*
10245
10246fi
10247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10248$as_echo "$ac_cv_os_cray" >&6; }
10249if test $ac_cv_os_cray = yes; then
10250 for ac_func in _getb67 GETB67 getb67; do
10251 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10252ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10253eval as_val=\$$as_ac_var
10254 if test "x$as_val" = x""yes; then :
10255
10256cat >>confdefs.h <<_ACEOF
10257#define CRAY_STACKSEG_END $ac_func
10258_ACEOF
10259
10260 break
10261fi
10262
10263 done
10264fi
10265
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10267$as_echo_n "checking stack direction for C alloca... " >&6; }
10268if test "${ac_cv_c_stack_direction+set}" = set; then :
10269 $as_echo_n "(cached) " >&6
10270else
10271 if test "$cross_compiling" = yes; then :
10272 ac_cv_c_stack_direction=0
10273else
10274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10275/* end confdefs.h. */
10276$ac_includes_default
10277int
10278find_stack_direction ()
10279{
10280 static char *addr = 0;
10281 auto char dummy;
10282 if (addr == 0)
10283 {
10284 addr = &dummy;
10285 return find_stack_direction ();
10286 }
10287 else
10288 return (&dummy > addr) ? 1 : -1;
10289}
10290
10291int
10292main ()
10293{
10294 return find_stack_direction () < 0;
10295}
10296_ACEOF
10297if ac_fn_c_try_run "$LINENO"; then :
10298 ac_cv_c_stack_direction=1
10299else
10300 ac_cv_c_stack_direction=-1
10301fi
10302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10303 conftest.$ac_objext conftest.beam conftest.$ac_ext
10304fi
10305
10306fi
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10308$as_echo "$ac_cv_c_stack_direction" >&6; }
10309cat >>confdefs.h <<_ACEOF
10310#define STACK_DIRECTION $ac_cv_c_stack_direction
10311_ACEOF
10312
10313
10314fi
10315
10316
10317
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10319$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10320if test "${am_cv_langinfo_codeset+set}" = set; then :
10321 $as_echo_n "(cached) " >&6
10322else
10323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10324/* end confdefs.h. */
10325#include <langinfo.h>
10326int
10327main ()
10328{
10329char* cs = nl_langinfo(CODESET);
10330 ;
10331 return 0;
10332}
10333_ACEOF
10334if ac_fn_c_try_link "$LINENO"; then :
10335 am_cv_langinfo_codeset=yes
10336else
10337 am_cv_langinfo_codeset=no
10338fi
10339rm -f core conftest.err conftest.$ac_objext \
10340 conftest$ac_exeext conftest.$ac_ext
10341
10342fi
10343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10344$as_echo "$am_cv_langinfo_codeset" >&6; }
10345 if test $am_cv_langinfo_codeset = yes; then
10346
10347$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10348
10349 fi
10350
10351
a3d08894 10352 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
10353do :
10354 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10355ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10356eval as_val=\$$as_ac_Header
10357 if test "x$as_val" = x""yes; then :
10358 cat >>confdefs.h <<_ACEOF
10359#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10360_ACEOF
10361
10362fi
10363
10364done
10365
10366
10367 for ac_func in fdwalk getrlimit pipe pipe2 socketpair
10368do :
10369 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10370ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10371eval as_val=\$$as_ac_var
10372 if test "x$as_val" = x""yes; then :
10373 cat >>confdefs.h <<_ACEOF
10374#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10375_ACEOF
10376
10377fi
10378done
10379
10380
10381 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
10382if test "x$ac_cv_have_decl_strerror" = x""yes; then :
10383 ac_have_decl=1
10384else
10385 ac_have_decl=0
10386fi
10387
10388cat >>confdefs.h <<_ACEOF
10389#define HAVE_DECL_STRERROR $ac_have_decl
10390_ACEOF
10391ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
10392if test "x$ac_cv_have_decl_strstr" = x""yes; then :
10393 ac_have_decl=1
10394else
10395 ac_have_decl=0
10396fi
10397
10398cat >>confdefs.h <<_ACEOF
10399#define HAVE_DECL_STRSTR $ac_have_decl
10400_ACEOF
10401
10402
10403
a3828db0
MK
10404# Check the return and argument types of ptrace. No canned test for
10405# this, so roll our own.
10406gdb_ptrace_headers='
10407#if HAVE_SYS_TYPES_H
10408# include <sys/types.h>
10409#endif
10410#if HAVE_SYS_PTRACE_H
10411# include <sys/ptrace.h>
10412#endif
10413#if HAVE_UNISTD_H
10414# include <unistd.h>
10415#endif
10416'
10417# There is no point in checking if we don't have a prototype.
81ecdfbb
RW
10418ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
10419"
10420if test "x$ac_cv_have_decl_ptrace" = x""yes; then :
10421 ac_have_decl=1
06825bd1 10422else
81ecdfbb 10423 ac_have_decl=0
06825bd1 10424fi
06825bd1 10425
a3828db0 10426cat >>confdefs.h <<_ACEOF
81ecdfbb 10427#define HAVE_DECL_PTRACE $ac_have_decl
a3828db0 10428_ACEOF
81ecdfbb 10429if test $ac_have_decl = 1; then :
bec39cab 10430
a3828db0 10431else
a3828db0
MK
10432
10433 : ${gdb_cv_func_ptrace_ret='int'}
10434 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
10435
06825bd1
MK
10436fi
10437
064ef605
DJ
10438# Check return type. Varargs (used on GNU/Linux) conflict with the
10439# empty argument list, so check for that explicitly.
81ecdfbb
RW
10440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
10441$as_echo_n "checking return type of ptrace... " >&6; }
10442if test "${gdb_cv_func_ptrace_ret+set}" = set; then :
10443 $as_echo_n "(cached) " >&6
bec39cab 10444else
81ecdfbb 10445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10446/* end confdefs.h. */
a3828db0 10447$gdb_ptrace_headers
bec39cab
AC
10448int
10449main ()
10450{
064ef605
DJ
10451extern long ptrace (enum __ptrace_request, ...);
10452 ;
10453 return 0;
10454}
10455_ACEOF
81ecdfbb 10456if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10457 gdb_cv_func_ptrace_ret='long'
10458else
81ecdfbb 10459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10460/* end confdefs.h. */
10461$gdb_ptrace_headers
10462int
10463main ()
10464{
a3828db0 10465extern int ptrace ();
bec39cab
AC
10466 ;
10467 return 0;
10468}
10469_ACEOF
81ecdfbb 10470if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10471 gdb_cv_func_ptrace_ret='int'
70f9f479 10472else
81ecdfbb 10473 gdb_cv_func_ptrace_ret='long'
70f9f479 10474fi
81ecdfbb 10475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 10476fi
81ecdfbb 10477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 10478fi
81ecdfbb
RW
10479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
10480$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
bec39cab 10481
a3828db0
MK
10482cat >>confdefs.h <<_ACEOF
10483#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 10484_ACEOF
70f9f479 10485
a3828db0 10486# Check argument types.
81ecdfbb
RW
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
10488$as_echo_n "checking types of arguments for ptrace... " >&6; }
10489if test "${gdb_cv_func_ptrace_args+set}" = set; then :
10490 $as_echo_n "(cached) " >&6
bec39cab 10491else
a3828db0 10492
81ecdfbb 10493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605
DJ
10494/* end confdefs.h. */
10495$gdb_ptrace_headers
10496int
10497main ()
10498{
10499extern long ptrace (enum __ptrace_request, ...);
10500 ;
10501 return 0;
10502}
10503_ACEOF
81ecdfbb 10504if ac_fn_c_try_compile "$LINENO"; then :
064ef605
DJ
10505 gdb_cv_func_ptrace_args='int,int,long,long'
10506else
064ef605 10507
a3828db0
MK
10508for gdb_arg1 in 'int' 'long'; do
10509 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 10510 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
96d7229d 10511 for gdb_arg4 in 'int' 'long' 'void *'; do
81ecdfbb 10512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10513/* end confdefs.h. */
a3828db0 10514$gdb_ptrace_headers
bec39cab
AC
10515int
10516main ()
10517{
a3828db0
MK
10518
10519extern $gdb_cv_func_ptrace_ret
10520 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
10521
bec39cab
AC
10522 ;
10523 return 0;
10524}
10525_ACEOF
81ecdfbb 10526if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10527 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
10528 break 4;
5c7f2947 10529fi
81ecdfbb 10530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0 10531 for gdb_arg5 in 'int *' 'int' 'long'; do
81ecdfbb 10532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10533/* end confdefs.h. */
a3828db0 10534$gdb_ptrace_headers
bec39cab
AC
10535int
10536main ()
10537{
a3828db0
MK
10538
10539extern $gdb_cv_func_ptrace_ret
10540 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
10541
bec39cab
AC
10542 ;
10543 return 0;
10544}
10545_ACEOF
81ecdfbb 10546if ac_fn_c_try_compile "$LINENO"; then :
a3828db0
MK
10547
10548gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
10549 break 5;
78434e59 10550fi
81ecdfbb 10551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
10552 done
10553 done
10554 done
10555 done
10556done
10557# Provide a safe default value.
10558: ${gdb_cv_func_ptrace_args='int,int,long,long'}
10559
064ef605 10560fi
81ecdfbb 10561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 10562fi
81ecdfbb
RW
10563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
10564$as_echo "$gdb_cv_func_ptrace_args" >&6; }
a3828db0
MK
10565ac_save_IFS=$IFS; IFS=','
10566set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
10567IFS=$ac_save_IFS
10568shift
bec39cab 10569
a3828db0
MK
10570cat >>confdefs.h <<_ACEOF
10571#define PTRACE_TYPE_ARG3 $3
10572_ACEOF
10573
96d7229d
LM
10574
10575cat >>confdefs.h <<_ACEOF
10576#define PTRACE_TYPE_ARG4 $4
10577_ACEOF
10578
a3828db0
MK
10579if test -n "$5"; then
10580
10581cat >>confdefs.h <<_ACEOF
10582#define PTRACE_TYPE_ARG5 $5
bec39cab 10583_ACEOF
78434e59
MK
10584
10585fi
10586
a3828db0 10587if test "$cross_compiling" = no; then
81ecdfbb
RW
10588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10589$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10590if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10591 $as_echo_n "(cached) " >&6
a3828db0 10592else
81ecdfbb
RW
10593 if test "$cross_compiling" = yes; then :
10594 as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
bec39cab 10595else
81ecdfbb 10596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10597/* end confdefs.h. */
81ecdfbb 10598$ac_includes_default
bec39cab
AC
10599int
10600main ()
10601{
a3828db0
MK
10602/* If this system has a BSD-style setpgrp which takes arguments,
10603 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
10604 exit successfully. */
81ecdfbb 10605 return setpgrp (1,1) != -1;
bec39cab
AC
10606 ;
10607 return 0;
10608}
10609_ACEOF
81ecdfbb 10610if ac_fn_c_try_run "$LINENO"; then :
a3828db0 10611 ac_cv_func_setpgrp_void=no
c906108c 10612else
81ecdfbb 10613 ac_cv_func_setpgrp_void=yes
c906108c 10614fi
81ecdfbb
RW
10615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10616 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 10617fi
81ecdfbb 10618
a3828db0 10619fi
81ecdfbb
RW
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10621$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0
MK
10622if test $ac_cv_func_setpgrp_void = yes; then
10623
81ecdfbb 10624$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
97bf5e38
MK
10625
10626fi
a3828db0
MK
10627
10628else
81ecdfbb
RW
10629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
10630$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
10631if test "${ac_cv_func_setpgrp_void+set}" = set; then :
10632 $as_echo_n "(cached) " >&6
97bf5e38 10633else
81ecdfbb 10634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10635/* end confdefs.h. */
a3828db0
MK
10636
10637#include <unistd.h>
10638
bec39cab
AC
10639int
10640main ()
10641{
a3828db0
MK
10642
10643 if (setpgrp(1,1) == -1)
10644 exit (0);
10645 else
10646 exit (1);
10647
bec39cab
AC
10648 ;
10649 return 0;
10650}
10651_ACEOF
81ecdfbb 10652if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10653 ac_cv_func_setpgrp_void=no
c906108c 10654else
81ecdfbb 10655 ac_cv_func_setpgrp_void=yes
c906108c 10656fi
81ecdfbb 10657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10658fi
81ecdfbb
RW
10659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
10660$as_echo "$ac_cv_func_setpgrp_void" >&6; }
a3828db0 10661if test $ac_cv_func_setpgrp_void = yes; then
81ecdfbb 10662 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
c3f6f71d 10663
a3828db0 10664fi
c906108c
SS
10665fi
10666
a3828db0
MK
10667# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
10668# since sigsetjmp might only be defined as a macro.
81ecdfbb
RW
10669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
10670$as_echo_n "checking for sigsetjmp... " >&6; }
10671if test "${gdb_cv_func_sigsetjmp+set}" = set; then :
10672 $as_echo_n "(cached) " >&6
bec39cab 10673else
81ecdfbb 10674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10675/* end confdefs.h. */
a3828db0
MK
10676
10677#include <setjmp.h>
10678
bec39cab
AC
10679int
10680main ()
10681{
a3828db0 10682sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
10683 ;
10684 return 0;
10685}
10686_ACEOF
81ecdfbb 10687if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10688 gdb_cv_func_sigsetjmp=yes
c906108c 10689else
81ecdfbb 10690 gdb_cv_func_sigsetjmp=no
c906108c 10691fi
81ecdfbb 10692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10693fi
81ecdfbb
RW
10694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
10695$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
a3828db0 10696if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 10697
81ecdfbb 10698$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
c906108c 10699
97bf5e38 10700fi
c906108c 10701
a3828db0
MK
10702# Assume we'll default to using the included libiberty regex.
10703gdb_use_included_regex=yes
10704
10705# However, if the system regex is GNU regex, then default to *not*
10706# using the included regex.
81ecdfbb
RW
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
10708$as_echo_n "checking for GNU regex... " >&6; }
10709if test "${gdb_cv_have_gnu_regex+set}" = set; then :
10710 $as_echo_n "(cached) " >&6
bec39cab 10711else
81ecdfbb 10712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10713/* end confdefs.h. */
a3828db0 10714#include <gnu-versions.h>
bec39cab
AC
10715int
10716main ()
10717{
81ecdfbb
RW
10718#define REGEX_INTERFACE_VERSION 1
10719#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
10720# error "Version mismatch"
10721#endif
5c45e068
MK
10722 ;
10723 return 0;
10724}
10725_ACEOF
81ecdfbb
RW
10726if ac_fn_c_try_compile "$LINENO"; then :
10727 gdb_cv_have_gnu_regex=yes
5c45e068 10728else
81ecdfbb
RW
10729 gdb_cv_have_gnu_regex=no
10730fi
10731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10732fi
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
10734$as_echo "$gdb_cv_have_gnu_regex" >&6; }
10735if test $gdb_cv_have_gnu_regex = yes; then
10736 gdb_use_included_regex=no
5c45e068 10737fi
81ecdfbb
RW
10738
10739
10740# Check whether --with-included-regex was given.
10741if test "${with_included_regex+set}" = set; then :
10742 withval=$with_included_regex; gdb_with_regex=$withval
10743else
10744 gdb_with_regex=$gdb_use_included_regex
c906108c 10745fi
81ecdfbb
RW
10746
10747if test "$gdb_with_regex" = yes; then
10748
10749$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
10750
c906108c 10751fi
81ecdfbb
RW
10752
10753# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
10754ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
10755#include <sys/proc.h>
10756
10757"
10758if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then :
c906108c 10759
5c45e068 10760cat >>confdefs.h <<_ACEOF
a3828db0 10761#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 10762_ACEOF
c906108c 10763
5c45e068 10764
97bf5e38 10765fi
c906108c 10766
5c45e068 10767
a3828db0 10768# See if <sys/lwp.h> defines `struct lwp`.
81ecdfbb
RW
10769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
10770$as_echo_n "checking for struct lwp... " >&6; }
10771if test "${gdb_cv_struct_lwp+set}" = set; then :
10772 $as_echo_n "(cached) " >&6
bec39cab 10773else
81ecdfbb 10774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10775/* end confdefs.h. */
a3828db0
MK
10776#include <sys/param.h>
10777#include <sys/lwp.h>
bec39cab
AC
10778int
10779main ()
10780{
a3828db0 10781struct lwp l;
bec39cab
AC
10782 ;
10783 return 0;
10784}
10785_ACEOF
81ecdfbb 10786if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10787 gdb_cv_struct_lwp=yes
c906108c 10788else
81ecdfbb 10789 gdb_cv_struct_lwp=no
c906108c 10790fi
81ecdfbb 10791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 10792fi
81ecdfbb
RW
10793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
10794$as_echo "$gdb_cv_struct_lwp" >&6; }
a3828db0 10795if test $gdb_cv_struct_lwp = yes; then
c906108c 10796
81ecdfbb 10797$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
c906108c 10798
97bf5e38 10799fi
c906108c 10800
a3828db0 10801# See if <machine/reg.h> degines `struct reg'.
81ecdfbb
RW
10802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
10803$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
10804if test "${gdb_cv_struct_reg+set}" = set; then :
10805 $as_echo_n "(cached) " >&6
bec39cab 10806else
81ecdfbb 10807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10808/* end confdefs.h. */
a3828db0
MK
10809#include <sys/types.h>
10810#include <machine/reg.h>
bec39cab
AC
10811int
10812main ()
10813{
a3828db0 10814struct reg r;
bec39cab
AC
10815 ;
10816 return 0;
10817}
10818_ACEOF
81ecdfbb 10819if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10820 gdb_cv_struct_reg=yes
27ca5dad 10821else
81ecdfbb 10822 gdb_cv_struct_reg=no
27ca5dad 10823fi
81ecdfbb 10824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 10825fi
81ecdfbb
RW
10826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
10827$as_echo "$gdb_cv_struct_reg" >&6; }
a3828db0 10828if test $gdb_cv_struct_reg = yes; then
bec39cab 10829
81ecdfbb 10830$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
27ca5dad
MC
10831
10832fi
97bf5e38 10833
a3828db0
MK
10834# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
10835# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
81ecdfbb
RW
10836ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
10837"
10838if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
5c45e068
MK
10839
10840cat >>confdefs.h <<_ACEOF
a3828db0 10841#define HAVE_STRUCT_REG_R_FS 1
bec39cab 10842_ACEOF
3862412b 10843
5c45e068 10844
97bf5e38 10845fi
81ecdfbb
RW
10846ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
10847"
10848if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
5c45e068
MK
10849
10850cat >>confdefs.h <<_ACEOF
a3828db0 10851#define HAVE_STRUCT_REG_R_GS 1
bec39cab 10852_ACEOF
3862412b 10853
5c45e068 10854
97bf5e38 10855fi
3862412b 10856
5c45e068 10857
6fea9e18
L
10858# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
10859# Older amd64 Linux's don't have the fs_base and gs_base members of
10860# `struct user_regs_struct'.
10861ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h>
10862"
10863if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then :
10864
10865cat >>confdefs.h <<_ACEOF
10866#define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
10867_ACEOF
10868
10869
10870fi
10871ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h>
10872"
10873if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then :
10874
10875cat >>confdefs.h <<_ACEOF
10876#define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
10877_ACEOF
10878
10879
10880fi
10881
10882
a3828db0 10883# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
81ecdfbb
RW
10884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
10885$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
10886if test "${gdb_cv_have_ptrace_getregs+set}" = set; then :
10887 $as_echo_n "(cached) " >&6
451928c5 10888else
81ecdfbb 10889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10890/* end confdefs.h. */
a3828db0 10891#include <sys/ptrace.h>
bec39cab
AC
10892int
10893main ()
10894{
a3828db0 10895PTRACE_GETREGS;
bec39cab
AC
10896 ;
10897 return 0;
10898}
10899_ACEOF
81ecdfbb 10900if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10901 gdb_cv_have_ptrace_getregs=yes
451928c5 10902else
81ecdfbb 10903 gdb_cv_have_ptrace_getregs=no
451928c5 10904fi
81ecdfbb 10905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10906fi
10907
81ecdfbb
RW
10908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
10909$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
a3828db0 10910if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f 10911
81ecdfbb 10912$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
451928c5 10913
97bf5e38 10914fi
451928c5 10915
a3828db0 10916# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
81ecdfbb
RW
10917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
10918$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
10919if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then :
10920 $as_echo_n "(cached) " >&6
451928c5 10921else
81ecdfbb 10922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10923/* end confdefs.h. */
a3828db0 10924#include <sys/ptrace.h>
bec39cab
AC
10925int
10926main ()
10927{
a3828db0 10928PTRACE_GETFPXREGS;
bec39cab
AC
10929 ;
10930 return 0;
10931}
10932_ACEOF
81ecdfbb 10933if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10934 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 10935else
81ecdfbb 10936 gdb_cv_have_ptrace_getfpxregs=no
451928c5 10937fi
81ecdfbb 10938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
10939fi
10940
81ecdfbb
RW
10941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
10942$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
a3828db0 10943if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f 10944
81ecdfbb 10945$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
451928c5 10946
97bf5e38 10947fi
451928c5 10948
a3828db0 10949# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
81ecdfbb
RW
10950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
10951$as_echo_n "checking for PT_GETDBREGS... " >&6; }
10952if test "${gdb_cv_have_pt_getdbregs+set}" = set; then :
10953 $as_echo_n "(cached) " >&6
3862412b 10954else
81ecdfbb 10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10956/* end confdefs.h. */
a3828db0
MK
10957#include <sys/types.h>
10958#include <sys/ptrace.h>
bec39cab
AC
10959int
10960main ()
10961{
a3828db0 10962PT_GETDBREGS;
bec39cab
AC
10963 ;
10964 return 0;
10965}
10966_ACEOF
81ecdfbb 10967if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 10968 gdb_cv_have_pt_getdbregs=yes
3862412b 10969else
81ecdfbb 10970 gdb_cv_have_pt_getdbregs=no
3862412b 10971fi
81ecdfbb 10972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
10973fi
10974
81ecdfbb
RW
10975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
10976$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
a3828db0 10977if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f 10978
81ecdfbb 10979$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
3862412b 10980
97bf5e38 10981fi
3862412b 10982
a3828db0 10983# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
81ecdfbb
RW
10984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
10985$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
10986if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then :
10987 $as_echo_n "(cached) " >&6
3862412b 10988else
81ecdfbb 10989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10990/* end confdefs.h. */
a3828db0
MK
10991#include <sys/types.h>
10992#include <sys/ptrace.h>
bec39cab
AC
10993int
10994main ()
10995{
a3828db0 10996PT_GETXMMREGS;
bec39cab
AC
10997 ;
10998 return 0;
10999}
11000_ACEOF
81ecdfbb 11001if ac_fn_c_try_compile "$LINENO"; then :
a3828db0 11002 gdb_cv_have_pt_getxmmregs=yes
3862412b 11003else
81ecdfbb 11004 gdb_cv_have_pt_getxmmregs=no
3862412b 11005fi
81ecdfbb 11006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
11007fi
11008
81ecdfbb
RW
11009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
11010$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
a3828db0 11011if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f 11012
81ecdfbb 11013$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
3862412b 11014
97bf5e38 11015fi
3862412b 11016
05b4bd79 11017# Detect which type of /proc is in use, such as for Solaris.
97bf5e38
MK
11018
11019if test "${target}" = "${host}"; then
11020 case "${host}" in
7b00db47 11021 *-*-sysv4.2* | *-*-sysv5* )
60ca704f 11022
81ecdfbb 11023$as_echo "#define NEW_PROC_API 1" >>confdefs.h
97bf5e38
MK
11024
11025 ;;
c162e8c9 11026 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f 11027
81ecdfbb 11028$as_echo "#define NEW_PROC_API 1" >>confdefs.h
c960c18f
AC
11029
11030 ;;
11031 mips-sgi-irix5*)
11032 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f 11033
81ecdfbb 11034$as_echo "#define _KMEMUSER 1" >>confdefs.h
97bf5e38
MK
11035
11036 ;;
11037 esac
11038fi
11039
11040if test "$ac_cv_header_sys_procfs_h" = yes; then
81ecdfbb
RW
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
11042$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
11043 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then :
11044 $as_echo_n "(cached) " >&6
596c9d4b 11045else
81ecdfbb 11046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11047/* end confdefs.h. */
596c9d4b
KB
11048
11049#define _SYSCALL32
d30c5336
JK
11050/* Needed for new procfs interface on sparc-solaris. */
11051#define _STRUCTURED_PROC 1
596c9d4b 11052#include <sys/procfs.h>
bec39cab
AC
11053int
11054main ()
11055{
97bf5e38 11056gregset_t avar
bec39cab
AC
11057 ;
11058 return 0;
11059}
11060_ACEOF
81ecdfbb 11061if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11062 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 11063else
81ecdfbb 11064 bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 11065
596c9d4b 11066fi
81ecdfbb 11067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
11068fi
11069
97bf5e38 11070 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab 11071
81ecdfbb 11072$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
596c9d4b
KB
11073
11074 fi
81ecdfbb
RW
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
11076$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
451928c5 11077
81ecdfbb
RW
11078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
11079$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
11080 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then :
11081 $as_echo_n "(cached) " >&6
d84dd0c5 11082else
81ecdfbb 11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11084/* end confdefs.h. */
97bf5e38
MK
11085
11086#define _SYSCALL32
d30c5336
JK
11087/* Needed for new procfs interface on sparc-solaris. */
11088#define _STRUCTURED_PROC 1
d84dd0c5 11089#include <sys/procfs.h>
bec39cab
AC
11090int
11091main ()
11092{
97bf5e38 11093fpregset_t avar
bec39cab
AC
11094 ;
11095 return 0;
11096}
11097_ACEOF
81ecdfbb 11098if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11099 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 11100else
81ecdfbb 11101 bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 11102
d84dd0c5 11103fi
81ecdfbb 11104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
11105fi
11106
97bf5e38 11107 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab 11108
81ecdfbb 11109$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
d84dd0c5 11110
97bf5e38 11111 fi
81ecdfbb
RW
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
11113$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
d84dd0c5 11114
81ecdfbb
RW
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
11116$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
11117 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then :
11118 $as_echo_n "(cached) " >&6
c906108c 11119else
81ecdfbb 11120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11121/* end confdefs.h. */
c906108c 11122
97bf5e38 11123#define _SYSCALL32
d30c5336
JK
11124/* Needed for new procfs interface on sparc-solaris. */
11125#define _STRUCTURED_PROC 1
97bf5e38 11126#include <sys/procfs.h>
bec39cab
AC
11127int
11128main ()
11129{
97bf5e38 11130prgregset_t avar
bec39cab
AC
11131 ;
11132 return 0;
11133}
11134_ACEOF
81ecdfbb 11135if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11136 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 11137else
81ecdfbb 11138 bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 11139
c906108c 11140fi
81ecdfbb 11141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11142fi
11143
97bf5e38 11144 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab 11145
81ecdfbb 11146$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
c906108c 11147
97bf5e38 11148 fi
81ecdfbb
RW
11149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
11150$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
c906108c 11151
81ecdfbb
RW
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
11153$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
11154 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then :
11155 $as_echo_n "(cached) " >&6
d45fe813 11156else
81ecdfbb 11157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11158/* end confdefs.h. */
97bf5e38
MK
11159
11160#define _SYSCALL32
d30c5336
JK
11161/* Needed for new procfs interface on sparc-solaris. */
11162#define _STRUCTURED_PROC 1
97bf5e38 11163#include <sys/procfs.h>
bec39cab
AC
11164int
11165main ()
11166{
97bf5e38 11167prfpregset_t avar
bec39cab
AC
11168 ;
11169 return 0;
11170}
11171_ACEOF
81ecdfbb 11172if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11173 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 11174else
81ecdfbb 11175 bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 11176
d45fe813 11177fi
81ecdfbb 11178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11179fi
11180
97bf5e38 11181 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab 11182
81ecdfbb 11183$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
d45fe813 11184
97bf5e38 11185 fi
81ecdfbb
RW
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
11187$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
d45fe813 11188
81ecdfbb
RW
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
11190$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
11191 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then :
11192 $as_echo_n "(cached) " >&6
d45fe813 11193else
81ecdfbb 11194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11195/* end confdefs.h. */
97bf5e38
MK
11196
11197#define _SYSCALL32
d30c5336
JK
11198/* Needed for new procfs interface on sparc-solaris. */
11199#define _STRUCTURED_PROC 1
97bf5e38 11200#include <sys/procfs.h>
bec39cab
AC
11201int
11202main ()
11203{
97bf5e38 11204prgregset32_t avar
bec39cab
AC
11205 ;
11206 return 0;
11207}
11208_ACEOF
81ecdfbb 11209if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11210 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 11211else
81ecdfbb 11212 bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 11213
d45fe813 11214fi
81ecdfbb 11215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11216fi
11217
97bf5e38 11218 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab 11219
81ecdfbb 11220$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
d45fe813 11221
97bf5e38 11222 fi
81ecdfbb
RW
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
11224$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
d45fe813 11225
81ecdfbb
RW
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
11227$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
11228 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then :
11229 $as_echo_n "(cached) " >&6
d45fe813 11230else
81ecdfbb 11231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11232/* end confdefs.h. */
97bf5e38 11233
d45fe813 11234#define _SYSCALL32
d30c5336
JK
11235/* Needed for new procfs interface on sparc-solaris. */
11236#define _STRUCTURED_PROC 1
97bf5e38 11237#include <sys/procfs.h>
bec39cab
AC
11238int
11239main ()
11240{
97bf5e38 11241lwpid_t avar
bec39cab
AC
11242 ;
11243 return 0;
11244}
11245_ACEOF
81ecdfbb 11246if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11247 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 11248else
81ecdfbb 11249 bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 11250
d45fe813 11251fi
81ecdfbb 11252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
11253fi
11254
97bf5e38 11255 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab 11256
81ecdfbb 11257$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
d45fe813 11258
97bf5e38 11259 fi
81ecdfbb
RW
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
11261$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
c906108c 11262
81ecdfbb
RW
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
11264$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
11265 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then :
11266 $as_echo_n "(cached) " >&6
c906108c 11267else
81ecdfbb 11268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11269/* end confdefs.h. */
c906108c 11270
97bf5e38 11271#define _SYSCALL32
d30c5336
JK
11272/* Needed for new procfs interface on sparc-solaris. */
11273#define _STRUCTURED_PROC 1
97bf5e38 11274#include <sys/procfs.h>
bec39cab
AC
11275int
11276main ()
11277{
97bf5e38 11278psaddr_t avar
bec39cab
AC
11279 ;
11280 return 0;
11281}
11282_ACEOF
81ecdfbb 11283if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11284 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 11285else
81ecdfbb 11286 bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 11287
c906108c 11288fi
81ecdfbb 11289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11290fi
11291
97bf5e38 11292 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab 11293
81ecdfbb 11294$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
c906108c 11295
97bf5e38 11296 fi
81ecdfbb
RW
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
11298$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
c906108c 11299
81ecdfbb
RW
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5
11301$as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; }
11302 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then :
11303 $as_echo_n "(cached) " >&6
c906108c 11304else
81ecdfbb 11305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11306/* end confdefs.h. */
c906108c 11307
97bf5e38 11308#define _SYSCALL32
d30c5336
JK
11309/* Needed for new procfs interface on sparc-solaris. */
11310#define _STRUCTURED_PROC 1
97bf5e38 11311#include <sys/procfs.h>
bec39cab
AC
11312int
11313main ()
11314{
97bf5e38 11315prsysent_t avar
bec39cab
AC
11316 ;
11317 return 0;
11318}
11319_ACEOF
81ecdfbb 11320if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11321 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 11322else
81ecdfbb 11323 bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 11324
c906108c 11325fi
81ecdfbb 11326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11327fi
11328
97bf5e38 11329 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab 11330
81ecdfbb 11331$as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h
c906108c 11332
97bf5e38 11333 fi
81ecdfbb
RW
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
11335$as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; }
c906108c 11336
81ecdfbb
RW
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5
11338$as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; }
11339 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then :
11340 $as_echo_n "(cached) " >&6
c906108c 11341else
81ecdfbb 11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11343/* end confdefs.h. */
c906108c 11344
97bf5e38 11345#define _SYSCALL32
d30c5336
JK
11346/* Needed for new procfs interface on sparc-solaris. */
11347#define _STRUCTURED_PROC 1
97bf5e38 11348#include <sys/procfs.h>
bec39cab
AC
11349int
11350main ()
11351{
97bf5e38 11352pr_sigset_t avar
bec39cab
AC
11353 ;
11354 return 0;
11355}
11356_ACEOF
81ecdfbb 11357if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11358 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 11359else
81ecdfbb 11360 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 11361
c906108c 11362fi
81ecdfbb 11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11364fi
11365
97bf5e38 11366 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab 11367
81ecdfbb 11368$as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h
c906108c 11369
97bf5e38 11370 fi
81ecdfbb
RW
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
11372$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; }
c906108c 11373
81ecdfbb
RW
11374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5
11375$as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; }
11376 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then :
11377 $as_echo_n "(cached) " >&6
c906108c 11378else
81ecdfbb 11379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11380/* end confdefs.h. */
c906108c 11381
97bf5e38 11382#define _SYSCALL32
d30c5336
JK
11383/* Needed for new procfs interface on sparc-solaris. */
11384#define _STRUCTURED_PROC 1
97bf5e38 11385#include <sys/procfs.h>
bec39cab
AC
11386int
11387main ()
11388{
97bf5e38 11389pr_sigaction64_t avar
bec39cab
AC
11390 ;
11391 return 0;
11392}
11393_ACEOF
81ecdfbb 11394if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38 11395 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 11396else
81ecdfbb 11397 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 11398
c906108c 11399fi
81ecdfbb 11400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
11401fi
11402
97bf5e38 11403 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab 11404
81ecdfbb 11405$as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h
c906108c 11406
97bf5e38 11407 fi
81ecdfbb
RW
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
11409$as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; }
97bf5e38 11410
81ecdfbb
RW
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5
11412$as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; }
11413 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then :
11414 $as_echo_n "(cached) " >&6
97bf5e38 11415else
81ecdfbb 11416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11417/* end confdefs.h. */
97bf5e38
MK
11418
11419#define _SYSCALL32
d30c5336
JK
11420/* Needed for new procfs interface on sparc-solaris. */
11421#define _STRUCTURED_PROC 1
97bf5e38 11422#include <sys/procfs.h>
bec39cab
AC
11423int
11424main ()
11425{
97bf5e38 11426pr_siginfo64_t avar
bec39cab
AC
11427 ;
11428 return 0;
11429}
11430_ACEOF
81ecdfbb 11431if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11432 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
11433else
81ecdfbb 11434 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 11435
97bf5e38 11436fi
81ecdfbb 11437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 11438fi
c906108c 11439
97bf5e38 11440 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab 11441
81ecdfbb 11442$as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h
c906108c 11443
97bf5e38 11444 fi
81ecdfbb
RW
11445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
11446$as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; }
bec39cab
AC
11447
11448
97bf5e38
MK
11449
11450
11451
97bf5e38 11452 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
81ecdfbb
RW
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
11454$as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
11455 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then :
11456 $as_echo_n "(cached) " >&6
c906108c 11457else
81ecdfbb 11458 if test "$cross_compiling" = yes; then :
97bf5e38 11459 gdb_cv_prfpregset_t_broken=yes
c906108c 11460else
81ecdfbb 11461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11462/* end confdefs.h. */
97bf5e38
MK
11463#include <sys/procfs.h>
11464 int main ()
11465 {
11466 if (sizeof (prfpregset_t) == sizeof (void *))
11467 return 1;
11468 return 0;
11469 }
bec39cab 11470_ACEOF
81ecdfbb 11471if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11472 gdb_cv_prfpregset_t_broken=no
81ecdfbb
RW
11473else
11474 gdb_cv_prfpregset_t_broken=yes
c906108c 11475fi
81ecdfbb
RW
11476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11477 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11478fi
81ecdfbb 11479
c906108c
SS
11480fi
11481
81ecdfbb
RW
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
11483$as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
97bf5e38 11484 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f 11485
81ecdfbb 11486$as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
c906108c 11487
97bf5e38
MK
11488 fi
11489 fi
c906108c 11490fi
c906108c 11491
bc8bcb4b 11492# Check if the compiler supports the `long long' type.
c906108c 11493
81ecdfbb
RW
11494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
11495$as_echo_n "checking for long long support in compiler... " >&6; }
11496if test "${gdb_cv_c_long_long+set}" = set; then :
11497 $as_echo_n "(cached) " >&6
97bf5e38 11498else
81ecdfbb 11499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11500/* end confdefs.h. */
bc8bcb4b 11501extern long long foo;
bec39cab
AC
11502int
11503main ()
11504{
bc8bcb4b 11505switch (foo & 2) { case 0: return 1; }
bec39cab
AC
11506 ;
11507 return 0;
11508}
11509_ACEOF
81ecdfbb 11510if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
11511 gdb_cv_c_long_long=yes
11512else
81ecdfbb 11513 gdb_cv_c_long_long=no
97bf5e38 11514fi
81ecdfbb 11515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11516fi
81ecdfbb
RW
11517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
11518$as_echo "$gdb_cv_c_long_long" >&6; }
74a0d9f6
JK
11519if test $gdb_cv_c_long_long != yes; then
11520 # libdecnumber requires long long.
11521 as_fn_error "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
11522fi
11523
bc8bcb4b 11524# Check if the compiler and runtime support printing long longs.
97bf5e38 11525
81ecdfbb
RW
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
11527$as_echo_n "checking for long long support in printf... " >&6; }
11528if test "${gdb_cv_printf_has_long_long+set}" = set; then :
11529 $as_echo_n "(cached) " >&6
97bf5e38 11530else
81ecdfbb 11531 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11532 gdb_cv_printf_has_long_long=no
11533else
81ecdfbb 11534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11535/* end confdefs.h. */
bc8bcb4b
MK
11536$ac_includes_default
11537int
11538main ()
11539{
11540char buf[32];
97bf5e38
MK
11541 long long l = 0;
11542 l = (l << 16) + 0x0123;
11543 l = (l << 16) + 0x4567;
11544 l = (l << 16) + 0x89ab;
11545 l = (l << 16) + 0xcdef;
11546 sprintf (buf, "0x%016llx", l);
11547 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
11548 ;
11549 return 0;
c906108c 11550}
bec39cab 11551_ACEOF
81ecdfbb 11552if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11553 gdb_cv_printf_has_long_long=yes
11554else
81ecdfbb 11555 gdb_cv_printf_has_long_long=no
97bf5e38 11556fi
81ecdfbb
RW
11557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11558 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11559fi
81ecdfbb 11560
97bf5e38 11561fi
81ecdfbb
RW
11562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
11563$as_echo "$gdb_cv_printf_has_long_long" >&6; }
97bf5e38 11564if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b 11565
81ecdfbb 11566$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
11567
11568fi
97bf5e38 11569
1a619819
LM
11570# Check if the compiler and runtime support printing decfloats.
11571
81ecdfbb
RW
11572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
11573$as_echo_n "checking for decfloat support in printf... " >&6; }
11574if test "${gdb_cv_printf_has_decfloat+set}" = set; then :
11575 $as_echo_n "(cached) " >&6
1a619819 11576else
81ecdfbb 11577 if test "$cross_compiling" = yes; then :
1a619819
LM
11578 gdb_cv_printf_has_decfloat=no
11579else
81ecdfbb 11580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
11581/* end confdefs.h. */
11582$ac_includes_default
11583int
11584main ()
11585{
11586char buf[64];
11587 _Decimal32 d32 = 1.2345df;
11588 _Decimal64 d64 = 1.2345dd;
11589 _Decimal128 d128 = 1.2345dl;
11590 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
11591 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
11592 ;
11593 return 0;
11594}
11595_ACEOF
81ecdfbb 11596if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
11597 gdb_cv_printf_has_decfloat=yes
11598else
81ecdfbb 11599 gdb_cv_printf_has_decfloat=no
1a619819 11600fi
81ecdfbb
RW
11601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11602 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 11603fi
81ecdfbb 11604
1a619819 11605fi
81ecdfbb
RW
11606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
11607$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
1a619819
LM
11608if test $gdb_cv_printf_has_decfloat = yes; then
11609
81ecdfbb 11610$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
11611
11612fi
11613
bc8bcb4b
MK
11614# Check if the compiler supports the `long double' type. We can't use
11615# AC_C_LONG_DOUBLE because that one does additional checks on the
11616# constants defined in <float.h> that fail on some systems,
11617# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 11618
81ecdfbb
RW
11619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
11620$as_echo_n "checking for long double support in compiler... " >&6; }
11621if test "${gdb_cv_c_long_double+set}" = set; then :
11622 $as_echo_n "(cached) " >&6
97bf5e38 11623else
81ecdfbb 11624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11625/* end confdefs.h. */
97bf5e38 11626long double foo;
bec39cab 11627_ACEOF
81ecdfbb 11628if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 11629 gdb_cv_c_long_double=yes
97bf5e38 11630else
81ecdfbb 11631 gdb_cv_c_long_double=no
97bf5e38 11632fi
81ecdfbb 11633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 11634fi
81ecdfbb
RW
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
11636$as_echo "$gdb_cv_c_long_double" >&6; }
bc8bcb4b 11637if test $gdb_cv_c_long_double = yes; then
c906108c 11638
81ecdfbb 11639$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11640
11641fi
11642
bc8bcb4b 11643# Check if the compiler and runtime support printing long doubles.
97bf5e38 11644
81ecdfbb
RW
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
11646$as_echo_n "checking for long double support in printf... " >&6; }
11647if test "${gdb_cv_printf_has_long_double+set}" = set; then :
11648 $as_echo_n "(cached) " >&6
97bf5e38 11649else
81ecdfbb 11650 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11651 gdb_cv_printf_has_long_double=no
11652else
81ecdfbb 11653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11654/* end confdefs.h. */
bc8bcb4b
MK
11655$ac_includes_default
11656int
11657main ()
11658{
11659char buf[16];
97bf5e38
MK
11660 long double f = 3.141592653;
11661 sprintf (buf, "%Lg", f);
11662 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
11663 ;
11664 return 0;
97bf5e38 11665}
bec39cab 11666_ACEOF
81ecdfbb 11667if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 11668 gdb_cv_printf_has_long_double=yes
c906108c 11669else
81ecdfbb 11670 gdb_cv_printf_has_long_double=no
c906108c 11671fi
81ecdfbb
RW
11672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11673 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 11674fi
81ecdfbb 11675
c906108c 11676fi
81ecdfbb
RW
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
11678$as_echo "$gdb_cv_printf_has_long_double" >&6; }
97bf5e38 11679if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b 11680
81ecdfbb 11681$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11682
11683fi
97bf5e38 11684
bc8bcb4b 11685# Check if the compiler and runtime support scanning long doubles.
97bf5e38 11686
81ecdfbb
RW
11687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
11688$as_echo_n "checking for long double support in scanf... " >&6; }
11689if test "${gdb_cv_scanf_has_long_double+set}" = set; then :
11690 $as_echo_n "(cached) " >&6
97bf5e38 11691else
81ecdfbb 11692 if test "$cross_compiling" = yes; then :
97bf5e38
MK
11693 gdb_cv_scanf_has_long_double=no
11694else
81ecdfbb 11695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11696/* end confdefs.h. */
bc8bcb4b
MK
11697#include <stdio.h>
11698int
11699main ()
11700{
11701char *buf = "3.141592653";
97bf5e38
MK
11702 long double f = 0;
11703 sscanf (buf, "%Lg", &f);
11704 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
11705 ;
11706 return 0;
97bf5e38 11707}
bec39cab 11708_ACEOF
81ecdfbb 11709if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
11710 gdb_cv_scanf_has_long_double=yes
11711else
81ecdfbb 11712 gdb_cv_scanf_has_long_double=no
97bf5e38 11713fi
81ecdfbb
RW
11714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11715 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 11716fi
81ecdfbb 11717
c906108c 11718fi
81ecdfbb
RW
11719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
11720$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
97bf5e38 11721if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b 11722
81ecdfbb 11723$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
11724
11725fi
c906108c 11726
438013df
AO
11727case ${host_os} in
11728aix*)
81ecdfbb
RW
11729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11730$as_echo_n "checking for -bbigtoc option... " >&6; }
11731if test "${gdb_cv_bigtoc+set}" = set; then :
11732 $as_echo_n "(cached) " >&6
438013df 11733else
bec39cab 11734
438013df
AO
11735 SAVE_LDFLAGS=$LDFLAGS
11736
11737 case $GCC in
11738 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11739 *) gdb_cv_bigtoc=-bbigtoc ;;
11740 esac
11741
11742 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 11743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11744/* end confdefs.h. */
438013df 11745
bec39cab
AC
11746int
11747main ()
11748{
438013df 11749int i;
bec39cab
AC
11750 ;
11751 return 0;
11752}
11753_ACEOF
81ecdfbb 11754if ac_fn_c_try_link "$LINENO"; then :
bec39cab 11755
81ecdfbb
RW
11756else
11757 gdb_cv_bigtoc=
438013df 11758fi
81ecdfbb
RW
11759rm -f core conftest.err conftest.$ac_objext \
11760 conftest$ac_exeext conftest.$ac_ext
ec76baa5 11761 LDFLAGS="${SAVE_LDFLAGS}"
438013df 11762
bec39cab 11763fi
81ecdfbb
RW
11764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11765$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
11766 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
11767 ;;
11768esac
11769
38f6b338 11770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 11771$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
11772dynamic_list=false
11773if test "${gdb_native}" = yes; then
11774 # The dynamically loaded libthread_db needs access to symbols in the gdb
11775 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
11776 # may not be supported there.
11777 old_LDFLAGS="$LDFLAGS"
11778 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
11779 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
11780 LDFLAGS="$LDFLAGS $RDYNAMIC"
11781 if test "${have_libpython}" = no; then
11782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
11783/* end confdefs.h. */
11784
11785int
11786main ()
11787{
11788
11789 ;
11790 return 0;
11791}
11792_ACEOF
11793if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
11794 dynamic_list=true
11795fi
11796rm -f core conftest.err conftest.$ac_objext \
11797 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
11798 else
11799 # Workaround http://bugs.python.org/issue4434 where static
11800 # libpythonX.Y.a would get its symbols required for
11801 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
11802 # Problem does not happen for the recommended libpythonX.Y.so linkage.
11803 old_CFLAGS="$CFLAGS"
11804 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
11805 old_LIBS="$LIBS"
11806 LIBS="$LIBS $PYTHON_LIBS"
38f6b338 11807 if test "$cross_compiling" = yes; then :
3bebe2f2 11808 true
f6528abd 11809else
3bebe2f2
JK
11810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11811/* end confdefs.h. */
11812#include "${have_libpython}/Python.h"
11813int
11814main ()
11815{
11816int err;
38f6b338
JK
11817 Py_Initialize ();
11818 err = PyRun_SimpleString ("import itertools\n");
11819 Py_Finalize ();
11820 return err == 0 ? 0 : 1;
3bebe2f2
JK
11821 ;
11822 return 0;
11823}
11824_ACEOF
11825if ac_fn_c_try_run "$LINENO"; then :
11826 dynamic_list=true
11827fi
11828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11829 conftest.$ac_objext conftest.beam conftest.$ac_ext
11830fi
11831
8c1fb155 11832 LIBS="$old_LIBS"
38f6b338
JK
11833 CFLAGS="$old_CFLAGS"
11834 fi
11835 LDFLAGS="$old_LDFLAGS"
11836fi
11837if $dynamic_list; then
11838 found="-Wl,--dynamic-list"
11839 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 11840else
38f6b338
JK
11841 found="-rdynamic"
11842 RDYNAMIC="-rdynamic"
f6528abd 11843fi
f6528abd 11844
38f6b338 11845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 11846$as_echo "$found" >&6; }
0407b3f1 11847
f6528abd 11848
0407b3f1 11849if test ${build} = ${host} -a ${host} = ${target} ; then
c906108c 11850 case ${host_os} in
c906108c 11851 solaris*)
d92419e5
JB
11852 # See if thread_db library is around for Solaris thread debugging.
11853 # Note that we must explicitly test for version 1 of the library
11854 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
11855 # the same API.
81ecdfbb
RW
11856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5
11857$as_echo_n "checking for Solaris thread debugging library... " >&6; }
c906108c 11858 if test -f /usr/lib/libthread_db.so.1 ; then
81ecdfbb
RW
11859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11860$as_echo "yes" >&6; }
60ca704f 11861
81ecdfbb 11862$as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h
c906108c 11863
3483b318 11864 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 11865 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
81ecdfbb
RW
11866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11867$as_echo_n "checking for dlopen in -ldl... " >&6; }
11868if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
11869 $as_echo_n "(cached) " >&6
c906108c 11870else
bec39cab 11871 ac_check_lib_save_LIBS=$LIBS
c906108c 11872LIBS="-ldl $LIBS"
81ecdfbb 11873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
11874/* end confdefs.h. */
11875
81ecdfbb
RW
11876/* Override any GCC internal prototype to avoid an error.
11877 Use char because int might match the return type of a GCC
11878 builtin and then its argument prototype would still apply. */
bec39cab
AC
11879#ifdef __cplusplus
11880extern "C"
11881#endif
bec39cab
AC
11882char dlopen ();
11883int
11884main ()
11885{
81ecdfbb 11886return dlopen ();
bec39cab
AC
11887 ;
11888 return 0;
11889}
11890_ACEOF
81ecdfbb 11891if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
11892 ac_cv_lib_dl_dlopen=yes
11893else
81ecdfbb 11894 ac_cv_lib_dl_dlopen=no
bec39cab 11895fi
81ecdfbb
RW
11896rm -f core conftest.err conftest.$ac_objext \
11897 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
11898LIBS=$ac_check_lib_save_LIBS
11899fi
81ecdfbb
RW
11900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11901$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11902if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
bec39cab
AC
11903 cat >>confdefs.h <<_ACEOF
11904#define HAVE_LIBDL 1
11905_ACEOF
c906108c
SS
11906
11907 LIBS="-ldl $LIBS"
11908
c906108c
SS
11909fi
11910
f6528abd 11911 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
c906108c
SS
11912 # Sun randomly tweaked the prototypes in <proc_service.h>
11913 # at one point.
81ecdfbb
RW
11914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
11915$as_echo_n "checking if <proc_service.h> is old... " >&6; }
11916 if test "${gdb_cv_proc_service_is_old+set}" = set; then :
11917 $as_echo_n "(cached) " >&6
c906108c 11918else
bec39cab 11919
81ecdfbb 11920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11921/* end confdefs.h. */
c906108c
SS
11922
11923 #include <proc_service.h>
11924 ps_err_e ps_pdwrite
11925 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 11926
bec39cab
AC
11927int
11928main ()
11929{
11930
11931 ;
11932 return 0;
11933}
11934_ACEOF
81ecdfbb 11935if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
11936 gdb_cv_proc_service_is_old=no
11937else
81ecdfbb 11938 gdb_cv_proc_service_is_old=yes
c906108c 11939fi
81ecdfbb 11940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 11941
c906108c
SS
11942fi
11943
81ecdfbb
RW
11944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5
11945$as_echo "$gdb_cv_proc_service_is_old" >&6; }
c906108c 11946 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f 11947
81ecdfbb 11948$as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h
c906108c
SS
11949
11950 fi
11951 else
81ecdfbb
RW
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11953$as_echo "no" >&6; }
c906108c
SS
11954 fi
11955 ;;
d92419e5 11956 aix*)
81ecdfbb
RW
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
11958$as_echo_n "checking for AiX thread debugging library... " >&6; }
11959 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then :
11960 $as_echo_n "(cached) " >&6
bec39cab 11961else
81ecdfbb 11962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11963/* end confdefs.h. */
d92419e5 11964#include <sys/pthdebug.h>
bec39cab
AC
11965int
11966main ()
11967{
d92419e5
JB
11968#ifndef PTHDB_VERSION_3
11969 #error
11970 #endif
bec39cab
AC
11971 ;
11972 return 0;
11973}
11974_ACEOF
81ecdfbb 11975if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
11976 gdb_cv_have_aix_thread_debug=yes
11977else
81ecdfbb 11978 gdb_cv_have_aix_thread_debug=no
d92419e5 11979fi
81ecdfbb 11980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
11981fi
11982
81ecdfbb
RW
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
11984$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
d92419e5
JB
11985 if test $gdb_cv_have_aix_thread_debug = yes; then
11986 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 11987 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 11988 LIBS="$LIBS -lpthdebug"
d645e32e
JB
11989
11990 # Older versions of AIX do not provide the declaration for
11991 # the getthrds function (it appears that it was introduced
11992 # with AIX 6.x).
11993 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
11994"
11995if test "x$ac_cv_have_decl_getthrds" = x""yes; then :
11996 ac_have_decl=1
11997else
11998 ac_have_decl=0
11999fi
12000
12001cat >>confdefs.h <<_ACEOF
12002#define HAVE_DECL_GETTHRDS $ac_have_decl
12003_ACEOF
12004
d92419e5
JB
12005 fi
12006 ;;
c906108c 12007 esac
bec39cab 12008
c906108c
SS
12009fi
12010
3f47be5c 12011if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
12013$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
12014if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then :
12015 $as_echo_n "(cached) " >&6
bec39cab 12016else
81ecdfbb 12017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12018/* end confdefs.h. */
3f47be5c 12019#include <thread_db.h>
bec39cab
AC
12020int
12021main ()
12022{
3f47be5c 12023int i = TD_NOTALLOC;
bec39cab
AC
12024 ;
12025 return 0;
12026}
12027_ACEOF
81ecdfbb 12028if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
12029 gdb_cv_thread_db_h_has_td_notalloc=yes
12030else
81ecdfbb 12031 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 12032
3f47be5c 12033fi
81ecdfbb 12034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 12035
bec39cab 12036fi
81ecdfbb
RW
12037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
12038$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
12040$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
12041if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then :
12042 $as_echo_n "(cached) " >&6
59f80f10 12043else
81ecdfbb 12044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12045/* end confdefs.h. */
12046#include <thread_db.h>
12047int
12048main ()
12049{
12050int i = TD_VERSION;
12051 ;
12052 return 0;
12053}
12054_ACEOF
81ecdfbb 12055if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12056 gdb_cv_thread_db_h_has_td_version=yes
12057else
81ecdfbb 12058 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
12059
12060fi
81ecdfbb 12061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12062
12063fi
81ecdfbb
RW
12064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
12065$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
12067$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
12068if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then :
12069 $as_echo_n "(cached) " >&6
59f80f10 12070else
81ecdfbb 12071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
12072/* end confdefs.h. */
12073#include <thread_db.h>
12074int
12075main ()
12076{
12077int i = TD_NOTLS;
12078 ;
12079 return 0;
12080}
12081_ACEOF
81ecdfbb 12082if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
12083 gdb_cv_thread_db_h_has_td_notls=yes
12084else
81ecdfbb 12085 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
12086
12087fi
81ecdfbb 12088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
12089
12090fi
81ecdfbb
RW
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
12092$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
12093fi
12094if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 12095
81ecdfbb 12096$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 12097
59f80f10
DJ
12098fi
12099if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
12100
81ecdfbb 12101$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
12102
12103fi
12104if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
12105
81ecdfbb 12106$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 12107
3f47be5c
EZ
12108fi
12109
b757528f 12110if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
81ecdfbb
RW
12111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5
12112$as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; }
12113if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then :
12114 $as_echo_n "(cached) " >&6
bec39cab 12115else
81ecdfbb 12116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12117/* end confdefs.h. */
b757528f 12118#include <sys/syscall.h>
bec39cab
AC
12119int
12120main ()
12121{
b757528f 12122int i = __NR_tkill;
bec39cab
AC
12123 ;
12124 return 0;
12125}
12126_ACEOF
81ecdfbb 12127if ac_fn_c_try_compile "$LINENO"; then :
b757528f
JJ
12128 gdb_cv_sys_syscall_h_has_tkill=yes
12129else
81ecdfbb 12130 gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 12131
b757528f 12132fi
81ecdfbb 12133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 12134
bec39cab 12135fi
81ecdfbb
RW
12136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
12137$as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
b757528f 12138fi
99c1d451
TT
12139if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
12140 ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
12141if test "x$ac_cv_func_syscall" = x""yes; then :
bec39cab 12142
81ecdfbb 12143$as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
b757528f 12144
99c1d451
TT
12145
12146fi
12147
b757528f
JJ
12148fi
12149
81ecdfbb
RW
12150ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
12151"
12152if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then :
12153 ac_have_decl=1
10568435 12154else
81ecdfbb 12155 ac_have_decl=0
10568435 12156fi
10568435
JK
12157
12158cat >>confdefs.h <<_ACEOF
81ecdfbb 12159#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
10568435
JK
12160_ACEOF
12161
12162
81ecdfbb
RW
12163if test "$cross_compiling" = yes; then :
12164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12165/* end confdefs.h. */
12166#include <sys/personality.h>
12167int
12168main ()
12169{
12170
12171# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12172# define ADDR_NO_RANDOMIZE 0x0040000
12173# endif
12174 /* Test the flag could be set and stays set. */
12175 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12176 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12177 return 1
12178 ;
12179 return 0;
12180}
12181_ACEOF
81ecdfbb 12182if ac_fn_c_try_link "$LINENO"; then :
10568435
JK
12183 have_personality=true
12184else
81ecdfbb 12185 have_personality=false
10568435 12186fi
81ecdfbb
RW
12187rm -f core conftest.err conftest.$ac_objext \
12188 conftest$ac_exeext conftest.$ac_ext
10568435 12189else
81ecdfbb 12190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10568435
JK
12191/* end confdefs.h. */
12192#include <sys/personality.h>
12193int
12194main ()
12195{
12196
12197# if !HAVE_DECL_ADDR_NO_RANDOMIZE
12198# define ADDR_NO_RANDOMIZE 0x0040000
12199# endif
12200 /* Test the flag could be set and stays set. */
12201 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
12202 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
12203 return 1
12204 ;
12205 return 0;
12206}
12207_ACEOF
81ecdfbb 12208if ac_fn_c_try_run "$LINENO"; then :
10568435
JK
12209 have_personality=true
12210else
81ecdfbb 12211 have_personality=false
10568435 12212fi
81ecdfbb
RW
12213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12214 conftest.$ac_objext conftest.beam conftest.$ac_ext
10568435 12215fi
81ecdfbb 12216
10568435
JK
12217if $have_personality
12218then
12219
81ecdfbb 12220$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
10568435
JK
12221
12222fi
12223
e655c1a2
PA
12224case $host_os in
12225 go32* | *djgpp*)
12226 gdbinit=gdb.ini
12227 ;;
12228 *)
12229 gdbinit=.gdbinit
12230 ;;
12231esac
12232
12233cat >>confdefs.h <<_ACEOF
12234#define GDBINIT "$gdbinit"
12235_ACEOF
12236
12237
fb40c209 12238
f83d8a90
DE
12239# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
12240# except that the argument to --with-sysroot is optional.
12241# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
12242if test "x$with_sysroot" = xyes; then
12243 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
12244fi
bec39cab 12245
81ecdfbb
RW
12246# Check whether --with-sysroot was given.
12247if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
12248 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
12249else
12250 TARGET_SYSTEM_ROOT=
12251fi
030292b7 12252
030292b7 12253
f83d8a90
DE
12254 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12255 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12256 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
12257 ac_define_dir=`eval echo $ac_define_dir`
030292b7 12258
f83d8a90
DE
12259cat >>confdefs.h <<_ACEOF
12260#define TARGET_SYSTEM_ROOT "$ac_define_dir"
12261_ACEOF
bec39cab 12262
030292b7 12263
b14b1491 12264
f83d8a90
DE
12265
12266 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12267 if test "x$prefix" = xNONE; then
12268 test_prefix=/usr/local
12269 else
12270 test_prefix=$prefix
12271 fi
12272 else
12273 test_prefix=$exec_prefix
12274 fi
12275 value=0
12276 case ${ac_define_dir} in
12277 "${test_prefix}"|"${test_prefix}/"*|\
12278 '${exec_prefix}'|'${exec_prefix}/'*)
12279 value=1
12280 ;;
12281 esac
12282
12283cat >>confdefs.h <<_ACEOF
12284#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
12285_ACEOF
030292b7
DJ
12286
12287
12288
16e7150e 12289
16e7150e 12290
81ecdfbb
RW
12291# Check whether --with-system-gdbinit was given.
12292if test "${with_system_gdbinit+set}" = set; then :
12293 withval=$with_system_gdbinit;
b14b1491
TT
12294 SYSTEM_GDBINIT=$withval
12295else
12296 SYSTEM_GDBINIT=
81ecdfbb
RW
12297fi
12298
16e7150e
JG
12299
12300 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
12301 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 12302 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
12303 ac_define_dir=`eval echo $ac_define_dir`
12304
12305cat >>confdefs.h <<_ACEOF
12306#define SYSTEM_GDBINIT "$ac_define_dir"
12307_ACEOF
12308
12309
12310
0c4a4063 12311
b14b1491
TT
12312 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
12313 if test "x$prefix" = xNONE; then
12314 test_prefix=/usr/local
12315 else
12316 test_prefix=$prefix
12317 fi
12318 else
12319 test_prefix=$exec_prefix
12320 fi
12321 value=0
12322 case ${ac_define_dir} in
12323 "${test_prefix}"|"${test_prefix}/"*|\
12324 '${exec_prefix}'|'${exec_prefix}/'*)
12325 value=1
12326 ;;
12327 esac
16e7150e 12328
b14b1491
TT
12329cat >>confdefs.h <<_ACEOF
12330#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
12331_ACEOF
12332
b14b1491 12333
16e7150e 12334
0c4a4063 12335
81ecdfbb
RW
12336# Check whether --enable-werror was given.
12337if test "${enable_werror+set}" = set; then :
12338 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
12339 yes | y) ERROR_ON_WARNING="yes" ;;
12340 no | n) ERROR_ON_WARNING="no" ;;
81ecdfbb 12341 *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 12342 esac
81ecdfbb
RW
12343fi
12344
094a342e 12345
a68ffae9
JK
12346# Enable -Werror by default when using gcc. Turn it off for releases.
12347if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
12348 ERROR_ON_WARNING=yes
12349fi
12350
12351WERROR_CFLAGS=""
12352if test "${ERROR_ON_WARNING}" = yes ; then
12353 WERROR_CFLAGS="-Werror"
12354fi
12355
aa79a185 12356build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
d3685d60 12357-Wpointer-sign \
1cb5e2a4 12358-Wno-unused -Wunused-value -Wunused-function \
352b3eda 12359-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
44d100c3 12360-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
dd9aa048 12361-Wold-style-declaration -Wold-style-definition"
a3b362c4 12362
3526781e
DJ
12363# Enable -Wno-format by default when using gcc on mingw since many
12364# GCC versions complain about %I64.
12365case "${host}" in
12366 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
d3685d60 12367 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
12368esac
12369
81ecdfbb
RW
12370# Check whether --enable-build-warnings was given.
12371if test "${enable_build_warnings+set}" = set; then :
12372 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
12373 yes) ;;
12374 no) build_warnings="-w";;
12375 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12376 build_warnings="${build_warnings} ${t}";;
12377 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12378 build_warnings="${t} ${build_warnings}";;
12379 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12380esac
d4f3574e 12381if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 12382 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 12383fi
81ecdfbb
RW
12384fi
12385# Check whether --enable-gdb-build-warnings was given.
12386if test "${enable_gdb_build_warnings+set}" = set; then :
12387 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
12388 yes) ;;
12389 no) build_warnings="-w";;
12390 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12391 build_warnings="${build_warnings} ${t}";;
12392 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
12393 build_warnings="${t} ${build_warnings}";;
12394 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
12395esac
12396if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
12397 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
12398fi
81ecdfbb
RW
12399fi
12400WARN_CFLAGS=""
c906108c
SS
12401if test "x${build_warnings}" != x -a "x$GCC" = xyes
12402then
81ecdfbb
RW
12403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
12404$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
12405 # Separate out the -Werror flag as some files just cannot be
12406 # compiled with it enabled.
12407 for w in ${build_warnings}; do
12408 case $w in
12409 -Werr*) WERROR_CFLAGS=-Werror ;;
12410 *) # Check that GCC accepts it
4536bbc6
AC
12411 saved_CFLAGS="$CFLAGS"
12412 CFLAGS="$CFLAGS $w"
81ecdfbb 12413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12414/* end confdefs.h. */
4536bbc6 12415
bec39cab
AC
12416int
12417main ()
12418{
4536bbc6 12419
bec39cab
AC
12420 ;
12421 return 0;
12422}
12423_ACEOF
81ecdfbb 12424if ac_fn_c_try_compile "$LINENO"; then :
4536bbc6 12425 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 12426fi
81ecdfbb 12427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 12428 CFLAGS="$saved_CFLAGS"
746a987d
AC
12429 esac
12430 done
81ecdfbb
RW
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
12432$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
12433fi
12434
12435
104c1213 12436
7a292a7a 12437# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
12438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
12439$as_echo_n "checking for cygwin... " >&6; }
12440if test "${gdb_cv_os_cygwin+set}" = set; then :
12441 $as_echo_n "(cached) " >&6
bec39cab 12442else
81ecdfbb 12443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12444/* end confdefs.h. */
7a292a7a
SS
12445
12446#if defined (__CYGWIN__) || defined (__CYGWIN32__)
12447lose
12448#endif
bec39cab 12449_ACEOF
7a292a7a 12450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb 12451 $EGREP "lose" >/dev/null 2>&1; then :
7a292a7a
SS
12452 gdb_cv_os_cygwin=yes
12453else
7a292a7a
SS
12454 gdb_cv_os_cygwin=no
12455fi
12456rm -f conftest*
12457
12458fi
81ecdfbb
RW
12459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
12460$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 12461
aff38e61 12462
3eb25fda 12463SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 12464case ${host} in
95cbc983
AC
12465 *go32* ) SER_HARDWIRE=ser-go32.o ;;
12466 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 12467 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
12468esac
12469
12470
cd0fc7c3
SS
12471# libreadline needs libuser32.a in a cygwin environment
12472WIN32LIBS=
12473if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
12474 WIN32LIBS="-luser32"
12475 case "${target}" in
12476 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
12477 ;;
12478 esac
cd0fc7c3 12479fi
c906108c 12480
b4505029
MM
12481# The ser-tcp.c module requires sockets.
12482case ${host} in
12483 *mingw32*)
12484
81ecdfbb 12485$as_echo "#define USE_WIN32API 1" >>confdefs.h
b4505029
MM
12486
12487 WIN32LIBS="$WIN32LIBS -lws2_32"
12488 ;;
12489esac
12490
7a292a7a 12491
31d99776 12492# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
12493
12494 OLD_CFLAGS=$CFLAGS
12495 OLD_LDFLAGS=$LDFLAGS
12496 OLD_LIBS=$LIBS
12497 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12498 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12499 # always want our bfd.
12500 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12501 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12502 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12503 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12504 if test "$plugins" = "yes"; then
a48b32c0
L
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12506$as_echo_n "checking for library containing dlopen... " >&6; }
12507if test "${ac_cv_search_dlopen+set}" = set; then :
12508 $as_echo_n "(cached) " >&6
12509else
12510 ac_func_search_save_LIBS=$LIBS
12511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512/* end confdefs.h. */
12513
12514/* Override any GCC internal prototype to avoid an error.
12515 Use char because int might match the return type of a GCC
12516 builtin and then its argument prototype would still apply. */
12517#ifdef __cplusplus
12518extern "C"
12519#endif
12520char dlopen ();
12521int
12522main ()
12523{
12524return dlopen ();
12525 ;
12526 return 0;
12527}
12528_ACEOF
12529for ac_lib in '' dl; do
12530 if test -z "$ac_lib"; then
12531 ac_res="none required"
12532 else
12533 ac_res=-l$ac_lib
12534 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12535 fi
12536 if ac_fn_c_try_link "$LINENO"; then :
12537 ac_cv_search_dlopen=$ac_res
12538fi
12539rm -f core conftest.err conftest.$ac_objext \
12540 conftest$ac_exeext
12541 if test "${ac_cv_search_dlopen+set}" = set; then :
12542 break
12543fi
12544done
12545if test "${ac_cv_search_dlopen+set}" = set; then :
12546
12547else
12548 ac_cv_search_dlopen=no
12549fi
12550rm conftest.$ac_ext
12551LIBS=$ac_func_search_save_LIBS
12552fi
12553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12554$as_echo "$ac_cv_search_dlopen" >&6; }
12555ac_res=$ac_cv_search_dlopen
12556if test "$ac_res" != no; then :
12557 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12558
12559fi
12560
def63ff0
TT
12561 fi
12562 LIBS="-lbfd -liberty $intl $LIBS"
12563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb
RW
12564$as_echo_n "checking for ELF support in BFD... " >&6; }
12565if test "${gdb_cv_var_elf+set}" = set; then :
12566 $as_echo_n "(cached) " >&6
31d99776 12567else
81ecdfbb 12568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
12569/* end confdefs.h. */
12570#include <stdlib.h>
def63ff0
TT
12571 #include "bfd.h"
12572 #include "elf-bfd.h"
31d99776
DJ
12573
12574int
12575main ()
12576{
def63ff0 12577return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
12578 ;
12579 return 0;
12580}
12581_ACEOF
81ecdfbb 12582if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
12583 gdb_cv_var_elf=yes
12584else
81ecdfbb 12585 gdb_cv_var_elf=no
31d99776 12586fi
81ecdfbb
RW
12587rm -f core conftest.err conftest.$ac_objext \
12588 conftest$ac_exeext conftest.$ac_ext
31d99776 12589fi
81ecdfbb
RW
12590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
12591$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
12592 CFLAGS=$OLD_CFLAGS
12593 LDFLAGS=$OLD_LDFLAGS
12594 LIBS=$OLD_LIBS
31d99776 12595if test $gdb_cv_var_elf = yes; then
55aa24fb 12596 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o"
31d99776 12597
81ecdfbb 12598$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 12599
075ff26d
JK
12600 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12601 if test "$plugins" = "yes"; then
a48b32c0
L
12602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12603$as_echo_n "checking for library containing dlopen... " >&6; }
12604if test "${ac_cv_search_dlopen+set}" = set; then :
12605 $as_echo_n "(cached) " >&6
12606else
12607 ac_func_search_save_LIBS=$LIBS
12608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12609/* end confdefs.h. */
12610
12611/* Override any GCC internal prototype to avoid an error.
12612 Use char because int might match the return type of a GCC
12613 builtin and then its argument prototype would still apply. */
12614#ifdef __cplusplus
12615extern "C"
12616#endif
12617char dlopen ();
12618int
12619main ()
12620{
12621return dlopen ();
12622 ;
12623 return 0;
12624}
12625_ACEOF
12626for ac_lib in '' dl; do
12627 if test -z "$ac_lib"; then
12628 ac_res="none required"
12629 else
12630 ac_res=-l$ac_lib
12631 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12632 fi
12633 if ac_fn_c_try_link "$LINENO"; then :
12634 ac_cv_search_dlopen=$ac_res
12635fi
12636rm -f core conftest.err conftest.$ac_objext \
12637 conftest$ac_exeext
12638 if test "${ac_cv_search_dlopen+set}" = set; then :
12639 break
12640fi
12641done
12642if test "${ac_cv_search_dlopen+set}" = set; then :
12643
12644else
12645 ac_cv_search_dlopen=no
12646fi
12647rm conftest.$ac_ext
12648LIBS=$ac_func_search_save_LIBS
12649fi
12650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12651$as_echo "$ac_cv_search_dlopen" >&6; }
12652ac_res=$ac_cv_search_dlopen
12653if test "$ac_res" != no; then :
12654 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12655
12656fi
12657
075ff26d 12658 fi
31d99776 12659fi
31d99776 12660
4f05add4
TT
12661# Add macho support to GDB, but only if BFD includes it.
12662
12663 OLD_CFLAGS=$CFLAGS
12664 OLD_LDFLAGS=$LDFLAGS
12665 OLD_LIBS=$LIBS
12666 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12667 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12668 # always want our bfd.
12669 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12670 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12671 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12672 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12673 if test "$plugins" = "yes"; then
a48b32c0
L
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12675$as_echo_n "checking for library containing dlopen... " >&6; }
12676if test "${ac_cv_search_dlopen+set}" = set; then :
12677 $as_echo_n "(cached) " >&6
12678else
12679 ac_func_search_save_LIBS=$LIBS
12680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12681/* end confdefs.h. */
12682
12683/* Override any GCC internal prototype to avoid an error.
12684 Use char because int might match the return type of a GCC
12685 builtin and then its argument prototype would still apply. */
12686#ifdef __cplusplus
12687extern "C"
12688#endif
12689char dlopen ();
12690int
12691main ()
12692{
12693return dlopen ();
12694 ;
12695 return 0;
12696}
12697_ACEOF
12698for ac_lib in '' dl; do
12699 if test -z "$ac_lib"; then
12700 ac_res="none required"
12701 else
12702 ac_res=-l$ac_lib
12703 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12704 fi
12705 if ac_fn_c_try_link "$LINENO"; then :
12706 ac_cv_search_dlopen=$ac_res
12707fi
12708rm -f core conftest.err conftest.$ac_objext \
12709 conftest$ac_exeext
12710 if test "${ac_cv_search_dlopen+set}" = set; then :
12711 break
12712fi
12713done
12714if test "${ac_cv_search_dlopen+set}" = set; then :
12715
12716else
12717 ac_cv_search_dlopen=no
12718fi
12719rm conftest.$ac_ext
12720LIBS=$ac_func_search_save_LIBS
12721fi
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12723$as_echo "$ac_cv_search_dlopen" >&6; }
12724ac_res=$ac_cv_search_dlopen
12725if test "$ac_res" != no; then :
12726 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12727
12728fi
12729
4f05add4
TT
12730 fi
12731 LIBS="-lbfd -liberty $intl $LIBS"
12732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
12733$as_echo_n "checking for Mach-O support in BFD... " >&6; }
12734if test "${gdb_cv_var_macho+set}" = set; then :
12735 $as_echo_n "(cached) " >&6
12736else
12737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12738/* end confdefs.h. */
12739#include <stdlib.h>
12740 #include "bfd.h"
12741 #include "mach-o.h"
12742
12743int
12744main ()
12745{
12746return bfd_mach_o_lookup_command (NULL, 0, NULL);
12747 ;
12748 return 0;
12749}
12750_ACEOF
12751if ac_fn_c_try_link "$LINENO"; then :
12752 gdb_cv_var_macho=yes
12753else
12754 gdb_cv_var_macho=no
12755fi
12756rm -f core conftest.err conftest.$ac_objext \
12757 conftest$ac_exeext conftest.$ac_ext
12758fi
12759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
12760$as_echo "$gdb_cv_var_macho" >&6; }
12761 CFLAGS=$OLD_CFLAGS
12762 LDFLAGS=$OLD_LDFLAGS
12763 LIBS=$OLD_LIBS
12764if test $gdb_cv_var_macho = yes; then
12765 CONFIG_OBS="$CONFIG_OBS machoread.o"
12766fi
12767
b2259038
TT
12768# Add SOM support to GDB, but only if BFD includes it.
12769
12770 OLD_CFLAGS=$CFLAGS
12771 OLD_LDFLAGS=$LDFLAGS
12772 OLD_LIBS=$LIBS
12773 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
12774 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
12775 # always want our bfd.
12776 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
12777 LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
12778 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
12779 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
12780 if test "$plugins" = "yes"; then
a48b32c0
L
12781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
12782$as_echo_n "checking for library containing dlopen... " >&6; }
12783if test "${ac_cv_search_dlopen+set}" = set; then :
12784 $as_echo_n "(cached) " >&6
12785else
12786 ac_func_search_save_LIBS=$LIBS
12787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12788/* end confdefs.h. */
12789
12790/* Override any GCC internal prototype to avoid an error.
12791 Use char because int might match the return type of a GCC
12792 builtin and then its argument prototype would still apply. */
12793#ifdef __cplusplus
12794extern "C"
12795#endif
12796char dlopen ();
12797int
12798main ()
12799{
12800return dlopen ();
12801 ;
12802 return 0;
12803}
12804_ACEOF
12805for ac_lib in '' dl; do
12806 if test -z "$ac_lib"; then
12807 ac_res="none required"
12808 else
12809 ac_res=-l$ac_lib
12810 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12811 fi
12812 if ac_fn_c_try_link "$LINENO"; then :
12813 ac_cv_search_dlopen=$ac_res
12814fi
12815rm -f core conftest.err conftest.$ac_objext \
12816 conftest$ac_exeext
12817 if test "${ac_cv_search_dlopen+set}" = set; then :
12818 break
12819fi
12820done
12821if test "${ac_cv_search_dlopen+set}" = set; then :
12822
12823else
12824 ac_cv_search_dlopen=no
12825fi
12826rm conftest.$ac_ext
12827LIBS=$ac_func_search_save_LIBS
12828fi
12829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
12830$as_echo "$ac_cv_search_dlopen" >&6; }
12831ac_res=$ac_cv_search_dlopen
12832if test "$ac_res" != no; then :
12833 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12834
12835fi
12836
b2259038
TT
12837 fi
12838 LIBS="-lbfd -liberty $intl $LIBS"
12839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5
12840$as_echo_n "checking for SOM support in BFD... " >&6; }
12841if test "${gdb_cv_var_som+set}" = set; then :
12842 $as_echo_n "(cached) " >&6
12843else
12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12845/* end confdefs.h. */
12846#include <stdlib.h>
12847 #include "bfd.h"
12848 #include "som.h"
12849
12850int
12851main ()
12852{
12853return bfd_som_attach_aux_hdr (NULL, 0, NULL);
12854 ;
12855 return 0;
12856}
12857_ACEOF
12858if ac_fn_c_try_link "$LINENO"; then :
12859 gdb_cv_var_som=yes
12860else
12861 gdb_cv_var_som=no
12862fi
12863rm -f core conftest.err conftest.$ac_objext \
12864 conftest$ac_exeext conftest.$ac_ext
12865fi
12866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5
12867$as_echo "$gdb_cv_var_som" >&6; }
12868 CFLAGS=$OLD_CFLAGS
12869 LDFLAGS=$OLD_LDFLAGS
12870 LIBS=$OLD_LIBS
12871if test $gdb_cv_var_som = yes; then
12872 CONFIG_OBS="$CONFIG_OBS somread.o"
12873fi
12874
121ce6e5
DJ
12875# Add any host-specific objects to GDB.
12876CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
12877
608e2dbb
TT
12878# If building on ELF, look for lzma support for embedded compressed debug info.
12879if test $gdb_cv_var_elf = yes; then
12880
12881# Check whether --with-lzma was given.
12882if test "${with_lzma+set}" = set; then :
12883 withval=$with_lzma;
12884else
12885 with_lzma=auto
12886fi
12887
12888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
12889$as_echo_n "checking whether to use lzma... " >&6; }
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
12891$as_echo "$with_lzma" >&6; }
12892
12893 if test "${with_lzma}" != no; then
12894
12895
12896
12897
12898
12899
12900
12901
12902 use_additional=yes
12903
12904 acl_save_prefix="$prefix"
12905 prefix="$acl_final_prefix"
12906 acl_save_exec_prefix="$exec_prefix"
12907 exec_prefix="$acl_final_exec_prefix"
12908
12909 eval additional_includedir=\"$includedir\"
12910 eval additional_libdir=\"$libdir\"
12911
12912 exec_prefix="$acl_save_exec_prefix"
12913 prefix="$acl_save_prefix"
12914
12915
12916# Check whether --with-liblzma-prefix was given.
12917if test "${with_liblzma_prefix+set}" = set; then :
12918 withval=$with_liblzma_prefix;
12919 if test "X$withval" = "Xno"; then
12920 use_additional=no
12921 else
12922 if test "X$withval" = "X"; then
12923
12924 acl_save_prefix="$prefix"
12925 prefix="$acl_final_prefix"
12926 acl_save_exec_prefix="$exec_prefix"
12927 exec_prefix="$acl_final_exec_prefix"
12928
12929 eval additional_includedir=\"$includedir\"
12930 eval additional_libdir=\"$libdir\"
12931
12932 exec_prefix="$acl_save_exec_prefix"
12933 prefix="$acl_save_prefix"
12934
12935 else
12936 additional_includedir="$withval/include"
12937 additional_libdir="$withval/lib"
12938 fi
12939 fi
12940
12941fi
12942
12943 LIBLZMA=
12944 LTLIBLZMA=
12945 INCLZMA=
12946 rpathdirs=
12947 ltrpathdirs=
12948 names_already_handled=
12949 names_next_round='lzma '
12950 while test -n "$names_next_round"; do
12951 names_this_round="$names_next_round"
12952 names_next_round=
12953 for name in $names_this_round; do
12954 already_handled=
12955 for n in $names_already_handled; do
12956 if test "$n" = "$name"; then
12957 already_handled=yes
12958 break
12959 fi
12960 done
12961 if test -z "$already_handled"; then
12962 names_already_handled="$names_already_handled $name"
12963 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
12964 eval value=\"\$HAVE_LIB$uppername\"
12965 if test -n "$value"; then
12966 if test "$value" = yes; then
12967 eval value=\"\$LIB$uppername\"
12968 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
12969 eval value=\"\$LTLIB$uppername\"
12970 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
12971 else
12972 :
12973 fi
12974 else
12975 found_dir=
12976 found_la=
12977 found_so=
12978 found_a=
12979 if test $use_additional = yes; then
12980 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
12981 found_dir="$additional_libdir"
12982 found_so="$additional_libdir/lib$name.$shlibext"
12983 if test -f "$additional_libdir/lib$name.la"; then
12984 found_la="$additional_libdir/lib$name.la"
12985 fi
12986 else
12987 if test -f "$additional_libdir/lib$name.$libext"; then
12988 found_dir="$additional_libdir"
12989 found_a="$additional_libdir/lib$name.$libext"
12990 if test -f "$additional_libdir/lib$name.la"; then
12991 found_la="$additional_libdir/lib$name.la"
12992 fi
12993 fi
12994 fi
12995 fi
12996 if test "X$found_dir" = "X"; then
12997 for x in $LDFLAGS $LTLIBLZMA; do
12998
12999 acl_save_prefix="$prefix"
13000 prefix="$acl_final_prefix"
13001 acl_save_exec_prefix="$exec_prefix"
13002 exec_prefix="$acl_final_exec_prefix"
13003 eval x=\"$x\"
13004 exec_prefix="$acl_save_exec_prefix"
13005 prefix="$acl_save_prefix"
13006
13007 case "$x" in
13008 -L*)
13009 dir=`echo "X$x" | sed -e 's/^X-L//'`
13010 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
13011 found_dir="$dir"
13012 found_so="$dir/lib$name.$shlibext"
13013 if test -f "$dir/lib$name.la"; then
13014 found_la="$dir/lib$name.la"
13015 fi
13016 else
13017 if test -f "$dir/lib$name.$libext"; then
13018 found_dir="$dir"
13019 found_a="$dir/lib$name.$libext"
13020 if test -f "$dir/lib$name.la"; then
13021 found_la="$dir/lib$name.la"
13022 fi
13023 fi
13024 fi
13025 ;;
13026 esac
13027 if test "X$found_dir" != "X"; then
13028 break
13029 fi
13030 done
13031 fi
13032 if test "X$found_dir" != "X"; then
13033 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
13034 if test "X$found_so" != "X"; then
13035 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
13036 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13037 else
13038 haveit=
13039 for x in $ltrpathdirs; do
13040 if test "X$x" = "X$found_dir"; then
13041 haveit=yes
13042 break
13043 fi
13044 done
13045 if test -z "$haveit"; then
13046 ltrpathdirs="$ltrpathdirs $found_dir"
13047 fi
13048 if test "$hardcode_direct" = yes; then
13049 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13050 else
13051 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
13052 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13053 haveit=
13054 for x in $rpathdirs; do
13055 if test "X$x" = "X$found_dir"; then
13056 haveit=yes
13057 break
13058 fi
13059 done
13060 if test -z "$haveit"; then
13061 rpathdirs="$rpathdirs $found_dir"
13062 fi
13063 else
13064 haveit=
13065 for x in $LDFLAGS $LIBLZMA; do
13066
13067 acl_save_prefix="$prefix"
13068 prefix="$acl_final_prefix"
13069 acl_save_exec_prefix="$exec_prefix"
13070 exec_prefix="$acl_final_exec_prefix"
13071 eval x=\"$x\"
13072 exec_prefix="$acl_save_exec_prefix"
13073 prefix="$acl_save_prefix"
13074
13075 if test "X$x" = "X-L$found_dir"; then
13076 haveit=yes
13077 break
13078 fi
13079 done
13080 if test -z "$haveit"; then
13081 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
13082 fi
13083 if test "$hardcode_minus_L" != no; then
13084 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
13085 else
13086 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13087 fi
13088 fi
13089 fi
13090 fi
13091 else
13092 if test "X$found_a" != "X"; then
13093 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
13094 else
13095 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
13096 fi
13097 fi
13098 additional_includedir=
13099 case "$found_dir" in
13100 */lib | */lib/)
13101 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
13102 additional_includedir="$basedir/include"
13103 ;;
13104 esac
13105 if test "X$additional_includedir" != "X"; then
13106 if test "X$additional_includedir" != "X/usr/include"; then
13107 haveit=
13108 if test "X$additional_includedir" = "X/usr/local/include"; then
13109 if test -n "$GCC"; then
13110 case $host_os in
13111 linux*) haveit=yes;;
13112 esac
13113 fi
13114 fi
13115 if test -z "$haveit"; then
13116 for x in $CPPFLAGS $INCLZMA; do
13117
13118 acl_save_prefix="$prefix"
13119 prefix="$acl_final_prefix"
13120 acl_save_exec_prefix="$exec_prefix"
13121 exec_prefix="$acl_final_exec_prefix"
13122 eval x=\"$x\"
13123 exec_prefix="$acl_save_exec_prefix"
13124 prefix="$acl_save_prefix"
13125
13126 if test "X$x" = "X-I$additional_includedir"; then
13127 haveit=yes
13128 break
13129 fi
13130 done
13131 if test -z "$haveit"; then
13132 if test -d "$additional_includedir"; then
13133 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
13134 fi
13135 fi
13136 fi
13137 fi
13138 fi
13139 if test -n "$found_la"; then
13140 save_libdir="$libdir"
13141 case "$found_la" in
13142 */* | *\\*) . "$found_la" ;;
13143 *) . "./$found_la" ;;
13144 esac
13145 libdir="$save_libdir"
13146 for dep in $dependency_libs; do
13147 case "$dep" in
13148 -L*)
13149 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13150 if test "X$additional_libdir" != "X/usr/lib"; then
13151 haveit=
13152 if test "X$additional_libdir" = "X/usr/local/lib"; then
13153 if test -n "$GCC"; then
13154 case $host_os in
13155 linux*) haveit=yes;;
13156 esac
13157 fi
13158 fi
13159 if test -z "$haveit"; then
13160 haveit=
13161 for x in $LDFLAGS $LIBLZMA; do
13162
13163 acl_save_prefix="$prefix"
13164 prefix="$acl_final_prefix"
13165 acl_save_exec_prefix="$exec_prefix"
13166 exec_prefix="$acl_final_exec_prefix"
13167 eval x=\"$x\"
13168 exec_prefix="$acl_save_exec_prefix"
13169 prefix="$acl_save_prefix"
13170
13171 if test "X$x" = "X-L$additional_libdir"; then
13172 haveit=yes
13173 break
13174 fi
13175 done
13176 if test -z "$haveit"; then
13177 if test -d "$additional_libdir"; then
13178 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
13179 fi
13180 fi
13181 haveit=
13182 for x in $LDFLAGS $LTLIBLZMA; do
13183
13184 acl_save_prefix="$prefix"
13185 prefix="$acl_final_prefix"
13186 acl_save_exec_prefix="$exec_prefix"
13187 exec_prefix="$acl_final_exec_prefix"
13188 eval x=\"$x\"
13189 exec_prefix="$acl_save_exec_prefix"
13190 prefix="$acl_save_prefix"
13191
13192 if test "X$x" = "X-L$additional_libdir"; then
13193 haveit=yes
13194 break
13195 fi
13196 done
13197 if test -z "$haveit"; then
13198 if test -d "$additional_libdir"; then
13199 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
13200 fi
13201 fi
13202 fi
13203 fi
13204 ;;
13205 -R*)
13206 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13207 if test "$enable_rpath" != no; then
13208 haveit=
13209 for x in $rpathdirs; do
13210 if test "X$x" = "X$dir"; then
13211 haveit=yes
13212 break
13213 fi
13214 done
13215 if test -z "$haveit"; then
13216 rpathdirs="$rpathdirs $dir"
13217 fi
13218 haveit=
13219 for x in $ltrpathdirs; do
13220 if test "X$x" = "X$dir"; then
13221 haveit=yes
13222 break
13223 fi
13224 done
13225 if test -z "$haveit"; then
13226 ltrpathdirs="$ltrpathdirs $dir"
13227 fi
13228 fi
13229 ;;
13230 -l*)
13231 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13232 ;;
13233 *.la)
13234 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13235 ;;
13236 *)
13237 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
13238 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
13239 ;;
13240 esac
13241 done
13242 fi
13243 else
13244 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
13245 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
13246 fi
13247 fi
13248 fi
13249 done
13250 done
13251 if test "X$rpathdirs" != "X"; then
13252 if test -n "$hardcode_libdir_separator"; then
13253 alldirs=
13254 for found_dir in $rpathdirs; do
13255 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
13256 done
13257 acl_save_libdir="$libdir"
13258 libdir="$alldirs"
13259 eval flag=\"$hardcode_libdir_flag_spec\"
13260 libdir="$acl_save_libdir"
13261 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13262 else
13263 for found_dir in $rpathdirs; do
13264 acl_save_libdir="$libdir"
13265 libdir="$found_dir"
13266 eval flag=\"$hardcode_libdir_flag_spec\"
13267 libdir="$acl_save_libdir"
13268 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
13269 done
13270 fi
13271 fi
13272 if test "X$ltrpathdirs" != "X"; then
13273 for found_dir in $ltrpathdirs; do
13274 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
13275 done
13276 fi
13277
13278
13279 ac_save_CPPFLAGS="$CPPFLAGS"
13280
13281 for element in $INCLZMA; do
13282 haveit=
13283 for x in $CPPFLAGS; do
13284
13285 acl_save_prefix="$prefix"
13286 prefix="$acl_final_prefix"
13287 acl_save_exec_prefix="$exec_prefix"
13288 exec_prefix="$acl_final_exec_prefix"
13289 eval x=\"$x\"
13290 exec_prefix="$acl_save_exec_prefix"
13291 prefix="$acl_save_prefix"
13292
13293 if test "X$x" = "X$element"; then
13294 haveit=yes
13295 break
13296 fi
13297 done
13298 if test -z "$haveit"; then
13299 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13300 fi
13301 done
13302
13303
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
13305$as_echo_n "checking for liblzma... " >&6; }
13306if test "${ac_cv_liblzma+set}" = set; then :
13307 $as_echo_n "(cached) " >&6
13308else
13309
13310 ac_save_LIBS="$LIBS"
13311 LIBS="$LIBS $LIBLZMA"
13312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13313/* end confdefs.h. */
13314#include "lzma.h"
13315int
13316main ()
13317{
13318lzma_index_iter iter;
13319 lzma_index_iter_init (&iter, 0);
13320 lzma_mf_is_supported (LZMA_MF_HC3);
13321 ;
13322 return 0;
13323}
13324_ACEOF
13325if ac_fn_c_try_link "$LINENO"; then :
13326 ac_cv_liblzma=yes
13327else
13328 ac_cv_liblzma=no
13329fi
13330rm -f core conftest.err conftest.$ac_objext \
13331 conftest$ac_exeext conftest.$ac_ext
13332 LIBS="$ac_save_LIBS"
13333
13334fi
13335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
13336$as_echo "$ac_cv_liblzma" >&6; }
13337 if test "$ac_cv_liblzma" = yes; then
13338 HAVE_LIBLZMA=yes
13339
13340$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13341
13342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
13343$as_echo_n "checking how to link with liblzma... " >&6; }
13344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
13345$as_echo "$LIBLZMA" >&6; }
13346 else
13347 HAVE_LIBLZMA=no
13348 CPPFLAGS="$ac_save_CPPFLAGS"
13349 LIBLZMA=
13350 LTLIBLZMA=
13351 fi
13352
13353
13354
13355
13356
13357
13358 if test "$HAVE_LIBLZMA" != yes; then
13359 if test "$with_lzma" = yes; then
13360 as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5
13361 fi
13362 fi
13363 fi
13364fi
13365
3fc11d3e
JM
13366LIBGUI="../libgui/src/libgui.a"
13367GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
13368
13369
7a292a7a 13370
3fc11d3e
JM
13371WIN32LDAPP=
13372
13373
13374
d91670b9 13375case "${host}" in
686a5eed 13376*-*-cygwin* | *-*-mingw* )
d91670b9
CV
13377 configdir="win"
13378 ;;
13379*)
13380 configdir="unix"
13381 ;;
13382esac
3fc11d3e
JM
13383
13384GDBTKLIBS=
13385if test "${enable_gdbtk}" = "yes"; then
13386
d1c3b63a
KS
13387 # Gdbtk must have an absolute path to srcdir in order to run
13388 # properly when not installed.
13389 here=`pwd`
13390 cd ${srcdir}
13391 GDBTK_SRC_DIR=`pwd`
13392 cd $here
13393
bec39cab 13394
5062cc19
KS
13395 #
13396 # Ok, lets find the tcl configuration
13397 # First, look for one uninstalled.
13398 # the alternative search directory is invoked by --with-tcl
13399 #
3fc11d3e 13400
5062cc19
KS
13401 if test x"${no_tcl}" = x ; then
13402 # we reset no_tcl in case something fails here
13403 no_tcl=true
bec39cab 13404
81ecdfbb
RW
13405# Check whether --with-tcl was given.
13406if test "${with_tcl+set}" = set; then :
13407 withval=$with_tcl; with_tclconfig=${withval}
13408fi
13409
13410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
13411$as_echo_n "checking for Tcl configuration... " >&6; }
13412 if test "${ac_cv_c_tclconfig+set}" = set; then :
13413 $as_echo_n "(cached) " >&6
3fc11d3e 13414else
bec39cab 13415
3fc11d3e 13416
5062cc19
KS
13417 # First check to see if --with-tcl was specified.
13418 case "${host}" in
13419 *-*-cygwin*) platDir="win" ;;
13420 *) platDir="unix" ;;
13421 esac
13422 if test x"${with_tclconfig}" != x ; then
13423 if test -f "${with_tclconfig}/tclConfig.sh" ; then
13424 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
13425 else
81ecdfbb 13426 as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
13427 fi
13428 fi
13429
13430 # then check for a private Tcl installation
13431 if test x"${ac_cv_c_tclconfig}" = x ; then
13432 for i in \
13433 ../tcl \
13434 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13435 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
13436 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
13437 ../../tcl \
13438 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13439 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
13440 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
13441 ../../../tcl \
13442 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13443 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
13444 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
13445 if test -f "$i/$platDir/tclConfig.sh" ; then
13446 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13447 break
13448 fi
13449 done
13450 fi
13451
13452 # on Darwin, check in Framework installation locations
13453 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
13454 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13455 `ls -d /Library/Frameworks 2>/dev/null` \
13456 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13457 `ls -d /System/Library/Frameworks 2>/dev/null` \
13458 ; do
13459 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
13460 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
13461 break
13462 fi
13463 done
13464 fi
13465
13466 # check in a few common install locations
13467 if test x"${ac_cv_c_tclconfig}" = x ; then
13468 for i in `ls -d ${libdir} 2>/dev/null` \
13469 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13470 `ls -d ${prefix}/lib 2>/dev/null` \
13471 `ls -d /usr/local/lib 2>/dev/null` \
13472 `ls -d /usr/contrib/lib 2>/dev/null` \
13473 `ls -d /usr/lib 2>/dev/null` \
13474 ; do
13475 if test -f "$i/tclConfig.sh" ; then
13476 ac_cv_c_tclconfig=`(cd $i; pwd)`
13477 break
13478 fi
13479 done
13480 fi
3fc11d3e 13481
5062cc19
KS
13482 # check in a few other private locations
13483 if test x"${ac_cv_c_tclconfig}" = x ; then
13484 for i in \
13485 ${srcdir}/../tcl \
13486 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
13487 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
13488 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
13489 if test -f "$i/$platDir/tclConfig.sh" ; then
13490 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
13491 break
13492 fi
13493 done
13494 fi
bec39cab 13495
3fc11d3e
JM
13496fi
13497
5062cc19
KS
13498
13499 if test x"${ac_cv_c_tclconfig}" = x ; then
13500 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
13502$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
13503 else
13504 no_tcl=
13505 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
13507$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
13508 fi
13509 fi
3fc11d3e 13510
bec39cab 13511
85541719
DE
13512 # If $no_tk is nonempty, then we can't do Tk, and there is no
13513 # point to doing Tcl.
bec39cab 13514
5062cc19
KS
13515 #
13516 # Ok, lets find the tk configuration
13517 # First, look for one uninstalled.
13518 # the alternative search directory is invoked by --with-tk
13519 #
3fc11d3e 13520
5062cc19
KS
13521 if test x"${no_tk}" = x ; then
13522 # we reset no_tk in case something fails here
13523 no_tk=true
bec39cab 13524
81ecdfbb
RW
13525# Check whether --with-tk was given.
13526if test "${with_tk+set}" = set; then :
13527 withval=$with_tk; with_tkconfig=${withval}
13528fi
13529
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
13531$as_echo_n "checking for Tk configuration... " >&6; }
13532 if test "${ac_cv_c_tkconfig+set}" = set; then :
13533 $as_echo_n "(cached) " >&6
bec39cab 13534else
3fc11d3e
JM
13535
13536
5062cc19
KS
13537 # First check to see if --with-tkconfig was specified.
13538 if test x"${with_tkconfig}" != x ; then
13539 if test -f "${with_tkconfig}/tkConfig.sh" ; then
13540 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
13541 else
81ecdfbb 13542 as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
13543 fi
13544 fi
3fc11d3e 13545
5062cc19
KS
13546 # then check for a private Tk library
13547 case "${host}" in
13548 *-*-cygwin*) platDir="win" ;;
13549 *) platDir="unix" ;;
13550 esac
13551 if test x"${ac_cv_c_tkconfig}" = x ; then
13552 for i in \
13553 ../tk \
13554 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13555 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
13556 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
13557 ../../tk \
13558 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13559 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
13560 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
13561 ../../../tk \
13562 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13563 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
13564 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
13565 if test -f "$i/$platDir/tkConfig.sh" ; then
13566 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13567 break
13568 fi
13569 done
13570 fi
13571
13572 # on Darwin, check in Framework installation locations
13573 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
13574 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
13575 `ls -d /Library/Frameworks 2>/dev/null` \
13576 `ls -d /Network/Library/Frameworks 2>/dev/null` \
13577 `ls -d /System/Library/Frameworks 2>/dev/null` \
13578 ; do
13579 if test -f "$i/Tk.framework/tkConfig.sh" ; then
13580 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
13581 break
13582 fi
13583 done
13584 fi
13585
13586 # check in a few common install locations
13587 if test x"${ac_cv_c_tkconfig}" = x ; then
13588 for i in `ls -d ${libdir} 2>/dev/null` \
13589 `ls -d ${exec_prefix}/lib 2>/dev/null` \
13590 `ls -d ${prefix}/lib 2>/dev/null` \
13591 `ls -d /usr/local/lib 2>/dev/null` \
13592 `ls -d /usr/contrib/lib 2>/dev/null` \
13593 `ls -d /usr/lib 2>/dev/null` \
13594 ; do
13595 if test -f "$i/tkConfig.sh" ; then
13596 ac_cv_c_tkconfig=`(cd $i; pwd)`
13597 break
13598 fi
13599 done
13600 fi
13601 # check in a few other private locations
13602 if test x"${ac_cv_c_tkconfig}" = x ; then
13603 for i in \
13604 ${srcdir}/../tk \
13605 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
13606 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
13607 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
13608 if test -f "$i/$platDir/tkConfig.sh" ; then
13609 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
13610 break
13611 fi
13612 done
13613 fi
3fc11d3e 13614
3fc11d3e
JM
13615fi
13616
13617
5062cc19
KS
13618 if test x"${ac_cv_c_tkconfig}" = x ; then
13619 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
13620 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
13621$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
13622 else
13623 no_tk=
13624 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
13625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
13626$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 13627 fi
3fc11d3e 13628 fi
dd2504ab 13629
dd2504ab 13630
85541719
DE
13631 if test -z "${no_tcl}" -a -z "${no_tk}"; then
13632
81ecdfbb
RW
13633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
13634$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
13635
13636 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13638$as_echo "loading" >&6; }
85541719
DE
13639 . ${TCL_BIN_DIR}/tclConfig.sh
13640 else
81ecdfbb
RW
13641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
13642$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
13643 fi
13644
13645 # eval is required to do the TCL_DBGX substitution
13646 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
13647 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
13648
13649 # If the TCL_BIN_DIR is the build directory (not the install directory),
13650 # then set the common variable name to the value of the build variables.
13651 # For example, the variable TCL_LIB_SPEC will be set to the value
13652 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
13653 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
13654 # installed and uninstalled version of Tcl.
13655 if test -f "${TCL_BIN_DIR}/Makefile" ; then
13656 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
13657 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
13658 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
13659 elif test "`uname -s`" = "Darwin"; then
13660 # If Tcl was built as a framework, attempt to use the libraries
13661 # from the framework at the given location so that linking works
a68ffae9 13662 # against Tcl.framework installed in an arbitrary location.
85541719
DE
13663 case ${TCL_DEFS} in
13664 *TCL_FRAMEWORK*)
13665 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
13666 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
13667 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
13668 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
13669 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
13670 break
13671 fi
13672 done
13673 fi
13674 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
13675 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
13676 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
13677 fi
13678 ;;
13679 esac
13680 fi
13681
13682 # eval is required to do the TCL_DBGX substitution
13683 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
13684 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
13685 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
13686 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702 # Check for in-tree tcl
13703 here=`pwd`
13704 cd ${srcdir}/..
13705 topdir=`pwd`
13706 cd ${here}
13707
13708 intree="no"
13709 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
13710 intree="yes"
13711 fi
13712
13713 # Find Tcl private headers
13714 if test x"${intree}" = xno; then
13715
81ecdfbb
RW
13716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
13717$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
13718 private_dir=""
13719 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
13720 if test -f ${dir}/tclInt.h ; then
13721 private_dir=${dir}
13722 fi
13723
13724 if test x"${private_dir}" = x; then
81ecdfbb 13725 as_fn_error "could not find private Tcl headers" "$LINENO" 5
85541719
DE
13726 else
13727 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13729$as_echo "${private_dir}" >&6; }
85541719
DE
13730 fi
13731
13732 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
13733 TCL_LIBRARY="${TCL_LIB_SPEC}"
13734 TCL_DEPS=""
13735 else
13736 # If building tcl in the same src tree, private headers
13737 # are not needed, but we need to be sure to use the right
13738 # headers library
13739 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
13740 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
13741 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
13742 fi
13743
13744
13745
13746
13747
81ecdfbb
RW
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
13749$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 13750
5062cc19 13751 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
13753$as_echo "loading" >&6; }
5062cc19 13754 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 13755 else
81ecdfbb
RW
13756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
13757$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 13758 fi
bec39cab 13759
5062cc19
KS
13760 # eval is required to do the TK_DBGX substitution
13761 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
13762 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
13763
13764 # If the TK_BIN_DIR is the build directory (not the install directory),
13765 # then set the common variable name to the value of the build variables.
13766 # For example, the variable TK_LIB_SPEC will be set to the value
13767 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
13768 # instead of TK_BUILD_LIB_SPEC since it will work with both an
13769 # installed and uninstalled version of Tcl.
85541719 13770 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
13771 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
13772 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
13773 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
13774 elif test "`uname -s`" = "Darwin"; then
13775 # If Tk was built as a framework, attempt to use the libraries
13776 # from the framework at the given location so that linking works
a68ffae9 13777 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
13778 case ${TK_DEFS} in
13779 *TK_FRAMEWORK*)
85541719 13780 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
13781 for i in "`cd ${TK_BIN_DIR}; pwd`" \
13782 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
13783 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
13784 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
13785 break
13786 fi
13787 done
13788 fi
85541719 13789 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
13790 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
13791 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
13792 fi
13793 ;;
13794 esac
3fc11d3e
JM
13795 fi
13796
5062cc19
KS
13797 # eval is required to do the TK_DBGX substitution
13798 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
13799 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
13800 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
13801 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 13802
3fc11d3e
JM
13803
13804
bec39cab
AC
13805
13806
13807
13808
13809
13810
13811
3fc11d3e 13812
3fc11d3e 13813
bec39cab 13814
bec39cab 13815
85541719
DE
13816 # Check for in-tree Tk
13817 intree="no"
13818 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
13819 intree="yes"
13820 fi
3fc11d3e 13821
85541719
DE
13822 # Find Tk private headers
13823 if test x"${intree}" = xno; then
3fc11d3e 13824
81ecdfbb
RW
13825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
13826$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
13827 private_dir=""
13828 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
13829 if test -f ${dir}/tkInt.h; then
13830 private_dir=${dir}
3fc11d3e 13831 fi
bec39cab 13832
5062cc19 13833 if test x"${private_dir}" = x; then
81ecdfbb 13834 as_fn_error "could not find Tk private headers" "$LINENO" 5
3fc11d3e 13835 else
5062cc19 13836 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
13837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
13838$as_echo "${private_dir}" >&6; }
3fc11d3e 13839 fi
3fc11d3e 13840
85541719
DE
13841 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
13842 TK_LIBRARY=${TK_LIB_SPEC}
13843 TK_DEPS=""
13844 else
13845 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
13846 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
13847 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
13848 fi
3fc11d3e
JM
13849
13850
3fc11d3e
JM
13851
13852
3fc11d3e 13853
85541719 13854 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 13855
85541719
DE
13856 # Include some libraries that Tcl and Tk want.
13857 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
13858 # Yes, the ordering seems wrong here. But it isn't.
13859 # TK_LIBS is the list of libraries that need to be linked
13860 # after Tcl/Tk. Note that this isn't put into LIBS. If it
13861 # were in LIBS then any link tests after this point would
13862 # try to include things like `$(LIBGUI)', which wouldn't work.
13863 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 13864
85541719
DE
13865 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
13866 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
13867 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
13868 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
13869 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
13870 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
13871 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 13872
85541719
DE
13873 if test x$gdb_cv_os_cygwin = xyes; then
13874 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
13875 WIN32LDAPP="-Wl,--subsystem,console"
13876 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 13877 fi
ffc6a242 13878
81ecdfbb 13879 subdirs="$subdirs gdbtk"
3ace7edb 13880
85541719 13881 fi
3fc11d3e
JM
13882fi
13883
13884
13885
13886
13887
13888
13889
13890
81ecdfbb
RW
13891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
13892$as_echo_n "checking for X... " >&6; }
bec39cab 13893
c906108c 13894
81ecdfbb
RW
13895# Check whether --with-x was given.
13896if test "${with_x+set}" = set; then :
13897 withval=$with_x;
13898fi
c906108c
SS
13899
13900# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
13901if test "x$with_x" = xno; then
13902 # The user explicitly disabled X.
13903 have_x=disabled
13904else
81ecdfbb
RW
13905 case $x_includes,$x_libraries in #(
13906 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
13907 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
13908 $as_echo_n "(cached) " >&6
c906108c
SS
13909else
13910 # One or both of the vars are not set, and there is no cached value.
bec39cab 13911ac_x_includes=no ac_x_libraries=no
81ecdfbb 13912rm -f -r conftest.dir
bec39cab
AC
13913if mkdir conftest.dir; then
13914 cd conftest.dir
bec39cab 13915 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
13916incroot:
13917 @echo incroot='${INCROOT}'
13918usrlibdir:
13919 @echo usrlibdir='${USRLIBDIR}'
13920libdir:
13921 @echo libdir='${LIBDIR}'
13922_ACEOF
13923 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c 13924 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
81ecdfbb
RW
13925 for ac_var in incroot usrlibdir libdir; do
13926 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
13927 done
c906108c 13928 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
13929 for ac_extension in a so sl dylib la dll; do
13930 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
13931 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 13932 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
13933 fi
13934 done
13935 # Screen out bogus values from the imake configuration. They are
13936 # bogus both because they are the default anyway, and because
13937 # using them would break gcc on systems where it needs fixed includes.
bec39cab 13938 case $ac_im_incroot in
81ecdfbb 13939 /usr/include) ac_x_includes= ;;
bec39cab 13940 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 13941 esac
bec39cab 13942 case $ac_im_usrlibdir in
81ecdfbb 13943 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 13944 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
13945 esac
13946 fi
13947 cd ..
81ecdfbb 13948 rm -f -r conftest.dir
c906108c
SS
13949fi
13950
bec39cab
AC
13951# Standard set of common directories for X headers.
13952# Check X11 before X11Rn because it is often a symlink to the current release.
13953ac_x_header_dirs='
13954/usr/X11/include
81ecdfbb 13955/usr/X11R7/include
bec39cab
AC
13956/usr/X11R6/include
13957/usr/X11R5/include
13958/usr/X11R4/include
13959
13960/usr/include/X11
81ecdfbb 13961/usr/include/X11R7
bec39cab
AC
13962/usr/include/X11R6
13963/usr/include/X11R5
13964/usr/include/X11R4
13965
13966/usr/local/X11/include
81ecdfbb 13967/usr/local/X11R7/include
bec39cab
AC
13968/usr/local/X11R6/include
13969/usr/local/X11R5/include
13970/usr/local/X11R4/include
13971
13972/usr/local/include/X11
81ecdfbb 13973/usr/local/include/X11R7
bec39cab
AC
13974/usr/local/include/X11R6
13975/usr/local/include/X11R5
13976/usr/local/include/X11R4
13977
13978/usr/X386/include
13979/usr/x386/include
13980/usr/XFree86/include/X11
13981
13982/usr/include
13983/usr/local/include
13984/usr/unsupported/include
13985/usr/athena/include
13986/usr/local/x11r5/include
13987/usr/lpp/Xamples/include
13988
13989/usr/openwin/include
13990/usr/openwin/share/include'
13991
13992if test "$ac_x_includes" = no; then
81ecdfbb 13993 # Guess where to find include files, by looking for Xlib.h.
c906108c 13994 # First, try using that file with no special directory specified.
81ecdfbb 13995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13996/* end confdefs.h. */
81ecdfbb 13997#include <X11/Xlib.h>
bec39cab 13998_ACEOF
81ecdfbb 13999if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
14000 # We can compile using X headers with no special include directory.
14001ac_x_includes=
14002else
bec39cab 14003 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 14004 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
14005 ac_x_includes=$ac_dir
14006 break
14007 fi
14008done
c906108c 14009fi
bec39cab
AC
14010rm -f conftest.err conftest.$ac_ext
14011fi # $ac_x_includes = no
c906108c 14012
bec39cab 14013if test "$ac_x_libraries" = no; then
c906108c 14014 # Check for the libraries.
c906108c
SS
14015 # See if we find them without any special options.
14016 # Don't add to $LIBS permanently.
bec39cab 14017 ac_save_LIBS=$LIBS
81ecdfbb
RW
14018 LIBS="-lX11 $LIBS"
14019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14020/* end confdefs.h. */
81ecdfbb 14021#include <X11/Xlib.h>
bec39cab
AC
14022int
14023main ()
14024{
81ecdfbb 14025XrmInitialize ()
bec39cab
AC
14026 ;
14027 return 0;
14028}
14029_ACEOF
81ecdfbb 14030if ac_fn_c_try_link "$LINENO"; then :
bec39cab 14031 LIBS=$ac_save_LIBS
c906108c
SS
14032# We can link X programs with no special library path.
14033ac_x_libraries=
14034else
81ecdfbb
RW
14035 LIBS=$ac_save_LIBS
14036for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 14037do
bec39cab 14038 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
14039 for ac_extension in a so sl dylib la dll; do
14040 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
14041 ac_x_libraries=$ac_dir
14042 break 2
14043 fi
14044 done
14045done
14046fi
81ecdfbb
RW
14047rm -f core conftest.err conftest.$ac_objext \
14048 conftest$ac_exeext conftest.$ac_ext
bec39cab 14049fi # $ac_x_libraries = no
c906108c 14050
81ecdfbb
RW
14051case $ac_x_includes,$ac_x_libraries in #(
14052 no,* | *,no | *\'*)
14053 # Didn't find X, or a directory has "'" in its name.
14054 ac_cv_have_x="have_x=no";; #(
14055 *)
14056 # Record where we found X for the cache.
14057 ac_cv_have_x="have_x=yes\
14058 ac_x_includes='$ac_x_includes'\
14059 ac_x_libraries='$ac_x_libraries'"
14060esac
c906108c 14061fi
81ecdfbb
RW
14062;; #(
14063 *) have_x=yes;;
14064 esac
c906108c
SS
14065 eval "$ac_cv_have_x"
14066fi # $with_x != no
14067
14068if test "$have_x" != yes; then
81ecdfbb
RW
14069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
14070$as_echo "$have_x" >&6; }
c906108c
SS
14071 no_x=yes
14072else
14073 # If each of the values was on the command line, it overrides each guess.
14074 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
14075 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
14076 # Update the cache value to reflect the command line values.
81ecdfbb
RW
14077 ac_cv_have_x="have_x=yes\
14078 ac_x_includes='$x_includes'\
14079 ac_x_libraries='$x_libraries'"
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
14081$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
14082fi
14083
14084
bec39cab 14085# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 14086# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
14087# This code just checks for a few cases where we'd like to ignore those
14088# definitions, even when they're present in the '.mt' file. These cases
14089# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 14090# not part of the source tree.
7a292a7a 14091#
81ecdfbb
RW
14092# Check whether --enable-sim was given.
14093if test "${enable_sim+set}" = set; then :
14094 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
14095 echo "enableval = ${enableval}";
14096 case "${enableval}" in
14097 yes) ignore_sim=false ;;
14098 no) ignore_sim=true ;;
14099 *) ignore_sim=false ;;
14100 esac
14101else
14102 ignore_sim=false
81ecdfbb
RW
14103fi
14104
7a292a7a
SS
14105
14106if test ! -d "${srcdir}/../sim"; then
14107 ignore_sim=true
14108fi
14109
9b624dbe
UW
14110SIM=
14111SIM_OBS=
14112if test "${ignore_sim}" = "false"; then
14113 if test x"${gdb_sim}" != x ; then
14114 SIM="${gdb_sim}"
14115 SIM_OBS="remote-sim.o"
60ca704f 14116
81ecdfbb 14117$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 14118
9b624dbe 14119 fi
7a292a7a
SS
14120fi
14121
14122
14123
c906108c
SS
14124
14125
14126
14127
14128
14129
dfcd3bfb 14130
e56ac5c3
AC
14131
14132
b3a90332
AC
14133
14134
c35f4ffc 14135# List of host floatformats.
bec39cab
AC
14136
14137cat >>confdefs.h <<_ACEOF
c35f4ffc 14138#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 14139_ACEOF
c35f4ffc 14140
bec39cab
AC
14141
14142cat >>confdefs.h <<_ACEOF
c35f4ffc 14143#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
14144_ACEOF
14145
c35f4ffc 14146
bec39cab 14147cat >>confdefs.h <<_ACEOF
c35f4ffc 14148#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 14149_ACEOF
c35f4ffc
AC
14150
14151
c906108c
SS
14152# target_subdir is used by the testsuite to find the target libraries.
14153target_subdir=
14154if test "${host}" != "${target}"; then
14155 target_subdir="${target_alias}/"
14156fi
14157
14158
14159frags=
771b4502 14160if test "${gdb_native}" = "yes"; then
0dad8a66
MK
14161 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
14162 if test ! -f ${host_makefile_frag}; then
81ecdfbb 14163 as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5
0dad8a66
MK
14164 fi
14165 frags="$frags $host_makefile_frag"
14166else
14167 host_makefile_frag=/dev/null
c906108c 14168fi
c906108c 14169
c906108c
SS
14170
14171
14172
771b4502 14173if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
14174# We pick this up from the host configuration file (.mh) because we
14175# do not have a native configuration Makefile fragment.
c906108c
SS
14176nativefile=`sed -n '
14177s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
14178' ${host_makefile_frag}`
c906108c
SS
14179fi
14180
14181
b00a8037 14182if test x"${gdb_osabi}" != x ; then
bec39cab
AC
14183
14184cat >>confdefs.h <<_ACEOF
b00a8037 14185#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 14186_ACEOF
b00a8037
DJ
14187
14188fi
14189
8dcde887 14190# Enable multi-ice-gdb-server.
81ecdfbb
RW
14191# Check whether --enable-multi-ice was given.
14192if test "${enable_multi_ice+set}" = set; then :
14193 enableval=$enable_multi_ice; case $enableval in
8dcde887
MK
14194 yes | no)
14195 ;;
81ecdfbb 14196 *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
8dcde887 14197 esac
81ecdfbb 14198fi
b4e70030 14199
81ecdfbb
RW
14200if test "x$enable_multi_ice" = xyes; then
14201 subdirs="$subdirs multi-ice"
3ace7edb 14202
a85f51e7
DJ
14203fi
14204
496c0e1b
JB
14205# Check whether --enable-gdbserver was given.
14206if test "${enable_gdbserver+set}" = set; then :
14207 enableval=$enable_gdbserver; case "${enableval}" in
14208 yes| no|auto) ;;
14209 *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
14210esac
14211else
14212 enable_gdbserver=auto
14213fi
14214
14215
14216# We only build gdbserver automatically in a native configuration, and
14217# only if the user did not explicitly disable its build.
14218if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
81ecdfbb
RW
14219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
14220$as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
8dcde887 14221 if test "x$build_gdbserver" = xyes; then
81ecdfbb
RW
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14223$as_echo "yes" >&6; }
14224 subdirs="$subdirs gdbserver"
3ace7edb 14225
496c0e1b 14226 gdbserver_build_enabled=yes
8dcde887 14227 else
81ecdfbb
RW
14228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14229$as_echo "no" >&6; }
8dcde887
MK
14230 fi
14231fi
14232
496c0e1b
JB
14233# If the user explicitly request the gdbserver to be built, verify that
14234# we were in fact able to enable it.
14235if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
14236 as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
14237fi
14238
393fd4c3
YQ
14239# Check for babeltrace and babeltrace-ctf
14240
14241# Check whether --with-babeltrace was given.
14242if test "${with_babeltrace+set}" = set; then :
14243 withval=$with_babeltrace;
14244else
14245 with_babeltrace=auto
14246fi
14247
14248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
14249$as_echo_n "checking whether to use babeltrace... " >&6; }
14250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
14251$as_echo "$with_babeltrace" >&6; }
14252
14253if test "x$with_babeltrace" = "xno"; then
14254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
14255$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
14256else
14257 # Append -Werror to CFLAGS so that configure can catch the warning
14258 # "assignment from incompatible pointer type", which is related to
14259 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
14260 # in GDB, while babeltrace 1.0.3 is broken.
14261 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
14262 # safe to save and restore CFLAGS here.
14263 saved_CFLAGS=$CFLAGS
14264 CFLAGS="$CFLAGS -Werror"
14265
14266
14267
14268
14269
14270
14271
14272
14273 use_additional=yes
14274
14275 acl_save_prefix="$prefix"
14276 prefix="$acl_final_prefix"
14277 acl_save_exec_prefix="$exec_prefix"
14278 exec_prefix="$acl_final_exec_prefix"
14279
14280 eval additional_includedir=\"$includedir\"
14281 eval additional_libdir=\"$libdir\"
14282
14283 exec_prefix="$acl_save_exec_prefix"
14284 prefix="$acl_save_prefix"
14285
14286
14287# Check whether --with-libbabeltrace-prefix was given.
14288if test "${with_libbabeltrace_prefix+set}" = set; then :
14289 withval=$with_libbabeltrace_prefix;
14290 if test "X$withval" = "Xno"; then
14291 use_additional=no
14292 else
14293 if test "X$withval" = "X"; then
14294
14295 acl_save_prefix="$prefix"
14296 prefix="$acl_final_prefix"
14297 acl_save_exec_prefix="$exec_prefix"
14298 exec_prefix="$acl_final_exec_prefix"
14299
14300 eval additional_includedir=\"$includedir\"
14301 eval additional_libdir=\"$libdir\"
14302
14303 exec_prefix="$acl_save_exec_prefix"
14304 prefix="$acl_save_prefix"
14305
14306 else
14307 additional_includedir="$withval/include"
14308 additional_libdir="$withval/lib"
14309 fi
14310 fi
14311
14312fi
14313
14314 LIBBABELTRACE=
14315 LTLIBBABELTRACE=
14316 INCBABELTRACE=
14317 rpathdirs=
14318 ltrpathdirs=
14319 names_already_handled=
14320 names_next_round='babeltrace babeltrace-ctf'
14321 while test -n "$names_next_round"; do
14322 names_this_round="$names_next_round"
14323 names_next_round=
14324 for name in $names_this_round; do
14325 already_handled=
14326 for n in $names_already_handled; do
14327 if test "$n" = "$name"; then
14328 already_handled=yes
14329 break
14330 fi
14331 done
14332 if test -z "$already_handled"; then
14333 names_already_handled="$names_already_handled $name"
14334 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14335 eval value=\"\$HAVE_LIB$uppername\"
14336 if test -n "$value"; then
14337 if test "$value" = yes; then
14338 eval value=\"\$LIB$uppername\"
14339 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
14340 eval value=\"\$LTLIB$uppername\"
14341 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
14342 else
14343 :
14344 fi
14345 else
14346 found_dir=
14347 found_la=
14348 found_so=
14349 found_a=
14350 if test $use_additional = yes; then
14351 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14352 found_dir="$additional_libdir"
14353 found_so="$additional_libdir/lib$name.$shlibext"
14354 if test -f "$additional_libdir/lib$name.la"; then
14355 found_la="$additional_libdir/lib$name.la"
14356 fi
14357 else
14358 if test -f "$additional_libdir/lib$name.$libext"; then
14359 found_dir="$additional_libdir"
14360 found_a="$additional_libdir/lib$name.$libext"
14361 if test -f "$additional_libdir/lib$name.la"; then
14362 found_la="$additional_libdir/lib$name.la"
14363 fi
14364 fi
14365 fi
14366 fi
14367 if test "X$found_dir" = "X"; then
14368 for x in $LDFLAGS $LTLIBBABELTRACE; do
14369
14370 acl_save_prefix="$prefix"
14371 prefix="$acl_final_prefix"
14372 acl_save_exec_prefix="$exec_prefix"
14373 exec_prefix="$acl_final_exec_prefix"
14374 eval x=\"$x\"
14375 exec_prefix="$acl_save_exec_prefix"
14376 prefix="$acl_save_prefix"
14377
14378 case "$x" in
14379 -L*)
14380 dir=`echo "X$x" | sed -e 's/^X-L//'`
14381 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14382 found_dir="$dir"
14383 found_so="$dir/lib$name.$shlibext"
14384 if test -f "$dir/lib$name.la"; then
14385 found_la="$dir/lib$name.la"
14386 fi
14387 else
14388 if test -f "$dir/lib$name.$libext"; then
14389 found_dir="$dir"
14390 found_a="$dir/lib$name.$libext"
14391 if test -f "$dir/lib$name.la"; then
14392 found_la="$dir/lib$name.la"
14393 fi
14394 fi
14395 fi
14396 ;;
14397 esac
14398 if test "X$found_dir" != "X"; then
14399 break
14400 fi
14401 done
14402 fi
14403 if test "X$found_dir" != "X"; then
14404 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
14405 if test "X$found_so" != "X"; then
14406 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14407 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14408 else
14409 haveit=
14410 for x in $ltrpathdirs; do
14411 if test "X$x" = "X$found_dir"; then
14412 haveit=yes
14413 break
14414 fi
14415 done
14416 if test -z "$haveit"; then
14417 ltrpathdirs="$ltrpathdirs $found_dir"
14418 fi
14419 if test "$hardcode_direct" = yes; then
14420 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14421 else
14422 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14423 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14424 haveit=
14425 for x in $rpathdirs; do
14426 if test "X$x" = "X$found_dir"; then
14427 haveit=yes
14428 break
14429 fi
14430 done
14431 if test -z "$haveit"; then
14432 rpathdirs="$rpathdirs $found_dir"
14433 fi
14434 else
14435 haveit=
14436 for x in $LDFLAGS $LIBBABELTRACE; do
14437
14438 acl_save_prefix="$prefix"
14439 prefix="$acl_final_prefix"
14440 acl_save_exec_prefix="$exec_prefix"
14441 exec_prefix="$acl_final_exec_prefix"
14442 eval x=\"$x\"
14443 exec_prefix="$acl_save_exec_prefix"
14444 prefix="$acl_save_prefix"
14445
14446 if test "X$x" = "X-L$found_dir"; then
14447 haveit=yes
14448 break
14449 fi
14450 done
14451 if test -z "$haveit"; then
14452 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
14453 fi
14454 if test "$hardcode_minus_L" != no; then
14455 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
14456 else
14457 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14458 fi
14459 fi
14460 fi
14461 fi
14462 else
14463 if test "X$found_a" != "X"; then
14464 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
14465 else
14466 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
14467 fi
14468 fi
14469 additional_includedir=
14470 case "$found_dir" in
14471 */lib | */lib/)
14472 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14473 additional_includedir="$basedir/include"
14474 ;;
14475 esac
14476 if test "X$additional_includedir" != "X"; then
14477 if test "X$additional_includedir" != "X/usr/include"; then
14478 haveit=
14479 if test "X$additional_includedir" = "X/usr/local/include"; then
14480 if test -n "$GCC"; then
14481 case $host_os in
14482 linux*) haveit=yes;;
14483 esac
14484 fi
14485 fi
14486 if test -z "$haveit"; then
14487 for x in $CPPFLAGS $INCBABELTRACE; do
14488
14489 acl_save_prefix="$prefix"
14490 prefix="$acl_final_prefix"
14491 acl_save_exec_prefix="$exec_prefix"
14492 exec_prefix="$acl_final_exec_prefix"
14493 eval x=\"$x\"
14494 exec_prefix="$acl_save_exec_prefix"
14495 prefix="$acl_save_prefix"
14496
14497 if test "X$x" = "X-I$additional_includedir"; then
14498 haveit=yes
14499 break
14500 fi
14501 done
14502 if test -z "$haveit"; then
14503 if test -d "$additional_includedir"; then
14504 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
14505 fi
14506 fi
14507 fi
14508 fi
14509 fi
14510 if test -n "$found_la"; then
14511 save_libdir="$libdir"
14512 case "$found_la" in
14513 */* | *\\*) . "$found_la" ;;
14514 *) . "./$found_la" ;;
14515 esac
14516 libdir="$save_libdir"
14517 for dep in $dependency_libs; do
14518 case "$dep" in
14519 -L*)
14520 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14521 if test "X$additional_libdir" != "X/usr/lib"; then
14522 haveit=
14523 if test "X$additional_libdir" = "X/usr/local/lib"; then
14524 if test -n "$GCC"; then
14525 case $host_os in
14526 linux*) haveit=yes;;
14527 esac
14528 fi
14529 fi
14530 if test -z "$haveit"; then
14531 haveit=
14532 for x in $LDFLAGS $LIBBABELTRACE; do
14533
14534 acl_save_prefix="$prefix"
14535 prefix="$acl_final_prefix"
14536 acl_save_exec_prefix="$exec_prefix"
14537 exec_prefix="$acl_final_exec_prefix"
14538 eval x=\"$x\"
14539 exec_prefix="$acl_save_exec_prefix"
14540 prefix="$acl_save_prefix"
14541
14542 if test "X$x" = "X-L$additional_libdir"; then
14543 haveit=yes
14544 break
14545 fi
14546 done
14547 if test -z "$haveit"; then
14548 if test -d "$additional_libdir"; then
14549 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
14550 fi
14551 fi
14552 haveit=
14553 for x in $LDFLAGS $LTLIBBABELTRACE; do
14554
14555 acl_save_prefix="$prefix"
14556 prefix="$acl_final_prefix"
14557 acl_save_exec_prefix="$exec_prefix"
14558 exec_prefix="$acl_final_exec_prefix"
14559 eval x=\"$x\"
14560 exec_prefix="$acl_save_exec_prefix"
14561 prefix="$acl_save_prefix"
14562
14563 if test "X$x" = "X-L$additional_libdir"; then
14564 haveit=yes
14565 break
14566 fi
14567 done
14568 if test -z "$haveit"; then
14569 if test -d "$additional_libdir"; then
14570 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
14571 fi
14572 fi
14573 fi
14574 fi
14575 ;;
14576 -R*)
14577 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14578 if test "$enable_rpath" != no; then
14579 haveit=
14580 for x in $rpathdirs; do
14581 if test "X$x" = "X$dir"; then
14582 haveit=yes
14583 break
14584 fi
14585 done
14586 if test -z "$haveit"; then
14587 rpathdirs="$rpathdirs $dir"
14588 fi
14589 haveit=
14590 for x in $ltrpathdirs; do
14591 if test "X$x" = "X$dir"; then
14592 haveit=yes
14593 break
14594 fi
14595 done
14596 if test -z "$haveit"; then
14597 ltrpathdirs="$ltrpathdirs $dir"
14598 fi
14599 fi
14600 ;;
14601 -l*)
14602 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14603 ;;
14604 *.la)
14605 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14606 ;;
14607 *)
14608 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
14609 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
14610 ;;
14611 esac
14612 done
14613 fi
14614 else
14615 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
14616 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
14617 fi
14618 fi
14619 fi
14620 done
14621 done
14622 if test "X$rpathdirs" != "X"; then
14623 if test -n "$hardcode_libdir_separator"; then
14624 alldirs=
14625 for found_dir in $rpathdirs; do
14626 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14627 done
14628 acl_save_libdir="$libdir"
14629 libdir="$alldirs"
14630 eval flag=\"$hardcode_libdir_flag_spec\"
14631 libdir="$acl_save_libdir"
14632 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14633 else
14634 for found_dir in $rpathdirs; do
14635 acl_save_libdir="$libdir"
14636 libdir="$found_dir"
14637 eval flag=\"$hardcode_libdir_flag_spec\"
14638 libdir="$acl_save_libdir"
14639 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
14640 done
14641 fi
14642 fi
14643 if test "X$ltrpathdirs" != "X"; then
14644 for found_dir in $ltrpathdirs; do
14645 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
14646 done
14647 fi
14648
14649
14650 ac_save_CPPFLAGS="$CPPFLAGS"
14651
14652 for element in $INCBABELTRACE; do
14653 haveit=
14654 for x in $CPPFLAGS; do
14655
14656 acl_save_prefix="$prefix"
14657 prefix="$acl_final_prefix"
14658 acl_save_exec_prefix="$exec_prefix"
14659 exec_prefix="$acl_final_exec_prefix"
14660 eval x=\"$x\"
14661 exec_prefix="$acl_save_exec_prefix"
14662 prefix="$acl_save_prefix"
14663
14664 if test "X$x" = "X$element"; then
14665 haveit=yes
14666 break
14667 fi
14668 done
14669 if test -z "$haveit"; then
14670 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14671 fi
14672 done
14673
14674
14675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
14676$as_echo_n "checking for libbabeltrace... " >&6; }
14677if test "${ac_cv_libbabeltrace+set}" = set; then :
14678 $as_echo_n "(cached) " >&6
14679else
14680
14681 ac_save_LIBS="$LIBS"
14682 LIBS="$LIBS $LIBBABELTRACE"
14683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14684/* end confdefs.h. */
14685#include <babeltrace/babeltrace.h>
14686 #include <babeltrace/ctf/events.h>
14687 #include <babeltrace/ctf/iterator.h>
14688int
14689main ()
14690{
14691struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
14692 struct bt_ctf_event *event = NULL;
14693 const struct bt_definition *scope;
14694
14695 scope = bt_ctf_get_top_level_scope (event,
14696 BT_STREAM_EVENT_HEADER);
14697 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
14698
14699 ;
14700 return 0;
14701}
14702_ACEOF
14703if ac_fn_c_try_link "$LINENO"; then :
14704 ac_cv_libbabeltrace=yes
14705else
14706 ac_cv_libbabeltrace=no
14707fi
14708rm -f core conftest.err conftest.$ac_objext \
14709 conftest$ac_exeext conftest.$ac_ext
14710 LIBS="$ac_save_LIBS"
14711
14712fi
14713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
14714$as_echo "$ac_cv_libbabeltrace" >&6; }
14715 if test "$ac_cv_libbabeltrace" = yes; then
14716 HAVE_LIBBABELTRACE=yes
14717
14718$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
14719
14720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
14721$as_echo_n "checking how to link with libbabeltrace... " >&6; }
14722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
14723$as_echo "$LIBBABELTRACE" >&6; }
14724 else
14725 HAVE_LIBBABELTRACE=no
14726 CPPFLAGS="$ac_save_CPPFLAGS"
14727 LIBBABELTRACE=
14728 LTLIBBABELTRACE=
14729 fi
14730
14731
14732
14733
14734
14735
14736 CFLAGS=$saved_CFLAGS
14737
14738 if test "$HAVE_LIBBABELTRACE" != yes; then
14739 if test "$with_babeltrace" = yes; then
14740 as_fn_error "babeltrace is missing or unusable" "$LINENO" 5
14741 else
14742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
14743$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
14744 fi
14745 fi
14746fi
14747
db985757 14748# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 14749# to an empty version.
c906108c
SS
14750
14751files=
14752links=
5a2402b8 14753
c906108c
SS
14754rm -f nm.h
14755if test "${nativefile}" != ""; then
0f475e27
AC
14756 case "${nativefile}" in
14757 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
14758 * ) GDB_NM_FILE="${nativefile}"
14759 esac
5a2402b8
AC
14760 files="${files} ${GDB_NM_FILE}"
14761 links="${links} nm.h"
60ca704f
SE
14762
14763cat >>confdefs.h <<_ACEOF
b78960be 14764#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 14765_ACEOF
5a2402b8 14766
c906108c 14767fi
5a2402b8
AC
14768
14769
bec39cab
AC
14770ac_sources="$files"
14771ac_dests="$links"
14772while test -n "$ac_sources"; do
14773 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14774 set $ac_sources; ac_source=$1; shift; ac_sources=$*
14775 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
14776done
81ecdfbb 14777ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
14778
14779
c906108c
SS
14780
14781
c906108c 14782
81ecdfbb 14783$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 14784
bec39cab 14785
b292c783
JK
14786# Undo the $ec_script escaping suitable for Makefile.
14787transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
14788GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"`
14789if test "x$GDB_TRANSFORM_NAME" = x; then
14790 GDB_TRANSFORM_NAME=gdb
14791fi
14792
14793GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"`
14794if test "x$GCORE_TRANSFORM_NAME" = x; then
14795 GCORE_TRANSFORM_NAME=gcore
14796fi
14797
14798ac_config_files="$ac_config_files gcore"
14799
14800
c971b7fa 14801ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
81ecdfbb
RW
14802
14803ac_config_commands="$ac_config_commands default"
89a34d1b 14804
bec39cab
AC
14805cat >confcache <<\_ACEOF
14806# This file is a shell script that caches the results of configure
14807# tests run on this system so they can be shared between configure
14808# scripts and configure runs, see configure's option --config-cache.
14809# It is not useful on other systems. If it contains results you don't
14810# want to keep, you may remove or edit it.
14811#
14812# config.status only pays attention to the cache file if you give it
14813# the --recheck option to rerun configure.
14814#
14815# `ac_cv_env_foo' variables (set or unset) will be overridden when
14816# loading this file, other *unset* `ac_cv_foo' will be assigned the
14817# following values.
14818
14819_ACEOF
14820
14821# The following way of writing the cache mishandles newlines in values,
14822# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 14823# So, we kill variables containing newlines.
bec39cab
AC
14824# Ultrix sh set writes to stderr and can't be redirected directly,
14825# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
14826(
14827 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14828 eval ac_val=\$$ac_var
14829 case $ac_val in #(
14830 *${as_nl}*)
14831 case $ac_var in #(
14832 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14833$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14834 esac
14835 case $ac_var in #(
14836 _ | IFS | as_nl) ;; #(
14837 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14838 *) { eval $ac_var=; unset $ac_var;} ;;
14839 esac ;;
14840 esac
14841 done
14842
bec39cab 14843 (set) 2>&1 |
81ecdfbb
RW
14844 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14845 *${as_nl}ac_space=\ *)
14846 # `set' does not quote correctly, so add quotes: double-quote
14847 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
14848 sed -n \
14849 "s/'/'\\\\''/g;
14850 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 14851 ;; #(
bec39cab
AC
14852 *)
14853 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 14854 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 14855 ;;
81ecdfbb
RW
14856 esac |
14857 sort
14858) |
bec39cab 14859 sed '
81ecdfbb 14860 /^ac_cv_env_/b end
bec39cab 14861 t clear
81ecdfbb 14862 :clear
bec39cab
AC
14863 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14864 t end
81ecdfbb
RW
14865 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14866 :end' >>confcache
14867if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14868 if test -w "$cache_file"; then
14869 test "x$cache_file" != "x/dev/null" &&
14870 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14871$as_echo "$as_me: updating cache $cache_file" >&6;}
bec39cab
AC
14872 cat confcache >$cache_file
14873 else
81ecdfbb
RW
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14875$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
14876 fi
14877fi
14878rm -f confcache
14879
14880test "x$prefix" = xNONE && prefix=$ac_default_prefix
14881# Let make expand exec_prefix.
14882test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14883
bec39cab
AC
14884DEFS=-DHAVE_CONFIG_H
14885
14886ac_libobjs=
14887ac_ltlibobjs=
14888for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14889 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
14890 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14891 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14892 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14893 # will be set to the directory where LIBOBJS objects are built.
14894 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14895 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
14896done
14897LIBOBJS=$ac_libobjs
14898
14899LTLIBOBJS=$ac_ltlibobjs
14900
14901
85981d60 14902if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
81ecdfbb
RW
14903 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
14904Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 14905fi
a417dc56 14906if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
81ecdfbb
RW
14907 as_fn_error "conditional \"GMAKE\" was never defined.
14908Usually this means the macro was only invoked conditionally." "$LINENO" 5
a417dc56 14909fi
81ecdfbb
RW
14910
14911
bec39cab 14912: ${CONFIG_STATUS=./config.status}
81ecdfbb 14913ac_write_fail=0
bec39cab
AC
14914ac_clean_files_save=$ac_clean_files
14915ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
14916{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14917$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14918as_write_fail=0
14919cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
14920#! $SHELL
14921# Generated by $as_me.
14922# Run this file to recreate the current configuration.
14923# Compiler output produced by configure, useful for debugging
14924# configure, is in config.log if it exists.
14925
14926debug=false
14927ac_cs_recheck=false
14928ac_cs_silent=false
bec39cab 14929
81ecdfbb
RW
14930SHELL=\${CONFIG_SHELL-$SHELL}
14931export SHELL
14932_ASEOF
14933cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14934## -------------------- ##
14935## M4sh Initialization. ##
14936## -------------------- ##
14937
14938# Be more Bourne compatible
14939DUALCASE=1; export DUALCASE # for MKS sh
14940if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
14941 emulate sh
14942 NULLCMD=:
81ecdfbb 14943 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
14944 # is contrary to our usage. Disable this feature.
14945 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
14946 setopt NO_GLOB_SUBST
14947else
14948 case `(set -o) 2>/dev/null` in #(
14949 *posix*) :
14950 set -o posix ;; #(
14951 *) :
14952 ;;
14953esac
bec39cab 14954fi
bec39cab 14955
81ecdfbb
RW
14956
14957as_nl='
14958'
14959export as_nl
14960# Printing a long string crashes Solaris 7 /usr/bin/printf.
14961as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14962as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14963as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14964# Prefer a ksh shell builtin over an external printf program on Solaris,
14965# but without wasting forks for bash or zsh.
14966if test -z "$BASH_VERSION$ZSH_VERSION" \
14967 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14968 as_echo='print -r --'
14969 as_echo_n='print -rn --'
14970elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14971 as_echo='printf %s\n'
14972 as_echo_n='printf %s'
14973else
14974 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14975 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14976 as_echo_n='/usr/ucb/echo -n'
14977 else
14978 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14979 as_echo_n_body='eval
14980 arg=$1;
14981 case $arg in #(
14982 *"$as_nl"*)
14983 expr "X$arg" : "X\\(.*\\)$as_nl";
14984 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14985 esac;
14986 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14987 '
14988 export as_echo_n_body
14989 as_echo_n='sh -c $as_echo_n_body as_echo'
14990 fi
14991 export as_echo_body
14992 as_echo='sh -c $as_echo_body as_echo'
14993fi
14994
14995# The user is always right.
14996if test "${PATH_SEPARATOR+set}" != set; then
14997 PATH_SEPARATOR=:
14998 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14999 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15000 PATH_SEPARATOR=';'
15001 }
bec39cab
AC
15002fi
15003
15004
81ecdfbb
RW
15005# IFS
15006# We need space, tab and new line, in precisely that order. Quoting is
15007# there to prevent editors from complaining about space-tab.
15008# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15009# splitting by setting IFS to empty value.)
15010IFS=" "" $as_nl"
15011
15012# Find who we are. Look in the path if we contain no directory separator.
15013case $0 in #((
15014 *[\\/]* ) as_myself=$0 ;;
15015 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15016for as_dir in $PATH
15017do
15018 IFS=$as_save_IFS
15019 test -z "$as_dir" && as_dir=.
15020 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15021 done
15022IFS=$as_save_IFS
15023
15024 ;;
15025esac
15026# We did not find ourselves, most probably we were run as `sh COMMAND'
15027# in which case we are not to be found in the path.
15028if test "x$as_myself" = x; then
15029 as_myself=$0
15030fi
15031if test ! -f "$as_myself"; then
15032 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15033 exit 1
15034fi
15035
15036# Unset variables that we do not need and which cause bugs (e.g. in
15037# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15038# suppresses any "Segmentation fault" message there. '((' could
15039# trigger a bug in pdksh 5.2.14.
15040for as_var in BASH_ENV ENV MAIL MAILPATH
15041do eval test x\${$as_var+set} = xset \
15042 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15043done
bec39cab
AC
15044PS1='$ '
15045PS2='> '
15046PS4='+ '
15047
15048# NLS nuisances.
81ecdfbb
RW
15049LC_ALL=C
15050export LC_ALL
15051LANGUAGE=C
15052export LANGUAGE
15053
15054# CDPATH.
15055(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15056
15057
15058# as_fn_error ERROR [LINENO LOG_FD]
15059# ---------------------------------
15060# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15061# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15062# script with status $?, using 1 if that was 0.
15063as_fn_error ()
15064{
15065 as_status=$?; test $as_status -eq 0 && as_status=1
15066 if test "$3"; then
15067 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15068 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
15069 fi
15070 $as_echo "$as_me: error: $1" >&2
15071 as_fn_exit $as_status
15072} # as_fn_error
15073
15074
15075# as_fn_set_status STATUS
15076# -----------------------
15077# Set $? to STATUS, without forking.
15078as_fn_set_status ()
15079{
15080 return $1
15081} # as_fn_set_status
15082
15083# as_fn_exit STATUS
15084# -----------------
15085# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15086as_fn_exit ()
15087{
15088 set +e
15089 as_fn_set_status $1
15090 exit $1
15091} # as_fn_exit
15092
15093# as_fn_unset VAR
15094# ---------------
15095# Portably unset VAR.
15096as_fn_unset ()
15097{
15098 { eval $1=; unset $1;}
15099}
15100as_unset=as_fn_unset
15101# as_fn_append VAR VALUE
15102# ----------------------
15103# Append the text in VALUE to the end of the definition contained in VAR. Take
15104# advantage of any shell optimizations that allow amortized linear growth over
15105# repeated appends, instead of the typical quadratic growth present in naive
15106# implementations.
15107if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15108 eval 'as_fn_append ()
15109 {
15110 eval $1+=\$2
15111 }'
15112else
15113 as_fn_append ()
15114 {
15115 eval $1=\$$1\$2
15116 }
15117fi # as_fn_append
15118
15119# as_fn_arith ARG...
15120# ------------------
15121# Perform arithmetic evaluation on the ARGs, and store the result in the
15122# global $as_val. Take advantage of shells that can avoid forks. The arguments
15123# must be portable across $(()) and expr.
15124if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15125 eval 'as_fn_arith ()
15126 {
15127 as_val=$(( $* ))
15128 }'
15129else
15130 as_fn_arith ()
15131 {
15132 as_val=`expr "$@" || test $? -eq 1`
15133 }
15134fi # as_fn_arith
bec39cab 15135
81ecdfbb
RW
15136
15137if expr a : '\(a\)' >/dev/null 2>&1 &&
15138 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
15139 as_expr=expr
15140else
15141 as_expr=false
15142fi
15143
81ecdfbb 15144if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
15145 as_basename=basename
15146else
15147 as_basename=false
15148fi
15149
81ecdfbb
RW
15150if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15151 as_dirname=dirname
15152else
15153 as_dirname=false
15154fi
bec39cab 15155
81ecdfbb 15156as_me=`$as_basename -- "$0" ||
bec39cab
AC
15157$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15158 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
15159 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15160$as_echo X/"$0" |
15161 sed '/^.*\/\([^/][^/]*\)\/*$/{
15162 s//\1/
15163 q
15164 }
15165 /^X\/\(\/\/\)$/{
15166 s//\1/
15167 q
15168 }
15169 /^X\/\(\/\).*/{
15170 s//\1/
15171 q
15172 }
15173 s/.*/./; q'`
b4e70030 15174
b4e70030
JB
15175# Avoid depending upon Character Ranges.
15176as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15177as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15178as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15179as_cr_digits='0123456789'
15180as_cr_alnum=$as_cr_Letters$as_cr_digits
15181
81ecdfbb
RW
15182ECHO_C= ECHO_N= ECHO_T=
15183case `echo -n x` in #(((((
15184-n*)
15185 case `echo 'xy\c'` in
15186 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
15187 xy) ECHO_C='\c';;
15188 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15189 ECHO_T=' ';;
15190 esac;;
15191*)
15192 ECHO_N='-n';;
bec39cab
AC
15193esac
15194
81ecdfbb
RW
15195rm -f conf$$ conf$$.exe conf$$.file
15196if test -d conf$$.dir; then
15197 rm -f conf$$.dir/conf$$.file
bec39cab 15198else
81ecdfbb
RW
15199 rm -f conf$$.dir
15200 mkdir conf$$.dir 2>/dev/null
bec39cab 15201fi
81ecdfbb
RW
15202if (echo >conf$$.file) 2>/dev/null; then
15203 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 15204 as_ln_s='ln -s'
81ecdfbb
RW
15205 # ... but there are two gotchas:
15206 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15207 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15208 # In both cases, we have to default to `cp -p'.
15209 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15210 as_ln_s='cp -p'
15211 elif ln conf$$.file conf$$ 2>/dev/null; then
15212 as_ln_s=ln
15213 else
15214 as_ln_s='cp -p'
b4e70030 15215 fi
bec39cab
AC
15216else
15217 as_ln_s='cp -p'
15218fi
81ecdfbb
RW
15219rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15220rmdir conf$$.dir 2>/dev/null
15221
15222
15223# as_fn_mkdir_p
15224# -------------
15225# Create "$as_dir" as a directory, including parents if necessary.
15226as_fn_mkdir_p ()
15227{
15228
15229 case $as_dir in #(
15230 -*) as_dir=./$as_dir;;
15231 esac
15232 test -d "$as_dir" || eval $as_mkdir_p || {
15233 as_dirs=
15234 while :; do
15235 case $as_dir in #(
15236 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15237 *) as_qdir=$as_dir;;
15238 esac
15239 as_dirs="'$as_qdir' $as_dirs"
15240 as_dir=`$as_dirname -- "$as_dir" ||
15241$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15242 X"$as_dir" : 'X\(//\)[^/]' \| \
15243 X"$as_dir" : 'X\(//\)$' \| \
15244 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15245$as_echo X"$as_dir" |
15246 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15247 s//\1/
15248 q
15249 }
15250 /^X\(\/\/\)[^/].*/{
15251 s//\1/
15252 q
15253 }
15254 /^X\(\/\/\)$/{
15255 s//\1/
15256 q
15257 }
15258 /^X\(\/\).*/{
15259 s//\1/
15260 q
15261 }
15262 s/.*/./; q'`
15263 test -d "$as_dir" && break
15264 done
15265 test -z "$as_dirs" || eval "mkdir $as_dirs"
15266 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15267
bec39cab 15268
81ecdfbb 15269} # as_fn_mkdir_p
bec39cab 15270if mkdir -p . 2>/dev/null; then
81ecdfbb 15271 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
15272else
15273 test -d ./-p && rmdir ./-p
15274 as_mkdir_p=false
15275fi
15276
81ecdfbb
RW
15277if test -x / >/dev/null 2>&1; then
15278 as_test_x='test -x'
15279else
15280 if ls -dL / >/dev/null 2>&1; then
15281 as_ls_L_option=L
15282 else
15283 as_ls_L_option=
15284 fi
15285 as_test_x='
15286 eval sh -c '\''
15287 if test -d "$1"; then
15288 test -d "$1/.";
15289 else
15290 case $1 in #(
15291 -*)set "./$1";;
15292 esac;
15293 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15294 ???[sx]*):;;*)false;;esac;fi
15295 '\'' sh
15296 '
15297fi
15298as_executable_p=$as_test_x
bec39cab
AC
15299
15300# Sed expression to map a string onto a valid CPP name.
15301as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15302
15303# Sed expression to map a string onto a valid variable name.
15304as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15305
15306
bec39cab 15307exec 6>&1
81ecdfbb
RW
15308## ----------------------------------- ##
15309## Main body of $CONFIG_STATUS script. ##
15310## ----------------------------------- ##
15311_ASEOF
15312test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15313
15314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15315# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 15316# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
15317# values after options handling.
15318ac_log="
bec39cab 15319This file was extended by $as_me, which was
81ecdfbb 15320generated by GNU Autoconf 2.64. Invocation command line was
bec39cab
AC
15321
15322 CONFIG_FILES = $CONFIG_FILES
15323 CONFIG_HEADERS = $CONFIG_HEADERS
15324 CONFIG_LINKS = $CONFIG_LINKS
15325 CONFIG_COMMANDS = $CONFIG_COMMANDS
15326 $ $0 $@
15327
81ecdfbb
RW
15328on `(hostname || uname -n) 2>/dev/null | sed 1q`
15329"
15330
bec39cab
AC
15331_ACEOF
15332
81ecdfbb
RW
15333case $ac_config_files in *"
15334"*) set x $ac_config_files; shift; ac_config_files=$*;;
15335esac
234b45d4 15336
81ecdfbb
RW
15337case $ac_config_headers in *"
15338"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15339esac
b4e70030 15340
b4e70030 15341
81ecdfbb
RW
15342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15343# Files that config.status was made for.
15344config_files="$ac_config_files"
15345config_headers="$ac_config_headers"
15346config_links="$ac_config_links"
15347config_commands="$ac_config_commands"
234b45d4 15348
81ecdfbb 15349_ACEOF
b4e70030 15350
81ecdfbb 15351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 15352ac_cs_usage="\
81ecdfbb
RW
15353\`$as_me' instantiates files and other configuration actions
15354from templates according to the current configuration. Unless the files
15355and actions are specified as TAGs, all are instantiated by default.
234b45d4 15356
81ecdfbb 15357Usage: $0 [OPTION]... [TAG]...
234b45d4 15358
bec39cab 15359 -h, --help print this help, then exit
81ecdfbb
RW
15360 -V, --version print version number and configuration settings, then exit
15361 -q, --quiet, --silent
15362 do not print progress messages
bec39cab
AC
15363 -d, --debug don't remove temporary files
15364 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
15365 --file=FILE[:TEMPLATE]
15366 instantiate the configuration file FILE
15367 --header=FILE[:TEMPLATE]
15368 instantiate the configuration header FILE
234b45d4 15369
bec39cab
AC
15370Configuration files:
15371$config_files
234b45d4 15372
bec39cab
AC
15373Configuration headers:
15374$config_headers
234b45d4 15375
bec39cab
AC
15376Configuration links:
15377$config_links
234b45d4 15378
bec39cab
AC
15379Configuration commands:
15380$config_commands
15381
81ecdfbb 15382Report bugs to the package provider."
b4e70030 15383
81ecdfbb
RW
15384_ACEOF
15385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab
AC
15386ac_cs_version="\\
15387config.status
81ecdfbb
RW
15388configured by $0, generated by GNU Autoconf 2.64,
15389 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
bec39cab 15390
81ecdfbb 15391Copyright (C) 2009 Free Software Foundation, Inc.
bec39cab
AC
15392This config.status script is free software; the Free Software Foundation
15393gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
15394
15395ac_pwd='$ac_pwd'
15396srcdir='$srcdir'
15397INSTALL='$INSTALL'
81ecdfbb
RW
15398AWK='$AWK'
15399test -n "\$AWK" || AWK=awk
bec39cab
AC
15400_ACEOF
15401
81ecdfbb
RW
15402cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15403# The default lists apply if the user does not specify any file.
bec39cab
AC
15404ac_need_defaults=:
15405while test $# != 0
15406do
15407 case $1 in
15408 --*=*)
81ecdfbb
RW
15409 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15410 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 15411 ac_shift=:
c906108c 15412 ;;
81ecdfbb 15413 *)
bec39cab
AC
15414 ac_option=$1
15415 ac_optarg=$2
15416 ac_shift=shift
c906108c 15417 ;;
bec39cab 15418 esac
c906108c 15419
bec39cab
AC
15420 case $ac_option in
15421 # Handling of the options.
bec39cab
AC
15422 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15423 ac_cs_recheck=: ;;
81ecdfbb
RW
15424 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15425 $as_echo "$ac_cs_version"; exit ;;
15426 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
15427 debug=: ;;
15428 --file | --fil | --fi | --f )
15429 $ac_shift
81ecdfbb
RW
15430 case $ac_optarg in
15431 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15432 esac
15433 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
15434 ac_need_defaults=false;;
15435 --header | --heade | --head | --hea )
15436 $ac_shift
81ecdfbb
RW
15437 case $ac_optarg in
15438 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15439 esac
15440 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 15441 ac_need_defaults=false;;
81ecdfbb
RW
15442 --he | --h)
15443 # Conflict between --help and --header
15444 as_fn_error "ambiguous option: \`$1'
15445Try \`$0 --help' for more information.";;
15446 --help | --hel | -h )
15447 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
15448 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15449 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15450 ac_cs_silent=: ;;
c906108c 15451
bec39cab 15452 # This is an error.
81ecdfbb
RW
15453 -*) as_fn_error "unrecognized option: \`$1'
15454Try \`$0 --help' for more information." ;;
c906108c 15455
81ecdfbb
RW
15456 *) as_fn_append ac_config_targets " $1"
15457 ac_need_defaults=false ;;
c906108c 15458
bec39cab
AC
15459 esac
15460 shift
15461done
c906108c 15462
bec39cab 15463ac_configure_extra_args=
c906108c 15464
bec39cab
AC
15465if $ac_cs_silent; then
15466 exec 6>/dev/null
15467 ac_configure_extra_args="$ac_configure_extra_args --silent"
15468fi
c906108c 15469
bec39cab 15470_ACEOF
81ecdfbb 15471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 15472if \$ac_cs_recheck; then
81ecdfbb
RW
15473 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15474 shift
15475 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15476 CONFIG_SHELL='$SHELL'
15477 export CONFIG_SHELL
15478 exec "\$@"
bec39cab
AC
15479fi
15480
15481_ACEOF
81ecdfbb
RW
15482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15483exec 5>>config.log
15484{
15485 echo
15486 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15487## Running $as_me. ##
15488_ASBOX
15489 $as_echo "$ac_log"
15490} >&5
bec39cab 15491
81ecdfbb
RW
15492_ACEOF
15493cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 15494#
81ecdfbb 15495# INIT-COMMANDS
c906108c 15496#
a417dc56 15497ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
b4e70030 15498
bec39cab
AC
15499_ACEOF
15500
81ecdfbb 15501cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 15502
81ecdfbb 15503# Handling of arguments.
bec39cab 15504for ac_config_target in $ac_config_targets
c906108c 15505do
81ecdfbb
RW
15506 case $ac_config_target in
15507 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
15508 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 15509 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
81ecdfbb 15510 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
b292c783 15511 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 15512 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 15513 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
5ae98d25 15514 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 15515 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb
RW
15516 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15517
15518 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
15519 esac
15520done
15521
81ecdfbb 15522
bec39cab
AC
15523# If the user did not use the arguments to specify the items to instantiate,
15524# then the envvar interface is used. Set only those that are not.
15525# We use the long form for the default assignment because of an extremely
15526# bizarre bug on SunOS 4.1.3.
15527if $ac_need_defaults; then
15528 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15529 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15530 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
15531 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15532fi
15533
b4e70030 15534# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 15535# simply because there is no reason against having it here, and in addition,
b4e70030 15536# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
15537# Hook for its removal unless debugging.
15538# Note that there is a small window in which the directory will not be cleaned:
15539# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
15540$debug ||
15541{
81ecdfbb
RW
15542 tmp=
15543 trap 'exit_status=$?
15544 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15545' 0
15546 trap 'as_fn_exit 1' 1 2 13 15
15547}
15548# Create a (secure) tmp directory for tmp files.
15549
15550{
15551 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15552 test -n "$tmp" && test -d "$tmp"
15553} ||
15554{
15555 tmp=./conf$$-$RANDOM
15556 (umask 077 && mkdir "$tmp")
15557} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
15558
15559# Set up the scripts for CONFIG_FILES section.
15560# No need to generate them if there are no CONFIG_FILES.
15561# This happens for instance with `./config.status config.h'.
15562if test -n "$CONFIG_FILES"; then
15563
15564if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15565 ac_cs_awk_getline=:
15566 ac_cs_awk_pipe_init=
15567 ac_cs_awk_read_file='
15568 while ((getline aline < (F[key])) > 0)
15569 print(aline)
15570 close(F[key])'
15571 ac_cs_awk_pipe_fini=
15572else
15573 ac_cs_awk_getline=false
15574 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15575 ac_cs_awk_read_file='
15576 print "|#_!!_#|"
15577 print "cat " F[key] " &&"
15578 '$ac_cs_awk_pipe_init
15579 # The final `:' finishes the AND list.
15580 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15581fi
15582ac_cr=`echo X | tr X '\015'`
15583# On cygwin, bash can eat \r inside `` if the user requested igncr.
15584# But we know of no other shell where ac_cr would be empty at this
15585# point, so we can use a bashism as a fallback.
15586if test "x$ac_cr" = x; then
15587 eval ac_cr=\$\'\\r\'
15588fi
15589ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15590if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15591 ac_cs_awk_cr='\r'
15592else
15593 ac_cs_awk_cr=$ac_cr
15594fi
15595
15596echo 'BEGIN {' >"$tmp/subs1.awk" &&
15597_ACEOF
15598
15599# Create commands to substitute file output variables.
15600{
15601 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15602 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15603 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15604 echo "_ACAWK" &&
15605 echo "_ACEOF"
15606} >conf$$files.sh &&
15607. ./conf$$files.sh ||
15608 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15609rm -f conf$$files.sh
15610
15611{
15612 echo "cat >conf$$subs.awk <<_ACEOF" &&
15613 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15614 echo "_ACEOF"
15615} >conf$$subs.sh ||
15616 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15617ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15618ac_delim='%!_!# '
15619for ac_last_try in false false false false false :; do
15620 . ./conf$$subs.sh ||
15621 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15622
15623 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15624 if test $ac_delim_n = $ac_delim_num; then
15625 break
15626 elif $ac_last_try; then
15627 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15628 else
15629 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15630 fi
15631done
15632rm -f conf$$subs.sh
15633
15634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15635cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15636_ACEOF
15637sed -n '
15638h
15639s/^/S["/; s/!.*/"]=/
15640p
15641g
15642s/^[^!]*!//
15643:repl
15644t repl
15645s/'"$ac_delim"'$//
15646t delim
15647:nl
15648h
15649s/\(.\{148\}\).*/\1/
15650t more1
15651s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15652p
15653n
15654b repl
15655:more1
15656s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15657p
15658g
15659s/.\{148\}//
15660t nl
15661:delim
15662h
15663s/\(.\{148\}\).*/\1/
15664t more2
15665s/["\\]/\\&/g; s/^/"/; s/$/"/
15666p
15667b
15668:more2
15669s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15670p
15671g
15672s/.\{148\}//
15673t delim
15674' <conf$$subs.awk | sed '
15675/^[^""]/{
15676 N
15677 s/\n//
15678}
15679' >>$CONFIG_STATUS || ac_write_fail=1
15680rm -f conf$$subs.awk
15681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15682_ACAWK
15683cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15684 for (key in S) S_is_set[key] = 1
15685 FS = "\a"
15686 \$ac_cs_awk_pipe_init
15687}
15688{
15689 line = $ 0
15690 nfields = split(line, field, "@")
15691 substed = 0
15692 len = length(field[1])
15693 for (i = 2; i < nfields; i++) {
15694 key = field[i]
15695 keylen = length(key)
15696 if (S_is_set[key]) {
15697 value = S[key]
15698 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15699 len += length(value) + length(field[++i])
15700 substed = 1
15701 } else
15702 len += 1 + keylen
15703 }
15704 if (nfields == 3 && !substed) {
15705 key = field[2]
15706 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15707 \$ac_cs_awk_read_file
15708 next
15709 }
15710 }
15711 print line
b4e70030 15712}
81ecdfbb
RW
15713\$ac_cs_awk_pipe_fini
15714_ACAWK
15715_ACEOF
15716cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15717if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15718 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15719else
15720 cat
15721fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15722 || as_fn_error "could not setup config files machinery" "$LINENO" 5
15723_ACEOF
15724
15725# VPATH may cause trouble with some makes, so we remove $(srcdir),
15726# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15727# trailing colons and then remove the whole line if VPATH becomes empty
15728# (actually we leave an empty line to preserve line numbers).
15729if test "x$srcdir" = x.; then
15730 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15731s/:*\$(srcdir):*/:/
15732s/:*\${srcdir}:*/:/
15733s/:*@srcdir@:*/:/
15734s/^\([^=]*=[ ]*\):*/\1/
15735s/:*$//
15736s/^[^=]*=[ ]*$//
15737}'
15738fi
15739
15740cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15741fi # test -n "$CONFIG_FILES"
15742
15743# Set up the scripts for CONFIG_HEADERS section.
15744# No need to generate them if there are no CONFIG_HEADERS.
15745# This happens for instance with `./config.status Makefile'.
15746if test -n "$CONFIG_HEADERS"; then
15747cat >"$tmp/defines.awk" <<\_ACAWK ||
15748BEGIN {
15749_ACEOF
15750
15751# Transform confdefs.h into an awk script `defines.awk', embedded as
15752# here-document in config.status, that substitutes the proper values into
15753# config.h.in to produce config.h.
4e8d927d 15754
81ecdfbb
RW
15755# Create a delimiter string that does not exist in confdefs.h, to ease
15756# handling of long lines.
15757ac_delim='%!_!# '
15758for ac_last_try in false false :; do
15759 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15760 if test -z "$ac_t"; then
15761 break
15762 elif $ac_last_try; then
15763 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
15764 else
15765 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15766 fi
15767done
4e8d927d 15768
81ecdfbb
RW
15769# For the awk script, D is an array of macro values keyed by name,
15770# likewise P contains macro parameters if any. Preserve backslash
15771# newline sequences.
15772
15773ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15774sed -n '
15775s/.\{148\}/&'"$ac_delim"'/g
15776t rset
15777:rset
15778s/^[ ]*#[ ]*define[ ][ ]*/ /
15779t def
15780d
15781:def
15782s/\\$//
15783t bsnl
15784s/["\\]/\\&/g
15785s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15786D["\1"]=" \3"/p
15787s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15788d
15789:bsnl
15790s/["\\]/\\&/g
15791s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15792D["\1"]=" \3\\\\\\n"\\/p
15793t cont
15794s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15795t cont
15796d
15797:cont
15798n
15799s/.\{148\}/&'"$ac_delim"'/g
15800t clear
15801:clear
15802s/\\$//
15803t bsnlc
15804s/["\\]/\\&/g; s/^/"/; s/$/"/p
15805d
15806:bsnlc
15807s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15808b cont
15809' <confdefs.h | sed '
15810s/'"$ac_delim"'/"\\\
15811"/g' >>$CONFIG_STATUS || ac_write_fail=1
15812
15813cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15814 for (key in D) D_is_set[key] = 1
15815 FS = "\a"
15816}
15817/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15818 line = \$ 0
15819 split(line, arg, " ")
15820 if (arg[1] == "#") {
15821 defundef = arg[2]
15822 mac1 = arg[3]
15823 } else {
15824 defundef = substr(arg[1], 2)
15825 mac1 = arg[2]
15826 }
15827 split(mac1, mac2, "(") #)
15828 macro = mac2[1]
15829 prefix = substr(line, 1, index(line, defundef) - 1)
15830 if (D_is_set[macro]) {
15831 # Preserve the white space surrounding the "#".
15832 print prefix "define", macro P[macro] D[macro]
15833 next
15834 } else {
15835 # Replace #undef with comments. This is necessary, for example,
15836 # in the case of _POSIX_SOURCE, which is predefined and required
15837 # on some systems where configure will not decide to define it.
15838 if (defundef == "undef") {
15839 print "/*", prefix defundef, macro, "*/"
15840 next
15841 }
15842 }
b4e70030 15843}
81ecdfbb
RW
15844{ print }
15845_ACAWK
b4e70030 15846_ACEOF
81ecdfbb
RW
15847cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15848 as_fn_error "could not setup config headers machinery" "$LINENO" 5
15849fi # test -n "$CONFIG_HEADERS"
4e8d927d 15850
4e8d927d 15851
81ecdfbb
RW
15852eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
15853shift
15854for ac_tag
15855do
15856 case $ac_tag in
15857 :[FHLC]) ac_mode=$ac_tag; continue;;
15858 esac
15859 case $ac_mode$ac_tag in
15860 :[FHL]*:*);;
15861 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
15862 :[FH]-) ac_tag=-:-;;
15863 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15864 esac
15865 ac_save_IFS=$IFS
15866 IFS=:
15867 set x $ac_tag
15868 IFS=$ac_save_IFS
15869 shift
15870 ac_file=$1
15871 shift
4e8d927d 15872
81ecdfbb
RW
15873 case $ac_mode in
15874 :L) ac_source=$1;;
15875 :[FH])
15876 ac_file_inputs=
15877 for ac_f
15878 do
15879 case $ac_f in
15880 -) ac_f="$tmp/stdin";;
15881 *) # Look for the file first in the build tree, then in the source tree
15882 # (if the path is not absolute). The absolute path cannot be DOS-style,
15883 # because $ac_f cannot contain `:'.
15884 test -f "$ac_f" ||
15885 case $ac_f in
15886 [\\/$]*) false;;
15887 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15888 esac ||
15889 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15890 esac
15891 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15892 as_fn_append ac_file_inputs " '$ac_f'"
15893 done
15894
15895 # Let's still pretend it is `configure' which instantiates (i.e., don't
15896 # use $as_me), people would be surprised to read:
15897 # /* config.h. Generated by config.status. */
15898 configure_input='Generated from '`
15899 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15900 `' by configure.'
15901 if test x"$ac_file" != x-; then
15902 configure_input="$ac_file. $configure_input"
15903 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15904$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 15905 fi
81ecdfbb
RW
15906 # Neutralize special characters interpreted by sed in replacement strings.
15907 case $configure_input in #(
15908 *\&* | *\|* | *\\* )
15909 ac_sed_conf_input=`$as_echo "$configure_input" |
15910 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15911 *) ac_sed_conf_input=$configure_input;;
15912 esac
4e8d927d 15913
81ecdfbb
RW
15914 case $ac_tag in
15915 *:-:* | *:-) cat >"$tmp/stdin" \
15916 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
15917 esac
15918 ;;
c906108c
SS
15919 esac
15920
81ecdfbb 15921 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
15922$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15923 X"$ac_file" : 'X\(//\)[^/]' \| \
15924 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
15925 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15926$as_echo X"$ac_file" |
15927 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15928 s//\1/
15929 q
15930 }
15931 /^X\(\/\/\)[^/].*/{
15932 s//\1/
15933 q
15934 }
15935 /^X\(\/\/\)$/{
15936 s//\1/
15937 q
15938 }
15939 /^X\(\/\).*/{
15940 s//\1/
15941 q
15942 }
15943 s/.*/./; q'`
15944 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
15945 ac_builddir=.
15946
81ecdfbb
RW
15947case "$ac_dir" in
15948.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15949*)
15950 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15951 # A ".." for each directory in $ac_dir_suffix.
15952 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15953 case $ac_top_builddir_sub in
15954 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15955 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15956 esac ;;
15957esac
15958ac_abs_top_builddir=$ac_pwd
15959ac_abs_builddir=$ac_pwd$ac_dir_suffix
15960# for backward compatibility:
15961ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
15962
15963case $srcdir in
81ecdfbb 15964 .) # We are building in place.
bec39cab 15965 ac_srcdir=.
81ecdfbb
RW
15966 ac_top_srcdir=$ac_top_builddir_sub
15967 ac_abs_top_srcdir=$ac_pwd ;;
15968 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 15969 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
15970 ac_top_srcdir=$srcdir
15971 ac_abs_top_srcdir=$srcdir ;;
15972 *) # Relative name.
15973 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15974 ac_top_srcdir=$ac_top_build_prefix$srcdir
15975 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 15976esac
81ecdfbb 15977ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 15978
c906108c 15979
81ecdfbb
RW
15980 case $ac_mode in
15981 :F)
15982 #
15983 # CONFIG_FILE
15984 #
c906108c 15985
bec39cab
AC
15986 case $INSTALL in
15987 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 15988 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 15989 esac
81ecdfbb 15990_ACEOF
121ce6e5 15991
81ecdfbb
RW
15992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15993# If the template does not know about datarootdir, expand it.
15994# FIXME: This hack should be removed a few years after 2.60.
15995ac_datarootdir_hack=; ac_datarootdir_seen=
15996ac_sed_dataroot='
15997/datarootdir/ {
15998 p
15999 q
16000}
16001/@datadir@/p
16002/@docdir@/p
16003/@infodir@/p
16004/@localedir@/p
16005/@mandir@/p'
16006case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16007*datarootdir*) ac_datarootdir_seen=yes;;
16008*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16009 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16010$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16011_ACEOF
16012cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16013 ac_datarootdir_hack='
16014 s&@datadir@&$datadir&g
16015 s&@docdir@&$docdir&g
16016 s&@infodir@&$infodir&g
16017 s&@localedir@&$localedir&g
16018 s&@mandir@&$mandir&g
16019 s&\\\${datarootdir}&$datarootdir&g' ;;
16020esac
4e8d927d 16021_ACEOF
81ecdfbb
RW
16022
16023# Neutralize VPATH when `$srcdir' = `.'.
16024# Shell code in configure.ac might set extrasub.
16025# FIXME: do we really want to maintain this feature?
16026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16027ac_sed_extra="$ac_vpsub
bec39cab
AC
16028$extrasub
16029_ACEOF
81ecdfbb 16030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
16031:t
16032/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
16033s|@configure_input@|$ac_sed_conf_input|;t t
16034s&@top_builddir@&$ac_top_builddir_sub&;t t
16035s&@top_build_prefix@&$ac_top_build_prefix&;t t
16036s&@srcdir@&$ac_srcdir&;t t
16037s&@abs_srcdir@&$ac_abs_srcdir&;t t
16038s&@top_srcdir@&$ac_top_srcdir&;t t
16039s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16040s&@builddir@&$ac_builddir&;t t
16041s&@abs_builddir@&$ac_abs_builddir&;t t
16042s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16043s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
16044$ac_datarootdir_hack
16045"
16046eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16047if $ac_cs_awk_getline; then
16048 $AWK -f "$tmp/subs.awk"
16049else
16050 $AWK -f "$tmp/subs.awk" | $SHELL
16051fi >$tmp/out \
16052 || as_fn_error "could not create $ac_file" "$LINENO" 5
16053
16054test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16055 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16056 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16058which seems to be undefined. Please make sure it is defined." >&5
16059$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16060which seems to be undefined. Please make sure it is defined." >&2;}
16061
16062 rm -f "$tmp/stdin"
bec39cab 16063 case $ac_file in
81ecdfbb
RW
16064 -) cat "$tmp/out" && rm -f "$tmp/out";;
16065 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16066 esac \
16067 || as_fn_error "could not create $ac_file" "$LINENO" 5
16068 ;;
16069 :H)
16070 #
16071 # CONFIG_HEADER
16072 #
bec39cab 16073 if test x"$ac_file" != x-; then
81ecdfbb
RW
16074 {
16075 $as_echo "/* $configure_input */" \
16076 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16077 } >"$tmp/config.h" \
16078 || as_fn_error "could not create $ac_file" "$LINENO" 5
16079 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
16080 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16081$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 16082 else
81ecdfbb
RW
16083 rm -f "$ac_file"
16084 mv "$tmp/config.h" "$ac_file" \
16085 || as_fn_error "could not create $ac_file" "$LINENO" 5
bec39cab
AC
16086 fi
16087 else
81ecdfbb
RW
16088 $as_echo "/* $configure_input */" \
16089 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
16090 || as_fn_error "could not create -" "$LINENO" 5
bec39cab 16091 fi
81ecdfbb
RW
16092 ;;
16093 :L)
16094 #
16095 # CONFIG_LINK
16096 #
c906108c 16097
81ecdfbb
RW
16098 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
16099 :
b4e70030 16100 else
81ecdfbb
RW
16101 # Prefer the file from the source tree if names are identical.
16102 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
16103 ac_source=$srcdir/$ac_source
16104 fi
b4e70030 16105
81ecdfbb
RW
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
16107$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 16108
81ecdfbb
RW
16109 if test ! -r "$ac_source"; then
16110 as_fn_error "$ac_source: file not found" "$LINENO" 5
16111 fi
16112 rm -f "$ac_file"
bec39cab 16113
81ecdfbb
RW
16114 # Try a relative symlink, then a hard link, then a copy.
16115 case $srcdir in
16116 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
16117 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
16118 esac
16119 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
16120 ln "$ac_source" "$ac_file" 2>/dev/null ||
16121 cp -p "$ac_source" "$ac_file" ||
16122 as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
16123 fi
16124 ;;
16125 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
16126$as_echo "$as_me: executing $ac_file commands" >&6;}
16127 ;;
c906108c 16128 esac
b4e70030 16129
bec39cab 16130
81ecdfbb
RW
16131 case $ac_file$ac_mode in
16132 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
b292c783 16133 "gcore":F) chmod +x gcore ;;
81ecdfbb 16134 "default":C)
c906108c
SS
16135case x$CONFIG_HEADERS in
16136xconfig.h:config.in)
16137echo > stamp-h ;;
16138esac
bec39cab 16139 ;;
81ecdfbb 16140
bec39cab 16141 esac
81ecdfbb 16142done # for ac_tag
c906108c 16143
bec39cab 16144
81ecdfbb 16145as_fn_exit 0
bec39cab 16146_ACEOF
bec39cab
AC
16147ac_clean_files=$ac_clean_files_save
16148
81ecdfbb
RW
16149test $ac_write_fail = 0 ||
16150 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
16151
bec39cab
AC
16152
16153# configure is writing to config.log, and then calls config.status.
16154# config.status does its own redirection, appending to config.log.
16155# Unfortunately, on DOS this fails, as config.log is still kept open
16156# by configure, so config.status won't be able to write to it; its
16157# output is simply discarded. So we exec the FD to /dev/null,
16158# effectively closing config.log, so it can be properly (re)opened and
16159# appended to by config.status. When coming back to configure, we
16160# need to make the FD available again.
16161if test "$no_create" != yes; then
16162 ac_cs_success=:
16163 ac_config_status_args=
16164 test "$silent" = yes &&
16165 ac_config_status_args="$ac_config_status_args --quiet"
16166 exec 5>/dev/null
16167 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16168 exec 5>>config.log
16169 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16170 # would make configure fail if this is the last instruction.
81ecdfbb 16171 $ac_cs_success || as_fn_exit $?
bec39cab 16172fi
c906108c 16173
bec39cab 16174#
81ecdfbb 16175# CONFIG_SUBDIRS section.
bec39cab 16176#
c906108c
SS
16177if test "$no_recursion" != yes; then
16178
81ecdfbb
RW
16179 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
16180 # so they do not pile up.
c906108c
SS
16181 ac_sub_configure_args=
16182 ac_prev=
fdc59709
PB
16183 eval "set x $ac_configure_args"
16184 shift
16185 for ac_arg
16186 do
c906108c
SS
16187 if test -n "$ac_prev"; then
16188 ac_prev=
16189 continue
16190 fi
bec39cab 16191 case $ac_arg in
c906108c
SS
16192 -cache-file | --cache-file | --cache-fil | --cache-fi \
16193 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
16194 ac_prev=cache_file ;;
16195 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
16196 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
16197 | --c=*)
16198 ;;
16199 --config-cache | -C)
c906108c
SS
16200 ;;
16201 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
16202 ac_prev=srcdir ;;
16203 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
16204 ;;
bec39cab
AC
16205 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
16206 ac_prev=prefix ;;
16207 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
16208 ;;
81ecdfbb
RW
16209 --disable-option-checking)
16210 ;;
fdc59709
PB
16211 *)
16212 case $ac_arg in
81ecdfbb 16213 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16214 esac
81ecdfbb 16215 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
16216 esac
16217 done
16218
bec39cab
AC
16219 # Always prepend --prefix to ensure using the same prefix
16220 # in subdir configurations.
fdc59709
PB
16221 ac_arg="--prefix=$prefix"
16222 case $ac_arg in
81ecdfbb 16223 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 16224 esac
81ecdfbb
RW
16225 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
16226
16227 # Pass --silent
16228 if test "$silent" = yes; then
16229 ac_sub_configure_args="--silent $ac_sub_configure_args"
16230 fi
16231
16232 # Always prepend --disable-option-checking to silence warnings, since
16233 # different subdirs can have different --enable and --with options.
16234 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 16235
b4e70030 16236 ac_popdir=`pwd`
bec39cab 16237 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
16238
16239 # Do not complain, so a configure script can configure whichever
16240 # parts of a large source tree are present.
fdc59709 16241 test -d "$srcdir/$ac_dir" || continue
c906108c 16242
81ecdfbb
RW
16243 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
16244 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
16245 $as_echo "$ac_msg" >&6
16246 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
16247 ac_builddir=.
16248
81ecdfbb
RW
16249case "$ac_dir" in
16250.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16251*)
16252 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16253 # A ".." for each directory in $ac_dir_suffix.
16254 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16255 case $ac_top_builddir_sub in
16256 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16257 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16258 esac ;;
16259esac
16260ac_abs_top_builddir=$ac_pwd
16261ac_abs_builddir=$ac_pwd$ac_dir_suffix
16262# for backward compatibility:
16263ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
16264
16265case $srcdir in
81ecdfbb 16266 .) # We are building in place.
bec39cab 16267 ac_srcdir=.
81ecdfbb
RW
16268 ac_top_srcdir=$ac_top_builddir_sub
16269 ac_abs_top_srcdir=$ac_pwd ;;
16270 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 16271 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
16272 ac_top_srcdir=$srcdir
16273 ac_abs_top_srcdir=$srcdir ;;
16274 *) # Relative name.
16275 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16276 ac_top_srcdir=$ac_top_build_prefix$srcdir
16277 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 16278esac
81ecdfbb 16279ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 16280
c906108c 16281
fdc59709 16282 cd "$ac_dir"
c906108c
SS
16283
16284 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
16285 if test -f "$ac_srcdir/configure.gnu"; then
16286 ac_sub_configure=$ac_srcdir/configure.gnu
16287 elif test -f "$ac_srcdir/configure"; then
16288 ac_sub_configure=$ac_srcdir/configure
16289 elif test -f "$ac_srcdir/configure.in"; then
16290 # This should be Cygnus configure.
16291 ac_sub_configure=$ac_aux_dir/configure
c906108c 16292 else
81ecdfbb
RW
16293 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
16294$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
16295 ac_sub_configure=
16296 fi
16297
16298 # The recursion is here.
16299 if test -n "$ac_sub_configure"; then
c906108c 16300 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
16301 case $cache_file in
16302 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
16303 *) # Relative name.
16304 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 16305 esac
c906108c 16306
81ecdfbb
RW
16307 { $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
16308$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 16309 # The eval makes quoting arguments work.
fdc59709
PB
16310 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
16311 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
81ecdfbb 16312 as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
16313 fi
16314
fdc59709 16315 cd "$ac_popdir"
c906108c
SS
16316 done
16317fi
81ecdfbb
RW
16318if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16320$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16321fi
c906108c
SS
16322
16323
16324exit 0
This page took 2.443909 seconds and 4 git commands to generate.