Introduce typeid_operation
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
81ecdfbb 7#
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.
d0ac1c44 90as_myself=
81ecdfbb
RW
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
bec39cab
AC
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
81ecdfbb
RW
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
81ecdfbb
RW
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
81ecdfbb
RW
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab 211do
81ecdfbb
RW
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
81ecdfbb
RW
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
bec39cab 266 else
81ecdfbb
RW
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
bec39cab 271 fi
81ecdfbb
RW
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
bec39cab 301
81ecdfbb
RW
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb
RW
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
81ecdfbb
RW
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
81ecdfbb
RW
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
421 as_expr=expr
422else
423 as_expr=false
424fi
425
81ecdfbb 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
427 as_basename=basename
428else
429 as_basename=false
430fi
431
81ecdfbb
RW
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
bec39cab 437
81ecdfbb 438as_me=`$as_basename -- "$0" ||
bec39cab
AC
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
bec39cab 456
b4e70030
JB
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 463
bec39cab 464
81ecdfbb
RW
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
bec39cab 474 sed '
81ecdfbb
RW
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
bec39cab 479 N
81ecdfbb
RW
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
bec39cab 482 t loop
81ecdfbb 483 s/-\n.*//
bec39cab 484 ' >$as_me.lineno &&
81ecdfbb
RW
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
bec39cab 487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
bec39cab
AC
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
81ecdfbb
RW
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
bec39cab
AC
496 # Exit status is that of the last command.
497 exit
498}
499
81ecdfbb
RW
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
bec39cab
AC
511esac
512
81ecdfbb
RW
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
bec39cab 516else
81ecdfbb
RW
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
bec39cab 519fi
81ecdfbb
RW
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 522 as_ln_s='ln -s'
81ecdfbb
RW
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
81ecdfbb 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
81ecdfbb
RW
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
b4e70030 533 fi
bec39cab 534else
d0ac1c44 535 as_ln_s='cp -pR'
bec39cab 536fi
81ecdfbb
RW
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
bec39cab
AC
539
540if mkdir -p . 2>/dev/null; then
81ecdfbb 541 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
bec39cab
AC
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c906108c 559
bec39cab 560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bec39cab
AC
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
bec39cab
AC
565#
566# Initializations.
567#
c906108c 568ac_default_prefix=/usr/local
81ecdfbb 569ac_clean_files=
bec39cab 570ac_config_libobj_dir=.
81ecdfbb 571LIBOBJS=
bec39cab
AC
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
b4e70030 576
bec39cab
AC
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
81ecdfbb 583PACKAGE_URL=
bec39cab
AC
584
585ac_unique_file="main.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
81ecdfbb 589#ifdef HAVE_SYS_TYPES_H
bec39cab
AC
590# include <sys/types.h>
591#endif
81ecdfbb 592#ifdef HAVE_SYS_STAT_H
bec39cab
AC
593# include <sys/stat.h>
594#endif
81ecdfbb 595#ifdef STDC_HEADERS
bec39cab
AC
596# include <stdlib.h>
597# include <stddef.h>
598#else
81ecdfbb 599# ifdef HAVE_STDLIB_H
bec39cab
AC
600# include <stdlib.h>
601# endif
602#endif
81ecdfbb
RW
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
bec39cab
AC
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
81ecdfbb 609#ifdef HAVE_STRINGS_H
bec39cab
AC
610# include <strings.h>
611#endif
81ecdfbb 612#ifdef HAVE_INTTYPES_H
bec39cab 613# include <inttypes.h>
bec39cab 614#endif
81ecdfbb
RW
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
bec39cab
AC
619# include <unistd.h>
620#endif"
621
81ecdfbb 622enable_option_checking=no
d0ac1c44 623ac_header_list=
c971b7fa 624ac_subst_vars='LTLIBOBJS
81ecdfbb 625LIBOBJS
b292c783
JK
626GCORE_TRANSFORM_NAME
627GDB_TRANSFORM_NAME
e3487908 628XSLTPROC
a0a461e5 629NM_H
81ecdfbb 630GDB_NM_FILE
ccb1ba62
CB
631LTLIBXXHASH
632LIBXXHASH
633HAVE_LIBXXHASH
1776e3e5
NA
634CTF_DEPS
635LIBCTF
636ENABLE_LIBCTF
393fd4c3
YQ
637LTLIBBABELTRACE
638LIBBABELTRACE
639HAVE_LIBBABELTRACE
21ea5acd
SDJ
640HAVE_NATIVE_GCORE_HOST
641NAT_GENERATED_FILES
642XM_CLIBS
643MH_CFLAGS
644LOADLIBES
645NAT_CDEPS
646NATDEPFILES
647NAT_FILE
81ecdfbb
RW
648target_subdir
649CONFIG_UNINSTALL
650CONFIG_INSTALL
651CONFIG_CLEAN
652CONFIG_ALL
653CONFIG_SRCS
654CONFIG_DEPS
655CONFIG_OBS
656PROFILE_CFLAGS
657ENABLE_CFLAGS
658SIM_OBS
659SIM
660XMKMF
661GDBTK_SRC_DIR
662GDBTK_CFLAGS
663GDBTKLIBS
664X_LIBS
665X_LDFLAGS
666X_CFLAGS
667TK_XINCLUDES
668TK_DEPS
669TK_LIBRARY
670TK_INCLUDE
671TK_STUB_LIB_SPEC
672TK_STUB_LIB_FLAG
673TK_STUB_LIB_FILE
674TK_LIB_SPEC
675TK_LIB_FLAG
676TK_LIB_FILE
677TK_SRC_DIR
678TK_BIN_DIR
679TK_VERSION
680TCL_DEPS
681TCL_LIBRARY
682TCL_INCLUDE
683TCL_STUB_LIB_SPEC
684TCL_STUB_LIB_FLAG
685TCL_STUB_LIB_FILE
686TCL_LIB_SPEC
687TCL_LIB_FLAG
688TCL_LIB_FILE
689TCL_SRC_DIR
690TCL_BIN_DIR
691TCL_PATCH_LEVEL
692TCL_VERSION
693WIN32LDAPP
b2ceabe8 694WIN32LIBS
81ecdfbb
RW
695GUI_CFLAGS_X
696LIBGUI
608e2dbb
TT
697LTLIBLZMA
698LIBLZMA
699HAVE_LIBLZMA
81ecdfbb
RW
700SER_HARDWIRE
701WERROR_CFLAGS
702WARN_CFLAGS
ed2a2229 703SYSTEM_GDBINIT_DIR
81ecdfbb 704SYSTEM_GDBINIT
81ecdfbb
RW
705TARGET_SYSTEM_ROOT
706CONFIG_LDFLAGS
f6528abd 707RDYNAMIC
05ea2a05
TT
708LTLIBIPT
709LIBIPT
710HAVE_LIBIPT
5e030278
TT
711PTHREAD_CFLAGS
712PTHREAD_LIBS
713PTHREAD_CC
714ax_pthread_config
715SED
81ecdfbb 716ALLOCA
62f29fda
TT
717SRCHIGH_CFLAGS
718SRCHIGH_LIBS
4df42755
DE
719HAVE_GUILE_FALSE
720HAVE_GUILE_TRUE
ed3ef339
DE
721GUILE_LIBS
722GUILE_CPPFLAGS
e76c5d17
DE
723GUILD_TARGET_FLAG
724GUILD
ed3ef339 725pkg_config_prog_path
4df42755
DE
726HAVE_PYTHON_FALSE
727HAVE_PYTHON_TRUE
ac534cba
JB
728PYTHON_LIBS
729PYTHON_CPPFLAGS
81ecdfbb 730PYTHON_CFLAGS
ec685c5e 731python_prog_path
2400729e
UW
732LTLIBMPFR
733LIBMPFR
734HAVE_LIBMPFR
2c947d9b
JB
735LTLIBGMP
736LIBGMP
737HAVE_LIBGMP
81ecdfbb
RW
738LTLIBEXPAT
739LIBEXPAT
740HAVE_LIBEXPAT
b8e0a31c 741JIT_READER_DIR
f997c383 742TARGET_PTR
39037522 743READLINE_TEXI_INCFLAG
81ecdfbb
RW
744READLINE_CFLAGS
745READLINE_DEPS
746READLINE
016a3251
DD
747LTLIBICONV
748LIBICONV
711a72d3
L
749zlibinc
750zlibdir
81ecdfbb
RW
751MIG
752WINDRES
753DLLTOOL
c971b7fa 754AR
81ecdfbb
RW
755YFLAGS
756YACC
c971b7fa 757RANLIB
81ecdfbb 758LN_S
c971b7fa
PA
759INSTALL_DATA
760INSTALL_SCRIPT
761INSTALL_PROGRAM
762AWK
81ecdfbb
RW
763REPORT_BUGS_TEXI
764REPORT_BUGS_TO
765PKGVERSION
44cee4fd 766CODESIGN_CERT
f6720b1c
AM
767DEBUGINFOD_LIBS
768DEBUGINFOD_CFLAGS
769PKG_CONFIG_LIBDIR
770PKG_CONFIG_PATH
771PKG_CONFIG
b292c783 772HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
773TARGET_OBS
774subdirs
775GDB_DATADIR
776DEBUGDIR
5048e516
JK
777MAKEINFO_EXTRA_FLAGS
778MAKEINFOFLAGS
779MAKEINFO
81ecdfbb 780PACKAGE
81ecdfbb
RW
781CATOBJEXT
782GENCAT
783INSTOBJEXT
784DATADIRNAME
785CATALOGS
786POSUB
787GMSGFMT
788XGETTEXT
789INCINTL
790LIBINTL_DEP
791LIBINTL
792USE_NLS
81ecdfbb
RW
793CCDEPMODE
794DEPDIR
795am__leading_dot
0bcda685
PA
796CXX_DIALECT
797HAVE_CXX11
4869db5e
RM
798INSTALL_STRIP_PROGRAM
799STRIP
800install_sh
c8693053 801LARGEFILE_CPPFLAGS
81ecdfbb
RW
802target_os
803target_vendor
804target_cpu
805target
806host_os
807host_vendor
808host_cpu
809host
810build_os
811build_vendor
812build_cpu
813build
c971b7fa
PA
814EGREP
815GREP
816CPP
3bc3d82a
PA
817ac_ct_CXX
818CXXFLAGS
819CXX
81ecdfbb
RW
820OBJEXT
821EXEEXT
822ac_ct_CC
823CPPFLAGS
824LDFLAGS
825CFLAGS
826CC
827MAINT
828MAINTAINER_MODE_FALSE
829MAINTAINER_MODE_TRUE
830target_alias
831host_alias
832build_alias
833LIBS
834ECHO_T
835ECHO_N
836ECHO_C
837DEFS
838mandir
839localedir
840libdir
841psdir
842pdfdir
843dvidir
844htmldir
845infodir
846docdir
847oldincludedir
848includedir
849localstatedir
850sharedstatedir
851sysconfdir
852datadir
853datarootdir
854libexecdir
855sbindir
856bindir
857program_transform_name
858prefix
859exec_prefix
860PACKAGE_URL
861PACKAGE_BUGREPORT
862PACKAGE_STRING
863PACKAGE_VERSION
864PACKAGE_TARNAME
865PACKAGE_NAME
866PATH_SEPARATOR
867SHELL'
2b351b19 868ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
869ac_user_opts='
870enable_option_checking
871enable_maintainer_mode
da2f07f1
JK
872enable_plugins
873enable_largefile
81ecdfbb
RW
874with_separate_debug_dir
875with_gdb_datadir
876with_relocated_sources
7349ff92 877with_auto_load_dir
bccbefd2 878with_auto_load_safe_path
81ecdfbb
RW
879enable_targets
880enable_64_bit_bfd
81ecdfbb
RW
881enable_gdbmi
882enable_tui
883enable_gdbtk
0d79cdc4 884with_debuginfod
05e7c244 885with_libunwind_ia64
81ecdfbb
RW
886with_curses
887enable_profiling
44cee4fd 888enable_codesign
81ecdfbb
RW
889with_pkgversion
890with_bugurl
711a72d3 891with_system_zlib
016a3251
DD
892with_gnu_ld
893enable_rpath
81ecdfbb 894with_libiconv_prefix
9f1528a1 895with_libiconv_type
478aac75 896with_iconv_bin
81ecdfbb 897with_system_readline
b8e0a31c 898with_jit_reader_dir
81ecdfbb 899with_expat
81ecdfbb 900with_libexpat_prefix
9f1528a1 901with_libexpat_type
2c947d9b
JB
902with_libgmp_prefix
903with_libgmp_type
2400729e
UW
904with_mpfr
905with_libmpfr_prefix
9f1528a1 906with_libmpfr_type
81ecdfbb 907with_python
d13c7322 908with_python_libdir
ed3ef339 909with_guile
189b8c2e 910enable_source_highlight
58bfce93
MM
911with_intel_pt
912with_libipt_prefix
9f1528a1 913with_libipt_type
81ecdfbb
RW
914with_included_regex
915with_sysroot
916with_system_gdbinit
ed2a2229 917with_system_gdbinit_dir
81ecdfbb
RW
918enable_werror
919enable_build_warnings
920enable_gdb_build_warnings
f35d5ade 921enable_ubsan
608e2dbb
TT
922with_lzma
923with_liblzma_prefix
9f1528a1 924with_liblzma_type
81ecdfbb
RW
925with_tcl
926with_tk
927with_x
928enable_sim
393fd4c3
YQ
929with_babeltrace
930with_libbabeltrace_prefix
9f1528a1 931with_libbabeltrace_type
ccb1ba62 932with_xxhash
1776e3e5 933enable_libctf
ccb1ba62 934with_libxxhash_prefix
9f1528a1 935with_libxxhash_type
8ecfd7bd 936enable_unit_tests
81ecdfbb
RW
937'
938 ac_precious_vars='build_alias
939host_alias
940target_alias
941CC
942CFLAGS
943LDFLAGS
944LIBS
945CPPFLAGS
3bc3d82a
PA
946CXX
947CXXFLAGS
948CCC
81ecdfbb 949CPP
f06e05e0
JK
950MAKEINFO
951MAKEINFOFLAGS
f6720b1c
AM
952PKG_CONFIG
953PKG_CONFIG_PATH
954PKG_CONFIG_LIBDIR
955DEBUGINFOD_CFLAGS
956DEBUGINFOD_LIBS
81ecdfbb
RW
957YACC
958YFLAGS
959XMKMF'
5ae98d25 960ac_subdirs_all='testsuite
919adfe8 961gdbtk'
c906108c
SS
962
963# Initialize some variables set by options.
bec39cab
AC
964ac_init_help=
965ac_init_version=false
81ecdfbb
RW
966ac_unrecognized_opts=
967ac_unrecognized_sep=
c906108c
SS
968# The variables have the same names as the options, with
969# dashes changed to underlines.
bec39cab 970cache_file=/dev/null
c906108c 971exec_prefix=NONE
c906108c 972no_create=
c906108c
SS
973no_recursion=
974prefix=NONE
975program_prefix=NONE
976program_suffix=NONE
977program_transform_name=s,x,x,
978silent=
979site=
980srcdir=
c906108c
SS
981verbose=
982x_includes=NONE
983x_libraries=NONE
bec39cab
AC
984
985# Installation directory options.
986# These are left unexpanded so users can "make install exec_prefix=/foo"
987# and all the variables that are supposed to be based on exec_prefix
988# by default will actually change.
989# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 990# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
991bindir='${exec_prefix}/bin'
992sbindir='${exec_prefix}/sbin'
993libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
994datarootdir='${prefix}/share'
995datadir='${datarootdir}'
c906108c
SS
996sysconfdir='${prefix}/etc'
997sharedstatedir='${prefix}/com'
998localstatedir='${prefix}/var'
c906108c
SS
999includedir='${prefix}/include'
1000oldincludedir='/usr/include'
81ecdfbb
RW
1001docdir='${datarootdir}/doc/${PACKAGE}'
1002infodir='${datarootdir}/info'
1003htmldir='${docdir}'
1004dvidir='${docdir}'
1005pdfdir='${docdir}'
1006psdir='${docdir}'
1007libdir='${exec_prefix}/lib'
1008localedir='${datarootdir}/locale'
1009mandir='${datarootdir}/man'
c906108c 1010
c906108c 1011ac_prev=
81ecdfbb 1012ac_dashdash=
c906108c
SS
1013for ac_option
1014do
c906108c
SS
1015 # If the previous option needs an argument, assign it.
1016 if test -n "$ac_prev"; then
81ecdfbb 1017 eval $ac_prev=\$ac_option
c906108c
SS
1018 ac_prev=
1019 continue
1020 fi
1021
81ecdfbb 1022 case $ac_option in
d0ac1c44
SM
1023 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1024 *=) ac_optarg= ;;
1025 *) ac_optarg=yes ;;
81ecdfbb 1026 esac
c906108c
SS
1027
1028 # Accept the important Cygnus configure options, so we can diagnose typos.
1029
81ecdfbb
RW
1030 case $ac_dashdash$ac_option in
1031 --)
1032 ac_dashdash=yes ;;
c906108c
SS
1033
1034 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1035 ac_prev=bindir ;;
1036 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1037 bindir=$ac_optarg ;;
c906108c
SS
1038
1039 -build | --build | --buil | --bui | --bu)
bec39cab 1040 ac_prev=build_alias ;;
c906108c 1041 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1042 build_alias=$ac_optarg ;;
c906108c
SS
1043
1044 -cache-file | --cache-file | --cache-fil | --cache-fi \
1045 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1046 ac_prev=cache_file ;;
1047 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1048 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1049 cache_file=$ac_optarg ;;
1050
1051 --config-cache | -C)
1052 cache_file=config.cache ;;
c906108c 1053
81ecdfbb 1054 -datadir | --datadir | --datadi | --datad)
c906108c 1055 ac_prev=datadir ;;
81ecdfbb 1056 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1057 datadir=$ac_optarg ;;
c906108c 1058
81ecdfbb
RW
1059 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1060 | --dataroo | --dataro | --datar)
1061 ac_prev=datarootdir ;;
1062 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1063 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1064 datarootdir=$ac_optarg ;;
1065
c906108c 1066 -disable-* | --disable-*)
81ecdfbb 1067 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1068 # Reject names that are not valid shell variable names.
81ecdfbb 1069 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1070 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1071 ac_useropt_orig=$ac_useropt
1072 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1073 case $ac_user_opts in
1074 *"
1075"enable_$ac_useropt"
1076"*) ;;
1077 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1078 ac_unrecognized_sep=', ';;
1079 esac
1080 eval enable_$ac_useropt=no ;;
1081
1082 -docdir | --docdir | --docdi | --doc | --do)
1083 ac_prev=docdir ;;
1084 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1085 docdir=$ac_optarg ;;
1086
1087 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1088 ac_prev=dvidir ;;
1089 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1090 dvidir=$ac_optarg ;;
c906108c
SS
1091
1092 -enable-* | --enable-*)
81ecdfbb 1093 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1094 # Reject names that are not valid shell variable names.
81ecdfbb 1095 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1096 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1097 ac_useropt_orig=$ac_useropt
1098 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1099 case $ac_user_opts in
1100 *"
1101"enable_$ac_useropt"
1102"*) ;;
1103 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1104 ac_unrecognized_sep=', ';;
b4e70030 1105 esac
81ecdfbb 1106 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1107
1108 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1109 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1110 | --exec | --exe | --ex)
1111 ac_prev=exec_prefix ;;
1112 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1113 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1114 | --exec=* | --exe=* | --ex=*)
bec39cab 1115 exec_prefix=$ac_optarg ;;
c906108c
SS
1116
1117 -gas | --gas | --ga | --g)
1118 # Obsolete; use --with-gas.
1119 with_gas=yes ;;
1120
bec39cab
AC
1121 -help | --help | --hel | --he | -h)
1122 ac_init_help=long ;;
1123 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1124 ac_init_help=recursive ;;
1125 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1126 ac_init_help=short ;;
c906108c
SS
1127
1128 -host | --host | --hos | --ho)
bec39cab 1129 ac_prev=host_alias ;;
c906108c 1130 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1131 host_alias=$ac_optarg ;;
c906108c 1132
81ecdfbb
RW
1133 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1134 ac_prev=htmldir ;;
1135 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1136 | --ht=*)
1137 htmldir=$ac_optarg ;;
1138
c906108c
SS
1139 -includedir | --includedir | --includedi | --included | --include \
1140 | --includ | --inclu | --incl | --inc)
1141 ac_prev=includedir ;;
1142 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1143 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1144 includedir=$ac_optarg ;;
c906108c
SS
1145
1146 -infodir | --infodir | --infodi | --infod | --info | --inf)
1147 ac_prev=infodir ;;
1148 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1149 infodir=$ac_optarg ;;
c906108c
SS
1150
1151 -libdir | --libdir | --libdi | --libd)
1152 ac_prev=libdir ;;
1153 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1154 libdir=$ac_optarg ;;
c906108c
SS
1155
1156 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1157 | --libexe | --libex | --libe)
1158 ac_prev=libexecdir ;;
1159 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1160 | --libexe=* | --libex=* | --libe=*)
bec39cab 1161 libexecdir=$ac_optarg ;;
c906108c 1162
81ecdfbb
RW
1163 -localedir | --localedir | --localedi | --localed | --locale)
1164 ac_prev=localedir ;;
1165 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1166 localedir=$ac_optarg ;;
1167
c906108c 1168 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1169 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1170 ac_prev=localstatedir ;;
1171 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1172 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1173 localstatedir=$ac_optarg ;;
c906108c
SS
1174
1175 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1176 ac_prev=mandir ;;
1177 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1178 mandir=$ac_optarg ;;
c906108c
SS
1179
1180 -nfp | --nfp | --nf)
1181 # Obsolete; use --without-fp.
1182 with_fp=no ;;
1183
1184 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1185 | --no-cr | --no-c | -n)
c906108c
SS
1186 no_create=yes ;;
1187
1188 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1189 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1190 no_recursion=yes ;;
1191
1192 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1193 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1194 | --oldin | --oldi | --old | --ol | --o)
1195 ac_prev=oldincludedir ;;
1196 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1197 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1198 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1199 oldincludedir=$ac_optarg ;;
c906108c
SS
1200
1201 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1202 ac_prev=prefix ;;
1203 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1204 prefix=$ac_optarg ;;
c906108c
SS
1205
1206 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1207 | --program-pre | --program-pr | --program-p)
1208 ac_prev=program_prefix ;;
1209 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1210 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1211 program_prefix=$ac_optarg ;;
c906108c
SS
1212
1213 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1214 | --program-suf | --program-su | --program-s)
1215 ac_prev=program_suffix ;;
1216 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1217 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1218 program_suffix=$ac_optarg ;;
c906108c
SS
1219
1220 -program-transform-name | --program-transform-name \
1221 | --program-transform-nam | --program-transform-na \
1222 | --program-transform-n | --program-transform- \
1223 | --program-transform | --program-transfor \
1224 | --program-transfo | --program-transf \
1225 | --program-trans | --program-tran \
1226 | --progr-tra | --program-tr | --program-t)
1227 ac_prev=program_transform_name ;;
1228 -program-transform-name=* | --program-transform-name=* \
1229 | --program-transform-nam=* | --program-transform-na=* \
1230 | --program-transform-n=* | --program-transform-=* \
1231 | --program-transform=* | --program-transfor=* \
1232 | --program-transfo=* | --program-transf=* \
1233 | --program-trans=* | --program-tran=* \
1234 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1235 program_transform_name=$ac_optarg ;;
c906108c 1236
81ecdfbb
RW
1237 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1238 ac_prev=pdfdir ;;
1239 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1240 pdfdir=$ac_optarg ;;
1241
1242 -psdir | --psdir | --psdi | --psd | --ps)
1243 ac_prev=psdir ;;
1244 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1245 psdir=$ac_optarg ;;
1246
c906108c
SS
1247 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1248 | -silent | --silent | --silen | --sile | --sil)
1249 silent=yes ;;
1250
1251 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1252 ac_prev=sbindir ;;
1253 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1254 | --sbi=* | --sb=*)
bec39cab 1255 sbindir=$ac_optarg ;;
c906108c
SS
1256
1257 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1258 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1259 | --sharedst | --shareds | --shared | --share | --shar \
1260 | --sha | --sh)
1261 ac_prev=sharedstatedir ;;
1262 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1263 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1264 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1265 | --sha=* | --sh=*)
bec39cab 1266 sharedstatedir=$ac_optarg ;;
c906108c
SS
1267
1268 -site | --site | --sit)
1269 ac_prev=site ;;
1270 -site=* | --site=* | --sit=*)
bec39cab 1271 site=$ac_optarg ;;
3ace7edb 1272
c906108c
SS
1273 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1274 ac_prev=srcdir ;;
1275 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1276 srcdir=$ac_optarg ;;
c906108c
SS
1277
1278 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1279 | --syscon | --sysco | --sysc | --sys | --sy)
1280 ac_prev=sysconfdir ;;
1281 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1282 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1283 sysconfdir=$ac_optarg ;;
c906108c
SS
1284
1285 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1286 ac_prev=target_alias ;;
c906108c 1287 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1288 target_alias=$ac_optarg ;;
c906108c
SS
1289
1290 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1291 verbose=yes ;;
1292
bec39cab
AC
1293 -version | --version | --versio | --versi | --vers | -V)
1294 ac_init_version=: ;;
c906108c
SS
1295
1296 -with-* | --with-*)
81ecdfbb 1297 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1298 # Reject names that are not valid shell variable names.
81ecdfbb 1299 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1300 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1301 ac_useropt_orig=$ac_useropt
1302 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1303 case $ac_user_opts in
1304 *"
1305"with_$ac_useropt"
1306"*) ;;
1307 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1308 ac_unrecognized_sep=', ';;
b4e70030 1309 esac
81ecdfbb 1310 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1311
1312 -without-* | --without-*)
81ecdfbb 1313 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1314 # Reject names that are not valid shell variable names.
81ecdfbb 1315 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1316 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1317 ac_useropt_orig=$ac_useropt
1318 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1319 case $ac_user_opts in
1320 *"
1321"with_$ac_useropt"
1322"*) ;;
1323 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1324 ac_unrecognized_sep=', ';;
1325 esac
1326 eval with_$ac_useropt=no ;;
c906108c
SS
1327
1328 --x)
1329 # Obsolete; use --with-x.
1330 with_x=yes ;;
1331
1332 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1333 | --x-incl | --x-inc | --x-in | --x-i)
1334 ac_prev=x_includes ;;
1335 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1336 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1337 x_includes=$ac_optarg ;;
c906108c
SS
1338
1339 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1340 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1341 ac_prev=x_libraries ;;
1342 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1343 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1344 x_libraries=$ac_optarg ;;
c906108c 1345
d0ac1c44
SM
1346 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1347Try \`$0 --help' for more information"
c906108c
SS
1348 ;;
1349
bec39cab
AC
1350 *=*)
1351 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1352 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1353 case $ac_envvar in #(
1354 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1355 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1356 esac
1357 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1358 export $ac_envvar ;;
1359
c906108c 1360 *)
bec39cab 1361 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1362 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1363 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1364 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1365 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1366 ;;
1367
1368 esac
1369done
1370
1371if test -n "$ac_prev"; then
bec39cab 1372 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1373 as_fn_error $? "missing argument to $ac_option"
c906108c 1374fi
c906108c 1375
81ecdfbb
RW
1376if test -n "$ac_unrecognized_opts"; then
1377 case $enable_option_checking in
1378 no) ;;
d0ac1c44 1379 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1380 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1381 esac
81ecdfbb 1382fi
b4e70030 1383
81ecdfbb
RW
1384# Check all directory arguments for consistency.
1385for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1386 datadir sysconfdir sharedstatedir localstatedir includedir \
1387 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1388 libdir localedir mandir
b4e70030 1389do
81ecdfbb
RW
1390 eval ac_val=\$$ac_var
1391 # Remove trailing slashes.
1392 case $ac_val in
1393 */ )
1394 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1395 eval $ac_var=\$ac_val;;
1396 esac
1397 # Be sure to have absolute directory names.
b4e70030 1398 case $ac_val in
81ecdfbb
RW
1399 [\\/$]* | ?:[\\/]* ) continue;;
1400 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1401 esac
d0ac1c44 1402 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1403done
1404
bec39cab
AC
1405# There might be people who depend on the old broken behavior: `$host'
1406# used to hold the argument of --host etc.
1407# FIXME: To remove some day.
1408build=$build_alias
1409host=$host_alias
1410target=$target_alias
1411
1412# FIXME: To remove some day.
1413if test "x$host_alias" != x; then
1414 if test "x$build_alias" = x; then
1415 cross_compiling=maybe
bec39cab
AC
1416 elif test "x$build_alias" != "x$host_alias"; then
1417 cross_compiling=yes
1418 fi
1419fi
c906108c 1420
bec39cab
AC
1421ac_tool_prefix=
1422test -n "$host_alias" && ac_tool_prefix=$host_alias-
1423
1424test "$silent" = yes && exec 6>/dev/null
c906108c 1425
c906108c 1426
81ecdfbb
RW
1427ac_pwd=`pwd` && test -n "$ac_pwd" &&
1428ac_ls_di=`ls -di .` &&
1429ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1430 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1431test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1432 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1433
1434
c906108c
SS
1435# Find the source files, if location was not specified.
1436if test -z "$srcdir"; then
1437 ac_srcdir_defaulted=yes
81ecdfbb
RW
1438 # Try the directory containing this script, then the parent directory.
1439 ac_confdir=`$as_dirname -- "$as_myself" ||
1440$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1441 X"$as_myself" : 'X\(//\)[^/]' \| \
1442 X"$as_myself" : 'X\(//\)$' \| \
1443 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1444$as_echo X"$as_myself" |
1445 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1446 s//\1/
1447 q
1448 }
1449 /^X\(\/\/\)[^/].*/{
1450 s//\1/
1451 q
1452 }
1453 /^X\(\/\/\)$/{
1454 s//\1/
1455 q
1456 }
1457 /^X\(\/\).*/{
1458 s//\1/
1459 q
1460 }
1461 s/.*/./; q'`
c906108c 1462 srcdir=$ac_confdir
81ecdfbb 1463 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1464 srcdir=..
1465 fi
1466else
1467 ac_srcdir_defaulted=no
1468fi
81ecdfbb
RW
1469if test ! -r "$srcdir/$ac_unique_file"; then
1470 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1471 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1472fi
1473ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1474ac_abs_confdir=`(
d0ac1c44 1475 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1476 pwd)`
1477# When building in place, set srcdir=.
1478if test "$ac_abs_confdir" = "$ac_pwd"; then
1479 srcdir=.
1480fi
1481# Remove unnecessary trailing slashes from srcdir.
1482# Double slashes in file names in object file debugging info
1483# mess up M-x gdb in Emacs.
1484case $srcdir in
1485*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1486esac
1487for ac_var in $ac_precious_vars; do
1488 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1489 eval ac_env_${ac_var}_value=\$${ac_var}
1490 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1491 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1492done
c906108c 1493
bec39cab
AC
1494#
1495# Report the --help message.
1496#
1497if test "$ac_init_help" = "long"; then
1498 # Omit some internal or obsolete options to make the list less imposing.
1499 # This message is too long to be a string in the A/UX 3.1 sh.
1500 cat <<_ACEOF
1501\`configure' configures this package to adapt to many kinds of systems.
1502
1503Usage: $0 [OPTION]... [VAR=VALUE]...
1504
1505To assign environment variables (e.g., CC, CFLAGS...), specify them as
1506VAR=VALUE. See below for descriptions of some of the useful variables.
1507
1508Defaults for the options are specified in brackets.
1509
1510Configuration:
1511 -h, --help display this help and exit
1512 --help=short display options specific to this package
1513 --help=recursive display the short help of all the included packages
1514 -V, --version display version information and exit
d0ac1c44 1515 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1516 --cache-file=FILE cache test results in FILE [disabled]
1517 -C, --config-cache alias for \`--cache-file=config.cache'
1518 -n, --no-create do not create output files
1519 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1520
bec39cab
AC
1521Installation directories:
1522 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1523 [$ac_default_prefix]
bec39cab 1524 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1525 [PREFIX]
bec39cab
AC
1526
1527By default, \`make install' will install all the files in
1528\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1529an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1530for instance \`--prefix=\$HOME'.
1531
1532For better control, use the options below.
1533
1534Fine tuning of the installation directories:
81ecdfbb
RW
1535 --bindir=DIR user executables [EPREFIX/bin]
1536 --sbindir=DIR system admin executables [EPREFIX/sbin]
1537 --libexecdir=DIR program executables [EPREFIX/libexec]
1538 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1539 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1540 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1541 --libdir=DIR object code libraries [EPREFIX/lib]
1542 --includedir=DIR C header files [PREFIX/include]
1543 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1544 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1545 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1546 --infodir=DIR info documentation [DATAROOTDIR/info]
1547 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1548 --mandir=DIR man documentation [DATAROOTDIR/man]
1549 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1550 --htmldir=DIR html documentation [DOCDIR]
1551 --dvidir=DIR dvi documentation [DOCDIR]
1552 --pdfdir=DIR pdf documentation [DOCDIR]
1553 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1554_ACEOF
1555
1556 cat <<\_ACEOF
1557
9009e1ae
MR
1558Program names:
1559 --program-prefix=PREFIX prepend PREFIX to installed program names
1560 --program-suffix=SUFFIX append SUFFIX to installed program names
1561 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1562
bec39cab
AC
1563X features:
1564 --x-includes=DIR X include files are in DIR
1565 --x-libraries=DIR X library files are in DIR
1566
1567System types:
1568 --build=BUILD configure for building on BUILD [guessed]
1569 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1570 --target=TARGET configure for building compilers for TARGET [HOST]
1571_ACEOF
1572fi
1573
1574if test -n "$ac_init_help"; then
1575
1576 cat <<\_ACEOF
1577
1578Optional Features:
81ecdfbb 1579 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1580 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1581 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1582 --enable-maintainer-mode
1583 enable make rules and dependencies not useful (and
1584 sometimes confusing) to the casual installer
2974be62 1585 --enable-plugins Enable support for plugins
da2f07f1 1586 --disable-largefile omit support for large files
a1220294
TT
1587 --enable-targets=TARGETS
1588 alternative target configurations
c0993dbe 1589 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1590 --disable-gdbmi disable machine-interface (MI)
1591 --enable-tui enable full-screen terminal user interface (TUI)
1592 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1593 --enable-profiling enable profiling of GDB
44cee4fd 1594 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1595 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1596 --enable-source-highlight
1597 enable source-highlight for source listings
a1220294 1598 --enable-werror treat compile warnings as errors
32c1c914 1599 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1600 --enable-gdb-build-warnings
32c1c914 1601 enable GDB specific build-time compiler warnings if
a1220294 1602 gcc is used
f35d5ade 1603 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1604 --enable-sim link gdb with simulator
1776e3e5 1605 --enable-libctf Handle .ctf type-info sections [default=yes]
8ecfd7bd
SDJ
1606 --enable-unit-tests Enable the inclusion of unit tests when compiling
1607 GDB
bec39cab
AC
1608
1609Optional Packages:
1610 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1611 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1612 --with-separate-debug-dir=PATH
32c1c914 1613 look for global separate debug info in this path
62e4f60c 1614 [LIBDIR/debug]
b14b1491
TT
1615 --with-gdb-datadir=PATH look for global separate data files in this path
1616 [DATADIR/gdb]
29b0e8a2 1617 --with-relocated-sources=PATH
32c1c914 1618 automatically relocate this path for source files
7349ff92 1619 --with-auto-load-dir=PATH
aff139ff 1620 directories from which to load auto-loaded scripts
1564a261 1621 [$debugdir:$datadir/auto-load]
bccbefd2 1622 --with-auto-load-safe-path=PATH
aff139ff 1623 directories safe to hold auto-loaded files
7349ff92 1624 [--with-auto-load-dir]
bccbefd2
JK
1625 --without-auto-load-safe-path
1626 do not restrict auto-loaded files locations
0d79cdc4
AM
1627 --with-debuginfod Enable debuginfo lookups with debuginfod
1628 (auto/yes/no)
05e7c244 1629 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1630 --with-curses use the curses library instead of the termcap
1631 library
c16158bc
JM
1632 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1633 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1634 --with-system-zlib use installed libz
016a3251
DD
1635 --with-gnu-ld assume the C compiler uses GNU ld default=no
1636 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1637 --without-libiconv-prefix don't search for libiconv in includedir and libdir
9f1528a1 1638 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
478aac75 1639 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1640 --with-system-readline use installed readline library
b8e0a31c
SD
1641 --with-jit-reader-dir=PATH
1642 directory to load the JIT readers from
5c39566f 1643 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1644 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1645 --without-libexpat-prefix don't search for libexpat in includedir and libdir
9f1528a1 1646 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
2c947d9b
JB
1647 --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib
1648 --without-libgmp-prefix don't search for libgmp in includedir and libdir
1649 --with-libgmp-type=TYPE type of library to search for (auto/static/shared)
2400729e
UW
1650 --with-mpfr include MPFR support (auto/yes/no)
1651 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1652 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
9f1528a1 1653 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
0c4a4063
DE
1654 --with-python[=PYTHON] include python support
1655 (auto/yes/no/<python-program>)
d13c7322
AB
1656 --with-python-libdir[=DIR]
1657 search for python's libraries in DIR
ed3ef339
DE
1658 --with-guile[=GUILE] include guile support
1659 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1660 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1661 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1662 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1663 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
a1220294
TT
1664 --without-included-regex
1665 don't use included regex; this is the default on
1666 systems with version 2 of the GNU C library (use
1667 with caution on other system)
81ecdfbb 1668 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1669 --with-system-gdbinit=PATH
32c1c914 1670 automatically load a system-wide gdbinit file
ed2a2229
CB
1671 --with-system-gdbinit-dir=PATH
1672 automatically load system-wide gdbinit files from
1673 this directory
608e2dbb
TT
1674 --with-lzma support lzma compression (auto/yes/no)
1675 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1676 --without-liblzma-prefix don't search for liblzma in includedir and libdir
9f1528a1 1677 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
5062cc19
KS
1678 --with-tcl directory containing tcl configuration (tclConfig.sh)
1679 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1680 --with-x use the X Window System
393fd4c3
YQ
1681 --with-babeltrace include babeltrace support (auto/yes/no)
1682 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1683 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
9f1528a1 1684 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
ccb1ba62
CB
1685 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1686 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1687 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
9f1528a1 1688 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
bec39cab
AC
1689
1690Some influential environment variables:
1691 CC C compiler command
1692 CFLAGS C compiler flags
1693 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1694 nonstandard directory <lib dir>
81ecdfbb 1695 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1696 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1697 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1698 CXX C++ compiler command
1699 CXXFLAGS C++ compiler flags
bec39cab 1700 CPP C preprocessor
f06e05e0
JK
1701 MAKEINFO Parent configure detects if it is of sufficient version.
1702 MAKEINFOFLAGS
1703 Parameters for MAKEINFO.
f6720b1c
AM
1704 PKG_CONFIG path to pkg-config utility
1705 PKG_CONFIG_PATH
1706 directories to add to pkg-config's search path
1707 PKG_CONFIG_LIBDIR
1708 path overriding pkg-config's built-in search path
1709 DEBUGINFOD_CFLAGS
1710 C compiler flags for DEBUGINFOD, overriding pkg-config
1711 DEBUGINFOD_LIBS
1712 linker flags for DEBUGINFOD, overriding pkg-config
d0ac1c44
SM
1713 YACC The `Yet Another Compiler Compiler' implementation to use.
1714 Defaults to the first program found out of: `bison -y', `byacc',
1715 `yacc'.
81ecdfbb
RW
1716 YFLAGS The list of arguments that will be passed by default to $YACC.
1717 This script will default YFLAGS to the empty string to avoid a
1718 default value of `-d' given by some make applications.
1719 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1720
1721Use these variables to override the choices made by `configure' or to help
1722it to find libraries and programs with nonstandard names/locations.
1723
81ecdfbb 1724Report bugs to the package provider.
bec39cab 1725_ACEOF
81ecdfbb 1726ac_status=$?
bec39cab
AC
1727fi
1728
1729if test "$ac_init_help" = "recursive"; then
1730 # If there are subdirs, report their specific --help.
bec39cab 1731 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1732 test -d "$ac_dir" ||
1733 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1734 continue
bec39cab
AC
1735 ac_builddir=.
1736
81ecdfbb
RW
1737case "$ac_dir" in
1738.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1739*)
1740 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1741 # A ".." for each directory in $ac_dir_suffix.
1742 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1743 case $ac_top_builddir_sub in
1744 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1745 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1746 esac ;;
1747esac
1748ac_abs_top_builddir=$ac_pwd
1749ac_abs_builddir=$ac_pwd$ac_dir_suffix
1750# for backward compatibility:
1751ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1752
1753case $srcdir in
81ecdfbb 1754 .) # We are building in place.
bec39cab 1755 ac_srcdir=.
81ecdfbb
RW
1756 ac_top_srcdir=$ac_top_builddir_sub
1757 ac_abs_top_srcdir=$ac_pwd ;;
1758 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1759 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1760 ac_top_srcdir=$srcdir
1761 ac_abs_top_srcdir=$srcdir ;;
1762 *) # Relative name.
1763 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1764 ac_top_srcdir=$ac_top_build_prefix$srcdir
1765 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1766esac
81ecdfbb 1767ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1768
81ecdfbb
RW
1769 cd "$ac_dir" || { ac_status=$?; continue; }
1770 # Check for guested configure.
1771 if test -f "$ac_srcdir/configure.gnu"; then
1772 echo &&
1773 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1774 elif test -f "$ac_srcdir/configure"; then
1775 echo &&
1776 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1777 else
81ecdfbb
RW
1778 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1779 fi || ac_status=$?
1780 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1781 done
1782fi
1783
81ecdfbb 1784test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1785if $ac_init_version; then
1786 cat <<\_ACEOF
81ecdfbb 1787configure
d0ac1c44 1788generated by GNU Autoconf 2.69
bec39cab 1789
d0ac1c44 1790Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1791This configure script is free software; the Free Software Foundation
1792gives unlimited permission to copy, distribute and modify it.
1793_ACEOF
81ecdfbb 1794 exit
bec39cab 1795fi
bec39cab 1796
81ecdfbb
RW
1797## ------------------------ ##
1798## Autoconf initialization. ##
1799## ------------------------ ##
bec39cab 1800
81ecdfbb
RW
1801# ac_fn_c_try_compile LINENO
1802# --------------------------
1803# Try to compile conftest.$ac_ext, and return whether this succeeded.
1804ac_fn_c_try_compile ()
1805{
1806 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1807 rm -f conftest.$ac_objext
1808 if { { ac_try="$ac_compile"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_compile") 2>conftest.err
1816 ac_status=$?
1817 if test -s conftest.err; then
1818 grep -v '^ *+' conftest.err >conftest.er1
1819 cat conftest.er1 >&5
1820 mv -f conftest.er1 conftest.err
1821 fi
1822 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1823 test $ac_status = 0; } && {
1824 test -z "$ac_c_werror_flag" ||
1825 test ! -s conftest.err
1826 } && test -s conftest.$ac_objext; then :
1827 ac_retval=0
1828else
1829 $as_echo "$as_me: failed program was:" >&5
1830sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1831
81ecdfbb
RW
1832 ac_retval=1
1833fi
d0ac1c44
SM
1834 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1835 as_fn_set_status $ac_retval
81ecdfbb
RW
1836
1837} # ac_fn_c_try_compile
1838
3bc3d82a
PA
1839# ac_fn_cxx_try_compile LINENO
1840# ----------------------------
1841# Try to compile conftest.$ac_ext, and return whether this succeeded.
1842ac_fn_cxx_try_compile ()
1843{
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 rm -f conftest.$ac_objext
1846 if { { ac_try="$ac_compile"
1847case "(($ac_try" in
1848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849 *) ac_try_echo=$ac_try;;
1850esac
1851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852$as_echo "$ac_try_echo"; } >&5
1853 (eval "$ac_compile") 2>conftest.err
1854 ac_status=$?
1855 if test -s conftest.err; then
1856 grep -v '^ *+' conftest.err >conftest.er1
1857 cat conftest.er1 >&5
1858 mv -f conftest.er1 conftest.err
1859 fi
1860 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1861 test $ac_status = 0; } && {
1862 test -z "$ac_cxx_werror_flag" ||
1863 test ! -s conftest.err
1864 } && test -s conftest.$ac_objext; then :
1865 ac_retval=0
1866else
1867 $as_echo "$as_me: failed program was:" >&5
1868sed 's/^/| /' conftest.$ac_ext >&5
1869
1870 ac_retval=1
1871fi
d0ac1c44
SM
1872 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1873 as_fn_set_status $ac_retval
3bc3d82a
PA
1874
1875} # ac_fn_cxx_try_compile
1876
81ecdfbb
RW
1877# ac_fn_c_try_cpp LINENO
1878# ----------------------
1879# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1880ac_fn_c_try_cpp ()
bec39cab 1881{
81ecdfbb
RW
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 if { { ac_try="$ac_cpp conftest.$ac_ext"
1884case "(($ac_try" in
1885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1886 *) ac_try_echo=$ac_try;;
1887esac
1888eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1889$as_echo "$ac_try_echo"; } >&5
1890 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1891 ac_status=$?
1892 if test -s conftest.err; then
1893 grep -v '^ *+' conftest.err >conftest.er1
1894 cat conftest.er1 >&5
1895 mv -f conftest.er1 conftest.err
1896 fi
1897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1898 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1899 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1900 test ! -s conftest.err
1901 }; then :
1902 ac_retval=0
1903else
1904 $as_echo "$as_me: failed program was:" >&5
1905sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1906
81ecdfbb
RW
1907 ac_retval=1
1908fi
d0ac1c44
SM
1909 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1910 as_fn_set_status $ac_retval
bec39cab 1911
81ecdfbb 1912} # ac_fn_c_try_cpp
bec39cab 1913
81ecdfbb
RW
1914# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1915# -------------------------------------------------------
1916# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1917# the include files in INCLUDES and setting the cache variable VAR
1918# accordingly.
1919ac_fn_c_check_header_mongrel ()
1920{
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1922 if eval \${$3+:} false; then :
81ecdfbb
RW
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1924$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1925if eval \${$3+:} false; then :
81ecdfbb
RW
1926 $as_echo_n "(cached) " >&6
1927fi
1928eval ac_res=\$$3
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930$as_echo "$ac_res" >&6; }
1931else
1932 # Is the header compilable?
1933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1934$as_echo_n "checking $2 usability... " >&6; }
1935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$4
1938#include <$2>
1939_ACEOF
1940if ac_fn_c_try_compile "$LINENO"; then :
1941 ac_header_compiler=yes
1942else
1943 ac_header_compiler=no
1944fi
1945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1947$as_echo "$ac_header_compiler" >&6; }
bec39cab 1948
81ecdfbb
RW
1949# Is the header present?
1950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1951$as_echo_n "checking $2 presence... " >&6; }
1952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954#include <$2>
1955_ACEOF
1956if ac_fn_c_try_cpp "$LINENO"; then :
1957 ac_header_preproc=yes
1958else
1959 ac_header_preproc=no
1960fi
d0ac1c44 1961rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1963$as_echo "$ac_header_preproc" >&6; }
bec39cab 1964
81ecdfbb
RW
1965# So? What about this header?
1966case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1967 yes:no: )
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1969$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1971$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1972 ;;
1973 no:yes:* )
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1975$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1977$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1979$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1981$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1983$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1984 ;;
1985esac
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1987$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1988if eval \${$3+:} false; then :
81ecdfbb
RW
1989 $as_echo_n "(cached) " >&6
1990else
1991 eval "$3=\$ac_header_compiler"
1992fi
1993eval ac_res=\$$3
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995$as_echo "$ac_res" >&6; }
1996fi
d0ac1c44 1997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1998
81ecdfbb 1999} # ac_fn_c_check_header_mongrel
bec39cab 2000
81ecdfbb
RW
2001# ac_fn_c_try_run LINENO
2002# ----------------------
2003# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2004# that executables *can* be run.
2005ac_fn_c_try_run ()
2006{
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 if { { ac_try="$ac_link"
2009case "(($ac_try" in
2010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2011 *) ac_try_echo=$ac_try;;
2012esac
2013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2014$as_echo "$ac_try_echo"; } >&5
2015 (eval "$ac_link") 2>&5
2016 ac_status=$?
2017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2018 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2019 { { case "(($ac_try" in
2020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2021 *) ac_try_echo=$ac_try;;
2022esac
2023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2024$as_echo "$ac_try_echo"; } >&5
2025 (eval "$ac_try") 2>&5
2026 ac_status=$?
2027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028 test $ac_status = 0; }; }; then :
2029 ac_retval=0
2030else
2031 $as_echo "$as_me: program exited with status $ac_status" >&5
2032 $as_echo "$as_me: failed program was:" >&5
2033sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2034
81ecdfbb
RW
2035 ac_retval=$ac_status
2036fi
2037 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2038 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2039 as_fn_set_status $ac_retval
bec39cab 2040
81ecdfbb 2041} # ac_fn_c_try_run
bec39cab 2042
81ecdfbb
RW
2043# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2044# -------------------------------------------------------
2045# Tests whether HEADER exists and can be compiled using the include files in
2046# INCLUDES, setting the cache variable VAR accordingly.
2047ac_fn_c_check_header_compile ()
2048{
2049 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2051$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2052if eval \${$3+:} false; then :
81ecdfbb
RW
2053 $as_echo_n "(cached) " >&6
2054else
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058#include <$2>
bec39cab 2059_ACEOF
81ecdfbb
RW
2060if ac_fn_c_try_compile "$LINENO"; then :
2061 eval "$3=yes"
2062else
2063 eval "$3=no"
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066fi
2067eval ac_res=\$$3
2068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069$as_echo "$ac_res" >&6; }
d0ac1c44 2070 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2071
81ecdfbb 2072} # ac_fn_c_check_header_compile
bec39cab 2073
2974be62
AM
2074# ac_fn_c_try_link LINENO
2075# -----------------------
2076# Try to link conftest.$ac_ext, and return whether this succeeded.
2077ac_fn_c_try_link ()
2078{
2079 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2080 rm -f conftest.$ac_objext conftest$ac_exeext
2081 if { { ac_try="$ac_link"
2082case "(($ac_try" in
2083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2084 *) ac_try_echo=$ac_try;;
2085esac
2086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2087$as_echo "$ac_try_echo"; } >&5
2088 (eval "$ac_link") 2>conftest.err
2089 ac_status=$?
2090 if test -s conftest.err; then
2091 grep -v '^ *+' conftest.err >conftest.er1
2092 cat conftest.er1 >&5
2093 mv -f conftest.er1 conftest.err
2094 fi
2095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2096 test $ac_status = 0; } && {
2097 test -z "$ac_c_werror_flag" ||
2098 test ! -s conftest.err
2099 } && test -s conftest$ac_exeext && {
2100 test "$cross_compiling" = yes ||
d0ac1c44 2101 test -x conftest$ac_exeext
2974be62
AM
2102 }; then :
2103 ac_retval=0
2104else
2105 $as_echo "$as_me: failed program was:" >&5
2106sed 's/^/| /' conftest.$ac_ext >&5
2107
2108 ac_retval=1
2109fi
2110 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2111 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2112 # interfere with the next link command; also delete a directory that is
2113 # left behind by Apple's compiler. We do this before executing the actions.
2114 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2115 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2116 as_fn_set_status $ac_retval
2974be62
AM
2117
2118} # ac_fn_c_try_link
2119
81ecdfbb
RW
2120# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2121# --------------------------------------------
2122# Tries to find the compile-time value of EXPR in a program that includes
2123# INCLUDES, setting VAR accordingly. Returns whether the value could be
2124# computed
2125ac_fn_c_compute_int ()
2126{
2127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128 if test "$cross_compiling" = yes; then
2129 # Depending upon the size, compute the lo and hi bounds.
2130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2137test_array [0] = 0;
2138return test_array [0];
bec39cab 2139
81ecdfbb
RW
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_compile "$LINENO"; then :
2145 ac_lo=0 ac_mid=0
2146 while :; do
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
2153static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2154test_array [0] = 0;
2155return test_array [0];
bec39cab 2156
81ecdfbb
RW
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_hi=$ac_mid; break
2163else
2164 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2165 if test $ac_lo -le $ac_mid; then
2166 ac_lo= ac_hi=
2167 break
2168 fi
2169 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2170fi
81ecdfbb
RW
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172 done
c906108c 2173else
81ecdfbb
RW
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2175/* end confdefs.h. */
2176$4
2177int
2178main ()
2179{
2180static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2181test_array [0] = 0;
2182return test_array [0];
bec39cab 2183
81ecdfbb
RW
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188if ac_fn_c_try_compile "$LINENO"; then :
2189 ac_hi=-1 ac_mid=-1
2190 while :; do
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193$4
2194int
2195main ()
2196{
2197static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2198test_array [0] = 0;
2199return test_array [0];
bec39cab 2200
81ecdfbb
RW
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205if ac_fn_c_try_compile "$LINENO"; then :
2206 ac_lo=$ac_mid; break
2207else
2208 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2209 if test $ac_mid -le $ac_hi; then
2210 ac_lo= ac_hi=
2211 break
2212 fi
2213 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2214fi
2215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216 done
2217else
2218 ac_lo= ac_hi=
2219fi
2220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221fi
2222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2223# Binary search between lo and hi bounds.
2224while test "x$ac_lo" != "x$ac_hi"; do
2225 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2233test_array [0] = 0;
2234return test_array [0];
bec39cab 2235
81ecdfbb
RW
2236 ;
2237 return 0;
2238}
2239_ACEOF
2240if ac_fn_c_try_compile "$LINENO"; then :
2241 ac_hi=$ac_mid
2242else
2243 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2244fi
2245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246done
2247case $ac_lo in #((
2248?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2249'') ac_retval=1 ;;
2250esac
2251 else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255static long int longval () { return $2; }
2256static unsigned long int ulongval () { return $2; }
2257#include <stdio.h>
2258#include <stdlib.h>
2259int
2260main ()
2261{
bec39cab 2262
81ecdfbb
RW
2263 FILE *f = fopen ("conftest.val", "w");
2264 if (! f)
2265 return 1;
2266 if (($2) < 0)
2267 {
2268 long int i = longval ();
2269 if (i != ($2))
2270 return 1;
2271 fprintf (f, "%ld", i);
2272 }
2273 else
2274 {
2275 unsigned long int i = ulongval ();
2276 if (i != ($2))
2277 return 1;
2278 fprintf (f, "%lu", i);
2279 }
2280 /* Do not output a trailing newline, as this causes \r\n confusion
2281 on some platforms. */
2282 return ferror (f) || fclose (f) != 0;
bec39cab 2283
81ecdfbb
RW
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_run "$LINENO"; then :
2289 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2290else
2291 ac_retval=1
2292fi
2293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2294 conftest.$ac_objext conftest.beam conftest.$ac_ext
2295rm -f conftest.val
bec39cab 2296
81ecdfbb 2297 fi
d0ac1c44
SM
2298 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299 as_fn_set_status $ac_retval
bec39cab 2300
81ecdfbb 2301} # ac_fn_c_compute_int
bec39cab 2302
55a8c076
YQ
2303# ac_fn_c_check_func LINENO FUNC VAR
2304# ----------------------------------
2305# Tests whether FUNC exists, setting the cache variable VAR accordingly
2306ac_fn_c_check_func ()
81ecdfbb
RW
2307{
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2310$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2311if eval \${$3+:} false; then :
81ecdfbb
RW
2312 $as_echo_n "(cached) " >&6
2313else
81ecdfbb
RW
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h. */
55a8c076
YQ
2316/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2317 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2318#define $2 innocuous_$2
2319
2320/* System header to define __stub macros and hopefully few prototypes,
2321 which can conflict with char $2 (); below.
2322 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2323 <limits.h> exists even on freestanding compilers. */
2324
2325#ifdef __STDC__
2326# include <limits.h>
2327#else
2328# include <assert.h>
2329#endif
2330
2331#undef $2
2332
2333/* Override any GCC internal prototype to avoid an error.
2334 Use char because int might match the return type of a GCC
2335 builtin and then its argument prototype would still apply. */
2336#ifdef __cplusplus
2337extern "C"
2338#endif
2339char $2 ();
2340/* The GNU C library defines this for functions which it implements
2341 to always fail with ENOSYS. Some functions are actually named
2342 something starting with __ and the normal name is an alias. */
2343#if defined __stub_$2 || defined __stub___$2
2344choke me
2345#endif
2346
2347int
2348main ()
2349{
2350return $2 ();
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_link "$LINENO"; then :
2356 eval "$3=yes"
2357else
2358 eval "$3=no"
2359fi
2360rm -f core conftest.err conftest.$ac_objext \
2361 conftest$ac_exeext conftest.$ac_ext
2362fi
2363eval ac_res=\$$3
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2365$as_echo "$ac_res" >&6; }
d0ac1c44 2366 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2367
2368} # ac_fn_c_check_func
2369
07697489
PA
2370# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2371# -------------------------------------------
2372# Tests whether TYPE exists after having included INCLUDES, setting cache
2373# variable VAR accordingly.
2374ac_fn_c_check_type ()
2375{
2376 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2378$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2379if eval \${$3+:} false; then :
07697489
PA
2380 $as_echo_n "(cached) " >&6
2381else
2382 eval "$3=no"
2383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384/* end confdefs.h. */
2385$4
2386int
2387main ()
2388{
2389if (sizeof ($2))
2390 return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2397/* end confdefs.h. */
2398$4
2399int
2400main ()
2401{
2402if (sizeof (($2)))
2403 return 0;
2404 ;
2405 return 0;
2406}
2407_ACEOF
2408if ac_fn_c_try_compile "$LINENO"; then :
2409
2410else
2411 eval "$3=yes"
2412fi
2413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414fi
2415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416fi
2417eval ac_res=\$$3
2418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2419$as_echo "$ac_res" >&6; }
d0ac1c44 2420 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2421
2422} # ac_fn_c_check_type
2423
f6720b1c
AM
2424# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2425# ---------------------------------------------
2426# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2427# accordingly.
2428ac_fn_c_check_decl ()
2429{
2430 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431 as_decl_name=`echo $2|sed 's/ *(.*//'`
2432 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2434$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2435if eval \${$3+:} false; then :
2436 $as_echo_n "(cached) " >&6
2437else
2438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2439/* end confdefs.h. */
2440$4
2441int
2442main ()
2443{
2444#ifndef $as_decl_name
2445#ifdef __cplusplus
2446 (void) $as_decl_use;
2447#else
2448 (void) $as_decl_name;
2449#endif
2450#endif
2451
2452 ;
2453 return 0;
2454}
2455_ACEOF
2456if ac_fn_c_try_compile "$LINENO"; then :
2457 eval "$3=yes"
2458else
2459 eval "$3=no"
2460fi
2461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2462fi
2463eval ac_res=\$$3
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2465$as_echo "$ac_res" >&6; }
2466 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2467
2468} # ac_fn_c_check_decl
2469
05ea2a05
TT
2470# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2471# ----------------------------------------------------
2472# Tries to find if the field MEMBER exists in type AGGR, after including
2473# INCLUDES, setting cache variable VAR accordingly.
2474ac_fn_c_check_member ()
2475{
2476 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2478$as_echo_n "checking for $2.$3... " >&6; }
2479if eval \${$4+:} false; then :
2480 $as_echo_n "(cached) " >&6
2481else
2482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2483/* end confdefs.h. */
2484$5
2485int
2486main ()
2487{
2488static $2 ac_aggr;
2489if (ac_aggr.$3)
2490return 0;
2491 ;
2492 return 0;
2493}
2494_ACEOF
2495if ac_fn_c_try_compile "$LINENO"; then :
2496 eval "$4=yes"
2497else
2498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2499/* end confdefs.h. */
2500$5
2501int
2502main ()
2503{
2504static $2 ac_aggr;
2505if (sizeof ac_aggr.$3)
2506return 0;
2507 ;
2508 return 0;
2509}
2510_ACEOF
2511if ac_fn_c_try_compile "$LINENO"; then :
2512 eval "$4=yes"
2513else
2514 eval "$4=no"
2515fi
2516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2517fi
2518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2519fi
2520eval ac_res=\$$4
2521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2522$as_echo "$ac_res" >&6; }
2523 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524
2525} # ac_fn_c_check_member
2526
f35d5ade
TT
2527# ac_fn_cxx_try_link LINENO
2528# -------------------------
2529# Try to link conftest.$ac_ext, and return whether this succeeded.
2530ac_fn_cxx_try_link ()
2531{
2532 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533 rm -f conftest.$ac_objext conftest$ac_exeext
2534 if { { ac_try="$ac_link"
2535case "(($ac_try" in
2536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2537 *) ac_try_echo=$ac_try;;
2538esac
2539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2540$as_echo "$ac_try_echo"; } >&5
2541 (eval "$ac_link") 2>conftest.err
2542 ac_status=$?
2543 if test -s conftest.err; then
2544 grep -v '^ *+' conftest.err >conftest.er1
2545 cat conftest.er1 >&5
2546 mv -f conftest.er1 conftest.err
2547 fi
2548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2549 test $ac_status = 0; } && {
2550 test -z "$ac_cxx_werror_flag" ||
2551 test ! -s conftest.err
2552 } && test -s conftest$ac_exeext && {
2553 test "$cross_compiling" = yes ||
2554 test -x conftest$ac_exeext
2555 }; then :
2556 ac_retval=0
2557else
2558 $as_echo "$as_me: failed program was:" >&5
2559sed 's/^/| /' conftest.$ac_ext >&5
2560
2561 ac_retval=1
2562fi
2563 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2564 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2565 # interfere with the next link command; also delete a directory that is
2566 # left behind by Apple's compiler. We do this before executing the actions.
2567 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2569 as_fn_set_status $ac_retval
2570
2571} # ac_fn_cxx_try_link
21987b9c
TT
2572
2573# ac_fn_cxx_check_func LINENO FUNC VAR
2574# ------------------------------------
2575# Tests whether FUNC exists, setting the cache variable VAR accordingly
2576ac_fn_cxx_check_func ()
2577{
2578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2580$as_echo_n "checking for $2... " >&6; }
2581if eval \${$3+:} false; then :
2582 $as_echo_n "(cached) " >&6
2583else
2584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h. */
2586/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2587 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2588#define $2 innocuous_$2
2589
2590/* System header to define __stub macros and hopefully few prototypes,
2591 which can conflict with char $2 (); below.
2592 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2593 <limits.h> exists even on freestanding compilers. */
2594
2595#ifdef __STDC__
2596# include <limits.h>
2597#else
2598# include <assert.h>
2599#endif
2600
2601#undef $2
2602
2603/* Override any GCC internal prototype to avoid an error.
2604 Use char because int might match the return type of a GCC
2605 builtin and then its argument prototype would still apply. */
2606#ifdef __cplusplus
2607extern "C"
2608#endif
2609char $2 ();
2610/* The GNU C library defines this for functions which it implements
2611 to always fail with ENOSYS. Some functions are actually named
2612 something starting with __ and the normal name is an alias. */
2613#if defined __stub_$2 || defined __stub___$2
2614choke me
2615#endif
2616
2617int
2618main ()
2619{
2620return $2 ();
2621 ;
2622 return 0;
2623}
2624_ACEOF
2625if ac_fn_cxx_try_link "$LINENO"; then :
2626 eval "$3=yes"
2627else
2628 eval "$3=no"
2629fi
2630rm -f core conftest.err conftest.$ac_objext \
2631 conftest$ac_exeext conftest.$ac_ext
2632fi
2633eval ac_res=\$$3
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2635$as_echo "$ac_res" >&6; }
2636 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2637
2638} # ac_fn_cxx_check_func
81ecdfbb
RW
2639cat >config.log <<_ACEOF
2640This file contains any messages produced by compilers while
2641running configure, to aid debugging if configure makes a mistake.
d5af19ba 2642
81ecdfbb 2643It was created by $as_me, which was
d0ac1c44 2644generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2645
81ecdfbb 2646 $ $0 $@
413ccac7 2647
81ecdfbb
RW
2648_ACEOF
2649exec 5>>config.log
2650{
2651cat <<_ASUNAME
2652## --------- ##
2653## Platform. ##
2654## --------- ##
413ccac7 2655
81ecdfbb
RW
2656hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2657uname -m = `(uname -m) 2>/dev/null || echo unknown`
2658uname -r = `(uname -r) 2>/dev/null || echo unknown`
2659uname -s = `(uname -s) 2>/dev/null || echo unknown`
2660uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2661
81ecdfbb
RW
2662/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2663/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2664
81ecdfbb
RW
2665/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2666/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2667/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2668/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2669/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2670/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2671/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2672
81ecdfbb 2673_ASUNAME
bec39cab 2674
bec39cab
AC
2675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2676for as_dir in $PATH
2677do
2678 IFS=$as_save_IFS
2679 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2680 $as_echo "PATH: $as_dir"
2681 done
2682IFS=$as_save_IFS
bec39cab 2683
81ecdfbb 2684} >&5
bec39cab 2685
81ecdfbb 2686cat >&5 <<_ACEOF
bec39cab 2687
bec39cab 2688
81ecdfbb
RW
2689## ----------- ##
2690## Core tests. ##
2691## ----------- ##
2692
2693_ACEOF
2694
2695
2696# Keep a trace of the command line.
2697# Strip out --no-create and --no-recursion so they do not pile up.
2698# Strip out --silent because we don't want to record it for future runs.
2699# Also quote any args containing shell meta-characters.
2700# Make two passes to allow for proper duplicate-argument suppression.
2701ac_configure_args=
2702ac_configure_args0=
2703ac_configure_args1=
2704ac_must_keep_next=false
2705for ac_pass in 1 2
2706do
2707 for ac_arg
2708 do
2709 case $ac_arg in
2710 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2711 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2712 | -silent | --silent | --silen | --sile | --sil)
2713 continue ;;
2714 *\'*)
2715 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2716 esac
2717 case $ac_pass in
2718 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2719 2)
2720 as_fn_append ac_configure_args1 " '$ac_arg'"
2721 if test $ac_must_keep_next = true; then
2722 ac_must_keep_next=false # Got value, back to normal.
2723 else
2724 case $ac_arg in
2725 *=* | --config-cache | -C | -disable-* | --disable-* \
2726 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2727 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2728 | -with-* | --with-* | -without-* | --without-* | --x)
2729 case "$ac_configure_args0 " in
2730 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2731 esac
2732 ;;
2733 -* ) ac_must_keep_next=true ;;
2734 esac
2735 fi
2736 as_fn_append ac_configure_args " '$ac_arg'"
2737 ;;
2738 esac
2739 done
2740done
2741{ ac_configure_args0=; unset ac_configure_args0;}
2742{ ac_configure_args1=; unset ac_configure_args1;}
2743
2744# When interrupted or exit'd, cleanup temporary files, and complete
2745# config.log. We remove comments because anyway the quotes in there
2746# would cause problems or look ugly.
2747# WARNING: Use '\'' to represent an apostrophe within the trap.
2748# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2749trap 'exit_status=$?
2750 # Save into config.log some information that might help in debugging.
2751 {
2752 echo
2753
d0ac1c44 2754 $as_echo "## ---------------- ##
81ecdfbb 2755## Cache variables. ##
d0ac1c44 2756## ---------------- ##"
81ecdfbb
RW
2757 echo
2758 # The following way of writing the cache mishandles newlines in values,
2759(
2760 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2761 eval ac_val=\$$ac_var
2762 case $ac_val in #(
2763 *${as_nl}*)
2764 case $ac_var in #(
2765 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2766$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2767 esac
2768 case $ac_var in #(
2769 _ | IFS | as_nl) ;; #(
2770 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2771 *) { eval $ac_var=; unset $ac_var;} ;;
2772 esac ;;
2773 esac
2774 done
2775 (set) 2>&1 |
2776 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2777 *${as_nl}ac_space=\ *)
2778 sed -n \
2779 "s/'\''/'\''\\\\'\'''\''/g;
2780 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2781 ;; #(
2782 *)
2783 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2784 ;;
2785 esac |
2786 sort
2787)
2788 echo
2789
d0ac1c44 2790 $as_echo "## ----------------- ##
81ecdfbb 2791## Output variables. ##
d0ac1c44 2792## ----------------- ##"
81ecdfbb
RW
2793 echo
2794 for ac_var in $ac_subst_vars
2795 do
2796 eval ac_val=\$$ac_var
2797 case $ac_val in
2798 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2799 esac
2800 $as_echo "$ac_var='\''$ac_val'\''"
2801 done | sort
2802 echo
2803
2804 if test -n "$ac_subst_files"; then
d0ac1c44 2805 $as_echo "## ------------------- ##
81ecdfbb 2806## File substitutions. ##
d0ac1c44 2807## ------------------- ##"
81ecdfbb
RW
2808 echo
2809 for ac_var in $ac_subst_files
2810 do
2811 eval ac_val=\$$ac_var
2812 case $ac_val in
2813 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2814 esac
2815 $as_echo "$ac_var='\''$ac_val'\''"
2816 done | sort
2817 echo
2818 fi
2819
2820 if test -s confdefs.h; then
d0ac1c44 2821 $as_echo "## ----------- ##
81ecdfbb 2822## confdefs.h. ##
d0ac1c44 2823## ----------- ##"
81ecdfbb
RW
2824 echo
2825 cat confdefs.h
2826 echo
2827 fi
2828 test "$ac_signal" != 0 &&
2829 $as_echo "$as_me: caught signal $ac_signal"
2830 $as_echo "$as_me: exit $exit_status"
2831 } >&5
2832 rm -f core *.core core.conftest.* &&
2833 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2834 exit $exit_status
2835' 0
2836for ac_signal in 1 2 13 15; do
2837 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2838done
2839ac_signal=0
2840
2841# confdefs.h avoids OS command line length limits that DEFS can exceed.
2842rm -f -r conftest* confdefs.h
2843
2844$as_echo "/* confdefs.h */" > confdefs.h
2845
2846# Predefined preprocessor variables.
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_NAME "$PACKAGE_NAME"
2850_ACEOF
2851
2852cat >>confdefs.h <<_ACEOF
2853#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2854_ACEOF
2855
2856cat >>confdefs.h <<_ACEOF
2857#define PACKAGE_VERSION "$PACKAGE_VERSION"
2858_ACEOF
2859
2860cat >>confdefs.h <<_ACEOF
2861#define PACKAGE_STRING "$PACKAGE_STRING"
2862_ACEOF
2863
2864cat >>confdefs.h <<_ACEOF
2865#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2866_ACEOF
2867
2868cat >>confdefs.h <<_ACEOF
2869#define PACKAGE_URL "$PACKAGE_URL"
2870_ACEOF
2871
2872
2873# Let the site file select an alternate cache file if it wants to.
2874# Prefer an explicitly selected file to automatically selected ones.
2875ac_site_file1=NONE
2876ac_site_file2=NONE
2877if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2878 # We do not want a PATH search for config.site.
2879 case $CONFIG_SITE in #((
2880 -*) ac_site_file1=./$CONFIG_SITE;;
2881 */*) ac_site_file1=$CONFIG_SITE;;
2882 *) ac_site_file1=./$CONFIG_SITE;;
2883 esac
81ecdfbb
RW
2884elif test "x$prefix" != xNONE; then
2885 ac_site_file1=$prefix/share/config.site
2886 ac_site_file2=$prefix/etc/config.site
2887else
2888 ac_site_file1=$ac_default_prefix/share/config.site
2889 ac_site_file2=$ac_default_prefix/etc/config.site
2890fi
2891for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2892do
2893 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2894 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2895 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2896$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2897 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2898 . "$ac_site_file" \
2899 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2901as_fn_error $? "failed to load site script $ac_site_file
2902See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2903 fi
2904done
2905
2906if test -r "$cache_file"; then
d0ac1c44
SM
2907 # Some versions of bash will fail to source /dev/null (special files
2908 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2909 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2911$as_echo "$as_me: loading cache $cache_file" >&6;}
2912 case $cache_file in
2913 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2914 *) . "./$cache_file";;
2915 esac
2916 fi
2917else
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2919$as_echo "$as_me: creating cache $cache_file" >&6;}
2920 >$cache_file
bec39cab
AC
2921fi
2922
d0ac1c44
SM
2923as_fn_append ac_header_list " stdlib.h"
2924as_fn_append ac_header_list " unistd.h"
2925as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2926# Check that the precious variables saved in the cache have kept the same
2927# value.
2928ac_cache_corrupted=false
2929for ac_var in $ac_precious_vars; do
2930 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2931 eval ac_new_set=\$ac_env_${ac_var}_set
2932 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2933 eval ac_new_val=\$ac_env_${ac_var}_value
2934 case $ac_old_set,$ac_new_set in
2935 set,)
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2937$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2938 ac_cache_corrupted=: ;;
2939 ,set)
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2941$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2942 ac_cache_corrupted=: ;;
2943 ,);;
2944 *)
2945 if test "x$ac_old_val" != "x$ac_new_val"; then
2946 # differences in whitespace do not lead to failure.
2947 ac_old_val_w=`echo x $ac_old_val`
2948 ac_new_val_w=`echo x $ac_new_val`
2949 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2951$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2952 ac_cache_corrupted=:
2953 else
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2955$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2956 eval $ac_var=\$ac_old_val
2957 fi
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2959$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2961$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2962 fi;;
2963 esac
2964 # Pass precious variables to config.status.
2965 if test "$ac_new_set" = set; then
2966 case $ac_new_val in
2967 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2968 *) ac_arg=$ac_var=$ac_new_val ;;
2969 esac
2970 case " $ac_configure_args " in
2971 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2972 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2973 esac
2974 fi
2975done
2976if $ac_cache_corrupted; then
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2980$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2981 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2982fi
2983## -------------------- ##
2984## Main body of script. ##
2985## -------------------- ##
2986
2987ac_ext=c
2988ac_cpp='$CPP $CPPFLAGS'
2989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2991ac_compiler_gnu=$ac_cv_c_compiler_gnu
2992
2993
2994
2995
2996
5593a99a 2997
81ecdfbb
RW
2998ac_config_headers="$ac_config_headers config.h:config.in"
2999
3000
3001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3002$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3003 # Check whether --enable-maintainer-mode was given.
3004if test "${enable_maintainer_mode+set}" = set; then :
3005 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3006else
3007 USE_MAINTAINER_MODE=no
3008fi
3009
3010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3011$as_echo "$USE_MAINTAINER_MODE" >&6; }
3012 if test $USE_MAINTAINER_MODE = yes; then
3013 MAINTAINER_MODE_TRUE=
3014 MAINTAINER_MODE_FALSE='#'
3015else
3016 MAINTAINER_MODE_TRUE='#'
3017 MAINTAINER_MODE_FALSE=
3018fi
3019
3020 MAINT=$MAINTAINER_MODE_TRUE
3021
3022
3023
3024ac_ext=c
3025ac_cpp='$CPP $CPPFLAGS'
3026ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3027ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3028ac_compiler_gnu=$ac_cv_c_compiler_gnu
3029if test -n "$ac_tool_prefix"; then
3030 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3031set dummy ${ac_tool_prefix}gcc; ac_word=$2
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3033$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3034if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3035 $as_echo_n "(cached) " >&6
c906108c
SS
3036else
3037 if test -n "$CC"; then
3038 ac_cv_prog_CC="$CC" # Let the user override the test.
3039else
bec39cab
AC
3040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3041for as_dir in $PATH
3042do
3043 IFS=$as_save_IFS
3044 test -z "$as_dir" && as_dir=.
81ecdfbb 3045 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3046 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3047 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3049 break 2
3050 fi
3051done
81ecdfbb
RW
3052 done
3053IFS=$as_save_IFS
bec39cab 3054
c906108c
SS
3055fi
3056fi
bec39cab 3057CC=$ac_cv_prog_CC
c906108c 3058if test -n "$CC"; then
81ecdfbb
RW
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3060$as_echo "$CC" >&6; }
c906108c 3061else
81ecdfbb
RW
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
c906108c
SS
3064fi
3065
81ecdfbb 3066
b4e70030
JB
3067fi
3068if test -z "$ac_cv_prog_CC"; then
3069 ac_ct_CC=$CC
81ecdfbb
RW
3070 # Extract the first word of "gcc", so it can be a program name with args.
3071set dummy gcc; ac_word=$2
3072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3073$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3074if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3075 $as_echo_n "(cached) " >&6
b4e70030
JB
3076else
3077 if test -n "$ac_ct_CC"; then
3078 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3079else
3080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3081for as_dir in $PATH
3082do
3083 IFS=$as_save_IFS
3084 test -z "$as_dir" && as_dir=.
81ecdfbb 3085 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3087 ac_cv_prog_ac_ct_CC="gcc"
3088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3089 break 2
4e8d927d 3090 fi
b4e70030 3091done
81ecdfbb
RW
3092 done
3093IFS=$as_save_IFS
b4e70030
JB
3094
3095fi
3096fi
3097ac_ct_CC=$ac_cv_prog_ac_ct_CC
3098if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3100$as_echo "$ac_ct_CC" >&6; }
b4e70030 3101else
81ecdfbb
RW
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3103$as_echo "no" >&6; }
b4e70030
JB
3104fi
3105
81ecdfbb
RW
3106 if test "x$ac_ct_CC" = x; then
3107 CC=""
3108 else
3109 case $cross_compiling:$ac_tool_warned in
3110yes:)
3111{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3112$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3113ac_tool_warned=yes ;;
3114esac
3115 CC=$ac_ct_CC
3116 fi
b4e70030
JB
3117else
3118 CC="$ac_cv_prog_CC"
3119fi
3120
c906108c 3121if test -z "$CC"; then
81ecdfbb
RW
3122 if test -n "$ac_tool_prefix"; then
3123 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3124set dummy ${ac_tool_prefix}cc; ac_word=$2
3125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3126$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3127if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3128 $as_echo_n "(cached) " >&6
c906108c
SS
3129else
3130 if test -n "$CC"; then
3131 ac_cv_prog_CC="$CC" # Let the user override the test.
3132else
bec39cab
AC
3133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3134for as_dir in $PATH
3135do
3136 IFS=$as_save_IFS
3137 test -z "$as_dir" && as_dir=.
81ecdfbb 3138 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3140 ac_cv_prog_CC="${ac_tool_prefix}cc"
3141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3142 break 2
3143 fi
3144done
81ecdfbb
RW
3145 done
3146IFS=$as_save_IFS
3147
3148fi
3149fi
3150CC=$ac_cv_prog_CC
3151if test -n "$CC"; then
3152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3153$as_echo "$CC" >&6; }
3154else
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3156$as_echo "no" >&6; }
3157fi
3158
3159
3160 fi
3161fi
3162if test -z "$CC"; then
3163 # Extract the first word of "cc", so it can be a program name with args.
3164set dummy cc; ac_word=$2
3165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3166$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3167if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3168 $as_echo_n "(cached) " >&6
3169else
3170 if test -n "$CC"; then
3171 ac_cv_prog_CC="$CC" # Let the user override the test.
3172else
3173 ac_prog_rejected=no
3174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3175for as_dir in $PATH
3176do
3177 IFS=$as_save_IFS
3178 test -z "$as_dir" && as_dir=.
3179 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3180 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3181 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3182 ac_prog_rejected=yes
3183 continue
3184 fi
3185 ac_cv_prog_CC="cc"
3186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3187 break 2
3188 fi
3189done
3190 done
3191IFS=$as_save_IFS
bec39cab 3192
c906108c
SS
3193if test $ac_prog_rejected = yes; then
3194 # We found a bogon in the path, so make sure we never use it.
3195 set dummy $ac_cv_prog_CC
3196 shift
bec39cab 3197 if test $# != 0; then
c906108c
SS
3198 # We chose a different compiler from the bogus one.
3199 # However, it has the same basename, so the bogon will be chosen
3200 # first if we set CC to just the basename; use the full file name.
3201 shift
bec39cab 3202 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3203 fi
3204fi
3205fi
3206fi
bec39cab 3207CC=$ac_cv_prog_CC
c906108c 3208if test -n "$CC"; then
81ecdfbb
RW
3209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3210$as_echo "$CC" >&6; }
c906108c 3211else
81ecdfbb
RW
3212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3213$as_echo "no" >&6; }
c906108c
SS
3214fi
3215
81ecdfbb 3216
bec39cab
AC
3217fi
3218if test -z "$CC"; then
3219 if test -n "$ac_tool_prefix"; then
81ecdfbb 3220 for ac_prog in cl.exe
bec39cab
AC
3221 do
3222 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3223set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3225$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3226if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3227 $as_echo_n "(cached) " >&6
c906108c
SS
3228else
3229 if test -n "$CC"; then
3230 ac_cv_prog_CC="$CC" # Let the user override the test.
3231else
bec39cab
AC
3232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3233for as_dir in $PATH
3234do
3235 IFS=$as_save_IFS
3236 test -z "$as_dir" && as_dir=.
81ecdfbb 3237 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3239 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3241 break 2
3242 fi
3243done
81ecdfbb
RW
3244 done
3245IFS=$as_save_IFS
bec39cab 3246
c906108c
SS
3247fi
3248fi
bec39cab 3249CC=$ac_cv_prog_CC
c906108c 3250if test -n "$CC"; then
81ecdfbb
RW
3251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3252$as_echo "$CC" >&6; }
c906108c 3253else
81ecdfbb
RW
3254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3255$as_echo "no" >&6; }
c906108c 3256fi
bec39cab 3257
81ecdfbb 3258
bec39cab
AC
3259 test -n "$CC" && break
3260 done
3261fi
3262if test -z "$CC"; then
3263 ac_ct_CC=$CC
81ecdfbb 3264 for ac_prog in cl.exe
bec39cab
AC
3265do
3266 # Extract the first word of "$ac_prog", so it can be a program name with args.
3267set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3269$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3270if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3271 $as_echo_n "(cached) " >&6
bec39cab
AC
3272else
3273 if test -n "$ac_ct_CC"; then
3274 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3275else
3276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3277for as_dir in $PATH
3278do
3279 IFS=$as_save_IFS
3280 test -z "$as_dir" && as_dir=.
81ecdfbb 3281 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3283 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3285 break 2
c906108c 3286 fi
bec39cab 3287done
81ecdfbb
RW
3288 done
3289IFS=$as_save_IFS
bec39cab
AC
3290
3291fi
3292fi
3293ac_ct_CC=$ac_cv_prog_ac_ct_CC
3294if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3296$as_echo "$ac_ct_CC" >&6; }
bec39cab 3297else
81ecdfbb
RW
3298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3299$as_echo "no" >&6; }
c906108c
SS
3300fi
3301
81ecdfbb 3302
bec39cab
AC
3303 test -n "$ac_ct_CC" && break
3304done
c906108c 3305
81ecdfbb
RW
3306 if test "x$ac_ct_CC" = x; then
3307 CC=""
3308 else
3309 case $cross_compiling:$ac_tool_warned in
3310yes:)
3311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3313ac_tool_warned=yes ;;
3314esac
3315 CC=$ac_ct_CC
3316 fi
bec39cab
AC
3317fi
3318
3319fi
3320
3321
81ecdfbb
RW
3322test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3324as_fn_error $? "no acceptable C compiler found in \$PATH
3325See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3326
3327# Provide some information about the compiler.
81ecdfbb
RW
3328$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3329set X $ac_compile
3330ac_compiler=$2
3331for ac_option in --version -v -V -qversion; do
3332 { { ac_try="$ac_compiler $ac_option >&5"
3333case "(($ac_try" in
3334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3335 *) ac_try_echo=$ac_try;;
3336esac
3337eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3338$as_echo "$ac_try_echo"; } >&5
3339 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3340 ac_status=$?
81ecdfbb
RW
3341 if test -s conftest.err; then
3342 sed '10a\
3343... rest of stderr output deleted ...
3344 10q' conftest.err >conftest.er1
3345 cat conftest.er1 >&5
81ecdfbb 3346 fi
d0ac1c44 3347 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3348 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3349 test $ac_status = 0; }
3350done
bec39cab 3351
81ecdfbb 3352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3353/* end confdefs.h. */
3354
3355int
3356main ()
3357{
3358
3359 ;
3360 return 0;
3361}
3362_ACEOF
3363ac_clean_files_save=$ac_clean_files
d0ac1c44 3364ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3365# Try to create an executable without -o first, disregard a.out.
3366# It will help us diagnose broken compilers, and finding out an intuition
3367# of exeext.
d0ac1c44
SM
3368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3369$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3370ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3371
3372# The possible output files:
3373ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3374
3375ac_rmfiles=
3376for ac_file in $ac_files
3377do
3378 case $ac_file in
3379 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3380 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3381 esac
3382done
3383rm -f $ac_rmfiles
3384
3385if { { ac_try="$ac_link_default"
3386case "(($ac_try" in
3387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3388 *) ac_try_echo=$ac_try;;
3389esac
3390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3391$as_echo "$ac_try_echo"; } >&5
3392 (eval "$ac_link_default") 2>&5
3393 ac_status=$?
3394 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3395 test $ac_status = 0; }; then :
3396 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3397# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3398# in a Makefile. We should not override ac_cv_exeext if it was cached,
3399# so that the user can short-circuit this test for compilers unknown to
3400# Autoconf.
3401for ac_file in $ac_files ''
bec39cab
AC
3402do
3403 test -f "$ac_file" || continue
3404 case $ac_file in
81ecdfbb 3405 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3406 ;;
3407 [ab].out )
3408 # We found the default executable, but exeext='' is most
3409 # certainly right.
3410 break;;
3411 *.* )
81ecdfbb
RW
3412 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3413 then :; else
3414 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3415 fi
3416 # We set ac_cv_exeext here because the later test for it is not
3417 # safe: cross compilers may not add the suffix if given an `-o'
3418 # argument, so we may need to know it at that point already.
3419 # Even if this section looks crufty: it has the advantage of
3420 # actually working.
b4e70030
JB
3421 break;;
3422 * )
3423 break;;
bec39cab
AC
3424 esac
3425done
81ecdfbb
RW
3426test "$ac_cv_exeext" = no && ac_cv_exeext=
3427
bec39cab 3428else
81ecdfbb
RW
3429 ac_file=''
3430fi
81ecdfbb 3431if test -z "$ac_file"; then :
d0ac1c44
SM
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3433$as_echo "no" >&6; }
3434$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3435sed 's/^/| /' conftest.$ac_ext >&5
3436
81ecdfbb
RW
3437{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3439as_fn_error 77 "C compiler cannot create executables
3440See \`config.log' for more details" "$LINENO" 5; }
3441else
3442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3443$as_echo "yes" >&6; }
bec39cab 3444fi
d0ac1c44
SM
3445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3446$as_echo_n "checking for C compiler default output file name... " >&6; }
3447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3448$as_echo "$ac_file" >&6; }
b4e70030 3449ac_exeext=$ac_cv_exeext
b4e70030 3450
d0ac1c44 3451rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3452ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3454$as_echo_n "checking for suffix of executables... " >&6; }
3455if { { ac_try="$ac_link"
3456case "(($ac_try" in
3457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3458 *) ac_try_echo=$ac_try;;
3459esac
3460eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3461$as_echo "$ac_try_echo"; } >&5
3462 (eval "$ac_link") 2>&5
bec39cab 3463 ac_status=$?
81ecdfbb
RW
3464 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3465 test $ac_status = 0; }; then :
b4e70030
JB
3466 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3467# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3468# work properly (i.e., refer to `conftest.exe'), while it won't with
3469# `rm'.
3470for ac_file in conftest.exe conftest conftest.*; do
3471 test -f "$ac_file" || continue
3472 case $ac_file in
81ecdfbb 3473 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3474 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3475 break;;
3476 * ) break;;
3477 esac
3478done
c906108c 3479else
81ecdfbb
RW
3480 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3482as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3483See \`config.log' for more details" "$LINENO" 5; }
c906108c 3484fi
d0ac1c44 3485rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3487$as_echo "$ac_cv_exeext" >&6; }
c906108c 3488
b4e70030 3489rm -f conftest.$ac_ext
bec39cab
AC
3490EXEEXT=$ac_cv_exeext
3491ac_exeext=$EXEEXT
d0ac1c44
SM
3492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3493/* end confdefs.h. */
3494#include <stdio.h>
3495int
3496main ()
3497{
3498FILE *f = fopen ("conftest.out", "w");
3499 return ferror (f) || fclose (f) != 0;
3500
3501 ;
3502 return 0;
3503}
3504_ACEOF
3505ac_clean_files="$ac_clean_files conftest.out"
3506# Check that the compiler produces executables we can run. If not, either
3507# the compiler is broken, or we cross compile.
3508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3509$as_echo_n "checking whether we are cross compiling... " >&6; }
3510if test "$cross_compiling" != yes; then
3511 { { ac_try="$ac_link"
3512case "(($ac_try" in
3513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3514 *) ac_try_echo=$ac_try;;
3515esac
3516eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3517$as_echo "$ac_try_echo"; } >&5
3518 (eval "$ac_link") 2>&5
3519 ac_status=$?
3520 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3521 test $ac_status = 0; }
3522 if { ac_try='./conftest$ac_cv_exeext'
3523 { { case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
3527eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3528$as_echo "$ac_try_echo"; } >&5
3529 (eval "$ac_try") 2>&5
3530 ac_status=$?
3531 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3532 test $ac_status = 0; }; }; then
3533 cross_compiling=no
3534 else
3535 if test "$cross_compiling" = maybe; then
3536 cross_compiling=yes
3537 else
3538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3539$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3540as_fn_error $? "cannot run C compiled programs.
3541If you meant to cross compile, use \`--host'.
3542See \`config.log' for more details" "$LINENO" 5; }
3543 fi
3544 fi
3545fi
3546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3547$as_echo "$cross_compiling" >&6; }
3548
3549rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3550ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3552$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3553if ${ac_cv_objext+:} false; then :
81ecdfbb 3554 $as_echo_n "(cached) " >&6
bec39cab 3555else
81ecdfbb 3556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3557/* end confdefs.h. */
3558
3559int
3560main ()
3561{
3562
3563 ;
3564 return 0;
3565}
3566_ACEOF
3567rm -f conftest.o conftest.obj
81ecdfbb
RW
3568if { { ac_try="$ac_compile"
3569case "(($ac_try" in
3570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3571 *) ac_try_echo=$ac_try;;
3572esac
3573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3574$as_echo "$ac_try_echo"; } >&5
3575 (eval "$ac_compile") 2>&5
3576 ac_status=$?
3577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3578 test $ac_status = 0; }; then :
3579 for ac_file in conftest.o conftest.obj conftest.*; do
3580 test -f "$ac_file" || continue;
bec39cab 3581 case $ac_file in
81ecdfbb 3582 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3583 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3584 break;;
3585 esac
3586done
c906108c 3587else
81ecdfbb 3588 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3589sed 's/^/| /' conftest.$ac_ext >&5
3590
81ecdfbb
RW
3591{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3593as_fn_error $? "cannot compute suffix of object files: cannot compile
3594See \`config.log' for more details" "$LINENO" 5; }
c906108c 3595fi
b4e70030 3596rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3597fi
81ecdfbb
RW
3598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3599$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3600OBJEXT=$ac_cv_objext
3601ac_objext=$OBJEXT
81ecdfbb
RW
3602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3603$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3604if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3605 $as_echo_n "(cached) " >&6
c906108c 3606else
81ecdfbb 3607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3608/* end confdefs.h. */
3609
3610int
3611main ()
3612{
3613#ifndef __GNUC__
3614 choke me
3615#endif
3616
3617 ;
3618 return 0;
3619}
3620_ACEOF
81ecdfbb 3621if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3622 ac_compiler_gnu=yes
3623else
81ecdfbb 3624 ac_compiler_gnu=no
bec39cab 3625fi
81ecdfbb 3626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3627ac_cv_c_compiler_gnu=$ac_compiler_gnu
3628
3629fi
81ecdfbb
RW
3630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3631$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3632if test $ac_compiler_gnu = yes; then
3633 GCC=yes
3634else
3635 GCC=
3636fi
bec39cab
AC
3637ac_test_CFLAGS=${CFLAGS+set}
3638ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3640$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3641if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3642 $as_echo_n "(cached) " >&6
bec39cab 3643else
81ecdfbb
RW
3644 ac_save_c_werror_flag=$ac_c_werror_flag
3645 ac_c_werror_flag=yes
3646 ac_cv_prog_cc_g=no
3647 CFLAGS="-g"
3648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3649/* end confdefs.h. */
3650
3651int
3652main ()
3653{
3654
3655 ;
3656 return 0;
3657}
3658_ACEOF
81ecdfbb 3659if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3660 ac_cv_prog_cc_g=yes
3661else
81ecdfbb
RW
3662 CFLAGS=""
3663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3664/* end confdefs.h. */
3665
3666int
3667main ()
3668{
3669
3670 ;
3671 return 0;
3672}
3673_ACEOF
3674if ac_fn_c_try_compile "$LINENO"; then :
3675
3676else
3677 ac_c_werror_flag=$ac_save_c_werror_flag
3678 CFLAGS="-g"
3679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3680/* end confdefs.h. */
3681
3682int
3683main ()
3684{
c906108c 3685
81ecdfbb
RW
3686 ;
3687 return 0;
3688}
3689_ACEOF
3690if ac_fn_c_try_compile "$LINENO"; then :
3691 ac_cv_prog_cc_g=yes
3692fi
3693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3694fi
3695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3696fi
81ecdfbb
RW
3697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3698 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3699fi
81ecdfbb
RW
3700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3701$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3702if test "$ac_test_CFLAGS" = set; then
bec39cab 3703 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3704elif test $ac_cv_prog_cc_g = yes; then
3705 if test "$GCC" = yes; then
3706 CFLAGS="-g -O2"
3707 else
3708 CFLAGS="-g"
3709 fi
3710else
3711 if test "$GCC" = yes; then
3712 CFLAGS="-O2"
3713 else
3714 CFLAGS=
3715 fi
3716fi
81ecdfbb
RW
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3718$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3719if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3720 $as_echo_n "(cached) " >&6
bec39cab 3721else
81ecdfbb 3722 ac_cv_prog_cc_c89=no
bec39cab 3723ac_save_CC=$CC
81ecdfbb 3724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3725/* end confdefs.h. */
c906108c
SS
3726#include <stdarg.h>
3727#include <stdio.h>
d0ac1c44 3728struct stat;
c906108c
SS
3729/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3730struct buf { int x; };
3731FILE * (*rcsopen) (struct buf *, struct stat *, int);
3732static char *e (p, i)
3733 char **p;
3734 int i;
3735{
3736 return p[i];
3737}
3738static char *f (char * (*g) (char **, int), char **p, ...)
3739{
3740 char *s;
3741 va_list v;
3742 va_start (v,p);
3743 s = g (p, va_arg (v,int));
3744 va_end (v);
3745 return s;
3746}
bec39cab
AC
3747
3748/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3749 function prototypes and stuff, but not '\xHH' hex character constants.
3750 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3751 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3752 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3753 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3754 that's true only with -std. */
bec39cab
AC
3755int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3756
81ecdfbb
RW
3757/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3758 inside strings and character constants. */
3759#define FOO(x) 'x'
3760int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3761
c906108c
SS
3762int test (int i, double x);
3763struct s1 {int (*f) (int a);};
3764struct s2 {int (*f) (double a);};
3765int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3766int argc;
3767char **argv;
bec39cab
AC
3768int
3769main ()
3770{
c906108c 3771return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3772 ;
3773 return 0;
3774}
3775_ACEOF
81ecdfbb
RW
3776for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3777 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3778do
3779 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3780 if ac_fn_c_try_compile "$LINENO"; then :
3781 ac_cv_prog_cc_c89=$ac_arg
c906108c 3782fi
81ecdfbb
RW
3783rm -f core conftest.err conftest.$ac_objext
3784 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3785done
81ecdfbb 3786rm -f conftest.$ac_ext
bec39cab 3787CC=$ac_save_CC
c906108c
SS
3788
3789fi
81ecdfbb
RW
3790# AC_CACHE_VAL
3791case "x$ac_cv_prog_cc_c89" in
3792 x)
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3794$as_echo "none needed" >&6; } ;;
3795 xno)
3796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3797$as_echo "unsupported" >&6; } ;;
bec39cab 3798 *)
81ecdfbb
RW
3799 CC="$CC $ac_cv_prog_cc_c89"
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3801$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3802esac
81ecdfbb 3803if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3804
b4e70030
JB
3805fi
3806
bec39cab
AC
3807ac_ext=c
3808ac_cpp='$CPP $CPPFLAGS'
3809ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3810ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3811ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3812
3bc3d82a
PA
3813ac_ext=cpp
3814ac_cpp='$CXXCPP $CPPFLAGS'
3815ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3816ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3817ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3818if test -z "$CXX"; then
3819 if test -n "$CCC"; then
3820 CXX=$CCC
3821 else
3822 if test -n "$ac_tool_prefix"; then
3823 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3824 do
3825 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3826set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3829if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3830 $as_echo_n "(cached) " >&6
3831else
3832 if test -n "$CXX"; then
3833 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3834else
3835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836for as_dir in $PATH
3837do
3838 IFS=$as_save_IFS
3839 test -z "$as_dir" && as_dir=.
3840 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3842 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3844 break 2
3845 fi
3846done
3847 done
3848IFS=$as_save_IFS
3849
3850fi
3851fi
3852CXX=$ac_cv_prog_CXX
3853if test -n "$CXX"; then
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3855$as_echo "$CXX" >&6; }
3856else
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
3859fi
3860
3861
3862 test -n "$CXX" && break
3863 done
3864fi
3865if test -z "$CXX"; then
3866 ac_ct_CXX=$CXX
3867 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3868do
3869 # Extract the first word of "$ac_prog", so it can be a program name with args.
3870set dummy $ac_prog; ac_word=$2
3871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3872$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3873if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3874 $as_echo_n "(cached) " >&6
3875else
3876 if test -n "$ac_ct_CXX"; then
3877 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3878else
3879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3880for as_dir in $PATH
3881do
3882 IFS=$as_save_IFS
3883 test -z "$as_dir" && as_dir=.
3884 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3886 ac_cv_prog_ac_ct_CXX="$ac_prog"
3887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3888 break 2
3889 fi
3890done
3891 done
3892IFS=$as_save_IFS
3893
3894fi
3895fi
3896ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3897if test -n "$ac_ct_CXX"; then
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3899$as_echo "$ac_ct_CXX" >&6; }
3900else
3901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3902$as_echo "no" >&6; }
3903fi
3904
3905
3906 test -n "$ac_ct_CXX" && break
3907done
3908
3909 if test "x$ac_ct_CXX" = x; then
3910 CXX="g++"
3911 else
3912 case $cross_compiling:$ac_tool_warned in
3913yes:)
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3915$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3916ac_tool_warned=yes ;;
3917esac
3918 CXX=$ac_ct_CXX
3919 fi
3920fi
3921
3922 fi
3923fi
3924# Provide some information about the compiler.
3925$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3926set X $ac_compile
3927ac_compiler=$2
3928for ac_option in --version -v -V -qversion; do
3929 { { ac_try="$ac_compiler $ac_option >&5"
3930case "(($ac_try" in
3931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3932 *) ac_try_echo=$ac_try;;
3933esac
3934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3935$as_echo "$ac_try_echo"; } >&5
3936 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3937 ac_status=$?
3938 if test -s conftest.err; then
3939 sed '10a\
3940... rest of stderr output deleted ...
3941 10q' conftest.err >conftest.er1
3942 cat conftest.er1 >&5
3bc3d82a 3943 fi
d0ac1c44 3944 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3946 test $ac_status = 0; }
3947done
3948
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3950$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3951if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3952 $as_echo_n "(cached) " >&6
3953else
3954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3955/* end confdefs.h. */
3956
3957int
3958main ()
3959{
3960#ifndef __GNUC__
3961 choke me
3962#endif
3963
3964 ;
3965 return 0;
3966}
3967_ACEOF
3968if ac_fn_cxx_try_compile "$LINENO"; then :
3969 ac_compiler_gnu=yes
3970else
3971 ac_compiler_gnu=no
3972fi
3973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3974ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3975
3976fi
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3978$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3979if test $ac_compiler_gnu = yes; then
3980 GXX=yes
3981else
3982 GXX=
3983fi
3984ac_test_CXXFLAGS=${CXXFLAGS+set}
3985ac_save_CXXFLAGS=$CXXFLAGS
3986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3987$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3988if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3989 $as_echo_n "(cached) " >&6
3990else
3991 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3992 ac_cxx_werror_flag=yes
3993 ac_cv_prog_cxx_g=no
3994 CXXFLAGS="-g"
3995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3996/* end confdefs.h. */
3997
3998int
3999main ()
4000{
4001
4002 ;
4003 return 0;
4004}
4005_ACEOF
4006if ac_fn_cxx_try_compile "$LINENO"; then :
4007 ac_cv_prog_cxx_g=yes
4008else
4009 CXXFLAGS=""
4010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4011/* end confdefs.h. */
4012
4013int
4014main ()
4015{
4016
4017 ;
4018 return 0;
4019}
4020_ACEOF
4021if ac_fn_cxx_try_compile "$LINENO"; then :
4022
4023else
4024 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4025 CXXFLAGS="-g"
4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4027/* end confdefs.h. */
4028
4029int
4030main ()
4031{
4032
4033 ;
4034 return 0;
4035}
4036_ACEOF
4037if ac_fn_cxx_try_compile "$LINENO"; then :
4038 ac_cv_prog_cxx_g=yes
4039fi
4040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4041fi
4042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4043fi
4044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4045 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4046fi
4047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4048$as_echo "$ac_cv_prog_cxx_g" >&6; }
4049if test "$ac_test_CXXFLAGS" = set; then
4050 CXXFLAGS=$ac_save_CXXFLAGS
4051elif test $ac_cv_prog_cxx_g = yes; then
4052 if test "$GXX" = yes; then
4053 CXXFLAGS="-g -O2"
4054 else
4055 CXXFLAGS="-g"
4056 fi
4057else
4058 if test "$GXX" = yes; then
4059 CXXFLAGS="-O2"
4060 else
4061 CXXFLAGS=
4062 fi
4063fi
4064ac_ext=c
4065ac_cpp='$CPP $CPPFLAGS'
4066ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4067ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4068ac_compiler_gnu=$ac_cv_c_compiler_gnu
4069
4070
60ca704f 4071
bec39cab
AC
4072ac_ext=c
4073ac_cpp='$CPP $CPPFLAGS'
4074ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4075ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4076ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4078$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4079# On Suns, sometimes $CPP names a directory.
4080if test -n "$CPP" && test -d "$CPP"; then
4081 CPP=
8bb2c122 4082fi
bec39cab 4083if test -z "$CPP"; then
d0ac1c44 4084 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4085 $as_echo_n "(cached) " >&6
bec39cab
AC
4086else
4087 # Double quotes because CPP needs to be expanded
4088 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4089 do
4090 ac_preproc_ok=false
4091for ac_c_preproc_warn_flag in '' yes
4092do
4093 # Use a header file that comes with gcc, so configuring glibc
4094 # with a fresh cross-compiler works.
4095 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4096 # <limits.h> exists even on freestanding compilers.
4097 # On the NeXT, cc -E runs the code through the compiler's parser,
4098 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4100/* end confdefs.h. */
4101#ifdef __STDC__
4102# include <limits.h>
4103#else
4104# include <assert.h>
4105#endif
4106 Syntax error
4107_ACEOF
81ecdfbb 4108if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4109
81ecdfbb 4110else
bec39cab
AC
4111 # Broken: fails on valid input.
4112continue
4113fi
d0ac1c44 4114rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4115
81ecdfbb 4116 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4117 # can be detected and how.
81ecdfbb 4118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4119/* end confdefs.h. */
4120#include <ac_nonexistent.h>
4121_ACEOF
81ecdfbb 4122if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4123 # Broken: success on invalid input.
4124continue
8bb2c122 4125else
bec39cab
AC
4126 # Passes both tests.
4127ac_preproc_ok=:
4128break
8bb2c122 4129fi
d0ac1c44 4130rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4131
bec39cab
AC
4132done
4133# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4134rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4135if $ac_preproc_ok; then :
bec39cab
AC
4136 break
4137fi
8bb2c122 4138
bec39cab
AC
4139 done
4140 ac_cv_prog_CPP=$CPP
ddc9cd0f 4141
c906108c 4142fi
bec39cab
AC
4143 CPP=$ac_cv_prog_CPP
4144else
4145 ac_cv_prog_CPP=$CPP
c906108c 4146fi
81ecdfbb
RW
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4148$as_echo "$CPP" >&6; }
bec39cab
AC
4149ac_preproc_ok=false
4150for ac_c_preproc_warn_flag in '' yes
4151do
4152 # Use a header file that comes with gcc, so configuring glibc
4153 # with a fresh cross-compiler works.
4154 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4155 # <limits.h> exists even on freestanding compilers.
4156 # On the NeXT, cc -E runs the code through the compiler's parser,
4157 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4159/* end confdefs.h. */
4160#ifdef __STDC__
4161# include <limits.h>
4162#else
4163# include <assert.h>
4164#endif
4165 Syntax error
4166_ACEOF
81ecdfbb 4167if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4168
81ecdfbb 4169else
bec39cab
AC
4170 # Broken: fails on valid input.
4171continue
4172fi
d0ac1c44 4173rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4174
81ecdfbb 4175 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4176 # can be detected and how.
81ecdfbb 4177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4178/* end confdefs.h. */
4179#include <ac_nonexistent.h>
4180_ACEOF
81ecdfbb 4181if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4182 # Broken: success on invalid input.
4183continue
c906108c 4184else
bec39cab
AC
4185 # Passes both tests.
4186ac_preproc_ok=:
4187break
c906108c 4188fi
d0ac1c44 4189rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4190
bec39cab
AC
4191done
4192# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4193rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4194if $ac_preproc_ok; then :
4195
c906108c 4196else
81ecdfbb
RW
4197 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4198$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4199as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4200See \`config.log' for more details" "$LINENO" 5; }
c906108c 4201fi
c906108c 4202
bec39cab
AC
4203ac_ext=c
4204ac_cpp='$CPP $CPPFLAGS'
4205ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4206ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4207ac_compiler_gnu=$ac_cv_c_compiler_gnu
4208
4209
81ecdfbb
RW
4210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4211$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4212if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4213 $as_echo_n "(cached) " >&6
4e8d927d 4214else
81ecdfbb
RW
4215 if test -z "$GREP"; then
4216 ac_path_GREP_found=false
4217 # Loop through the user's path and test for each of PROGNAME-LIST
4218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4219for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4220do
4221 IFS=$as_save_IFS
4222 test -z "$as_dir" && as_dir=.
4223 for ac_prog in grep ggrep; do
4224 for ac_exec_ext in '' $ac_executable_extensions; do
4225 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4226 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4227# Check for GNU ac_path_GREP and select it if it is found.
4228 # Check for GNU $ac_path_GREP
4229case `"$ac_path_GREP" --version 2>&1` in
4230*GNU*)
4231 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4232*)
4233 ac_count=0
4234 $as_echo_n 0123456789 >"conftest.in"
4235 while :
4236 do
4237 cat "conftest.in" "conftest.in" >"conftest.tmp"
4238 mv "conftest.tmp" "conftest.in"
4239 cp "conftest.in" "conftest.nl"
4240 $as_echo 'GREP' >> "conftest.nl"
4241 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4242 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4243 as_fn_arith $ac_count + 1 && ac_count=$as_val
4244 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4245 # Best one so far, save it but keep looking for a better one
4246 ac_cv_path_GREP="$ac_path_GREP"
4247 ac_path_GREP_max=$ac_count
bec39cab 4248 fi
81ecdfbb
RW
4249 # 10*(2^10) chars as input seems more than enough
4250 test $ac_count -gt 10 && break
4251 done
4252 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4253esac
bec39cab 4254
81ecdfbb
RW
4255 $ac_path_GREP_found && break 3
4256 done
4257 done
4258 done
4259IFS=$as_save_IFS
4260 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4261 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4262 fi
c906108c 4263else
81ecdfbb 4264 ac_cv_path_GREP=$GREP
c906108c 4265fi
c906108c 4266
81ecdfbb
RW
4267fi
4268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4269$as_echo "$ac_cv_path_GREP" >&6; }
4270 GREP="$ac_cv_path_GREP"
c906108c 4271
c906108c 4272
81ecdfbb
RW
4273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4274$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4275if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4276 $as_echo_n "(cached) " >&6
783e057b 4277else
81ecdfbb
RW
4278 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4279 then ac_cv_path_EGREP="$GREP -E"
4280 else
4281 if test -z "$EGREP"; then
4282 ac_path_EGREP_found=false
4283 # Loop through the user's path and test for each of PROGNAME-LIST
4284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4285for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4286do
4287 IFS=$as_save_IFS
4288 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4289 for ac_prog in egrep; do
4290 for ac_exec_ext in '' $ac_executable_extensions; do
4291 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4292 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4293# Check for GNU ac_path_EGREP and select it if it is found.
4294 # Check for GNU $ac_path_EGREP
4295case `"$ac_path_EGREP" --version 2>&1` in
4296*GNU*)
4297 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4298*)
4299 ac_count=0
4300 $as_echo_n 0123456789 >"conftest.in"
4301 while :
4302 do
4303 cat "conftest.in" "conftest.in" >"conftest.tmp"
4304 mv "conftest.tmp" "conftest.in"
4305 cp "conftest.in" "conftest.nl"
4306 $as_echo 'EGREP' >> "conftest.nl"
4307 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4308 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4309 as_fn_arith $ac_count + 1 && ac_count=$as_val
4310 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4311 # Best one so far, save it but keep looking for a better one
4312 ac_cv_path_EGREP="$ac_path_EGREP"
4313 ac_path_EGREP_max=$ac_count
4314 fi
4315 # 10*(2^10) chars as input seems more than enough
4316 test $ac_count -gt 10 && break
4317 done
4318 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4319esac
bec39cab 4320
81ecdfbb
RW
4321 $ac_path_EGREP_found && break 3
4322 done
4323 done
4324 done
4325IFS=$as_save_IFS
4326 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4327 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4328 fi
783e057b 4329else
81ecdfbb 4330 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4331fi
4332
81ecdfbb 4333 fi
783e057b 4334fi
81ecdfbb
RW
4335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4336$as_echo "$ac_cv_path_EGREP" >&6; }
4337 EGREP="$ac_cv_path_EGREP"
4338
783e057b 4339
81ecdfbb
RW
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4341$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4342if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4343 $as_echo_n "(cached) " >&6
783e057b 4344else
81ecdfbb 4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4346/* end confdefs.h. */
783e057b 4347#include <stdlib.h>
bec39cab 4348#include <stdarg.h>
783e057b
DJ
4349#include <string.h>
4350#include <float.h>
c906108c 4351
bec39cab
AC
4352int
4353main ()
4354{
c906108c 4355
bec39cab
AC
4356 ;
4357 return 0;
4358}
4359_ACEOF
81ecdfbb 4360if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4361 ac_cv_header_stdc=yes
c906108c 4362else
81ecdfbb 4363 ac_cv_header_stdc=no
c906108c 4364fi
81ecdfbb 4365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4366
783e057b
DJ
4367if test $ac_cv_header_stdc = yes; then
4368 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4370/* end confdefs.h. */
4371#include <string.h>
c906108c 4372
783e057b
DJ
4373_ACEOF
4374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4375 $EGREP "memchr" >/dev/null 2>&1; then :
4376
c906108c 4377else
783e057b 4378 ac_cv_header_stdc=no
c906108c 4379fi
783e057b 4380rm -f conftest*
c906108c
SS
4381
4382fi
4383
783e057b
DJ
4384if test $ac_cv_header_stdc = yes; then
4385 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4387/* end confdefs.h. */
4388#include <stdlib.h>
bec39cab 4389
783e057b
DJ
4390_ACEOF
4391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4392 $EGREP "free" >/dev/null 2>&1; then :
4393
bec39cab 4394else
783e057b 4395 ac_cv_header_stdc=no
bec39cab 4396fi
783e057b 4397rm -f conftest*
bec39cab
AC
4398
4399fi
bec39cab 4400
783e057b
DJ
4401if test $ac_cv_header_stdc = yes; then
4402 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4403 if test "$cross_compiling" = yes; then :
783e057b 4404 :
bec39cab 4405else
81ecdfbb 4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4407/* end confdefs.h. */
4408#include <ctype.h>
81ecdfbb 4409#include <stdlib.h>
783e057b
DJ
4410#if ((' ' & 0x0FF) == 0x020)
4411# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4412# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4413#else
4414# define ISLOWER(c) \
4415 (('a' <= (c) && (c) <= 'i') \
4416 || ('j' <= (c) && (c) <= 'r') \
4417 || ('s' <= (c) && (c) <= 'z'))
4418# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4419#endif
4420
4421#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4422int
4423main ()
4424{
4425 int i;
4426 for (i = 0; i < 256; i++)
4427 if (XOR (islower (i), ISLOWER (i))
4428 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4429 return 2;
4430 return 0;
783e057b
DJ
4431}
4432_ACEOF
81ecdfbb 4433if ac_fn_c_try_run "$LINENO"; then :
783e057b 4434
81ecdfbb
RW
4435else
4436 ac_cv_header_stdc=no
783e057b 4437fi
81ecdfbb
RW
4438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4439 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4440fi
81ecdfbb 4441
783e057b
DJ
4442fi
4443fi
81ecdfbb
RW
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4445$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4446if test $ac_cv_header_stdc = yes; then
4447
81ecdfbb 4448$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4449
4450fi
4451
4452# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4453for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4454 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4455do :
4456 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4457ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4458"
d0ac1c44 4459if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4460 cat >>confdefs.h <<_ACEOF
81ecdfbb 4461#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4462_ACEOF
4463
4464fi
4465
4466done
4467
4468
4469
81ecdfbb 4470 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4471if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4472 MINIX=yes
4473else
4474 MINIX=
4475fi
4476
4477
4478 if test "$MINIX" = yes; then
4479
81ecdfbb 4480$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4481
4482
81ecdfbb 4483$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4484
4485
81ecdfbb 4486$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4487
4488 fi
4489
4490
81ecdfbb
RW
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4492$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4493if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4494 $as_echo_n "(cached) " >&6
783e057b 4495else
81ecdfbb 4496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4497/* end confdefs.h. */
4498
d0ac1c44
SM
4499# define __EXTENSIONS__ 1
4500 $ac_includes_default
783e057b
DJ
4501int
4502main ()
4503{
4504
4505 ;
4506 return 0;
4507}
4508_ACEOF
81ecdfbb 4509if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4510 ac_cv_safe_to_define___extensions__=yes
4511else
81ecdfbb 4512 ac_cv_safe_to_define___extensions__=no
783e057b 4513fi
81ecdfbb 4514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4515fi
81ecdfbb
RW
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4517$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4518 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4519 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4520
81ecdfbb 4521 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4522
81ecdfbb 4523 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4524
81ecdfbb 4525 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4526
81ecdfbb 4527 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4528
4529
c971b7fa
PA
4530ac_aux_dir=
4531for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4532 if test -f "$ac_dir/install-sh"; then
4533 ac_aux_dir=$ac_dir
4534 ac_install_sh="$ac_aux_dir/install-sh -c"
4535 break
4536 elif test -f "$ac_dir/install.sh"; then
4537 ac_aux_dir=$ac_dir
4538 ac_install_sh="$ac_aux_dir/install.sh -c"
4539 break
4540 elif test -f "$ac_dir/shtool"; then
4541 ac_aux_dir=$ac_dir
4542 ac_install_sh="$ac_aux_dir/shtool install -c"
4543 break
4544 fi
c971b7fa
PA
4545done
4546if test -z "$ac_aux_dir"; then
d0ac1c44 4547 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4548fi
770d76d7 4549
c971b7fa
PA
4550# These three variables are undocumented and unsupported,
4551# and are intended to be withdrawn in a future Autoconf release.
4552# They can cause serious problems if a builder's source tree is in a directory
4553# whose full name contains unusual characters.
4554ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4555ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4556ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4557
770d76d7 4558
c971b7fa
PA
4559# Make sure we can run config.sub.
4560$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4561 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4562
c971b7fa
PA
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4564$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4565if ${ac_cv_build+:} false; then :
c971b7fa 4566 $as_echo_n "(cached) " >&6
770d76d7 4567else
c971b7fa
PA
4568 ac_build_alias=$build_alias
4569test "x$ac_build_alias" = x &&
4570 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4571test "x$ac_build_alias" = x &&
d0ac1c44 4572 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4573ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4574 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4575
770d76d7 4576fi
c971b7fa
PA
4577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4578$as_echo "$ac_cv_build" >&6; }
4579case $ac_cv_build in
4580*-*-*) ;;
d0ac1c44 4581*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4582esac
c971b7fa
PA
4583build=$ac_cv_build
4584ac_save_IFS=$IFS; IFS='-'
4585set x $ac_cv_build
4586shift
4587build_cpu=$1
4588build_vendor=$2
4589shift; shift
4590# Remember, the first character of IFS is used to create $*,
4591# except with old shells:
4592build_os=$*
4593IFS=$ac_save_IFS
4594case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4595
4596
c971b7fa
PA
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4598$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4599if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4600 $as_echo_n "(cached) " >&6
4601else
c971b7fa
PA
4602 if test "x$host_alias" = x; then
4603 ac_cv_host=$ac_cv_build
81ecdfbb 4604else
c971b7fa 4605 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4606 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4607fi
81ecdfbb
RW
4608
4609fi
c971b7fa
PA
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4611$as_echo "$ac_cv_host" >&6; }
4612case $ac_cv_host in
4613*-*-*) ;;
d0ac1c44 4614*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4615esac
c971b7fa
PA
4616host=$ac_cv_host
4617ac_save_IFS=$IFS; IFS='-'
4618set x $ac_cv_host
4619shift
4620host_cpu=$1
4621host_vendor=$2
4622shift; shift
4623# Remember, the first character of IFS is used to create $*,
4624# except with old shells:
4625host_os=$*
4626IFS=$ac_save_IFS
4627case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4628
4629
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4631$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4632if ${ac_cv_target+:} false; then :
3388710e
JM
4633 $as_echo_n "(cached) " >&6
4634else
4635 if test "x$target_alias" = x; then
4636 ac_cv_target=$ac_cv_host
4637else
4638 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4639 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4640fi
4641
4642fi
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4644$as_echo "$ac_cv_target" >&6; }
4645case $ac_cv_target in
4646*-*-*) ;;
d0ac1c44 4647*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4648esac
4649target=$ac_cv_target
4650ac_save_IFS=$IFS; IFS='-'
4651set x $ac_cv_target
4652shift
4653target_cpu=$1
4654target_vendor=$2
4655shift; shift
4656# Remember, the first character of IFS is used to create $*,
4657# except with old shells:
4658target_os=$*
4659IFS=$ac_save_IFS
4660case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4661
4662
4663# The aliases save the names the user supplied, while $host etc.
4664# will get canonicalized.
4665test -n "$target_alias" &&
4666 test "$program_prefix$program_suffix$program_transform_name" = \
4667 NONENONEs,x,x, &&
4668 program_prefix=${target_alias}-
4669
4670# The tests for host and target for $enable_largefile require
4671# canonical names.
4672
4673
81ecdfbb 4674
da2f07f1
JK
4675# As the $enable_largefile decision depends on --enable-plugins we must set it
4676# even in directories otherwise not depending on the $plugins option.
4677
4678
2974be62
AM
4679 maybe_plugins=no
4680 for ac_header in dlfcn.h
4681do :
4682 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4683"
d0ac1c44 4684if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4685 cat >>confdefs.h <<_ACEOF
4686#define HAVE_DLFCN_H 1
4687_ACEOF
4688 maybe_plugins=yes
4689fi
4690
4691done
4692
4693 for ac_header in windows.h
4694do :
4695 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4696"
d0ac1c44 4697if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4698 cat >>confdefs.h <<_ACEOF
4699#define HAVE_WINDOWS_H 1
4700_ACEOF
4701 maybe_plugins=yes
4702fi
4703
4704done
4705
4706
4707 # Check whether --enable-plugins was given.
da2f07f1
JK
4708if test "${enable_plugins+set}" = set; then :
4709 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4710 no) plugins=no ;;
4711 *) plugins=yes
4712 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4713 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4714 fi ;;
4715 esac
da2f07f1 4716else
2974be62
AM
4717 plugins=$maybe_plugins
4718
da2f07f1
JK
4719fi
4720
2974be62 4721 if test "$plugins" = "yes"; then
458412c3
TT
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4723$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4724if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4725 $as_echo_n "(cached) " >&6
4726else
4727 ac_func_search_save_LIBS=$LIBS
4728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4729/* end confdefs.h. */
4730
4731/* Override any GCC internal prototype to avoid an error.
4732 Use char because int might match the return type of a GCC
4733 builtin and then its argument prototype would still apply. */
4734#ifdef __cplusplus
4735extern "C"
4736#endif
458412c3 4737char dlsym ();
2974be62
AM
4738int
4739main ()
4740{
458412c3 4741return dlsym ();
2974be62
AM
4742 ;
4743 return 0;
4744}
4745_ACEOF
4746for ac_lib in '' dl; do
4747 if test -z "$ac_lib"; then
4748 ac_res="none required"
4749 else
4750 ac_res=-l$ac_lib
4751 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4752 fi
4753 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4754 ac_cv_search_dlsym=$ac_res
2974be62
AM
4755fi
4756rm -f core conftest.err conftest.$ac_objext \
4757 conftest$ac_exeext
d0ac1c44 4758 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4759 break
4760fi
4761done
d0ac1c44 4762if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4763
4764else
458412c3 4765 ac_cv_search_dlsym=no
2974be62
AM
4766fi
4767rm conftest.$ac_ext
4768LIBS=$ac_func_search_save_LIBS
4769fi
458412c3
TT
4770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4771$as_echo "$ac_cv_search_dlsym" >&6; }
4772ac_res=$ac_cv_search_dlsym
2974be62
AM
4773if test "$ac_res" != no; then :
4774 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4775
4776fi
4777
4778 fi
da2f07f1
JK
4779
4780
4781case "${host}" in
c8693053
RO
4782 sparc-*-solaris*|i?86-*-solaris*)
4783 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4784 # were mutually exclusive until Solaris 11.3. Without procfs support,
4785 # the bfd/ elf module cannot provide certain routines such as
4786 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4787 # explicitly requested large-file support through the
4788 # --enable-largefile switch, disable large-file support in favor of
4789 # procfs support.
4790 #
4791 # Check if <sys/procfs.h> is incompatible with large-file support.
4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4793/* end confdefs.h. */
4794#define _FILE_OFFSET_BITS 64
4795#define _STRUCTURED_PROC 1
4796#include <sys/procfs.h>
4797int
4798main ()
4799{
4800
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805if ac_fn_c_try_compile "$LINENO"; then :
4806 acx_cv_procfs_lfs=yes
4807else
4808 acx_cv_procfs_lfs=no
4809fi
4810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4811 #
4812 # Forcefully disable large-file support only if necessary, gdb is in
4813 # tree and enabled.
4814 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4815 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4816 : ${enable_largefile="no"}
4817 if test "$plugins" = yes; then
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4819plugin support disabled; require large-file support which is incompatible with GDB." >&5
4820$as_echo "$as_me: WARNING:
4821plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4822 plugins=no
4823 fi
4824 fi
4825 #
4826 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4827 # benefit of g++ 9+ which predefines it on Solaris.
4828 if test "$enable_largefile" = no; then
4829 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4830
4831 fi
da2f07f1
JK
4832 ;;
4833esac
4834
4835# Check whether --enable-largefile was given.
4836if test "${enable_largefile+set}" = set; then :
4837 enableval=$enable_largefile;
4838fi
4839
4840if test "$enable_largefile" != no; then
4841
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4843$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4844if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4845 $as_echo_n "(cached) " >&6
4846else
4847 ac_cv_sys_largefile_CC=no
4848 if test "$GCC" != yes; then
4849 ac_save_CC=$CC
4850 while :; do
4851 # IRIX 6.2 and later do not support large files by default,
4852 # so use the C compiler's -n32 option if that helps.
4853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4854/* end confdefs.h. */
4855#include <sys/types.h>
4856 /* Check that off_t can represent 2**63 - 1 correctly.
4857 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4858 since some C++ compilers masquerading as C compilers
4859 incorrectly reject 9223372036854775807. */
4860#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4861 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4862 && LARGE_OFF_T % 2147483647 == 1)
4863 ? 1 : -1];
4864int
4865main ()
4866{
4867
4868 ;
4869 return 0;
4870}
4871_ACEOF
4872 if ac_fn_c_try_compile "$LINENO"; then :
4873 break
4874fi
4875rm -f core conftest.err conftest.$ac_objext
4876 CC="$CC -n32"
4877 if ac_fn_c_try_compile "$LINENO"; then :
4878 ac_cv_sys_largefile_CC=' -n32'; break
4879fi
4880rm -f core conftest.err conftest.$ac_objext
4881 break
4882 done
4883 CC=$ac_save_CC
4884 rm -f conftest.$ac_ext
4885 fi
4886fi
4887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4888$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4889 if test "$ac_cv_sys_largefile_CC" != no; then
4890 CC=$CC$ac_cv_sys_largefile_CC
4891 fi
4892
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4894$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4895if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4896 $as_echo_n "(cached) " >&6
4897else
4898 while :; do
4899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900/* end confdefs.h. */
4901#include <sys/types.h>
4902 /* Check that off_t can represent 2**63 - 1 correctly.
4903 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4904 since some C++ compilers masquerading as C compilers
4905 incorrectly reject 9223372036854775807. */
4906#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4907 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4908 && LARGE_OFF_T % 2147483647 == 1)
4909 ? 1 : -1];
4910int
4911main ()
4912{
4913
4914 ;
4915 return 0;
4916}
4917_ACEOF
4918if ac_fn_c_try_compile "$LINENO"; then :
4919 ac_cv_sys_file_offset_bits=no; break
4920fi
4921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923/* end confdefs.h. */
4924#define _FILE_OFFSET_BITS 64
4925#include <sys/types.h>
4926 /* Check that off_t can represent 2**63 - 1 correctly.
4927 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4928 since some C++ compilers masquerading as C compilers
4929 incorrectly reject 9223372036854775807. */
4930#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4931 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4932 && LARGE_OFF_T % 2147483647 == 1)
4933 ? 1 : -1];
4934int
4935main ()
4936{
4937
4938 ;
4939 return 0;
4940}
4941_ACEOF
4942if ac_fn_c_try_compile "$LINENO"; then :
4943 ac_cv_sys_file_offset_bits=64; break
4944fi
4945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4946 ac_cv_sys_file_offset_bits=unknown
4947 break
4948done
4949fi
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4951$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4952case $ac_cv_sys_file_offset_bits in #(
4953 no | unknown) ;;
4954 *)
4955cat >>confdefs.h <<_ACEOF
4956#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4957_ACEOF
4958;;
4959esac
4960rm -rf conftest*
4961 if test $ac_cv_sys_file_offset_bits = unknown; then
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4963$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4964if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4965 $as_echo_n "(cached) " >&6
4966else
4967 while :; do
4968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4969/* end confdefs.h. */
4970#include <sys/types.h>
4971 /* Check that off_t can represent 2**63 - 1 correctly.
4972 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4973 since some C++ compilers masquerading as C compilers
4974 incorrectly reject 9223372036854775807. */
4975#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4976 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4977 && LARGE_OFF_T % 2147483647 == 1)
4978 ? 1 : -1];
4979int
4980main ()
4981{
4982
4983 ;
4984 return 0;
4985}
4986_ACEOF
4987if ac_fn_c_try_compile "$LINENO"; then :
4988 ac_cv_sys_large_files=no; break
4989fi
4990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4992/* end confdefs.h. */
4993#define _LARGE_FILES 1
4994#include <sys/types.h>
4995 /* Check that off_t can represent 2**63 - 1 correctly.
4996 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4997 since some C++ compilers masquerading as C compilers
4998 incorrectly reject 9223372036854775807. */
4999#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5000 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5001 && LARGE_OFF_T % 2147483647 == 1)
5002 ? 1 : -1];
5003int
5004main ()
5005{
5006
5007 ;
5008 return 0;
5009}
5010_ACEOF
5011if ac_fn_c_try_compile "$LINENO"; then :
5012 ac_cv_sys_large_files=1; break
5013fi
5014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5015 ac_cv_sys_large_files=unknown
5016 break
5017done
5018fi
5019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5020$as_echo "$ac_cv_sys_large_files" >&6; }
5021case $ac_cv_sys_large_files in #(
5022 no | unknown) ;;
5023 *)
5024cat >>confdefs.h <<_ACEOF
5025#define _LARGE_FILES $ac_cv_sys_large_files
5026_ACEOF
5027;;
5028esac
5029rm -rf conftest*
5030 fi
d0ac1c44
SM
5031
5032
da2f07f1
JK
5033fi
5034
5035
d0ac1c44
SM
5036# Expand $ac_aux_dir to an absolute path.
5037am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5038
d0ac1c44 5039if test x"${install_sh+set}" != xset; then
4869db5e
RM
5040 case $am_aux_dir in
5041 *\ * | *\ *)
5042 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5043 *)
5044 install_sh="\${SHELL} $am_aux_dir/install-sh"
5045 esac
5046fi
5047
d0ac1c44
SM
5048# Installed binaries are usually stripped using 'strip' when the user
5049# run "make install-strip". However 'strip' might not be the right
4869db5e 5050# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5051# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5052if test "$cross_compiling" != no; then
5053 if test -n "$ac_tool_prefix"; then
5054 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5055set dummy ${ac_tool_prefix}strip; ac_word=$2
5056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5057$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5058if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5059 $as_echo_n "(cached) " >&6
5060else
5061 if test -n "$STRIP"; then
5062 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5063else
5064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5065for as_dir in $PATH
5066do
5067 IFS=$as_save_IFS
5068 test -z "$as_dir" && as_dir=.
5069 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5070 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5071 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5073 break 2
5074 fi
5075done
5076 done
5077IFS=$as_save_IFS
5078
5079fi
5080fi
5081STRIP=$ac_cv_prog_STRIP
5082if test -n "$STRIP"; then
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5084$as_echo "$STRIP" >&6; }
5085else
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5087$as_echo "no" >&6; }
5088fi
5089
5090
5091fi
5092if test -z "$ac_cv_prog_STRIP"; then
5093 ac_ct_STRIP=$STRIP
5094 # Extract the first word of "strip", so it can be a program name with args.
5095set dummy strip; ac_word=$2
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5098if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5099 $as_echo_n "(cached) " >&6
5100else
5101 if test -n "$ac_ct_STRIP"; then
5102 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5103else
5104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5105for as_dir in $PATH
5106do
5107 IFS=$as_save_IFS
5108 test -z "$as_dir" && as_dir=.
5109 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5111 ac_cv_prog_ac_ct_STRIP="strip"
5112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5113 break 2
5114 fi
5115done
5116 done
5117IFS=$as_save_IFS
5118
5119fi
5120fi
5121ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5122if test -n "$ac_ct_STRIP"; then
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5124$as_echo "$ac_ct_STRIP" >&6; }
5125else
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127$as_echo "no" >&6; }
5128fi
5129
5130 if test "x$ac_ct_STRIP" = x; then
5131 STRIP=":"
5132 else
5133 case $cross_compiling:$ac_tool_warned in
5134yes:)
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5137ac_tool_warned=yes ;;
5138esac
5139 STRIP=$ac_ct_STRIP
5140 fi
5141else
5142 STRIP="$ac_cv_prog_STRIP"
5143fi
5144
5145fi
5146INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5147
783e057b
DJ
5148
5149ac_aux_dir=
81ecdfbb 5150for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5151 if test -f "$ac_dir/install-sh"; then
5152 ac_aux_dir=$ac_dir
5153 ac_install_sh="$ac_aux_dir/install-sh -c"
5154 break
5155 elif test -f "$ac_dir/install.sh"; then
5156 ac_aux_dir=$ac_dir
5157 ac_install_sh="$ac_aux_dir/install.sh -c"
5158 break
5159 elif test -f "$ac_dir/shtool"; then
5160 ac_aux_dir=$ac_dir
5161 ac_install_sh="$ac_aux_dir/shtool install -c"
5162 break
5163 fi
783e057b
DJ
5164done
5165if test -z "$ac_aux_dir"; then
d0ac1c44 5166 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5167fi
81ecdfbb
RW
5168
5169# These three variables are undocumented and unsupported,
5170# and are intended to be withdrawn in a future Autoconf release.
5171# They can cause serious problems if a builder's source tree is in a directory
5172# whose full name contains unusual characters.
5173ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5174ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5175ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5176
783e057b 5177
783e057b 5178
91e1a0ed
SM
5179# Set build, build_cpu, build_vendor and build_os.
5180
5181
5182# Set host, host_cpu, host_vendor, and host_os.
5183
5184
5185# Set target, target_cpu, target_vendor, and target_os.
5186
5187
9009e1ae
MR
5188test "$program_prefix" != NONE &&
5189 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5190# Use a double $ so make ignores it.
5191test "$program_suffix" != NONE &&
5192 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5193# Double any \ or $.
5194# By default was `s,x,x', remove it if useless.
5195ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5196program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5197
81ecdfbb 5198
0bcda685
PA
5199# We require a C++11 compiler. Check if one is available, and if
5200# necessary, set CXX_DIALECT to some -std=xxx switch.
5201
41260ac2 5202 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5203 ac_ext=cpp
5204ac_cpp='$CXXCPP $CPPFLAGS'
5205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5208 CXX_DIALECT=""
5209 ac_success=no
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5211$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5212if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5213 $as_echo_n "(cached) " >&6
5214else
5215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5216/* end confdefs.h. */
5217
5218
5219// If the compiler admits that it is not ready for C++11, why torture it?
5220// Hopefully, this will speed up the test.
5221
5222#ifndef __cplusplus
5223
5224#error "This is not a C++ compiler"
5225
5226#elif __cplusplus < 201103L
5227
5228#error "This is not a C++11 compiler"
5229
5230#else
5231
5232namespace cxx11
5233{
5234
5235 namespace test_static_assert
5236 {
5237
5238 template <typename T>
5239 struct check
5240 {
5241 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5242 };
5243
5244 }
5245
5246 namespace test_final_override
5247 {
5248
5249 struct Base
5250 {
5251 virtual void f() {}
5252 };
5253
5254 struct Derived : public Base
5255 {
5256 virtual void f() override {}
5257 };
5258
5259 }
5260
5261 namespace test_double_right_angle_brackets
5262 {
5263
5264 template < typename T >
5265 struct check {};
5266
5267 typedef check<void> single_type;
5268 typedef check<check<void>> double_type;
5269 typedef check<check<check<void>>> triple_type;
5270 typedef check<check<check<check<void>>>> quadruple_type;
5271
5272 }
5273
5274 namespace test_decltype
5275 {
5276
5277 int
5278 f()
5279 {
5280 int a = 1;
5281 decltype(a) b = 2;
5282 return a + b;
5283 }
5284
5285 }
5286
5287 namespace test_type_deduction
5288 {
5289
5290 template < typename T1, typename T2 >
5291 struct is_same
5292 {
5293 static const bool value = false;
5294 };
5295
5296 template < typename T >
5297 struct is_same<T, T>
5298 {
5299 static const bool value = true;
5300 };
5301
5302 template < typename T1, typename T2 >
5303 auto
5304 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5305 {
5306 return a1 + a2;
5307 }
5308
5309 int
5310 test(const int c, volatile int v)
5311 {
5312 static_assert(is_same<int, decltype(0)>::value == true, "");
5313 static_assert(is_same<int, decltype(c)>::value == false, "");
5314 static_assert(is_same<int, decltype(v)>::value == false, "");
5315 auto ac = c;
5316 auto av = v;
5317 auto sumi = ac + av + 'x';
5318 auto sumf = ac + av + 1.0;
5319 static_assert(is_same<int, decltype(ac)>::value == true, "");
5320 static_assert(is_same<int, decltype(av)>::value == true, "");
5321 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5322 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5323 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5324 return (sumf > 0.0) ? sumi : add(c, v);
5325 }
5326
5327 }
5328
5329 namespace test_noexcept
5330 {
5331
5332 int f() { return 0; }
5333 int g() noexcept { return 0; }
5334
5335 static_assert(noexcept(f()) == false, "");
5336 static_assert(noexcept(g()) == true, "");
5337
5338 }
5339
5340 namespace test_constexpr
5341 {
5342
5343 template < typename CharT >
5344 unsigned long constexpr
5345 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5346 {
5347 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5348 }
5349
5350 template < typename CharT >
5351 unsigned long constexpr
5352 strlen_c(const CharT *const s) noexcept
5353 {
5354 return strlen_c_r(s, 0UL);
5355 }
5356
5357 static_assert(strlen_c("") == 0UL, "");
5358 static_assert(strlen_c("1") == 1UL, "");
5359 static_assert(strlen_c("example") == 7UL, "");
5360 static_assert(strlen_c("another\0example") == 7UL, "");
5361
5362 }
5363
5364 namespace test_rvalue_references
5365 {
5366
5367 template < int N >
5368 struct answer
5369 {
5370 static constexpr int value = N;
5371 };
5372
5373 answer<1> f(int&) { return answer<1>(); }
5374 answer<2> f(const int&) { return answer<2>(); }
5375 answer<3> f(int&&) { return answer<3>(); }
5376
5377 void
5378 test()
5379 {
5380 int i = 0;
5381 const int c = 0;
5382 static_assert(decltype(f(i))::value == 1, "");
5383 static_assert(decltype(f(c))::value == 2, "");
5384 static_assert(decltype(f(0))::value == 3, "");
5385 }
5386
5387 }
5388
5389 namespace test_uniform_initialization
5390 {
5391
5392 struct test
5393 {
5394 static const int zero {};
5395 static const int one {1};
5396 };
5397
5398 static_assert(test::zero == 0, "");
5399 static_assert(test::one == 1, "");
5400
5401 }
5402
5403 namespace test_lambdas
5404 {
5405
5406 void
5407 test1()
5408 {
5409 auto lambda1 = [](){};
5410 auto lambda2 = lambda1;
5411 lambda1();
5412 lambda2();
5413 }
5414
5415 int
5416 test2()
5417 {
5418 auto a = [](int i, int j){ return i + j; }(1, 2);
5419 auto b = []() -> int { return '0'; }();
5420 auto c = [=](){ return a + b; }();
5421 auto d = [&](){ return c; }();
5422 auto e = [a, &b](int x) mutable {
5423 const auto identity = [](int y){ return y; };
5424 for (auto i = 0; i < a; ++i)
5425 a += b--;
5426 return x + identity(a + b);
5427 }(0);
5428 return a + b + c + d + e;
5429 }
5430
5431 int
5432 test3()
5433 {
5434 const auto nullary = [](){ return 0; };
5435 const auto unary = [](int x){ return x; };
5436 using nullary_t = decltype(nullary);
5437 using unary_t = decltype(unary);
5438 const auto higher1st = [](nullary_t f){ return f(); };
5439 const auto higher2nd = [unary](nullary_t f1){
5440 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5441 };
5442 return higher1st(nullary) + higher2nd(nullary)(unary);
5443 }
5444
5445 }
5446
5447 namespace test_variadic_templates
5448 {
5449
5450 template <int...>
5451 struct sum;
5452
5453 template <int N0, int... N1toN>
5454 struct sum<N0, N1toN...>
5455 {
5456 static constexpr auto value = N0 + sum<N1toN...>::value;
5457 };
5458
5459 template <>
5460 struct sum<>
5461 {
5462 static constexpr auto value = 0;
5463 };
5464
5465 static_assert(sum<>::value == 0, "");
5466 static_assert(sum<1>::value == 1, "");
5467 static_assert(sum<23>::value == 23, "");
5468 static_assert(sum<1, 2>::value == 3, "");
5469 static_assert(sum<5, 5, 11>::value == 21, "");
5470 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5471
5472 }
5473
5474 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5475 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5476 // because of this.
5477 namespace test_template_alias_sfinae
5478 {
5479
5480 struct foo {};
5481
5482 template<typename T>
5483 using member = typename T::member_type;
5484
5485 template<typename T>
5486 void func(...) {}
5487
5488 template<typename T>
5489 void func(member<T>*) {}
5490
5491 void test();
5492
5493 void test() { func<foo>(0); }
5494
5495 }
5496
5497} // namespace cxx11
5498
5499#endif // __cplusplus >= 201103L
5500
5501
5502
5503_ACEOF
5504if ac_fn_cxx_try_compile "$LINENO"; then :
5505 ax_cv_cxx_compile_cxx11=yes
5506else
5507 ax_cv_cxx_compile_cxx11=no
5508fi
5509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5510fi
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5512$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5513 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5514 ac_success=yes
5515 fi
5516
5517 if test x$ac_success = xno; then
41260ac2
SM
5518 for alternative in ${ax_cxx_compile_alternatives}; do
5519 switch="-std=gnu++${alternative}"
0bcda685
PA
5520 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5522$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5523if eval \${$cachevar+:} false; then :
0bcda685
PA
5524 $as_echo_n "(cached) " >&6
5525else
5526 ac_save_CXX="$CXX"
5527 CXX="$CXX $switch"
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529/* end confdefs.h. */
5530
5531
5532// If the compiler admits that it is not ready for C++11, why torture it?
5533// Hopefully, this will speed up the test.
5534
5535#ifndef __cplusplus
5536
5537#error "This is not a C++ compiler"
5538
5539#elif __cplusplus < 201103L
5540
5541#error "This is not a C++11 compiler"
5542
5543#else
5544
5545namespace cxx11
5546{
5547
5548 namespace test_static_assert
5549 {
5550
5551 template <typename T>
5552 struct check
5553 {
5554 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5555 };
5556
5557 }
5558
5559 namespace test_final_override
5560 {
5561
5562 struct Base
5563 {
5564 virtual void f() {}
5565 };
5566
5567 struct Derived : public Base
5568 {
5569 virtual void f() override {}
5570 };
5571
5572 }
5573
5574 namespace test_double_right_angle_brackets
5575 {
5576
5577 template < typename T >
5578 struct check {};
5579
5580 typedef check<void> single_type;
5581 typedef check<check<void>> double_type;
5582 typedef check<check<check<void>>> triple_type;
5583 typedef check<check<check<check<void>>>> quadruple_type;
5584
5585 }
5586
5587 namespace test_decltype
5588 {
5589
5590 int
5591 f()
5592 {
5593 int a = 1;
5594 decltype(a) b = 2;
5595 return a + b;
5596 }
5597
5598 }
5599
5600 namespace test_type_deduction
5601 {
5602
5603 template < typename T1, typename T2 >
5604 struct is_same
5605 {
5606 static const bool value = false;
5607 };
5608
5609 template < typename T >
5610 struct is_same<T, T>
5611 {
5612 static const bool value = true;
5613 };
5614
5615 template < typename T1, typename T2 >
5616 auto
5617 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5618 {
5619 return a1 + a2;
5620 }
5621
5622 int
5623 test(const int c, volatile int v)
5624 {
5625 static_assert(is_same<int, decltype(0)>::value == true, "");
5626 static_assert(is_same<int, decltype(c)>::value == false, "");
5627 static_assert(is_same<int, decltype(v)>::value == false, "");
5628 auto ac = c;
5629 auto av = v;
5630 auto sumi = ac + av + 'x';
5631 auto sumf = ac + av + 1.0;
5632 static_assert(is_same<int, decltype(ac)>::value == true, "");
5633 static_assert(is_same<int, decltype(av)>::value == true, "");
5634 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5635 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5636 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5637 return (sumf > 0.0) ? sumi : add(c, v);
5638 }
5639
5640 }
5641
5642 namespace test_noexcept
5643 {
5644
5645 int f() { return 0; }
5646 int g() noexcept { return 0; }
5647
5648 static_assert(noexcept(f()) == false, "");
5649 static_assert(noexcept(g()) == true, "");
5650
5651 }
5652
5653 namespace test_constexpr
5654 {
5655
5656 template < typename CharT >
5657 unsigned long constexpr
5658 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5659 {
5660 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5661 }
5662
5663 template < typename CharT >
5664 unsigned long constexpr
5665 strlen_c(const CharT *const s) noexcept
5666 {
5667 return strlen_c_r(s, 0UL);
5668 }
5669
5670 static_assert(strlen_c("") == 0UL, "");
5671 static_assert(strlen_c("1") == 1UL, "");
5672 static_assert(strlen_c("example") == 7UL, "");
5673 static_assert(strlen_c("another\0example") == 7UL, "");
5674
5675 }
5676
5677 namespace test_rvalue_references
5678 {
5679
5680 template < int N >
5681 struct answer
5682 {
5683 static constexpr int value = N;
5684 };
5685
5686 answer<1> f(int&) { return answer<1>(); }
5687 answer<2> f(const int&) { return answer<2>(); }
5688 answer<3> f(int&&) { return answer<3>(); }
5689
5690 void
5691 test()
5692 {
5693 int i = 0;
5694 const int c = 0;
5695 static_assert(decltype(f(i))::value == 1, "");
5696 static_assert(decltype(f(c))::value == 2, "");
5697 static_assert(decltype(f(0))::value == 3, "");
5698 }
5699
5700 }
5701
5702 namespace test_uniform_initialization
5703 {
5704
5705 struct test
5706 {
5707 static const int zero {};
5708 static const int one {1};
5709 };
5710
5711 static_assert(test::zero == 0, "");
5712 static_assert(test::one == 1, "");
5713
5714 }
5715
5716 namespace test_lambdas
5717 {
5718
5719 void
5720 test1()
5721 {
5722 auto lambda1 = [](){};
5723 auto lambda2 = lambda1;
5724 lambda1();
5725 lambda2();
5726 }
5727
5728 int
5729 test2()
5730 {
5731 auto a = [](int i, int j){ return i + j; }(1, 2);
5732 auto b = []() -> int { return '0'; }();
5733 auto c = [=](){ return a + b; }();
5734 auto d = [&](){ return c; }();
5735 auto e = [a, &b](int x) mutable {
5736 const auto identity = [](int y){ return y; };
5737 for (auto i = 0; i < a; ++i)
5738 a += b--;
5739 return x + identity(a + b);
5740 }(0);
5741 return a + b + c + d + e;
5742 }
5743
5744 int
5745 test3()
5746 {
5747 const auto nullary = [](){ return 0; };
5748 const auto unary = [](int x){ return x; };
5749 using nullary_t = decltype(nullary);
5750 using unary_t = decltype(unary);
5751 const auto higher1st = [](nullary_t f){ return f(); };
5752 const auto higher2nd = [unary](nullary_t f1){
5753 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5754 };
5755 return higher1st(nullary) + higher2nd(nullary)(unary);
5756 }
5757
5758 }
5759
5760 namespace test_variadic_templates
5761 {
5762
5763 template <int...>
5764 struct sum;
5765
5766 template <int N0, int... N1toN>
5767 struct sum<N0, N1toN...>
5768 {
5769 static constexpr auto value = N0 + sum<N1toN...>::value;
5770 };
5771
5772 template <>
5773 struct sum<>
5774 {
5775 static constexpr auto value = 0;
5776 };
5777
5778 static_assert(sum<>::value == 0, "");
5779 static_assert(sum<1>::value == 1, "");
5780 static_assert(sum<23>::value == 23, "");
5781 static_assert(sum<1, 2>::value == 3, "");
5782 static_assert(sum<5, 5, 11>::value == 21, "");
5783 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5784
5785 }
5786
5787 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5788 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5789 // because of this.
5790 namespace test_template_alias_sfinae
5791 {
5792
5793 struct foo {};
5794
5795 template<typename T>
5796 using member = typename T::member_type;
5797
5798 template<typename T>
5799 void func(...) {}
5800
5801 template<typename T>
5802 void func(member<T>*) {}
5803
5804 void test();
5805
5806 void test() { func<foo>(0); }
5807
5808 }
5809
5810} // namespace cxx11
5811
5812#endif // __cplusplus >= 201103L
5813
5814
5815
5816_ACEOF
5817if ac_fn_cxx_try_compile "$LINENO"; then :
5818 eval $cachevar=yes
5819else
5820 eval $cachevar=no
5821fi
5822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5823 CXX="$ac_save_CXX"
5824fi
5825eval ac_res=\$$cachevar
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5827$as_echo "$ac_res" >&6; }
5828 if eval test x\$$cachevar = xyes; then
5829 CXX_DIALECT="$switch"
5830 ac_success=yes
5831 break
5832 fi
5833 done
5834 fi
5835
5836 if test x$ac_success = xno; then
41260ac2
SM
5837 for alternative in ${ax_cxx_compile_alternatives}; do
5838 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5839 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5841$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5842if eval \${$cachevar+:} false; then :
0bcda685
PA
5843 $as_echo_n "(cached) " >&6
5844else
5845 ac_save_CXX="$CXX"
41260ac2
SM
5846 CXX="$CXX $switch"
5847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5848/* end confdefs.h. */
5849
5850
5851// If the compiler admits that it is not ready for C++11, why torture it?
5852// Hopefully, this will speed up the test.
5853
5854#ifndef __cplusplus
5855
5856#error "This is not a C++ compiler"
5857
5858#elif __cplusplus < 201103L
5859
5860#error "This is not a C++11 compiler"
5861
5862#else
5863
5864namespace cxx11
5865{
5866
5867 namespace test_static_assert
5868 {
5869
5870 template <typename T>
5871 struct check
5872 {
5873 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5874 };
5875
5876 }
5877
5878 namespace test_final_override
5879 {
5880
5881 struct Base
5882 {
5883 virtual void f() {}
5884 };
5885
5886 struct Derived : public Base
5887 {
5888 virtual void f() override {}
5889 };
5890
5891 }
5892
5893 namespace test_double_right_angle_brackets
5894 {
5895
5896 template < typename T >
5897 struct check {};
5898
5899 typedef check<void> single_type;
5900 typedef check<check<void>> double_type;
5901 typedef check<check<check<void>>> triple_type;
5902 typedef check<check<check<check<void>>>> quadruple_type;
5903
5904 }
5905
5906 namespace test_decltype
5907 {
5908
5909 int
5910 f()
5911 {
5912 int a = 1;
5913 decltype(a) b = 2;
5914 return a + b;
5915 }
5916
5917 }
5918
5919 namespace test_type_deduction
5920 {
5921
5922 template < typename T1, typename T2 >
5923 struct is_same
5924 {
5925 static const bool value = false;
5926 };
5927
5928 template < typename T >
5929 struct is_same<T, T>
5930 {
5931 static const bool value = true;
5932 };
5933
5934 template < typename T1, typename T2 >
5935 auto
5936 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5937 {
5938 return a1 + a2;
5939 }
5940
5941 int
5942 test(const int c, volatile int v)
5943 {
5944 static_assert(is_same<int, decltype(0)>::value == true, "");
5945 static_assert(is_same<int, decltype(c)>::value == false, "");
5946 static_assert(is_same<int, decltype(v)>::value == false, "");
5947 auto ac = c;
5948 auto av = v;
5949 auto sumi = ac + av + 'x';
5950 auto sumf = ac + av + 1.0;
5951 static_assert(is_same<int, decltype(ac)>::value == true, "");
5952 static_assert(is_same<int, decltype(av)>::value == true, "");
5953 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5954 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5955 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5956 return (sumf > 0.0) ? sumi : add(c, v);
5957 }
5958
5959 }
5960
5961 namespace test_noexcept
5962 {
5963
5964 int f() { return 0; }
5965 int g() noexcept { return 0; }
5966
5967 static_assert(noexcept(f()) == false, "");
5968 static_assert(noexcept(g()) == true, "");
5969
5970 }
5971
5972 namespace test_constexpr
5973 {
5974
5975 template < typename CharT >
5976 unsigned long constexpr
5977 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5978 {
5979 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5980 }
5981
5982 template < typename CharT >
5983 unsigned long constexpr
5984 strlen_c(const CharT *const s) noexcept
5985 {
5986 return strlen_c_r(s, 0UL);
5987 }
5988
5989 static_assert(strlen_c("") == 0UL, "");
5990 static_assert(strlen_c("1") == 1UL, "");
5991 static_assert(strlen_c("example") == 7UL, "");
5992 static_assert(strlen_c("another\0example") == 7UL, "");
5993
5994 }
5995
5996 namespace test_rvalue_references
5997 {
5998
5999 template < int N >
6000 struct answer
6001 {
6002 static constexpr int value = N;
6003 };
6004
6005 answer<1> f(int&) { return answer<1>(); }
6006 answer<2> f(const int&) { return answer<2>(); }
6007 answer<3> f(int&&) { return answer<3>(); }
6008
6009 void
6010 test()
6011 {
6012 int i = 0;
6013 const int c = 0;
6014 static_assert(decltype(f(i))::value == 1, "");
6015 static_assert(decltype(f(c))::value == 2, "");
6016 static_assert(decltype(f(0))::value == 3, "");
6017 }
6018
6019 }
6020
6021 namespace test_uniform_initialization
6022 {
6023
6024 struct test
6025 {
6026 static const int zero {};
6027 static const int one {1};
6028 };
6029
6030 static_assert(test::zero == 0, "");
6031 static_assert(test::one == 1, "");
6032
6033 }
6034
6035 namespace test_lambdas
6036 {
6037
6038 void
6039 test1()
6040 {
6041 auto lambda1 = [](){};
6042 auto lambda2 = lambda1;
6043 lambda1();
6044 lambda2();
6045 }
6046
6047 int
6048 test2()
6049 {
6050 auto a = [](int i, int j){ return i + j; }(1, 2);
6051 auto b = []() -> int { return '0'; }();
6052 auto c = [=](){ return a + b; }();
6053 auto d = [&](){ return c; }();
6054 auto e = [a, &b](int x) mutable {
6055 const auto identity = [](int y){ return y; };
6056 for (auto i = 0; i < a; ++i)
6057 a += b--;
6058 return x + identity(a + b);
6059 }(0);
6060 return a + b + c + d + e;
6061 }
6062
6063 int
6064 test3()
6065 {
6066 const auto nullary = [](){ return 0; };
6067 const auto unary = [](int x){ return x; };
6068 using nullary_t = decltype(nullary);
6069 using unary_t = decltype(unary);
6070 const auto higher1st = [](nullary_t f){ return f(); };
6071 const auto higher2nd = [unary](nullary_t f1){
6072 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6073 };
6074 return higher1st(nullary) + higher2nd(nullary)(unary);
6075 }
6076
6077 }
6078
6079 namespace test_variadic_templates
6080 {
6081
6082 template <int...>
6083 struct sum;
6084
6085 template <int N0, int... N1toN>
6086 struct sum<N0, N1toN...>
6087 {
6088 static constexpr auto value = N0 + sum<N1toN...>::value;
6089 };
6090
6091 template <>
6092 struct sum<>
6093 {
6094 static constexpr auto value = 0;
6095 };
6096
6097 static_assert(sum<>::value == 0, "");
6098 static_assert(sum<1>::value == 1, "");
6099 static_assert(sum<23>::value == 23, "");
6100 static_assert(sum<1, 2>::value == 3, "");
6101 static_assert(sum<5, 5, 11>::value == 21, "");
6102 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6103
6104 }
6105
6106 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6107 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6108 // because of this.
6109 namespace test_template_alias_sfinae
6110 {
6111
6112 struct foo {};
6113
6114 template<typename T>
6115 using member = typename T::member_type;
6116
6117 template<typename T>
6118 void func(...) {}
6119
6120 template<typename T>
6121 void func(member<T>*) {}
6122
6123 void test();
6124
6125 void test() { func<foo>(0); }
6126
6127 }
6128
6129} // namespace cxx11
6130
6131#endif // __cplusplus >= 201103L
6132
6133
6134
6135_ACEOF
6136if ac_fn_cxx_try_compile "$LINENO"; then :
6137 eval $cachevar=yes
6138else
6139 eval $cachevar=no
6140fi
6141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6142 CXX="$ac_save_CXX"
0bcda685
PA
6143fi
6144eval ac_res=\$$cachevar
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6146$as_echo "$ac_res" >&6; }
41260ac2
SM
6147 if eval test x\$$cachevar = xyes; then
6148 CXX_DIALECT="$switch"
6149 ac_success=yes
6150 break
6151 fi
6152 done
6153 if test x$ac_success = xyes; then
0bcda685
PA
6154 break
6155 fi
6156 done
6157 fi
6158 ac_ext=c
6159ac_cpp='$CPP $CPPFLAGS'
6160ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6161ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6162ac_compiler_gnu=$ac_cv_c_compiler_gnu
6163
6164 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6165 if test x$ac_success = xno; then
d0ac1c44 6166 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6167 fi
6168 fi
6169 if test x$ac_success = xno; then
6170 HAVE_CXX11=0
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6172$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6173 else
6174 HAVE_CXX11=1
6175
6176$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6177
6178 fi
6179
6180
6181
6182
a417dc56
RW
6183# Dependency checking.
6184rm -rf .tst 2>/dev/null
6185mkdir .tst 2>/dev/null
6186if test -d .tst; then
6187 am__leading_dot=.
6188else
6189 am__leading_dot=_
6190fi
6191rmdir .tst 2>/dev/null
6192
6193DEPDIR="${am__leading_dot}deps"
6194
81ecdfbb 6195ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6196
6197
6198depcc="$CC" am_compiler_list=
6199
6200am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6202$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6203if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6204 $as_echo_n "(cached) " >&6
a417dc56
RW
6205else
6206 if test -f "$am_depcomp"; then
6207 # We make a subdir and do the tests there. Otherwise we can end up
6208 # making bogus files that we don't know about and never remove. For
6209 # instance it was reported that on HP-UX the gcc test will end up
6210 # making a dummy file named `D' -- because `-MD' means `put the output
6211 # in D'.
6212 mkdir conftest.dir
6213 # Copy depcomp to subdir because otherwise we won't find it if we're
6214 # using a relative directory.
6215 cp "$am_depcomp" conftest.dir
6216 cd conftest.dir
6217 # We will build objects and dependencies in a subdirectory because
6218 # it helps to detect inapplicable dependency modes. For instance
6219 # both Tru64's cc and ICC support -MD to output dependencies as a
6220 # side effect of compilation, but ICC will put the dependencies in
6221 # the current directory while Tru64 will put them in the object
6222 # directory.
6223 mkdir sub
6224
6225 am_cv_CC_dependencies_compiler_type=none
6226 if test "$am_compiler_list" = ""; then
6227 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6228 fi
6229 for depmode in $am_compiler_list; do
6230 if test $depmode = none; then break; fi
6231
81ecdfbb 6232 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6233 # Setup a source with many dependencies, because some compilers
6234 # like to wrap large dependency lists on column 80 (with \), and
6235 # we should not choose a depcomp mode which is confused by this.
6236 #
6237 # We need to recreate these files for each test, as the compiler may
6238 # overwrite some of them when testing with obscure command lines.
6239 # This happens at least with the AIX C compiler.
6240 : > sub/conftest.c
6241 for i in 1 2 3 4 5 6; do
6242 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6243 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6244 # Solaris 8's {/usr,}/bin/sh.
6245 touch sub/conftst$i.h
6246 done
6247 echo "include sub/conftest.Po" > confmf
6248
6249 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6250 # mode. It turns out that the SunPro C++ compiler does not properly
6251 # handle `-M -o', and we need to detect this.
6252 depcmd="depmode=$depmode \
6253 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6254 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6255 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6256 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6257 if env $depcmd > conftest.err 2>&1 &&
6258 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6259 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6260 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6261 # icc doesn't choke on unknown options, it will just issue warnings
6262 # or remarks (even with -Werror). So we grep stderr for any message
6263 # that says an option was ignored or not supported.
6264 # When given -MP, icc 7.0 and 7.1 complain thusly:
6265 # icc: Command line warning: ignoring option '-M'; no argument required
6266 # The diagnosis changed in icc 8.0:
6267 # icc: Command line remark: option '-MP' not supported
6268 if (grep 'ignoring option' conftest.err ||
6269 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6270 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6271 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6272 break
6273 fi
6274 fi
81ecdfbb 6275 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6276 sed -e 's/^/| /' < conftest.err >&5
6277 done
6278
6279 cd ..
6280 rm -rf conftest.dir
6281else
6282 am_cv_CC_dependencies_compiler_type=none
6283fi
6284
6285fi
81ecdfbb
RW
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6287$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6288if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6289then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6290else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6291
6292fi
6293
6294
c971b7fa
PA
6295
6296CONFIG_OBS=
6297CONFIG_DEPS=
6298CONFIG_SRCS=
6299ENABLE_CFLAGS=
6300
6301CONFIG_ALL=
6302CONFIG_CLEAN=
6303CONFIG_INSTALL=
6304CONFIG_UNINSTALL=
6305
6306# If we haven't got the data from the intl directory,
6307# assume NLS is disabled.
6308USE_NLS=no
6309LIBINTL=
6310LIBINTL_DEP=
6311INCINTL=
6312XGETTEXT=
6313GMSGFMT=
6314POSUB=
783e057b
DJ
6315
6316if test -f ../intl/config.intl; then
6317 . ../intl/config.intl
6318fi
81ecdfbb
RW
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6320$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6321if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
783e057b 6324else
81ecdfbb
RW
6325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6326$as_echo "yes" >&6; }
783e057b 6327
81ecdfbb 6328$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6329
6330
81ecdfbb
RW
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6332$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6333 # Look for .po and .gmo files in the source directory.
6334 CATALOGS=
6335 XLINGUAS=
6336 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6337 # If there aren't any .gmo files the shell will give us the
6338 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6339 # weeded out.
6340 case "$cat" in *\**)
6341 continue;;
6342 esac
6343 # The quadruple backslash is collapsed to a double backslash
6344 # by the backticks, then collapsed again by the double quotes,
6345 # leaving us with one backslash in the sed expression (right
6346 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6347 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6348 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6349 # The user is allowed to set LINGUAS to a list of languages to
6350 # install catalogs for. If it's empty that means "all of them."
6351 if test "x$LINGUAS" = x; then
6352 CATALOGS="$CATALOGS $cat"
6353 XLINGUAS="$XLINGUAS $lang"
6354 else
6355 case "$LINGUAS" in *$lang*)
6356 CATALOGS="$CATALOGS $cat"
6357 XLINGUAS="$XLINGUAS $lang"
6358 ;;
6359 esac
e28b3332
DJ
6360 fi
6361 done
c971b7fa
PA
6362 LINGUAS="$XLINGUAS"
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6364$as_echo "$LINGUAS" >&6; }
6365
6366
6367 DATADIRNAME=share
6368
6369 INSTOBJEXT=.mo
6370
6371 GENCAT=gencat
6372
6373 CATOBJEXT=.gmo
e28b3332 6374
e28b3332
DJ
6375fi
6376
c971b7fa
PA
6377localedir='${datadir}/locale'
6378
6379
6380if test x"$USE_NLS" = xyes; then
6381 CONFIG_ALL="$CONFIG_ALL all-po"
6382 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6383 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6384 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6385fi
e28b3332 6386
c971b7fa
PA
6387PACKAGE=gdb
6388
6389cat >>confdefs.h <<_ACEOF
6390#define PACKAGE "$PACKAGE"
6391_ACEOF
6392
6393
6394
6395# We never need to detect it in this sub-configure.
6396# But preserve it for config.status --recheck.
6397
6398
6399
6400MAKEINFO_EXTRA_FLAGS=""
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6402$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6403if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6404 $as_echo_n "(cached) " >&6
6405else
6406 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6407 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6408 gdb_cv_have_makeinfo_click=yes
6409 else
6410 gdb_cv_have_makeinfo_click=no
6411 fi
6412fi
6413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6414$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6415if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6416 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6417fi
e28b3332
DJ
6418
6419
bec39cab
AC
6420
6421
81ecdfbb
RW
6422# Check whether --with-separate-debug-dir was given.
6423if test "${with_separate_debug_dir+set}" = set; then :
6424 withval=$with_separate_debug_dir;
b14b1491
TT
6425 DEBUGDIR=$withval
6426else
6427 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6428fi
6429
20e95c23 6430
783e057b
DJ
6431 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6432 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6433 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6434 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6435
783e057b
DJ
6436cat >>confdefs.h <<_ACEOF
6437#define DEBUGDIR "$ac_define_dir"
20e95c23 6438_ACEOF
20e95c23 6439
20e95c23 6440
20e95c23 6441
0c4a4063 6442
b14b1491
TT
6443 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6444 if test "x$prefix" = xNONE; then
6445 test_prefix=/usr/local
6446 else
6447 test_prefix=$prefix
6448 fi
783e057b 6449 else
b14b1491 6450 test_prefix=$exec_prefix
783e057b 6451 fi
b14b1491
TT
6452 value=0
6453 case ${ac_define_dir} in
6454 "${test_prefix}"|"${test_prefix}/"*|\
6455 '${exec_prefix}'|'${exec_prefix}/'*)
6456 value=1
6457 ;;
6458 esac
6459
6460cat >>confdefs.h <<_ACEOF
6461#define DEBUGDIR_RELOCATABLE $value
6462_ACEOF
6463
6464
6465
0c4a4063 6466
f83d8a90
DE
6467# We can't pass paths as command line arguments.
6468# Mingw32 tries to be clever and will convert the paths for us.
6469# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6470# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6471# This breaks GDB's relocatable path conversions since paths passed in
6472# config.h would not get so translated, the path prefixes no longer match.
6473
6474 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6475 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6476 ac_define_dir=`eval echo $bindir`
6477 ac_define_dir=`eval echo $ac_define_dir`
6478
6479cat >>confdefs.h <<_ACEOF
6480#define BINDIR "$ac_define_dir"
6481_ACEOF
6482
6483
6484
b14b1491
TT
6485# GDB's datadir relocation
6486
6487
6488
81ecdfbb
RW
6489# Check whether --with-gdb-datadir was given.
6490if test "${with_gdb_datadir+set}" = set; then :
6491 withval=$with_gdb_datadir;
b14b1491 6492 GDB_DATADIR=$withval
20e95c23 6493else
b14b1491 6494 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6495fi
6496
20e95c23 6497
b14b1491
TT
6498 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6499 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6500 ac_define_dir=`eval echo $GDB_DATADIR`
6501 ac_define_dir=`eval echo $ac_define_dir`
6502
6503cat >>confdefs.h <<_ACEOF
6504#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6505_ACEOF
6506
b14b1491
TT
6507
6508
0c4a4063 6509
b14b1491
TT
6510 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6511 if test "x$prefix" = xNONE; then
6512 test_prefix=/usr/local
6513 else
6514 test_prefix=$prefix
6515 fi
6516 else
6517 test_prefix=$exec_prefix
6518 fi
6519 value=0
6520 case ${ac_define_dir} in
6521 "${test_prefix}"|"${test_prefix}/"*|\
6522 '${exec_prefix}'|'${exec_prefix}/'*)
6523 value=1
6524 ;;
6525 esac
6526
6527cat >>confdefs.h <<_ACEOF
6528#define GDB_DATADIR_RELOCATABLE $value
6529_ACEOF
6530
6531
783e057b 6532
20e95c23 6533
0c4a4063 6534
81ecdfbb
RW
6535# Check whether --with-relocated-sources was given.
6536if test "${with_relocated_sources+set}" = set; then :
6537 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6538
6539 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6540 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6541 ac_define_dir=`eval echo $reloc_srcdir`
6542 ac_define_dir=`eval echo $ac_define_dir`
6543
6544cat >>confdefs.h <<_ACEOF
6545#define RELOC_SRCDIR "$ac_define_dir"
6546_ACEOF
6547
6548
6549
81ecdfbb
RW
6550fi
6551
29b0e8a2 6552
7349ff92
JK
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6554$as_echo_n "checking for default auto-load directory... " >&6; }
6555
6556# Check whether --with-auto-load-dir was given.
6557if test "${with_auto_load_dir+set}" = set; then :
6558 withval=$with_auto_load_dir;
6559else
1564a261 6560 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6561fi
6562
2861ee4f 6563escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6564
6565 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6566 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6567 ac_define_dir=`eval echo $escape_dir`
6568 ac_define_dir=`eval echo $ac_define_dir`
6569
6570cat >>confdefs.h <<_ACEOF
6571#define AUTO_LOAD_DIR "$ac_define_dir"
6572_ACEOF
6573
6574
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6576$as_echo "$with_auto_load_dir" >&6; }
6577
bccbefd2
JK
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6579$as_echo_n "checking for default auto-load safe-path... " >&6; }
6580
6581# Check whether --with-auto-load-safe-path was given.
6582if test "${with_auto_load_safe_path+set}" = set; then :
6583 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6584 with_auto_load_safe_path="/"
6585 fi
bccbefd2 6586else
7349ff92 6587 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6588fi
6589
2861ee4f 6590escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6591
6592 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6593 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6594 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6595 ac_define_dir=`eval echo $ac_define_dir`
6596
6597cat >>confdefs.h <<_ACEOF
6dea1fbd 6598#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6599_ACEOF
6600
6601
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6603$as_echo "$with_auto_load_safe_path" >&6; }
6604
29b0e8a2 6605
20e95c23 6606
5ae98d25 6607subdirs="$subdirs testsuite"
20e95c23
DJ
6608
6609
783e057b 6610# Check whether to support alternative target configurations
81ecdfbb
RW
6611# Check whether --enable-targets was given.
6612if test "${enable_targets+set}" = set; then :
6613 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6614 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6615 ;;
6616 no) enable_targets= ;;
6617 *) enable_targets=$enableval ;;
6618esac
81ecdfbb
RW
6619fi
6620
20e95c23 6621
783e057b 6622# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6623# Check whether --enable-64-bit-bfd was given.
6624if test "${enable_64_bit_bfd+set}" = set; then :
6625 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6626 yes) want64=true ;;
6627 no) want64=false ;;
d0ac1c44 6628 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6629esac
6630else
6631 want64=false
81ecdfbb
RW
6632fi
6633
783e057b
DJ
6634# Provide defaults for some variables set by the per-host and per-target
6635# configuration.
6636gdb_host_obs=posix-hdep.o
20e95c23 6637
783e057b
DJ
6638if test "${target}" = "${host}"; then
6639 gdb_native=yes
6640else
6641 gdb_native=no
6642fi
20e95c23 6643
783e057b 6644. $srcdir/configure.host
20e95c23 6645
783e057b 6646# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6647
783e057b
DJ
6648TARGET_OBS=
6649all_targets=
b292c783 6650HAVE_NATIVE_GCORE_TARGET=
20e95c23 6651
783e057b 6652for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6653do
783e057b
DJ
6654 if test "$targ_alias" = "all"; then
6655 all_targets=true
6656 else
6657 # Canonicalize the secondary target names.
6658 result=`$ac_config_sub $targ_alias 2>/dev/null`
6659 if test -n "$result"; then
6660 targ=$result
6661 else
6662 targ=$targ_alias
6663 fi
20e95c23 6664
783e057b 6665 . ${srcdir}/configure.tgt
20e95c23 6666
bf307134 6667 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6668 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6669fi
6670
783e057b
DJ
6671 # Target-specific object files
6672 for i in ${gdb_target_obs}; do
6673 case " $TARGET_OBS " in
6674 *" ${i} "*) ;;
6675 *)
6676 TARGET_OBS="$TARGET_OBS ${i}"
6677 ;;
6678 esac
6679 done
20e95c23 6680
783e057b
DJ
6681 # Check whether this target needs 64-bit CORE_ADDR
6682 if test x${want64} = xfalse; then
6683 . ${srcdir}/../bfd/config.bfd
6684 fi
b292c783
JK
6685
6686 # Check whether this target is native and supports gcore.
6687 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6688 && $gdb_have_gcore; then
6689 HAVE_NATIVE_GCORE_TARGET=1
6690 fi
783e057b 6691 fi
20e95c23
DJ
6692done
6693
783e057b
DJ
6694if test x${all_targets} = xtrue; then
6695
6696 # We want all 64-bit targets if we either:
6697 # - run on a 64-bit host or
6698 # - already require 64-bit support for some other target or
6699 # - the --enable-64-bit-bfd option was supplied
6700 # Otherwise we only support all 32-bit targets.
6701 #
6702 # NOTE: This test must be in sync with the corresponding
6703 # tests in BFD!
20e95c23 6704
783e057b 6705 if test x${want64} = xfalse; then
81ecdfbb
RW
6706 # The cast to long int works around a bug in the HP C Compiler
6707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6709# This bug is HP SR number 8606223364.
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6711$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6712if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6713 $as_echo_n "(cached) " >&6
c0993dbe 6714else
81ecdfbb 6715 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6716
81ecdfbb
RW
6717else
6718 if test "$ac_cv_type_long" = yes; then
6719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6721as_fn_error 77 "cannot compute sizeof (long)
6722See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6723 else
6724 ac_cv_sizeof_long=0
6725 fi
c0993dbe 6726fi
81ecdfbb 6727
c0993dbe 6728fi
81ecdfbb
RW
6729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6730$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6731
c0993dbe 6732
c0993dbe 6733
c0993dbe
UW
6734cat >>confdefs.h <<_ACEOF
6735#define SIZEOF_LONG $ac_cv_sizeof_long
6736_ACEOF
6737
6738
6739 if test "x${ac_cv_sizeof_long}" = "x8"; then
6740 want64=true
6741 fi
6742 fi
6743 if test x${want64} = xtrue; then
6744 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6745 else
6746 TARGET_OBS='$(ALL_TARGET_OBS)'
6747 fi
6748fi
6749
6750
6751
b292c783 6752
c0993dbe
UW
6753# For other settings, only the main target counts.
6754gdb_sim=
6755gdb_osabi=
c0993dbe
UW
6756targ=$target; . ${srcdir}/configure.tgt
6757
6758# Fetch the default architecture and default target vector from BFD.
6759targ=$target; . $srcdir/../bfd/config.bfd
6760
6761# We only want the first architecture, so strip off the others if
6762# there is more than one.
6763targ_archs=`echo $targ_archs | sed 's/ .*//'`
6764
6765if test "x$targ_archs" != x; then
6766
6767cat >>confdefs.h <<_ACEOF
6768#define DEFAULT_BFD_ARCH $targ_archs
6769_ACEOF
6770
6771fi
6772if test "x$targ_defvec" != x; then
6773
6774cat >>confdefs.h <<_ACEOF
6775#define DEFAULT_BFD_VEC $targ_defvec
6776_ACEOF
6777
6778fi
6779
c0993dbe 6780# Enable MI.
81ecdfbb
RW
6781# Check whether --enable-gdbmi was given.
6782if test "${enable_gdbmi+set}" = set; then :
6783 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6784 yes | no)
6785 ;;
6786 *)
d0ac1c44 6787 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6788 esac
6789else
6790 enable_gdbmi=yes
81ecdfbb
RW
6791fi
6792
c0993dbe 6793if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6794 if test -d "$srcdir/mi"; then
c0993dbe
UW
6795 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6796 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6797 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6798 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6799 fi
6800fi
6801
6802# Enable TUI.
81ecdfbb
RW
6803# Check whether --enable-tui was given.
6804if test "${enable_tui+set}" = set; then :
6805 enableval=$enable_tui; case $enableval in
3ca64bd3 6806 yes | no | auto)
c0993dbe
UW
6807 ;;
6808 *)
d0ac1c44 6809 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6810 esac
6811else
3ca64bd3 6812 enable_tui=auto
81ecdfbb
RW
6813fi
6814
c0993dbe
UW
6815
6816# Enable gdbtk.
81ecdfbb
RW
6817# Check whether --enable-gdbtk was given.
6818if test "${enable_gdbtk+set}" = set; then :
6819 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6820 yes | no)
6821 ;;
6822 *)
d0ac1c44 6823 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6824 esac
6825else
0ad6b8ee 6826 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6827 enable_gdbtk=yes
6828 else
6829 enable_gdbtk=no
6830 fi
81ecdfbb
RW
6831fi
6832
c0993dbe
UW
6833# We unconditionally disable gdbtk tests on selected platforms.
6834case $host_os in
6835 go32* | windows*)
81ecdfbb
RW
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6837$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6838 enable_gdbtk=no ;;
6839esac
6840
0d79cdc4
AM
6841# Handle optional debuginfod support
6842
f6720b1c
AM
6843
6844
6845
6846
6847
6848
6849if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6850 if test -n "$ac_tool_prefix"; then
6851 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6852set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6854$as_echo_n "checking for $ac_word... " >&6; }
6855if ${ac_cv_path_PKG_CONFIG+:} false; then :
6856 $as_echo_n "(cached) " >&6
6857else
6858 case $PKG_CONFIG in
6859 [\\/]* | ?:[\\/]*)
6860 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6861 ;;
6862 *)
6863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6864for as_dir in $PATH
6865do
6866 IFS=$as_save_IFS
6867 test -z "$as_dir" && as_dir=.
6868 for ac_exec_ext in '' $ac_executable_extensions; do
6869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6870 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6872 break 2
6873 fi
6874done
6875 done
6876IFS=$as_save_IFS
6877
6878 ;;
6879esac
6880fi
6881PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6882if test -n "$PKG_CONFIG"; then
6883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6884$as_echo "$PKG_CONFIG" >&6; }
6885else
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6887$as_echo "no" >&6; }
6888fi
6889
6890
6891fi
6892if test -z "$ac_cv_path_PKG_CONFIG"; then
6893 ac_pt_PKG_CONFIG=$PKG_CONFIG
6894 # Extract the first word of "pkg-config", so it can be a program name with args.
6895set dummy pkg-config; ac_word=$2
6896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6897$as_echo_n "checking for $ac_word... " >&6; }
6898if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6899 $as_echo_n "(cached) " >&6
6900else
6901 case $ac_pt_PKG_CONFIG in
6902 [\\/]* | ?:[\\/]*)
6903 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6904 ;;
6905 *)
6906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6907for as_dir in $PATH
6908do
6909 IFS=$as_save_IFS
6910 test -z "$as_dir" && as_dir=.
6911 for ac_exec_ext in '' $ac_executable_extensions; do
6912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6913 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6915 break 2
6916 fi
6917done
6918 done
6919IFS=$as_save_IFS
6920
6921 ;;
6922esac
6923fi
6924ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6925if test -n "$ac_pt_PKG_CONFIG"; then
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6927$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6928else
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6930$as_echo "no" >&6; }
6931fi
6932
6933 if test "x$ac_pt_PKG_CONFIG" = x; then
6934 PKG_CONFIG=""
6935 else
6936 case $cross_compiling:$ac_tool_warned in
6937yes:)
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6939$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6940ac_tool_warned=yes ;;
6941esac
6942 PKG_CONFIG=$ac_pt_PKG_CONFIG
6943 fi
6944else
6945 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6946fi
6947
6948fi
6949if test -n "$PKG_CONFIG"; then
6950 _pkg_min_version=0.9.0
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6952$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6953 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6955$as_echo "yes" >&6; }
6956 else
6957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958$as_echo "no" >&6; }
6959 PKG_CONFIG=""
6960 fi
6961fi
6962
6963# Handle optional debuginfod support
0d79cdc4
AM
6964
6965# Check whether --with-debuginfod was given.
6966if test "${with_debuginfod+set}" = set; then :
6967 withval=$with_debuginfod;
6968else
6969 with_debuginfod=auto
6970fi
6971
6972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6973$as_echo_n "checking whether to use debuginfod... " >&6; }
6974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6975$as_echo "$with_debuginfod" >&6; }
6976
f6720b1c 6977if test "x$with_debuginfod" != xno; then
0d79cdc4 6978
f6720b1c
AM
6979pkg_failed=no
6980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
6981$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
6982
6983if test -n "$DEBUGINFOD_CFLAGS"; then
6984 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
6985 elif test -n "$PKG_CONFIG"; then
6986 if test -n "$PKG_CONFIG" && \
6987 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
6988 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
6989 ac_status=$?
6990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6991 test $ac_status = 0; }; then
6992 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
6993 test "x$?" != "x0" && pkg_failed=yes
0d79cdc4 6994else
f6720b1c 6995 pkg_failed=yes
0d79cdc4 6996fi
f6720b1c
AM
6997 else
6998 pkg_failed=untried
0d79cdc4 6999fi
f6720b1c
AM
7000if test -n "$DEBUGINFOD_LIBS"; then
7001 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7002 elif test -n "$PKG_CONFIG"; then
7003 if test -n "$PKG_CONFIG" && \
7004 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7005 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7006 ac_status=$?
7007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7008 test $ac_status = 0; }; then
7009 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7010 test "x$?" != "x0" && pkg_failed=yes
7011else
7012 pkg_failed=yes
0d79cdc4 7013fi
f6720b1c
AM
7014 else
7015 pkg_failed=untried
0d79cdc4 7016fi
bec39cab 7017
377170fa
L
7018if test $pkg_failed = no; then
7019 pkg_save_LDFLAGS="$LDFLAGS"
7020 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d70f978b
L
7022/* end confdefs.h. */
7023
7024int
7025main ()
7026{
377170fa 7027
d70f978b
L
7028 ;
7029 return 0;
7030}
7031_ACEOF
7032if ac_fn_c_try_link "$LINENO"; then :
377170fa 7033
d70f978b
L
7034else
7035 pkg_failed=yes
7036fi
7037rm -f core conftest.err conftest.$ac_objext \
7038 conftest$ac_exeext conftest.$ac_ext
377170fa
L
7039 LDFLAGS=$pkg_save_LDFLAGS
7040fi
d70f978b 7041
0d79cdc4 7042
0d79cdc4 7043
f6720b1c
AM
7044if test $pkg_failed = yes; then
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7046$as_echo "no" >&6; }
0d79cdc4 7047
f6720b1c
AM
7048if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7049 _pkg_short_errors_supported=yes
7050else
7051 _pkg_short_errors_supported=no
7052fi
7053 if test $_pkg_short_errors_supported = yes; then
7054 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7055 else
7056 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7057 fi
7058 # Put the nasty error message in config.log where it belongs
7059 echo "$DEBUGINFOD_PKG_ERRORS" >&5
0d79cdc4 7060
f6720b1c
AM
7061 if test "x$with_debuginfod" = xyes; then
7062 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7063 else
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7065$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7066 fi
7067elif test $pkg_failed = untried; then
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7069$as_echo "no" >&6; }
7070 if test "x$with_debuginfod" = xyes; then
7071 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7072 else
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7074$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7075 fi
7076else
7077 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7078 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7080$as_echo "yes" >&6; }
7081
7082$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7083
7084fi
7085else
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7087$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
0d79cdc4
AM
7088fi
7089
7090
7091# Libunwind support for ia64.
05e7c244
JK
7092
7093# Check whether --with-libunwind-ia64 was given.
7094if test "${with_libunwind_ia64+set}" = set; then :
7095 withval=$with_libunwind_ia64;
bec39cab 7096else
05e7c244
JK
7097 with_libunwind_ia64=auto
7098fi
bec39cab 7099
05e7c244
JK
7100
7101# Backward compatibility option.
7102if test "${with_libunwind+set}" = set; then
7103 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 7104 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
7105 fi
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7107$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7108 with_libunwind_ia64="$with_libunwind"
7109fi
7110
7111case "$with_libunwind_ia64" in
7112 yes | no)
7113 ;;
7114 auto)
7115 for ac_header in libunwind-ia64.h
81ecdfbb 7116do :
b54a8fd7 7117 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7118if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7119 cat >>confdefs.h <<_ACEOF
b54a8fd7 7120#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7121_ACEOF
7122
7123fi
7124
7125done
7126
05e7c244
JK
7127 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7128 ;;
7129 *)
d0ac1c44 7130 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
7131 ;;
7132esac
bec39cab 7133
05e7c244 7134if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 7135 for ac_header in libunwind-ia64.h
81ecdfbb 7136do :
b54a8fd7 7137 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7138if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7139 cat >>confdefs.h <<_ACEOF
b54a8fd7 7140#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7141_ACEOF
7142
7143fi
7144
7145done
7146
05e7c244 7147 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 7148 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
7149 fi
7150 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7151 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7152 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
7153fi
7154
cb01cfba
JB
7155opt_curses=no
7156
81ecdfbb
RW
7157# Check whether --with-curses was given.
7158if test "${with_curses+set}" = set; then :
7159 withval=$with_curses; opt_curses=$withval
7160fi
7161
cb01cfba 7162
76a39ba7 7163prefer_curses=no
cb01cfba 7164if test "$opt_curses" = "yes"; then
76a39ba7 7165 prefer_curses=yes
cb01cfba
JB
7166fi
7167
a9322a30 7168# Profiling support.
81ecdfbb
RW
7169# Check whether --enable-profiling was given.
7170if test "${enable_profiling+set}" = set; then :
7171 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7172 yes | no)
7173 ;;
7174 *)
d0ac1c44 7175 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7176 esac
7177else
7178 enable_profiling=no
81ecdfbb 7179fi
bec39cab 7180
a9322a30
TT
7181
7182for ac_func in monstartup _mcleanup
81ecdfbb
RW
7183do :
7184 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7185ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7186if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
7187 cat >>confdefs.h <<_ACEOF
7188#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7189_ACEOF
a9322a30 7190
81ecdfbb
RW
7191fi
7192done
a9322a30 7193
81ecdfbb
RW
7194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7195$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 7196if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
7197 $as_echo_n "(cached) " >&6
7198else
7199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h. */
7201#include <stdlib.h>
5593a99a 7202 extern char _etext;
a9322a30
TT
7203int
7204main ()
7205{
7206free (&_etext);
5593a99a 7207
a9322a30
TT
7208 ;
7209 return 0;
7210}
bec39cab 7211_ACEOF
81ecdfbb 7212if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7213 ac_cv_var__etext=yes
bec39cab 7214else
81ecdfbb 7215 ac_cv_var__etext=no
5593a99a 7216
bec39cab 7217fi
81ecdfbb
RW
7218rm -f core conftest.err conftest.$ac_objext \
7219 conftest$ac_exeext conftest.$ac_ext
5593a99a 7220
bec39cab 7221fi
81ecdfbb
RW
7222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7223$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 7224if test "$ac_cv_var__etext" = yes; then
60ca704f 7225
81ecdfbb 7226$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7227
bec39cab 7228fi
81ecdfbb
RW
7229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7230$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7231if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7232 $as_echo_n "(cached) " >&6
bec39cab 7233else
81ecdfbb 7234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7235/* end confdefs.h. */
a9322a30 7236#include <stdlib.h>
5593a99a 7237 extern char etext;
bec39cab
AC
7238int
7239main ()
7240{
a9322a30 7241free (&etext);
5593a99a 7242
bec39cab
AC
7243 ;
7244 return 0;
7245}
7246_ACEOF
81ecdfbb 7247if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7248 ac_cv_var_etext=yes
bec39cab 7249else
81ecdfbb 7250 ac_cv_var_etext=no
5593a99a 7251
bec39cab 7252fi
81ecdfbb
RW
7253rm -f core conftest.err conftest.$ac_objext \
7254 conftest$ac_exeext conftest.$ac_ext
5593a99a 7255
bec39cab 7256fi
81ecdfbb
RW
7257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7258$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 7259if test "$ac_cv_var_etext" = yes; then
a9322a30 7260
81ecdfbb 7261$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7262
7263fi
a9322a30 7264if test "$enable_profiling" = yes ; then
0ad6b8ee 7265 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 7266 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7267 fi
7268 PROFILE_CFLAGS=-pg
7269 OLD_CFLAGS="$CFLAGS"
7270 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7271
81ecdfbb
RW
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7273$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7274if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7275 $as_echo_n "(cached) " >&6
bec39cab 7276else
81ecdfbb 7277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7278/* end confdefs.h. */
bec39cab
AC
7279
7280int
7281main ()
7282{
a9322a30 7283int x;
bec39cab
AC
7284 ;
7285 return 0;
7286}
7287_ACEOF
81ecdfbb 7288if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7289 ac_cv_cc_supports_pg=yes
bec39cab 7290else
81ecdfbb 7291 ac_cv_cc_supports_pg=no
5593a99a 7292
bec39cab 7293fi
81ecdfbb 7294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 7295
bec39cab 7296fi
81ecdfbb
RW
7297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7298$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7299
0ad6b8ee 7300 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7301 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7302 fi
bec39cab 7303
a9322a30 7304 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7305fi
7306
44cee4fd
TT
7307CODESIGN_CERT=
7308# Check whether --enable-codesign was given.
7309if test "${enable_codesign+set}" = set; then :
7310 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7311fi
7312
7313
7314
c16158bc
JM
7315
7316
81ecdfbb
RW
7317# Check whether --with-pkgversion was given.
7318if test "${with_pkgversion+set}" = set; then :
7319 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7320 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7321 no) PKGVERSION= ;;
7322 *) PKGVERSION="($withval) " ;;
7323 esac
7324else
7325 PKGVERSION="(GDB) "
7326
81ecdfbb 7327fi
c16158bc
JM
7328
7329
7330
7331
81ecdfbb
RW
7332
7333# Check whether --with-bugurl was given.
7334if test "${with_bugurl+set}" = set; then :
7335 withval=$with_bugurl; case "$withval" in
d0ac1c44 7336 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7337 no) BUGURL=
7338 ;;
7339 *) BUGURL="$withval"
7340 ;;
7341 esac
7342else
112c22ed 7343 BUGURL="https://www.gnu.org/software/gdb/bugs/"
c16158bc 7344
81ecdfbb
RW
7345fi
7346
c16158bc
JM
7347 case ${BUGURL} in
7348 "")
7349 REPORT_BUGS_TO=
7350 REPORT_BUGS_TEXI=
7351 ;;
7352 *)
7353 REPORT_BUGS_TO="<$BUGURL>"
7354 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7355 ;;
7356 esac;
7357
7358
7359
7360
7361cat >>confdefs.h <<_ACEOF
7362#define PKGVERSION "$PKGVERSION"
7363_ACEOF
7364
7365
7366cat >>confdefs.h <<_ACEOF
7367#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7368_ACEOF
7369
7370
bec39cab
AC
7371# --------------------- #
7372# Checks for programs. #
7373# --------------------- #
7374
7375for ac_prog in gawk mawk nawk awk
7376do
7377 # Extract the first word of "$ac_prog", so it can be a program name with args.
7378set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7380$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7381if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7382 $as_echo_n "(cached) " >&6
bec39cab
AC
7383else
7384 if test -n "$AWK"; then
7385 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7386else
7387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7388for as_dir in $PATH
7389do
7390 IFS=$as_save_IFS
7391 test -z "$as_dir" && as_dir=.
81ecdfbb 7392 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7393 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7394 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7395 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7396 break 2
7397 fi
7398done
81ecdfbb
RW
7399 done
7400IFS=$as_save_IFS
bec39cab
AC
7401
7402fi
7403fi
7404AWK=$ac_cv_prog_AWK
7405if test -n "$AWK"; then
81ecdfbb
RW
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7407$as_echo "$AWK" >&6; }
bec39cab 7408else
81ecdfbb
RW
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7410$as_echo "no" >&6; }
bec39cab
AC
7411fi
7412
bec39cab 7413
81ecdfbb 7414 test -n "$AWK" && break
bec39cab
AC
7415done
7416
c971b7fa
PA
7417# Find a good install program. We prefer a C program (faster),
7418# so one script is as good as another. But avoid the broken or
7419# incompatible versions:
7420# SysV /etc/install, /usr/sbin/install
7421# SunOS /usr/etc/install
7422# IRIX /sbin/install
7423# AIX /bin/install
7424# AmigaOS /C/install, which installs bootblocks on floppy discs
7425# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7426# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7427# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7428# OS/2's system install, which has a completely different semantic
7429# ./install, which can be erroneously created by make from ./install.sh.
7430# Reject install programs that cannot install multiple files.
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7432$as_echo_n "checking for a BSD-compatible install... " >&6; }
7433if test -z "$INSTALL"; then
d0ac1c44 7434if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7435 $as_echo_n "(cached) " >&6
7436else
7437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438for as_dir in $PATH
7439do
7440 IFS=$as_save_IFS
7441 test -z "$as_dir" && as_dir=.
7442 # Account for people who put trailing slashes in PATH elements.
7443case $as_dir/ in #((
7444 ./ | .// | /[cC]/* | \
7445 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7446 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7447 /usr/ucb/* ) ;;
7448 *)
7449 # OSF1 and SCO ODT 3.0 have their own names for install.
7450 # Don't use installbsd from OSF since it installs stuff as root
7451 # by default.
7452 for ac_prog in ginstall scoinst install; do
7453 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7454 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7455 if test $ac_prog = install &&
7456 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7457 # AIX install. It has an incompatible calling convention.
7458 :
7459 elif test $ac_prog = install &&
7460 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7461 # program-specific install script used by HP pwplus--don't use.
7462 :
7463 else
7464 rm -rf conftest.one conftest.two conftest.dir
7465 echo one > conftest.one
7466 echo two > conftest.two
7467 mkdir conftest.dir
7468 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7469 test -s conftest.one && test -s conftest.two &&
7470 test -s conftest.dir/conftest.one &&
7471 test -s conftest.dir/conftest.two
7472 then
7473 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7474 break 3
7475 fi
7476 fi
7477 fi
7478 done
7479 done
7480 ;;
7481esac
7482
7483 done
7484IFS=$as_save_IFS
7485
7486rm -rf conftest.one conftest.two conftest.dir
7487
7488fi
7489 if test "${ac_cv_path_install+set}" = set; then
7490 INSTALL=$ac_cv_path_install
7491 else
7492 # As a last resort, use the slow shell script. Don't cache a
7493 # value for INSTALL within a source directory, because that will
7494 # break other packages using the cache if that directory is
7495 # removed, or if the value is a relative name.
7496 INSTALL=$ac_install_sh
7497 fi
7498fi
7499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7500$as_echo "$INSTALL" >&6; }
7501
7502# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7503# It thinks the first close brace ends the variable substitution.
7504test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7505
7506test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7507
7508test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7509
81ecdfbb
RW
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7511$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7512LN_S=$as_ln_s
7513if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7515$as_echo "yes" >&6; }
bec39cab 7516else
81ecdfbb
RW
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7518$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7519fi
7520
7521if test -n "$ac_tool_prefix"; then
7522 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7523set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7525$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7526if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7527 $as_echo_n "(cached) " >&6
bec39cab
AC
7528else
7529 if test -n "$RANLIB"; then
7530 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7531else
7532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533for as_dir in $PATH
7534do
7535 IFS=$as_save_IFS
7536 test -z "$as_dir" && as_dir=.
81ecdfbb 7537 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7539 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7541 break 2
7542 fi
7543done
81ecdfbb
RW
7544 done
7545IFS=$as_save_IFS
bec39cab
AC
7546
7547fi
7548fi
7549RANLIB=$ac_cv_prog_RANLIB
7550if test -n "$RANLIB"; then
81ecdfbb
RW
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7552$as_echo "$RANLIB" >&6; }
bec39cab 7553else
81ecdfbb
RW
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7555$as_echo "no" >&6; }
bec39cab
AC
7556fi
7557
81ecdfbb 7558
bec39cab
AC
7559fi
7560if test -z "$ac_cv_prog_RANLIB"; then
7561 ac_ct_RANLIB=$RANLIB
7562 # Extract the first word of "ranlib", so it can be a program name with args.
7563set dummy ranlib; ac_word=$2
81ecdfbb
RW
7564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7565$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7566if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7567 $as_echo_n "(cached) " >&6
bec39cab
AC
7568else
7569 if test -n "$ac_ct_RANLIB"; then
7570 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7571else
7572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7573for as_dir in $PATH
7574do
7575 IFS=$as_save_IFS
7576 test -z "$as_dir" && as_dir=.
81ecdfbb 7577 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7579 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7581 break 2
7582 fi
7583done
81ecdfbb
RW
7584 done
7585IFS=$as_save_IFS
bec39cab 7586
bec39cab
AC
7587fi
7588fi
7589ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7590if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7592$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7593else
81ecdfbb
RW
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7595$as_echo "no" >&6; }
bec39cab
AC
7596fi
7597
81ecdfbb
RW
7598 if test "x$ac_ct_RANLIB" = x; then
7599 RANLIB=":"
7600 else
7601 case $cross_compiling:$ac_tool_warned in
7602yes:)
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7604$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7605ac_tool_warned=yes ;;
7606esac
7607 RANLIB=$ac_ct_RANLIB
7608 fi
bec39cab
AC
7609else
7610 RANLIB="$ac_cv_prog_RANLIB"
7611fi
7612
7613for ac_prog in 'bison -y' byacc
7614do
7615 # Extract the first word of "$ac_prog", so it can be a program name with args.
7616set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7618$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7619if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7620 $as_echo_n "(cached) " >&6
bec39cab
AC
7621else
7622 if test -n "$YACC"; then
7623 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7624else
7625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7626for as_dir in $PATH
7627do
7628 IFS=$as_save_IFS
7629 test -z "$as_dir" && as_dir=.
81ecdfbb 7630 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7632 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7634 break 2
7635 fi
7636done
81ecdfbb
RW
7637 done
7638IFS=$as_save_IFS
bec39cab
AC
7639
7640fi
7641fi
7642YACC=$ac_cv_prog_YACC
7643if test -n "$YACC"; then
81ecdfbb
RW
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7645$as_echo "$YACC" >&6; }
bec39cab 7646else
81ecdfbb
RW
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648$as_echo "no" >&6; }
bec39cab
AC
7649fi
7650
81ecdfbb 7651
bec39cab
AC
7652 test -n "$YACC" && break
7653done
7654test -n "$YACC" || YACC="yacc"
7655
7656
7657if test -n "$ac_tool_prefix"; then
7658 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7659set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7661$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7662if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7663 $as_echo_n "(cached) " >&6
bec39cab
AC
7664else
7665 if test -n "$AR"; then
7666 ac_cv_prog_AR="$AR" # Let the user override the test.
7667else
7668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7669for as_dir in $PATH
7670do
7671 IFS=$as_save_IFS
7672 test -z "$as_dir" && as_dir=.
81ecdfbb 7673 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7674 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7675 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7676 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7677 break 2
7678 fi
7679done
81ecdfbb
RW
7680 done
7681IFS=$as_save_IFS
bec39cab
AC
7682
7683fi
7684fi
7685AR=$ac_cv_prog_AR
7686if test -n "$AR"; then
81ecdfbb
RW
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7688$as_echo "$AR" >&6; }
bec39cab 7689else
81ecdfbb
RW
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691$as_echo "no" >&6; }
bec39cab
AC
7692fi
7693
81ecdfbb 7694
bec39cab
AC
7695fi
7696if test -z "$ac_cv_prog_AR"; then
7697 ac_ct_AR=$AR
7698 # Extract the first word of "ar", so it can be a program name with args.
7699set dummy ar; ac_word=$2
81ecdfbb
RW
7700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7701$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7702if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7703 $as_echo_n "(cached) " >&6
bec39cab
AC
7704else
7705 if test -n "$ac_ct_AR"; then
7706 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7707else
7708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7709for as_dir in $PATH
7710do
7711 IFS=$as_save_IFS
7712 test -z "$as_dir" && as_dir=.
81ecdfbb 7713 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7714 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7715 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7716 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7717 break 2
7718 fi
7719done
81ecdfbb
RW
7720 done
7721IFS=$as_save_IFS
bec39cab
AC
7722
7723fi
7724fi
7725ac_ct_AR=$ac_cv_prog_ac_ct_AR
7726if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7728$as_echo "$ac_ct_AR" >&6; }
bec39cab 7729else
81ecdfbb
RW
7730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7731$as_echo "no" >&6; }
bec39cab
AC
7732fi
7733
81ecdfbb
RW
7734 if test "x$ac_ct_AR" = x; then
7735 AR=""
7736 else
7737 case $cross_compiling:$ac_tool_warned in
7738yes:)
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7741ac_tool_warned=yes ;;
7742esac
7743 AR=$ac_ct_AR
7744 fi
bec39cab
AC
7745else
7746 AR="$ac_cv_prog_AR"
7747fi
7748
7749if test -n "$ac_tool_prefix"; then
7750 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7751set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7753$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7754if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7755 $as_echo_n "(cached) " >&6
bec39cab
AC
7756else
7757 if test -n "$DLLTOOL"; then
7758 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7759else
7760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7761for as_dir in $PATH
7762do
7763 IFS=$as_save_IFS
7764 test -z "$as_dir" && as_dir=.
81ecdfbb 7765 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7767 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7769 break 2
7770 fi
7771done
81ecdfbb
RW
7772 done
7773IFS=$as_save_IFS
bec39cab
AC
7774
7775fi
7776fi
7777DLLTOOL=$ac_cv_prog_DLLTOOL
7778if test -n "$DLLTOOL"; then
81ecdfbb
RW
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7780$as_echo "$DLLTOOL" >&6; }
bec39cab 7781else
81ecdfbb
RW
7782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7783$as_echo "no" >&6; }
bec39cab
AC
7784fi
7785
81ecdfbb 7786
bec39cab
AC
7787fi
7788if test -z "$ac_cv_prog_DLLTOOL"; then
7789 ac_ct_DLLTOOL=$DLLTOOL
7790 # Extract the first word of "dlltool", so it can be a program name with args.
7791set dummy dlltool; ac_word=$2
81ecdfbb
RW
7792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7793$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7794if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7795 $as_echo_n "(cached) " >&6
bec39cab
AC
7796else
7797 if test -n "$ac_ct_DLLTOOL"; then
7798 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7799else
7800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7801for as_dir in $PATH
7802do
7803 IFS=$as_save_IFS
7804 test -z "$as_dir" && as_dir=.
81ecdfbb 7805 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7807 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7809 break 2
7810 fi
7811done
81ecdfbb
RW
7812 done
7813IFS=$as_save_IFS
bec39cab
AC
7814
7815fi
7816fi
7817ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7818if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7820$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7821else
81ecdfbb
RW
7822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823$as_echo "no" >&6; }
bec39cab
AC
7824fi
7825
81ecdfbb
RW
7826 if test "x$ac_ct_DLLTOOL" = x; then
7827 DLLTOOL=""
7828 else
7829 case $cross_compiling:$ac_tool_warned in
7830yes:)
7831{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7832$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7833ac_tool_warned=yes ;;
7834esac
7835 DLLTOOL=$ac_ct_DLLTOOL
7836 fi
bec39cab
AC
7837else
7838 DLLTOOL="$ac_cv_prog_DLLTOOL"
7839fi
7840
7841if test -n "$ac_tool_prefix"; then
7842 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7843set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7845$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7846if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7847 $as_echo_n "(cached) " >&6
bec39cab
AC
7848else
7849 if test -n "$WINDRES"; then
7850 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7851else
7852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7853for as_dir in $PATH
7854do
7855 IFS=$as_save_IFS
7856 test -z "$as_dir" && as_dir=.
81ecdfbb 7857 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7859 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7861 break 2
7862 fi
7863done
81ecdfbb
RW
7864 done
7865IFS=$as_save_IFS
bec39cab
AC
7866
7867fi
7868fi
7869WINDRES=$ac_cv_prog_WINDRES
7870if test -n "$WINDRES"; then
81ecdfbb
RW
7871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7872$as_echo "$WINDRES" >&6; }
bec39cab 7873else
81ecdfbb
RW
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7875$as_echo "no" >&6; }
bec39cab
AC
7876fi
7877
81ecdfbb 7878
bec39cab
AC
7879fi
7880if test -z "$ac_cv_prog_WINDRES"; then
7881 ac_ct_WINDRES=$WINDRES
7882 # Extract the first word of "windres", so it can be a program name with args.
7883set dummy windres; ac_word=$2
81ecdfbb
RW
7884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7885$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7886if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7887 $as_echo_n "(cached) " >&6
bec39cab
AC
7888else
7889 if test -n "$ac_ct_WINDRES"; then
7890 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7891else
7892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7893for as_dir in $PATH
7894do
7895 IFS=$as_save_IFS
7896 test -z "$as_dir" && as_dir=.
81ecdfbb 7897 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7899 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7901 break 2
7902 fi
7903done
81ecdfbb
RW
7904 done
7905IFS=$as_save_IFS
bec39cab
AC
7906
7907fi
7908fi
7909ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7910if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7912$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7913else
81ecdfbb
RW
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7915$as_echo "no" >&6; }
c906108c 7916fi
bec39cab 7917
81ecdfbb
RW
7918 if test "x$ac_ct_WINDRES" = x; then
7919 WINDRES=""
7920 else
7921 case $cross_compiling:$ac_tool_warned in
7922yes:)
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7924$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7925ac_tool_warned=yes ;;
7926esac
7927 WINDRES=$ac_ct_WINDRES
7928 fi
c906108c 7929else
bec39cab 7930 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7931fi
7932
bec39cab 7933
036c3acb
TS
7934case $host_os in
7935 gnu*)
7936 # Needed for GNU Hurd hosts.
7937 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7938 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7939set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7941$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7942if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7943 $as_echo_n "(cached) " >&6
c906108c 7944else
bec39cab
AC
7945 if test -n "$MIG"; then
7946 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7947else
7948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7949for as_dir in $PATH
7950do
7951 IFS=$as_save_IFS
7952 test -z "$as_dir" && as_dir=.
81ecdfbb 7953 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7955 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7957 break 2
7958 fi
7959done
81ecdfbb
RW
7960 done
7961IFS=$as_save_IFS
bec39cab 7962
c906108c 7963fi
bec39cab
AC
7964fi
7965MIG=$ac_cv_prog_MIG
7966if test -n "$MIG"; then
81ecdfbb
RW
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7968$as_echo "$MIG" >&6; }
c906108c 7969else
81ecdfbb
RW
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7971$as_echo "no" >&6; }
c906108c
SS
7972fi
7973
81ecdfbb 7974
bec39cab
AC
7975fi
7976if test -z "$ac_cv_prog_MIG"; then
7977 ac_ct_MIG=$MIG
7978 # Extract the first word of "mig", so it can be a program name with args.
7979set dummy mig; ac_word=$2
81ecdfbb
RW
7980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7981$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7982if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7983 $as_echo_n "(cached) " >&6
bec39cab
AC
7984else
7985 if test -n "$ac_ct_MIG"; then
7986 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7987else
7988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7989for as_dir in $PATH
7990do
7991 IFS=$as_save_IFS
7992 test -z "$as_dir" && as_dir=.
81ecdfbb 7993 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7995 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7997 break 2
7998 fi
7999done
81ecdfbb
RW
8000 done
8001IFS=$as_save_IFS
c906108c 8002
bec39cab
AC
8003fi
8004fi
8005ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8006if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8008$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8009else
81ecdfbb
RW
8010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8011$as_echo "no" >&6; }
bec39cab 8012fi
c906108c 8013
81ecdfbb
RW
8014 if test "x$ac_ct_MIG" = x; then
8015 MIG=""
8016 else
8017 case $cross_compiling:$ac_tool_warned in
8018yes:)
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8021ac_tool_warned=yes ;;
8022esac
8023 MIG=$ac_ct_MIG
8024 fi
bec39cab
AC
8025else
8026 MIG="$ac_cv_prog_MIG"
8027fi
c906108c 8028
036c3acb 8029 if test x"$MIG" = x; then
d0ac1c44 8030 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
8031 fi
8032 ;;
8033esac
c906108c 8034
bec39cab
AC
8035# ---------------------- #
8036# Checks for libraries. #
8037# ---------------------- #
c906108c 8038
bec39cab 8039# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8041$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 8042if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 8043 $as_echo_n "(cached) " >&6
bec39cab
AC
8044else
8045 ac_check_lib_save_LIBS=$LIBS
8046LIBS="-lm $LIBS"
81ecdfbb 8047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8048/* end confdefs.h. */
c906108c 8049
c906108c 8050
bec39cab
AC
8051int
8052main ()
8053{
81ecdfbb 8054return main ();
bec39cab
AC
8055 ;
8056 return 0;
8057}
8058_ACEOF
81ecdfbb 8059if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8060 ac_cv_lib_m_main=yes
8061else
81ecdfbb 8062 ac_cv_lib_m_main=no
bec39cab 8063fi
81ecdfbb
RW
8064rm -f core conftest.err conftest.$ac_objext \
8065 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8066LIBS=$ac_check_lib_save_LIBS
8067fi
81ecdfbb
RW
8068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8069$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 8070if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
8071 cat >>confdefs.h <<_ACEOF
8072#define HAVE_LIBM 1
8073_ACEOF
8074
8075 LIBS="-lm $LIBS"
c906108c 8076
c906108c 8077fi
bec39cab
AC
8078
8079
bec39cab 8080# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8082$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 8083if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 8084 $as_echo_n "(cached) " >&6
bec39cab
AC
8085else
8086 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8088/* end confdefs.h. */
ddc9cd0f 8089
81ecdfbb
RW
8090/* Override any GCC internal prototype to avoid an error.
8091 Use char because int might match the return type of a GCC
8092 builtin and then its argument prototype would still apply. */
bec39cab
AC
8093#ifdef __cplusplus
8094extern "C"
8095#endif
bec39cab
AC
8096char gethostbyname ();
8097int
8098main ()
8099{
81ecdfbb 8100return gethostbyname ();
bec39cab
AC
8101 ;
8102 return 0;
8103}
8104_ACEOF
81ecdfbb
RW
8105for ac_lib in '' nsl; do
8106 if test -z "$ac_lib"; then
8107 ac_res="none required"
8108 else
8109 ac_res=-l$ac_lib
b4e70030 8110 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8111 fi
8112 if ac_fn_c_try_link "$LINENO"; then :
8113 ac_cv_search_gethostbyname=$ac_res
8114fi
8115rm -f core conftest.err conftest.$ac_objext \
8116 conftest$ac_exeext
d0ac1c44 8117 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
8118 break
8119fi
8120done
d0ac1c44 8121if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 8122
bec39cab 8123else
81ecdfbb 8124 ac_cv_search_gethostbyname=no
bec39cab 8125fi
81ecdfbb 8126rm conftest.$ac_ext
bec39cab
AC
8127LIBS=$ac_func_search_save_LIBS
8128fi
81ecdfbb
RW
8129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8130$as_echo "$ac_cv_search_gethostbyname" >&6; }
8131ac_res=$ac_cv_search_gethostbyname
8132if test "$ac_res" != no; then :
8133 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8134
bec39cab 8135fi
96baa820 8136
c906108c 8137
b4e70030 8138# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8140$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 8141if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 8142 $as_echo_n "(cached) " >&6
b4e70030
JB
8143else
8144 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8146/* end confdefs.h. */
8147
81ecdfbb
RW
8148/* Override any GCC internal prototype to avoid an error.
8149 Use char because int might match the return type of a GCC
8150 builtin and then its argument prototype would still apply. */
b4e70030
JB
8151#ifdef __cplusplus
8152extern "C"
8153#endif
b4e70030
JB
8154char socketpair ();
8155int
8156main ()
8157{
81ecdfbb 8158return socketpair ();
b4e70030
JB
8159 ;
8160 return 0;
8161}
8162_ACEOF
81ecdfbb
RW
8163for ac_lib in '' socket; do
8164 if test -z "$ac_lib"; then
8165 ac_res="none required"
8166 else
8167 ac_res=-l$ac_lib
b4e70030 8168 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8169 fi
8170 if ac_fn_c_try_link "$LINENO"; then :
8171 ac_cv_search_socketpair=$ac_res
8172fi
8173rm -f core conftest.err conftest.$ac_objext \
8174 conftest$ac_exeext
d0ac1c44 8175 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
8176 break
8177fi
8178done
d0ac1c44 8179if ${ac_cv_search_socketpair+:} false; then :
b4e70030 8180
b4e70030 8181else
81ecdfbb 8182 ac_cv_search_socketpair=no
b4e70030 8183fi
81ecdfbb 8184rm conftest.$ac_ext
b4e70030
JB
8185LIBS=$ac_func_search_save_LIBS
8186fi
81ecdfbb
RW
8187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8188$as_echo "$ac_cv_search_socketpair" >&6; }
8189ac_res=$ac_cv_search_socketpair
8190if test "$ac_res" != no; then :
8191 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8192
8193fi
8194
8195
233a11ab 8196# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 8197
711a72d3 8198 # Use the system's zlib library.
39f3de7c
L
8199 zlibdir="-L\$(top_builddir)/../zlib"
8200 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 8201
711a72d3
L
8202# Check whether --with-system-zlib was given.
8203if test "${with_system_zlib+set}" = set; then :
afa59b79
L
8204 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8205 zlibdir=
8206 zlibinc=
8207 fi
b040ad30 8208
233a11ab 8209fi
233a11ab 8210
233a11ab 8211
233a11ab 8212
b040ad30 8213
233a11ab 8214
77f120bf 8215
016a3251
DD
8216 if test "X$prefix" = "XNONE"; then
8217 acl_final_prefix="$ac_default_prefix"
8218 else
8219 acl_final_prefix="$prefix"
8220 fi
8221 if test "X$exec_prefix" = "XNONE"; then
8222 acl_final_exec_prefix='${prefix}'
8223 else
8224 acl_final_exec_prefix="$exec_prefix"
8225 fi
8226 acl_save_prefix="$prefix"
8227 prefix="$acl_final_prefix"
8228 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8229 prefix="$acl_save_prefix"
8230
8231
8232# Check whether --with-gnu-ld was given.
8233if test "${with_gnu_ld+set}" = set; then :
8234 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8235else
8236 with_gnu_ld=no
8237fi
8238
8239# Prepare PATH_SEPARATOR.
8240# The user is always right.
8241if test "${PATH_SEPARATOR+set}" != set; then
8242 echo "#! /bin/sh" >conf$$.sh
8243 echo "exit 0" >>conf$$.sh
8244 chmod +x conf$$.sh
8245 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8246 PATH_SEPARATOR=';'
8247 else
8248 PATH_SEPARATOR=:
8249 fi
8250 rm -f conf$$.sh
8251fi
8252ac_prog=ld
8253if test "$GCC" = yes; then
8254 # Check if gcc -print-prog-name=ld gives a path.
8255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8256$as_echo_n "checking for ld used by GCC... " >&6; }
8257 case $host in
8258 *-*-mingw*)
8259 # gcc leaves a trailing carriage return which upsets mingw
8260 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8261 *)
8262 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8263 esac
8264 case $ac_prog in
8265 # Accept absolute paths.
8266 [\\/]* | [A-Za-z]:[\\/]*)
8267 re_direlt='/[^/][^/]*/\.\./'
8268 # Canonicalize the path of ld
8269 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8270 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8271 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8272 done
8273 test -z "$LD" && LD="$ac_prog"
8274 ;;
8275 "")
8276 # If it fails, then pretend we aren't using GCC.
8277 ac_prog=ld
8278 ;;
8279 *)
8280 # If it is relative, then search for the first ld in PATH.
8281 with_gnu_ld=unknown
8282 ;;
8283 esac
8284elif test "$with_gnu_ld" = yes; then
8285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8286$as_echo_n "checking for GNU ld... " >&6; }
8287else
8288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8289$as_echo_n "checking for non-GNU ld... " >&6; }
8290fi
d0ac1c44 8291if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8292 $as_echo_n "(cached) " >&6
8293else
8294 if test -z "$LD"; then
8295 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8296 for ac_dir in $PATH; do
8297 test -z "$ac_dir" && ac_dir=.
8298 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8299 acl_cv_path_LD="$ac_dir/$ac_prog"
8300 # Check to see if the program is GNU ld. I'd rather use --version,
8301 # but apparently some GNU ld's only accept -v.
8302 # Break only if it was the GNU/non-GNU ld that we prefer.
8303 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8304 test "$with_gnu_ld" != no && break
8305 else
8306 test "$with_gnu_ld" != yes && break
8307 fi
8308 fi
8309 done
8310 IFS="$ac_save_ifs"
8311else
8312 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8313fi
8314fi
8315
8316LD="$acl_cv_path_LD"
8317if test -n "$LD"; then
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8319$as_echo "$LD" >&6; }
8320else
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8322$as_echo "no" >&6; }
8323fi
d0ac1c44 8324test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8326$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8327if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8328 $as_echo_n "(cached) " >&6
8329else
8330 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8331if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8332 acl_cv_prog_gnu_ld=yes
8333else
8334 acl_cv_prog_gnu_ld=no
8335fi
8336fi
8337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8338$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8339with_gnu_ld=$acl_cv_prog_gnu_ld
8340
8341
8342
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8344$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8345if ${acl_cv_rpath+:} false; then :
016a3251
DD
8346 $as_echo_n "(cached) " >&6
8347else
8348
8349 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8350 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8351 . ./conftest.sh
8352 rm -f ./conftest.sh
8353 acl_cv_rpath=done
8354
8355fi
8356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8357$as_echo "$acl_cv_rpath" >&6; }
8358 wl="$acl_cv_wl"
8359 libext="$acl_cv_libext"
8360 shlibext="$acl_cv_shlibext"
8361 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8362 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8363 hardcode_direct="$acl_cv_hardcode_direct"
8364 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8365 # Check whether --enable-rpath was given.
8366if test "${enable_rpath+set}" = set; then :
8367 enableval=$enable_rpath; :
8368else
8369 enable_rpath=yes
8370fi
8371
8372
8373
8374
8375
8376
8377
8378
8379 use_additional=yes
8380
8381 acl_save_prefix="$prefix"
8382 prefix="$acl_final_prefix"
8383 acl_save_exec_prefix="$exec_prefix"
8384 exec_prefix="$acl_final_exec_prefix"
8385
8386 eval additional_includedir=\"$includedir\"
8387 eval additional_libdir=\"$libdir\"
8388
8389 exec_prefix="$acl_save_exec_prefix"
8390 prefix="$acl_save_prefix"
77f120bf 8391
6c7a06a3 8392
81ecdfbb
RW
8393# Check whether --with-libiconv-prefix was given.
8394if test "${with_libiconv_prefix+set}" = set; then :
8395 withval=$with_libiconv_prefix;
016a3251
DD
8396 if test "X$withval" = "Xno"; then
8397 use_additional=no
8398 else
8399 if test "X$withval" = "X"; then
8400
8401 acl_save_prefix="$prefix"
8402 prefix="$acl_final_prefix"
8403 acl_save_exec_prefix="$exec_prefix"
8404 exec_prefix="$acl_final_exec_prefix"
8405
8406 eval additional_includedir=\"$includedir\"
8407 eval additional_libdir=\"$libdir\"
8408
8409 exec_prefix="$acl_save_exec_prefix"
8410 prefix="$acl_save_prefix"
8411
8412 else
8413 additional_includedir="$withval/include"
8414 additional_libdir="$withval/lib"
8415 fi
8416 fi
6c7a06a3 8417
81ecdfbb
RW
8418fi
8419
9f1528a1
AB
8420
8421# Check whether --with-libiconv-type was given.
8422if test "${with_libiconv_type+set}" = set; then :
8423 withval=$with_libiconv_type; with_libiconv_type=$withval
8424else
8425 with_libiconv_type=auto
8426fi
8427
8428 lib_type=`eval echo \$with_libiconv_type`
8429
016a3251
DD
8430 LIBICONV=
8431 LTLIBICONV=
8432 INCICONV=
8433 rpathdirs=
8434 ltrpathdirs=
8435 names_already_handled=
8436 names_next_round='iconv '
8437 while test -n "$names_next_round"; do
8438 names_this_round="$names_next_round"
8439 names_next_round=
8440 for name in $names_this_round; do
8441 already_handled=
8442 for n in $names_already_handled; do
8443 if test "$n" = "$name"; then
8444 already_handled=yes
8445 break
8446 fi
8447 done
8448 if test -z "$already_handled"; then
8449 names_already_handled="$names_already_handled $name"
8450 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8451 eval value=\"\$HAVE_LIB$uppername\"
8452 if test -n "$value"; then
8453 if test "$value" = yes; then
8454 eval value=\"\$LIB$uppername\"
8455 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8456 eval value=\"\$LTLIB$uppername\"
8457 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8458 else
8459 :
8460 fi
8461 else
8462 found_dir=
8463 found_la=
8464 found_so=
8465 found_a=
8466 if test $use_additional = yes; then
9f1528a1 8467 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8468 found_dir="$additional_libdir"
8469 found_so="$additional_libdir/lib$name.$shlibext"
8470 if test -f "$additional_libdir/lib$name.la"; then
8471 found_la="$additional_libdir/lib$name.la"
8472 fi
9f1528a1 8473 elif test x$lib_type != xshared; then
016a3251
DD
8474 if test -f "$additional_libdir/lib$name.$libext"; then
8475 found_dir="$additional_libdir"
8476 found_a="$additional_libdir/lib$name.$libext"
8477 if test -f "$additional_libdir/lib$name.la"; then
8478 found_la="$additional_libdir/lib$name.la"
8479 fi
8480 fi
8481 fi
8482 fi
8483 if test "X$found_dir" = "X"; then
8484 for x in $LDFLAGS $LTLIBICONV; do
8485
8486 acl_save_prefix="$prefix"
8487 prefix="$acl_final_prefix"
8488 acl_save_exec_prefix="$exec_prefix"
8489 exec_prefix="$acl_final_exec_prefix"
8490 eval x=\"$x\"
8491 exec_prefix="$acl_save_exec_prefix"
8492 prefix="$acl_save_prefix"
8493
8494 case "$x" in
8495 -L*)
8496 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8497 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8498 found_dir="$dir"
8499 found_so="$dir/lib$name.$shlibext"
8500 if test -f "$dir/lib$name.la"; then
8501 found_la="$dir/lib$name.la"
8502 fi
9f1528a1 8503 elif test x$lib_type != xshared; then
016a3251
DD
8504 if test -f "$dir/lib$name.$libext"; then
8505 found_dir="$dir"
8506 found_a="$dir/lib$name.$libext"
8507 if test -f "$dir/lib$name.la"; then
8508 found_la="$dir/lib$name.la"
8509 fi
8510 fi
8511 fi
8512 ;;
8513 esac
8514 if test "X$found_dir" != "X"; then
8515 break
8516 fi
8517 done
8518 fi
8519 if test "X$found_dir" != "X"; then
8520 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8521 if test "X$found_so" != "X"; then
8522 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8523 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8524 else
8525 haveit=
8526 for x in $ltrpathdirs; do
8527 if test "X$x" = "X$found_dir"; then
8528 haveit=yes
8529 break
8530 fi
8531 done
8532 if test -z "$haveit"; then
8533 ltrpathdirs="$ltrpathdirs $found_dir"
8534 fi
8535 if test "$hardcode_direct" = yes; then
8536 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8537 else
8538 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8539 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8540 haveit=
8541 for x in $rpathdirs; do
8542 if test "X$x" = "X$found_dir"; then
8543 haveit=yes
8544 break
8545 fi
8546 done
8547 if test -z "$haveit"; then
8548 rpathdirs="$rpathdirs $found_dir"
8549 fi
8550 else
8551 haveit=
8552 for x in $LDFLAGS $LIBICONV; do
8553
8554 acl_save_prefix="$prefix"
8555 prefix="$acl_final_prefix"
8556 acl_save_exec_prefix="$exec_prefix"
8557 exec_prefix="$acl_final_exec_prefix"
8558 eval x=\"$x\"
8559 exec_prefix="$acl_save_exec_prefix"
8560 prefix="$acl_save_prefix"
8561
8562 if test "X$x" = "X-L$found_dir"; then
8563 haveit=yes
8564 break
8565 fi
8566 done
8567 if test -z "$haveit"; then
8568 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8569 fi
8570 if test "$hardcode_minus_L" != no; then
8571 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8572 else
8573 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8574 fi
8575 fi
8576 fi
8577 fi
8578 else
8579 if test "X$found_a" != "X"; then
8580 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8581 else
8582 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8583 fi
8584 fi
8585 additional_includedir=
8586 case "$found_dir" in
8587 */lib | */lib/)
8588 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8589 additional_includedir="$basedir/include"
8590 ;;
8591 esac
8592 if test "X$additional_includedir" != "X"; then
8593 if test "X$additional_includedir" != "X/usr/include"; then
8594 haveit=
8595 if test "X$additional_includedir" = "X/usr/local/include"; then
8596 if test -n "$GCC"; then
8597 case $host_os in
8598 linux*) haveit=yes;;
8599 esac
8600 fi
8601 fi
8602 if test -z "$haveit"; then
8603 for x in $CPPFLAGS $INCICONV; do
8604
8605 acl_save_prefix="$prefix"
8606 prefix="$acl_final_prefix"
8607 acl_save_exec_prefix="$exec_prefix"
8608 exec_prefix="$acl_final_exec_prefix"
8609 eval x=\"$x\"
8610 exec_prefix="$acl_save_exec_prefix"
8611 prefix="$acl_save_prefix"
8612
8613 if test "X$x" = "X-I$additional_includedir"; then
8614 haveit=yes
8615 break
8616 fi
8617 done
8618 if test -z "$haveit"; then
8619 if test -d "$additional_includedir"; then
8620 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8621 fi
8622 fi
8623 fi
8624 fi
8625 fi
8626 if test -n "$found_la"; then
8627 save_libdir="$libdir"
8628 case "$found_la" in
8629 */* | *\\*) . "$found_la" ;;
8630 *) . "./$found_la" ;;
8631 esac
8632 libdir="$save_libdir"
8633 for dep in $dependency_libs; do
8634 case "$dep" in
8635 -L*)
8636 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8637 if test "X$additional_libdir" != "X/usr/lib"; then
8638 haveit=
8639 if test "X$additional_libdir" = "X/usr/local/lib"; then
8640 if test -n "$GCC"; then
8641 case $host_os in
8642 linux*) haveit=yes;;
8643 esac
8644 fi
8645 fi
8646 if test -z "$haveit"; then
8647 haveit=
8648 for x in $LDFLAGS $LIBICONV; do
8649
8650 acl_save_prefix="$prefix"
8651 prefix="$acl_final_prefix"
8652 acl_save_exec_prefix="$exec_prefix"
8653 exec_prefix="$acl_final_exec_prefix"
8654 eval x=\"$x\"
8655 exec_prefix="$acl_save_exec_prefix"
8656 prefix="$acl_save_prefix"
8657
8658 if test "X$x" = "X-L$additional_libdir"; then
8659 haveit=yes
8660 break
8661 fi
8662 done
8663 if test -z "$haveit"; then
8664 if test -d "$additional_libdir"; then
8665 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8666 fi
8667 fi
8668 haveit=
8669 for x in $LDFLAGS $LTLIBICONV; do
8670
8671 acl_save_prefix="$prefix"
8672 prefix="$acl_final_prefix"
8673 acl_save_exec_prefix="$exec_prefix"
8674 exec_prefix="$acl_final_exec_prefix"
8675 eval x=\"$x\"
8676 exec_prefix="$acl_save_exec_prefix"
8677 prefix="$acl_save_prefix"
8678
8679 if test "X$x" = "X-L$additional_libdir"; then
8680 haveit=yes
8681 break
8682 fi
8683 done
8684 if test -z "$haveit"; then
8685 if test -d "$additional_libdir"; then
8686 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8687 fi
8688 fi
8689 fi
8690 fi
8691 ;;
8692 -R*)
8693 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8694 if test "$enable_rpath" != no; then
8695 haveit=
8696 for x in $rpathdirs; do
8697 if test "X$x" = "X$dir"; then
8698 haveit=yes
8699 break
8700 fi
8701 done
8702 if test -z "$haveit"; then
8703 rpathdirs="$rpathdirs $dir"
8704 fi
8705 haveit=
8706 for x in $ltrpathdirs; do
8707 if test "X$x" = "X$dir"; then
8708 haveit=yes
8709 break
8710 fi
8711 done
8712 if test -z "$haveit"; then
8713 ltrpathdirs="$ltrpathdirs $dir"
8714 fi
8715 fi
8716 ;;
8717 -l*)
8718 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8719 ;;
8720 *.la)
8721 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8722 ;;
8723 *)
8724 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8725 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8726 ;;
8727 esac
8728 done
8729 fi
8730 else
9f1528a1
AB
8731 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8732 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8733 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8734 else
8735 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8736 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8737 fi
016a3251
DD
8738 fi
8739 fi
8740 fi
8741 done
8742 done
8743 if test "X$rpathdirs" != "X"; then
8744 if test -n "$hardcode_libdir_separator"; then
8745 alldirs=
8746 for found_dir in $rpathdirs; do
8747 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8748 done
8749 acl_save_libdir="$libdir"
8750 libdir="$alldirs"
8751 eval flag=\"$hardcode_libdir_flag_spec\"
8752 libdir="$acl_save_libdir"
8753 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8754 else
8755 for found_dir in $rpathdirs; do
8756 acl_save_libdir="$libdir"
8757 libdir="$found_dir"
8758 eval flag=\"$hardcode_libdir_flag_spec\"
8759 libdir="$acl_save_libdir"
8760 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8761 done
8762 fi
8763 fi
8764 if test "X$ltrpathdirs" != "X"; then
8765 for found_dir in $ltrpathdirs; do
8766 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8767 done
8768 fi
8769
8770
8771
8772
8773
6c7a06a3 8774
6c7a06a3 8775
81ecdfbb
RW
8776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8777$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8778if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8779 $as_echo_n "(cached) " >&6
d542061a 8780else
6c7a06a3
TT
8781
8782 am_cv_func_iconv="no, consider installing GNU libiconv"
8783 am_cv_lib_iconv=no
016a3251
DD
8784 am_save_CPPFLAGS="$CPPFLAGS"
8785 CPPFLAGS="$CPPFLAGS $INCICONV"
8786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8787/* end confdefs.h. */
6c7a06a3
TT
8788#include <stdlib.h>
8789#include <iconv.h>
d542061a
UW
8790int
8791main ()
8792{
6c7a06a3 8793iconv_t cd = iconv_open("","");
016a3251
DD
8794 iconv(cd,NULL,NULL,NULL,NULL);
8795 iconv_close(cd);
d542061a
UW
8796 ;
8797 return 0;
8798}
8799_ACEOF
81ecdfbb 8800if ac_fn_c_try_link "$LINENO"; then :
016a3251 8801 am_cv_func_iconv=yes
d542061a 8802fi
81ecdfbb
RW
8803rm -f core conftest.err conftest.$ac_objext \
8804 conftest$ac_exeext conftest.$ac_ext
016a3251 8805 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8806
016a3251
DD
8807 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8808 for _libs in .libs _libs; do
8809 am_save_CPPFLAGS="$CPPFLAGS"
8810 am_save_LIBS="$LIBS"
8811 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8812 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8814/* end confdefs.h. */
6c7a06a3
TT
8815#include <stdlib.h>
8816#include <iconv.h>
d542061a
UW
8817int
8818main ()
8819{
6c7a06a3 8820iconv_t cd = iconv_open("","");
016a3251
DD
8821 iconv(cd,NULL,NULL,NULL,NULL);
8822 iconv_close(cd);
d542061a
UW
8823 ;
8824 return 0;
8825}
8826_ACEOF
81ecdfbb 8827if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8828 INCICONV="-I../libiconv/include"
8829 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8830 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8831 am_cv_lib_iconv=yes
8832 am_cv_func_iconv=yes
d542061a 8833fi
81ecdfbb
RW
8834rm -f core conftest.err conftest.$ac_objext \
8835 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8836 CPPFLAGS="$am_save_CPPFLAGS"
8837 LIBS="$am_save_LIBS"
8838 if test "$am_cv_func_iconv" = "yes"; then
8839 break
8840 fi
8841 done
77f120bf 8842 fi
94ae1714 8843
4edb1e84 8844 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8845 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8846 am_save_LIBS="$LIBS"
5d762de0 8847 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8848 LIBS="$LIBS $LIBICONV"
81ecdfbb 8849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8850/* end confdefs.h. */
6c7a06a3
TT
8851#include <stdlib.h>
8852#include <iconv.h>
bec39cab
AC
8853int
8854main ()
8855{
6c7a06a3
TT
8856iconv_t cd = iconv_open("","");
8857 iconv(cd,NULL,NULL,NULL,NULL);
8858 iconv_close(cd);
bec39cab
AC
8859 ;
8860 return 0;
8861}
8862_ACEOF
81ecdfbb 8863if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8864 am_cv_lib_iconv=yes
6c7a06a3 8865 am_cv_func_iconv=yes
627af7ea 8866fi
81ecdfbb
RW
8867rm -f core conftest.err conftest.$ac_objext \
8868 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8869 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8870 LIBS="$am_save_LIBS"
6c7a06a3
TT
8871 fi
8872
8873fi
81ecdfbb
RW
8874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8875$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8876 if test "$am_cv_func_iconv" = yes; then
8877
8878$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8879
016a3251 8880 fi
fc3b640d 8881 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8882
8883 for element in $INCICONV; do
8884 haveit=
8885 for x in $CPPFLAGS; do
8886
8887 acl_save_prefix="$prefix"
8888 prefix="$acl_final_prefix"
8889 acl_save_exec_prefix="$exec_prefix"
8890 exec_prefix="$acl_final_exec_prefix"
8891 eval x=\"$x\"
8892 exec_prefix="$acl_save_exec_prefix"
8893 prefix="$acl_save_prefix"
8894
8895 if test "X$x" = "X$element"; then
8896 haveit=yes
8897 break
8898 fi
8899 done
8900 if test -z "$haveit"; then
8901 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8902 fi
8903 done
8904
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8906$as_echo_n "checking how to link with libiconv... " >&6; }
8907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8908$as_echo "$LIBICONV" >&6; }
94ae1714 8909 else
016a3251
DD
8910 LIBICONV=
8911 LTLIBICONV=
fc3b640d 8912 fi
94ae1714 8913
6c7a06a3 8914
6c7a06a3 8915
016a3251 8916 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8918$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8919 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8920 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8921else
8922
81ecdfbb 8923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8924/* end confdefs.h. */
8925
6c7a06a3
TT
8926#include <stdlib.h>
8927#include <iconv.h>
8928extern
b4e70030 8929#ifdef __cplusplus
6c7a06a3 8930"C"
b4e70030 8931#endif
6c7a06a3
TT
8932#if defined(__STDC__) || defined(__cplusplus)
8933size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8934#else
8935size_t iconv();
8936#endif
8937
b4e70030
JB
8938int
8939main ()
8940{
6c7a06a3 8941
b4e70030
JB
8942 ;
8943 return 0;
8944}
8945_ACEOF
81ecdfbb 8946if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8947 am_cv_proto_iconv_arg1=""
4e8d927d 8948else
81ecdfbb 8949 am_cv_proto_iconv_arg1="const"
b4e70030 8950fi
81ecdfbb 8951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8952 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);"
8953fi
8954
8955 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8957 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8958$as_echo "${ac_t:-
8959 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8960
8961cat >>confdefs.h <<_ACEOF
8962#define ICONV_CONST $am_cv_proto_iconv_arg1
8963_ACEOF
8964
8965 fi
6c7a06a3
TT
8966
8967
478aac75
DE
8968# GDB may fork/exec the iconv program to get the list of supported character
8969# sets. Allow the user to specify where to find it.
8970# There are several factors affecting the choice of option name:
8971# - There is already --with-libiconv-prefix but we can't use it, it specifies
8972# the build-time location of libiconv files.
8973# - The program we need to find is iconv, which comes with glibc. The user
8974# doesn't necessarily have libiconv installed. Therefore naming this
8975# --with-libiconv-foo feels wrong.
8976# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8977# defined to work on directories not files (though it really doesn't know
8978# the difference).
8979# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8980# with --with-libiconv-prefix.
8981# Putting these together is why the option name is --with-iconv-bin.
8982
8983
8984# Check whether --with-iconv-bin was given.
8985if test "${with_iconv_bin+set}" = set; then :
8986 withval=$with_iconv_bin; iconv_bin="${withval}"
8987
8988cat >>confdefs.h <<_ACEOF
8989#define ICONV_BIN "${iconv_bin}"
8990_ACEOF
8991
8992
8993 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8994 if test "x$prefix" = xNONE; then
8995 test_prefix=/usr/local
8996 else
8997 test_prefix=$prefix
8998 fi
8999 else
9000 test_prefix=$exec_prefix
9001 fi
9002 value=0
9003 case ${iconv_bin} in
9004 "${test_prefix}"|"${test_prefix}/"*|\
9005 '${exec_prefix}'|'${exec_prefix}/'*)
9006 value=1
9007 ;;
9008 esac
9009
9010cat >>confdefs.h <<_ACEOF
9011#define ICONV_BIN_RELOCATABLE $value
9012_ACEOF
9013
9014
9015
9016fi
9017
9018
cb01cfba 9019# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9020if test x"$enable_tui" != xno; then
cb01cfba
JB
9021 prefer_curses=yes
9022fi
9023
9024curses_found=no
9025if test x"$prefer_curses" = xyes; then
9026 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9027 # curses library because the latter might not provide all the
9028 # functionality we need. However, this leads to problems on systems
9029 # where the linker searches /usr/local/lib, but the compiler doesn't
9030 # search /usr/local/include, if ncurses is installed in /usr/local. A
9031 # default installation of ncurses on alpha*-dec-osf* will lead to such
9032 # a situation.
81ecdfbb
RW
9033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9034$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 9035if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9036 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9037else
9038 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9040/* end confdefs.h. */
9041
81ecdfbb
RW
9042/* Override any GCC internal prototype to avoid an error.
9043 Use char because int might match the return type of a GCC
9044 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9045#ifdef __cplusplus
9046extern "C"
9047#endif
6c7a06a3
TT
9048char waddstr ();
9049int
9050main ()
9051{
81ecdfbb 9052return waddstr ();
6c7a06a3
TT
9053 ;
9054 return 0;
9055}
9056_ACEOF
5007d765 9057for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
9058 if test -z "$ac_lib"; then
9059 ac_res="none required"
9060 else
9061 ac_res=-l$ac_lib
9062 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9063 fi
9064 if ac_fn_c_try_link "$LINENO"; then :
9065 ac_cv_search_waddstr=$ac_res
9066fi
9067rm -f core conftest.err conftest.$ac_objext \
9068 conftest$ac_exeext
d0ac1c44 9069 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
9070 break
9071fi
9072done
d0ac1c44 9073if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9074
6c7a06a3 9075else
81ecdfbb
RW
9076 ac_cv_search_waddstr=no
9077fi
9078rm conftest.$ac_ext
9079LIBS=$ac_func_search_save_LIBS
9080fi
9081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9082$as_echo "$ac_cv_search_waddstr" >&6; }
9083ac_res=$ac_cv_search_waddstr
9084if test "$ac_res" != no; then :
9085 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9086
9087fi
9088
9089
cb01cfba
JB
9090 if test "$ac_cv_search_waddstr" != no; then
9091 curses_found=yes
9092 fi
9093fi
9094
9095# Check whether we should enable the TUI, but only do so if we really
9096# can.
9097if test x"$enable_tui" != xno; then
0ad6b8ee 9098 if test -d "$srcdir/tui"; then
cb01cfba 9099 if test "$curses_found" != no; then
6c7a06a3
TT
9100 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9101 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9102 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9103 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9104 else
9105 if test x"$enable_tui" = xyes; then
d0ac1c44 9106 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9107 else
81ecdfbb
RW
9108 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9109$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9110 fi
9111 fi
9112 fi
9113fi
9114
9115# Since GDB uses Readline, we need termcap functionality. In many
9116# cases this will be provided by the curses library, but some systems
96fe4562 9117# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
9118
9119case $host_os in
9120 cygwin*)
0ad6b8ee 9121 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
9122 LIBS="../libtermcap/libtermcap.a $LIBS"
9123 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9124 fi ;;
9125 go32* | *djgpp*)
9126 ac_cv_search_tgetent="none required"
9127 ;;
6c7a06a3
TT
9128esac
9129
9130# These are the libraries checked by Readline.
81ecdfbb
RW
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9132$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9133if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9134 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9135else
9136 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9138/* end confdefs.h. */
9139
81ecdfbb
RW
9140/* Override any GCC internal prototype to avoid an error.
9141 Use char because int might match the return type of a GCC
9142 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9143#ifdef __cplusplus
9144extern "C"
9145#endif
6c7a06a3
TT
9146char tgetent ();
9147int
9148main ()
9149{
81ecdfbb 9150return tgetent ();
6c7a06a3
TT
9151 ;
9152 return 0;
9153}
9154_ACEOF
2578ecb1 9155for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9156 if test -z "$ac_lib"; then
9157 ac_res="none required"
9158 else
9159 ac_res=-l$ac_lib
6c7a06a3 9160 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9161 fi
9162 if ac_fn_c_try_link "$LINENO"; then :
9163 ac_cv_search_tgetent=$ac_res
9164fi
9165rm -f core conftest.err conftest.$ac_objext \
9166 conftest$ac_exeext
d0ac1c44 9167 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9168 break
9169fi
9170done
d0ac1c44 9171if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9172
6c7a06a3 9173else
81ecdfbb 9174 ac_cv_search_tgetent=no
6c7a06a3 9175fi
81ecdfbb 9176rm conftest.$ac_ext
6c7a06a3
TT
9177LIBS=$ac_func_search_save_LIBS
9178fi
81ecdfbb
RW
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9180$as_echo "$ac_cv_search_tgetent" >&6; }
9181ac_res=$ac_cv_search_tgetent
9182if test "$ac_res" != no; then :
9183 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9184
06825bd1
MK
9185fi
9186
06825bd1 9187
bec39cab 9188if test "$ac_cv_search_tgetent" = no; then
7a85168d 9189 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9190fi
9191
3841debe 9192
81ecdfbb
RW
9193# Check whether --with-system-readline was given.
9194if test "${with_system_readline+set}" = set; then :
9195 withval=$with_system_readline;
9196fi
6a30b0a5 9197
6a30b0a5
AS
9198
9199if test "$with_system_readline" = yes; then
5593a99a 9200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
86c6b807
TT
9201$as_echo_n "checking whether system readline is new enough... " >&6; }
9202if ${gdb_cv_readline_ok+:} false; then :
9203 $as_echo_n "(cached) " >&6
9204else
9205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9206/* end confdefs.h. */
9207#include <stdio.h>
5593a99a 9208 #include <readline/readline.h>
86c6b807
TT
9209int
9210main ()
9211{
9212#if RL_VERSION_MAJOR < 7
5593a99a
SM
9213 # error "readline version 7 required"
9214 #endif
9215
86c6b807
TT
9216 ;
9217 return 0;
9218}
9219_ACEOF
9220if ac_fn_c_try_compile "$LINENO"; then :
9221 gdb_cv_readline_ok=yes
9222else
9223 gdb_cv_readline_ok=no
5593a99a 9224
86c6b807
TT
9225fi
9226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 9227
86c6b807
TT
9228fi
9229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9230$as_echo "$gdb_cv_readline_ok" >&6; }
9231 if test "$gdb_cv_readline_ok" != yes; then
9232 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9233 fi
9234
6a30b0a5
AS
9235 READLINE=-lreadline
9236 READLINE_DEPS=
9237 READLINE_CFLAGS=
39037522 9238 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9239else
9240 READLINE='$(READLINE_DIR)/libreadline.a'
9241 READLINE_DEPS='$(READLINE)'
9242 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9243 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9244fi
9245
9246
9247
9248
9249
f997c383
SD
9250# Generate jit-reader.h
9251
9252# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9253TARGET_PTR=
9254
9255# The cast to long int works around a bug in the HP C Compiler
9256# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9257# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9258# This bug is HP SR number 8606223364.
9259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9260$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9261if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9262 $as_echo_n "(cached) " >&6
9263else
9264 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9265
9266else
9267 if test "$ac_cv_type_unsigned_long_long" = yes; then
9268 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9270as_fn_error 77 "cannot compute sizeof (unsigned long long)
9271See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9272 else
9273 ac_cv_sizeof_unsigned_long_long=0
9274 fi
9275fi
9276
9277fi
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9279$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9280
9281
9282
9283cat >>confdefs.h <<_ACEOF
9284#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9285_ACEOF
9286
9287
9288# The cast to long int works around a bug in the HP C Compiler
9289# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9290# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9291# This bug is HP SR number 8606223364.
9292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9293$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9294if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9295 $as_echo_n "(cached) " >&6
9296else
9297 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9298
9299else
9300 if test "$ac_cv_type_unsigned_long" = yes; then
9301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9303as_fn_error 77 "cannot compute sizeof (unsigned long)
9304See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9305 else
9306 ac_cv_sizeof_unsigned_long=0
9307 fi
9308fi
9309
9310fi
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9312$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9313
9314
9315
9316cat >>confdefs.h <<_ACEOF
9317#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9318_ACEOF
9319
9320
9321# The cast to long int works around a bug in the HP C Compiler
9322# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9323# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9324# This bug is HP SR number 8606223364.
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9326$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9327if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9328 $as_echo_n "(cached) " >&6
9329else
9330 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9331
9332else
9333 if test "$ac_cv_type_unsigned___int128" = yes; then
9334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9336as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9337See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9338 else
9339 ac_cv_sizeof_unsigned___int128=0
9340 fi
9341fi
9342
9343fi
9344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9345$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9346
9347
9348
9349cat >>confdefs.h <<_ACEOF
9350#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9351_ACEOF
9352
9353
9354
9355if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9356 TARGET_PTR="unsigned long"
9357elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9358 TARGET_PTR="unsigned long long"
9359elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9360 TARGET_PTR="unsigned __int128"
9361else
9362 TARGET_PTR="unsigned long"
9363fi
9364
9365
9366ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9367
9368
a2d08b9e
SD
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9370$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9371if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9372 $as_echo_n "(cached) " >&6
9373else
9374 ac_func_search_save_LIBS=$LIBS
9375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9376/* end confdefs.h. */
9377
9378/* Override any GCC internal prototype to avoid an error.
9379 Use char because int might match the return type of a GCC
9380 builtin and then its argument prototype would still apply. */
9381#ifdef __cplusplus
9382extern "C"
9383#endif
9384char dlopen ();
9385int
9386main ()
9387{
9388return dlopen ();
9389 ;
9390 return 0;
9391}
9392_ACEOF
9393for ac_lib in '' dl; do
9394 if test -z "$ac_lib"; then
9395 ac_res="none required"
9396 else
9397 ac_res=-l$ac_lib
9398 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9399 fi
9400 if ac_fn_c_try_link "$LINENO"; then :
9401 ac_cv_search_dlopen=$ac_res
9402fi
9403rm -f core conftest.err conftest.$ac_objext \
9404 conftest$ac_exeext
d0ac1c44 9405 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9406 break
9407fi
9408done
d0ac1c44 9409if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9410
9411else
9412 ac_cv_search_dlopen=no
9413fi
9414rm conftest.$ac_ext
9415LIBS=$ac_func_search_save_LIBS
9416fi
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9418$as_echo "$ac_cv_search_dlopen" >&6; }
9419ac_res=$ac_cv_search_dlopen
9420if test "$ac_res" != no; then :
9421 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9422
9423fi
9424
9425
39037522 9426
b8e0a31c
SD
9427
9428# Check whether --with-jit-reader-dir was given.
9429if test "${with_jit_reader_dir+set}" = set; then :
9430 withval=$with_jit_reader_dir;
9431 JIT_READER_DIR=$withval
9432else
9433 JIT_READER_DIR=${libdir}/gdb
9434fi
9435
9436
9437 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9438 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9439 ac_define_dir=`eval echo $JIT_READER_DIR`
9440 ac_define_dir=`eval echo $ac_define_dir`
9441
9442cat >>confdefs.h <<_ACEOF
9443#define JIT_READER_DIR "$ac_define_dir"
9444_ACEOF
9445
9446
9447
9448
9449 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9450 if test "x$prefix" = xNONE; then
9451 test_prefix=/usr/local
9452 else
9453 test_prefix=$prefix
9454 fi
9455 else
9456 test_prefix=$exec_prefix
9457 fi
9458 value=0
9459 case ${ac_define_dir} in
9460 "${test_prefix}"|"${test_prefix}/"*|\
9461 '${exec_prefix}'|'${exec_prefix}/'*)
9462 value=1
9463 ;;
9464 esac
9465
9466cat >>confdefs.h <<_ACEOF
9467#define JIT_READER_DIR_RELOCATABLE $value
9468_ACEOF
9469
9470
9471
9472
9473
81ecdfbb
RW
9474# Check whether --with-expat was given.
9475if test "${with_expat+set}" = set; then :
9476 withval=$with_expat;
5c39566f
DJ
9477else
9478 with_expat=auto
81ecdfbb
RW
9479fi
9480
9481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9482$as_echo_n "checking whether to use expat... " >&6; }
9483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9484$as_echo "$with_expat" >&6; }
5c39566f
DJ
9485
9486if test "${with_expat}" = no; then
81ecdfbb
RW
9487 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9488$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9489 HAVE_LIBEXPAT=no
9490else
9491
3841debe
DJ
9492
9493
9494
9495
9496
9497
9498
9499 use_additional=yes
9500
9501 acl_save_prefix="$prefix"
9502 prefix="$acl_final_prefix"
9503 acl_save_exec_prefix="$exec_prefix"
9504 exec_prefix="$acl_final_exec_prefix"
9505
9506 eval additional_includedir=\"$includedir\"
9507 eval additional_libdir=\"$libdir\"
9508
9509 exec_prefix="$acl_save_exec_prefix"
9510 prefix="$acl_save_prefix"
9511
9512
81ecdfbb
RW
9513# Check whether --with-libexpat-prefix was given.
9514if test "${with_libexpat_prefix+set}" = set; then :
9515 withval=$with_libexpat_prefix;
3841debe
DJ
9516 if test "X$withval" = "Xno"; then
9517 use_additional=no
9518 else
9519 if test "X$withval" = "X"; then
9520
9521 acl_save_prefix="$prefix"
9522 prefix="$acl_final_prefix"
9523 acl_save_exec_prefix="$exec_prefix"
9524 exec_prefix="$acl_final_exec_prefix"
9525
9526 eval additional_includedir=\"$includedir\"
9527 eval additional_libdir=\"$libdir\"
9528
9529 exec_prefix="$acl_save_exec_prefix"
9530 prefix="$acl_save_prefix"
9531
9532 else
9533 additional_includedir="$withval/include"
9534 additional_libdir="$withval/lib"
9535 fi
9536 fi
9537
81ecdfbb
RW
9538fi
9539
9f1528a1
AB
9540
9541# Check whether --with-libexpat-type was given.
9542if test "${with_libexpat_type+set}" = set; then :
9543 withval=$with_libexpat_type; with_libexpat_type=$withval
9544else
9545 with_libexpat_type=auto
9546fi
9547
9548 lib_type=`eval echo \$with_libexpat_type`
9549
3841debe
DJ
9550 LIBEXPAT=
9551 LTLIBEXPAT=
9552 INCEXPAT=
9553 rpathdirs=
9554 ltrpathdirs=
9555 names_already_handled=
9556 names_next_round='expat '
9557 while test -n "$names_next_round"; do
9558 names_this_round="$names_next_round"
9559 names_next_round=
9560 for name in $names_this_round; do
9561 already_handled=
9562 for n in $names_already_handled; do
9563 if test "$n" = "$name"; then
9564 already_handled=yes
9565 break
9566 fi
9567 done
9568 if test -z "$already_handled"; then
9569 names_already_handled="$names_already_handled $name"
9570 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9571 eval value=\"\$HAVE_LIB$uppername\"
9572 if test -n "$value"; then
9573 if test "$value" = yes; then
9574 eval value=\"\$LIB$uppername\"
9575 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9576 eval value=\"\$LTLIB$uppername\"
9577 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9578 else
9579 :
9580 fi
9581 else
9582 found_dir=
9583 found_la=
9584 found_so=
9585 found_a=
9586 if test $use_additional = yes; then
9f1528a1 9587 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9588 found_dir="$additional_libdir"
9589 found_so="$additional_libdir/lib$name.$shlibext"
9590 if test -f "$additional_libdir/lib$name.la"; then
9591 found_la="$additional_libdir/lib$name.la"
9592 fi
9f1528a1 9593 elif test x$lib_type != xshared; then
3841debe
DJ
9594 if test -f "$additional_libdir/lib$name.$libext"; then
9595 found_dir="$additional_libdir"
9596 found_a="$additional_libdir/lib$name.$libext"
9597 if test -f "$additional_libdir/lib$name.la"; then
9598 found_la="$additional_libdir/lib$name.la"
9599 fi
9600 fi
9601 fi
9602 fi
9603 if test "X$found_dir" = "X"; then
9604 for x in $LDFLAGS $LTLIBEXPAT; do
9605
9606 acl_save_prefix="$prefix"
9607 prefix="$acl_final_prefix"
9608 acl_save_exec_prefix="$exec_prefix"
9609 exec_prefix="$acl_final_exec_prefix"
9610 eval x=\"$x\"
9611 exec_prefix="$acl_save_exec_prefix"
9612 prefix="$acl_save_prefix"
9613
9614 case "$x" in
9615 -L*)
9616 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9617 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9618 found_dir="$dir"
9619 found_so="$dir/lib$name.$shlibext"
9620 if test -f "$dir/lib$name.la"; then
9621 found_la="$dir/lib$name.la"
9622 fi
9f1528a1 9623 elif test x$lib_type != xshared; then
3841debe
DJ
9624 if test -f "$dir/lib$name.$libext"; then
9625 found_dir="$dir"
9626 found_a="$dir/lib$name.$libext"
9627 if test -f "$dir/lib$name.la"; then
9628 found_la="$dir/lib$name.la"
9629 fi
9630 fi
9631 fi
9632 ;;
9633 esac
9634 if test "X$found_dir" != "X"; then
9635 break
9636 fi
9637 done
9638 fi
9639 if test "X$found_dir" != "X"; then
9640 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9641 if test "X$found_so" != "X"; then
9642 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9643 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9644 else
9645 haveit=
9646 for x in $ltrpathdirs; do
9647 if test "X$x" = "X$found_dir"; then
9648 haveit=yes
9649 break
9650 fi
9651 done
9652 if test -z "$haveit"; then
9653 ltrpathdirs="$ltrpathdirs $found_dir"
9654 fi
9655 if test "$hardcode_direct" = yes; then
9656 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9657 else
9658 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9659 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9660 haveit=
9661 for x in $rpathdirs; do
9662 if test "X$x" = "X$found_dir"; then
9663 haveit=yes
9664 break
9665 fi
9666 done
9667 if test -z "$haveit"; then
9668 rpathdirs="$rpathdirs $found_dir"
9669 fi
9670 else
9671 haveit=
9672 for x in $LDFLAGS $LIBEXPAT; do
9673
9674 acl_save_prefix="$prefix"
9675 prefix="$acl_final_prefix"
9676 acl_save_exec_prefix="$exec_prefix"
9677 exec_prefix="$acl_final_exec_prefix"
9678 eval x=\"$x\"
9679 exec_prefix="$acl_save_exec_prefix"
9680 prefix="$acl_save_prefix"
9681
9682 if test "X$x" = "X-L$found_dir"; then
9683 haveit=yes
9684 break
9685 fi
9686 done
9687 if test -z "$haveit"; then
9688 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9689 fi
9690 if test "$hardcode_minus_L" != no; then
9691 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9692 else
9693 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9694 fi
9695 fi
9696 fi
9697 fi
9698 else
9699 if test "X$found_a" != "X"; then
9700 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9701 else
9702 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9703 fi
9704 fi
9705 additional_includedir=
9706 case "$found_dir" in
9707 */lib | */lib/)
9708 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9709 additional_includedir="$basedir/include"
9710 ;;
9711 esac
9712 if test "X$additional_includedir" != "X"; then
9713 if test "X$additional_includedir" != "X/usr/include"; then
9714 haveit=
9715 if test "X$additional_includedir" = "X/usr/local/include"; then
9716 if test -n "$GCC"; then
9717 case $host_os in
9718 linux*) haveit=yes;;
9719 esac
9720 fi
9721 fi
9722 if test -z "$haveit"; then
9723 for x in $CPPFLAGS $INCEXPAT; do
9724
9725 acl_save_prefix="$prefix"
9726 prefix="$acl_final_prefix"
9727 acl_save_exec_prefix="$exec_prefix"
9728 exec_prefix="$acl_final_exec_prefix"
9729 eval x=\"$x\"
9730 exec_prefix="$acl_save_exec_prefix"
9731 prefix="$acl_save_prefix"
9732
9733 if test "X$x" = "X-I$additional_includedir"; then
9734 haveit=yes
9735 break
9736 fi
9737 done
9738 if test -z "$haveit"; then
9739 if test -d "$additional_includedir"; then
9740 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9741 fi
9742 fi
9743 fi
9744 fi
9745 fi
9746 if test -n "$found_la"; then
9747 save_libdir="$libdir"
9748 case "$found_la" in
9749 */* | *\\*) . "$found_la" ;;
9750 *) . "./$found_la" ;;
9751 esac
9752 libdir="$save_libdir"
9753 for dep in $dependency_libs; do
9754 case "$dep" in
9755 -L*)
9756 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9757 if test "X$additional_libdir" != "X/usr/lib"; then
9758 haveit=
9759 if test "X$additional_libdir" = "X/usr/local/lib"; then
9760 if test -n "$GCC"; then
9761 case $host_os in
9762 linux*) haveit=yes;;
9763 esac
9764 fi
9765 fi
9766 if test -z "$haveit"; then
9767 haveit=
9768 for x in $LDFLAGS $LIBEXPAT; do
9769
9770 acl_save_prefix="$prefix"
9771 prefix="$acl_final_prefix"
9772 acl_save_exec_prefix="$exec_prefix"
9773 exec_prefix="$acl_final_exec_prefix"
9774 eval x=\"$x\"
9775 exec_prefix="$acl_save_exec_prefix"
9776 prefix="$acl_save_prefix"
9777
9778 if test "X$x" = "X-L$additional_libdir"; then
9779 haveit=yes
9780 break
9781 fi
9782 done
9783 if test -z "$haveit"; then
9784 if test -d "$additional_libdir"; then
9785 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9786 fi
9787 fi
9788 haveit=
9789 for x in $LDFLAGS $LTLIBEXPAT; do
9790
9791 acl_save_prefix="$prefix"
9792 prefix="$acl_final_prefix"
9793 acl_save_exec_prefix="$exec_prefix"
9794 exec_prefix="$acl_final_exec_prefix"
9795 eval x=\"$x\"
9796 exec_prefix="$acl_save_exec_prefix"
9797 prefix="$acl_save_prefix"
9798
9799 if test "X$x" = "X-L$additional_libdir"; then
9800 haveit=yes
9801 break
9802 fi
9803 done
9804 if test -z "$haveit"; then
9805 if test -d "$additional_libdir"; then
9806 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9807 fi
9808 fi
9809 fi
9810 fi
9811 ;;
9812 -R*)
9813 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9814 if test "$enable_rpath" != no; then
9815 haveit=
9816 for x in $rpathdirs; do
9817 if test "X$x" = "X$dir"; then
9818 haveit=yes
9819 break
9820 fi
9821 done
9822 if test -z "$haveit"; then
9823 rpathdirs="$rpathdirs $dir"
9824 fi
9825 haveit=
9826 for x in $ltrpathdirs; do
9827 if test "X$x" = "X$dir"; then
9828 haveit=yes
9829 break
9830 fi
9831 done
9832 if test -z "$haveit"; then
9833 ltrpathdirs="$ltrpathdirs $dir"
9834 fi
9835 fi
9836 ;;
9837 -l*)
9838 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9839 ;;
9840 *.la)
9841 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9842 ;;
9843 *)
9844 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9845 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9846 ;;
81ecdfbb
RW
9847 esac
9848 done
9849 fi
9850 else
9f1528a1
AB
9851 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9852 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9853 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9854 else
9855 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9856 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9857 fi
81ecdfbb
RW
9858 fi
9859 fi
9860 fi
9861 done
9862 done
9863 if test "X$rpathdirs" != "X"; then
9864 if test -n "$hardcode_libdir_separator"; then
9865 alldirs=
9866 for found_dir in $rpathdirs; do
9867 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9868 done
9869 acl_save_libdir="$libdir"
9870 libdir="$alldirs"
9871 eval flag=\"$hardcode_libdir_flag_spec\"
9872 libdir="$acl_save_libdir"
9873 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9874 else
9875 for found_dir in $rpathdirs; do
9876 acl_save_libdir="$libdir"
9877 libdir="$found_dir"
9878 eval flag=\"$hardcode_libdir_flag_spec\"
9879 libdir="$acl_save_libdir"
9880 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9881 done
9882 fi
9883 fi
9884 if test "X$ltrpathdirs" != "X"; then
9885 for found_dir in $ltrpathdirs; do
9886 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9887 done
9888 fi
a9322a30
TT
9889
9890
81ecdfbb 9891 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9892
81ecdfbb
RW
9893 for element in $INCEXPAT; do
9894 haveit=
9895 for x in $CPPFLAGS; do
a9322a30 9896
81ecdfbb
RW
9897 acl_save_prefix="$prefix"
9898 prefix="$acl_final_prefix"
9899 acl_save_exec_prefix="$exec_prefix"
9900 exec_prefix="$acl_final_exec_prefix"
9901 eval x=\"$x\"
9902 exec_prefix="$acl_save_exec_prefix"
9903 prefix="$acl_save_prefix"
a8111142 9904
81ecdfbb
RW
9905 if test "X$x" = "X$element"; then
9906 haveit=yes
9907 break
9908 fi
9909 done
9910 if test -z "$haveit"; then
9911 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9912 fi
9913 done
a9322a30
TT
9914
9915
81ecdfbb
RW
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9917$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9918if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9919 $as_echo_n "(cached) " >&6
bec39cab 9920else
bec39cab 9921
81ecdfbb
RW
9922 ac_save_LIBS="$LIBS"
9923 LIBS="$LIBS $LIBEXPAT"
9924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9925/* end confdefs.h. */
81ecdfbb
RW
9926#include "expat.h"
9927int
9928main ()
9929{
9930XML_Parser p = XML_ParserCreate (0);
9931 ;
9932 return 0;
9933}
bec39cab 9934_ACEOF
81ecdfbb
RW
9935if ac_fn_c_try_link "$LINENO"; then :
9936 ac_cv_libexpat=yes
c906108c 9937else
81ecdfbb 9938 ac_cv_libexpat=no
bec39cab 9939fi
81ecdfbb
RW
9940rm -f core conftest.err conftest.$ac_objext \
9941 conftest$ac_exeext conftest.$ac_ext
9942 LIBS="$ac_save_LIBS"
c906108c 9943
95ca63c4 9944fi
81ecdfbb
RW
9945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9946$as_echo "$ac_cv_libexpat" >&6; }
9947 if test "$ac_cv_libexpat" = yes; then
9948 HAVE_LIBEXPAT=yes
bec39cab 9949
81ecdfbb 9950$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9951
81ecdfbb
RW
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9953$as_echo_n "checking how to link with libexpat... " >&6; }
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9955$as_echo "$LIBEXPAT" >&6; }
9956 else
9957 HAVE_LIBEXPAT=no
9958 CPPFLAGS="$ac_save_CPPFLAGS"
9959 LIBEXPAT=
9960 LTLIBEXPAT=
9961 fi
95ca63c4
CF
9962
9963
9964
7cb9022a
MK
9965
9966
bec39cab 9967
81ecdfbb
RW
9968 if test "$HAVE_LIBEXPAT" != yes; then
9969 if test "$with_expat" = yes; then
d0ac1c44 9970 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9971 else
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9973$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9974 fi
9975 else
9976 save_LIBS=$LIBS
9977 LIBS="$LIBS $LIBEXPAT"
9978 for ac_func in XML_StopParser
9979do :
9980 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9981if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9982 cat >>confdefs.h <<_ACEOF
81ecdfbb 9983#define HAVE_XML_STOPPARSER 1
bec39cab 9984_ACEOF
95ca63c4 9985
bec39cab 9986fi
bec39cab 9987done
95ca63c4 9988
81ecdfbb
RW
9989 LIBS=$save_LIBS
9990 fi
a9322a30
TT
9991fi
9992
2c947d9b
JB
9993# Verify that we have a usable GMP library.
9994
9995
9996
9997
9998
9999
10000
10001
10002 use_additional=yes
10003
10004 acl_save_prefix="$prefix"
10005 prefix="$acl_final_prefix"
10006 acl_save_exec_prefix="$exec_prefix"
10007 exec_prefix="$acl_final_exec_prefix"
10008
10009 eval additional_includedir=\"$includedir\"
10010 eval additional_libdir=\"$libdir\"
10011
10012 exec_prefix="$acl_save_exec_prefix"
10013 prefix="$acl_save_prefix"
10014
10015
10016# Check whether --with-libgmp-prefix was given.
10017if test "${with_libgmp_prefix+set}" = set; then :
10018 withval=$with_libgmp_prefix;
10019 if test "X$withval" = "Xno"; then
10020 use_additional=no
10021 else
10022 if test "X$withval" = "X"; then
10023
10024 acl_save_prefix="$prefix"
10025 prefix="$acl_final_prefix"
10026 acl_save_exec_prefix="$exec_prefix"
10027 exec_prefix="$acl_final_exec_prefix"
10028
10029 eval additional_includedir=\"$includedir\"
10030 eval additional_libdir=\"$libdir\"
10031
10032 exec_prefix="$acl_save_exec_prefix"
10033 prefix="$acl_save_prefix"
10034
10035 else
10036 additional_includedir="$withval/include"
10037 additional_libdir="$withval/lib"
10038 fi
10039 fi
10040
10041fi
10042
10043
10044# Check whether --with-libgmp-type was given.
10045if test "${with_libgmp_type+set}" = set; then :
10046 withval=$with_libgmp_type; with_libgmp_type=$withval
10047else
10048 with_libgmp_type=auto
10049fi
10050
10051 lib_type=`eval echo \$with_libgmp_type`
10052
10053 LIBGMP=
10054 LTLIBGMP=
10055 INCGMP=
10056 rpathdirs=
10057 ltrpathdirs=
10058 names_already_handled=
10059 names_next_round='gmp '
10060 while test -n "$names_next_round"; do
10061 names_this_round="$names_next_round"
10062 names_next_round=
10063 for name in $names_this_round; do
10064 already_handled=
10065 for n in $names_already_handled; do
10066 if test "$n" = "$name"; then
10067 already_handled=yes
10068 break
10069 fi
10070 done
10071 if test -z "$already_handled"; then
10072 names_already_handled="$names_already_handled $name"
10073 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10074 eval value=\"\$HAVE_LIB$uppername\"
10075 if test -n "$value"; then
10076 if test "$value" = yes; then
10077 eval value=\"\$LIB$uppername\"
10078 test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value"
10079 eval value=\"\$LTLIB$uppername\"
10080 test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value"
10081 else
10082 :
10083 fi
10084 else
10085 found_dir=
10086 found_la=
10087 found_so=
10088 found_a=
10089 if test $use_additional = yes; then
10090 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10091 found_dir="$additional_libdir"
10092 found_so="$additional_libdir/lib$name.$shlibext"
10093 if test -f "$additional_libdir/lib$name.la"; then
10094 found_la="$additional_libdir/lib$name.la"
10095 fi
10096 elif test x$lib_type != xshared; then
10097 if test -f "$additional_libdir/lib$name.$libext"; then
10098 found_dir="$additional_libdir"
10099 found_a="$additional_libdir/lib$name.$libext"
10100 if test -f "$additional_libdir/lib$name.la"; then
10101 found_la="$additional_libdir/lib$name.la"
10102 fi
10103 fi
10104 fi
10105 fi
10106 if test "X$found_dir" = "X"; then
10107 for x in $LDFLAGS $LTLIBGMP; do
10108
10109 acl_save_prefix="$prefix"
10110 prefix="$acl_final_prefix"
10111 acl_save_exec_prefix="$exec_prefix"
10112 exec_prefix="$acl_final_exec_prefix"
10113 eval x=\"$x\"
10114 exec_prefix="$acl_save_exec_prefix"
10115 prefix="$acl_save_prefix"
10116
10117 case "$x" in
10118 -L*)
10119 dir=`echo "X$x" | sed -e 's/^X-L//'`
10120 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10121 found_dir="$dir"
10122 found_so="$dir/lib$name.$shlibext"
10123 if test -f "$dir/lib$name.la"; then
10124 found_la="$dir/lib$name.la"
10125 fi
10126 elif test x$lib_type != xshared; then
10127 if test -f "$dir/lib$name.$libext"; then
10128 found_dir="$dir"
10129 found_a="$dir/lib$name.$libext"
10130 if test -f "$dir/lib$name.la"; then
10131 found_la="$dir/lib$name.la"
10132 fi
10133 fi
10134 fi
10135 ;;
10136 esac
10137 if test "X$found_dir" != "X"; then
10138 break
10139 fi
10140 done
10141 fi
10142 if test "X$found_dir" != "X"; then
10143 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name"
10144 if test "X$found_so" != "X"; then
10145 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10146 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10147 else
10148 haveit=
10149 for x in $ltrpathdirs; do
10150 if test "X$x" = "X$found_dir"; then
10151 haveit=yes
10152 break
10153 fi
10154 done
10155 if test -z "$haveit"; then
10156 ltrpathdirs="$ltrpathdirs $found_dir"
10157 fi
10158 if test "$hardcode_direct" = yes; then
10159 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10160 else
10161 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10162 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10163 haveit=
10164 for x in $rpathdirs; do
10165 if test "X$x" = "X$found_dir"; then
10166 haveit=yes
10167 break
10168 fi
10169 done
10170 if test -z "$haveit"; then
10171 rpathdirs="$rpathdirs $found_dir"
10172 fi
10173 else
10174 haveit=
10175 for x in $LDFLAGS $LIBGMP; do
10176
10177 acl_save_prefix="$prefix"
10178 prefix="$acl_final_prefix"
10179 acl_save_exec_prefix="$exec_prefix"
10180 exec_prefix="$acl_final_exec_prefix"
10181 eval x=\"$x\"
10182 exec_prefix="$acl_save_exec_prefix"
10183 prefix="$acl_save_prefix"
10184
10185 if test "X$x" = "X-L$found_dir"; then
10186 haveit=yes
10187 break
10188 fi
10189 done
10190 if test -z "$haveit"; then
10191 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir"
10192 fi
10193 if test "$hardcode_minus_L" != no; then
10194 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10195 else
10196 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10197 fi
10198 fi
10199 fi
10200 fi
10201 else
10202 if test "X$found_a" != "X"; then
10203 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a"
10204 else
10205 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name"
10206 fi
10207 fi
10208 additional_includedir=
10209 case "$found_dir" in
10210 */lib | */lib/)
10211 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10212 additional_includedir="$basedir/include"
10213 ;;
10214 esac
10215 if test "X$additional_includedir" != "X"; then
10216 if test "X$additional_includedir" != "X/usr/include"; then
10217 haveit=
10218 if test "X$additional_includedir" = "X/usr/local/include"; then
10219 if test -n "$GCC"; then
10220 case $host_os in
10221 linux*) haveit=yes;;
10222 esac
10223 fi
10224 fi
10225 if test -z "$haveit"; then
10226 for x in $CPPFLAGS $INCGMP; do
10227
10228 acl_save_prefix="$prefix"
10229 prefix="$acl_final_prefix"
10230 acl_save_exec_prefix="$exec_prefix"
10231 exec_prefix="$acl_final_exec_prefix"
10232 eval x=\"$x\"
10233 exec_prefix="$acl_save_exec_prefix"
10234 prefix="$acl_save_prefix"
10235
10236 if test "X$x" = "X-I$additional_includedir"; then
10237 haveit=yes
10238 break
10239 fi
10240 done
10241 if test -z "$haveit"; then
10242 if test -d "$additional_includedir"; then
10243 INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir"
10244 fi
10245 fi
10246 fi
10247 fi
10248 fi
10249 if test -n "$found_la"; then
10250 save_libdir="$libdir"
10251 case "$found_la" in
10252 */* | *\\*) . "$found_la" ;;
10253 *) . "./$found_la" ;;
10254 esac
10255 libdir="$save_libdir"
10256 for dep in $dependency_libs; do
10257 case "$dep" in
10258 -L*)
10259 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10260 if test "X$additional_libdir" != "X/usr/lib"; then
10261 haveit=
10262 if test "X$additional_libdir" = "X/usr/local/lib"; then
10263 if test -n "$GCC"; then
10264 case $host_os in
10265 linux*) haveit=yes;;
10266 esac
10267 fi
10268 fi
10269 if test -z "$haveit"; then
10270 haveit=
10271 for x in $LDFLAGS $LIBGMP; do
10272
10273 acl_save_prefix="$prefix"
10274 prefix="$acl_final_prefix"
10275 acl_save_exec_prefix="$exec_prefix"
10276 exec_prefix="$acl_final_exec_prefix"
10277 eval x=\"$x\"
10278 exec_prefix="$acl_save_exec_prefix"
10279 prefix="$acl_save_prefix"
10280
10281 if test "X$x" = "X-L$additional_libdir"; then
10282 haveit=yes
10283 break
10284 fi
10285 done
10286 if test -z "$haveit"; then
10287 if test -d "$additional_libdir"; then
10288 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir"
10289 fi
10290 fi
10291 haveit=
10292 for x in $LDFLAGS $LTLIBGMP; do
10293
10294 acl_save_prefix="$prefix"
10295 prefix="$acl_final_prefix"
10296 acl_save_exec_prefix="$exec_prefix"
10297 exec_prefix="$acl_final_exec_prefix"
10298 eval x=\"$x\"
10299 exec_prefix="$acl_save_exec_prefix"
10300 prefix="$acl_save_prefix"
10301
10302 if test "X$x" = "X-L$additional_libdir"; then
10303 haveit=yes
10304 break
10305 fi
10306 done
10307 if test -z "$haveit"; then
10308 if test -d "$additional_libdir"; then
10309 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir"
10310 fi
10311 fi
10312 fi
10313 fi
10314 ;;
10315 -R*)
10316 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10317 if test "$enable_rpath" != no; then
10318 haveit=
10319 for x in $rpathdirs; do
10320 if test "X$x" = "X$dir"; then
10321 haveit=yes
10322 break
10323 fi
10324 done
10325 if test -z "$haveit"; then
10326 rpathdirs="$rpathdirs $dir"
10327 fi
10328 haveit=
10329 for x in $ltrpathdirs; do
10330 if test "X$x" = "X$dir"; then
10331 haveit=yes
10332 break
10333 fi
10334 done
10335 if test -z "$haveit"; then
10336 ltrpathdirs="$ltrpathdirs $dir"
10337 fi
10338 fi
10339 ;;
10340 -l*)
10341 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10342 ;;
10343 *.la)
10344 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10345 ;;
10346 *)
10347 LIBGMP="${LIBGMP}${LIBGMP:+ }$dep"
10348 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep"
10349 ;;
10350 esac
10351 done
10352 fi
10353 else
10354 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10355 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10356 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name"
10357 else
10358 LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext"
10359 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext"
10360 fi
10361 fi
10362 fi
10363 fi
10364 done
10365 done
10366 if test "X$rpathdirs" != "X"; then
10367 if test -n "$hardcode_libdir_separator"; then
10368 alldirs=
10369 for found_dir in $rpathdirs; do
10370 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10371 done
10372 acl_save_libdir="$libdir"
10373 libdir="$alldirs"
10374 eval flag=\"$hardcode_libdir_flag_spec\"
10375 libdir="$acl_save_libdir"
10376 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10377 else
10378 for found_dir in $rpathdirs; do
10379 acl_save_libdir="$libdir"
10380 libdir="$found_dir"
10381 eval flag=\"$hardcode_libdir_flag_spec\"
10382 libdir="$acl_save_libdir"
10383 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10384 done
10385 fi
10386 fi
10387 if test "X$ltrpathdirs" != "X"; then
10388 for found_dir in $ltrpathdirs; do
10389 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir"
10390 done
10391 fi
10392
10393
10394 ac_save_CPPFLAGS="$CPPFLAGS"
10395
10396 for element in $INCGMP; do
10397 haveit=
10398 for x in $CPPFLAGS; do
10399
10400 acl_save_prefix="$prefix"
10401 prefix="$acl_final_prefix"
10402 acl_save_exec_prefix="$exec_prefix"
10403 exec_prefix="$acl_final_exec_prefix"
10404 eval x=\"$x\"
10405 exec_prefix="$acl_save_exec_prefix"
10406 prefix="$acl_save_prefix"
10407
10408 if test "X$x" = "X$element"; then
10409 haveit=yes
10410 break
10411 fi
10412 done
10413 if test -z "$haveit"; then
10414 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10415 fi
10416 done
10417
10418
10419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5
10420$as_echo_n "checking for libgmp... " >&6; }
10421if ${ac_cv_libgmp+:} false; then :
10422 $as_echo_n "(cached) " >&6
10423else
10424
10425 ac_save_LIBS="$LIBS"
10426 LIBS="$LIBS $LIBGMP"
10427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10428/* end confdefs.h. */
10429#include <gmp.h>
10430int
10431main ()
10432{
10433mpz_t n;
10434 mpz_init (n);
10435 ;
10436 return 0;
10437}
10438_ACEOF
10439if ac_fn_c_try_link "$LINENO"; then :
10440 ac_cv_libgmp=yes
10441else
10442 ac_cv_libgmp=no
10443fi
10444rm -f core conftest.err conftest.$ac_objext \
10445 conftest$ac_exeext conftest.$ac_ext
10446 LIBS="$ac_save_LIBS"
10447
10448fi
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5
10450$as_echo "$ac_cv_libgmp" >&6; }
10451 if test "$ac_cv_libgmp" = yes; then
10452 HAVE_LIBGMP=yes
10453
10454$as_echo "#define HAVE_LIBGMP 1" >>confdefs.h
10455
10456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5
10457$as_echo_n "checking how to link with libgmp... " >&6; }
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5
10459$as_echo "$LIBGMP" >&6; }
10460 else
10461 HAVE_LIBGMP=no
10462 CPPFLAGS="$ac_save_CPPFLAGS"
10463 LIBGMP=
10464 LTLIBGMP=
10465 fi
10466
10467
10468
10469
10470
10471
1b4ac058
JB
10472if test "$HAVE_LIBGMP" != yes; then
10473 as_fn_error $? "GMP is missing or unusable" "$LINENO" 5
10474fi
2c947d9b 10475
2400729e
UW
10476
10477# Check whether --with-mpfr was given.
10478if test "${with_mpfr+set}" = set; then :
10479 withval=$with_mpfr;
10480else
10481 with_mpfr=auto
10482fi
10483
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10485$as_echo_n "checking whether to use MPFR... " >&6; }
10486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10487$as_echo "$with_mpfr" >&6; }
10488
10489if test "${with_mpfr}" = no; then
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10491$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10492 HAVE_LIBMPFR=no
10493else
10494
10495
10496
10497
10498
10499
10500
10501
10502 use_additional=yes
10503
10504 acl_save_prefix="$prefix"
10505 prefix="$acl_final_prefix"
10506 acl_save_exec_prefix="$exec_prefix"
10507 exec_prefix="$acl_final_exec_prefix"
10508
10509 eval additional_includedir=\"$includedir\"
10510 eval additional_libdir=\"$libdir\"
10511
10512 exec_prefix="$acl_save_exec_prefix"
10513 prefix="$acl_save_prefix"
10514
10515
10516# Check whether --with-libmpfr-prefix was given.
10517if test "${with_libmpfr_prefix+set}" = set; then :
10518 withval=$with_libmpfr_prefix;
10519 if test "X$withval" = "Xno"; then
10520 use_additional=no
10521 else
10522 if test "X$withval" = "X"; then
10523
10524 acl_save_prefix="$prefix"
10525 prefix="$acl_final_prefix"
10526 acl_save_exec_prefix="$exec_prefix"
10527 exec_prefix="$acl_final_exec_prefix"
10528
10529 eval additional_includedir=\"$includedir\"
10530 eval additional_libdir=\"$libdir\"
10531
10532 exec_prefix="$acl_save_exec_prefix"
10533 prefix="$acl_save_prefix"
10534
10535 else
10536 additional_includedir="$withval/include"
10537 additional_libdir="$withval/lib"
10538 fi
10539 fi
10540
10541fi
10542
9f1528a1
AB
10543
10544# Check whether --with-libmpfr-type was given.
10545if test "${with_libmpfr_type+set}" = set; then :
10546 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10547else
10548 with_libmpfr_type=auto
10549fi
10550
10551 lib_type=`eval echo \$with_libmpfr_type`
10552
2400729e
UW
10553 LIBMPFR=
10554 LTLIBMPFR=
10555 INCMPFR=
10556 rpathdirs=
10557 ltrpathdirs=
10558 names_already_handled=
da658607 10559 names_next_round='mpfr gmp'
2400729e
UW
10560 while test -n "$names_next_round"; do
10561 names_this_round="$names_next_round"
10562 names_next_round=
10563 for name in $names_this_round; do
10564 already_handled=
10565 for n in $names_already_handled; do
10566 if test "$n" = "$name"; then
10567 already_handled=yes
10568 break
10569 fi
10570 done
10571 if test -z "$already_handled"; then
10572 names_already_handled="$names_already_handled $name"
10573 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10574 eval value=\"\$HAVE_LIB$uppername\"
10575 if test -n "$value"; then
10576 if test "$value" = yes; then
10577 eval value=\"\$LIB$uppername\"
10578 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10579 eval value=\"\$LTLIB$uppername\"
10580 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10581 else
10582 :
10583 fi
10584 else
10585 found_dir=
10586 found_la=
10587 found_so=
10588 found_a=
10589 if test $use_additional = yes; then
9f1528a1 10590 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10591 found_dir="$additional_libdir"
10592 found_so="$additional_libdir/lib$name.$shlibext"
10593 if test -f "$additional_libdir/lib$name.la"; then
10594 found_la="$additional_libdir/lib$name.la"
10595 fi
9f1528a1 10596 elif test x$lib_type != xshared; then
2400729e
UW
10597 if test -f "$additional_libdir/lib$name.$libext"; then
10598 found_dir="$additional_libdir"
10599 found_a="$additional_libdir/lib$name.$libext"
10600 if test -f "$additional_libdir/lib$name.la"; then
10601 found_la="$additional_libdir/lib$name.la"
10602 fi
10603 fi
10604 fi
10605 fi
10606 if test "X$found_dir" = "X"; then
10607 for x in $LDFLAGS $LTLIBMPFR; do
10608
10609 acl_save_prefix="$prefix"
10610 prefix="$acl_final_prefix"
10611 acl_save_exec_prefix="$exec_prefix"
10612 exec_prefix="$acl_final_exec_prefix"
10613 eval x=\"$x\"
10614 exec_prefix="$acl_save_exec_prefix"
10615 prefix="$acl_save_prefix"
10616
10617 case "$x" in
10618 -L*)
10619 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 10620 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10621 found_dir="$dir"
10622 found_so="$dir/lib$name.$shlibext"
10623 if test -f "$dir/lib$name.la"; then
10624 found_la="$dir/lib$name.la"
10625 fi
9f1528a1 10626 elif test x$lib_type != xshared; then
2400729e
UW
10627 if test -f "$dir/lib$name.$libext"; then
10628 found_dir="$dir"
10629 found_a="$dir/lib$name.$libext"
10630 if test -f "$dir/lib$name.la"; then
10631 found_la="$dir/lib$name.la"
10632 fi
10633 fi
10634 fi
10635 ;;
10636 esac
10637 if test "X$found_dir" != "X"; then
10638 break
10639 fi
10640 done
10641 fi
10642 if test "X$found_dir" != "X"; then
10643 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10644 if test "X$found_so" != "X"; then
10645 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10646 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10647 else
10648 haveit=
10649 for x in $ltrpathdirs; do
10650 if test "X$x" = "X$found_dir"; then
10651 haveit=yes
10652 break
10653 fi
10654 done
10655 if test -z "$haveit"; then
10656 ltrpathdirs="$ltrpathdirs $found_dir"
10657 fi
10658 if test "$hardcode_direct" = yes; then
10659 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10660 else
10661 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10662 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10663 haveit=
10664 for x in $rpathdirs; do
10665 if test "X$x" = "X$found_dir"; then
10666 haveit=yes
10667 break
10668 fi
10669 done
10670 if test -z "$haveit"; then
10671 rpathdirs="$rpathdirs $found_dir"
10672 fi
10673 else
10674 haveit=
10675 for x in $LDFLAGS $LIBMPFR; do
10676
10677 acl_save_prefix="$prefix"
10678 prefix="$acl_final_prefix"
10679 acl_save_exec_prefix="$exec_prefix"
10680 exec_prefix="$acl_final_exec_prefix"
10681 eval x=\"$x\"
10682 exec_prefix="$acl_save_exec_prefix"
10683 prefix="$acl_save_prefix"
10684
10685 if test "X$x" = "X-L$found_dir"; then
10686 haveit=yes
10687 break
10688 fi
10689 done
10690 if test -z "$haveit"; then
10691 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10692 fi
10693 if test "$hardcode_minus_L" != no; then
10694 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10695 else
10696 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10697 fi
10698 fi
10699 fi
10700 fi
10701 else
10702 if test "X$found_a" != "X"; then
10703 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10704 else
10705 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10706 fi
10707 fi
10708 additional_includedir=
10709 case "$found_dir" in
10710 */lib | */lib/)
10711 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10712 additional_includedir="$basedir/include"
10713 ;;
10714 esac
10715 if test "X$additional_includedir" != "X"; then
10716 if test "X$additional_includedir" != "X/usr/include"; then
10717 haveit=
10718 if test "X$additional_includedir" = "X/usr/local/include"; then
10719 if test -n "$GCC"; then
10720 case $host_os in
10721 linux*) haveit=yes;;
10722 esac
10723 fi
10724 fi
10725 if test -z "$haveit"; then
10726 for x in $CPPFLAGS $INCMPFR; do
10727
10728 acl_save_prefix="$prefix"
10729 prefix="$acl_final_prefix"
10730 acl_save_exec_prefix="$exec_prefix"
10731 exec_prefix="$acl_final_exec_prefix"
10732 eval x=\"$x\"
10733 exec_prefix="$acl_save_exec_prefix"
10734 prefix="$acl_save_prefix"
10735
10736 if test "X$x" = "X-I$additional_includedir"; then
10737 haveit=yes
10738 break
10739 fi
10740 done
10741 if test -z "$haveit"; then
10742 if test -d "$additional_includedir"; then
10743 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10744 fi
10745 fi
10746 fi
10747 fi
10748 fi
10749 if test -n "$found_la"; then
10750 save_libdir="$libdir"
10751 case "$found_la" in
10752 */* | *\\*) . "$found_la" ;;
10753 *) . "./$found_la" ;;
10754 esac
10755 libdir="$save_libdir"
10756 for dep in $dependency_libs; do
10757 case "$dep" in
10758 -L*)
10759 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10760 if test "X$additional_libdir" != "X/usr/lib"; then
10761 haveit=
10762 if test "X$additional_libdir" = "X/usr/local/lib"; then
10763 if test -n "$GCC"; then
10764 case $host_os in
10765 linux*) haveit=yes;;
10766 esac
10767 fi
10768 fi
10769 if test -z "$haveit"; then
10770 haveit=
10771 for x in $LDFLAGS $LIBMPFR; do
10772
10773 acl_save_prefix="$prefix"
10774 prefix="$acl_final_prefix"
10775 acl_save_exec_prefix="$exec_prefix"
10776 exec_prefix="$acl_final_exec_prefix"
10777 eval x=\"$x\"
10778 exec_prefix="$acl_save_exec_prefix"
10779 prefix="$acl_save_prefix"
10780
10781 if test "X$x" = "X-L$additional_libdir"; then
10782 haveit=yes
10783 break
10784 fi
10785 done
10786 if test -z "$haveit"; then
10787 if test -d "$additional_libdir"; then
10788 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10789 fi
10790 fi
10791 haveit=
10792 for x in $LDFLAGS $LTLIBMPFR; do
10793
10794 acl_save_prefix="$prefix"
10795 prefix="$acl_final_prefix"
10796 acl_save_exec_prefix="$exec_prefix"
10797 exec_prefix="$acl_final_exec_prefix"
10798 eval x=\"$x\"
10799 exec_prefix="$acl_save_exec_prefix"
10800 prefix="$acl_save_prefix"
10801
10802 if test "X$x" = "X-L$additional_libdir"; then
10803 haveit=yes
10804 break
10805 fi
10806 done
10807 if test -z "$haveit"; then
10808 if test -d "$additional_libdir"; then
10809 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10810 fi
10811 fi
10812 fi
10813 fi
10814 ;;
10815 -R*)
10816 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10817 if test "$enable_rpath" != no; then
10818 haveit=
10819 for x in $rpathdirs; do
10820 if test "X$x" = "X$dir"; then
10821 haveit=yes
10822 break
10823 fi
10824 done
10825 if test -z "$haveit"; then
10826 rpathdirs="$rpathdirs $dir"
10827 fi
10828 haveit=
10829 for x in $ltrpathdirs; do
10830 if test "X$x" = "X$dir"; then
10831 haveit=yes
10832 break
10833 fi
10834 done
10835 if test -z "$haveit"; then
10836 ltrpathdirs="$ltrpathdirs $dir"
10837 fi
10838 fi
10839 ;;
10840 -l*)
10841 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10842 ;;
10843 *.la)
10844 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10845 ;;
10846 *)
10847 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10848 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10849 ;;
10850 esac
10851 done
10852 fi
10853 else
9f1528a1
AB
10854 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10855 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10856 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10857 else
10858 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10859 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10860 fi
2400729e
UW
10861 fi
10862 fi
10863 fi
10864 done
10865 done
10866 if test "X$rpathdirs" != "X"; then
10867 if test -n "$hardcode_libdir_separator"; then
10868 alldirs=
10869 for found_dir in $rpathdirs; do
10870 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10871 done
10872 acl_save_libdir="$libdir"
10873 libdir="$alldirs"
10874 eval flag=\"$hardcode_libdir_flag_spec\"
10875 libdir="$acl_save_libdir"
10876 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10877 else
10878 for found_dir in $rpathdirs; do
10879 acl_save_libdir="$libdir"
10880 libdir="$found_dir"
10881 eval flag=\"$hardcode_libdir_flag_spec\"
10882 libdir="$acl_save_libdir"
10883 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10884 done
10885 fi
10886 fi
10887 if test "X$ltrpathdirs" != "X"; then
10888 for found_dir in $ltrpathdirs; do
10889 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10890 done
10891 fi
10892
10893
10894 ac_save_CPPFLAGS="$CPPFLAGS"
10895
10896 for element in $INCMPFR; do
10897 haveit=
10898 for x in $CPPFLAGS; do
10899
10900 acl_save_prefix="$prefix"
10901 prefix="$acl_final_prefix"
10902 acl_save_exec_prefix="$exec_prefix"
10903 exec_prefix="$acl_final_exec_prefix"
10904 eval x=\"$x\"
10905 exec_prefix="$acl_save_exec_prefix"
10906 prefix="$acl_save_prefix"
10907
10908 if test "X$x" = "X$element"; then
10909 haveit=yes
10910 break
10911 fi
10912 done
10913 if test -z "$haveit"; then
10914 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10915 fi
10916 done
10917
10918
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10920$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10921if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10922 $as_echo_n "(cached) " >&6
10923else
10924
10925 ac_save_LIBS="$LIBS"
10926 LIBS="$LIBS $LIBMPFR"
10927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10928/* end confdefs.h. */
10929#include <mpfr.h>
10930int
10931main ()
10932{
10933mpfr_exp_t exp; mpfr_t x;
10934 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10935 ;
10936 return 0;
10937}
10938_ACEOF
10939if ac_fn_c_try_link "$LINENO"; then :
10940 ac_cv_libmpfr=yes
10941else
10942 ac_cv_libmpfr=no
10943fi
10944rm -f core conftest.err conftest.$ac_objext \
10945 conftest$ac_exeext conftest.$ac_ext
10946 LIBS="$ac_save_LIBS"
10947
10948fi
10949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10950$as_echo "$ac_cv_libmpfr" >&6; }
10951 if test "$ac_cv_libmpfr" = yes; then
10952 HAVE_LIBMPFR=yes
10953
10954$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10955
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10957$as_echo_n "checking how to link with libmpfr... " >&6; }
10958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10959$as_echo "$LIBMPFR" >&6; }
10960 else
10961 HAVE_LIBMPFR=no
10962 CPPFLAGS="$ac_save_CPPFLAGS"
10963 LIBMPFR=
10964 LTLIBMPFR=
10965 fi
10966
10967
10968
10969
10970
10971
10972 if test "$HAVE_LIBMPFR" != yes; then
10973 if test "$with_mpfr" = yes; then
d0ac1c44 10974 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10975 else
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10977$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10978 fi
10979 fi
10980fi
10981
d344e670
DE
10982# --------------------- #
10983# Check for libpython. #
10984# --------------------- #
10985
a9322a30 10986
a9322a30
TT
10987
10988
ec685c5e 10989
0c4a4063 10990
81ecdfbb
RW
10991# Check whether --with-python was given.
10992if test "${with_python+set}" = set; then :
10993 withval=$with_python;
bec39cab 10994else
81ecdfbb 10995 with_python=auto
bec39cab 10996fi
bec39cab 10997
81ecdfbb
RW
10998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10999$as_echo_n "checking whether to use python... " >&6; }
11000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
11001$as_echo "$with_python" >&6; }
9a156167 11002
81ecdfbb
RW
11003if test "${with_python}" = no; then
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11005$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11006 have_libpython=no
bec39cab 11007else
81ecdfbb 11008 case "${with_python}" in
8c85a4e2 11009 [\\/]* | ?:[\\/]*)
0ad6b8ee 11010 if test -d "${with_python}"; then
ec685c5e 11011 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 11012 python_prog="${with_python}/bin/python"
0c4a4063 11013 python_prefix=
9c4ea6c5
JB
11014 # If python does not exit ${with_python}/bin, then try in
11015 # ${with_python}. On Windows/MinGW, this is where the Python
11016 # executable is.
11017 if test ! -x "${python_prog}"; then
11018 python_prog="${with_python}/python"
11019 python_prefix=
11020 fi
e7a30f46 11021 if test ! -x "${python_prog}"; then
ec685c5e
DE
11022 # Fall back to gdb 7.0/7.1 behaviour.
11023 python_prog=missing
0c4a4063 11024 python_prefix=${with_python}
ec685c5e 11025 fi
e7a30f46 11026 elif test -x "${with_python}"; then
ec685c5e
DE
11027 # While we can't run python compiled for $host (unless host == build),
11028 # the user could write a script that provides the needed information,
11029 # so we support that.
ec685c5e 11030 python_prog=${with_python}
0c4a4063 11031 python_prefix=
ec685c5e 11032 else
d0ac1c44 11033 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 11034 fi
81ecdfbb 11035 ;;
ec685c5e
DE
11036 */*)
11037 # Disallow --with-python=foo/bar.
d0ac1c44 11038 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 11039 ;;
ec685c5e
DE
11040 *)
11041 # The user has either specified auto, yes, or the name of the python
11042 # program assumed to be in $PATH.
11043 python_prefix=
11044 case "${with_python}" in
11045 yes | auto)
0ad6b8ee 11046 if test "${build}" = "${host}"; then
ec685c5e
DE
11047 # Extract the first word of "python", so it can be a program name with args.
11048set dummy python; ac_word=$2
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11050$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11051if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
11052 $as_echo_n "(cached) " >&6
11053else
11054 case $python_prog_path in
11055 [\\/]* | ?:[\\/]*)
11056 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11057 ;;
11058 *)
11059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060for as_dir in $PATH
11061do
11062 IFS=$as_save_IFS
11063 test -z "$as_dir" && as_dir=.
11064 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
11066 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068 break 2
11069 fi
11070done
11071 done
11072IFS=$as_save_IFS
11073
11074 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11075 ;;
11076esac
11077fi
11078python_prog_path=$ac_cv_path_python_prog_path
11079if test -n "$python_prog_path"; then
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11081$as_echo "$python_prog_path" >&6; }
11082else
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084$as_echo "no" >&6; }
11085fi
11086
11087
11088 if test "${python_prog_path}" = missing; then
11089 python_prog=missing
11090 else
11091 python_prog=${python_prog_path}
11092 fi
11093 else
11094 # Not much we can do except assume the cross-compiler will find the
11095 # right files.
11096 python_prog=missing
11097 fi
11098 ;;
11099 *)
11100 # While we can't run python compiled for $host (unless host == build),
11101 # the user could write a script that provides the needed information,
11102 # so we support that.
11103 python_prog="${with_python}"
11104 # Extract the first word of "${python_prog}", so it can be a program name with args.
11105set dummy ${python_prog}; ac_word=$2
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11108if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
11109 $as_echo_n "(cached) " >&6
11110else
11111 case $python_prog_path in
11112 [\\/]* | ?:[\\/]*)
11113 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11114 ;;
11115 *)
11116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117for as_dir in $PATH
11118do
11119 IFS=$as_save_IFS
11120 test -z "$as_dir" && as_dir=.
11121 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11122 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
11123 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125 break 2
11126 fi
11127done
11128 done
11129IFS=$as_save_IFS
11130
11131 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11132 ;;
11133esac
11134fi
11135python_prog_path=$ac_cv_path_python_prog_path
11136if test -n "$python_prog_path"; then
11137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11138$as_echo "$python_prog_path" >&6; }
11139else
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11141$as_echo "no" >&6; }
11142fi
11143
11144
11145 if test "${python_prog_path}" = missing; then
5593a99a 11146 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
11147 fi
11148 ;;
11149 esac
81ecdfbb
RW
11150 esac
11151
ec685c5e 11152 if test "${python_prog}" != missing; then
e7a30f46
DE
11153 # We have a python program to use, but it may be too old.
11154 # Don't flag an error for --with-python=auto (the default).
11155 have_python_config=yes
ec685c5e
DE
11156 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11157 if test $? != 0; then
e7a30f46
DE
11158 have_python_config=failed
11159 if test "${with_python}" != auto; then
5593a99a 11160 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 11161 fi
ec685c5e
DE
11162 fi
11163 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11164 if test $? != 0; then
e7a30f46
DE
11165 have_python_config=failed
11166 if test "${with_python}" != auto; then
5593a99a 11167 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 11168 fi
ec685c5e 11169 fi
0c4a4063
DE
11170 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11171 if test $? != 0; then
e7a30f46
DE
11172 have_python_config=failed
11173 if test "${with_python}" != auto; then
5593a99a 11174 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 11175 fi
0c4a4063 11176 fi
ec685c5e 11177 else
ac534cba
JB
11178 # We do not have a python executable we can use to determine where
11179 # to find the Python headers and libs. We cannot guess the include
11180 # path from the python_prefix either, because that include path
11181 # depends on the Python version. So, there is nothing much we can
11182 # do except assume that the compiler will be able to find those files.
11183 python_includes=
11184 python_libs=
0c4a4063 11185 have_python_config=no
ec685c5e 11186 fi
bec39cab 11187
ec685c5e
DE
11188 # If we have python-config, only try the configuration it provides.
11189 # Otherwise fallback on the old way of trying different versions of
11190 # python in turn.
81ecdfbb 11191
ec685c5e
DE
11192 have_libpython=no
11193 if test "${have_python_config}" = yes; then
71737c43 11194
ec685c5e
DE
11195
11196 new_CPPFLAGS=${python_includes}
11197 new_LIBS=${python_libs}
71737c43
CB
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11199$as_echo_n "checking for python... " >&6; }
ec685c5e 11200 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 11201 save_LIBS=$LIBS
ec685c5e 11202 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 11203 LIBS="$new_LIBS $LIBS"
ec685c5e 11204 found_usable_python=no
81ecdfbb 11205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11206/* end confdefs.h. */
ac534cba 11207#include "Python.h"
81ecdfbb
RW
11208int
11209main ()
11210{
11211Py_Initialize ();
11212 ;
11213 return 0;
11214}
bec39cab 11215_ACEOF
81ecdfbb 11216if ac_fn_c_try_link "$LINENO"; then :
71737c43 11217 have_libpython=yes
ec685c5e 11218 found_usable_python=yes
ac534cba
JB
11219 PYTHON_CPPFLAGS=$new_CPPFLAGS
11220 PYTHON_LIBS=$new_LIBS
9a156167 11221fi
81ecdfbb
RW
11222rm -f core conftest.err conftest.$ac_objext \
11223 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11224 CPPFLAGS=$save_CPPFLAGS
11225 LIBS=$save_LIBS
ec685c5e
DE
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11227$as_echo "${found_usable_python}" >&6; }
9a156167 11228
e7a30f46 11229 elif test "${have_python_config}" != failed; then
ec685c5e 11230 if test "${have_libpython}" = no; then
9a156167 11231
420697bb
TT
11232
11233 new_CPPFLAGS=${python_includes}
bf27f0e2 11234 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11236$as_echo_n "checking for python... " >&6; }
420697bb
TT
11237 save_CPPFLAGS=$CPPFLAGS
11238 save_LIBS=$LIBS
11239 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 11240 LIBS="$new_LIBS $LIBS"
420697bb
TT
11241 found_usable_python=no
11242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11243/* end confdefs.h. */
ac534cba 11244#include "Python.h"
420697bb
TT
11245int
11246main ()
11247{
11248Py_Initialize ();
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253if ac_fn_c_try_link "$LINENO"; then :
71737c43 11254 have_libpython=yes
420697bb 11255 found_usable_python=yes
ac534cba
JB
11256 PYTHON_CPPFLAGS=$new_CPPFLAGS
11257 PYTHON_LIBS=$new_LIBS
420697bb
TT
11258fi
11259rm -f core conftest.err conftest.$ac_objext \
11260 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11261 CPPFLAGS=$save_CPPFLAGS
11262 LIBS=$save_LIBS
420697bb
TT
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11264$as_echo "${found_usable_python}" >&6; }
11265
11266 fi
11267 if test "${have_libpython}" = no; then
11268
ec685c5e
DE
11269
11270 new_CPPFLAGS=${python_includes}
bf27f0e2 11271 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11273$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
11274 save_CPPFLAGS=$CPPFLAGS
11275 save_LIBS=$LIBS
11276 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 11277 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
11278 found_usable_python=no
11279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11280/* end confdefs.h. */
ac534cba 11281#include "Python.h"
ec685c5e
DE
11282int
11283main ()
11284{
11285Py_Initialize ();
11286 ;
11287 return 0;
11288}
11289_ACEOF
11290if ac_fn_c_try_link "$LINENO"; then :
71737c43 11291 have_libpython=yes
ec685c5e 11292 found_usable_python=yes
ac534cba
JB
11293 PYTHON_CPPFLAGS=$new_CPPFLAGS
11294 PYTHON_LIBS=$new_LIBS
ec685c5e 11295fi
81ecdfbb
RW
11296rm -f core conftest.err conftest.$ac_objext \
11297 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
11298 CPPFLAGS=$save_CPPFLAGS
11299 LIBS=$save_LIBS
ec685c5e
DE
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11301$as_echo "${found_usable_python}" >&6; }
81ecdfbb 11302
ec685c5e
DE
11303 fi
11304 fi
ec685c5e
DE
11305
11306 if test "${have_libpython}" = no; then
81ecdfbb
RW
11307 case "${with_python}" in
11308 yes)
d0ac1c44 11309 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
11310 ;;
11311 auto)
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11313$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11314 ;;
11315 *)
d0ac1c44 11316 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
11317 ;;
11318 esac
0c4a4063
DE
11319 else
11320 if test -n "${python_prefix}"; then
11321
11322cat >>confdefs.h <<_ACEOF
11323#define WITH_PYTHON_PATH "${python_prefix}"
11324_ACEOF
11325
11326
11327 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11328 if test "x$prefix" = xNONE; then
11329 test_prefix=/usr/local
11330 else
11331 test_prefix=$prefix
11332 fi
11333 else
11334 test_prefix=$exec_prefix
11335 fi
11336 value=0
11337 case ${python_prefix} in
11338 "${test_prefix}"|"${test_prefix}/"*|\
11339 '${exec_prefix}'|'${exec_prefix}/'*)
11340 value=1
11341 ;;
11342 esac
11343
11344cat >>confdefs.h <<_ACEOF
11345#define PYTHON_PATH_RELOCATABLE $value
11346_ACEOF
11347
11348
11349 fi
81ecdfbb 11350 fi
436868fb 11351fi
436868fb 11352
d13c7322
AB
11353
11354# Check whether --with-python-libdir was given.
11355if test "${with_python_libdir+set}" = set; then :
11356 withval=$with_python_libdir;
11357else
11358
11359 # If no python libdir is specified then select one based on
11360 # python's prefix path.
11361 if test -n "${python_prefix}"; then
11362 with_python_libdir=${python_prefix}/lib
11363 fi
11364
11365fi
11366
11367
ec685c5e 11368if test "${have_libpython}" != no; then
436868fb 11369
81ecdfbb 11370$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 11371
81ecdfbb
RW
11372 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11373 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11374 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 11375 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 11376 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 11377
d13c7322
AB
11378 if test -n "${with_python_libdir}"; then
11379
11380cat >>confdefs.h <<_ACEOF
11381#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
11382_ACEOF
11383
11384
11385 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11386 if test "x$prefix" = xNONE; then
11387 test_prefix=/usr/local
11388 else
11389 test_prefix=$prefix
11390 fi
11391 else
11392 test_prefix=$exec_prefix
11393 fi
11394 value=0
11395 case ${with_python_libdir} in
11396 "${test_prefix}"|"${test_prefix}/"*|\
11397 '${exec_prefix}'|'${exec_prefix}/'*)
11398 value=1
11399 ;;
11400 esac
11401
11402cat >>confdefs.h <<_ACEOF
11403#define PYTHON_LIBDIR_RELOCATABLE $value
11404_ACEOF
11405
11406
11407 fi
11408
81ecdfbb
RW
11409 # Flags needed to compile Python code (taken from python-config --cflags).
11410 # We cannot call python-config directly because it will output whatever was
11411 # used when compiling the Python interpreter itself, including flags which
11412 # would make the python-related objects be compiled differently from the
11413 # rest of GDB (e.g., -O2 and -fPIC).
11414 if test "${GCC}" = yes; then
ae292b3a
TT
11415 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11416 # Python headers recommend -DNDEBUG, but it's unclear if that just
11417 # refers to building Python itself. In release mode, though, it
11418 # doesn't hurt for the Python code in gdb to follow.
11419 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 11420 fi
436868fb 11421
81ecdfbb
RW
11422 if test "x${tentative_python_cflags}" != x; then
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11424$as_echo_n "checking compiler flags for python code... " >&6; }
11425 for flag in ${tentative_python_cflags}; do
11426 # Check that the compiler accepts it
11427 saved_CFLAGS="$CFLAGS"
11428 CFLAGS="$CFLAGS $flag"
11429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11430/* end confdefs.h. */
81ecdfbb 11431
a9322a30
TT
11432int
11433main ()
11434{
a9322a30
TT
11435
11436 ;
11437 return 0;
11438}
bec39cab 11439_ACEOF
81ecdfbb
RW
11440if ac_fn_c_try_compile "$LINENO"; then :
11441 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 11442fi
81ecdfbb
RW
11443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11444 CFLAGS="$saved_CFLAGS"
11445 done
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11447$as_echo "${PYTHON_CFLAGS}" >&6; }
11448 fi
043b6510 11449
c83393b9
JB
11450 # On x64 Windows, Python's include headers, and pyconfig.h in
11451 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11452 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11453 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11454 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11455 # The issue was reported to the Python community, but still isn't
11456 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11457
043b6510 11458 case "$gdb_host" in
c83393b9
JB
11459 mingw64)
11460 if test "${GCC}" = yes; then
11461 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11462 fi
11463 ;;
043b6510 11464 esac
81ecdfbb 11465else
6dddc817
DE
11466 # Even if Python support is not compiled in, we need to have this file
11467 # included so that the "python" command, et.al., still exists.
8fd8d003 11468 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 11469 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 11470fi
9a156167 11471
a4a1c157
PA
11472# Work around Python http://bugs.python.org/issue10112. See also
11473# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11474# no effect. Note that the only test after this that uses Python is
11475# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11476# run without -export-dynamic too.
11477PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11478
11479
ed3ef339
DE
11480
11481
4df42755
DE
11482 if test "${have_libpython}" != no; then
11483 HAVE_PYTHON_TRUE=
11484 HAVE_PYTHON_FALSE='#'
11485else
11486 HAVE_PYTHON_TRUE='#'
11487 HAVE_PYTHON_FALSE=
11488fi
11489
ed3ef339
DE
11490
11491# -------------------- #
11492# Check for libguile. #
11493# -------------------- #
11494
11495
e1402065
DE
11496
11497
11498
11499
11500# Check whether --with-guile was given.
11501if test "${with_guile+set}" = set; then :
11502 withval=$with_guile;
11503else
11504 with_guile=auto
11505fi
11506
11507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11508$as_echo_n "checking whether to use guile... " >&6; }
11509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11510$as_echo "$with_guile" >&6; }
11511
ed3ef339
DE
11512# Extract the first word of "pkg-config", so it can be a program name with args.
11513set dummy pkg-config; ac_word=$2
11514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11515$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11516if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
11517 $as_echo_n "(cached) " >&6
11518else
11519 case $pkg_config_prog_path in
11520 [\\/]* | ?:[\\/]*)
11521 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11522 ;;
11523 *)
11524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11525for as_dir in $PATH
11526do
11527 IFS=$as_save_IFS
11528 test -z "$as_dir" && as_dir=.
11529 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
11531 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11533 break 2
11534 fi
11535done
11536 done
11537IFS=$as_save_IFS
11538
11539 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11540 ;;
11541esac
11542fi
11543pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11544if test -n "$pkg_config_prog_path"; then
11545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11546$as_echo "$pkg_config_prog_path" >&6; }
11547else
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11549$as_echo "no" >&6; }
11550fi
11551
11552
11553
ae5369e7 11554try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
ed3ef339
DE
11555have_libguile=no
11556case "${with_guile}" in
11557no)
11558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11559$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11560 ;;
11561auto)
e1402065
DE
11562 if test "${pkg_config_prog_path}" = "missing"; then
11563 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11564$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11565 else
ed3ef339
DE
11566
11567 pkg_config=${pkg_config_prog_path}
11568 guile_version_list=${try_guile_versions}
11569 flag_errors=no
11570
ed3ef339
DE
11571 found_usable_guile=checking
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11573$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11574 for guile_version in ${guile_version_list}; do
11575 ${pkg_config} --exists ${guile_version} 2>/dev/null
11576 if test $? != 0; then
11577 continue
11578 fi
11579 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11580 if test $? != 0; then
d0ac1c44 11581 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11582 fi
11583 new_LIBS=`${pkg_config} --libs ${guile_version}`
11584 if test $? != 0; then
d0ac1c44 11585 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11586 fi
11587 found_usable_guile=${guile_version}
11588 break
11589 done
11590 if test "${found_usable_guile}" = "checking"; then
11591 if test "${flag_errors}" = "yes"; then
d0ac1c44 11592 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11593 else
11594 found_usable_guile=no
11595 fi
11596 fi
11597 if test "${found_usable_guile}" != no; then
11598 save_CPPFLAGS=$CPPFLAGS
11599 save_LIBS=$LIBS
11600 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11601 LIBS="$LIBS $new_LIBS"
11602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11603/* end confdefs.h. */
11604#include "libguile.h"
11605int
11606main ()
11607{
11608scm_init_guile ();
11609 ;
11610 return 0;
11611}
11612_ACEOF
11613if ac_fn_c_try_link "$LINENO"; then :
11614 have_libguile=yes
11615 GUILE_CPPFLAGS=$new_CPPFLAGS
11616 GUILE_LIBS=$new_LIBS
11617else
11618 found_usable_guile=no
11619fi
11620rm -f core conftest.err conftest.$ac_objext \
11621 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11622 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11623if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11624
11625$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11626
11627
11628fi
11629
ed3ef339
DE
11630 CPPFLAGS=$save_CPPFLAGS
11631 LIBS=$save_LIBS
11632 if test "${found_usable_guile}" = no; then
11633 if test "${flag_errors}" = yes; then
11634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11636as_fn_error $? "linking guile version ${guile_version} test program failed
11637See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11638 fi
11639 fi
11640 fi
11641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11642$as_echo "${found_usable_guile}" >&6; }
11643
e1402065 11644 fi
ed3ef339
DE
11645 ;;
11646yes)
e1402065 11647 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11648 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11649 fi
ed3ef339
DE
11650
11651 pkg_config=${pkg_config_prog_path}
11652 guile_version_list=${try_guile_versions}
11653 flag_errors=yes
11654
ed3ef339
DE
11655 found_usable_guile=checking
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11657$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11658 for guile_version in ${guile_version_list}; do
11659 ${pkg_config} --exists ${guile_version} 2>/dev/null
11660 if test $? != 0; then
11661 continue
11662 fi
11663 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11664 if test $? != 0; then
d0ac1c44 11665 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11666 fi
11667 new_LIBS=`${pkg_config} --libs ${guile_version}`
11668 if test $? != 0; then
d0ac1c44 11669 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11670 fi
11671 found_usable_guile=${guile_version}
11672 break
11673 done
11674 if test "${found_usable_guile}" = "checking"; then
11675 if test "${flag_errors}" = "yes"; then
d0ac1c44 11676 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11677 else
11678 found_usable_guile=no
11679 fi
11680 fi
11681 if test "${found_usable_guile}" != no; then
11682 save_CPPFLAGS=$CPPFLAGS
11683 save_LIBS=$LIBS
11684 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11685 LIBS="$LIBS $new_LIBS"
11686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11687/* end confdefs.h. */
11688#include "libguile.h"
11689int
11690main ()
11691{
11692scm_init_guile ();
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697if ac_fn_c_try_link "$LINENO"; then :
11698 have_libguile=yes
11699 GUILE_CPPFLAGS=$new_CPPFLAGS
11700 GUILE_LIBS=$new_LIBS
11701else
11702 found_usable_guile=no
11703fi
11704rm -f core conftest.err conftest.$ac_objext \
11705 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11706 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11707if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11708
11709$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11710
11711
11712fi
11713
ed3ef339
DE
11714 CPPFLAGS=$save_CPPFLAGS
11715 LIBS=$save_LIBS
11716 if test "${found_usable_guile}" = no; then
11717 if test "${flag_errors}" = yes; then
11718 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11720as_fn_error $? "linking guile version ${guile_version} test program failed
11721See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11722 fi
11723 fi
11724 fi
11725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11726$as_echo "${found_usable_guile}" >&6; }
11727
11728 ;;
11729[\\/]* | ?:[\\/]*)
e1402065 11730 if test -x "${with_guile}"; then
ed3ef339
DE
11731
11732 pkg_config=${with_guile}
11733 guile_version_list=${try_guile_versions}
11734 flag_errors=yes
11735
ed3ef339
DE
11736 found_usable_guile=checking
11737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11738$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11739 for guile_version in ${guile_version_list}; do
11740 ${pkg_config} --exists ${guile_version} 2>/dev/null
11741 if test $? != 0; then
11742 continue
11743 fi
11744 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11745 if test $? != 0; then
d0ac1c44 11746 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11747 fi
11748 new_LIBS=`${pkg_config} --libs ${guile_version}`
11749 if test $? != 0; then
d0ac1c44 11750 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11751 fi
11752 found_usable_guile=${guile_version}
11753 break
11754 done
11755 if test "${found_usable_guile}" = "checking"; then
11756 if test "${flag_errors}" = "yes"; then
d0ac1c44 11757 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11758 else
11759 found_usable_guile=no
11760 fi
11761 fi
11762 if test "${found_usable_guile}" != no; then
11763 save_CPPFLAGS=$CPPFLAGS
11764 save_LIBS=$LIBS
11765 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11766 LIBS="$LIBS $new_LIBS"
11767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11768/* end confdefs.h. */
11769#include "libguile.h"
11770int
11771main ()
11772{
11773scm_init_guile ();
11774 ;
11775 return 0;
11776}
11777_ACEOF
11778if ac_fn_c_try_link "$LINENO"; then :
11779 have_libguile=yes
11780 GUILE_CPPFLAGS=$new_CPPFLAGS
11781 GUILE_LIBS=$new_LIBS
11782else
11783 found_usable_guile=no
11784fi
11785rm -f core conftest.err conftest.$ac_objext \
11786 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11787 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11788if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11789
11790$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11791
11792
11793fi
11794
ed3ef339
DE
11795 CPPFLAGS=$save_CPPFLAGS
11796 LIBS=$save_LIBS
11797 if test "${found_usable_guile}" = no; then
11798 if test "${flag_errors}" = yes; then
11799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11801as_fn_error $? "linking guile version ${guile_version} test program failed
11802See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11803 fi
11804 fi
11805 fi
11806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11807$as_echo "${found_usable_guile}" >&6; }
11808
e1402065 11809 else
d0ac1c44 11810 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11811 fi
ed3ef339
DE
11812 ;;
11813"" | */*)
11814 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11815 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11816 ;;
11817*)
11818 # A space separate list of guile versions to try, in order.
e1402065 11819 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11820 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11821 fi
ed3ef339
DE
11822
11823 pkg_config=${pkg_config_prog_path}
11824 guile_version_list=${with_guile}
11825 flag_errors=yes
11826
ed3ef339
DE
11827 found_usable_guile=checking
11828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11829$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11830 for guile_version in ${guile_version_list}; do
11831 ${pkg_config} --exists ${guile_version} 2>/dev/null
11832 if test $? != 0; then
11833 continue
11834 fi
11835 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11836 if test $? != 0; then
d0ac1c44 11837 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11838 fi
11839 new_LIBS=`${pkg_config} --libs ${guile_version}`
11840 if test $? != 0; then
d0ac1c44 11841 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11842 fi
11843 found_usable_guile=${guile_version}
11844 break
11845 done
11846 if test "${found_usable_guile}" = "checking"; then
11847 if test "${flag_errors}" = "yes"; then
d0ac1c44 11848 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11849 else
11850 found_usable_guile=no
11851 fi
11852 fi
11853 if test "${found_usable_guile}" != no; then
11854 save_CPPFLAGS=$CPPFLAGS
11855 save_LIBS=$LIBS
11856 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11857 LIBS="$LIBS $new_LIBS"
11858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11859/* end confdefs.h. */
11860#include "libguile.h"
11861int
11862main ()
11863{
11864scm_init_guile ();
11865 ;
11866 return 0;
11867}
11868_ACEOF
11869if ac_fn_c_try_link "$LINENO"; then :
11870 have_libguile=yes
11871 GUILE_CPPFLAGS=$new_CPPFLAGS
11872 GUILE_LIBS=$new_LIBS
11873else
11874 found_usable_guile=no
11875fi
11876rm -f core conftest.err conftest.$ac_objext \
11877 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11878 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11879if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11880
11881$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11882
11883
11884fi
11885
ed3ef339
DE
11886 CPPFLAGS=$save_CPPFLAGS
11887 LIBS=$save_LIBS
11888 if test "${found_usable_guile}" = no; then
11889 if test "${flag_errors}" = yes; then
11890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11892as_fn_error $? "linking guile version ${guile_version} test program failed
11893See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11894 fi
11895 fi
11896 fi
11897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11898$as_echo "${found_usable_guile}" >&6; }
11899
11900 ;;
11901esac
11902
e76c5d17 11903if test "${have_libguile}" != no; then
d342a0da
DE
11904 case "${with_guile}" in
11905 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11906
11907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11908$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11909if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11910 $as_echo_n "(cached) " >&6
11911else
d342a0da 11912 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11913
11914 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11915 # the 'guild' and 'bindir' variables. In that case, try to guess
11916 # what the program name is, at the risk of getting it wrong if
11917 # Guile was configured with '--program-suffix' or similar.
11918 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11919 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11920 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11921 fi
11922
11923fi
11924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11925$as_echo "$ac_cv_guild_program_name" >&6; }
11926
11927 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11928 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11929 fi
11930
11931 GUILD="$ac_cv_guild_program_name"
11932
11933
d342a0da
DE
11934 ;;
11935 *)
11936
11937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11938$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11939if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11940 $as_echo_n "(cached) " >&6
11941else
11942 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11943
11944 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11945 # the 'guild' and 'bindir' variables. In that case, try to guess
11946 # what the program name is, at the risk of getting it wrong if
11947 # Guile was configured with '--program-suffix' or similar.
11948 if test "x$ac_cv_guild_program_name" = "x"; then
11949 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11950 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11951 fi
11952
11953fi
11954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11955$as_echo "$ac_cv_guild_program_name" >&6; }
11956
11957 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11958 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11959 fi
11960
11961 GUILD="$ac_cv_guild_program_name"
11962
11963
11964 ;;
11965 esac
e76c5d17
DE
11966
11967
11968 if test "$cross_compiling" = no; then
11969 GUILD_TARGET_FLAG=
11970 else
11971 GUILD_TARGET_FLAG="--target=$host"
11972 fi
11973
11974
11975
11976
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11978$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11979if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11980 $as_echo_n "(cached) " >&6
11981else
11982 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11983 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11984 ac_cv_guild_ok=yes
11985 else
11986 ac_cv_guild_ok=no
11987 fi
11988fi
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11990$as_echo "$ac_cv_guild_ok" >&6; }
11991
11992 if test "$ac_cv_guild_ok" = no; then
11993 have_libguile=no
11994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11995$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11996 fi
11997fi
11998
ed3ef339
DE
11999if test "${have_libguile}" != no; then
12000
12001$as_echo "#define HAVE_GUILE 1" >>confdefs.h
12002
12003 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
12004 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
12005 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
12006 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
12007 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
12008
12009 save_LIBS="$LIBS"
12010 save_CPPFLAGS="$CPPFLAGS"
12011 LIBS="$GUILE_LIBS"
12012 CPPFLAGS="$GUILE_CPPFLAGS"
12013 for ac_func in scm_new_smob
12014do :
12015 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 12016if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
12017 cat >>confdefs.h <<_ACEOF
12018#define HAVE_SCM_NEW_SMOB 1
12019_ACEOF
12020
12021fi
12022done
12023
12024 LIBS="$save_LIBS"
12025 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
12026else
12027 # Even if Guile support is not compiled in, we need to have these files
12028 # included.
bd810fff 12029 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
12030 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
12031fi
9a156167 12032
ac534cba 12033
4df42755
DE
12034 if test "${have_libguile}" != no; then
12035 HAVE_GUILE_TRUE=
12036 HAVE_GUILE_FALSE='#'
12037else
12038 HAVE_GUILE_TRUE='#'
12039 HAVE_GUILE_FALSE=
12040fi
12041
ac534cba 12042
62f29fda
TT
12043# ---------------------------- #
12044# Check for source highlight. #
12045# ---------------------------- #
12046
12047SRCHIGH_LIBS=
12048SRCHIGH_CFLAGS=
189b8c2e
ST
12049
12050# Check whether --enable-source-highlight was given.
12051if test "${enable_source_highlight+set}" = set; then :
12052 enableval=$enable_source_highlight; case "${enableval}" in
12053 yes) enable_source_highlight=yes ;;
12054 no) enable_source_highlight=no ;;
12055 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
12056esac
12057else
12058 enable_source_highlight=auto
12059fi
12060
12061
12062if test "${enable_source_highlight}" != "no"; then
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 12064$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
12065 if test "${pkg_config_prog_path}" = "missing"; then
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 12067$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
12068 if test "${enable_source_highlight}" = "yes"; then
12069 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
12070 fi
12071 else
12072 if ${pkg_config_prog_path} --exists source-highlight; then
0455b7d3
BE
12073 case "$LDFLAGS" in
12074 *static-libstdc*)
12075 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
12076 ;;
12077 esac
12078
62f29fda
TT
12079 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
12080 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
12081
12082$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
12083
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12085$as_echo "yes" >&6; }
189b8c2e 12086 else
62f29fda
TT
12087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12088$as_echo "no" >&6; }
189b8c2e
ST
12089 if test "${enable_source_highlight}" = "yes"; then
12090 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
12091 fi
12092 fi
12093 fi
62f29fda
TT
12094fi
12095
12096
12097
05ea2a05
TT
12098# ------------------------- #
12099# Checks for header files. #
12100# ------------------------- #
58bfce93 12101
05ea2a05
TT
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12103$as_echo_n "checking for ANSI C header files... " >&6; }
12104if ${ac_cv_header_stdc+:} false; then :
12105 $as_echo_n "(cached) " >&6
58bfce93 12106else
5599c404
MM
12107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12108/* end confdefs.h. */
05ea2a05
TT
12109#include <stdlib.h>
12110#include <stdarg.h>
12111#include <string.h>
12112#include <float.h>
5599c404 12113
05ea2a05
TT
12114int
12115main ()
12116{
5599c404 12117
05ea2a05
TT
12118 ;
12119 return 0;
12120}
5599c404 12121_ACEOF
05ea2a05
TT
12122if ac_fn_c_try_compile "$LINENO"; then :
12123 ac_cv_header_stdc=yes
5599c404 12124else
05ea2a05 12125 ac_cv_header_stdc=no
5599c404 12126fi
05ea2a05 12127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 12128
05ea2a05
TT
12129if test $ac_cv_header_stdc = yes; then
12130 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12132/* end confdefs.h. */
12133#include <string.h>
58bfce93 12134
05ea2a05
TT
12135_ACEOF
12136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12137 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 12138
05ea2a05
TT
12139else
12140 ac_cv_header_stdc=no
12141fi
12142rm -f conftest*
58bfce93 12143
05ea2a05 12144fi
58bfce93 12145
05ea2a05
TT
12146if test $ac_cv_header_stdc = yes; then
12147 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12149/* end confdefs.h. */
12150#include <stdlib.h>
58bfce93 12151
05ea2a05
TT
12152_ACEOF
12153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12154 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 12155
05ea2a05
TT
12156else
12157 ac_cv_header_stdc=no
12158fi
12159rm -f conftest*
58bfce93 12160
05ea2a05 12161fi
58bfce93 12162
05ea2a05
TT
12163if test $ac_cv_header_stdc = yes; then
12164 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12165 if test "$cross_compiling" = yes; then :
12166 :
12167else
12168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12169/* end confdefs.h. */
12170#include <ctype.h>
12171#include <stdlib.h>
12172#if ((' ' & 0x0FF) == 0x020)
12173# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12174# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12175#else
12176# define ISLOWER(c) \
12177 (('a' <= (c) && (c) <= 'i') \
12178 || ('j' <= (c) && (c) <= 'r') \
12179 || ('s' <= (c) && (c) <= 'z'))
12180# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12181#endif
58bfce93 12182
05ea2a05
TT
12183#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12184int
12185main ()
12186{
12187 int i;
12188 for (i = 0; i < 256; i++)
12189 if (XOR (islower (i), ISLOWER (i))
12190 || toupper (i) != TOUPPER (i))
12191 return 2;
12192 return 0;
12193}
12194_ACEOF
12195if ac_fn_c_try_run "$LINENO"; then :
58bfce93 12196
05ea2a05
TT
12197else
12198 ac_cv_header_stdc=no
12199fi
12200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12201 conftest.$ac_objext conftest.beam conftest.$ac_ext
12202fi
58bfce93 12203
05ea2a05
TT
12204fi
12205fi
12206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12207$as_echo "$ac_cv_header_stdc" >&6; }
12208if test $ac_cv_header_stdc = yes; then
58bfce93 12209
05ea2a05 12210$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 12211
05ea2a05 12212fi
58bfce93 12213
05ea2a05 12214# elf_hp.h is for HP/UX 64-bit shared library support.
8ae8e197 12215for ac_header in nlist.h machine/reg.h \
05ea2a05
TT
12216 thread_db.h \
12217 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12218 sys/resource.h sys/ptrace.h ptrace.h \
8ae8e197 12219 sys/reg.h sys/debugreg.h \
05ea2a05
TT
12220 termios.h elf_hp.h
12221do :
12222 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12223ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12224if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12225 cat >>confdefs.h <<_ACEOF
12226#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12227_ACEOF
58bfce93
MM
12228
12229fi
12230
05ea2a05 12231done
58bfce93 12232
05ea2a05
TT
12233for ac_header in sys/user.h
12234do :
12235 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12236# include <sys/param.h>
12237#endif
58bfce93 12238
05ea2a05
TT
12239"
12240if test "x$ac_cv_header_sys_user_h" = xyes; then :
12241 cat >>confdefs.h <<_ACEOF
12242#define HAVE_SYS_USER_H 1
12243_ACEOF
58bfce93 12244
05ea2a05 12245fi
58bfce93 12246
05ea2a05 12247done
58bfce93 12248
58bfce93 12249
05ea2a05
TT
12250for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12251do :
12252 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12253ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12254if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12255 cat >>confdefs.h <<_ACEOF
12256#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12257_ACEOF
58bfce93 12258
05ea2a05 12259fi
58bfce93 12260
05ea2a05 12261done
58bfce93 12262
05ea2a05
TT
12263for ac_header in term.h
12264do :
12265 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12266# include <curses.h>
12267#endif
58bfce93 12268
05ea2a05
TT
12269"
12270if test "x$ac_cv_header_term_h" = xyes; then :
12271 cat >>confdefs.h <<_ACEOF
12272#define HAVE_TERM_H 1
12273_ACEOF
58bfce93 12274
05ea2a05 12275fi
58bfce93 12276
05ea2a05 12277done
58bfce93 12278
58bfce93 12279
95420d30 12280for ac_header in sys/socket.h
05a6b8c2 12281do :
95420d30
TV
12282 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12283if test "x$ac_cv_header_sys_socket_h" = xyes; then :
05a6b8c2 12284 cat >>confdefs.h <<_ACEOF
95420d30 12285#define HAVE_SYS_SOCKET_H 1
05a6b8c2
EZ
12286_ACEOF
12287
12288fi
12289
12290done
12291
12292for ac_header in ws2tcpip.h
12293do :
12294 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
12295if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
12296 cat >>confdefs.h <<_ACEOF
12297#define HAVE_WS2TCPIP_H 1
12298_ACEOF
12299
12300fi
12301
12302done
12303
12304
05ea2a05
TT
12305# ------------------------- #
12306# Checks for declarations. #
12307# ------------------------- #
58bfce93 12308
58bfce93 12309
05ea2a05
TT
12310 # Check for presence and size of long long.
12311 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12312if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 12313
05ea2a05
TT
12314cat >>confdefs.h <<_ACEOF
12315#define HAVE_LONG_LONG 1
12316_ACEOF
12317
12318# The cast to long int works around a bug in the HP C Compiler
12319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12321# This bug is HP SR number 8606223364.
12322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12323$as_echo_n "checking size of long long... " >&6; }
12324if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
12325 $as_echo_n "(cached) " >&6
12326else
05ea2a05 12327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 12328
58bfce93 12329else
05ea2a05
TT
12330 if test "$ac_cv_type_long_long" = yes; then
12331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12333as_fn_error 77 "cannot compute sizeof (long long)
12334See \`config.log' for more details" "$LINENO" 5; }
12335 else
12336 ac_cv_sizeof_long_long=0
12337 fi
58bfce93 12338fi
58bfce93
MM
12339
12340fi
05ea2a05
TT
12341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12342$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 12343
58bfce93 12344
58bfce93 12345
05ea2a05
TT
12346cat >>confdefs.h <<_ACEOF
12347#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12348_ACEOF
58bfce93
MM
12349
12350
05ea2a05 12351fi
58bfce93
MM
12352
12353
05ea2a05
TT
12354 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12355ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12356if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12357 ac_have_decl=1
12358else
12359 ac_have_decl=0
12360fi
58bfce93 12361
05ea2a05
TT
12362cat >>confdefs.h <<_ACEOF
12363#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 12364_ACEOF
05ea2a05
TT
12365ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12366if test "x$ac_cv_have_decl_ffs" = xyes; then :
12367 ac_have_decl=1
12368else
12369 ac_have_decl=0
c56ccc05 12370fi
c56ccc05
MM
12371
12372cat >>confdefs.h <<_ACEOF
05ea2a05 12373#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 12374_ACEOF
05ea2a05
TT
12375ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12376if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12377 ac_have_decl=1
12378else
12379 ac_have_decl=0
c56ccc05 12380fi
c56ccc05
MM
12381
12382cat >>confdefs.h <<_ACEOF
05ea2a05 12383#define HAVE_DECL_ASPRINTF $ac_have_decl
c56ccc05 12384_ACEOF
05ea2a05
TT
12385ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12386if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12387 ac_have_decl=1
12388else
12389 ac_have_decl=0
12390fi
c56ccc05 12391
05ea2a05
TT
12392cat >>confdefs.h <<_ACEOF
12393#define HAVE_DECL_VASPRINTF $ac_have_decl
12394_ACEOF
12395ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12396if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12397 ac_have_decl=1
12398else
12399 ac_have_decl=0
c56ccc05
MM
12400fi
12401
05ea2a05
TT
12402cat >>confdefs.h <<_ACEOF
12403#define HAVE_DECL_SNPRINTF $ac_have_decl
12404_ACEOF
12405ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12406if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12407 ac_have_decl=1
12408else
12409 ac_have_decl=0
58bfce93
MM
12410fi
12411
05ea2a05
TT
12412cat >>confdefs.h <<_ACEOF
12413#define HAVE_DECL_VSNPRINTF $ac_have_decl
12414_ACEOF
c890192f 12415
05ea2a05
TT
12416 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12417if test "x$ac_cv_have_decl_strtol" = xyes; then :
12418 ac_have_decl=1
bec39cab 12419else
05ea2a05
TT
12420 ac_have_decl=0
12421fi
81ecdfbb 12422
05ea2a05
TT
12423cat >>confdefs.h <<_ACEOF
12424#define HAVE_DECL_STRTOL $ac_have_decl
12425_ACEOF
12426ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12427if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12428 ac_have_decl=1
12429else
12430 ac_have_decl=0
12431fi
a9322a30 12432
05ea2a05
TT
12433cat >>confdefs.h <<_ACEOF
12434#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 12435_ACEOF
05ea2a05
TT
12436ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12437if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12438 ac_have_decl=1
bec39cab 12439else
05ea2a05 12440 ac_have_decl=0
a9322a30 12441fi
bec39cab 12442
05ea2a05
TT
12443cat >>confdefs.h <<_ACEOF
12444#define HAVE_DECL_STRTOLL $ac_have_decl
12445_ACEOF
12446ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12447if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12448 ac_have_decl=1
12449else
12450 ac_have_decl=0
12451fi
bec39cab 12452
05ea2a05
TT
12453cat >>confdefs.h <<_ACEOF
12454#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 12455_ACEOF
bec39cab 12456
05ea2a05
TT
12457 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12458if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12459 ac_have_decl=1
bec39cab 12460else
05ea2a05 12461 ac_have_decl=0
81ecdfbb 12462fi
81ecdfbb 12463
05ea2a05
TT
12464cat >>confdefs.h <<_ACEOF
12465#define HAVE_DECL_STRVERSCMP $ac_have_decl
12466_ACEOF
81ecdfbb 12467
81ecdfbb 12468
06825bd1 12469
05ea2a05
TT
12470ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12471if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12472 ac_have_decl=1
81ecdfbb 12473else
05ea2a05 12474 ac_have_decl=0
81ecdfbb 12475fi
bec39cab 12476
05ea2a05
TT
12477cat >>confdefs.h <<_ACEOF
12478#define HAVE_DECL_SNPRINTF $ac_have_decl
12479_ACEOF
81ecdfbb 12480
05ea2a05
TT
12481
12482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12483$as_echo_n "checking for LC_MESSAGES... " >&6; }
12484if ${am_cv_val_LC_MESSAGES+:} false; then :
12485 $as_echo_n "(cached) " >&6
bec39cab 12486else
81ecdfbb 12487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12488/* end confdefs.h. */
05ea2a05 12489#include <locale.h>
a9322a30
TT
12490int
12491main ()
12492{
05ea2a05
TT
12493return LC_MESSAGES
12494 ;
a9322a30
TT
12495 return 0;
12496}
bec39cab 12497_ACEOF
05ea2a05
TT
12498if ac_fn_c_try_link "$LINENO"; then :
12499 am_cv_val_LC_MESSAGES=yes
bec39cab 12500else
05ea2a05 12501 am_cv_val_LC_MESSAGES=no
81ecdfbb 12502fi
05ea2a05
TT
12503rm -f core conftest.err conftest.$ac_objext \
12504 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12505fi
05ea2a05
TT
12506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12507$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12508 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12509
05ea2a05 12510$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 12511
05ea2a05 12512 fi
5ee754fc 12513
bec39cab 12514
05ea2a05
TT
12515# ------------------ #
12516# Checks for types. #
12517# ------------------ #
12518
12519ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
05a6b8c2
EZ
12520#if HAVE_SYS_SOCKET_H
12521# include <sys/socket.h>
12522#elif HAVE_WS2TCPIP_H
12523# include <ws2tcpip.h>
12524#endif
05ea2a05
TT
12525
12526"
12527if test "x$ac_cv_type_socklen_t" = xyes; then :
12528
12529cat >>confdefs.h <<_ACEOF
12530#define HAVE_SOCKLEN_T 1
bec39cab 12531_ACEOF
c906108c 12532
05ea2a05 12533
bec39cab 12534fi
81ecdfbb 12535
81ecdfbb 12536
05ea2a05
TT
12537# ------------------------------------- #
12538# Checks for compiler characteristics. #
12539# ------------------------------------- #
a9322a30 12540
05ea2a05
TT
12541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12542$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12543if ${ac_cv_c_const+:} false; then :
12544 $as_echo_n "(cached) " >&6
12545else
12546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12547/* end confdefs.h. */
bec39cab 12548
05ea2a05
TT
12549int
12550main ()
12551{
bec39cab 12552
05ea2a05
TT
12553#ifndef __cplusplus
12554 /* Ultrix mips cc rejects this sort of thing. */
12555 typedef int charset[2];
12556 const charset cs = { 0, 0 };
12557 /* SunOS 4.1.1 cc rejects this. */
12558 char const *const *pcpcc;
12559 char **ppc;
12560 /* NEC SVR4.0.2 mips cc rejects this. */
12561 struct point {int x, y;};
12562 static struct point const zero = {0,0};
12563 /* AIX XL C 1.02.0.0 rejects this.
12564 It does not let you subtract one const X* pointer from another in
12565 an arm of an if-expression whose if-part is not a constant
12566 expression */
12567 const char *g = "string";
12568 pcpcc = &g + (g ? g-g : 0);
12569 /* HPUX 7.0 cc rejects these. */
12570 ++pcpcc;
12571 ppc = (char**) pcpcc;
12572 pcpcc = (char const *const *) ppc;
12573 { /* SCO 3.2v4 cc rejects this sort of thing. */
12574 char tx;
12575 char *t = &tx;
12576 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 12577
05ea2a05
TT
12578 *t++ = 0;
12579 if (s) return 0;
12580 }
12581 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12582 int x[] = {25, 17};
12583 const int *foo = &x[0];
12584 ++foo;
12585 }
12586 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12587 typedef const int *iptr;
12588 iptr p = 0;
12589 ++p;
12590 }
12591 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12592 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12593 struct s { int j; const int *ap[3]; } bx;
12594 struct s *b = &bx; b->j = 5;
12595 }
12596 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12597 const int foo = 10;
12598 if (!foo) return 0;
12599 }
12600 return !cs[0] && !zero.x;
12601#endif
5ee754fc 12602
05ea2a05
TT
12603 ;
12604 return 0;
12605}
bec39cab 12606_ACEOF
05ea2a05
TT
12607if ac_fn_c_try_compile "$LINENO"; then :
12608 ac_cv_c_const=yes
12609else
12610 ac_cv_c_const=no
12611fi
12612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12613fi
05ea2a05
TT
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12615$as_echo "$ac_cv_c_const" >&6; }
12616if test $ac_cv_c_const = no; then
5ee754fc 12617
05ea2a05 12618$as_echo "#define const /**/" >>confdefs.h
bec39cab 12619
05ea2a05
TT
12620fi
12621
12622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12623$as_echo_n "checking for inline... " >&6; }
12624if ${ac_cv_c_inline+:} false; then :
12625 $as_echo_n "(cached) " >&6
12626else
12627 ac_cv_c_inline=no
12628for ac_kw in inline __inline__ __inline; do
12629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12630/* end confdefs.h. */
12631#ifndef __cplusplus
12632typedef int foo_t;
12633static $ac_kw foo_t static_foo () {return 0; }
12634$ac_kw foo_t foo () {return 0; }
81ecdfbb 12635#endif
bec39cab 12636
a8111142 12637_ACEOF
05ea2a05
TT
12638if ac_fn_c_try_compile "$LINENO"; then :
12639 ac_cv_c_inline=$ac_kw
a8111142 12640fi
05ea2a05
TT
12641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12642 test "$ac_cv_c_inline" != no && break
81ecdfbb 12643done
a8111142 12644
05ea2a05
TT
12645fi
12646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12647$as_echo "$ac_cv_c_inline" >&6; }
a8111142 12648
05ea2a05
TT
12649case $ac_cv_c_inline in
12650 inline | yes) ;;
12651 *)
12652 case $ac_cv_c_inline in
12653 no) ac_val=;;
12654 *) ac_val=$ac_cv_c_inline;;
12655 esac
12656 cat >>confdefs.h <<_ACEOF
12657#ifndef __cplusplus
12658#define inline $ac_val
12659#endif
07697489 12660_ACEOF
05ea2a05
TT
12661 ;;
12662esac
07697489 12663
05ea2a05
TT
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12665$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12666if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
12667 $as_echo_n "(cached) " >&6
12668else
05ea2a05
TT
12669 ac_cv_c_bigendian=unknown
12670 # See if we're dealing with a universal compiler.
12671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12672/* end confdefs.h. */
12673#ifndef __APPLE_CC__
12674 not a universal capable compiler
12675 #endif
12676 typedef int dummy;
07697489 12677
05ea2a05
TT
12678_ACEOF
12679if ac_fn_c_try_compile "$LINENO"; then :
07697489 12680
05ea2a05
TT
12681 # Check for potential -arch flags. It is not universal unless
12682 # there are at least two -arch flags with different values.
12683 ac_arch=
12684 ac_prev=
12685 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12686 if test -n "$ac_prev"; then
12687 case $ac_word in
12688 i?86 | x86_64 | ppc | ppc64)
12689 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12690 ac_arch=$ac_word
12691 else
12692 ac_cv_c_bigendian=universal
12693 break
12694 fi
12695 ;;
12696 esac
12697 ac_prev=
12698 elif test "x$ac_word" = "x-arch"; then
12699 ac_prev=arch
12700 fi
12701 done
07697489 12702fi
05ea2a05
TT
12703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12704 if test $ac_cv_c_bigendian = unknown; then
12705 # See if sys/param.h defines the BYTE_ORDER macro.
12706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12707/* end confdefs.h. */
12708#include <sys/types.h>
12709 #include <sys/param.h>
07697489 12710
05ea2a05
TT
12711int
12712main ()
12713{
12714#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12715 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12716 && LITTLE_ENDIAN)
12717 bogus endian macros
12718 #endif
07697489 12719
05ea2a05
TT
12720 ;
12721 return 0;
12722}
07697489 12723_ACEOF
05ea2a05
TT
12724if ac_fn_c_try_compile "$LINENO"; then :
12725 # It does; now see whether it defined to BIG_ENDIAN or not.
12726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12727/* end confdefs.h. */
12728#include <sys/types.h>
12729 #include <sys/param.h>
07697489 12730
05ea2a05
TT
12731int
12732main ()
12733{
12734#if BYTE_ORDER != BIG_ENDIAN
12735 not big endian
12736 #endif
07697489 12737
05ea2a05
TT
12738 ;
12739 return 0;
12740}
07697489 12741_ACEOF
05ea2a05
TT
12742if ac_fn_c_try_compile "$LINENO"; then :
12743 ac_cv_c_bigendian=yes
07697489 12744else
05ea2a05 12745 ac_cv_c_bigendian=no
07697489 12746fi
05ea2a05 12747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12748fi
05ea2a05
TT
12749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12750 fi
12751 if test $ac_cv_c_bigendian = unknown; then
12752 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12754/* end confdefs.h. */
12755#include <limits.h>
07697489 12756
05ea2a05
TT
12757int
12758main ()
12759{
12760#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12761 bogus endian macros
12762 #endif
07697489 12763
05ea2a05
TT
12764 ;
12765 return 0;
12766}
07697489 12767_ACEOF
05ea2a05
TT
12768if ac_fn_c_try_compile "$LINENO"; then :
12769 # It does; now see whether it defined to _BIG_ENDIAN or not.
12770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12771/* end confdefs.h. */
12772#include <limits.h>
07697489 12773
05ea2a05
TT
12774int
12775main ()
12776{
12777#ifndef _BIG_ENDIAN
12778 not big endian
12779 #endif
07697489 12780
05ea2a05
TT
12781 ;
12782 return 0;
12783}
07697489 12784_ACEOF
05ea2a05
TT
12785if ac_fn_c_try_compile "$LINENO"; then :
12786 ac_cv_c_bigendian=yes
07697489 12787else
05ea2a05 12788 ac_cv_c_bigendian=no
07697489 12789fi
05ea2a05 12790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12791fi
05ea2a05
TT
12792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12793 fi
12794 if test $ac_cv_c_bigendian = unknown; then
12795 # Compile a test program.
12796 if test "$cross_compiling" = yes; then :
12797 # Try to guess by grepping values from an object file.
12798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12799/* end confdefs.h. */
12800short int ascii_mm[] =
12801 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12802 short int ascii_ii[] =
12803 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12804 int use_ascii (int i) {
12805 return ascii_mm[i] + ascii_ii[i];
12806 }
12807 short int ebcdic_ii[] =
12808 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12809 short int ebcdic_mm[] =
12810 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12811 int use_ebcdic (int i) {
12812 return ebcdic_mm[i] + ebcdic_ii[i];
12813 }
12814 extern int foo;
07697489 12815
05ea2a05
TT
12816int
12817main ()
12818{
12819return use_ascii (foo) == use_ebcdic (foo);
12820 ;
12821 return 0;
12822}
07697489 12823_ACEOF
05ea2a05
TT
12824if ac_fn_c_try_compile "$LINENO"; then :
12825 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12826 ac_cv_c_bigendian=yes
12827 fi
12828 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12829 if test "$ac_cv_c_bigendian" = unknown; then
12830 ac_cv_c_bigendian=no
12831 else
12832 # finding both strings is unlikely to happen, but who knows?
12833 ac_cv_c_bigendian=unknown
12834 fi
12835 fi
07697489 12836fi
05ea2a05
TT
12837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12838else
12839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12840/* end confdefs.h. */
12841$ac_includes_default
12842int
12843main ()
12844{
07697489 12845
05ea2a05
TT
12846 /* Are we little or big endian? From Harbison&Steele. */
12847 union
12848 {
12849 long int l;
12850 char c[sizeof (long int)];
12851 } u;
12852 u.l = 1;
12853 return u.c[sizeof (long int) - 1] == 1;
12854
12855 ;
12856 return 0;
12857}
07697489 12858_ACEOF
05ea2a05
TT
12859if ac_fn_c_try_run "$LINENO"; then :
12860 ac_cv_c_bigendian=no
07697489 12861else
05ea2a05
TT
12862 ac_cv_c_bigendian=yes
12863fi
12864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12865 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12866fi
12867
05ea2a05 12868 fi
07697489 12869fi
05ea2a05
TT
12870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12871$as_echo "$ac_cv_c_bigendian" >&6; }
12872 case $ac_cv_c_bigendian in #(
12873 yes)
12874 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12875;; #(
12876 no)
12877 ;; #(
12878 universal)
07697489 12879
05ea2a05 12880$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12881
05ea2a05
TT
12882 ;; #(
12883 *)
12884 as_fn_error $? "unknown endianness
12885 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12886 esac
07697489
PA
12887
12888
05ea2a05
TT
12889# ------------------------------ #
12890# Checks for library functions. #
12891# ------------------------------ #
81ecdfbb 12892
05ea2a05 12893for ac_func in getuid getgid \
8ae8e197 12894 pipe pread pread64 pwrite resize_term \
05ea2a05
TT
12895 getpgid setsid \
12896 sigaction sigsetmask socketpair \
12897 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12898 setrlimit getrlimit posix_madvise waitpid \
12899 use_default_colors
12900do :
12901 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12902ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12903if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12904 cat >>confdefs.h <<_ACEOF
12905#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12906_ACEOF
5ee754fc 12907
05ea2a05
TT
12908fi
12909done
5ee754fc 12910
05ea2a05
TT
12911
12912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12913$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12914if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12915 $as_echo_n "(cached) " >&6
bec39cab 12916else
81ecdfbb 12917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12918/* end confdefs.h. */
05ea2a05 12919#include <langinfo.h>
a9322a30
TT
12920int
12921main ()
12922{
05ea2a05 12923char* cs = nl_langinfo(CODESET);
a9322a30
TT
12924 ;
12925 return 0;
12926}
bec39cab 12927_ACEOF
81ecdfbb 12928if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12929 am_cv_langinfo_codeset=yes
bec39cab 12930else
05ea2a05 12931 am_cv_langinfo_codeset=no
81ecdfbb
RW
12932fi
12933rm -f core conftest.err conftest.$ac_objext \
12934 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12935
81ecdfbb 12936fi
05ea2a05
TT
12937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12938$as_echo "$am_cv_langinfo_codeset" >&6; }
12939 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12940
05ea2a05 12941$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12942
12943 fi
12944
05ea2a05
TT
12945ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12946if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12947
05ea2a05 12948else
81ecdfbb
RW
12949
12950cat >>confdefs.h <<_ACEOF
05ea2a05 12951#define size_t unsigned int
7eb368b3 12952_ACEOF
7eb368b3 12953
7eb368b3 12954fi
7eb368b3 12955
7eb368b3 12956
a9322a30 12957
7eb368b3 12958
05ea2a05
TT
12959 for ac_header in $ac_header_list
12960do :
12961 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12962ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12963"
12964if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12965 cat >>confdefs.h <<_ACEOF
12966#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12967_ACEOF
7eb368b3 12968
05ea2a05 12969fi
7eb368b3 12970
05ea2a05 12971done
a9322a30 12972
05ea2a05
TT
12973
12974
12975
12976
12977
12978
12979ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12980if test "x$ac_cv_type_pid_t" = xyes; then :
12981
12982else
bec39cab 12983
a9322a30 12984cat >>confdefs.h <<_ACEOF
05ea2a05 12985#define pid_t int
a9322a30
TT
12986_ACEOF
12987
05ea2a05
TT
12988fi
12989
12990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12991$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12992if ${ac_cv_path_SED+:} false; then :
12993 $as_echo_n "(cached) " >&6
12994else
12995 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12996 for ac_i in 1 2 3 4 5 6 7; do
12997 ac_script="$ac_script$as_nl$ac_script"
12998 done
12999 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13000 { ac_script=; unset ac_script;}
13001 if test -z "$SED"; then
13002 ac_path_SED_found=false
13003 # Loop through the user's path and test for each of PROGNAME-LIST
13004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13005for as_dir in $PATH
13006do
13007 IFS=$as_save_IFS
13008 test -z "$as_dir" && as_dir=.
13009 for ac_prog in sed gsed; do
13010 for ac_exec_ext in '' $ac_executable_extensions; do
13011 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13012 as_fn_executable_p "$ac_path_SED" || continue
13013# Check for GNU ac_path_SED and select it if it is found.
13014 # Check for GNU $ac_path_SED
13015case `"$ac_path_SED" --version 2>&1` in
13016*GNU*)
13017 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13018*)
13019 ac_count=0
13020 $as_echo_n 0123456789 >"conftest.in"
13021 while :
13022 do
13023 cat "conftest.in" "conftest.in" >"conftest.tmp"
13024 mv "conftest.tmp" "conftest.in"
13025 cp "conftest.in" "conftest.nl"
13026 $as_echo '' >> "conftest.nl"
13027 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13028 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13029 as_fn_arith $ac_count + 1 && ac_count=$as_val
13030 if test $ac_count -gt ${ac_path_SED_max-0}; then
13031 # Best one so far, save it but keep looking for a better one
13032 ac_cv_path_SED="$ac_path_SED"
13033 ac_path_SED_max=$ac_count
13034 fi
13035 # 10*(2^10) chars as input seems more than enough
13036 test $ac_count -gt 10 && break
13037 done
13038 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13039esac
a9322a30 13040
05ea2a05
TT
13041 $ac_path_SED_found && break 3
13042 done
13043 done
13044 done
13045IFS=$as_save_IFS
13046 if test -z "$ac_cv_path_SED"; then
13047 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13048 fi
13049else
13050 ac_cv_path_SED=$SED
a9322a30
TT
13051fi
13052
05ea2a05
TT
13053fi
13054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13055$as_echo "$ac_cv_path_SED" >&6; }
13056 SED="$ac_cv_path_SED"
13057 rm -f conftest.sed
a9322a30 13058
a9322a30 13059
db6878ac
SM
13060 # Set the 'development' global.
13061 . $srcdir/../bfd/development.sh
13062
05ea2a05
TT
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13064$as_echo_n "checking for ANSI C header files... " >&6; }
13065if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 13066 $as_echo_n "(cached) " >&6
a9322a30 13067else
81ecdfbb 13068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13069/* end confdefs.h. */
05ea2a05
TT
13070#include <stdlib.h>
13071#include <stdarg.h>
13072#include <string.h>
13073#include <float.h>
a9322a30
TT
13074
13075int
13076main ()
13077{
d0ac1c44 13078
a9322a30
TT
13079 ;
13080 return 0;
13081}
bec39cab 13082_ACEOF
81ecdfbb 13083if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 13084 ac_cv_header_stdc=yes
5ee754fc 13085else
05ea2a05 13086 ac_cv_header_stdc=no
5ee754fc 13087fi
81ecdfbb 13088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 13089
05ea2a05
TT
13090if test $ac_cv_header_stdc = yes; then
13091 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13093/* end confdefs.h. */
13094#include <string.h>
bec39cab 13095
05ea2a05
TT
13096_ACEOF
13097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13098 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 13099
bec39cab 13100else
05ea2a05
TT
13101 ac_cv_header_stdc=no
13102fi
13103rm -f conftest*
13104
13105fi
13106
13107if test $ac_cv_header_stdc = yes; then
13108 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 13109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13110/* end confdefs.h. */
05ea2a05 13111#include <stdlib.h>
a9322a30 13112
bec39cab 13113_ACEOF
05ea2a05
TT
13114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13115 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 13116
05ea2a05
TT
13117else
13118 ac_cv_header_stdc=no
5ee754fc 13119fi
05ea2a05 13120rm -f conftest*
5ee754fc 13121
05ea2a05 13122fi
bec39cab 13123
05ea2a05
TT
13124if test $ac_cv_header_stdc = yes; then
13125 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13126 if test "$cross_compiling" = yes; then :
13127 :
bec39cab 13128else
05ea2a05 13129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 13130/* end confdefs.h. */
05ea2a05
TT
13131#include <ctype.h>
13132#include <stdlib.h>
13133#if ((' ' & 0x0FF) == 0x020)
13134# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13135# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13136#else
13137# define ISLOWER(c) \
13138 (('a' <= (c) && (c) <= 'i') \
13139 || ('j' <= (c) && (c) <= 'r') \
13140 || ('s' <= (c) && (c) <= 'z'))
13141# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13142#endif
a9322a30 13143
05ea2a05 13144#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
13145int
13146main ()
13147{
05ea2a05
TT
13148 int i;
13149 for (i = 0; i < 256; i++)
13150 if (XOR (islower (i), ISLOWER (i))
13151 || toupper (i) != TOUPPER (i))
13152 return 2;
a9322a30
TT
13153 return 0;
13154}
bec39cab 13155_ACEOF
05ea2a05 13156if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13157
5ee754fc 13158else
05ea2a05 13159 ac_cv_header_stdc=no
5ee754fc 13160fi
05ea2a05
TT
13161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13162 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 13163fi
bec39cab 13164
05ea2a05
TT
13165fi
13166fi
13167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13168$as_echo "$ac_cv_header_stdc" >&6; }
13169if test $ac_cv_header_stdc = yes; then
81ecdfbb 13170
05ea2a05
TT
13171$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13172
13173fi
81ecdfbb 13174
05ea2a05
TT
13175 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13176# for constant arguments. Useless!
13177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13178$as_echo_n "checking for working alloca.h... " >&6; }
13179if ${ac_cv_working_alloca_h+:} false; then :
13180 $as_echo_n "(cached) " >&6
13181else
13182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13183/* end confdefs.h. */
13184#include <alloca.h>
7eb368b3
NR
13185int
13186main ()
13187{
05ea2a05
TT
13188char *p = (char *) alloca (2 * sizeof (int));
13189 if (p) return 0;
7eb368b3
NR
13190 ;
13191 return 0;
13192}
13193_ACEOF
05ea2a05
TT
13194if ac_fn_c_try_link "$LINENO"; then :
13195 ac_cv_working_alloca_h=yes
81ecdfbb 13196else
05ea2a05 13197 ac_cv_working_alloca_h=no
a9322a30 13198fi
05ea2a05
TT
13199rm -f core conftest.err conftest.$ac_objext \
13200 conftest$ac_exeext conftest.$ac_ext
a9322a30 13201fi
05ea2a05
TT
13202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13203$as_echo "$ac_cv_working_alloca_h" >&6; }
13204if test $ac_cv_working_alloca_h = yes; then
13205
13206$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 13207
7eb368b3 13208fi
05ea2a05
TT
13209
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13211$as_echo_n "checking for alloca... " >&6; }
13212if ${ac_cv_func_alloca_works+:} false; then :
13213 $as_echo_n "(cached) " >&6
bec39cab 13214else
81ecdfbb 13215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13216/* end confdefs.h. */
05ea2a05
TT
13217#ifdef __GNUC__
13218# define alloca __builtin_alloca
13219#else
13220# ifdef _MSC_VER
13221# include <malloc.h>
13222# define alloca _alloca
13223# else
13224# ifdef HAVE_ALLOCA_H
13225# include <alloca.h>
13226# else
13227# ifdef _AIX
13228 #pragma alloca
13229# else
13230# ifndef alloca /* predefined by HP cc +Olibcalls */
13231void *alloca (size_t);
13232# endif
13233# endif
13234# endif
13235# endif
13236#endif
13237
d3ea6809
MM
13238int
13239main ()
13240{
05ea2a05
TT
13241char *p = (char *) alloca (1);
13242 if (p) return 0;
81ecdfbb
RW
13243 ;
13244 return 0;
d3ea6809
MM
13245}
13246_ACEOF
05ea2a05
TT
13247if ac_fn_c_try_link "$LINENO"; then :
13248 ac_cv_func_alloca_works=yes
d3ea6809 13249else
05ea2a05 13250 ac_cv_func_alloca_works=no
a9322a30 13251fi
05ea2a05
TT
13252rm -f core conftest.err conftest.$ac_objext \
13253 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 13254fi
05ea2a05
TT
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13256$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 13257
05ea2a05 13258if test $ac_cv_func_alloca_works = yes; then
d3ea6809 13259
05ea2a05 13260$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 13261
05ea2a05
TT
13262else
13263 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13264# that cause trouble. Some versions do not even contain alloca or
13265# contain a buggy version. If you still want to use their alloca,
13266# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 13267
05ea2a05 13268ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 13269
05ea2a05 13270$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
13271
13272
05ea2a05
TT
13273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13274$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13275if ${ac_cv_os_cray+:} false; then :
13276 $as_echo_n "(cached) " >&6
13277else
13278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13279/* end confdefs.h. */
13280#if defined CRAY && ! defined CRAY2
13281webecray
13282#else
13283wenotbecray
13284#endif
13285
13286_ACEOF
13287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13288 $EGREP "webecray" >/dev/null 2>&1; then :
13289 ac_cv_os_cray=yes
13290else
13291 ac_cv_os_cray=no
13292fi
13293rm -f conftest*
13294
13295fi
13296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13297$as_echo "$ac_cv_os_cray" >&6; }
13298if test $ac_cv_os_cray = yes; then
13299 for ac_func in _getb67 GETB67 getb67; do
13300 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13301ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13302if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13303
13304cat >>confdefs.h <<_ACEOF
13305#define CRAY_STACKSEG_END $ac_func
13306_ACEOF
13307
13308 break
13309fi
13310
13311 done
13312fi
13313
13314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13315$as_echo_n "checking stack direction for C alloca... " >&6; }
13316if ${ac_cv_c_stack_direction+:} false; then :
13317 $as_echo_n "(cached) " >&6
13318else
13319 if test "$cross_compiling" = yes; then :
13320 ac_cv_c_stack_direction=0
13321else
13322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13323/* end confdefs.h. */
13324$ac_includes_default
13325int
13326find_stack_direction (int *addr, int depth)
13327{
13328 int dir, dummy = 0;
13329 if (! addr)
13330 addr = &dummy;
13331 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13332 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13333 return dir + dummy;
13334}
13335
13336int
13337main (int argc, char **argv)
13338{
13339 return find_stack_direction (0, argc + !argv + 20) < 0;
13340}
13341_ACEOF
13342if ac_fn_c_try_run "$LINENO"; then :
13343 ac_cv_c_stack_direction=1
13344else
13345 ac_cv_c_stack_direction=-1
13346fi
13347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13348 conftest.$ac_objext conftest.beam conftest.$ac_ext
13349fi
13350
13351fi
13352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13353$as_echo "$ac_cv_c_stack_direction" >&6; }
13354cat >>confdefs.h <<_ACEOF
13355#define STACK_DIRECTION $ac_cv_c_stack_direction
13356_ACEOF
13357
13358
13359fi
13360
13361
13362 WIN32APILIBS=
13363 case ${host} in
13364 *mingw32*)
13365
13366$as_echo "#define USE_WIN32API 1" >>confdefs.h
13367
13368 WIN32APILIBS="-lws2_32"
13369 ;;
13370 esac
13371
13372
13373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13374$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13375if ${am_cv_langinfo_codeset+:} false; then :
13376 $as_echo_n "(cached) " >&6
13377else
13378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13379/* end confdefs.h. */
13380#include <langinfo.h>
13381int
13382main ()
13383{
13384char* cs = nl_langinfo(CODESET);
13385 ;
13386 return 0;
13387}
13388_ACEOF
13389if ac_fn_c_try_link "$LINENO"; then :
13390 am_cv_langinfo_codeset=yes
13391else
13392 am_cv_langinfo_codeset=no
13393fi
13394rm -f core conftest.err conftest.$ac_objext \
13395 conftest$ac_exeext conftest.$ac_ext
13396
13397fi
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13399$as_echo "$am_cv_langinfo_codeset" >&6; }
13400 if test $am_cv_langinfo_codeset = yes; then
13401
13402$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13403
13404 fi
13405
13406
c8693053 13407 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h proc_service.h poll.h sys/poll.h sys/select.h
81ecdfbb
RW
13408do :
13409 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 13410ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 13411if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 13412 cat >>confdefs.h <<_ACEOF
81ecdfbb 13413#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 13414_ACEOF
b757528f 13415
b757528f 13416fi
bec39cab 13417
a9322a30 13418done
a3828db0 13419
d0ac1c44
SM
13420
13421
a9322a30 13422for ac_func in getpagesize
81ecdfbb
RW
13423do :
13424 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 13425if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 13426 cat >>confdefs.h <<_ACEOF
81ecdfbb 13427#define HAVE_GETPAGESIZE 1
bec39cab 13428_ACEOF
bcb3dc3d 13429
bcb3dc3d
MK
13430fi
13431done
13432
81ecdfbb
RW
13433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13434$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 13435if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 13436 $as_echo_n "(cached) " >&6
a9322a30 13437else
81ecdfbb 13438 if test "$cross_compiling" = yes; then :
a9322a30 13439 ac_cv_func_mmap_fixed_mapped=no
bec39cab 13440else
81ecdfbb 13441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 13442/* end confdefs.h. */
a9322a30
TT
13443$ac_includes_default
13444/* malloc might have been renamed as rpl_malloc. */
13445#undef malloc
bec39cab 13446
a9322a30
TT
13447/* Thanks to Mike Haertel and Jim Avera for this test.
13448 Here is a matrix of mmap possibilities:
13449 mmap private not fixed
13450 mmap private fixed at somewhere currently unmapped
13451 mmap private fixed at somewhere already mapped
13452 mmap shared not fixed
13453 mmap shared fixed at somewhere currently unmapped
13454 mmap shared fixed at somewhere already mapped
13455 For private mappings, we should verify that changes cannot be read()
13456 back from the file, nor mmap's back from the file at a different
13457 address. (There have been systems where private was not correctly
13458 implemented like the infamous i386 svr4.0, and systems where the
13459 VM page cache was not coherent with the file system buffer cache
13460 like early versions of FreeBSD and possibly contemporary NetBSD.)
13461 For shared mappings, we should conversely verify that changes get
13462 propagated back to all the places they're supposed to be.
bec39cab 13463
a9322a30
TT
13464 Grep wants private fixed already mapped.
13465 The main things grep needs to know about mmap are:
13466 * does it exist and is it safe to write into the mmap'd area
13467 * how to use it (BSD variants) */
8b9cf735 13468
a9322a30
TT
13469#include <fcntl.h>
13470#include <sys/mman.h>
8b9cf735 13471
81ecdfbb 13472#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 13473char *malloc ();
a3828db0
MK
13474#endif
13475
a9322a30 13476/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 13477#ifndef HAVE_GETPAGESIZE
a9322a30
TT
13478# ifdef _SC_PAGESIZE
13479# define getpagesize() sysconf(_SC_PAGESIZE)
13480# else /* no _SC_PAGESIZE */
81ecdfbb 13481# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
13482# include <sys/param.h>
13483# ifdef EXEC_PAGESIZE
13484# define getpagesize() EXEC_PAGESIZE
13485# else /* no EXEC_PAGESIZE */
13486# ifdef NBPG
13487# define getpagesize() NBPG * CLSIZE
13488# ifndef CLSIZE
13489# define CLSIZE 1
13490# endif /* no CLSIZE */
13491# else /* no NBPG */
13492# ifdef NBPC
13493# define getpagesize() NBPC
13494# else /* no NBPC */
13495# ifdef PAGESIZE
13496# define getpagesize() PAGESIZE
13497# endif /* PAGESIZE */
13498# endif /* no NBPC */
13499# endif /* no NBPG */
13500# endif /* no EXEC_PAGESIZE */
13501# else /* no HAVE_SYS_PARAM_H */
13502# define getpagesize() 8192 /* punt totally */
13503# endif /* no HAVE_SYS_PARAM_H */
13504# endif /* no _SC_PAGESIZE */
13505
13506#endif /* no HAVE_GETPAGESIZE */
13507
bec39cab
AC
13508int
13509main ()
13510{
a9322a30 13511 char *data, *data2, *data3;
d0ac1c44 13512 const char *cdata2;
a9322a30 13513 int i, pagesize;
d0ac1c44 13514 int fd, fd2;
a9322a30
TT
13515
13516 pagesize = getpagesize ();
13517
13518 /* First, make a file with some known garbage in it. */
13519 data = (char *) malloc (pagesize);
13520 if (!data)
81ecdfbb 13521 return 1;
a9322a30
TT
13522 for (i = 0; i < pagesize; ++i)
13523 *(data + i) = rand ();
13524 umask (0);
13525 fd = creat ("conftest.mmap", 0600);
13526 if (fd < 0)
d0ac1c44 13527 return 2;
a9322a30 13528 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13529 return 3;
a9322a30
TT
13530 close (fd);
13531
d0ac1c44
SM
13532 /* Next, check that the tail of a page is zero-filled. File must have
13533 non-zero length, otherwise we risk SIGBUS for entire page. */
13534 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13535 if (fd2 < 0)
13536 return 4;
13537 cdata2 = "";
13538 if (write (fd2, cdata2, 1) != 1)
13539 return 5;
13540 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13541 if (data2 == MAP_FAILED)
13542 return 6;
13543 for (i = 0; i < pagesize; ++i)
13544 if (*(data2 + i))
13545 return 7;
13546 close (fd2);
13547 if (munmap (data2, pagesize))
13548 return 8;
13549
a9322a30
TT
13550 /* Next, try to mmap the file at a fixed address which already has
13551 something else allocated at it. If we can, also make sure that
13552 we see the same garbage. */
13553 fd = open ("conftest.mmap", O_RDWR);
13554 if (fd < 0)
d0ac1c44 13555 return 9;
a9322a30
TT
13556 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13557 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13558 return 10;
a9322a30
TT
13559 for (i = 0; i < pagesize; ++i)
13560 if (*(data + i) != *(data2 + i))
d0ac1c44 13561 return 11;
a9322a30
TT
13562
13563 /* Finally, make sure that changes to the mapped area do not
13564 percolate back to the file as seen by read(). (This is a bug on
13565 some variants of i386 svr4.0.) */
13566 for (i = 0; i < pagesize; ++i)
13567 *(data2 + i) = *(data2 + i) + 1;
13568 data3 = (char *) malloc (pagesize);
13569 if (!data3)
d0ac1c44 13570 return 12;
a9322a30 13571 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13572 return 13;
a9322a30
TT
13573 for (i = 0; i < pagesize; ++i)
13574 if (*(data + i) != *(data3 + i))
d0ac1c44 13575 return 14;
a9322a30 13576 close (fd);
81ecdfbb 13577 return 0;
bec39cab
AC
13578}
13579_ACEOF
81ecdfbb 13580if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13581 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13582else
81ecdfbb 13583 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13584fi
81ecdfbb
RW
13585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13586 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13587fi
81ecdfbb 13588
a9322a30 13589fi
81ecdfbb
RW
13590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13591$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13592if test $ac_cv_func_mmap_fixed_mapped = yes; then
13593
81ecdfbb 13594$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13595
086ec9eb 13596fi
d0ac1c44 13597rm -f conftest.mmap conftest.txt
a3828db0 13598
05ea2a05 13599 for ac_header in vfork.h
81ecdfbb
RW
13600do :
13601 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13602if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13603 cat >>confdefs.h <<_ACEOF
81ecdfbb 13604#define HAVE_VFORK_H 1
bec39cab 13605_ACEOF
c906108c
SS
13606
13607fi
a9322a30 13608
a3828db0 13609done
c906108c 13610
a9322a30 13611for ac_func in fork vfork
81ecdfbb
RW
13612do :
13613 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13614ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13615if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13616 cat >>confdefs.h <<_ACEOF
81ecdfbb 13617#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13618_ACEOF
b83266a0 13619
97bf5e38 13620fi
a3828db0 13621done
b83266a0 13622
a9322a30 13623if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13625$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13626if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13627 $as_echo_n "(cached) " >&6
a9322a30 13628else
81ecdfbb 13629 if test "$cross_compiling" = yes; then :
a9322a30
TT
13630 ac_cv_func_fork_works=cross
13631else
81ecdfbb
RW
13632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13633/* end confdefs.h. */
13634$ac_includes_default
13635int
13636main ()
13637{
13638
13639 /* By Ruediger Kuhlmann. */
13640 return fork () < 0;
13641
13642 ;
13643 return 0;
13644}
a9322a30 13645_ACEOF
81ecdfbb 13646if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13647 ac_cv_func_fork_works=yes
13648else
81ecdfbb 13649 ac_cv_func_fork_works=no
a9322a30 13650fi
81ecdfbb
RW
13651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13652 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13653fi
81ecdfbb 13654
a9322a30 13655fi
81ecdfbb
RW
13656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13657$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13658
13659else
13660 ac_cv_func_fork_works=$ac_cv_func_fork
13661fi
13662if test "x$ac_cv_func_fork_works" = xcross; then
13663 case $host in
13664 *-*-amigaos* | *-*-msdosdjgpp*)
13665 # Override, as these systems have only a dummy fork() stub
13666 ac_cv_func_fork_works=no
13667 ;;
13668 *)
13669 ac_cv_func_fork_works=yes
13670 ;;
13671 esac
81ecdfbb
RW
13672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13673$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13674fi
13675ac_cv_func_vfork_works=$ac_cv_func_vfork
13676if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13678$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13679if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13680 $as_echo_n "(cached) " >&6
a9322a30 13681else
81ecdfbb 13682 if test "$cross_compiling" = yes; then :
a9322a30
TT
13683 ac_cv_func_vfork_works=cross
13684else
81ecdfbb 13685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13686/* end confdefs.h. */
13687/* Thanks to Paul Eggert for this test. */
81ecdfbb 13688$ac_includes_default
a9322a30 13689#include <sys/wait.h>
81ecdfbb 13690#ifdef HAVE_VFORK_H
a9322a30
TT
13691# include <vfork.h>
13692#endif
13693/* On some sparc systems, changes by the child to local and incoming
13694 argument registers are propagated back to the parent. The compiler
13695 is told about this with #include <vfork.h>, but some compilers
13696 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13697 static variable whose address is put into a register that is
13698 clobbered by the vfork. */
13699static void
13700#ifdef __cplusplus
13701sparc_address_test (int arg)
13702# else
13703sparc_address_test (arg) int arg;
13704#endif
13705{
13706 static pid_t child;
13707 if (!child) {
13708 child = vfork ();
13709 if (child < 0) {
13710 perror ("vfork");
13711 _exit(2);
13712 }
13713 if (!child) {
13714 arg = getpid();
13715 write(-1, "", 0);
13716 _exit (arg);
13717 }
13718 }
13719}
13720
13721int
13722main ()
13723{
13724 pid_t parent = getpid ();
13725 pid_t child;
13726
13727 sparc_address_test (0);
13728
13729 child = vfork ();
13730
13731 if (child == 0) {
13732 /* Here is another test for sparc vfork register problems. This
13733 test uses lots of local variables, at least as many local
13734 variables as main has allocated so far including compiler
13735 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13736 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13737 reuse the register of parent for one of the local variables,
13738 since it will think that parent can't possibly be used any more
13739 in this routine. Assigning to the local variable will thus
13740 munge parent in the parent process. */
13741 pid_t
13742 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13743 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13744 /* Convince the compiler that p..p7 are live; otherwise, it might
13745 use the same hardware register for all 8 local variables. */
13746 if (p != p1 || p != p2 || p != p3 || p != p4
13747 || p != p5 || p != p6 || p != p7)
13748 _exit(1);
13749
13750 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13751 from child file descriptors. If the child closes a descriptor
13752 before it execs or exits, this munges the parent's descriptor
13753 as well. Test for this by closing stdout in the child. */
13754 _exit(close(fileno(stdout)) != 0);
13755 } else {
13756 int status;
13757 struct stat st;
13758
13759 while (wait(&status) != child)
13760 ;
81ecdfbb 13761 return (
a9322a30
TT
13762 /* Was there some problem with vforking? */
13763 child < 0
13764
13765 /* Did the child fail? (This shouldn't happen.) */
13766 || status
13767
13768 /* Did the vfork/compiler bug occur? */
13769 || parent != getpid()
13770
13771 /* Did the file descriptor bug occur? */
13772 || fstat(fileno(stdout), &st) != 0
13773 );
13774 }
13775}
13776_ACEOF
81ecdfbb 13777if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13778 ac_cv_func_vfork_works=yes
13779else
81ecdfbb 13780 ac_cv_func_vfork_works=no
a9322a30 13781fi
81ecdfbb
RW
13782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13783 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13784fi
81ecdfbb 13785
a9322a30 13786fi
81ecdfbb
RW
13787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13788$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13789
13790fi;
13791if test "x$ac_cv_func_fork_works" = xcross; then
13792 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13794$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13795fi
13796
13797if test "x$ac_cv_func_vfork_works" = xyes; then
13798
81ecdfbb 13799$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13800
13801else
13802
81ecdfbb 13803$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13804
13805fi
13806if test "x$ac_cv_func_fork_works" = xyes; then
13807
81ecdfbb 13808$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13809
13810fi
13811
8ae8e197 13812 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05
TT
13813 ptrace64 sbrk setns sigaltstack sigprocmask \
13814 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
13815do :
13816 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13817ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13818if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13819 cat >>confdefs.h <<_ACEOF
81ecdfbb 13820#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13821_ACEOF
13822
13823fi
13824done
13825
13826
05ea2a05
TT
13827 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13828"
13829if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13830 ac_have_decl=1
6c7a06a3 13831else
05ea2a05
TT
13832 ac_have_decl=0
13833fi
13834
13835cat >>confdefs.h <<_ACEOF
13836#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13837_ACEOF
13838
13839
13840 if test "$cross_compiling" = yes; then :
81ecdfbb 13841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3 13842/* end confdefs.h. */
05ea2a05 13843#include <sys/personality.h>
6c7a06a3
TT
13844int
13845main ()
13846{
05ea2a05
TT
13847
13848 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13849 # define ADDR_NO_RANDOMIZE 0x0040000
13850 # endif
13851 /* Test the flag could be set and stays set. */
13852 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13853 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13854 return 1
bec39cab
AC
13855 ;
13856 return 0;
13857}
13858_ACEOF
81ecdfbb 13859if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13860 have_personality=true
a4db0f07 13861else
05ea2a05 13862 have_personality=false
a4db0f07 13863fi
81ecdfbb
RW
13864rm -f core conftest.err conftest.$ac_objext \
13865 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13866else
13867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13868/* end confdefs.h. */
13869#include <sys/personality.h>
13870int
13871main ()
13872{
6c7a06a3 13873
05ea2a05
TT
13874 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13875 # define ADDR_NO_RANDOMIZE 0x0040000
13876 # endif
13877 /* Test the flag could be set and stays set. */
13878 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13879 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13880 return 1
13881 ;
13882 return 0;
13883}
13884_ACEOF
13885if ac_fn_c_try_run "$LINENO"; then :
13886 have_personality=true
13887else
13888 have_personality=false
13889fi
13890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13891 conftest.$ac_objext conftest.beam conftest.$ac_ext
a4db0f07 13892fi
6c7a06a3 13893
05ea2a05
TT
13894 if $have_personality
13895 then
a4db0f07 13896
05ea2a05 13897$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
c906108c 13898
05ea2a05 13899 fi
d0ac1c44 13900
05ea2a05
TT
13901 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13902if test "x$ac_cv_have_decl_strstr" = xyes; then :
13903 ac_have_decl=1
d0ac1c44 13904else
05ea2a05
TT
13905 ac_have_decl=0
13906fi
d0ac1c44
SM
13907
13908cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13909#define HAVE_DECL_STRSTR $ac_have_decl
13910_ACEOF
13911
13912
13913 # ----------------------- #
13914 # Checks for structures. #
13915 # ----------------------- #
13916
13917 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13918if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13919
13920cat >>confdefs.h <<_ACEOF
13921#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13922_ACEOF
13923
05ea2a05 13924
d0ac1c44 13925fi
05ea2a05
TT
13926ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13927if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13928
05ea2a05
TT
13929cat >>confdefs.h <<_ACEOF
13930#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13931_ACEOF
13932
13933
13934fi
13935
13936
e911c666
JB
13937 # On FreeBSD we need libutil for the kinfo_get* functions. On
13938 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13939 # Figure out which one to use.
05ea2a05
TT
13940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13941$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13942if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13943 $as_echo_n "(cached) " >&6
13944else
05ea2a05
TT
13945 ac_func_search_save_LIBS=$LIBS
13946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13947/* end confdefs.h. */
3266f10b 13948
05ea2a05
TT
13949/* Override any GCC internal prototype to avoid an error.
13950 Use char because int might match the return type of a GCC
13951 builtin and then its argument prototype would still apply. */
13952#ifdef __cplusplus
13953extern "C"
13954#endif
13955char kinfo_getfile ();
3266f10b
TT
13956int
13957main ()
13958{
05ea2a05 13959return kinfo_getfile ();
3266f10b
TT
13960 ;
13961 return 0;
13962}
13963_ACEOF
05ea2a05
TT
13964for ac_lib in '' util util-freebsd; do
13965 if test -z "$ac_lib"; then
13966 ac_res="none required"
13967 else
13968 ac_res=-l$ac_lib
13969 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13970 fi
13971 if ac_fn_c_try_link "$LINENO"; then :
13972 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13973fi
05ea2a05
TT
13974rm -f core conftest.err conftest.$ac_objext \
13975 conftest$ac_exeext
13976 if ${ac_cv_search_kinfo_getfile+:} false; then :
13977 break
13978fi
13979done
13980if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13981
13982else
05ea2a05 13983 ac_cv_search_kinfo_getfile=no
3266f10b 13984fi
05ea2a05
TT
13985rm conftest.$ac_ext
13986LIBS=$ac_func_search_save_LIBS
13987fi
13988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13989$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13990ac_res=$ac_cv_search_kinfo_getfile
13991if test "$ac_res" != no; then :
13992 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13993
e911c666
JB
13994fi
13995
13996
13997 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
13998 for ac_func in kinfo_getfile
13999do :
14000 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
14001if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
14002 cat >>confdefs.h <<_ACEOF
14003#define HAVE_KINFO_GETFILE 1
14004_ACEOF
3266f10b
TT
14005
14006fi
e911c666 14007done
3266f10b 14008
3266f10b 14009
05ea2a05
TT
14010 # Check for std::thread. This does not work on some platforms, like
14011 # mingw and DJGPP.
14012 ac_ext=cpp
14013ac_cpp='$CXXCPP $CPPFLAGS'
14014ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14015ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14016ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 14017
3266f10b 14018
3266f10b 14019
3266f10b 14020
3266f10b 14021
05ea2a05
TT
14022ac_ext=c
14023ac_cpp='$CPP $CPPFLAGS'
14024ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14025ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14026ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 14027
05ea2a05 14028ax_pthread_ok=no
3266f10b 14029
05ea2a05
TT
14030# We used to check for pthread.h first, but this fails if pthread.h
14031# requires special compiler flags (e.g. on Tru64 or Sequent).
14032# It gets checked for in the link test anyway.
3266f10b 14033
05ea2a05
TT
14034# First of all, check if the user has set any of the PTHREAD_LIBS,
14035# etcetera environment variables, and if threads linking works using
14036# them:
14037if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
14038 ax_pthread_save_CC="$CC"
14039 ax_pthread_save_CFLAGS="$CFLAGS"
14040 ax_pthread_save_LIBS="$LIBS"
14041 if test "x$PTHREAD_CC" != "x"; then :
14042 CC="$PTHREAD_CC"
3266f10b 14043fi
05ea2a05
TT
14044 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14045 LIBS="$PTHREAD_LIBS $LIBS"
14046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
14047$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
14048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 14049/* end confdefs.h. */
05ea2a05
TT
14050
14051/* Override any GCC internal prototype to avoid an error.
14052 Use char because int might match the return type of a GCC
14053 builtin and then its argument prototype would still apply. */
14054#ifdef __cplusplus
14055extern "C"
14056#endif
14057char pthread_join ();
3266f10b
TT
14058int
14059main ()
14060{
05ea2a05 14061return pthread_join ();
3266f10b
TT
14062 ;
14063 return 0;
14064}
14065_ACEOF
14066if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 14067 ax_pthread_ok=yes
3266f10b
TT
14068fi
14069rm -f core conftest.err conftest.$ac_objext \
14070 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14072$as_echo "$ax_pthread_ok" >&6; }
14073 if test "x$ax_pthread_ok" = "xno"; then
14074 PTHREAD_LIBS=""
14075 PTHREAD_CFLAGS=""
14076 fi
14077 CC="$ax_pthread_save_CC"
14078 CFLAGS="$ax_pthread_save_CFLAGS"
14079 LIBS="$ax_pthread_save_LIBS"
3266f10b 14080fi
3266f10b 14081
05ea2a05
TT
14082# We must check for the threads library under a number of different
14083# names; the ordering is very important because some systems
14084# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14085# libraries is broken (non-POSIX).
3266f10b 14086
05ea2a05
TT
14087# Create a list of thread flags to try. Items starting with a "-" are
14088# C compiler flags, and other items are library names, except for "none"
14089# which indicates that we try without any flags at all, and "pthread-config"
14090# which is a program returning the flags for the Pth emulation library.
3266f10b 14091
05ea2a05 14092ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 14093
05ea2a05
TT
14094# The ordering *is* (sometimes) important. Some notes on the
14095# individual items follow:
3266f10b 14096
05ea2a05
TT
14097# pthreads: AIX (must check this before -lpthread)
14098# none: in case threads are in libc; should be tried before -Kthread and
14099# other compiler flags to prevent continual compiler warnings
14100# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14101# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14102# (Note: HP C rejects this with "bad form for `-t' option")
14103# -pthreads: Solaris/gcc (Note: HP C also rejects)
14104# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14105# doesn't hurt to check since this sometimes defines pthreads and
14106# -D_REENTRANT too), HP C (must be checked before -lpthread, which
14107# is present but should not be used directly; and before -mthreads,
14108# because the compiler interprets this as "-mt" + "-hreads")
14109# -mthreads: Mingw32/gcc, Lynx/gcc
14110# pthread: Linux, etcetera
14111# --thread-safe: KAI C++
14112# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 14113
05ea2a05 14114case $host_os in
3266f10b 14115
05ea2a05 14116 freebsd*)
3266f10b 14117
05ea2a05
TT
14118 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14119 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 14120
05ea2a05
TT
14121 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14122 ;;
3266f10b 14123
05ea2a05 14124 hpux*)
3266f10b 14125
05ea2a05
TT
14126 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14127 # multi-threading and also sets -lpthread."
14128
14129 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14130 ;;
14131
14132 openedition*)
14133
14134 # IBM z/OS requires a feature-test macro to be defined in order to
14135 # enable POSIX threads at all, so give the user a hint if this is
14136 # not set. (We don't define these ourselves, as they can affect
14137 # other portions of the system API in unpredictable ways.)
14138
14139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 14140/* end confdefs.h. */
05ea2a05
TT
14141
14142# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14143 AX_PTHREAD_ZOS_MISSING
14144# endif
3266f10b
TT
14145
14146_ACEOF
14147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
14148 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14150$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
14151fi
14152rm -f conftest*
14153
05ea2a05 14154 ;;
3266f10b 14155
05ea2a05 14156 solaris*)
3266f10b 14157
05ea2a05
TT
14158 # On Solaris (at least, for some versions), libc contains stubbed
14159 # (non-functional) versions of the pthreads routines, so link-based
14160 # tests will erroneously succeed. (N.B.: The stubs are missing
14161 # pthread_cleanup_push, or rather a function called by this macro,
14162 # so we could check for that, but who knows whether they'll stub
14163 # that too in a future libc.) So we'll check first for the
14164 # standard Solaris way of linking pthreads (-mt -lpthread).
14165
14166 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
14167 ;;
14168esac
14169
14170# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14171
14172if test "x$GCC" = "xyes"; then :
14173 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
14174fi
14175
05ea2a05
TT
14176# The presence of a feature test macro requesting re-entrant function
14177# definitions is, on some systems, a strong hint that pthreads support is
14178# correctly enabled
14179
14180case $host_os in
14181 darwin* | hpux* | linux* | osf* | solaris*)
14182 ax_pthread_check_macro="_REENTRANT"
14183 ;;
14184
14185 aix*)
14186 ax_pthread_check_macro="_THREAD_SAFE"
14187 ;;
14188
14189 *)
14190 ax_pthread_check_macro="--"
14191 ;;
14192esac
14193if test "x$ax_pthread_check_macro" = "x--"; then :
14194 ax_pthread_check_cond=0
14195else
14196 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
14197fi
14198
05ea2a05
TT
14199# Are we compiling with Clang?
14200
14201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14202$as_echo_n "checking whether $CC is Clang... " >&6; }
14203if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
14204 $as_echo_n "(cached) " >&6
14205else
05ea2a05
TT
14206 ax_cv_PTHREAD_CLANG=no
14207 # Note that Autoconf sets GCC=yes for Clang as well as GCC
14208 if test "x$GCC" = "xyes"; then
14209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 14210/* end confdefs.h. */
05ea2a05
TT
14211/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14212# if defined(__clang__) && defined(__llvm__)
14213 AX_PTHREAD_CC_IS_CLANG
14214# endif
3266f10b 14215
3266f10b 14216_ACEOF
05ea2a05
TT
14217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14218 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14219 ax_cv_PTHREAD_CLANG=yes
3266f10b 14220fi
05ea2a05
TT
14221rm -f conftest*
14222
14223 fi
3266f10b
TT
14224
14225fi
05ea2a05
TT
14226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14227$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14228ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 14229
05ea2a05 14230ax_pthread_clang_warning=no
3266f10b 14231
05ea2a05
TT
14232# Clang needs special handling, because older versions handle the -pthread
14233# option in a rather... idiosyncratic way
3266f10b 14234
05ea2a05 14235if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 14236
05ea2a05 14237 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 14238
05ea2a05
TT
14239 # (Note 1: This will need to be revisited if a system that Clang
14240 # supports has POSIX threads in a separate library. This tends not
14241 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 14242
05ea2a05
TT
14243 # (Note 2: On some systems, notably Darwin, -pthread is not needed
14244 # to get POSIX threads support; the API is always present and
14245 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
14246 # -pthread does define _REENTRANT, and while the Darwin headers
14247 # ignore this macro, third-party headers might not.)
b2ceabe8 14248
05ea2a05
TT
14249 PTHREAD_CFLAGS="-pthread"
14250 PTHREAD_LIBS=
3266f10b 14251
05ea2a05
TT
14252 ax_pthread_ok=yes
14253
14254 # However, older versions of Clang make a point of warning the user
14255 # that, in an invocation where only linking and no compilation is
14256 # taking place, the -pthread option has no effect ("argument unused
14257 # during compilation"). They expect -pthread to be passed in only
14258 # when source code is being compiled.
14259 #
14260 # Problem is, this is at odds with the way Automake and most other
14261 # C build frameworks function, which is that the same flags used in
14262 # compilation (CFLAGS) are also used in linking. Many systems
14263 # supported by AX_PTHREAD require exactly this for POSIX threads
14264 # support, and in fact it is often not straightforward to specify a
14265 # flag that is used only in the compilation phase and not in
14266 # linking. Such a scenario is extremely rare in practice.
14267 #
14268 # Even though use of the -pthread flag in linking would only print
14269 # a warning, this can be a nuisance for well-run software projects
14270 # that build with -Werror. So if the active version of Clang has
14271 # this misfeature, we search for an option to squash it.
14272
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14274$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14275if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14276 $as_echo_n "(cached) " >&6
14277else
14278 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14279 # Create an alternate version of $ac_link that compiles and
14280 # links in two steps (.c -> .o, .o -> exe) instead of one
14281 # (.c -> exe), because the warning occurs only in the second
14282 # step
14283 ax_pthread_save_ac_link="$ac_link"
14284 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14285 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14286 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14287 ax_pthread_save_CFLAGS="$CFLAGS"
14288 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14289 if test "x$ax_pthread_try" = "xunknown"; then :
14290 break
14291fi
14292 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14293 ac_link="$ax_pthread_save_ac_link"
14294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14295/* end confdefs.h. */
14296int main(void){return 0;}
3266f10b
TT
14297_ACEOF
14298if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
14299 ac_link="$ax_pthread_2step_ac_link"
14300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14301/* end confdefs.h. */
14302int main(void){return 0;}
14303_ACEOF
14304if ac_fn_c_try_link "$LINENO"; then :
14305 break
3266f10b
TT
14306fi
14307rm -f core conftest.err conftest.$ac_objext \
14308 conftest$ac_exeext conftest.$ac_ext
14309
14310fi
05ea2a05
TT
14311rm -f core conftest.err conftest.$ac_objext \
14312 conftest$ac_exeext conftest.$ac_ext
14313 done
14314 ac_link="$ax_pthread_save_ac_link"
14315 CFLAGS="$ax_pthread_save_CFLAGS"
14316 if test "x$ax_pthread_try" = "x"; then :
14317 ax_pthread_try=no
14318fi
14319 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 14320
05ea2a05
TT
14321fi
14322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14323$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 14324
05ea2a05
TT
14325 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14326 no | unknown) ;;
14327 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14328 esac
3266f10b 14329
05ea2a05 14330fi # $ax_pthread_clang = yes
3266f10b 14331
05ea2a05
TT
14332if test "x$ax_pthread_ok" = "xno"; then
14333for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 14334
05ea2a05
TT
14335 case $ax_pthread_try_flag in
14336 none)
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14338$as_echo_n "checking whether pthreads work without any flags... " >&6; }
14339 ;;
3266f10b 14340
05ea2a05
TT
14341 -mt,pthread)
14342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14343$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14344 PTHREAD_CFLAGS="-mt"
14345 PTHREAD_LIBS="-lpthread"
14346 ;;
3266f10b 14347
05ea2a05
TT
14348 -*)
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14350$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14351 PTHREAD_CFLAGS="$ax_pthread_try_flag"
14352 ;;
3266f10b 14353
05ea2a05
TT
14354 pthread-config)
14355 # Extract the first word of "pthread-config", so it can be a program name with args.
14356set dummy pthread-config; ac_word=$2
14357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14358$as_echo_n "checking for $ac_word... " >&6; }
14359if ${ac_cv_prog_ax_pthread_config+:} false; then :
14360 $as_echo_n "(cached) " >&6
14361else
14362 if test -n "$ax_pthread_config"; then
14363 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14364else
14365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14366for as_dir in $PATH
14367do
14368 IFS=$as_save_IFS
14369 test -z "$as_dir" && as_dir=.
14370 for ac_exec_ext in '' $ac_executable_extensions; do
14371 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14372 ac_cv_prog_ax_pthread_config="yes"
14373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14374 break 2
14375 fi
3266f10b 14376done
05ea2a05
TT
14377 done
14378IFS=$as_save_IFS
3266f10b 14379
05ea2a05
TT
14380 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14381fi
14382fi
14383ax_pthread_config=$ac_cv_prog_ax_pthread_config
14384if test -n "$ax_pthread_config"; then
14385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14386$as_echo "$ax_pthread_config" >&6; }
3266f10b 14387else
05ea2a05
TT
14388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14389$as_echo "no" >&6; }
3266f10b
TT
14390fi
14391
5e030278 14392
05ea2a05
TT
14393 if test "x$ax_pthread_config" = "xno"; then :
14394 continue
14395fi
14396 PTHREAD_CFLAGS="`pthread-config --cflags`"
14397 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14398 ;;
5e030278 14399
05ea2a05
TT
14400 *)
14401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14402$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14403 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14404 ;;
14405 esac
5e030278 14406
5e030278
TT
14407 ax_pthread_save_CFLAGS="$CFLAGS"
14408 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
14409 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14410 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
14411
14412 # Check for various functions. We must include pthread.h,
14413 # since some functions may be macros. (On the Sequent, we
14414 # need a special flag -Kthread to make this header compile.)
14415 # We check for pthread_join because it is in -lpthread on IRIX
14416 # while pthread_create is in libc. We check for pthread_attr_init
14417 # due to DEC craziness with -lpthreads. We check for
14418 # pthread_cleanup_push because it is one of the few pthread
14419 # functions on Solaris that doesn't have a non-functional libc stub.
14420 # We try pthread_create on general principles.
14421
5e030278
TT
14422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14423/* end confdefs.h. */
05ea2a05
TT
14424#include <pthread.h>
14425# if $ax_pthread_check_cond
14426# error "$ax_pthread_check_macro must be defined"
14427# endif
14428 static void routine(void *a) { a = 0; }
14429 static void *start_routine(void *a) { return a; }
5e030278
TT
14430int
14431main ()
14432{
05ea2a05
TT
14433pthread_t th; pthread_attr_t attr;
14434 pthread_create(&th, 0, start_routine, 0);
14435 pthread_join(th, 0);
14436 pthread_attr_init(&attr);
14437 pthread_cleanup_push(routine, 0);
14438 pthread_cleanup_pop(0) /* ; */
5e030278
TT
14439 ;
14440 return 0;
14441}
14442_ACEOF
14443if ac_fn_c_try_link "$LINENO"; then :
14444 ax_pthread_ok=yes
14445fi
14446rm -f core conftest.err conftest.$ac_objext \
14447 conftest$ac_exeext conftest.$ac_ext
05ea2a05 14448
5e030278
TT
14449 CFLAGS="$ax_pthread_save_CFLAGS"
14450 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
14451
14452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14453$as_echo "$ax_pthread_ok" >&6; }
14454 if test "x$ax_pthread_ok" = "xyes"; then :
14455 break
5e030278
TT
14456fi
14457
05ea2a05
TT
14458 PTHREAD_LIBS=""
14459 PTHREAD_CFLAGS=""
14460done
14461fi
5e030278 14462
05ea2a05
TT
14463# Various other checks:
14464if test "x$ax_pthread_ok" = "xyes"; then
14465 ax_pthread_save_CFLAGS="$CFLAGS"
14466 ax_pthread_save_LIBS="$LIBS"
14467 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14468 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 14469
05ea2a05
TT
14470 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14472$as_echo_n "checking for joinable pthread attribute... " >&6; }
14473if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14474 $as_echo_n "(cached) " >&6
14475else
14476 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14477 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14479/* end confdefs.h. */
14480#include <pthread.h>
14481int
14482main ()
14483{
14484int attr = $ax_pthread_attr; return attr /* ; */
14485 ;
14486 return 0;
14487}
14488_ACEOF
14489if ac_fn_c_try_link "$LINENO"; then :
14490 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14491fi
14492rm -f core conftest.err conftest.$ac_objext \
14493 conftest$ac_exeext conftest.$ac_ext
14494 done
5e030278 14495
05ea2a05
TT
14496fi
14497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14498$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14499 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14500 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14501 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 14502
05ea2a05
TT
14503cat >>confdefs.h <<_ACEOF
14504#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14505_ACEOF
5e030278 14506
05ea2a05 14507 ax_pthread_joinable_attr_defined=yes
5e030278 14508
05ea2a05 14509fi
5e030278 14510
05ea2a05
TT
14511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14512$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14513if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14514 $as_echo_n "(cached) " >&6
14515else
14516 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14517 case $host_os in
14518 solaris*)
14519 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14520 ;;
14521 esac
5e030278 14522
05ea2a05
TT
14523fi
14524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14525$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14526 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14527 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14528 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14529 ax_pthread_special_flags_added=yes
14530fi
5e030278 14531
05ea2a05
TT
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14533$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14534if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14535 $as_echo_n "(cached) " >&6
14536else
14537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538/* end confdefs.h. */
14539#include <pthread.h>
14540int
14541main ()
14542{
14543int i = PTHREAD_PRIO_INHERIT;
14544 ;
14545 return 0;
14546}
14547_ACEOF
14548if ac_fn_c_try_link "$LINENO"; then :
14549 ax_cv_PTHREAD_PRIO_INHERIT=yes
14550else
14551 ax_cv_PTHREAD_PRIO_INHERIT=no
14552fi
14553rm -f core conftest.err conftest.$ac_objext \
14554 conftest$ac_exeext conftest.$ac_ext
5e030278 14555
05ea2a05
TT
14556fi
14557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14558$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14559 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14560 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 14561
05ea2a05 14562$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 14563
05ea2a05 14564 ax_pthread_prio_inherit_defined=yes
5e030278 14565
05ea2a05 14566fi
5e030278 14567
05ea2a05
TT
14568 CFLAGS="$ax_pthread_save_CFLAGS"
14569 LIBS="$ax_pthread_save_LIBS"
5e030278 14570
05ea2a05
TT
14571 # More AIX lossage: compile with *_r variant
14572 if test "x$GCC" != "xyes"; then
14573 case $host_os in
14574 aix*)
14575 case "x/$CC" in #(
14576 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14577 #handle absolute path differently from PATH based program lookup
14578 case "x$CC" in #(
14579 x/*) :
14580 if as_fn_executable_p ${CC}_r; then :
14581 PTHREAD_CC="${CC}_r"
14582fi ;; #(
14583 *) :
14584 for ac_prog in ${CC}_r
14585do
14586 # Extract the first word of "$ac_prog", so it can be a program name with args.
14587set dummy $ac_prog; ac_word=$2
14588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14589$as_echo_n "checking for $ac_word... " >&6; }
14590if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14591 $as_echo_n "(cached) " >&6
14592else
14593 if test -n "$PTHREAD_CC"; then
14594 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14595else
14596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14597for as_dir in $PATH
14598do
14599 IFS=$as_save_IFS
14600 test -z "$as_dir" && as_dir=.
14601 for ac_exec_ext in '' $ac_executable_extensions; do
14602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14603 ac_cv_prog_PTHREAD_CC="$ac_prog"
14604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14605 break 2
14606 fi
14607done
14608 done
14609IFS=$as_save_IFS
5e030278 14610
5e030278 14611fi
05ea2a05
TT
14612fi
14613PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14614if test -n "$PTHREAD_CC"; then
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14616$as_echo "$PTHREAD_CC" >&6; }
14617else
14618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14619$as_echo "no" >&6; }
14620fi
5e030278 14621
5e030278 14622
05ea2a05
TT
14623 test -n "$PTHREAD_CC" && break
14624done
14625test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14626 ;;
14627esac ;; #(
14628 *) :
14629 ;;
5e030278 14630esac
05ea2a05
TT
14631 ;;
14632 esac
14633 fi
14634fi
5e030278 14635
05ea2a05 14636test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 14637
5e030278 14638
5e030278 14639
5e030278 14640
5e030278 14641
05ea2a05
TT
14642# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14643if test "x$ax_pthread_ok" = "xyes"; then
14644 threads=yes
14645 :
5e030278 14646else
05ea2a05
TT
14647 ax_pthread_ok=no
14648 threads=no
5e030278 14649fi
05ea2a05
TT
14650ac_ext=cpp
14651ac_cpp='$CXXCPP $CPPFLAGS'
14652ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14653ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14654ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 14655
5e030278 14656
05ea2a05
TT
14657 if test "$threads" = "yes"; then
14658 save_LIBS="$LIBS"
14659 LIBS="$PTHREAD_LIBS $LIBS"
14660 save_CXXFLAGS="$CXXFLAGS"
14661 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14663$as_echo_n "checking for std::thread... " >&6; }
14664if ${gdb_cv_cxx_std_thread+:} false; then :
14665 $as_echo_n "(cached) " >&6
14666else
14667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14668/* end confdefs.h. */
05ea2a05
TT
14669#include <thread>
14670 void callback() { }
14671int
14672main ()
14673{
14674std::thread t(callback);
14675 ;
14676 return 0;
14677}
5e030278 14678_ACEOF
05ea2a05
TT
14679if ac_fn_cxx_try_compile "$LINENO"; then :
14680 gdb_cv_cxx_std_thread=yes
14681else
14682 gdb_cv_cxx_std_thread=no
5e030278 14683fi
05ea2a05
TT
14684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14685fi
14686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14687$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 14688
05ea2a05
TT
14689 # This check must be here, while LIBS includes any necessary
14690 # threading library.
14691 for ac_func in pthread_sigmask pthread_setname_np
14692do :
14693 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14694ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14695if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14696 cat >>confdefs.h <<_ACEOF
14697#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14698_ACEOF
5e030278
TT
14699
14700fi
05ea2a05 14701done
5e030278 14702
5e030278 14703
05ea2a05
TT
14704 LIBS="$save_LIBS"
14705 CXXFLAGS="$save_CXXFLAGS"
14706 fi
14707 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 14708
05ea2a05 14709$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 14710
05ea2a05
TT
14711 fi
14712 ac_ext=c
14713ac_cpp='$CPP $CPPFLAGS'
14714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14716ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 14717
5e030278 14718
05ea2a05
TT
14719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14720$as_echo_n "checking for sigsetjmp... " >&6; }
14721if ${gdb_cv_func_sigsetjmp+:} false; then :
14722 $as_echo_n "(cached) " >&6
14723else
14724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14725/* end confdefs.h. */
b9442ec1 14726#include <setjmp.h>
05ea2a05
TT
14727int
14728main ()
14729{
b9442ec1
SM
14730sigjmp_buf env;
14731 while (! sigsetjmp (env, 1))
14732 siglongjmp (env, 1);
14733
05ea2a05
TT
14734 ;
14735 return 0;
14736}
14737_ACEOF
14738if ac_fn_c_try_compile "$LINENO"; then :
14739 gdb_cv_func_sigsetjmp=yes
14740else
14741 gdb_cv_func_sigsetjmp=no
b9442ec1 14742
05ea2a05
TT
14743fi
14744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b9442ec1 14745
05ea2a05
TT
14746fi
14747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14748$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14749 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 14750
05ea2a05 14751$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 14752
05ea2a05
TT
14753 fi
14754
14755
14756# Check whether --with-intel_pt was given.
14757if test "${with_intel_pt+set}" = set; then :
14758 withval=$with_intel_pt;
5e030278 14759else
05ea2a05 14760 with_intel_pt=auto
5e030278 14761fi
05ea2a05
TT
14762
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14764$as_echo_n "checking whether to use intel pt... " >&6; }
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14766$as_echo "$with_intel_pt" >&6; }
14767
14768 if test "${with_intel_pt}" = no; then
14769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14770$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14771 HAVE_LIBIPT=no
14772 else
14773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14774/* end confdefs.h. */
5e030278 14775
05ea2a05
TT
14776 #include <linux/perf_event.h>
14777 #ifndef PERF_ATTR_SIZE_VER5
14778 # error
14779 #endif
5e030278 14780
05ea2a05
TT
14781_ACEOF
14782if ac_fn_c_try_cpp "$LINENO"; then :
14783 perf_event=yes
14784else
14785 perf_event=no
5e030278 14786fi
05ea2a05
TT
14787rm -f conftest.err conftest.i conftest.$ac_ext
14788 if test "$perf_event" != yes; then
14789 if test "$with_intel_pt" = yes; then
14790 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14791 else
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14793$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14794 fi
14795 fi
5e030278 14796
5e030278 14797
5e030278 14798
5e030278 14799
5e030278 14800
5e030278 14801
5e030278 14802
5e030278 14803
5e030278 14804
05ea2a05 14805 use_additional=yes
5e030278 14806
05ea2a05
TT
14807 acl_save_prefix="$prefix"
14808 prefix="$acl_final_prefix"
14809 acl_save_exec_prefix="$exec_prefix"
14810 exec_prefix="$acl_final_exec_prefix"
5e030278 14811
05ea2a05
TT
14812 eval additional_includedir=\"$includedir\"
14813 eval additional_libdir=\"$libdir\"
5e030278 14814
05ea2a05
TT
14815 exec_prefix="$acl_save_exec_prefix"
14816 prefix="$acl_save_prefix"
5e030278 14817
5e030278 14818
05ea2a05
TT
14819# Check whether --with-libipt-prefix was given.
14820if test "${with_libipt_prefix+set}" = set; then :
14821 withval=$with_libipt_prefix;
14822 if test "X$withval" = "Xno"; then
14823 use_additional=no
14824 else
14825 if test "X$withval" = "X"; then
5e030278 14826
05ea2a05
TT
14827 acl_save_prefix="$prefix"
14828 prefix="$acl_final_prefix"
14829 acl_save_exec_prefix="$exec_prefix"
14830 exec_prefix="$acl_final_exec_prefix"
5e030278 14831
05ea2a05
TT
14832 eval additional_includedir=\"$includedir\"
14833 eval additional_libdir=\"$libdir\"
5e030278 14834
05ea2a05
TT
14835 exec_prefix="$acl_save_exec_prefix"
14836 prefix="$acl_save_prefix"
5e030278 14837
05ea2a05
TT
14838 else
14839 additional_includedir="$withval/include"
14840 additional_libdir="$withval/lib"
14841 fi
14842 fi
5e030278
TT
14843
14844fi
5e030278 14845
9f1528a1
AB
14846
14847# Check whether --with-libipt-type was given.
14848if test "${with_libipt_type+set}" = set; then :
14849 withval=$with_libipt_type; with_libipt_type=$withval
14850else
14851 with_libipt_type=auto
14852fi
14853
14854 lib_type=`eval echo \$with_libipt_type`
14855
05ea2a05
TT
14856 LIBIPT=
14857 LTLIBIPT=
14858 INCIPT=
14859 rpathdirs=
14860 ltrpathdirs=
14861 names_already_handled=
14862 names_next_round='ipt '
14863 while test -n "$names_next_round"; do
14864 names_this_round="$names_next_round"
14865 names_next_round=
14866 for name in $names_this_round; do
14867 already_handled=
14868 for n in $names_already_handled; do
14869 if test "$n" = "$name"; then
14870 already_handled=yes
14871 break
14872 fi
14873 done
14874 if test -z "$already_handled"; then
14875 names_already_handled="$names_already_handled $name"
14876 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14877 eval value=\"\$HAVE_LIB$uppername\"
14878 if test -n "$value"; then
14879 if test "$value" = yes; then
14880 eval value=\"\$LIB$uppername\"
14881 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14882 eval value=\"\$LTLIB$uppername\"
14883 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14884 else
14885 :
14886 fi
14887 else
14888 found_dir=
14889 found_la=
14890 found_so=
14891 found_a=
14892 if test $use_additional = yes; then
9f1528a1 14893 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14894 found_dir="$additional_libdir"
14895 found_so="$additional_libdir/lib$name.$shlibext"
14896 if test -f "$additional_libdir/lib$name.la"; then
14897 found_la="$additional_libdir/lib$name.la"
14898 fi
9f1528a1 14899 elif test x$lib_type != xshared; then
05ea2a05
TT
14900 if test -f "$additional_libdir/lib$name.$libext"; then
14901 found_dir="$additional_libdir"
14902 found_a="$additional_libdir/lib$name.$libext"
14903 if test -f "$additional_libdir/lib$name.la"; then
14904 found_la="$additional_libdir/lib$name.la"
14905 fi
14906 fi
14907 fi
14908 fi
14909 if test "X$found_dir" = "X"; then
14910 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14911
05ea2a05
TT
14912 acl_save_prefix="$prefix"
14913 prefix="$acl_final_prefix"
14914 acl_save_exec_prefix="$exec_prefix"
14915 exec_prefix="$acl_final_exec_prefix"
14916 eval x=\"$x\"
14917 exec_prefix="$acl_save_exec_prefix"
14918 prefix="$acl_save_prefix"
5e030278 14919
05ea2a05
TT
14920 case "$x" in
14921 -L*)
14922 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 14923 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14924 found_dir="$dir"
14925 found_so="$dir/lib$name.$shlibext"
14926 if test -f "$dir/lib$name.la"; then
14927 found_la="$dir/lib$name.la"
14928 fi
9f1528a1 14929 elif test x$lib_type != xshared; then
05ea2a05
TT
14930 if test -f "$dir/lib$name.$libext"; then
14931 found_dir="$dir"
14932 found_a="$dir/lib$name.$libext"
14933 if test -f "$dir/lib$name.la"; then
14934 found_la="$dir/lib$name.la"
14935 fi
14936 fi
14937 fi
14938 ;;
14939 esac
14940 if test "X$found_dir" != "X"; then
14941 break
14942 fi
14943 done
14944 fi
14945 if test "X$found_dir" != "X"; then
14946 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14947 if test "X$found_so" != "X"; then
14948 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14949 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14950 else
14951 haveit=
14952 for x in $ltrpathdirs; do
14953 if test "X$x" = "X$found_dir"; then
14954 haveit=yes
14955 break
14956 fi
14957 done
14958 if test -z "$haveit"; then
14959 ltrpathdirs="$ltrpathdirs $found_dir"
14960 fi
14961 if test "$hardcode_direct" = yes; then
14962 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14963 else
14964 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14965 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14966 haveit=
14967 for x in $rpathdirs; do
14968 if test "X$x" = "X$found_dir"; then
14969 haveit=yes
14970 break
14971 fi
14972 done
14973 if test -z "$haveit"; then
14974 rpathdirs="$rpathdirs $found_dir"
14975 fi
14976 else
14977 haveit=
14978 for x in $LDFLAGS $LIBIPT; do
5e030278 14979
05ea2a05
TT
14980 acl_save_prefix="$prefix"
14981 prefix="$acl_final_prefix"
14982 acl_save_exec_prefix="$exec_prefix"
14983 exec_prefix="$acl_final_exec_prefix"
14984 eval x=\"$x\"
14985 exec_prefix="$acl_save_exec_prefix"
14986 prefix="$acl_save_prefix"
5e030278 14987
05ea2a05
TT
14988 if test "X$x" = "X-L$found_dir"; then
14989 haveit=yes
14990 break
14991 fi
14992 done
14993 if test -z "$haveit"; then
14994 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14995 fi
14996 if test "$hardcode_minus_L" != no; then
14997 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14998 else
14999 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15000 fi
15001 fi
15002 fi
15003 fi
15004 else
15005 if test "X$found_a" != "X"; then
15006 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
15007 else
15008 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
15009 fi
15010 fi
15011 additional_includedir=
15012 case "$found_dir" in
15013 */lib | */lib/)
15014 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15015 additional_includedir="$basedir/include"
15016 ;;
15017 esac
15018 if test "X$additional_includedir" != "X"; then
15019 if test "X$additional_includedir" != "X/usr/include"; then
15020 haveit=
15021 if test "X$additional_includedir" = "X/usr/local/include"; then
15022 if test -n "$GCC"; then
15023 case $host_os in
15024 linux*) haveit=yes;;
15025 esac
15026 fi
15027 fi
15028 if test -z "$haveit"; then
15029 for x in $CPPFLAGS $INCIPT; do
5e030278 15030
05ea2a05
TT
15031 acl_save_prefix="$prefix"
15032 prefix="$acl_final_prefix"
15033 acl_save_exec_prefix="$exec_prefix"
15034 exec_prefix="$acl_final_exec_prefix"
15035 eval x=\"$x\"
15036 exec_prefix="$acl_save_exec_prefix"
15037 prefix="$acl_save_prefix"
5e030278 15038
05ea2a05
TT
15039 if test "X$x" = "X-I$additional_includedir"; then
15040 haveit=yes
15041 break
15042 fi
15043 done
15044 if test -z "$haveit"; then
15045 if test -d "$additional_includedir"; then
15046 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
15047 fi
15048 fi
15049 fi
15050 fi
15051 fi
15052 if test -n "$found_la"; then
15053 save_libdir="$libdir"
15054 case "$found_la" in
15055 */* | *\\*) . "$found_la" ;;
15056 *) . "./$found_la" ;;
15057 esac
15058 libdir="$save_libdir"
15059 for dep in $dependency_libs; do
15060 case "$dep" in
15061 -L*)
15062 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15063 if test "X$additional_libdir" != "X/usr/lib"; then
15064 haveit=
15065 if test "X$additional_libdir" = "X/usr/local/lib"; then
15066 if test -n "$GCC"; then
15067 case $host_os in
15068 linux*) haveit=yes;;
15069 esac
15070 fi
15071 fi
15072 if test -z "$haveit"; then
15073 haveit=
15074 for x in $LDFLAGS $LIBIPT; do
5e030278 15075
05ea2a05
TT
15076 acl_save_prefix="$prefix"
15077 prefix="$acl_final_prefix"
15078 acl_save_exec_prefix="$exec_prefix"
15079 exec_prefix="$acl_final_exec_prefix"
15080 eval x=\"$x\"
15081 exec_prefix="$acl_save_exec_prefix"
15082 prefix="$acl_save_prefix"
5e030278 15083
05ea2a05
TT
15084 if test "X$x" = "X-L$additional_libdir"; then
15085 haveit=yes
15086 break
15087 fi
15088 done
15089 if test -z "$haveit"; then
15090 if test -d "$additional_libdir"; then
15091 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
15092 fi
15093 fi
15094 haveit=
15095 for x in $LDFLAGS $LTLIBIPT; do
5e030278 15096
05ea2a05
TT
15097 acl_save_prefix="$prefix"
15098 prefix="$acl_final_prefix"
15099 acl_save_exec_prefix="$exec_prefix"
15100 exec_prefix="$acl_final_exec_prefix"
15101 eval x=\"$x\"
15102 exec_prefix="$acl_save_exec_prefix"
15103 prefix="$acl_save_prefix"
5e030278 15104
05ea2a05
TT
15105 if test "X$x" = "X-L$additional_libdir"; then
15106 haveit=yes
15107 break
15108 fi
15109 done
15110 if test -z "$haveit"; then
15111 if test -d "$additional_libdir"; then
15112 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
15113 fi
15114 fi
15115 fi
15116 fi
15117 ;;
15118 -R*)
15119 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15120 if test "$enable_rpath" != no; then
15121 haveit=
15122 for x in $rpathdirs; do
15123 if test "X$x" = "X$dir"; then
15124 haveit=yes
15125 break
15126 fi
15127 done
15128 if test -z "$haveit"; then
15129 rpathdirs="$rpathdirs $dir"
15130 fi
15131 haveit=
15132 for x in $ltrpathdirs; do
15133 if test "X$x" = "X$dir"; then
15134 haveit=yes
15135 break
15136 fi
15137 done
15138 if test -z "$haveit"; then
15139 ltrpathdirs="$ltrpathdirs $dir"
15140 fi
15141 fi
15142 ;;
15143 -l*)
15144 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15145 ;;
15146 *.la)
15147 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15148 ;;
15149 *)
15150 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
15151 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
15152 ;;
15153 esac
15154 done
15155 fi
15156 else
9f1528a1
AB
15157 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
15158 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15159 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
15160 else
15161 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
15162 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
15163 fi
05ea2a05 15164 fi
5e030278 15165 fi
05ea2a05
TT
15166 fi
15167 done
15168 done
15169 if test "X$rpathdirs" != "X"; then
15170 if test -n "$hardcode_libdir_separator"; then
15171 alldirs=
15172 for found_dir in $rpathdirs; do
15173 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15174 done
15175 acl_save_libdir="$libdir"
15176 libdir="$alldirs"
15177 eval flag=\"$hardcode_libdir_flag_spec\"
15178 libdir="$acl_save_libdir"
15179 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15180 else
15181 for found_dir in $rpathdirs; do
15182 acl_save_libdir="$libdir"
15183 libdir="$found_dir"
15184 eval flag=\"$hardcode_libdir_flag_spec\"
15185 libdir="$acl_save_libdir"
15186 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15187 done
15188 fi
15189 fi
15190 if test "X$ltrpathdirs" != "X"; then
15191 for found_dir in $ltrpathdirs; do
15192 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
15193 done
15194 fi
5e030278
TT
15195
15196
05ea2a05 15197 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 15198
05ea2a05
TT
15199 for element in $INCIPT; do
15200 haveit=
15201 for x in $CPPFLAGS; do
5e030278 15202
05ea2a05
TT
15203 acl_save_prefix="$prefix"
15204 prefix="$acl_final_prefix"
15205 acl_save_exec_prefix="$exec_prefix"
15206 exec_prefix="$acl_final_exec_prefix"
15207 eval x=\"$x\"
15208 exec_prefix="$acl_save_exec_prefix"
15209 prefix="$acl_save_prefix"
5e030278 15210
05ea2a05
TT
15211 if test "X$x" = "X$element"; then
15212 haveit=yes
15213 break
15214 fi
15215 done
15216 if test -z "$haveit"; then
15217 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15218 fi
15219 done
5e030278
TT
15220
15221
05ea2a05
TT
15222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
15223$as_echo_n "checking for libipt... " >&6; }
15224if ${ac_cv_libipt+:} false; then :
5e030278
TT
15225 $as_echo_n "(cached) " >&6
15226else
05ea2a05
TT
15227
15228 ac_save_LIBS="$LIBS"
15229 LIBS="$LIBS $LIBIPT"
15230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 15231/* end confdefs.h. */
05ea2a05 15232#include "intel-pt.h"
5e030278
TT
15233int
15234main ()
15235{
05ea2a05 15236pt_insn_alloc_decoder (0);
5e030278
TT
15237 ;
15238 return 0;
15239}
15240_ACEOF
05ea2a05
TT
15241if ac_fn_c_try_link "$LINENO"; then :
15242 ac_cv_libipt=yes
5e030278 15243else
05ea2a05 15244 ac_cv_libipt=no
5e030278 15245fi
05ea2a05
TT
15246rm -f core conftest.err conftest.$ac_objext \
15247 conftest$ac_exeext conftest.$ac_ext
15248 LIBS="$ac_save_LIBS"
15249
5e030278 15250fi
05ea2a05
TT
15251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
15252$as_echo "$ac_cv_libipt" >&6; }
15253 if test "$ac_cv_libipt" = yes; then
15254 HAVE_LIBIPT=yes
21987b9c 15255
05ea2a05
TT
15256$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
15257
15258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
15259$as_echo_n "checking how to link with libipt... " >&6; }
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
15261$as_echo "$LIBIPT" >&6; }
15262 else
15263 HAVE_LIBIPT=no
15264 CPPFLAGS="$ac_save_CPPFLAGS"
15265 LIBIPT=
15266 LTLIBIPT=
15267 fi
15268
15269
15270
15271
15272
15273
15274 if test "$HAVE_LIBIPT" != yes; then
15275 if test "$with_intel_pt" = yes; then
15276 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
15277 else
15278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
15279$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
15280 fi
15281 else
15282 save_LIBS=$LIBS
15283 LIBS="$LIBS $LIBIPT"
15284 for ac_func in pt_insn_event
21987b9c 15285do :
05ea2a05
TT
15286 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
15287if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 15288 cat >>confdefs.h <<_ACEOF
05ea2a05 15289#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
15290_ACEOF
15291
15292fi
15293done
15294
05ea2a05
TT
15295 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
15296"
15297if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 15298
05ea2a05
TT
15299cat >>confdefs.h <<_ACEOF
15300#define HAVE_STRUCT_PT_INSN_ENABLED 1
15301_ACEOF
5e030278 15302
5e030278 15303
05ea2a05
TT
15304fi
15305ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
15306"
15307if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
15308
15309cat >>confdefs.h <<_ACEOF
15310#define HAVE_STRUCT_PT_INSN_RESYNCED 1
15311_ACEOF
5e030278
TT
15312
15313
05ea2a05
TT
15314fi
15315
15316 LIBS=$save_LIBS
15317 fi
15318 fi
15319
c8693053
RO
15320
15321$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15322
15323 for ac_header in sys/procfs.h
15324do :
15325 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
15326if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
15327 cat >>confdefs.h <<_ACEOF
15328#define HAVE_SYS_PROCFS_H 1
15329_ACEOF
15330
15331fi
15332
15333done
15334
05ea2a05 15335 if test "$ac_cv_header_sys_procfs_h" = yes; then
c8693053
RO
15336
15337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
05ea2a05
TT
15338$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15339 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
15340 $as_echo_n "(cached) " >&6
15341else
15342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15343/* end confdefs.h. */
15344
05ea2a05 15345#define _SYSCALL32
05ea2a05 15346#include <sys/procfs.h>
e9bcb658
GB
15347int
15348main ()
15349{
05ea2a05 15350gregset_t avar
e9bcb658
GB
15351 ;
15352 return 0;
15353}
15354_ACEOF
15355if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15356 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 15357else
05ea2a05 15358 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
15359
15360fi
05ea2a05 15361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 15362fi
06825bd1 15363
05ea2a05 15364 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 15365
05ea2a05 15366$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 15367
05ea2a05
TT
15368 fi
15369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15370$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
15371
c8693053
RO
15372
15373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15374$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15375 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 15376 $as_echo_n "(cached) " >&6
bec39cab 15377else
81ecdfbb 15378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15379/* end confdefs.h. */
05ea2a05
TT
15380
15381#define _SYSCALL32
05ea2a05 15382#include <sys/procfs.h>
bec39cab
AC
15383int
15384main ()
15385{
05ea2a05 15386fpregset_t avar
064ef605
DJ
15387 ;
15388 return 0;
15389}
15390_ACEOF
9b30624b 15391if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
15392 bfd_cv_have_sys_procfs_type_fpregset_t=yes
15393else
15394 bfd_cv_have_sys_procfs_type_fpregset_t=no
15395
15396fi
15397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15398fi
15399
15400 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
15401
15402$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
15403
15404 fi
15405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15406$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
15407
c8693053
RO
15408
15409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
05ea2a05
TT
15410$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15411 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
15412 $as_echo_n "(cached) " >&6
064ef605 15413else
81ecdfbb 15414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 15415/* end confdefs.h. */
05ea2a05
TT
15416
15417#define _SYSCALL32
05ea2a05 15418#include <sys/procfs.h>
064ef605
DJ
15419int
15420main ()
15421{
05ea2a05 15422prgregset_t avar
bec39cab
AC
15423 ;
15424 return 0;
15425}
15426_ACEOF
9b30624b 15427if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15428 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 15429else
05ea2a05
TT
15430 bfd_cv_have_sys_procfs_type_prgregset_t=no
15431
70f9f479 15432fi
81ecdfbb 15433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 15434fi
bec39cab 15435
05ea2a05 15436 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 15437
05ea2a05
TT
15438$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15439
15440 fi
15441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15442$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15443
c8693053
RO
15444
15445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15446$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15447 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 15448 $as_echo_n "(cached) " >&6
bec39cab 15449else
81ecdfbb 15450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 15451/* end confdefs.h. */
05ea2a05
TT
15452
15453#define _SYSCALL32
05ea2a05 15454#include <sys/procfs.h>
064ef605
DJ
15455int
15456main ()
15457{
05ea2a05 15458prfpregset_t avar
064ef605
DJ
15459 ;
15460 return 0;
15461}
15462_ACEOF
9b30624b 15463if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15464 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 15465else
05ea2a05 15466 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 15467
5c7f2947 15468fi
81ecdfbb 15469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
15470fi
15471
15472 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15473
15474$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15475
15476 fi
15477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15478$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15479
c8693053
RO
15480
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
05ea2a05
TT
15482$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15483 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15484 $as_echo_n "(cached) " >&6
15485else
15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15487/* end confdefs.h. */
05ea2a05
TT
15488
15489#define _SYSCALL32
05ea2a05 15490#include <sys/procfs.h>
bec39cab
AC
15491int
15492main ()
15493{
05ea2a05 15494prgregset32_t avar
bec39cab
AC
15495 ;
15496 return 0;
15497}
15498_ACEOF
9b30624b 15499if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
15500 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15501else
15502 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 15503
064ef605 15504fi
81ecdfbb 15505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 15506fi
96d7229d 15507
05ea2a05 15508 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 15509
05ea2a05 15510$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 15511
05ea2a05
TT
15512 fi
15513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15514$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 15515
c8693053
RO
15516
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
05ea2a05
TT
15518$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15519 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 15520 $as_echo_n "(cached) " >&6
bec39cab 15521else
81ecdfbb 15522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15523/* end confdefs.h. */
05ea2a05
TT
15524
15525#define _SYSCALL32
05ea2a05 15526#include <sys/procfs.h>
bec39cab
AC
15527int
15528main ()
15529{
05ea2a05 15530lwpid_t avar
bec39cab
AC
15531 ;
15532 return 0;
15533}
15534_ACEOF
05ea2a05
TT
15535if ac_fn_c_try_compile "$LINENO"; then :
15536 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 15537else
05ea2a05
TT
15538 bfd_cv_have_sys_procfs_type_lwpid_t=no
15539
c906108c 15540fi
05ea2a05 15541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15542fi
81ecdfbb 15543
05ea2a05 15544 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 15545
05ea2a05 15546$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 15547
05ea2a05
TT
15548 fi
15549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15550$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 15551
c8693053
RO
15552
15553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
05ea2a05
TT
15554$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15555 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 15556 $as_echo_n "(cached) " >&6
97bf5e38 15557else
81ecdfbb 15558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15559/* end confdefs.h. */
a3828db0 15560
05ea2a05 15561#define _SYSCALL32
05ea2a05 15562#include <sys/procfs.h>
bec39cab
AC
15563int
15564main ()
15565{
05ea2a05 15566psaddr_t avar
bec39cab
AC
15567 ;
15568 return 0;
15569}
15570_ACEOF
81ecdfbb 15571if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15572 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15573else
05ea2a05
TT
15574 bfd_cv_have_sys_procfs_type_psaddr_t=no
15575
c906108c 15576fi
81ecdfbb 15577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15578fi
c3f6f71d 15579
05ea2a05 15580 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 15581
05ea2a05 15582$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 15583
05ea2a05
TT
15584 fi
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15586$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15587
c8693053
RO
15588
15589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15590$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15591 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
15592 $as_echo_n "(cached) " >&6
15593else
15594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15595/* end confdefs.h. */
05ea2a05
TT
15596
15597#define _SYSCALL32
05ea2a05 15598#include <sys/procfs.h>
db1ff28b
JK
15599int
15600main ()
15601{
05ea2a05 15602elf_fpregset_t avar
db1ff28b
JK
15603 ;
15604 return 0;
15605}
15606_ACEOF
15607if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15608 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 15609else
05ea2a05
TT
15610 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15611
db1ff28b
JK
15612fi
15613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15614fi
db1ff28b 15615
05ea2a05 15616 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 15617
05ea2a05 15618$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 15619
05ea2a05
TT
15620 fi
15621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15622$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 15623
05ea2a05
TT
15624 fi
15625
15626
15627# Check the return and argument types of ptrace.
15628
15629
15630for ac_header in sys/ptrace.h ptrace.h
15631do :
15632 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15633ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15634if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15635 cat >>confdefs.h <<_ACEOF
15636#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15637_ACEOF
db1ff28b
JK
15638
15639fi
15640
05ea2a05
TT
15641done
15642
81ecdfbb 15643
05ea2a05
TT
15644gdb_ptrace_headers='
15645#include <sys/types.h>
15646#if HAVE_SYS_PTRACE_H
15647# include <sys/ptrace.h>
15648#endif
15649#if HAVE_UNISTD_H
15650# include <unistd.h>
15651#endif
15652'
5c45e068 15653
05ea2a05
TT
15654# Check return type. Varargs (used on GNU/Linux) conflict with the
15655# empty argument list, so check for that explicitly.
15656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15657$as_echo_n "checking return type of ptrace... " >&6; }
15658if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 15659 $as_echo_n "(cached) " >&6
bec39cab 15660else
81ecdfbb 15661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15662/* end confdefs.h. */
5164c117 15663 $gdb_ptrace_headers
bec39cab
AC
15664int
15665main ()
15666{
05ea2a05 15667extern long ptrace (enum __ptrace_request, ...);
5164c117 15668
bec39cab
AC
15669 ;
15670 return 0;
15671}
15672_ACEOF
81ecdfbb 15673if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15674 gdb_cv_func_ptrace_ret='long'
bec39cab 15675else
81ecdfbb 15676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15677/* end confdefs.h. */
05ea2a05 15678$gdb_ptrace_headers
bec39cab
AC
15679int
15680main ()
15681{
05ea2a05 15682extern int ptrace ();
5164c117 15683
bec39cab
AC
15684 ;
15685 return 0;
15686}
15687_ACEOF
81ecdfbb 15688if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15689 gdb_cv_func_ptrace_ret='int'
27ca5dad 15690else
05ea2a05 15691 gdb_cv_func_ptrace_ret='long'
b6fb30ed 15692
27ca5dad 15693fi
81ecdfbb 15694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15695
27ca5dad 15696fi
05ea2a05 15697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15698
27ca5dad 15699fi
05ea2a05
TT
15700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15701$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068 15702
b6fb30ed 15703
5c45e068 15704cat >>confdefs.h <<_ACEOF
05ea2a05 15705#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15706_ACEOF
3862412b 15707
b6fb30ed 15708
05ea2a05
TT
15709# Check argument types.
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15711$as_echo_n "checking types of arguments for ptrace... " >&6; }
15712if ${gdb_cv_func_ptrace_args+:} false; then :
15713 $as_echo_n "(cached) " >&6
15714else
05ea2a05
TT
15715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15716/* end confdefs.h. */
15717$gdb_ptrace_headers
15718int
15719main ()
15720{
15721extern long ptrace (enum __ptrace_request, ...);
5164c117 15722
05ea2a05
TT
15723 ;
15724 return 0;
15725}
bec39cab 15726_ACEOF
05ea2a05
TT
15727if ac_fn_c_try_compile "$LINENO"; then :
15728 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15729else
b6fb30ed
SM
15730 for gdb_arg1 in 'int' 'long'; do
15731 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15732 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15733 for gdb_arg4 in 'int' 'long' 'void *'; do
15734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
15735/* end confdefs.h. */
15736$gdb_ptrace_headers
15737int
15738main ()
15739{
b6fb30ed 15740extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5164c117 15741
05ea2a05
TT
15742 ;
15743 return 0;
15744}
15745_ACEOF
15746if ac_fn_c_try_compile "$LINENO"; then :
15747 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
b6fb30ed
SM
15748 break 4;
15749
97bf5e38 15750fi
05ea2a05 15751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
15752
15753 for gdb_arg5 in 'int *' 'int' 'long'; do
15754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
15755/* end confdefs.h. */
15756$gdb_ptrace_headers
15757int
15758main ()
15759{
b6fb30ed 15760extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5164c117 15761
05ea2a05
TT
15762 ;
15763 return 0;
15764}
6fea9e18 15765_ACEOF
05ea2a05 15766if ac_fn_c_try_compile "$LINENO"; then :
b6fb30ed
SM
15767 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15768 break 5;
6fea9e18 15769
05ea2a05
TT
15770fi
15771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
15772 done
15773 done
15774 done
15775 done
15776 done
15777 # Provide a safe default value.
15778 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
15779
15780fi
05ea2a05 15781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15782
05ea2a05
TT
15783fi
15784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15785$as_echo "$gdb_cv_func_ptrace_args" >&6; }
b6fb30ed 15786
05ea2a05
TT
15787ac_save_IFS=$IFS; IFS=','
15788set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15789IFS=$ac_save_IFS
15790shift
6fea9e18
L
15791
15792cat >>confdefs.h <<_ACEOF
05ea2a05 15793#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
15794_ACEOF
15795
15796
05ea2a05
TT
15797cat >>confdefs.h <<_ACEOF
15798#define PTRACE_TYPE_ARG3 $3
bec39cab 15799_ACEOF
451928c5 15800
60ca704f 15801
05ea2a05
TT
15802cat >>confdefs.h <<_ACEOF
15803#define PTRACE_TYPE_ARG4 $4
15804_ACEOF
15805
15806if test -n "$5"; then
15807
15808cat >>confdefs.h <<_ACEOF
15809#define PTRACE_TYPE_ARG5 $5
15810_ACEOF
451928c5 15811
97bf5e38 15812fi
451928c5 15813
05ea2a05
TT
15814
15815if test "$cross_compiling" = no; then
15816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15817$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15818if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15819 $as_echo_n "(cached) " >&6
05ea2a05
TT
15820else
15821 if test "$cross_compiling" = yes; then :
15822 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 15823else
81ecdfbb 15824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15825/* end confdefs.h. */
05ea2a05 15826$ac_includes_default
bec39cab
AC
15827int
15828main ()
15829{
05ea2a05
TT
15830/* If this system has a BSD-style setpgrp which takes arguments,
15831 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15832 exit successfully. */
15833 return setpgrp (1,1) != -1;
bec39cab
AC
15834 ;
15835 return 0;
15836}
15837_ACEOF
05ea2a05
TT
15838if ac_fn_c_try_run "$LINENO"; then :
15839 ac_cv_func_setpgrp_void=no
451928c5 15840else
05ea2a05 15841 ac_cv_func_setpgrp_void=yes
451928c5 15842fi
05ea2a05
TT
15843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15844 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
15845fi
15846
05ea2a05
TT
15847fi
15848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15849$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15850if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15851
05ea2a05 15852$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15853
97bf5e38 15854fi
451928c5 15855
05ea2a05
TT
15856else
15857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15858$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15859if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15860 $as_echo_n "(cached) " >&6
3862412b 15861else
81ecdfbb 15862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15863/* end confdefs.h. */
05ea2a05 15864#include <unistd.h>
bec39cab
AC
15865int
15866main ()
15867{
5593a99a
SM
15868if (setpgrp(1,1) == -1)
15869 exit (0);
15870 else
15871 exit (1);
05ea2a05 15872
bec39cab
AC
15873 ;
15874 return 0;
15875}
15876_ACEOF
81ecdfbb 15877if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15878 ac_cv_func_setpgrp_void=no
3862412b 15879else
05ea2a05 15880 ac_cv_func_setpgrp_void=yes
5593a99a 15881
3862412b 15882fi
81ecdfbb 15883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15884
3862412b 15885fi
05ea2a05
TT
15886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15887$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15888if test "$ac_cv_func_setpgrp_void" = yes; then
15889 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15890
05ea2a05 15891fi
97bf5e38 15892fi
3862412b 15893
05ea2a05
TT
15894# Assume we'll default to using the included libiberty regex.
15895gdb_use_included_regex=yes
15896
15897# However, if the system regex is GNU regex, then default to *not*
15898# using the included regex.
15899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15900$as_echo_n "checking for GNU regex... " >&6; }
15901if ${gdb_cv_have_gnu_regex+:} false; then :
81ecdfbb 15902 $as_echo_n "(cached) " >&6
3862412b 15903else
81ecdfbb 15904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15905/* end confdefs.h. */
05ea2a05 15906#include <gnu-versions.h>
bec39cab
AC
15907int
15908main ()
15909{
05ea2a05 15910#define REGEX_INTERFACE_VERSION 1
5593a99a
SM
15911 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15912 # error "Version mismatch"
15913 #endif
15914
bec39cab
AC
15915 ;
15916 return 0;
15917}
15918_ACEOF
81ecdfbb 15919if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15920 gdb_cv_have_gnu_regex=yes
3862412b 15921else
05ea2a05 15922 gdb_cv_have_gnu_regex=no
5593a99a 15923
3862412b 15924fi
81ecdfbb 15925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15926
3862412b 15927fi
05ea2a05
TT
15928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15929$as_echo "$gdb_cv_have_gnu_regex" >&6; }
15930if test "$gdb_cv_have_gnu_regex" = yes; then
15931 gdb_use_included_regex=no
15932fi
3862412b 15933
3862412b 15934
05ea2a05
TT
15935# Check whether --with-included-regex was given.
15936if test "${with_included_regex+set}" = set; then :
15937 withval=$with_included_regex; gdb_with_regex=$withval
15938else
15939 gdb_with_regex=$gdb_use_included_regex
97bf5e38 15940fi
3862412b 15941
05ea2a05 15942if test "$gdb_with_regex" = yes; then
6e9567fe 15943
05ea2a05 15944$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
6e9567fe
JB
15945
15946fi
15947
05ea2a05
TT
15948# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15949ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15950#include <sys/proc.h>
6e9567fe 15951
e6cdd38e 15952"
05ea2a05 15953if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15954
15955cat >>confdefs.h <<_ACEOF
05ea2a05 15956#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15957_ACEOF
15958
15959
15960fi
15961
6e9567fe 15962
05ea2a05
TT
15963# See if <sys/lwp.h> defines `struct lwp`.
15964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15965$as_echo_n "checking for struct lwp... " >&6; }
15966if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15967 $as_echo_n "(cached) " >&6
596c9d4b 15968else
81ecdfbb 15969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15970/* end confdefs.h. */
05ea2a05 15971#include <sys/param.h>
5593a99a
SM
15972 #define _KMEMUSER
15973 #include <sys/lwp.h>
bec39cab
AC
15974int
15975main ()
15976{
05ea2a05 15977struct lwp l;
5593a99a 15978
bec39cab
AC
15979 ;
15980 return 0;
15981}
15982_ACEOF
81ecdfbb 15983if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15984 gdb_cv_struct_lwp=yes
596c9d4b 15985else
05ea2a05 15986 gdb_cv_struct_lwp=no
5593a99a 15987
596c9d4b 15988fi
81ecdfbb 15989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15990
596c9d4b 15991fi
05ea2a05
TT
15992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15993$as_echo "$gdb_cv_struct_lwp" >&6; }
15994if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15995
05ea2a05 15996$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15997
05ea2a05 15998fi
451928c5 15999
05ea2a05
TT
16000# See if <machine/reg.h> degines `struct reg'.
16001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
16002$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
16003if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 16004 $as_echo_n "(cached) " >&6
d84dd0c5 16005else
81ecdfbb 16006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16007/* end confdefs.h. */
05ea2a05 16008#include <sys/types.h>
5593a99a 16009 #include <machine/reg.h>
bec39cab
AC
16010int
16011main ()
16012{
05ea2a05 16013struct reg r;
5593a99a 16014
bec39cab
AC
16015 ;
16016 return 0;
16017}
16018_ACEOF
81ecdfbb 16019if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 16020 gdb_cv_struct_reg=yes
d84dd0c5 16021else
05ea2a05 16022 gdb_cv_struct_reg=no
5593a99a 16023
d84dd0c5 16024fi
81ecdfbb 16025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16026
d84dd0c5 16027fi
05ea2a05
TT
16028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
16029$as_echo "$gdb_cv_struct_reg" >&6; }
16030if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 16031
05ea2a05 16032$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 16033
05ea2a05 16034fi
d84dd0c5 16035
05ea2a05
TT
16036# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16037# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
16038ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
16039#include <machine/reg.h>
16040"
16041if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 16042
05ea2a05
TT
16043cat >>confdefs.h <<_ACEOF
16044#define HAVE_STRUCT_REG_R_FS 1
16045_ACEOF
16046
16047
16048fi
16049ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
16050#include <machine/reg.h>
16051"
16052if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
16053
16054cat >>confdefs.h <<_ACEOF
16055#define HAVE_STRUCT_REG_R_GS 1
16056_ACEOF
16057
16058
16059fi
16060
16061
05ea2a05
TT
16062# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
16063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
16064$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
16065if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 16066 $as_echo_n "(cached) " >&6
d45fe813 16067else
81ecdfbb 16068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16069/* end confdefs.h. */
05ea2a05 16070#include <sys/ptrace.h>
bec39cab
AC
16071int
16072main ()
16073{
05ea2a05 16074PTRACE_GETREGS;
bec39cab
AC
16075 ;
16076 return 0;
16077}
16078_ACEOF
81ecdfbb 16079if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 16080 gdb_cv_have_ptrace_getregs=yes
d45fe813 16081else
05ea2a05 16082 gdb_cv_have_ptrace_getregs=no
5593a99a 16083
d45fe813 16084fi
81ecdfbb 16085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16086
d45fe813
KB
16087fi
16088
05ea2a05
TT
16089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
16090$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
16091if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 16092
05ea2a05 16093$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 16094
05ea2a05 16095fi
d45fe813 16096
05ea2a05
TT
16097# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
16098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
16099$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
16100if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 16101 $as_echo_n "(cached) " >&6
d45fe813 16102else
81ecdfbb 16103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16104/* end confdefs.h. */
05ea2a05 16105#include <sys/ptrace.h>
bec39cab
AC
16106int
16107main ()
16108{
05ea2a05 16109PTRACE_GETFPXREGS;
bec39cab
AC
16110 ;
16111 return 0;
16112}
16113_ACEOF
81ecdfbb 16114if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 16115 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 16116else
05ea2a05 16117 gdb_cv_have_ptrace_getfpxregs=no
5593a99a 16118
d45fe813 16119fi
81ecdfbb 16120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16121
d45fe813
KB
16122fi
16123
05ea2a05
TT
16124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16125$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
16126if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 16127
05ea2a05 16128$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 16129
05ea2a05 16130fi
d45fe813 16131
05ea2a05
TT
16132# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
16133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
16134$as_echo_n "checking for PT_GETDBREGS... " >&6; }
16135if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 16136 $as_echo_n "(cached) " >&6
d45fe813 16137else
81ecdfbb 16138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16139/* end confdefs.h. */
05ea2a05 16140#include <sys/types.h>
5593a99a 16141 #include <sys/ptrace.h>
bec39cab
AC
16142int
16143main ()
16144{
05ea2a05 16145PT_GETDBREGS;
5593a99a 16146
bec39cab
AC
16147 ;
16148 return 0;
16149}
16150_ACEOF
81ecdfbb 16151if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 16152 gdb_cv_have_pt_getdbregs=yes
d45fe813 16153else
05ea2a05 16154 gdb_cv_have_pt_getdbregs=no
5593a99a 16155
d45fe813 16156fi
81ecdfbb 16157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16158
d45fe813
KB
16159fi
16160
05ea2a05
TT
16161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
16162$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
16163if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 16164
05ea2a05 16165$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 16166
05ea2a05 16167fi
c906108c 16168
05ea2a05
TT
16169# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
16170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
16171$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
16172if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 16173 $as_echo_n "(cached) " >&6
c906108c 16174else
81ecdfbb 16175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16176/* end confdefs.h. */
05ea2a05 16177#include <sys/types.h>
5593a99a 16178 #include <sys/ptrace.h>
bec39cab
AC
16179int
16180main ()
16181{
05ea2a05 16182PT_GETXMMREGS;
5593a99a 16183
bec39cab
AC
16184 ;
16185 return 0;
16186}
16187_ACEOF
81ecdfbb 16188if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 16189 gdb_cv_have_pt_getxmmregs=yes
c906108c 16190else
05ea2a05 16191 gdb_cv_have_pt_getxmmregs=no
5593a99a 16192
c906108c 16193fi
81ecdfbb 16194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16195
c906108c
SS
16196fi
16197
05ea2a05
TT
16198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
16199$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
16200if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 16201
05ea2a05 16202$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 16203
05ea2a05 16204fi
c906108c 16205
05ea2a05
TT
16206# See if <sys/ptrace.h> supports LWP names on FreeBSD
16207# Older FreeBSD versions don't have the pl_tdname member of
16208# `struct ptrace_lwpinfo'.
16209ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
16210"
16211if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 16212
05ea2a05
TT
16213cat >>confdefs.h <<_ACEOF
16214#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 16215_ACEOF
43b7e92b 16216
05ea2a05 16217
43b7e92b
GB
16218fi
16219
43b7e92b 16220
05ea2a05
TT
16221# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
16222# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
16223# FreeBSD 10.3.
16224ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
16225"
16226if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
16227
16228cat >>confdefs.h <<_ACEOF
16229#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
16230_ACEOF
43b7e92b 16231
43b7e92b 16232
c906108c 16233fi
c906108c 16234
05ea2a05 16235
bc8bcb4b 16236# Check if the compiler supports the `long long' type.
c906108c 16237
81ecdfbb
RW
16238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
16239$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 16240if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 16241 $as_echo_n "(cached) " >&6
97bf5e38 16242else
81ecdfbb 16243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16244/* end confdefs.h. */
bc8bcb4b 16245extern long long foo;
bec39cab
AC
16246int
16247main ()
16248{
bc8bcb4b 16249switch (foo & 2) { case 0: return 1; }
bec39cab
AC
16250 ;
16251 return 0;
16252}
16253_ACEOF
81ecdfbb 16254if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
16255 gdb_cv_c_long_long=yes
16256else
81ecdfbb 16257 gdb_cv_c_long_long=no
97bf5e38 16258fi
81ecdfbb 16259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 16260fi
81ecdfbb
RW
16261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
16262$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 16263if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 16264 # libdecnumber requires long long.
d0ac1c44 16265 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
16266fi
16267
bc8bcb4b 16268# Check if the compiler and runtime support printing long longs.
97bf5e38 16269
81ecdfbb
RW
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
16271$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 16272if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 16273 $as_echo_n "(cached) " >&6
97bf5e38 16274else
81ecdfbb 16275 if test "$cross_compiling" = yes; then :
97bf5e38
MK
16276 gdb_cv_printf_has_long_long=no
16277else
81ecdfbb 16278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16279/* end confdefs.h. */
bc8bcb4b
MK
16280$ac_includes_default
16281int
16282main ()
16283{
16284char buf[32];
97bf5e38
MK
16285 long long l = 0;
16286 l = (l << 16) + 0x0123;
16287 l = (l << 16) + 0x4567;
16288 l = (l << 16) + 0x89ab;
16289 l = (l << 16) + 0xcdef;
16290 sprintf (buf, "0x%016llx", l);
16291 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
16292 ;
16293 return 0;
c906108c 16294}
bec39cab 16295_ACEOF
81ecdfbb 16296if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
16297 gdb_cv_printf_has_long_long=yes
16298else
81ecdfbb 16299 gdb_cv_printf_has_long_long=no
97bf5e38 16300fi
81ecdfbb
RW
16301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16302 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 16303fi
81ecdfbb 16304
97bf5e38 16305fi
81ecdfbb
RW
16306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
16307$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 16308if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 16309
81ecdfbb 16310$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
16311
16312fi
97bf5e38 16313
1a619819
LM
16314# Check if the compiler and runtime support printing decfloats.
16315
81ecdfbb
RW
16316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
16317$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 16318if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 16319 $as_echo_n "(cached) " >&6
1a619819 16320else
81ecdfbb 16321 if test "$cross_compiling" = yes; then :
1a619819
LM
16322 gdb_cv_printf_has_decfloat=no
16323else
81ecdfbb 16324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
16325/* end confdefs.h. */
16326$ac_includes_default
16327int
16328main ()
16329{
16330char buf[64];
16331 _Decimal32 d32 = 1.2345df;
16332 _Decimal64 d64 = 1.2345dd;
16333 _Decimal128 d128 = 1.2345dl;
16334 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
16335 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
16336 ;
16337 return 0;
16338}
16339_ACEOF
81ecdfbb 16340if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
16341 gdb_cv_printf_has_decfloat=yes
16342else
81ecdfbb 16343 gdb_cv_printf_has_decfloat=no
1a619819 16344fi
81ecdfbb
RW
16345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16346 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 16347fi
81ecdfbb 16348
1a619819 16349fi
81ecdfbb
RW
16350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
16351$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 16352if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 16353
81ecdfbb 16354$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
16355
16356fi
16357
bc8bcb4b
MK
16358# Check if the compiler supports the `long double' type. We can't use
16359# AC_C_LONG_DOUBLE because that one does additional checks on the
16360# constants defined in <float.h> that fail on some systems,
16361# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 16362
81ecdfbb
RW
16363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
16364$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 16365if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 16366 $as_echo_n "(cached) " >&6
97bf5e38 16367else
81ecdfbb 16368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16369/* end confdefs.h. */
97bf5e38 16370long double foo;
bec39cab 16371_ACEOF
81ecdfbb 16372if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 16373 gdb_cv_c_long_double=yes
97bf5e38 16374else
81ecdfbb 16375 gdb_cv_c_long_double=no
97bf5e38 16376fi
81ecdfbb 16377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 16378fi
81ecdfbb
RW
16379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
16380$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 16381if test "$gdb_cv_c_long_double" = yes; then
c906108c 16382
81ecdfbb 16383$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
16384
16385fi
16386
bc8bcb4b 16387# Check if the compiler and runtime support printing long doubles.
97bf5e38 16388
81ecdfbb
RW
16389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
16390$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 16391if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 16392 $as_echo_n "(cached) " >&6
97bf5e38 16393else
81ecdfbb 16394 if test "$cross_compiling" = yes; then :
97bf5e38
MK
16395 gdb_cv_printf_has_long_double=no
16396else
81ecdfbb 16397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16398/* end confdefs.h. */
bc8bcb4b
MK
16399$ac_includes_default
16400int
16401main ()
16402{
16403char buf[16];
97bf5e38
MK
16404 long double f = 3.141592653;
16405 sprintf (buf, "%Lg", f);
16406 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
16407 ;
16408 return 0;
97bf5e38 16409}
bec39cab 16410_ACEOF
81ecdfbb 16411if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 16412 gdb_cv_printf_has_long_double=yes
c906108c 16413else
81ecdfbb 16414 gdb_cv_printf_has_long_double=no
c906108c 16415fi
81ecdfbb
RW
16416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16417 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 16418fi
81ecdfbb 16419
c906108c 16420fi
81ecdfbb
RW
16421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
16422$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 16423if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 16424
81ecdfbb 16425$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
16426
16427fi
97bf5e38 16428
bc8bcb4b 16429# Check if the compiler and runtime support scanning long doubles.
97bf5e38 16430
81ecdfbb
RW
16431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
16432$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 16433if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 16434 $as_echo_n "(cached) " >&6
97bf5e38 16435else
81ecdfbb 16436 if test "$cross_compiling" = yes; then :
97bf5e38
MK
16437 gdb_cv_scanf_has_long_double=no
16438else
81ecdfbb 16439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16440/* end confdefs.h. */
bc8bcb4b
MK
16441#include <stdio.h>
16442int
16443main ()
16444{
16445char *buf = "3.141592653";
97bf5e38
MK
16446 long double f = 0;
16447 sscanf (buf, "%Lg", &f);
16448 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
16449 ;
16450 return 0;
97bf5e38 16451}
bec39cab 16452_ACEOF
81ecdfbb 16453if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
16454 gdb_cv_scanf_has_long_double=yes
16455else
81ecdfbb 16456 gdb_cv_scanf_has_long_double=no
97bf5e38 16457fi
81ecdfbb
RW
16458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16459 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 16460fi
81ecdfbb 16461
c906108c 16462fi
81ecdfbb
RW
16463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16464$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 16465if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 16466
81ecdfbb 16467$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
16468
16469fi
c906108c 16470
438013df
AO
16471case ${host_os} in
16472aix*)
81ecdfbb
RW
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16474$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 16475if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 16476 $as_echo_n "(cached) " >&6
438013df 16477else
5593a99a 16478 SAVE_LDFLAGS=$LDFLAGS
bec39cab 16479
5593a99a
SM
16480 case $GCC in
16481 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16482 *) gdb_cv_bigtoc=-bbigtoc ;;
16483 esac
438013df 16484
5593a99a
SM
16485 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16487/* end confdefs.h. */
438013df 16488
bec39cab
AC
16489int
16490main ()
16491{
438013df 16492int i;
bec39cab
AC
16493 ;
16494 return 0;
16495}
16496_ACEOF
81ecdfbb 16497if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16498
81ecdfbb
RW
16499else
16500 gdb_cv_bigtoc=
5593a99a 16501
438013df 16502fi
81ecdfbb
RW
16503rm -f core conftest.err conftest.$ac_objext \
16504 conftest$ac_exeext conftest.$ac_ext
5593a99a 16505 LDFLAGS="${SAVE_LDFLAGS}"
438013df 16506
bec39cab 16507fi
81ecdfbb
RW
16508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16509$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
16510 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16511 ;;
16512esac
16513
38f6b338 16514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 16515$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
16516dynamic_list=false
16517if test "${gdb_native}" = yes; then
16518 # The dynamically loaded libthread_db needs access to symbols in the gdb
16519 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16520 # may not be supported there.
16521 old_LDFLAGS="$LDFLAGS"
16522 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16523 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16524 LDFLAGS="$LDFLAGS $RDYNAMIC"
16525 if test "${have_libpython}" = no; then
16526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
16527/* end confdefs.h. */
16528
16529int
16530main ()
16531{
16532
16533 ;
16534 return 0;
16535}
16536_ACEOF
16537if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
16538 dynamic_list=true
16539fi
16540rm -f core conftest.err conftest.$ac_objext \
16541 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
16542 else
16543 # Workaround http://bugs.python.org/issue4434 where static
16544 # libpythonX.Y.a would get its symbols required for
16545 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16546 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
16547
16548 # Note the workaround for Python
16549 # http://bugs.python.org/issue10112 earlier has removed
16550 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16551 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16552 # always pass.
38f6b338
JK
16553 old_CFLAGS="$CFLAGS"
16554 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
16555 old_LIBS="$LIBS"
16556 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
16557 old_CPPFLAGS="$CPPFLAGS"
16558 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 16559 if test "$cross_compiling" = yes; then :
3bebe2f2 16560 true
f6528abd 16561else
3bebe2f2
JK
16562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16563/* end confdefs.h. */
1b4f615e 16564#include "Python.h"
3bebe2f2
JK
16565int
16566main ()
16567{
16568int err;
38f6b338 16569 Py_Initialize ();
3fed4c0b 16570 err = PyRun_SimpleString ("import ctypes\n");
38f6b338
JK
16571 Py_Finalize ();
16572 return err == 0 ? 0 : 1;
3bebe2f2
JK
16573 ;
16574 return 0;
16575}
16576_ACEOF
16577if ac_fn_c_try_run "$LINENO"; then :
16578 dynamic_list=true
16579fi
16580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16581 conftest.$ac_objext conftest.beam conftest.$ac_ext
16582fi
16583
8c1fb155 16584 LIBS="$old_LIBS"
38f6b338 16585 CFLAGS="$old_CFLAGS"
1b4f615e 16586 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
16587 fi
16588 LDFLAGS="$old_LDFLAGS"
16589fi
16590if $dynamic_list; then
16591 found="-Wl,--dynamic-list"
16592 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 16593else
38f6b338
JK
16594 found="-rdynamic"
16595 RDYNAMIC="-rdynamic"
f6528abd 16596fi
f6528abd 16597
38f6b338 16598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 16599$as_echo "$found" >&6; }
0407b3f1 16600
f6528abd 16601
0ad6b8ee 16602if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 16603 case ${host_os} in
d92419e5 16604 aix*)
81ecdfbb
RW
16605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16606$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 16607 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 16608 $as_echo_n "(cached) " >&6
bec39cab 16609else
81ecdfbb 16610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16611/* end confdefs.h. */
d92419e5 16612#include <sys/pthdebug.h>
bec39cab
AC
16613int
16614main ()
16615{
d92419e5 16616#ifndef PTHDB_VERSION_3
5593a99a
SM
16617 #error
16618 #endif
16619
bec39cab
AC
16620 ;
16621 return 0;
16622}
16623_ACEOF
81ecdfbb 16624if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
16625 gdb_cv_have_aix_thread_debug=yes
16626else
81ecdfbb 16627 gdb_cv_have_aix_thread_debug=no
5593a99a 16628
d92419e5 16629fi
81ecdfbb 16630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16631
d92419e5
JB
16632fi
16633
81ecdfbb
RW
16634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16635$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 16636 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 16637 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 16638 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 16639 LIBS="$LIBS -lpthdebug"
d645e32e
JB
16640
16641 # Older versions of AIX do not provide the declaration for
16642 # the getthrds function (it appears that it was introduced
16643 # with AIX 6.x).
16644 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16645"
d0ac1c44 16646if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
16647 ac_have_decl=1
16648else
16649 ac_have_decl=0
16650fi
16651
16652cat >>confdefs.h <<_ACEOF
16653#define HAVE_DECL_GETTHRDS $ac_have_decl
16654_ACEOF
16655
d92419e5
JB
16656 fi
16657 ;;
c906108c 16658 esac
bec39cab 16659
c906108c
SS
16660fi
16661
3f47be5c 16662if test "x$ac_cv_header_thread_db_h" = "xyes"; then
5593a99a 16663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
81ecdfbb 16664$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 16665if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 16666 $as_echo_n "(cached) " >&6
bec39cab 16667else
81ecdfbb 16668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16669/* end confdefs.h. */
3f47be5c 16670#include <thread_db.h>
bec39cab
AC
16671int
16672main ()
16673{
3f47be5c 16674int i = TD_NOTALLOC;
5593a99a 16675
bec39cab
AC
16676 ;
16677 return 0;
16678}
16679_ACEOF
81ecdfbb 16680if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
16681 gdb_cv_thread_db_h_has_td_notalloc=yes
16682else
81ecdfbb 16683 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 16684
3f47be5c 16685fi
81ecdfbb 16686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 16687
bec39cab 16688fi
81ecdfbb
RW
16689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16690$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
5593a99a
SM
16691
16692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
81ecdfbb 16693$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 16694if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 16695 $as_echo_n "(cached) " >&6
59f80f10 16696else
81ecdfbb 16697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16698/* end confdefs.h. */
16699#include <thread_db.h>
16700int
16701main ()
16702{
16703int i = TD_VERSION;
5593a99a 16704
59f80f10
DJ
16705 ;
16706 return 0;
16707}
16708_ACEOF
81ecdfbb 16709if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16710 gdb_cv_thread_db_h_has_td_version=yes
16711else
81ecdfbb 16712 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
16713
16714fi
81ecdfbb 16715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16716
16717fi
81ecdfbb
RW
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16719$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
5593a99a
SM
16720
16721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
81ecdfbb 16722$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 16723if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 16724 $as_echo_n "(cached) " >&6
59f80f10 16725else
81ecdfbb 16726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16727/* end confdefs.h. */
16728#include <thread_db.h>
16729int
16730main ()
16731{
16732int i = TD_NOTLS;
5593a99a 16733
59f80f10
DJ
16734 ;
16735 return 0;
16736}
16737_ACEOF
81ecdfbb 16738if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16739 gdb_cv_thread_db_h_has_td_notls=yes
16740else
81ecdfbb 16741 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
16742
16743fi
81ecdfbb 16744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16745
16746fi
81ecdfbb
RW
16747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16748$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
16749fi
16750if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 16751
81ecdfbb 16752$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 16753
59f80f10
DJ
16754fi
16755if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16756
81ecdfbb 16757$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
16758
16759fi
16760if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16761
81ecdfbb 16762$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 16763
3f47be5c
EZ
16764fi
16765
e655c1a2
PA
16766case $host_os in
16767 go32* | *djgpp*)
16768 gdbinit=gdb.ini
16769 ;;
16770 *)
16771 gdbinit=.gdbinit
16772 ;;
16773esac
16774
16775cat >>confdefs.h <<_ACEOF
16776#define GDBINIT "$gdbinit"
16777_ACEOF
16778
16779
fb40c209 16780
f83d8a90
DE
16781# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16782# except that the argument to --with-sysroot is optional.
16783# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16784if test "x$with_sysroot" = xyes; then
16785 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16786fi
bec39cab 16787
81ecdfbb
RW
16788# Check whether --with-sysroot was given.
16789if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16790 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16791else
16792 TARGET_SYSTEM_ROOT=
16793fi
030292b7 16794
030292b7 16795
f83d8a90
DE
16796 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16797 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16798 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16799 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16800
f83d8a90
DE
16801cat >>confdefs.h <<_ACEOF
16802#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16803_ACEOF
bec39cab 16804
030292b7 16805
b14b1491 16806
f83d8a90
DE
16807
16808 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16809 if test "x$prefix" = xNONE; then
16810 test_prefix=/usr/local
16811 else
16812 test_prefix=$prefix
16813 fi
16814 else
16815 test_prefix=$exec_prefix
16816 fi
16817 value=0
16818 case ${ac_define_dir} in
16819 "${test_prefix}"|"${test_prefix}/"*|\
16820 '${exec_prefix}'|'${exec_prefix}/'*)
16821 value=1
16822 ;;
16823 esac
16824
16825cat >>confdefs.h <<_ACEOF
16826#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16827_ACEOF
030292b7
DJ
16828
16829
16830
16e7150e 16831
16e7150e 16832
81ecdfbb
RW
16833# Check whether --with-system-gdbinit was given.
16834if test "${with_system_gdbinit+set}" = set; then :
16835 withval=$with_system_gdbinit;
b14b1491
TT
16836 SYSTEM_GDBINIT=$withval
16837else
16838 SYSTEM_GDBINIT=
81ecdfbb
RW
16839fi
16840
16e7150e
JG
16841
16842 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16843 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16844 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16845 ac_define_dir=`eval echo $ac_define_dir`
16846
16847cat >>confdefs.h <<_ACEOF
16848#define SYSTEM_GDBINIT "$ac_define_dir"
16849_ACEOF
16850
16851
16852
0c4a4063 16853
b14b1491
TT
16854 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16855 if test "x$prefix" = xNONE; then
16856 test_prefix=/usr/local
16857 else
16858 test_prefix=$prefix
16859 fi
16860 else
16861 test_prefix=$exec_prefix
16862 fi
16863 value=0
16864 case ${ac_define_dir} in
16865 "${test_prefix}"|"${test_prefix}/"*|\
16866 '${exec_prefix}'|'${exec_prefix}/'*)
16867 value=1
16868 ;;
16869 esac
16e7150e 16870
b14b1491
TT
16871cat >>confdefs.h <<_ACEOF
16872#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16873_ACEOF
16874
b14b1491 16875
16e7150e 16876
0c4a4063 16877
b835bb52 16878
ed2a2229
CB
16879# Check whether --with-system-gdbinit-dir was given.
16880if test "${with_system_gdbinit_dir+set}" = set; then :
16881 withval=$with_system_gdbinit_dir;
16882 SYSTEM_GDBINIT_DIR=$withval
16883else
16884 SYSTEM_GDBINIT_DIR=
16885fi
16886
16887
16888 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16889 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16890 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16891 ac_define_dir=`eval echo $ac_define_dir`
16892
16893cat >>confdefs.h <<_ACEOF
16894#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16895_ACEOF
16896
16897
16898
16899
16900 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16901 if test "x$prefix" = xNONE; then
16902 test_prefix=/usr/local
16903 else
16904 test_prefix=$prefix
16905 fi
16906 else
16907 test_prefix=$exec_prefix
16908 fi
16909 value=0
16910 case ${ac_define_dir} in
16911 "${test_prefix}"|"${test_prefix}/"*|\
16912 '${exec_prefix}'|'${exec_prefix}/'*)
16913 value=1
16914 ;;
16915 esac
16916
16917cat >>confdefs.h <<_ACEOF
16918#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16919_ACEOF
16920
16921
16922
16923
16924
81ecdfbb
RW
16925# Check whether --enable-werror was given.
16926if test "${enable_werror+set}" = set; then :
16927 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16928 yes | y) ERROR_ON_WARNING="yes" ;;
16929 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16930 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16931 esac
81ecdfbb
RW
16932fi
16933
094a342e 16934
9a084706
PA
16935# Enable -Werror by default when using gcc. Turn it off for releases.
16936if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16937 ERROR_ON_WARNING=yes
16938fi
16939
16940WERROR_CFLAGS=""
16941if test "${ERROR_ON_WARNING}" = yes ; then
16942 WERROR_CFLAGS="-Werror"
16943fi
16944
cf6de44d 16945# The options we'll try to enable.
aac331e4 16946build_warnings="-Wall -Wpointer-arith \
a0de763e 16947-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16948-Wno-switch -Wno-char-subscripts \
cf6de44d 16949-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16950-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16951-Wno-mismatched-tags \
632e107b 16952-Wno-error=deprecated-register \
85e26832 16953-Wsuggest-override \
1a34f210 16954-Wimplicit-fallthrough=3 \
96643e35 16955-Wduplicated-cond \
33a6bc35
TT
16956-Wshadow=local \
16957-Wdeprecated-copy \
16958-Wdeprecated-copy-dtor \
bb564c58 16959-Wredundant-move \
8ddd8e0e 16960-Wmissing-declarations \
a0761e34 16961-Wmissing-prototypes \
898e7f60
SM
16962-Wstrict-null-sentinel \
16963"
3bc3d82a 16964
3526781e 16965case "${host}" in
4fa7574e
RO
16966 *-*-mingw32*)
16967 # Enable -Wno-format by default when using gcc on mingw since many
16968 # GCC versions complain about %I64.
16969 build_warnings="$build_warnings -Wno-format" ;;
16970 *-*-solaris*)
16971 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16972 # doesn't understand.
16973 build_warnings="$build_warnings -Wno-unknown-pragmas"
16974 # Solaris 11 <unistd.h> marks vfork deprecated.
16975 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16976 *)
16977 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16978 # but there's a special case for this below.
16979 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16980esac
16981
81ecdfbb
RW
16982# Check whether --enable-build-warnings was given.
16983if test "${enable_build_warnings+set}" = set; then :
16984 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16985 yes) ;;
16986 no) build_warnings="-w";;
16987 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16988 build_warnings="${build_warnings} ${t}";;
16989 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16990 build_warnings="${t} ${build_warnings}";;
16991 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16992esac
d4f3574e 16993if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16994 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16995fi
81ecdfbb
RW
16996fi
16997# Check whether --enable-gdb-build-warnings was given.
16998if test "${enable_gdb_build_warnings+set}" = set; then :
16999 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
17000 yes) ;;
17001 no) build_warnings="-w";;
17002 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17003 build_warnings="${build_warnings} ${t}";;
17004 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17005 build_warnings="${t} ${build_warnings}";;
17006 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17007esac
17008if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17009 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
17010fi
81ecdfbb 17011fi
3bc3d82a
PA
17012
17013# The set of warnings supported by a C++ compiler is not the same as
17014# of the C compiler.
cf6de44d 17015ac_ext=cpp
3bc3d82a
PA
17016ac_cpp='$CXXCPP $CPPFLAGS'
17017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17020
3bc3d82a 17021
81ecdfbb 17022WARN_CFLAGS=""
c906108c
SS
17023if test "x${build_warnings}" != x -a "x$GCC" = xyes
17024then
81ecdfbb
RW
17025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
17026$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
17027 # Separate out the -Werror flag as some files just cannot be
17028 # compiled with it enabled.
17029 for w in ${build_warnings}; do
7544db95
PA
17030 # GCC does not complain about -Wno-unknown-warning. Invert
17031 # and test -Wunknown-warning instead.
17032 case $w in
17033 -Wno-*)
17034 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
17035 -Wformat-nonliteral)
17036 # gcc requires -Wformat before -Wformat-nonliteral
17037 # will work, so stick them together.
17038 w="-Wformat $w"
17039 wtest="$w"
17040 ;;
7544db95
PA
17041 *)
17042 wtest=$w ;;
17043 esac
17044
746a987d
AC
17045 case $w in
17046 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
17047 *)
17048 # Check whether GCC accepts it.
4536bbc6 17049 saved_CFLAGS="$CFLAGS"
3e019bdc 17050 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 17051 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 17052 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
17053 if test "x$w" = "x-Wunused-variable"; then
17054 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
17055 # fixed in GCC 4.9. This test is derived from the gdb
17056 # source code that triggered this bug in GCC.
17057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17058/* end confdefs.h. */
17059struct scoped_restore_base {};
864ca435
SM
17060 struct scoped_restore_tmpl : public scoped_restore_base {
17061 ~scoped_restore_tmpl() {}
17062 };
a0de763e
TT
17063int
17064main ()
17065{
17066const scoped_restore_base &b = scoped_restore_tmpl();
864ca435 17067
a0de763e
TT
17068 ;
17069 return 0;
17070}
17071_ACEOF
17072if ac_fn_cxx_try_compile "$LINENO"; then :
17073 WARN_CFLAGS="${WARN_CFLAGS} $w"
17074fi
17075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17076 else
17077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17078/* end confdefs.h. */
4536bbc6 17079
bec39cab
AC
17080int
17081main ()
17082{
4536bbc6 17083
bec39cab
AC
17084 ;
17085 return 0;
17086}
17087_ACEOF
3bc3d82a 17088if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 17089 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 17090fi
81ecdfbb 17091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 17092 fi
4536bbc6 17093 CFLAGS="$saved_CFLAGS"
3bc3d82a 17094 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
17095 esac
17096 done
81ecdfbb
RW
17097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
17098$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
17099fi
17100
17101
104c1213 17102
cf6de44d 17103ac_ext=c
3bc3d82a
PA
17104ac_cpp='$CPP $CPPFLAGS'
17105ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17106ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17107ac_compiler_gnu=$ac_cv_c_compiler_gnu
17108
3bc3d82a 17109
b835bb52 17110
f35d5ade
TT
17111# Check whether --enable-ubsan was given.
17112if test "${enable_ubsan+set}" = set; then :
17113 enableval=$enable_ubsan;
17114else
eff98030 17115 enable_ubsan=no
f35d5ade
TT
17116fi
17117
17118if test "x$enable_ubsan" = xauto; then
17119 if $development; then
17120 enable_ubsan=yes
17121 fi
17122fi
17123ac_ext=cpp
17124ac_cpp='$CXXCPP $CPPFLAGS'
17125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17128
17129if test "x$enable_ubsan" = xyes; then
17130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
17131$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
17132 saved_CXXFLAGS="$CXXFLAGS"
17133 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17135/* end confdefs.h. */
17136
17137int
17138main ()
17139{
17140
17141 ;
17142 return 0;
17143}
17144_ACEOF
17145if ac_fn_cxx_try_link "$LINENO"; then :
17146 enable_ubsan=yes
17147else
17148 enable_ubsan=no
ad6dba1c 17149
f35d5ade
TT
17150fi
17151rm -f core conftest.err conftest.$ac_objext \
17152 conftest$ac_exeext conftest.$ac_ext
17153 CXXFLAGS="$saved_CXXFLAGS"
17154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
17155$as_echo "$enable_ubsan" >&6; }
17156 if test "x$enable_ubsan" = xyes; then
17157 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17158 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
17159 fi
17160fi
17161ac_ext=c
17162ac_cpp='$CPP $CPPFLAGS'
17163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17165ac_compiler_gnu=$ac_cv_c_compiler_gnu
17166
17167
17168
7a292a7a 17169# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
17170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
17171$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 17172if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 17173 $as_echo_n "(cached) " >&6
bec39cab 17174else
81ecdfbb 17175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17176/* end confdefs.h. */
7a292a7a
SS
17177
17178#if defined (__CYGWIN__) || defined (__CYGWIN32__)
17179lose
17180#endif
bec39cab 17181_ACEOF
7a292a7a 17182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 17183 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
17184 gdb_cv_os_cygwin=yes
17185else
7a292a7a
SS
17186 gdb_cv_os_cygwin=no
17187fi
17188rm -f conftest*
17189
17190fi
81ecdfbb
RW
17191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
17192$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 17193
aff38e61 17194
3eb25fda 17195SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 17196case ${host} in
95cbc983
AC
17197 *go32* ) SER_HARDWIRE=ser-go32.o ;;
17198 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 17199 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 17200 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
17201esac
17202
17203
cd0fc7c3
SS
17204# libreadline needs libuser32.a in a cygwin environment
17205WIN32LIBS=
0ad6b8ee 17206if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
17207 WIN32LIBS="-luser32"
17208 case "${target}" in
17209 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
17210 ;;
17211 esac
cd0fc7c3 17212fi
c906108c 17213
b4505029 17214# The ser-tcp.c module requires sockets.
b2ceabe8
TT
17215# Note that WIN32APILIBS is set by GDB_AC_COMMON.
17216WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 17217
31d99776 17218# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
17219
17220 OLD_CFLAGS=$CFLAGS
17221 OLD_LDFLAGS=$LDFLAGS
17222 OLD_LIBS=$LIBS
17223 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17224 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17225 # always want our bfd.
17226 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
17227 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17228 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 17229 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 17230 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 17231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 17232$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 17233if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 17234 $as_echo_n "(cached) " >&6
31d99776 17235else
81ecdfbb 17236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
17237/* end confdefs.h. */
17238#include <stdlib.h>
b4132322 17239 #include <string.h>
294f2697
SM
17240 #include "bfd.h"
17241 #include "elf-bfd.h"
31d99776
DJ
17242int
17243main ()
17244{
def63ff0 17245return bfd_get_elf_phdr_upper_bound (NULL);
294f2697 17246
31d99776
DJ
17247 ;
17248 return 0;
17249}
17250_ACEOF
81ecdfbb 17251if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
17252 gdb_cv_var_elf=yes
17253else
81ecdfbb 17254 gdb_cv_var_elf=no
294f2697 17255
31d99776 17256fi
81ecdfbb
RW
17257rm -f core conftest.err conftest.$ac_objext \
17258 conftest$ac_exeext conftest.$ac_ext
294f2697 17259
31d99776 17260fi
81ecdfbb
RW
17261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
17262$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
17263 CFLAGS=$OLD_CFLAGS
17264 LDFLAGS=$OLD_LDFLAGS
17265 LIBS=$OLD_LIBS
0ad6b8ee 17266if test "$gdb_cv_var_elf" = yes; then
fb8f3fc0
AB
17267 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
17268 gcore-elf.o elf-none-tdep.o"
31d99776 17269
81ecdfbb 17270$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 17271
075ff26d
JK
17272 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
17273 if test "$plugins" = "yes"; then
a48b32c0
L
17274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17275$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 17276if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
17277 $as_echo_n "(cached) " >&6
17278else
17279 ac_func_search_save_LIBS=$LIBS
17280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17281/* end confdefs.h. */
17282
17283/* Override any GCC internal prototype to avoid an error.
17284 Use char because int might match the return type of a GCC
17285 builtin and then its argument prototype would still apply. */
17286#ifdef __cplusplus
17287extern "C"
17288#endif
17289char dlopen ();
17290int
17291main ()
17292{
17293return dlopen ();
17294 ;
17295 return 0;
17296}
17297_ACEOF
17298for ac_lib in '' dl; do
17299 if test -z "$ac_lib"; then
17300 ac_res="none required"
17301 else
17302 ac_res=-l$ac_lib
17303 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17304 fi
17305 if ac_fn_c_try_link "$LINENO"; then :
17306 ac_cv_search_dlopen=$ac_res
17307fi
17308rm -f core conftest.err conftest.$ac_objext \
17309 conftest$ac_exeext
d0ac1c44 17310 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
17311 break
17312fi
17313done
d0ac1c44 17314if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
17315
17316else
17317 ac_cv_search_dlopen=no
17318fi
17319rm conftest.$ac_ext
17320LIBS=$ac_func_search_save_LIBS
17321fi
17322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17323$as_echo "$ac_cv_search_dlopen" >&6; }
17324ac_res=$ac_cv_search_dlopen
17325if test "$ac_res" != no; then :
17326 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17327
17328fi
17329
075ff26d 17330 fi
31d99776 17331fi
31d99776 17332
4f05add4
TT
17333# Add macho support to GDB, but only if BFD includes it.
17334
17335 OLD_CFLAGS=$CFLAGS
17336 OLD_LDFLAGS=$LDFLAGS
17337 OLD_LIBS=$LIBS
17338 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17339 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17340 # always want our bfd.
17341 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
17342 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17343 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 17344 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 17345 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
17346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
17347$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 17348if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
17349 $as_echo_n "(cached) " >&6
17350else
17351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17352/* end confdefs.h. */
17353#include <stdlib.h>
b4132322 17354 #include <string.h>
294f2697
SM
17355 #include "bfd.h"
17356 #include "mach-o.h"
4f05add4
TT
17357int
17358main ()
17359{
17360return bfd_mach_o_lookup_command (NULL, 0, NULL);
294f2697 17361
4f05add4
TT
17362 ;
17363 return 0;
17364}
17365_ACEOF
17366if ac_fn_c_try_link "$LINENO"; then :
17367 gdb_cv_var_macho=yes
17368else
17369 gdb_cv_var_macho=no
294f2697 17370
4f05add4
TT
17371fi
17372rm -f core conftest.err conftest.$ac_objext \
17373 conftest$ac_exeext conftest.$ac_ext
294f2697 17374
4f05add4
TT
17375fi
17376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
17377$as_echo "$gdb_cv_var_macho" >&6; }
17378 CFLAGS=$OLD_CFLAGS
17379 LDFLAGS=$OLD_LDFLAGS
17380 LIBS=$OLD_LIBS
0ad6b8ee 17381if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
17382 CONFIG_OBS="$CONFIG_OBS machoread.o"
17383fi
17384
121ce6e5
DJ
17385# Add any host-specific objects to GDB.
17386CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
17387
608e2dbb 17388# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 17389if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
17390
17391# Check whether --with-lzma was given.
17392if test "${with_lzma+set}" = set; then :
17393 withval=$with_lzma;
17394else
17395 with_lzma=auto
17396fi
17397
17398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
17399$as_echo_n "checking whether to use lzma... " >&6; }
17400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
17401$as_echo "$with_lzma" >&6; }
17402
17403 if test "${with_lzma}" != no; then
17404
17405
17406
17407
17408
17409
17410
17411
17412 use_additional=yes
17413
17414 acl_save_prefix="$prefix"
17415 prefix="$acl_final_prefix"
17416 acl_save_exec_prefix="$exec_prefix"
17417 exec_prefix="$acl_final_exec_prefix"
17418
17419 eval additional_includedir=\"$includedir\"
17420 eval additional_libdir=\"$libdir\"
17421
17422 exec_prefix="$acl_save_exec_prefix"
17423 prefix="$acl_save_prefix"
17424
17425
17426# Check whether --with-liblzma-prefix was given.
17427if test "${with_liblzma_prefix+set}" = set; then :
17428 withval=$with_liblzma_prefix;
17429 if test "X$withval" = "Xno"; then
17430 use_additional=no
17431 else
17432 if test "X$withval" = "X"; then
17433
17434 acl_save_prefix="$prefix"
17435 prefix="$acl_final_prefix"
17436 acl_save_exec_prefix="$exec_prefix"
17437 exec_prefix="$acl_final_exec_prefix"
17438
17439 eval additional_includedir=\"$includedir\"
17440 eval additional_libdir=\"$libdir\"
17441
17442 exec_prefix="$acl_save_exec_prefix"
17443 prefix="$acl_save_prefix"
17444
17445 else
17446 additional_includedir="$withval/include"
17447 additional_libdir="$withval/lib"
17448 fi
17449 fi
17450
17451fi
17452
9f1528a1
AB
17453
17454# Check whether --with-liblzma-type was given.
17455if test "${with_liblzma_type+set}" = set; then :
17456 withval=$with_liblzma_type; with_liblzma_type=$withval
17457else
17458 with_liblzma_type=auto
17459fi
17460
17461 lib_type=`eval echo \$with_liblzma_type`
17462
608e2dbb
TT
17463 LIBLZMA=
17464 LTLIBLZMA=
17465 INCLZMA=
17466 rpathdirs=
17467 ltrpathdirs=
17468 names_already_handled=
17469 names_next_round='lzma '
17470 while test -n "$names_next_round"; do
17471 names_this_round="$names_next_round"
17472 names_next_round=
17473 for name in $names_this_round; do
17474 already_handled=
17475 for n in $names_already_handled; do
17476 if test "$n" = "$name"; then
17477 already_handled=yes
17478 break
17479 fi
17480 done
17481 if test -z "$already_handled"; then
17482 names_already_handled="$names_already_handled $name"
17483 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17484 eval value=\"\$HAVE_LIB$uppername\"
17485 if test -n "$value"; then
17486 if test "$value" = yes; then
17487 eval value=\"\$LIB$uppername\"
17488 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17489 eval value=\"\$LTLIB$uppername\"
17490 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17491 else
17492 :
17493 fi
17494 else
17495 found_dir=
17496 found_la=
17497 found_so=
17498 found_a=
17499 if test $use_additional = yes; then
9f1528a1 17500 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17501 found_dir="$additional_libdir"
17502 found_so="$additional_libdir/lib$name.$shlibext"
17503 if test -f "$additional_libdir/lib$name.la"; then
17504 found_la="$additional_libdir/lib$name.la"
17505 fi
9f1528a1 17506 elif test x$lib_type != xshared; then
608e2dbb
TT
17507 if test -f "$additional_libdir/lib$name.$libext"; then
17508 found_dir="$additional_libdir"
17509 found_a="$additional_libdir/lib$name.$libext"
17510 if test -f "$additional_libdir/lib$name.la"; then
17511 found_la="$additional_libdir/lib$name.la"
17512 fi
17513 fi
17514 fi
17515 fi
17516 if test "X$found_dir" = "X"; then
17517 for x in $LDFLAGS $LTLIBLZMA; do
17518
17519 acl_save_prefix="$prefix"
17520 prefix="$acl_final_prefix"
17521 acl_save_exec_prefix="$exec_prefix"
17522 exec_prefix="$acl_final_exec_prefix"
17523 eval x=\"$x\"
17524 exec_prefix="$acl_save_exec_prefix"
17525 prefix="$acl_save_prefix"
17526
17527 case "$x" in
17528 -L*)
17529 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 17530 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17531 found_dir="$dir"
17532 found_so="$dir/lib$name.$shlibext"
17533 if test -f "$dir/lib$name.la"; then
17534 found_la="$dir/lib$name.la"
17535 fi
9f1528a1 17536 elif test x$lib_type != xshared; then
608e2dbb
TT
17537 if test -f "$dir/lib$name.$libext"; then
17538 found_dir="$dir"
17539 found_a="$dir/lib$name.$libext"
17540 if test -f "$dir/lib$name.la"; then
17541 found_la="$dir/lib$name.la"
17542 fi
17543 fi
17544 fi
17545 ;;
17546 esac
17547 if test "X$found_dir" != "X"; then
17548 break
17549 fi
17550 done
17551 fi
17552 if test "X$found_dir" != "X"; then
17553 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17554 if test "X$found_so" != "X"; then
17555 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17556 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17557 else
17558 haveit=
17559 for x in $ltrpathdirs; do
17560 if test "X$x" = "X$found_dir"; then
17561 haveit=yes
17562 break
17563 fi
17564 done
17565 if test -z "$haveit"; then
17566 ltrpathdirs="$ltrpathdirs $found_dir"
17567 fi
17568 if test "$hardcode_direct" = yes; then
17569 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17570 else
17571 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17572 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17573 haveit=
17574 for x in $rpathdirs; do
17575 if test "X$x" = "X$found_dir"; then
17576 haveit=yes
17577 break
17578 fi
17579 done
17580 if test -z "$haveit"; then
17581 rpathdirs="$rpathdirs $found_dir"
17582 fi
17583 else
17584 haveit=
17585 for x in $LDFLAGS $LIBLZMA; do
17586
17587 acl_save_prefix="$prefix"
17588 prefix="$acl_final_prefix"
17589 acl_save_exec_prefix="$exec_prefix"
17590 exec_prefix="$acl_final_exec_prefix"
17591 eval x=\"$x\"
17592 exec_prefix="$acl_save_exec_prefix"
17593 prefix="$acl_save_prefix"
17594
17595 if test "X$x" = "X-L$found_dir"; then
17596 haveit=yes
17597 break
17598 fi
17599 done
17600 if test -z "$haveit"; then
17601 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17602 fi
17603 if test "$hardcode_minus_L" != no; then
17604 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17605 else
17606 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17607 fi
17608 fi
17609 fi
17610 fi
17611 else
17612 if test "X$found_a" != "X"; then
17613 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17614 else
17615 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17616 fi
17617 fi
17618 additional_includedir=
17619 case "$found_dir" in
17620 */lib | */lib/)
17621 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17622 additional_includedir="$basedir/include"
17623 ;;
17624 esac
17625 if test "X$additional_includedir" != "X"; then
17626 if test "X$additional_includedir" != "X/usr/include"; then
17627 haveit=
17628 if test "X$additional_includedir" = "X/usr/local/include"; then
17629 if test -n "$GCC"; then
17630 case $host_os in
17631 linux*) haveit=yes;;
17632 esac
17633 fi
17634 fi
17635 if test -z "$haveit"; then
17636 for x in $CPPFLAGS $INCLZMA; do
17637
17638 acl_save_prefix="$prefix"
17639 prefix="$acl_final_prefix"
17640 acl_save_exec_prefix="$exec_prefix"
17641 exec_prefix="$acl_final_exec_prefix"
17642 eval x=\"$x\"
17643 exec_prefix="$acl_save_exec_prefix"
17644 prefix="$acl_save_prefix"
17645
17646 if test "X$x" = "X-I$additional_includedir"; then
17647 haveit=yes
17648 break
17649 fi
17650 done
17651 if test -z "$haveit"; then
17652 if test -d "$additional_includedir"; then
17653 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17654 fi
17655 fi
17656 fi
17657 fi
17658 fi
17659 if test -n "$found_la"; then
17660 save_libdir="$libdir"
17661 case "$found_la" in
17662 */* | *\\*) . "$found_la" ;;
17663 *) . "./$found_la" ;;
17664 esac
17665 libdir="$save_libdir"
17666 for dep in $dependency_libs; do
17667 case "$dep" in
17668 -L*)
17669 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17670 if test "X$additional_libdir" != "X/usr/lib"; then
17671 haveit=
17672 if test "X$additional_libdir" = "X/usr/local/lib"; then
17673 if test -n "$GCC"; then
17674 case $host_os in
17675 linux*) haveit=yes;;
17676 esac
17677 fi
17678 fi
17679 if test -z "$haveit"; then
17680 haveit=
17681 for x in $LDFLAGS $LIBLZMA; do
17682
17683 acl_save_prefix="$prefix"
17684 prefix="$acl_final_prefix"
17685 acl_save_exec_prefix="$exec_prefix"
17686 exec_prefix="$acl_final_exec_prefix"
17687 eval x=\"$x\"
17688 exec_prefix="$acl_save_exec_prefix"
17689 prefix="$acl_save_prefix"
17690
17691 if test "X$x" = "X-L$additional_libdir"; then
17692 haveit=yes
17693 break
17694 fi
17695 done
17696 if test -z "$haveit"; then
17697 if test -d "$additional_libdir"; then
17698 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17699 fi
17700 fi
17701 haveit=
17702 for x in $LDFLAGS $LTLIBLZMA; do
17703
17704 acl_save_prefix="$prefix"
17705 prefix="$acl_final_prefix"
17706 acl_save_exec_prefix="$exec_prefix"
17707 exec_prefix="$acl_final_exec_prefix"
17708 eval x=\"$x\"
17709 exec_prefix="$acl_save_exec_prefix"
17710 prefix="$acl_save_prefix"
17711
17712 if test "X$x" = "X-L$additional_libdir"; then
17713 haveit=yes
17714 break
17715 fi
17716 done
17717 if test -z "$haveit"; then
17718 if test -d "$additional_libdir"; then
17719 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17720 fi
17721 fi
17722 fi
17723 fi
17724 ;;
17725 -R*)
17726 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17727 if test "$enable_rpath" != no; then
17728 haveit=
17729 for x in $rpathdirs; do
17730 if test "X$x" = "X$dir"; then
17731 haveit=yes
17732 break
17733 fi
17734 done
17735 if test -z "$haveit"; then
17736 rpathdirs="$rpathdirs $dir"
17737 fi
17738 haveit=
17739 for x in $ltrpathdirs; do
17740 if test "X$x" = "X$dir"; then
17741 haveit=yes
17742 break
17743 fi
17744 done
17745 if test -z "$haveit"; then
17746 ltrpathdirs="$ltrpathdirs $dir"
17747 fi
17748 fi
17749 ;;
17750 -l*)
17751 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17752 ;;
17753 *.la)
17754 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17755 ;;
17756 *)
17757 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17758 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17759 ;;
17760 esac
17761 done
17762 fi
17763 else
9f1528a1
AB
17764 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17765 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17766 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17767 else
17768 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17769 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17770 fi
608e2dbb
TT
17771 fi
17772 fi
17773 fi
17774 done
17775 done
17776 if test "X$rpathdirs" != "X"; then
17777 if test -n "$hardcode_libdir_separator"; then
17778 alldirs=
17779 for found_dir in $rpathdirs; do
17780 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17781 done
17782 acl_save_libdir="$libdir"
17783 libdir="$alldirs"
17784 eval flag=\"$hardcode_libdir_flag_spec\"
17785 libdir="$acl_save_libdir"
17786 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17787 else
17788 for found_dir in $rpathdirs; do
17789 acl_save_libdir="$libdir"
17790 libdir="$found_dir"
17791 eval flag=\"$hardcode_libdir_flag_spec\"
17792 libdir="$acl_save_libdir"
17793 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17794 done
17795 fi
17796 fi
17797 if test "X$ltrpathdirs" != "X"; then
17798 for found_dir in $ltrpathdirs; do
17799 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17800 done
17801 fi
17802
17803
17804 ac_save_CPPFLAGS="$CPPFLAGS"
17805
17806 for element in $INCLZMA; do
17807 haveit=
17808 for x in $CPPFLAGS; do
17809
17810 acl_save_prefix="$prefix"
17811 prefix="$acl_final_prefix"
17812 acl_save_exec_prefix="$exec_prefix"
17813 exec_prefix="$acl_final_exec_prefix"
17814 eval x=\"$x\"
17815 exec_prefix="$acl_save_exec_prefix"
17816 prefix="$acl_save_prefix"
17817
17818 if test "X$x" = "X$element"; then
17819 haveit=yes
17820 break
17821 fi
17822 done
17823 if test -z "$haveit"; then
17824 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17825 fi
17826 done
17827
17828
17829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17830$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 17831if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
17832 $as_echo_n "(cached) " >&6
17833else
17834
17835 ac_save_LIBS="$LIBS"
17836 LIBS="$LIBS $LIBLZMA"
17837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17838/* end confdefs.h. */
17839#include "lzma.h"
17840int
17841main ()
17842{
17843lzma_index_iter iter;
17844 lzma_index_iter_init (&iter, 0);
17845 lzma_mf_is_supported (LZMA_MF_HC3);
17846 ;
17847 return 0;
17848}
17849_ACEOF
17850if ac_fn_c_try_link "$LINENO"; then :
17851 ac_cv_liblzma=yes
17852else
17853 ac_cv_liblzma=no
17854fi
17855rm -f core conftest.err conftest.$ac_objext \
17856 conftest$ac_exeext conftest.$ac_ext
17857 LIBS="$ac_save_LIBS"
17858
17859fi
17860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17861$as_echo "$ac_cv_liblzma" >&6; }
17862 if test "$ac_cv_liblzma" = yes; then
17863 HAVE_LIBLZMA=yes
17864
17865$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17866
17867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17868$as_echo_n "checking how to link with liblzma... " >&6; }
17869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17870$as_echo "$LIBLZMA" >&6; }
17871 else
17872 HAVE_LIBLZMA=no
17873 CPPFLAGS="$ac_save_CPPFLAGS"
17874 LIBLZMA=
17875 LTLIBLZMA=
17876 fi
17877
17878
17879
17880
17881
17882
17883 if test "$HAVE_LIBLZMA" != yes; then
17884 if test "$with_lzma" = yes; then
d0ac1c44 17885 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17886 fi
17887 fi
17888 fi
17889fi
17890
3fc11d3e
JM
17891LIBGUI="../libgui/src/libgui.a"
17892GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17893
17894
7a292a7a 17895
3fc11d3e
JM
17896WIN32LDAPP=
17897
17898
17899
d91670b9 17900case "${host}" in
686a5eed 17901*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17902 configdir="win"
17903 ;;
17904*)
17905 configdir="unix"
17906 ;;
17907esac
3fc11d3e
JM
17908
17909GDBTKLIBS=
17910if test "${enable_gdbtk}" = "yes"; then
17911
d1c3b63a
KS
17912 # Gdbtk must have an absolute path to srcdir in order to run
17913 # properly when not installed.
17914 here=`pwd`
17915 cd ${srcdir}
17916 GDBTK_SRC_DIR=`pwd`
17917 cd $here
17918
bec39cab 17919
5062cc19
KS
17920 #
17921 # Ok, lets find the tcl configuration
17922 # First, look for one uninstalled.
17923 # the alternative search directory is invoked by --with-tcl
17924 #
3fc11d3e 17925
5062cc19
KS
17926 if test x"${no_tcl}" = x ; then
17927 # we reset no_tcl in case something fails here
17928 no_tcl=true
bec39cab 17929
81ecdfbb
RW
17930# Check whether --with-tcl was given.
17931if test "${with_tcl+set}" = set; then :
17932 withval=$with_tcl; with_tclconfig=${withval}
17933fi
17934
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17936$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17937 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17938 $as_echo_n "(cached) " >&6
3fc11d3e 17939else
bec39cab 17940
3fc11d3e 17941
5062cc19
KS
17942 # First check to see if --with-tcl was specified.
17943 case "${host}" in
17944 *-*-cygwin*) platDir="win" ;;
17945 *) platDir="unix" ;;
17946 esac
17947 if test x"${with_tclconfig}" != x ; then
17948 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17949 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17950 else
d0ac1c44 17951 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17952 fi
17953 fi
17954
17955 # then check for a private Tcl installation
17956 if test x"${ac_cv_c_tclconfig}" = x ; then
17957 for i in \
17958 ../tcl \
17959 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17960 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17961 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17962 ../../tcl \
17963 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17964 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17965 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17966 ../../../tcl \
17967 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17968 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17969 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17970 if test -f "$i/$platDir/tclConfig.sh" ; then
17971 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17972 break
17973 fi
17974 done
17975 fi
17976
17977 # on Darwin, check in Framework installation locations
17978 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17979 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17980 `ls -d /Library/Frameworks 2>/dev/null` \
17981 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17982 `ls -d /System/Library/Frameworks 2>/dev/null` \
17983 ; do
17984 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17985 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17986 break
17987 fi
17988 done
17989 fi
17990
17991 # check in a few common install locations
17992 if test x"${ac_cv_c_tclconfig}" = x ; then
17993 for i in `ls -d ${libdir} 2>/dev/null` \
17994 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17995 `ls -d ${prefix}/lib 2>/dev/null` \
17996 `ls -d /usr/local/lib 2>/dev/null` \
17997 `ls -d /usr/contrib/lib 2>/dev/null` \
17998 `ls -d /usr/lib 2>/dev/null` \
17999 ; do
18000 if test -f "$i/tclConfig.sh" ; then
18001 ac_cv_c_tclconfig=`(cd $i; pwd)`
18002 break
18003 fi
18004 done
18005 fi
3fc11d3e 18006
5062cc19
KS
18007 # check in a few other private locations
18008 if test x"${ac_cv_c_tclconfig}" = x ; then
18009 for i in \
18010 ${srcdir}/../tcl \
18011 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18012 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
18013 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
18014 if test -f "$i/$platDir/tclConfig.sh" ; then
18015 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18016 break
18017 fi
18018 done
18019 fi
bec39cab 18020
3fc11d3e
JM
18021fi
18022
5062cc19
KS
18023
18024 if test x"${ac_cv_c_tclconfig}" = x ; then
18025 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
18026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
18027$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
18028 else
18029 no_tcl=
18030 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
18031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
18032$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
18033 fi
18034 fi
3fc11d3e 18035
bec39cab 18036
85541719
DE
18037 # If $no_tk is nonempty, then we can't do Tk, and there is no
18038 # point to doing Tcl.
bec39cab 18039
5062cc19
KS
18040 #
18041 # Ok, lets find the tk configuration
18042 # First, look for one uninstalled.
18043 # the alternative search directory is invoked by --with-tk
18044 #
3fc11d3e 18045
5062cc19
KS
18046 if test x"${no_tk}" = x ; then
18047 # we reset no_tk in case something fails here
18048 no_tk=true
bec39cab 18049
81ecdfbb
RW
18050# Check whether --with-tk was given.
18051if test "${with_tk+set}" = set; then :
18052 withval=$with_tk; with_tkconfig=${withval}
18053fi
18054
18055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
18056$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 18057 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 18058 $as_echo_n "(cached) " >&6
bec39cab 18059else
3fc11d3e
JM
18060
18061
5062cc19
KS
18062 # First check to see if --with-tkconfig was specified.
18063 if test x"${with_tkconfig}" != x ; then
18064 if test -f "${with_tkconfig}/tkConfig.sh" ; then
18065 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
18066 else
d0ac1c44 18067 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
18068 fi
18069 fi
3fc11d3e 18070
5062cc19
KS
18071 # then check for a private Tk library
18072 case "${host}" in
18073 *-*-cygwin*) platDir="win" ;;
18074 *) platDir="unix" ;;
18075 esac
18076 if test x"${ac_cv_c_tkconfig}" = x ; then
18077 for i in \
18078 ../tk \
18079 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18080 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
18081 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
18082 ../../tk \
18083 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18084 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
18085 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
18086 ../../../tk \
18087 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18088 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
18089 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
18090 if test -f "$i/$platDir/tkConfig.sh" ; then
18091 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18092 break
18093 fi
18094 done
18095 fi
18096
18097 # on Darwin, check in Framework installation locations
18098 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
18099 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18100 `ls -d /Library/Frameworks 2>/dev/null` \
18101 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18102 `ls -d /System/Library/Frameworks 2>/dev/null` \
18103 ; do
18104 if test -f "$i/Tk.framework/tkConfig.sh" ; then
18105 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
18106 break
18107 fi
18108 done
18109 fi
18110
18111 # check in a few common install locations
18112 if test x"${ac_cv_c_tkconfig}" = x ; then
18113 for i in `ls -d ${libdir} 2>/dev/null` \
18114 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18115 `ls -d ${prefix}/lib 2>/dev/null` \
18116 `ls -d /usr/local/lib 2>/dev/null` \
18117 `ls -d /usr/contrib/lib 2>/dev/null` \
18118 `ls -d /usr/lib 2>/dev/null` \
18119 ; do
18120 if test -f "$i/tkConfig.sh" ; then
18121 ac_cv_c_tkconfig=`(cd $i; pwd)`
18122 break
18123 fi
18124 done
18125 fi
18126 # check in a few other private locations
18127 if test x"${ac_cv_c_tkconfig}" = x ; then
18128 for i in \
18129 ${srcdir}/../tk \
18130 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18131 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
18132 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
18133 if test -f "$i/$platDir/tkConfig.sh" ; then
18134 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18135 break
18136 fi
18137 done
18138 fi
3fc11d3e 18139
3fc11d3e
JM
18140fi
18141
18142
5062cc19
KS
18143 if test x"${ac_cv_c_tkconfig}" = x ; then
18144 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
18145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
18146$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
18147 else
18148 no_tk=
18149 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
18151$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 18152 fi
3fc11d3e 18153 fi
dd2504ab 18154
dd2504ab 18155
85541719
DE
18156 if test -z "${no_tcl}" -a -z "${no_tk}"; then
18157
81ecdfbb
RW
18158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
18159$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
18160
18161 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
18162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18163$as_echo "loading" >&6; }
85541719
DE
18164 . ${TCL_BIN_DIR}/tclConfig.sh
18165 else
81ecdfbb
RW
18166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
18167$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
18168 fi
18169
18170 # eval is required to do the TCL_DBGX substitution
18171 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
18172 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18173
18174 # If the TCL_BIN_DIR is the build directory (not the install directory),
18175 # then set the common variable name to the value of the build variables.
18176 # For example, the variable TCL_LIB_SPEC will be set to the value
18177 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
18178 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
18179 # installed and uninstalled version of Tcl.
18180 if test -f "${TCL_BIN_DIR}/Makefile" ; then
18181 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
18182 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
18183 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
18184 elif test "`uname -s`" = "Darwin"; then
18185 # If Tcl was built as a framework, attempt to use the libraries
18186 # from the framework at the given location so that linking works
a68ffae9 18187 # against Tcl.framework installed in an arbitrary location.
85541719
DE
18188 case ${TCL_DEFS} in
18189 *TCL_FRAMEWORK*)
18190 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
18191 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
18192 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
18193 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
18194 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
18195 break
18196 fi
18197 done
18198 fi
18199 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
18200 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
18201 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
18202 fi
18203 ;;
18204 esac
18205 fi
18206
18207 # eval is required to do the TCL_DBGX substitution
18208 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
18209 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
18210 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
18211 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227 # Check for in-tree tcl
18228 here=`pwd`
18229 cd ${srcdir}/..
18230 topdir=`pwd`
18231 cd ${here}
18232
18233 intree="no"
18234 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
18235 intree="yes"
18236 fi
18237
18238 # Find Tcl private headers
18239 if test x"${intree}" = xno; then
18240
81ecdfbb
RW
18241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
18242$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
18243 private_dir=""
18244 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
18245 if test -f ${dir}/tclInt.h ; then
18246 private_dir=${dir}
18247 fi
18248
18249 if test x"${private_dir}" = x; then
d0ac1c44 18250 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
18251 else
18252 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
18253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18254$as_echo "${private_dir}" >&6; }
85541719
DE
18255 fi
18256
18257 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
18258 TCL_LIBRARY="${TCL_LIB_SPEC}"
18259 TCL_DEPS=""
18260 else
18261 # If building tcl in the same src tree, private headers
18262 # are not needed, but we need to be sure to use the right
18263 # headers library
18264 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
18265 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
18266 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
18267 fi
18268
18269
18270
18271
18272
81ecdfbb
RW
18273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
18274$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 18275
5062cc19 18276 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
18277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18278$as_echo "loading" >&6; }
5062cc19 18279 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 18280 else
81ecdfbb
RW
18281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
18282$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 18283 fi
bec39cab 18284
5062cc19
KS
18285 # eval is required to do the TK_DBGX substitution
18286 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
18287 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
18288
18289 # If the TK_BIN_DIR is the build directory (not the install directory),
18290 # then set the common variable name to the value of the build variables.
18291 # For example, the variable TK_LIB_SPEC will be set to the value
18292 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
18293 # instead of TK_BUILD_LIB_SPEC since it will work with both an
18294 # installed and uninstalled version of Tcl.
85541719 18295 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
18296 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
18297 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
18298 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
18299 elif test "`uname -s`" = "Darwin"; then
18300 # If Tk was built as a framework, attempt to use the libraries
18301 # from the framework at the given location so that linking works
a68ffae9 18302 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
18303 case ${TK_DEFS} in
18304 *TK_FRAMEWORK*)
85541719 18305 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
18306 for i in "`cd ${TK_BIN_DIR}; pwd`" \
18307 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
18308 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
18309 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
18310 break
18311 fi
18312 done
18313 fi
85541719 18314 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
18315 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
18316 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
18317 fi
18318 ;;
18319 esac
3fc11d3e
JM
18320 fi
18321
5062cc19
KS
18322 # eval is required to do the TK_DBGX substitution
18323 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
18324 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
18325 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
18326 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 18327
3fc11d3e
JM
18328
18329
bec39cab
AC
18330
18331
18332
18333
18334
18335
18336
3fc11d3e 18337
3fc11d3e 18338
bec39cab 18339
bec39cab 18340
85541719
DE
18341 # Check for in-tree Tk
18342 intree="no"
18343 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
18344 intree="yes"
18345 fi
3fc11d3e 18346
85541719
DE
18347 # Find Tk private headers
18348 if test x"${intree}" = xno; then
3fc11d3e 18349
81ecdfbb
RW
18350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
18351$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
18352 private_dir=""
18353 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
18354 if test -f ${dir}/tkInt.h; then
18355 private_dir=${dir}
3fc11d3e 18356 fi
bec39cab 18357
5062cc19 18358 if test x"${private_dir}" = x; then
d0ac1c44 18359 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 18360 else
5062cc19 18361 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
18362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18363$as_echo "${private_dir}" >&6; }
3fc11d3e 18364 fi
3fc11d3e 18365
85541719
DE
18366 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
18367 TK_LIBRARY=${TK_LIB_SPEC}
18368 TK_DEPS=""
18369 else
18370 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
18371 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
18372 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
18373 fi
3fc11d3e
JM
18374
18375
3fc11d3e
JM
18376
18377
3fc11d3e 18378
85541719 18379 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 18380
85541719
DE
18381 # Include some libraries that Tcl and Tk want.
18382 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
18383 # Yes, the ordering seems wrong here. But it isn't.
18384 # TK_LIBS is the list of libraries that need to be linked
18385 # after Tcl/Tk. Note that this isn't put into LIBS. If it
18386 # were in LIBS then any link tests after this point would
18387 # try to include things like `$(LIBGUI)', which wouldn't work.
18388 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 18389
85541719
DE
18390 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
18391 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
18392 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
18393 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
18394 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
18395 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
18396 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 18397
0ad6b8ee 18398 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
18399 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
18400 WIN32LDAPP="-Wl,--subsystem,console"
18401 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 18402 fi
ffc6a242 18403
81ecdfbb 18404 subdirs="$subdirs gdbtk"
3ace7edb 18405
85541719 18406 fi
3fc11d3e
JM
18407fi
18408
18409
18410
18411
18412
18413
18414
18415
81ecdfbb
RW
18416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
18417$as_echo_n "checking for X... " >&6; }
bec39cab 18418
c906108c 18419
81ecdfbb
RW
18420# Check whether --with-x was given.
18421if test "${with_x+set}" = set; then :
18422 withval=$with_x;
18423fi
c906108c
SS
18424
18425# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
18426if test "x$with_x" = xno; then
18427 # The user explicitly disabled X.
18428 have_x=disabled
18429else
81ecdfbb 18430 case $x_includes,$x_libraries in #(
d0ac1c44
SM
18431 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
18432 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 18433 $as_echo_n "(cached) " >&6
c906108c
SS
18434else
18435 # One or both of the vars are not set, and there is no cached value.
bec39cab 18436ac_x_includes=no ac_x_libraries=no
81ecdfbb 18437rm -f -r conftest.dir
bec39cab
AC
18438if mkdir conftest.dir; then
18439 cd conftest.dir
bec39cab 18440 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
18441incroot:
18442 @echo incroot='${INCROOT}'
18443usrlibdir:
18444 @echo usrlibdir='${USRLIBDIR}'
18445libdir:
18446 @echo libdir='${LIBDIR}'
18447_ACEOF
18448 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 18449 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
18450 for ac_var in incroot usrlibdir libdir; do
18451 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
18452 done
c906108c 18453 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
18454 for ac_extension in a so sl dylib la dll; do
18455 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
18456 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 18457 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
18458 fi
18459 done
18460 # Screen out bogus values from the imake configuration. They are
18461 # bogus both because they are the default anyway, and because
18462 # using them would break gcc on systems where it needs fixed includes.
bec39cab 18463 case $ac_im_incroot in
81ecdfbb 18464 /usr/include) ac_x_includes= ;;
bec39cab 18465 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 18466 esac
bec39cab 18467 case $ac_im_usrlibdir in
81ecdfbb 18468 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 18469 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
18470 esac
18471 fi
18472 cd ..
81ecdfbb 18473 rm -f -r conftest.dir
c906108c
SS
18474fi
18475
bec39cab
AC
18476# Standard set of common directories for X headers.
18477# Check X11 before X11Rn because it is often a symlink to the current release.
18478ac_x_header_dirs='
18479/usr/X11/include
81ecdfbb 18480/usr/X11R7/include
bec39cab
AC
18481/usr/X11R6/include
18482/usr/X11R5/include
18483/usr/X11R4/include
18484
18485/usr/include/X11
81ecdfbb 18486/usr/include/X11R7
bec39cab
AC
18487/usr/include/X11R6
18488/usr/include/X11R5
18489/usr/include/X11R4
18490
18491/usr/local/X11/include
81ecdfbb 18492/usr/local/X11R7/include
bec39cab
AC
18493/usr/local/X11R6/include
18494/usr/local/X11R5/include
18495/usr/local/X11R4/include
18496
18497/usr/local/include/X11
81ecdfbb 18498/usr/local/include/X11R7
bec39cab
AC
18499/usr/local/include/X11R6
18500/usr/local/include/X11R5
18501/usr/local/include/X11R4
18502
18503/usr/X386/include
18504/usr/x386/include
18505/usr/XFree86/include/X11
18506
18507/usr/include
18508/usr/local/include
18509/usr/unsupported/include
18510/usr/athena/include
18511/usr/local/x11r5/include
18512/usr/lpp/Xamples/include
18513
18514/usr/openwin/include
18515/usr/openwin/share/include'
18516
18517if test "$ac_x_includes" = no; then
81ecdfbb 18518 # Guess where to find include files, by looking for Xlib.h.
c906108c 18519 # First, try using that file with no special directory specified.
81ecdfbb 18520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18521/* end confdefs.h. */
81ecdfbb 18522#include <X11/Xlib.h>
bec39cab 18523_ACEOF
81ecdfbb 18524if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
18525 # We can compile using X headers with no special include directory.
18526ac_x_includes=
18527else
bec39cab 18528 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 18529 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
18530 ac_x_includes=$ac_dir
18531 break
18532 fi
18533done
c906108c 18534fi
d0ac1c44 18535rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 18536fi # $ac_x_includes = no
c906108c 18537
bec39cab 18538if test "$ac_x_libraries" = no; then
c906108c 18539 # Check for the libraries.
c906108c
SS
18540 # See if we find them without any special options.
18541 # Don't add to $LIBS permanently.
bec39cab 18542 ac_save_LIBS=$LIBS
81ecdfbb
RW
18543 LIBS="-lX11 $LIBS"
18544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18545/* end confdefs.h. */
81ecdfbb 18546#include <X11/Xlib.h>
bec39cab
AC
18547int
18548main ()
18549{
81ecdfbb 18550XrmInitialize ()
bec39cab
AC
18551 ;
18552 return 0;
18553}
18554_ACEOF
81ecdfbb 18555if ac_fn_c_try_link "$LINENO"; then :
bec39cab 18556 LIBS=$ac_save_LIBS
c906108c
SS
18557# We can link X programs with no special library path.
18558ac_x_libraries=
18559else
81ecdfbb
RW
18560 LIBS=$ac_save_LIBS
18561for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 18562do
bec39cab 18563 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
18564 for ac_extension in a so sl dylib la dll; do
18565 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
18566 ac_x_libraries=$ac_dir
18567 break 2
18568 fi
18569 done
18570done
18571fi
81ecdfbb
RW
18572rm -f core conftest.err conftest.$ac_objext \
18573 conftest$ac_exeext conftest.$ac_ext
bec39cab 18574fi # $ac_x_libraries = no
c906108c 18575
81ecdfbb
RW
18576case $ac_x_includes,$ac_x_libraries in #(
18577 no,* | *,no | *\'*)
18578 # Didn't find X, or a directory has "'" in its name.
18579 ac_cv_have_x="have_x=no";; #(
18580 *)
18581 # Record where we found X for the cache.
18582 ac_cv_have_x="have_x=yes\
18583 ac_x_includes='$ac_x_includes'\
18584 ac_x_libraries='$ac_x_libraries'"
18585esac
c906108c 18586fi
81ecdfbb
RW
18587;; #(
18588 *) have_x=yes;;
18589 esac
c906108c
SS
18590 eval "$ac_cv_have_x"
18591fi # $with_x != no
18592
18593if test "$have_x" != yes; then
81ecdfbb
RW
18594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18595$as_echo "$have_x" >&6; }
c906108c
SS
18596 no_x=yes
18597else
18598 # If each of the values was on the command line, it overrides each guess.
18599 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18600 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18601 # Update the cache value to reflect the command line values.
81ecdfbb
RW
18602 ac_cv_have_x="have_x=yes\
18603 ac_x_includes='$x_includes'\
18604 ac_x_libraries='$x_libraries'"
18605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18606$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
18607fi
18608
18609
bec39cab 18610# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 18611# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
18612# This code just checks for a few cases where we'd like to ignore those
18613# definitions, even when they're present in the '.mt' file. These cases
18614# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 18615# not part of the source tree.
7a292a7a 18616#
81ecdfbb
RW
18617# Check whether --enable-sim was given.
18618if test "${enable_sim+set}" = set; then :
18619 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
18620 echo "enableval = ${enableval}";
18621 case "${enableval}" in
18622 yes) ignore_sim=false ;;
18623 no) ignore_sim=true ;;
18624 *) ignore_sim=false ;;
18625 esac
18626else
18627 ignore_sim=false
81ecdfbb
RW
18628fi
18629
7a292a7a
SS
18630
18631if test ! -d "${srcdir}/../sim"; then
18632 ignore_sim=true
18633fi
18634
9b624dbe
UW
18635SIM=
18636SIM_OBS=
18637if test "${ignore_sim}" = "false"; then
18638 if test x"${gdb_sim}" != x ; then
18639 SIM="${gdb_sim}"
18640 SIM_OBS="remote-sim.o"
60ca704f 18641
81ecdfbb 18642$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 18643
976102cd
PA
18644
18645 # Some tdep code should only be compiled in when the ppc sim is
18646 # built. PR sim/13418.
18647 case $target in
18648 powerpc*-*-*)
18649
18650$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18651
18652 ;;
18653 esac
9b624dbe 18654 fi
7a292a7a
SS
18655fi
18656
18657
18658
c906108c
SS
18659
18660
18661
18662
18663
18664
dfcd3bfb 18665
e56ac5c3
AC
18666
18667
b3a90332
AC
18668
18669
c35f4ffc 18670# List of host floatformats.
bec39cab
AC
18671
18672cat >>confdefs.h <<_ACEOF
c35f4ffc 18673#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 18674_ACEOF
c35f4ffc 18675
bec39cab
AC
18676
18677cat >>confdefs.h <<_ACEOF
c35f4ffc 18678#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
18679_ACEOF
18680
c35f4ffc 18681
bec39cab 18682cat >>confdefs.h <<_ACEOF
c35f4ffc 18683#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 18684_ACEOF
c35f4ffc
AC
18685
18686
c906108c
SS
18687# target_subdir is used by the testsuite to find the target libraries.
18688target_subdir=
18689if test "${host}" != "${target}"; then
18690 target_subdir="${target_alias}/"
18691fi
18692
18693
21ea5acd 18694# Import nat definitions.
2b351b19 18695nat_makefile_frag=/dev/null
771b4502 18696if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
18697 . ${srcdir}/configure.nat
18698 nativefile=$NAT_FILE
c906108c 18699fi
c906108c 18700
c906108c
SS
18701
18702
18703
21ea5acd
SDJ
18704
18705
18706
18707
18708
c906108c
SS
18709
18710
b00a8037 18711if test x"${gdb_osabi}" != x ; then
bec39cab
AC
18712
18713cat >>confdefs.h <<_ACEOF
b00a8037 18714#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 18715_ACEOF
b00a8037
DJ
18716
18717fi
18718
393fd4c3
YQ
18719# Check for babeltrace and babeltrace-ctf
18720
18721# Check whether --with-babeltrace was given.
18722if test "${with_babeltrace+set}" = set; then :
18723 withval=$with_babeltrace;
18724else
18725 with_babeltrace=auto
18726fi
18727
18728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18729$as_echo_n "checking whether to use babeltrace... " >&6; }
18730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18731$as_echo "$with_babeltrace" >&6; }
18732
18733if test "x$with_babeltrace" = "xno"; then
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18735$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18736else
18737 # Append -Werror to CFLAGS so that configure can catch the warning
18738 # "assignment from incompatible pointer type", which is related to
18739 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18740 # in GDB, while babeltrace 1.0.3 is broken.
18741 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18742 # safe to save and restore CFLAGS here.
18743 saved_CFLAGS=$CFLAGS
18744 CFLAGS="$CFLAGS -Werror"
18745
18746
18747
18748
18749
18750
18751
18752
18753 use_additional=yes
18754
18755 acl_save_prefix="$prefix"
18756 prefix="$acl_final_prefix"
18757 acl_save_exec_prefix="$exec_prefix"
18758 exec_prefix="$acl_final_exec_prefix"
18759
18760 eval additional_includedir=\"$includedir\"
18761 eval additional_libdir=\"$libdir\"
18762
18763 exec_prefix="$acl_save_exec_prefix"
18764 prefix="$acl_save_prefix"
18765
18766
18767# Check whether --with-libbabeltrace-prefix was given.
18768if test "${with_libbabeltrace_prefix+set}" = set; then :
18769 withval=$with_libbabeltrace_prefix;
18770 if test "X$withval" = "Xno"; then
18771 use_additional=no
18772 else
18773 if test "X$withval" = "X"; then
18774
18775 acl_save_prefix="$prefix"
18776 prefix="$acl_final_prefix"
18777 acl_save_exec_prefix="$exec_prefix"
18778 exec_prefix="$acl_final_exec_prefix"
18779
18780 eval additional_includedir=\"$includedir\"
18781 eval additional_libdir=\"$libdir\"
18782
18783 exec_prefix="$acl_save_exec_prefix"
18784 prefix="$acl_save_prefix"
18785
18786 else
18787 additional_includedir="$withval/include"
18788 additional_libdir="$withval/lib"
18789 fi
18790 fi
18791
18792fi
18793
9f1528a1
AB
18794
18795# Check whether --with-libbabeltrace-type was given.
18796if test "${with_libbabeltrace_type+set}" = set; then :
18797 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18798else
18799 with_libbabeltrace_type=auto
18800fi
18801
18802 lib_type=`eval echo \$with_libbabeltrace_type`
18803
393fd4c3
YQ
18804 LIBBABELTRACE=
18805 LTLIBBABELTRACE=
18806 INCBABELTRACE=
18807 rpathdirs=
18808 ltrpathdirs=
18809 names_already_handled=
18810 names_next_round='babeltrace babeltrace-ctf'
18811 while test -n "$names_next_round"; do
18812 names_this_round="$names_next_round"
18813 names_next_round=
18814 for name in $names_this_round; do
18815 already_handled=
18816 for n in $names_already_handled; do
18817 if test "$n" = "$name"; then
18818 already_handled=yes
18819 break
18820 fi
18821 done
18822 if test -z "$already_handled"; then
18823 names_already_handled="$names_already_handled $name"
18824 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18825 eval value=\"\$HAVE_LIB$uppername\"
18826 if test -n "$value"; then
18827 if test "$value" = yes; then
18828 eval value=\"\$LIB$uppername\"
18829 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18830 eval value=\"\$LTLIB$uppername\"
18831 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18832 else
18833 :
18834 fi
18835 else
18836 found_dir=
18837 found_la=
18838 found_so=
18839 found_a=
18840 if test $use_additional = yes; then
9f1528a1 18841 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18842 found_dir="$additional_libdir"
18843 found_so="$additional_libdir/lib$name.$shlibext"
18844 if test -f "$additional_libdir/lib$name.la"; then
18845 found_la="$additional_libdir/lib$name.la"
18846 fi
9f1528a1 18847 elif test x$lib_type != xshared; then
393fd4c3
YQ
18848 if test -f "$additional_libdir/lib$name.$libext"; then
18849 found_dir="$additional_libdir"
18850 found_a="$additional_libdir/lib$name.$libext"
18851 if test -f "$additional_libdir/lib$name.la"; then
18852 found_la="$additional_libdir/lib$name.la"
18853 fi
18854 fi
18855 fi
18856 fi
18857 if test "X$found_dir" = "X"; then
18858 for x in $LDFLAGS $LTLIBBABELTRACE; do
18859
18860 acl_save_prefix="$prefix"
18861 prefix="$acl_final_prefix"
18862 acl_save_exec_prefix="$exec_prefix"
18863 exec_prefix="$acl_final_exec_prefix"
18864 eval x=\"$x\"
18865 exec_prefix="$acl_save_exec_prefix"
18866 prefix="$acl_save_prefix"
18867
18868 case "$x" in
18869 -L*)
18870 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18871 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18872 found_dir="$dir"
18873 found_so="$dir/lib$name.$shlibext"
18874 if test -f "$dir/lib$name.la"; then
18875 found_la="$dir/lib$name.la"
18876 fi
9f1528a1 18877 elif test x$lib_type != xshared; then
393fd4c3
YQ
18878 if test -f "$dir/lib$name.$libext"; then
18879 found_dir="$dir"
18880 found_a="$dir/lib$name.$libext"
18881 if test -f "$dir/lib$name.la"; then
18882 found_la="$dir/lib$name.la"
18883 fi
18884 fi
18885 fi
18886 ;;
18887 esac
18888 if test "X$found_dir" != "X"; then
18889 break
18890 fi
18891 done
18892 fi
18893 if test "X$found_dir" != "X"; then
18894 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18895 if test "X$found_so" != "X"; then
18896 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18897 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18898 else
18899 haveit=
18900 for x in $ltrpathdirs; do
18901 if test "X$x" = "X$found_dir"; then
18902 haveit=yes
18903 break
18904 fi
18905 done
18906 if test -z "$haveit"; then
18907 ltrpathdirs="$ltrpathdirs $found_dir"
18908 fi
18909 if test "$hardcode_direct" = yes; then
18910 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18911 else
18912 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18913 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18914 haveit=
18915 for x in $rpathdirs; do
18916 if test "X$x" = "X$found_dir"; then
18917 haveit=yes
18918 break
18919 fi
18920 done
18921 if test -z "$haveit"; then
18922 rpathdirs="$rpathdirs $found_dir"
18923 fi
18924 else
18925 haveit=
18926 for x in $LDFLAGS $LIBBABELTRACE; do
18927
18928 acl_save_prefix="$prefix"
18929 prefix="$acl_final_prefix"
18930 acl_save_exec_prefix="$exec_prefix"
18931 exec_prefix="$acl_final_exec_prefix"
18932 eval x=\"$x\"
18933 exec_prefix="$acl_save_exec_prefix"
18934 prefix="$acl_save_prefix"
18935
18936 if test "X$x" = "X-L$found_dir"; then
18937 haveit=yes
18938 break
18939 fi
18940 done
18941 if test -z "$haveit"; then
18942 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18943 fi
18944 if test "$hardcode_minus_L" != no; then
18945 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18946 else
18947 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18948 fi
18949 fi
18950 fi
18951 fi
18952 else
18953 if test "X$found_a" != "X"; then
18954 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18955 else
18956 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18957 fi
18958 fi
18959 additional_includedir=
18960 case "$found_dir" in
18961 */lib | */lib/)
18962 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18963 additional_includedir="$basedir/include"
18964 ;;
18965 esac
18966 if test "X$additional_includedir" != "X"; then
18967 if test "X$additional_includedir" != "X/usr/include"; then
18968 haveit=
18969 if test "X$additional_includedir" = "X/usr/local/include"; then
18970 if test -n "$GCC"; then
18971 case $host_os in
18972 linux*) haveit=yes;;
18973 esac
18974 fi
18975 fi
18976 if test -z "$haveit"; then
18977 for x in $CPPFLAGS $INCBABELTRACE; do
18978
18979 acl_save_prefix="$prefix"
18980 prefix="$acl_final_prefix"
18981 acl_save_exec_prefix="$exec_prefix"
18982 exec_prefix="$acl_final_exec_prefix"
18983 eval x=\"$x\"
18984 exec_prefix="$acl_save_exec_prefix"
18985 prefix="$acl_save_prefix"
18986
18987 if test "X$x" = "X-I$additional_includedir"; then
18988 haveit=yes
18989 break
18990 fi
18991 done
18992 if test -z "$haveit"; then
18993 if test -d "$additional_includedir"; then
18994 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18995 fi
18996 fi
18997 fi
18998 fi
18999 fi
19000 if test -n "$found_la"; then
19001 save_libdir="$libdir"
19002 case "$found_la" in
19003 */* | *\\*) . "$found_la" ;;
19004 *) . "./$found_la" ;;
19005 esac
19006 libdir="$save_libdir"
19007 for dep in $dependency_libs; do
19008 case "$dep" in
19009 -L*)
19010 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19011 if test "X$additional_libdir" != "X/usr/lib"; then
19012 haveit=
19013 if test "X$additional_libdir" = "X/usr/local/lib"; then
19014 if test -n "$GCC"; then
19015 case $host_os in
19016 linux*) haveit=yes;;
19017 esac
19018 fi
19019 fi
19020 if test -z "$haveit"; then
19021 haveit=
19022 for x in $LDFLAGS $LIBBABELTRACE; do
19023
19024 acl_save_prefix="$prefix"
19025 prefix="$acl_final_prefix"
19026 acl_save_exec_prefix="$exec_prefix"
19027 exec_prefix="$acl_final_exec_prefix"
19028 eval x=\"$x\"
19029 exec_prefix="$acl_save_exec_prefix"
19030 prefix="$acl_save_prefix"
19031
19032 if test "X$x" = "X-L$additional_libdir"; then
19033 haveit=yes
19034 break
19035 fi
19036 done
19037 if test -z "$haveit"; then
19038 if test -d "$additional_libdir"; then
19039 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
19040 fi
19041 fi
19042 haveit=
19043 for x in $LDFLAGS $LTLIBBABELTRACE; do
19044
19045 acl_save_prefix="$prefix"
19046 prefix="$acl_final_prefix"
19047 acl_save_exec_prefix="$exec_prefix"
19048 exec_prefix="$acl_final_exec_prefix"
19049 eval x=\"$x\"
19050 exec_prefix="$acl_save_exec_prefix"
19051 prefix="$acl_save_prefix"
19052
19053 if test "X$x" = "X-L$additional_libdir"; then
19054 haveit=yes
19055 break
19056 fi
19057 done
19058 if test -z "$haveit"; then
19059 if test -d "$additional_libdir"; then
19060 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
19061 fi
19062 fi
19063 fi
19064 fi
19065 ;;
19066 -R*)
19067 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19068 if test "$enable_rpath" != no; then
19069 haveit=
19070 for x in $rpathdirs; do
19071 if test "X$x" = "X$dir"; then
19072 haveit=yes
19073 break
19074 fi
19075 done
19076 if test -z "$haveit"; then
19077 rpathdirs="$rpathdirs $dir"
19078 fi
19079 haveit=
19080 for x in $ltrpathdirs; do
19081 if test "X$x" = "X$dir"; then
19082 haveit=yes
19083 break
19084 fi
19085 done
19086 if test -z "$haveit"; then
19087 ltrpathdirs="$ltrpathdirs $dir"
19088 fi
19089 fi
19090 ;;
19091 -l*)
19092 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19093 ;;
19094 *.la)
19095 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19096 ;;
19097 *)
19098 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
19099 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
19100 ;;
19101 esac
19102 done
19103 fi
19104 else
9f1528a1
AB
19105 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19106 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19107 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
19108 else
19109 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
19110 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
19111 fi
393fd4c3
YQ
19112 fi
19113 fi
19114 fi
19115 done
19116 done
19117 if test "X$rpathdirs" != "X"; then
19118 if test -n "$hardcode_libdir_separator"; then
19119 alldirs=
19120 for found_dir in $rpathdirs; do
19121 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19122 done
19123 acl_save_libdir="$libdir"
19124 libdir="$alldirs"
19125 eval flag=\"$hardcode_libdir_flag_spec\"
19126 libdir="$acl_save_libdir"
19127 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19128 else
19129 for found_dir in $rpathdirs; do
19130 acl_save_libdir="$libdir"
19131 libdir="$found_dir"
19132 eval flag=\"$hardcode_libdir_flag_spec\"
19133 libdir="$acl_save_libdir"
19134 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19135 done
19136 fi
19137 fi
19138 if test "X$ltrpathdirs" != "X"; then
19139 for found_dir in $ltrpathdirs; do
19140 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
19141 done
19142 fi
19143
19144
19145 ac_save_CPPFLAGS="$CPPFLAGS"
19146
19147 for element in $INCBABELTRACE; do
19148 haveit=
19149 for x in $CPPFLAGS; do
19150
19151 acl_save_prefix="$prefix"
19152 prefix="$acl_final_prefix"
19153 acl_save_exec_prefix="$exec_prefix"
19154 exec_prefix="$acl_final_exec_prefix"
19155 eval x=\"$x\"
19156 exec_prefix="$acl_save_exec_prefix"
19157 prefix="$acl_save_prefix"
19158
19159 if test "X$x" = "X$element"; then
19160 haveit=yes
19161 break
19162 fi
19163 done
19164 if test -z "$haveit"; then
19165 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19166 fi
19167 done
19168
19169
19170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
19171$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 19172if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
19173 $as_echo_n "(cached) " >&6
19174else
19175
19176 ac_save_LIBS="$LIBS"
19177 LIBS="$LIBS $LIBBABELTRACE"
19178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19179/* end confdefs.h. */
19180#include <babeltrace/babeltrace.h>
19181 #include <babeltrace/ctf/events.h>
19182 #include <babeltrace/ctf/iterator.h>
19183int
19184main ()
19185{
19186struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
19187 struct bt_ctf_event *event = NULL;
19188 const struct bt_definition *scope;
19189
13cdc2af 19190 pos->type = BT_SEEK_BEGIN;
65c749e7 19191 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
19192 scope = bt_ctf_get_top_level_scope (event,
19193 BT_STREAM_EVENT_HEADER);
19194 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
19195
19196 ;
19197 return 0;
19198}
19199_ACEOF
19200if ac_fn_c_try_link "$LINENO"; then :
19201 ac_cv_libbabeltrace=yes
19202else
19203 ac_cv_libbabeltrace=no
19204fi
19205rm -f core conftest.err conftest.$ac_objext \
19206 conftest$ac_exeext conftest.$ac_ext
19207 LIBS="$ac_save_LIBS"
19208
19209fi
19210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
19211$as_echo "$ac_cv_libbabeltrace" >&6; }
19212 if test "$ac_cv_libbabeltrace" = yes; then
19213 HAVE_LIBBABELTRACE=yes
19214
19215$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
19216
19217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
19218$as_echo_n "checking how to link with libbabeltrace... " >&6; }
19219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
19220$as_echo "$LIBBABELTRACE" >&6; }
19221 else
19222 HAVE_LIBBABELTRACE=no
19223 CPPFLAGS="$ac_save_CPPFLAGS"
19224 LIBBABELTRACE=
19225 LTLIBBABELTRACE=
19226 fi
19227
19228
19229
19230
19231
19232
19233 CFLAGS=$saved_CFLAGS
19234
19235 if test "$HAVE_LIBBABELTRACE" != yes; then
19236 if test "$with_babeltrace" = yes; then
d0ac1c44 19237 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
19238 else
19239 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
19240$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
19241 fi
19242 fi
19243fi
19244
ccb1ba62
CB
19245# Check for xxhash
19246
19247# Check whether --with-xxhash was given.
19248if test "${with_xxhash+set}" = set; then :
19249 withval=$with_xxhash;
19250else
19251 with_xxhash=auto
19252fi
19253
19254
1776e3e5
NA
19255 # Check whether --enable-libctf was given.
19256if test "${enable_libctf+set}" = set; then :
19257 enableval=$enable_libctf;
19258 case "$enableval" in
19259 yes|no) ;;
19260 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
19261 esac
19262
19263else
19264 enable_libctf=yes
19265fi
19266
19267
19268if test x${enable_static} = xno; then
19269 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
19270 CTF_DEPS="../libctf/.libs/libctf.so"
19271else
19272 LIBCTF="../libctf/.libs/libctf.a"
19273 CTF_DEPS="$LIBCTF"
19274fi
19275if test "${enable_libctf}" = yes; then
19276
19277$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
19278
19279else
19280 LIBCTF=
19281 CTF_DEPS=
19282fi
19283
19284
19285
19286
19287# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
19288# empty version.
19289
ccb1ba62
CB
19290if test "x$with_xxhash" != "xno"; then
19291
19292
19293
19294
19295
19296
19297
19298
19299 use_additional=yes
19300
19301 acl_save_prefix="$prefix"
19302 prefix="$acl_final_prefix"
19303 acl_save_exec_prefix="$exec_prefix"
19304 exec_prefix="$acl_final_exec_prefix"
19305
19306 eval additional_includedir=\"$includedir\"
19307 eval additional_libdir=\"$libdir\"
19308
19309 exec_prefix="$acl_save_exec_prefix"
19310 prefix="$acl_save_prefix"
19311
19312
19313# Check whether --with-libxxhash-prefix was given.
19314if test "${with_libxxhash_prefix+set}" = set; then :
19315 withval=$with_libxxhash_prefix;
19316 if test "X$withval" = "Xno"; then
19317 use_additional=no
19318 else
19319 if test "X$withval" = "X"; then
19320
19321 acl_save_prefix="$prefix"
19322 prefix="$acl_final_prefix"
19323 acl_save_exec_prefix="$exec_prefix"
19324 exec_prefix="$acl_final_exec_prefix"
19325
19326 eval additional_includedir=\"$includedir\"
19327 eval additional_libdir=\"$libdir\"
19328
19329 exec_prefix="$acl_save_exec_prefix"
19330 prefix="$acl_save_prefix"
19331
19332 else
19333 additional_includedir="$withval/include"
19334 additional_libdir="$withval/lib"
19335 fi
19336 fi
19337
19338fi
19339
9f1528a1
AB
19340
19341# Check whether --with-libxxhash-type was given.
19342if test "${with_libxxhash_type+set}" = set; then :
19343 withval=$with_libxxhash_type; with_libxxhash_type=$withval
19344else
19345 with_libxxhash_type=auto
19346fi
19347
19348 lib_type=`eval echo \$with_libxxhash_type`
19349
ccb1ba62
CB
19350 LIBXXHASH=
19351 LTLIBXXHASH=
19352 INCXXHASH=
19353 rpathdirs=
19354 ltrpathdirs=
19355 names_already_handled=
19356 names_next_round='xxhash '
19357 while test -n "$names_next_round"; do
19358 names_this_round="$names_next_round"
19359 names_next_round=
19360 for name in $names_this_round; do
19361 already_handled=
19362 for n in $names_already_handled; do
19363 if test "$n" = "$name"; then
19364 already_handled=yes
19365 break
19366 fi
19367 done
19368 if test -z "$already_handled"; then
19369 names_already_handled="$names_already_handled $name"
19370 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19371 eval value=\"\$HAVE_LIB$uppername\"
19372 if test -n "$value"; then
19373 if test "$value" = yes; then
19374 eval value=\"\$LIB$uppername\"
19375 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
19376 eval value=\"\$LTLIB$uppername\"
19377 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
19378 else
19379 :
19380 fi
19381 else
19382 found_dir=
19383 found_la=
19384 found_so=
19385 found_a=
19386 if test $use_additional = yes; then
9f1528a1 19387 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
19388 found_dir="$additional_libdir"
19389 found_so="$additional_libdir/lib$name.$shlibext"
19390 if test -f "$additional_libdir/lib$name.la"; then
19391 found_la="$additional_libdir/lib$name.la"
19392 fi
9f1528a1 19393 elif test x$lib_type != xshared; then
ccb1ba62
CB
19394 if test -f "$additional_libdir/lib$name.$libext"; then
19395 found_dir="$additional_libdir"
19396 found_a="$additional_libdir/lib$name.$libext"
19397 if test -f "$additional_libdir/lib$name.la"; then
19398 found_la="$additional_libdir/lib$name.la"
19399 fi
19400 fi
19401 fi
19402 fi
19403 if test "X$found_dir" = "X"; then
19404 for x in $LDFLAGS $LTLIBXXHASH; do
19405
19406 acl_save_prefix="$prefix"
19407 prefix="$acl_final_prefix"
19408 acl_save_exec_prefix="$exec_prefix"
19409 exec_prefix="$acl_final_exec_prefix"
19410 eval x=\"$x\"
19411 exec_prefix="$acl_save_exec_prefix"
19412 prefix="$acl_save_prefix"
19413
19414 case "$x" in
19415 -L*)
19416 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 19417 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
19418 found_dir="$dir"
19419 found_so="$dir/lib$name.$shlibext"
19420 if test -f "$dir/lib$name.la"; then
19421 found_la="$dir/lib$name.la"
19422 fi
9f1528a1 19423 elif test x$lib_type != xshared; then
ccb1ba62
CB
19424 if test -f "$dir/lib$name.$libext"; then
19425 found_dir="$dir"
19426 found_a="$dir/lib$name.$libext"
19427 if test -f "$dir/lib$name.la"; then
19428 found_la="$dir/lib$name.la"
19429 fi
19430 fi
19431 fi
19432 ;;
19433 esac
19434 if test "X$found_dir" != "X"; then
19435 break
19436 fi
19437 done
19438 fi
19439 if test "X$found_dir" != "X"; then
19440 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
19441 if test "X$found_so" != "X"; then
19442 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19443 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19444 else
19445 haveit=
19446 for x in $ltrpathdirs; do
19447 if test "X$x" = "X$found_dir"; then
19448 haveit=yes
19449 break
19450 fi
19451 done
19452 if test -z "$haveit"; then
19453 ltrpathdirs="$ltrpathdirs $found_dir"
19454 fi
19455 if test "$hardcode_direct" = yes; then
19456 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19457 else
19458 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19459 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19460 haveit=
19461 for x in $rpathdirs; do
19462 if test "X$x" = "X$found_dir"; then
19463 haveit=yes
19464 break
19465 fi
19466 done
19467 if test -z "$haveit"; then
19468 rpathdirs="$rpathdirs $found_dir"
19469 fi
19470 else
19471 haveit=
19472 for x in $LDFLAGS $LIBXXHASH; do
19473
19474 acl_save_prefix="$prefix"
19475 prefix="$acl_final_prefix"
19476 acl_save_exec_prefix="$exec_prefix"
19477 exec_prefix="$acl_final_exec_prefix"
19478 eval x=\"$x\"
19479 exec_prefix="$acl_save_exec_prefix"
19480 prefix="$acl_save_prefix"
19481
19482 if test "X$x" = "X-L$found_dir"; then
19483 haveit=yes
19484 break
19485 fi
19486 done
19487 if test -z "$haveit"; then
19488 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19489 fi
19490 if test "$hardcode_minus_L" != no; then
19491 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19492 else
19493 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19494 fi
19495 fi
19496 fi
19497 fi
19498 else
19499 if test "X$found_a" != "X"; then
19500 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19501 else
19502 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19503 fi
19504 fi
19505 additional_includedir=
19506 case "$found_dir" in
19507 */lib | */lib/)
19508 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19509 additional_includedir="$basedir/include"
19510 ;;
19511 esac
19512 if test "X$additional_includedir" != "X"; then
19513 if test "X$additional_includedir" != "X/usr/include"; then
19514 haveit=
19515 if test "X$additional_includedir" = "X/usr/local/include"; then
19516 if test -n "$GCC"; then
19517 case $host_os in
19518 linux*) haveit=yes;;
19519 esac
19520 fi
19521 fi
19522 if test -z "$haveit"; then
19523 for x in $CPPFLAGS $INCXXHASH; do
19524
19525 acl_save_prefix="$prefix"
19526 prefix="$acl_final_prefix"
19527 acl_save_exec_prefix="$exec_prefix"
19528 exec_prefix="$acl_final_exec_prefix"
19529 eval x=\"$x\"
19530 exec_prefix="$acl_save_exec_prefix"
19531 prefix="$acl_save_prefix"
19532
19533 if test "X$x" = "X-I$additional_includedir"; then
19534 haveit=yes
19535 break
19536 fi
19537 done
19538 if test -z "$haveit"; then
19539 if test -d "$additional_includedir"; then
19540 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19541 fi
19542 fi
19543 fi
19544 fi
19545 fi
19546 if test -n "$found_la"; then
19547 save_libdir="$libdir"
19548 case "$found_la" in
19549 */* | *\\*) . "$found_la" ;;
19550 *) . "./$found_la" ;;
19551 esac
19552 libdir="$save_libdir"
19553 for dep in $dependency_libs; do
19554 case "$dep" in
19555 -L*)
19556 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19557 if test "X$additional_libdir" != "X/usr/lib"; then
19558 haveit=
19559 if test "X$additional_libdir" = "X/usr/local/lib"; then
19560 if test -n "$GCC"; then
19561 case $host_os in
19562 linux*) haveit=yes;;
19563 esac
19564 fi
19565 fi
19566 if test -z "$haveit"; then
19567 haveit=
19568 for x in $LDFLAGS $LIBXXHASH; do
19569
19570 acl_save_prefix="$prefix"
19571 prefix="$acl_final_prefix"
19572 acl_save_exec_prefix="$exec_prefix"
19573 exec_prefix="$acl_final_exec_prefix"
19574 eval x=\"$x\"
19575 exec_prefix="$acl_save_exec_prefix"
19576 prefix="$acl_save_prefix"
19577
19578 if test "X$x" = "X-L$additional_libdir"; then
19579 haveit=yes
19580 break
19581 fi
19582 done
19583 if test -z "$haveit"; then
19584 if test -d "$additional_libdir"; then
19585 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19586 fi
19587 fi
19588 haveit=
19589 for x in $LDFLAGS $LTLIBXXHASH; do
19590
19591 acl_save_prefix="$prefix"
19592 prefix="$acl_final_prefix"
19593 acl_save_exec_prefix="$exec_prefix"
19594 exec_prefix="$acl_final_exec_prefix"
19595 eval x=\"$x\"
19596 exec_prefix="$acl_save_exec_prefix"
19597 prefix="$acl_save_prefix"
19598
19599 if test "X$x" = "X-L$additional_libdir"; then
19600 haveit=yes
19601 break
19602 fi
19603 done
19604 if test -z "$haveit"; then
19605 if test -d "$additional_libdir"; then
19606 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19607 fi
19608 fi
19609 fi
19610 fi
19611 ;;
19612 -R*)
19613 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19614 if test "$enable_rpath" != no; then
19615 haveit=
19616 for x in $rpathdirs; do
19617 if test "X$x" = "X$dir"; then
19618 haveit=yes
19619 break
19620 fi
19621 done
19622 if test -z "$haveit"; then
19623 rpathdirs="$rpathdirs $dir"
19624 fi
19625 haveit=
19626 for x in $ltrpathdirs; do
19627 if test "X$x" = "X$dir"; then
19628 haveit=yes
19629 break
19630 fi
19631 done
19632 if test -z "$haveit"; then
19633 ltrpathdirs="$ltrpathdirs $dir"
19634 fi
19635 fi
19636 ;;
19637 -l*)
19638 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19639 ;;
19640 *.la)
19641 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19642 ;;
19643 *)
19644 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19645 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19646 ;;
19647 esac
19648 done
19649 fi
19650 else
9f1528a1
AB
19651 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19652 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19653 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19654 else
19655 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19656 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19657 fi
ccb1ba62
CB
19658 fi
19659 fi
19660 fi
19661 done
19662 done
19663 if test "X$rpathdirs" != "X"; then
19664 if test -n "$hardcode_libdir_separator"; then
19665 alldirs=
19666 for found_dir in $rpathdirs; do
19667 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19668 done
19669 acl_save_libdir="$libdir"
19670 libdir="$alldirs"
19671 eval flag=\"$hardcode_libdir_flag_spec\"
19672 libdir="$acl_save_libdir"
19673 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19674 else
19675 for found_dir in $rpathdirs; do
19676 acl_save_libdir="$libdir"
19677 libdir="$found_dir"
19678 eval flag=\"$hardcode_libdir_flag_spec\"
19679 libdir="$acl_save_libdir"
19680 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19681 done
19682 fi
19683 fi
19684 if test "X$ltrpathdirs" != "X"; then
19685 for found_dir in $ltrpathdirs; do
19686 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19687 done
19688 fi
19689
19690
19691 ac_save_CPPFLAGS="$CPPFLAGS"
19692
19693 for element in $INCXXHASH; do
19694 haveit=
19695 for x in $CPPFLAGS; do
19696
19697 acl_save_prefix="$prefix"
19698 prefix="$acl_final_prefix"
19699 acl_save_exec_prefix="$exec_prefix"
19700 exec_prefix="$acl_final_exec_prefix"
19701 eval x=\"$x\"
19702 exec_prefix="$acl_save_exec_prefix"
19703 prefix="$acl_save_prefix"
19704
19705 if test "X$x" = "X$element"; then
19706 haveit=yes
19707 break
19708 fi
19709 done
19710 if test -z "$haveit"; then
19711 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19712 fi
19713 done
19714
19715
19716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19717$as_echo_n "checking for libxxhash... " >&6; }
19718if ${ac_cv_libxxhash+:} false; then :
19719 $as_echo_n "(cached) " >&6
19720else
19721
19722 ac_save_LIBS="$LIBS"
19723 LIBS="$LIBS $LIBXXHASH"
19724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19725/* end confdefs.h. */
19726#include <xxhash.h>
19727int
19728main ()
19729{
19730XXH32("foo", 3, 0);
19731
19732 ;
19733 return 0;
19734}
19735_ACEOF
19736if ac_fn_c_try_link "$LINENO"; then :
19737 ac_cv_libxxhash=yes
19738else
19739 ac_cv_libxxhash=no
19740fi
19741rm -f core conftest.err conftest.$ac_objext \
19742 conftest$ac_exeext conftest.$ac_ext
19743 LIBS="$ac_save_LIBS"
19744
19745fi
19746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19747$as_echo "$ac_cv_libxxhash" >&6; }
19748 if test "$ac_cv_libxxhash" = yes; then
19749 HAVE_LIBXXHASH=yes
19750
19751$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19752
19753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19754$as_echo_n "checking how to link with libxxhash... " >&6; }
19755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19756$as_echo "$LIBXXHASH" >&6; }
19757 else
19758 HAVE_LIBXXHASH=no
19759 CPPFLAGS="$ac_save_CPPFLAGS"
19760 LIBXXHASH=
19761 LTLIBXXHASH=
19762 fi
19763
19764
19765
19766
19767
19768
19769 if test "$HAVE_LIBXXHASH" != yes; then
19770 if test "$with_xxhash" = yes; then
19771 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19772 fi
19773 fi
19774 if test "x$with_xxhash" = "xauto"; then
19775 with_xxhash="$HAVE_LIBXXHASH"
19776 fi
19777fi
19778
19779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19780$as_echo_n "checking whether to use xxhash... " >&6; }
19781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19782$as_echo "$with_xxhash" >&6; }
19783
a0a461e5 19784NM_H=
c906108c
SS
19785rm -f nm.h
19786if test "${nativefile}" != ""; then
0f475e27
AC
19787 case "${nativefile}" in
19788 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19789 * ) GDB_NM_FILE="${nativefile}"
19790 esac
a0a461e5
TT
19791 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19792
60ca704f
SE
19793
19794cat >>confdefs.h <<_ACEOF
b78960be 19795#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 19796_ACEOF
5a2402b8 19797
a0a461e5 19798 NM_H=nm.h
c906108c 19799fi
5a2402b8
AC
19800
19801
a0a461e5 19802
e3487908
GKB
19803for ac_prog in xsltproc
19804do
19805 # Extract the first word of "$ac_prog", so it can be a program name with args.
19806set dummy $ac_prog; ac_word=$2
19807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19808$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 19809if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
19810 $as_echo_n "(cached) " >&6
19811else
19812 case $XSLTPROC in
19813 [\\/]* | ?:[\\/]*)
19814 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19815 ;;
19816 *)
19817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19818for as_dir in $PATH
19819do
19820 IFS=$as_save_IFS
19821 test -z "$as_dir" && as_dir=.
19822 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 19823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
19824 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19826 break 2
19827 fi
19828done
19829 done
19830IFS=$as_save_IFS
19831
19832 ;;
19833esac
19834fi
19835XSLTPROC=$ac_cv_path_XSLTPROC
19836if test -n "$XSLTPROC"; then
19837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19838$as_echo "$XSLTPROC" >&6; }
19839else
19840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19841$as_echo "no" >&6; }
19842fi
19843
19844
19845 test -n "$XSLTPROC" && break
19846done
19847test -n "$XSLTPROC" || XSLTPROC="missing"
19848
19849if test "x$USE_MAINTAINER_MODE" = xyes; then
19850 if test "${XSLTPROC}" = missing; then
d0ac1c44 19851 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
19852 fi
19853fi
19854
19855
c906108c
SS
19856
19857
c906108c 19858
81ecdfbb 19859$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 19860
bec39cab 19861
8ecfd7bd
SDJ
19862
19863# Check whether we will enable the inclusion of unit tests when
19864# compiling GDB.
19865#
19866# The default value of this option changes depending whether we're on
19867# development mode (in which case it's "true") or not (in which case
db6878ac
SM
19868# it's "false"). The $development variable is set by the GDB_AC_COMMON
19869# macro, which must therefore be used before GDB_AC_SELFTEST.
4d696a5c
SM
19870
19871if test "x$development" != xtrue && test "x$development" != xfalse; then :
19872 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19873fi
19874
8ecfd7bd
SDJ
19875# Check whether --enable-unit-tests was given.
19876if test "${enable_unit_tests+set}" = set; then :
19877 enableval=$enable_unit_tests; case "${enableval}" in
19878 yes) enable_unittests=true ;;
19879 no) enable_unittests=false ;;
19880 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19881esac
19882else
19883 enable_unittests=$development
19884fi
19885
19886
19887if $enable_unittests; then
dcd1f979
TT
19888
19889$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19890
8ecfd7bd 19891
74cd3f9d
SM
19892 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19893 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
8ecfd7bd 19894
dcd1f979
TT
19895fi
19896
b292c783 19897
8ecfd7bd 19898
f6a88844
JM
19899 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19900 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19901 if test "x$GDB_TRANSFORM_NAME" = x; then
19902 GDB_TRANSFORM_NAME=gdb
19903 fi
19904
19905
19906
19907 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19908 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19909 if test "x$GCORE_TRANSFORM_NAME" = x; then
19910 GCORE_TRANSFORM_NAME=gcore
19911 fi
19912
b292c783
JK
19913
19914ac_config_files="$ac_config_files gcore"
19915
141ec9f6 19916ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19917
89a34d1b 19918
bec39cab
AC
19919cat >confcache <<\_ACEOF
19920# This file is a shell script that caches the results of configure
19921# tests run on this system so they can be shared between configure
19922# scripts and configure runs, see configure's option --config-cache.
19923# It is not useful on other systems. If it contains results you don't
19924# want to keep, you may remove or edit it.
19925#
19926# config.status only pays attention to the cache file if you give it
19927# the --recheck option to rerun configure.
19928#
19929# `ac_cv_env_foo' variables (set or unset) will be overridden when
19930# loading this file, other *unset* `ac_cv_foo' will be assigned the
19931# following values.
19932
19933_ACEOF
19934
19935# The following way of writing the cache mishandles newlines in values,
19936# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19937# So, we kill variables containing newlines.
bec39cab
AC
19938# Ultrix sh set writes to stderr and can't be redirected directly,
19939# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19940(
19941 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19942 eval ac_val=\$$ac_var
19943 case $ac_val in #(
19944 *${as_nl}*)
19945 case $ac_var in #(
19946 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19947$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19948 esac
19949 case $ac_var in #(
19950 _ | IFS | as_nl) ;; #(
19951 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19952 *) { eval $ac_var=; unset $ac_var;} ;;
19953 esac ;;
19954 esac
19955 done
19956
bec39cab 19957 (set) 2>&1 |
81ecdfbb
RW
19958 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19959 *${as_nl}ac_space=\ *)
19960 # `set' does not quote correctly, so add quotes: double-quote
19961 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19962 sed -n \
19963 "s/'/'\\\\''/g;
19964 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19965 ;; #(
bec39cab
AC
19966 *)
19967 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19968 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19969 ;;
81ecdfbb
RW
19970 esac |
19971 sort
19972) |
bec39cab 19973 sed '
81ecdfbb 19974 /^ac_cv_env_/b end
bec39cab 19975 t clear
81ecdfbb 19976 :clear
bec39cab
AC
19977 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19978 t end
81ecdfbb
RW
19979 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19980 :end' >>confcache
19981if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19982 if test -w "$cache_file"; then
d0ac1c44 19983 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19984 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19985$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19986 if test ! -f "$cache_file" || test -h "$cache_file"; then
19987 cat confcache >"$cache_file"
19988 else
19989 case $cache_file in #(
19990 */* | ?:*)
19991 mv -f confcache "$cache_file"$$ &&
19992 mv -f "$cache_file"$$ "$cache_file" ;; #(
19993 *)
19994 mv -f confcache "$cache_file" ;;
19995 esac
19996 fi
19997 fi
bec39cab 19998 else
81ecdfbb
RW
19999 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20000$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
20001 fi
20002fi
20003rm -f confcache
20004
20005test "x$prefix" = xNONE && prefix=$ac_default_prefix
20006# Let make expand exec_prefix.
20007test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20008
bec39cab
AC
20009DEFS=-DHAVE_CONFIG_H
20010
20011ac_libobjs=
20012ac_ltlibobjs=
d0ac1c44 20013U=
bec39cab
AC
20014for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20015 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
20016 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20017 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20018 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20019 # will be set to the directory where LIBOBJS objects are built.
20020 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20021 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
20022done
20023LIBOBJS=$ac_libobjs
20024
20025LTLIBOBJS=$ac_ltlibobjs
20026
20027
85981d60 20028if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 20029 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 20030Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 20031fi
4df42755 20032if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 20033 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
20034Usually this means the macro was only invoked conditionally." "$LINENO" 5
20035fi
20036if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 20037 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
20038Usually this means the macro was only invoked conditionally." "$LINENO" 5
20039fi
81ecdfbb
RW
20040
20041
d0ac1c44 20042: "${CONFIG_STATUS=./config.status}"
81ecdfbb 20043ac_write_fail=0
bec39cab
AC
20044ac_clean_files_save=$ac_clean_files
20045ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
20046{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20047$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20048as_write_fail=0
20049cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
20050#! $SHELL
20051# Generated by $as_me.
20052# Run this file to recreate the current configuration.
20053# Compiler output produced by configure, useful for debugging
20054# configure, is in config.log if it exists.
20055
20056debug=false
20057ac_cs_recheck=false
20058ac_cs_silent=false
bec39cab 20059
81ecdfbb
RW
20060SHELL=\${CONFIG_SHELL-$SHELL}
20061export SHELL
20062_ASEOF
20063cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20064## -------------------- ##
20065## M4sh Initialization. ##
20066## -------------------- ##
20067
20068# Be more Bourne compatible
20069DUALCASE=1; export DUALCASE # for MKS sh
20070if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
20071 emulate sh
20072 NULLCMD=:
81ecdfbb 20073 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
20074 # is contrary to our usage. Disable this feature.
20075 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
20076 setopt NO_GLOB_SUBST
20077else
20078 case `(set -o) 2>/dev/null` in #(
20079 *posix*) :
20080 set -o posix ;; #(
20081 *) :
20082 ;;
20083esac
bec39cab 20084fi
bec39cab 20085
81ecdfbb
RW
20086
20087as_nl='
20088'
20089export as_nl
20090# Printing a long string crashes Solaris 7 /usr/bin/printf.
20091as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20092as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20093as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20094# Prefer a ksh shell builtin over an external printf program on Solaris,
20095# but without wasting forks for bash or zsh.
20096if test -z "$BASH_VERSION$ZSH_VERSION" \
20097 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20098 as_echo='print -r --'
20099 as_echo_n='print -rn --'
20100elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20101 as_echo='printf %s\n'
20102 as_echo_n='printf %s'
20103else
20104 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20105 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20106 as_echo_n='/usr/ucb/echo -n'
20107 else
20108 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20109 as_echo_n_body='eval
20110 arg=$1;
20111 case $arg in #(
20112 *"$as_nl"*)
20113 expr "X$arg" : "X\\(.*\\)$as_nl";
20114 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20115 esac;
20116 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20117 '
20118 export as_echo_n_body
20119 as_echo_n='sh -c $as_echo_n_body as_echo'
20120 fi
20121 export as_echo_body
20122 as_echo='sh -c $as_echo_body as_echo'
20123fi
20124
20125# The user is always right.
20126if test "${PATH_SEPARATOR+set}" != set; then
20127 PATH_SEPARATOR=:
20128 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20129 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20130 PATH_SEPARATOR=';'
20131 }
bec39cab
AC
20132fi
20133
20134
81ecdfbb
RW
20135# IFS
20136# We need space, tab and new line, in precisely that order. Quoting is
20137# there to prevent editors from complaining about space-tab.
20138# (If _AS_PATH_WALK were called with IFS unset, it would disable word
20139# splitting by setting IFS to empty value.)
20140IFS=" "" $as_nl"
20141
20142# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 20143as_myself=
81ecdfbb
RW
20144case $0 in #((
20145 *[\\/]* ) as_myself=$0 ;;
20146 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20147for as_dir in $PATH
20148do
20149 IFS=$as_save_IFS
20150 test -z "$as_dir" && as_dir=.
20151 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20152 done
20153IFS=$as_save_IFS
20154
20155 ;;
20156esac
20157# We did not find ourselves, most probably we were run as `sh COMMAND'
20158# in which case we are not to be found in the path.
20159if test "x$as_myself" = x; then
20160 as_myself=$0
20161fi
20162if test ! -f "$as_myself"; then
20163 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20164 exit 1
20165fi
20166
20167# Unset variables that we do not need and which cause bugs (e.g. in
20168# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20169# suppresses any "Segmentation fault" message there. '((' could
20170# trigger a bug in pdksh 5.2.14.
20171for as_var in BASH_ENV ENV MAIL MAILPATH
20172do eval test x\${$as_var+set} = xset \
20173 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20174done
bec39cab
AC
20175PS1='$ '
20176PS2='> '
20177PS4='+ '
20178
20179# NLS nuisances.
81ecdfbb
RW
20180LC_ALL=C
20181export LC_ALL
20182LANGUAGE=C
20183export LANGUAGE
20184
20185# CDPATH.
20186(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20187
20188
d0ac1c44
SM
20189# as_fn_error STATUS ERROR [LINENO LOG_FD]
20190# ----------------------------------------
81ecdfbb
RW
20191# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20192# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 20193# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
20194as_fn_error ()
20195{
d0ac1c44
SM
20196 as_status=$1; test $as_status -eq 0 && as_status=1
20197 if test "$4"; then
20198 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20199 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 20200 fi
d0ac1c44 20201 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
20202 as_fn_exit $as_status
20203} # as_fn_error
20204
20205
20206# as_fn_set_status STATUS
20207# -----------------------
20208# Set $? to STATUS, without forking.
20209as_fn_set_status ()
20210{
20211 return $1
20212} # as_fn_set_status
20213
20214# as_fn_exit STATUS
20215# -----------------
20216# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20217as_fn_exit ()
20218{
20219 set +e
20220 as_fn_set_status $1
20221 exit $1
20222} # as_fn_exit
20223
20224# as_fn_unset VAR
20225# ---------------
20226# Portably unset VAR.
20227as_fn_unset ()
20228{
20229 { eval $1=; unset $1;}
20230}
20231as_unset=as_fn_unset
20232# as_fn_append VAR VALUE
20233# ----------------------
20234# Append the text in VALUE to the end of the definition contained in VAR. Take
20235# advantage of any shell optimizations that allow amortized linear growth over
20236# repeated appends, instead of the typical quadratic growth present in naive
20237# implementations.
20238if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20239 eval 'as_fn_append ()
20240 {
20241 eval $1+=\$2
20242 }'
20243else
20244 as_fn_append ()
20245 {
20246 eval $1=\$$1\$2
20247 }
20248fi # as_fn_append
20249
20250# as_fn_arith ARG...
20251# ------------------
20252# Perform arithmetic evaluation on the ARGs, and store the result in the
20253# global $as_val. Take advantage of shells that can avoid forks. The arguments
20254# must be portable across $(()) and expr.
20255if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20256 eval 'as_fn_arith ()
20257 {
20258 as_val=$(( $* ))
20259 }'
20260else
20261 as_fn_arith ()
20262 {
20263 as_val=`expr "$@" || test $? -eq 1`
20264 }
20265fi # as_fn_arith
bec39cab 20266
81ecdfbb
RW
20267
20268if expr a : '\(a\)' >/dev/null 2>&1 &&
20269 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
20270 as_expr=expr
20271else
20272 as_expr=false
20273fi
20274
81ecdfbb 20275if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
20276 as_basename=basename
20277else
20278 as_basename=false
20279fi
20280
81ecdfbb
RW
20281if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20282 as_dirname=dirname
20283else
20284 as_dirname=false
20285fi
bec39cab 20286
81ecdfbb 20287as_me=`$as_basename -- "$0" ||
bec39cab
AC
20288$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20289 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
20290 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20291$as_echo X/"$0" |
20292 sed '/^.*\/\([^/][^/]*\)\/*$/{
20293 s//\1/
20294 q
20295 }
20296 /^X\/\(\/\/\)$/{
20297 s//\1/
20298 q
20299 }
20300 /^X\/\(\/\).*/{
20301 s//\1/
20302 q
20303 }
20304 s/.*/./; q'`
b4e70030 20305
b4e70030
JB
20306# Avoid depending upon Character Ranges.
20307as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20308as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20309as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20310as_cr_digits='0123456789'
20311as_cr_alnum=$as_cr_Letters$as_cr_digits
20312
81ecdfbb
RW
20313ECHO_C= ECHO_N= ECHO_T=
20314case `echo -n x` in #(((((
20315-n*)
20316 case `echo 'xy\c'` in
20317 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20318 xy) ECHO_C='\c';;
20319 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20320 ECHO_T=' ';;
20321 esac;;
20322*)
20323 ECHO_N='-n';;
bec39cab
AC
20324esac
20325
81ecdfbb
RW
20326rm -f conf$$ conf$$.exe conf$$.file
20327if test -d conf$$.dir; then
20328 rm -f conf$$.dir/conf$$.file
bec39cab 20329else
81ecdfbb
RW
20330 rm -f conf$$.dir
20331 mkdir conf$$.dir 2>/dev/null
bec39cab 20332fi
81ecdfbb
RW
20333if (echo >conf$$.file) 2>/dev/null; then
20334 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 20335 as_ln_s='ln -s'
81ecdfbb
RW
20336 # ... but there are two gotchas:
20337 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20338 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 20339 # In both cases, we have to default to `cp -pR'.
81ecdfbb 20340 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 20341 as_ln_s='cp -pR'
81ecdfbb
RW
20342 elif ln conf$$.file conf$$ 2>/dev/null; then
20343 as_ln_s=ln
20344 else
d0ac1c44 20345 as_ln_s='cp -pR'
b4e70030 20346 fi
bec39cab 20347else
d0ac1c44 20348 as_ln_s='cp -pR'
bec39cab 20349fi
81ecdfbb
RW
20350rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20351rmdir conf$$.dir 2>/dev/null
20352
20353
20354# as_fn_mkdir_p
20355# -------------
20356# Create "$as_dir" as a directory, including parents if necessary.
20357as_fn_mkdir_p ()
20358{
20359
20360 case $as_dir in #(
20361 -*) as_dir=./$as_dir;;
20362 esac
20363 test -d "$as_dir" || eval $as_mkdir_p || {
20364 as_dirs=
20365 while :; do
20366 case $as_dir in #(
20367 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20368 *) as_qdir=$as_dir;;
20369 esac
20370 as_dirs="'$as_qdir' $as_dirs"
20371 as_dir=`$as_dirname -- "$as_dir" ||
20372$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20373 X"$as_dir" : 'X\(//\)[^/]' \| \
20374 X"$as_dir" : 'X\(//\)$' \| \
20375 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20376$as_echo X"$as_dir" |
20377 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20378 s//\1/
20379 q
20380 }
20381 /^X\(\/\/\)[^/].*/{
20382 s//\1/
20383 q
20384 }
20385 /^X\(\/\/\)$/{
20386 s//\1/
20387 q
20388 }
20389 /^X\(\/\).*/{
20390 s//\1/
20391 q
20392 }
20393 s/.*/./; q'`
20394 test -d "$as_dir" && break
20395 done
20396 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 20397 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 20398
bec39cab 20399
81ecdfbb 20400} # as_fn_mkdir_p
bec39cab 20401if mkdir -p . 2>/dev/null; then
81ecdfbb 20402 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
20403else
20404 test -d ./-p && rmdir ./-p
20405 as_mkdir_p=false
20406fi
20407
d0ac1c44
SM
20408
20409# as_fn_executable_p FILE
20410# -----------------------
20411# Test if FILE is an executable regular file.
20412as_fn_executable_p ()
20413{
20414 test -f "$1" && test -x "$1"
20415} # as_fn_executable_p
20416as_test_x='test -x'
20417as_executable_p=as_fn_executable_p
bec39cab
AC
20418
20419# Sed expression to map a string onto a valid CPP name.
20420as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20421
20422# Sed expression to map a string onto a valid variable name.
20423as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20424
20425
bec39cab 20426exec 6>&1
81ecdfbb
RW
20427## ----------------------------------- ##
20428## Main body of $CONFIG_STATUS script. ##
20429## ----------------------------------- ##
20430_ASEOF
20431test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20432
20433cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20434# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 20435# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
20436# values after options handling.
20437ac_log="
bec39cab 20438This file was extended by $as_me, which was
d0ac1c44 20439generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
20440
20441 CONFIG_FILES = $CONFIG_FILES
20442 CONFIG_HEADERS = $CONFIG_HEADERS
20443 CONFIG_LINKS = $CONFIG_LINKS
20444 CONFIG_COMMANDS = $CONFIG_COMMANDS
20445 $ $0 $@
20446
81ecdfbb
RW
20447on `(hostname || uname -n) 2>/dev/null | sed 1q`
20448"
20449
bec39cab
AC
20450_ACEOF
20451
81ecdfbb
RW
20452case $ac_config_files in *"
20453"*) set x $ac_config_files; shift; ac_config_files=$*;;
20454esac
234b45d4 20455
81ecdfbb
RW
20456case $ac_config_headers in *"
20457"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20458esac
b4e70030 20459
b4e70030 20460
81ecdfbb
RW
20461cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20462# Files that config.status was made for.
20463config_files="$ac_config_files"
20464config_headers="$ac_config_headers"
20465config_links="$ac_config_links"
20466config_commands="$ac_config_commands"
234b45d4 20467
81ecdfbb 20468_ACEOF
b4e70030 20469
81ecdfbb 20470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 20471ac_cs_usage="\
81ecdfbb
RW
20472\`$as_me' instantiates files and other configuration actions
20473from templates according to the current configuration. Unless the files
20474and actions are specified as TAGs, all are instantiated by default.
234b45d4 20475
81ecdfbb 20476Usage: $0 [OPTION]... [TAG]...
234b45d4 20477
bec39cab 20478 -h, --help print this help, then exit
81ecdfbb 20479 -V, --version print version number and configuration settings, then exit
d0ac1c44 20480 --config print configuration, then exit
81ecdfbb
RW
20481 -q, --quiet, --silent
20482 do not print progress messages
bec39cab
AC
20483 -d, --debug don't remove temporary files
20484 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
20485 --file=FILE[:TEMPLATE]
20486 instantiate the configuration file FILE
20487 --header=FILE[:TEMPLATE]
20488 instantiate the configuration header FILE
234b45d4 20489
bec39cab
AC
20490Configuration files:
20491$config_files
234b45d4 20492
bec39cab
AC
20493Configuration headers:
20494$config_headers
234b45d4 20495
bec39cab
AC
20496Configuration links:
20497$config_links
234b45d4 20498
bec39cab
AC
20499Configuration commands:
20500$config_commands
20501
81ecdfbb 20502Report bugs to the package provider."
b4e70030 20503
81ecdfbb
RW
20504_ACEOF
20505cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20506ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
20507ac_cs_version="\\
20508config.status
d0ac1c44
SM
20509configured by $0, generated by GNU Autoconf 2.69,
20510 with options \\"\$ac_cs_config\\"
bec39cab 20511
d0ac1c44 20512Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
20513This config.status script is free software; the Free Software Foundation
20514gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
20515
20516ac_pwd='$ac_pwd'
20517srcdir='$srcdir'
20518INSTALL='$INSTALL'
81ecdfbb
RW
20519AWK='$AWK'
20520test -n "\$AWK" || AWK=awk
bec39cab
AC
20521_ACEOF
20522
81ecdfbb
RW
20523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20524# The default lists apply if the user does not specify any file.
bec39cab
AC
20525ac_need_defaults=:
20526while test $# != 0
20527do
20528 case $1 in
d0ac1c44 20529 --*=?*)
81ecdfbb
RW
20530 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20531 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 20532 ac_shift=:
c906108c 20533 ;;
d0ac1c44
SM
20534 --*=)
20535 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20536 ac_optarg=
20537 ac_shift=:
20538 ;;
81ecdfbb 20539 *)
bec39cab
AC
20540 ac_option=$1
20541 ac_optarg=$2
20542 ac_shift=shift
c906108c 20543 ;;
bec39cab 20544 esac
c906108c 20545
bec39cab
AC
20546 case $ac_option in
20547 # Handling of the options.
bec39cab
AC
20548 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20549 ac_cs_recheck=: ;;
81ecdfbb
RW
20550 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20551 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
20552 --config | --confi | --conf | --con | --co | --c )
20553 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 20554 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
20555 debug=: ;;
20556 --file | --fil | --fi | --f )
20557 $ac_shift
81ecdfbb
RW
20558 case $ac_optarg in
20559 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 20560 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
20561 esac
20562 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
20563 ac_need_defaults=false;;
20564 --header | --heade | --head | --hea )
20565 $ac_shift
81ecdfbb
RW
20566 case $ac_optarg in
20567 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20568 esac
20569 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 20570 ac_need_defaults=false;;
81ecdfbb
RW
20571 --he | --h)
20572 # Conflict between --help and --header
d0ac1c44 20573 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
20574Try \`$0 --help' for more information.";;
20575 --help | --hel | -h )
20576 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
20577 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20578 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20579 ac_cs_silent=: ;;
c906108c 20580
bec39cab 20581 # This is an error.
d0ac1c44 20582 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 20583Try \`$0 --help' for more information." ;;
c906108c 20584
81ecdfbb
RW
20585 *) as_fn_append ac_config_targets " $1"
20586 ac_need_defaults=false ;;
c906108c 20587
bec39cab
AC
20588 esac
20589 shift
20590done
c906108c 20591
bec39cab 20592ac_configure_extra_args=
c906108c 20593
bec39cab
AC
20594if $ac_cs_silent; then
20595 exec 6>/dev/null
20596 ac_configure_extra_args="$ac_configure_extra_args --silent"
20597fi
c906108c 20598
bec39cab 20599_ACEOF
81ecdfbb 20600cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 20601if \$ac_cs_recheck; then
d0ac1c44 20602 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
20603 shift
20604 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20605 CONFIG_SHELL='$SHELL'
20606 export CONFIG_SHELL
20607 exec "\$@"
bec39cab
AC
20608fi
20609
20610_ACEOF
81ecdfbb
RW
20611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20612exec 5>>config.log
20613{
20614 echo
20615 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20616## Running $as_me. ##
20617_ASBOX
20618 $as_echo "$ac_log"
20619} >&5
bec39cab 20620
81ecdfbb
RW
20621_ACEOF
20622cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 20623#
81ecdfbb 20624# INIT-COMMANDS
c906108c 20625#
a417dc56 20626ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 20627GDB_NM_FILE=$GDB_NM_FILE
b4e70030 20628
bec39cab
AC
20629_ACEOF
20630
81ecdfbb 20631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 20632
81ecdfbb 20633# Handling of arguments.
bec39cab 20634for ac_config_target in $ac_config_targets
c906108c 20635do
81ecdfbb
RW
20636 case $ac_config_target in
20637 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20638 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 20639 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 20640 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 20641 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 20642 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 20643 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 20644 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 20645 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 20646 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 20647
d0ac1c44 20648 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
20649 esac
20650done
20651
81ecdfbb 20652
bec39cab
AC
20653# If the user did not use the arguments to specify the items to instantiate,
20654# then the envvar interface is used. Set only those that are not.
20655# We use the long form for the default assignment because of an extremely
20656# bizarre bug on SunOS 4.1.3.
20657if $ac_need_defaults; then
20658 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20659 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20660 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20661 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20662fi
20663
b4e70030 20664# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 20665# simply because there is no reason against having it here, and in addition,
b4e70030 20666# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
20667# Hook for its removal unless debugging.
20668# Note that there is a small window in which the directory will not be cleaned:
20669# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
20670$debug ||
20671{
d0ac1c44 20672 tmp= ac_tmp=
81ecdfbb 20673 trap 'exit_status=$?
d0ac1c44
SM
20674 : "${ac_tmp:=$tmp}"
20675 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
20676' 0
20677 trap 'as_fn_exit 1' 1 2 13 15
20678}
20679# Create a (secure) tmp directory for tmp files.
20680
20681{
20682 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 20683 test -d "$tmp"
81ecdfbb
RW
20684} ||
20685{
20686 tmp=./conf$$-$RANDOM
20687 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
20688} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20689ac_tmp=$tmp
81ecdfbb
RW
20690
20691# Set up the scripts for CONFIG_FILES section.
20692# No need to generate them if there are no CONFIG_FILES.
20693# This happens for instance with `./config.status config.h'.
20694if test -n "$CONFIG_FILES"; then
20695
20696if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20697 ac_cs_awk_getline=:
20698 ac_cs_awk_pipe_init=
20699 ac_cs_awk_read_file='
20700 while ((getline aline < (F[key])) > 0)
20701 print(aline)
20702 close(F[key])'
20703 ac_cs_awk_pipe_fini=
20704else
20705 ac_cs_awk_getline=false
20706 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20707 ac_cs_awk_read_file='
20708 print "|#_!!_#|"
20709 print "cat " F[key] " &&"
20710 '$ac_cs_awk_pipe_init
20711 # The final `:' finishes the AND list.
20712 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20713fi
20714ac_cr=`echo X | tr X '\015'`
20715# On cygwin, bash can eat \r inside `` if the user requested igncr.
20716# But we know of no other shell where ac_cr would be empty at this
20717# point, so we can use a bashism as a fallback.
20718if test "x$ac_cr" = x; then
20719 eval ac_cr=\$\'\\r\'
20720fi
20721ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20722if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 20723 ac_cs_awk_cr='\\r'
81ecdfbb
RW
20724else
20725 ac_cs_awk_cr=$ac_cr
20726fi
20727
d0ac1c44 20728echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
20729_ACEOF
20730
20731# Create commands to substitute file output variables.
20732{
20733 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 20734 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
20735 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20736 echo "_ACAWK" &&
20737 echo "_ACEOF"
20738} >conf$$files.sh &&
20739. ./conf$$files.sh ||
d0ac1c44 20740 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20741rm -f conf$$files.sh
20742
20743{
20744 echo "cat >conf$$subs.awk <<_ACEOF" &&
20745 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20746 echo "_ACEOF"
20747} >conf$$subs.sh ||
d0ac1c44
SM
20748 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20749ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
20750ac_delim='%!_!# '
20751for ac_last_try in false false false false false :; do
20752 . ./conf$$subs.sh ||
d0ac1c44 20753 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20754
20755 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20756 if test $ac_delim_n = $ac_delim_num; then
20757 break
20758 elif $ac_last_try; then
d0ac1c44 20759 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20760 else
20761 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20762 fi
20763done
20764rm -f conf$$subs.sh
20765
20766cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20767cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
20768_ACEOF
20769sed -n '
20770h
20771s/^/S["/; s/!.*/"]=/
20772p
20773g
20774s/^[^!]*!//
20775:repl
20776t repl
20777s/'"$ac_delim"'$//
20778t delim
20779:nl
20780h
d0ac1c44 20781s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20782t more1
20783s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20784p
20785n
20786b repl
20787:more1
20788s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20789p
20790g
20791s/.\{148\}//
20792t nl
20793:delim
20794h
d0ac1c44 20795s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20796t more2
20797s/["\\]/\\&/g; s/^/"/; s/$/"/
20798p
20799b
20800:more2
20801s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20802p
20803g
20804s/.\{148\}//
20805t delim
20806' <conf$$subs.awk | sed '
20807/^[^""]/{
20808 N
20809 s/\n//
20810}
20811' >>$CONFIG_STATUS || ac_write_fail=1
20812rm -f conf$$subs.awk
20813cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20814_ACAWK
d0ac1c44 20815cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
20816 for (key in S) S_is_set[key] = 1
20817 FS = "\a"
20818 \$ac_cs_awk_pipe_init
20819}
20820{
20821 line = $ 0
20822 nfields = split(line, field, "@")
20823 substed = 0
20824 len = length(field[1])
20825 for (i = 2; i < nfields; i++) {
20826 key = field[i]
20827 keylen = length(key)
20828 if (S_is_set[key]) {
20829 value = S[key]
20830 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20831 len += length(value) + length(field[++i])
20832 substed = 1
20833 } else
20834 len += 1 + keylen
20835 }
20836 if (nfields == 3 && !substed) {
20837 key = field[2]
20838 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20839 \$ac_cs_awk_read_file
20840 next
20841 }
20842 }
20843 print line
b4e70030 20844}
81ecdfbb
RW
20845\$ac_cs_awk_pipe_fini
20846_ACAWK
20847_ACEOF
20848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20849if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20850 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20851else
20852 cat
d0ac1c44
SM
20853fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20854 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
20855_ACEOF
20856
d0ac1c44
SM
20857# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20858# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
20859# trailing colons and then remove the whole line if VPATH becomes empty
20860# (actually we leave an empty line to preserve line numbers).
20861if test "x$srcdir" = x.; then
d0ac1c44
SM
20862 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20863h
20864s///
20865s/^/:/
20866s/[ ]*$/:/
20867s/:\$(srcdir):/:/g
20868s/:\${srcdir}:/:/g
20869s/:@srcdir@:/:/g
20870s/^:*//
81ecdfbb 20871s/:*$//
d0ac1c44
SM
20872x
20873s/\(=[ ]*\).*/\1/
20874G
20875s/\n//
81ecdfbb
RW
20876s/^[^=]*=[ ]*$//
20877}'
20878fi
20879
20880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20881fi # test -n "$CONFIG_FILES"
20882
20883# Set up the scripts for CONFIG_HEADERS section.
20884# No need to generate them if there are no CONFIG_HEADERS.
20885# This happens for instance with `./config.status Makefile'.
20886if test -n "$CONFIG_HEADERS"; then
d0ac1c44 20887cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
20888BEGIN {
20889_ACEOF
20890
20891# Transform confdefs.h into an awk script `defines.awk', embedded as
20892# here-document in config.status, that substitutes the proper values into
20893# config.h.in to produce config.h.
4e8d927d 20894
81ecdfbb
RW
20895# Create a delimiter string that does not exist in confdefs.h, to ease
20896# handling of long lines.
20897ac_delim='%!_!# '
20898for ac_last_try in false false :; do
d0ac1c44
SM
20899 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20900 if test -z "$ac_tt"; then
81ecdfbb
RW
20901 break
20902 elif $ac_last_try; then
d0ac1c44 20903 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
20904 else
20905 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20906 fi
20907done
4e8d927d 20908
81ecdfbb
RW
20909# For the awk script, D is an array of macro values keyed by name,
20910# likewise P contains macro parameters if any. Preserve backslash
20911# newline sequences.
20912
20913ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20914sed -n '
20915s/.\{148\}/&'"$ac_delim"'/g
20916t rset
20917:rset
20918s/^[ ]*#[ ]*define[ ][ ]*/ /
20919t def
20920d
20921:def
20922s/\\$//
20923t bsnl
20924s/["\\]/\\&/g
20925s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20926D["\1"]=" \3"/p
20927s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20928d
20929:bsnl
20930s/["\\]/\\&/g
20931s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20932D["\1"]=" \3\\\\\\n"\\/p
20933t cont
20934s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20935t cont
20936d
20937:cont
20938n
20939s/.\{148\}/&'"$ac_delim"'/g
20940t clear
20941:clear
20942s/\\$//
20943t bsnlc
20944s/["\\]/\\&/g; s/^/"/; s/$/"/p
20945d
20946:bsnlc
20947s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20948b cont
20949' <confdefs.h | sed '
20950s/'"$ac_delim"'/"\\\
20951"/g' >>$CONFIG_STATUS || ac_write_fail=1
20952
20953cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20954 for (key in D) D_is_set[key] = 1
20955 FS = "\a"
20956}
20957/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20958 line = \$ 0
20959 split(line, arg, " ")
20960 if (arg[1] == "#") {
20961 defundef = arg[2]
20962 mac1 = arg[3]
20963 } else {
20964 defundef = substr(arg[1], 2)
20965 mac1 = arg[2]
20966 }
20967 split(mac1, mac2, "(") #)
20968 macro = mac2[1]
20969 prefix = substr(line, 1, index(line, defundef) - 1)
20970 if (D_is_set[macro]) {
20971 # Preserve the white space surrounding the "#".
20972 print prefix "define", macro P[macro] D[macro]
20973 next
20974 } else {
20975 # Replace #undef with comments. This is necessary, for example,
20976 # in the case of _POSIX_SOURCE, which is predefined and required
20977 # on some systems where configure will not decide to define it.
20978 if (defundef == "undef") {
20979 print "/*", prefix defundef, macro, "*/"
20980 next
20981 }
20982 }
b4e70030 20983}
81ecdfbb
RW
20984{ print }
20985_ACAWK
b4e70030 20986_ACEOF
81ecdfbb 20987cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20988 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20989fi # test -n "$CONFIG_HEADERS"
4e8d927d 20990
4e8d927d 20991
81ecdfbb
RW
20992eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20993shift
20994for ac_tag
20995do
20996 case $ac_tag in
20997 :[FHLC]) ac_mode=$ac_tag; continue;;
20998 esac
20999 case $ac_mode$ac_tag in
21000 :[FHL]*:*);;
d0ac1c44 21001 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
21002 :[FH]-) ac_tag=-:-;;
21003 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21004 esac
21005 ac_save_IFS=$IFS
21006 IFS=:
21007 set x $ac_tag
21008 IFS=$ac_save_IFS
21009 shift
21010 ac_file=$1
21011 shift
4e8d927d 21012
81ecdfbb
RW
21013 case $ac_mode in
21014 :L) ac_source=$1;;
21015 :[FH])
21016 ac_file_inputs=
21017 for ac_f
21018 do
21019 case $ac_f in
d0ac1c44 21020 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
21021 *) # Look for the file first in the build tree, then in the source tree
21022 # (if the path is not absolute). The absolute path cannot be DOS-style,
21023 # because $ac_f cannot contain `:'.
21024 test -f "$ac_f" ||
21025 case $ac_f in
21026 [\\/$]*) false;;
21027 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21028 esac ||
d0ac1c44 21029 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
21030 esac
21031 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21032 as_fn_append ac_file_inputs " '$ac_f'"
21033 done
21034
21035 # Let's still pretend it is `configure' which instantiates (i.e., don't
21036 # use $as_me), people would be surprised to read:
21037 # /* config.h. Generated by config.status. */
21038 configure_input='Generated from '`
21039 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21040 `' by configure.'
21041 if test x"$ac_file" != x-; then
21042 configure_input="$ac_file. $configure_input"
21043 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21044$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 21045 fi
81ecdfbb
RW
21046 # Neutralize special characters interpreted by sed in replacement strings.
21047 case $configure_input in #(
21048 *\&* | *\|* | *\\* )
21049 ac_sed_conf_input=`$as_echo "$configure_input" |
21050 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21051 *) ac_sed_conf_input=$configure_input;;
21052 esac
4e8d927d 21053
81ecdfbb 21054 case $ac_tag in
d0ac1c44
SM
21055 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21056 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
21057 esac
21058 ;;
c906108c
SS
21059 esac
21060
81ecdfbb 21061 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
21062$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21063 X"$ac_file" : 'X\(//\)[^/]' \| \
21064 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
21065 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21066$as_echo X"$ac_file" |
21067 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21068 s//\1/
21069 q
21070 }
21071 /^X\(\/\/\)[^/].*/{
21072 s//\1/
21073 q
21074 }
21075 /^X\(\/\/\)$/{
21076 s//\1/
21077 q
21078 }
21079 /^X\(\/\).*/{
21080 s//\1/
21081 q
21082 }
21083 s/.*/./; q'`
21084 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
21085 ac_builddir=.
21086
81ecdfbb
RW
21087case "$ac_dir" in
21088.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21089*)
21090 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21091 # A ".." for each directory in $ac_dir_suffix.
21092 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21093 case $ac_top_builddir_sub in
21094 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21095 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21096 esac ;;
21097esac
21098ac_abs_top_builddir=$ac_pwd
21099ac_abs_builddir=$ac_pwd$ac_dir_suffix
21100# for backward compatibility:
21101ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
21102
21103case $srcdir in
81ecdfbb 21104 .) # We are building in place.
bec39cab 21105 ac_srcdir=.
81ecdfbb
RW
21106 ac_top_srcdir=$ac_top_builddir_sub
21107 ac_abs_top_srcdir=$ac_pwd ;;
21108 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 21109 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
21110 ac_top_srcdir=$srcdir
21111 ac_abs_top_srcdir=$srcdir ;;
21112 *) # Relative name.
21113 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21114 ac_top_srcdir=$ac_top_build_prefix$srcdir
21115 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 21116esac
81ecdfbb 21117ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 21118
c906108c 21119
81ecdfbb
RW
21120 case $ac_mode in
21121 :F)
21122 #
21123 # CONFIG_FILE
21124 #
c906108c 21125
bec39cab
AC
21126 case $INSTALL in
21127 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 21128 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 21129 esac
81ecdfbb 21130_ACEOF
121ce6e5 21131
81ecdfbb
RW
21132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21133# If the template does not know about datarootdir, expand it.
21134# FIXME: This hack should be removed a few years after 2.60.
21135ac_datarootdir_hack=; ac_datarootdir_seen=
21136ac_sed_dataroot='
21137/datarootdir/ {
21138 p
21139 q
21140}
21141/@datadir@/p
21142/@docdir@/p
21143/@infodir@/p
21144/@localedir@/p
21145/@mandir@/p'
21146case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21147*datarootdir*) ac_datarootdir_seen=yes;;
21148*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21150$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21151_ACEOF
21152cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21153 ac_datarootdir_hack='
21154 s&@datadir@&$datadir&g
21155 s&@docdir@&$docdir&g
21156 s&@infodir@&$infodir&g
21157 s&@localedir@&$localedir&g
21158 s&@mandir@&$mandir&g
21159 s&\\\${datarootdir}&$datarootdir&g' ;;
21160esac
4e8d927d 21161_ACEOF
81ecdfbb
RW
21162
21163# Neutralize VPATH when `$srcdir' = `.'.
21164# Shell code in configure.ac might set extrasub.
21165# FIXME: do we really want to maintain this feature?
21166cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21167ac_sed_extra="$ac_vpsub
bec39cab
AC
21168$extrasub
21169_ACEOF
81ecdfbb 21170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
21171:t
21172/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
21173s|@configure_input@|$ac_sed_conf_input|;t t
21174s&@top_builddir@&$ac_top_builddir_sub&;t t
21175s&@top_build_prefix@&$ac_top_build_prefix&;t t
21176s&@srcdir@&$ac_srcdir&;t t
21177s&@abs_srcdir@&$ac_abs_srcdir&;t t
21178s&@top_srcdir@&$ac_top_srcdir&;t t
21179s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21180s&@builddir@&$ac_builddir&;t t
21181s&@abs_builddir@&$ac_abs_builddir&;t t
21182s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21183s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
21184$ac_datarootdir_hack
21185"
21186eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
21187if $ac_cs_awk_getline; then
d0ac1c44 21188 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 21189else
d0ac1c44
SM
21190 $AWK -f "$ac_tmp/subs.awk" | $SHELL
21191fi \
21192 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
21193
21194test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
21195 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21196 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21197 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 21198 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 21199which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 21200$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 21201which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 21202
d0ac1c44 21203 rm -f "$ac_tmp/stdin"
bec39cab 21204 case $ac_file in
d0ac1c44
SM
21205 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21206 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 21207 esac \
d0ac1c44 21208 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
21209 ;;
21210 :H)
21211 #
21212 # CONFIG_HEADER
21213 #
bec39cab 21214 if test x"$ac_file" != x-; then
81ecdfbb
RW
21215 {
21216 $as_echo "/* $configure_input */" \
d0ac1c44
SM
21217 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21218 } >"$ac_tmp/config.h" \
21219 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21220 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
21221 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21222$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 21223 else
81ecdfbb 21224 rm -f "$ac_file"
d0ac1c44
SM
21225 mv "$ac_tmp/config.h" "$ac_file" \
21226 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
21227 fi
21228 else
81ecdfbb 21229 $as_echo "/* $configure_input */" \
d0ac1c44
SM
21230 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21231 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 21232 fi
81ecdfbb
RW
21233 ;;
21234 :L)
21235 #
21236 # CONFIG_LINK
21237 #
c906108c 21238
81ecdfbb
RW
21239 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21240 :
b4e70030 21241 else
81ecdfbb
RW
21242 # Prefer the file from the source tree if names are identical.
21243 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21244 ac_source=$srcdir/$ac_source
21245 fi
b4e70030 21246
81ecdfbb
RW
21247 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21248$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 21249
81ecdfbb 21250 if test ! -r "$ac_source"; then
d0ac1c44 21251 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
21252 fi
21253 rm -f "$ac_file"
bec39cab 21254
81ecdfbb 21255 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 21256 case $ac_source in
81ecdfbb
RW
21257 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21258 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21259 esac
21260 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21261 ln "$ac_source" "$ac_file" 2>/dev/null ||
21262 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 21263 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
21264 fi
21265 ;;
21266 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21267$as_echo "$as_me: executing $ac_file commands" >&6;}
21268 ;;
c906108c 21269 esac
b4e70030 21270
bec39cab 21271
81ecdfbb 21272 case $ac_file$ac_mode in
c5adaa19 21273 "config.h":H) echo > stamp-h ;;
81ecdfbb 21274 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 21275 "nm.h":L) echo > stamp-nmh ;;
b292c783 21276 "gcore":F) chmod +x gcore ;;
81ecdfbb 21277
bec39cab 21278 esac
81ecdfbb 21279done # for ac_tag
c906108c 21280
bec39cab 21281
81ecdfbb 21282as_fn_exit 0
bec39cab 21283_ACEOF
bec39cab
AC
21284ac_clean_files=$ac_clean_files_save
21285
81ecdfbb 21286test $ac_write_fail = 0 ||
d0ac1c44 21287 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 21288
bec39cab
AC
21289
21290# configure is writing to config.log, and then calls config.status.
21291# config.status does its own redirection, appending to config.log.
21292# Unfortunately, on DOS this fails, as config.log is still kept open
21293# by configure, so config.status won't be able to write to it; its
21294# output is simply discarded. So we exec the FD to /dev/null,
21295# effectively closing config.log, so it can be properly (re)opened and
21296# appended to by config.status. When coming back to configure, we
21297# need to make the FD available again.
21298if test "$no_create" != yes; then
21299 ac_cs_success=:
21300 ac_config_status_args=
21301 test "$silent" = yes &&
21302 ac_config_status_args="$ac_config_status_args --quiet"
21303 exec 5>/dev/null
21304 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21305 exec 5>>config.log
21306 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21307 # would make configure fail if this is the last instruction.
d0ac1c44 21308 $ac_cs_success || as_fn_exit 1
bec39cab 21309fi
c906108c 21310
bec39cab 21311#
81ecdfbb 21312# CONFIG_SUBDIRS section.
bec39cab 21313#
c906108c
SS
21314if test "$no_recursion" != yes; then
21315
81ecdfbb
RW
21316 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
21317 # so they do not pile up.
c906108c
SS
21318 ac_sub_configure_args=
21319 ac_prev=
fdc59709
PB
21320 eval "set x $ac_configure_args"
21321 shift
21322 for ac_arg
21323 do
c906108c
SS
21324 if test -n "$ac_prev"; then
21325 ac_prev=
21326 continue
21327 fi
bec39cab 21328 case $ac_arg in
c906108c
SS
21329 -cache-file | --cache-file | --cache-fil | --cache-fi \
21330 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
21331 ac_prev=cache_file ;;
21332 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
21333 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
21334 | --c=*)
21335 ;;
21336 --config-cache | -C)
c906108c
SS
21337 ;;
21338 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
21339 ac_prev=srcdir ;;
21340 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
21341 ;;
bec39cab
AC
21342 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
21343 ac_prev=prefix ;;
21344 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
21345 ;;
81ecdfbb
RW
21346 --disable-option-checking)
21347 ;;
fdc59709
PB
21348 *)
21349 case $ac_arg in
81ecdfbb 21350 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 21351 esac
81ecdfbb 21352 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
21353 esac
21354 done
21355
bec39cab
AC
21356 # Always prepend --prefix to ensure using the same prefix
21357 # in subdir configurations.
fdc59709
PB
21358 ac_arg="--prefix=$prefix"
21359 case $ac_arg in
81ecdfbb 21360 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 21361 esac
81ecdfbb
RW
21362 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
21363
21364 # Pass --silent
21365 if test "$silent" = yes; then
21366 ac_sub_configure_args="--silent $ac_sub_configure_args"
21367 fi
21368
21369 # Always prepend --disable-option-checking to silence warnings, since
21370 # different subdirs can have different --enable and --with options.
21371 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 21372
b4e70030 21373 ac_popdir=`pwd`
bec39cab 21374 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
21375
21376 # Do not complain, so a configure script can configure whichever
21377 # parts of a large source tree are present.
fdc59709 21378 test -d "$srcdir/$ac_dir" || continue
c906108c 21379
81ecdfbb
RW
21380 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
21381 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
21382 $as_echo "$ac_msg" >&6
21383 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
21384 ac_builddir=.
21385
81ecdfbb
RW
21386case "$ac_dir" in
21387.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21388*)
21389 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21390 # A ".." for each directory in $ac_dir_suffix.
21391 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21392 case $ac_top_builddir_sub in
21393 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21394 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21395 esac ;;
21396esac
21397ac_abs_top_builddir=$ac_pwd
21398ac_abs_builddir=$ac_pwd$ac_dir_suffix
21399# for backward compatibility:
21400ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
21401
21402case $srcdir in
81ecdfbb 21403 .) # We are building in place.
bec39cab 21404 ac_srcdir=.
81ecdfbb
RW
21405 ac_top_srcdir=$ac_top_builddir_sub
21406 ac_abs_top_srcdir=$ac_pwd ;;
21407 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 21408 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
21409 ac_top_srcdir=$srcdir
21410 ac_abs_top_srcdir=$srcdir ;;
21411 *) # Relative name.
21412 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21413 ac_top_srcdir=$ac_top_build_prefix$srcdir
21414 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 21415esac
81ecdfbb 21416ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 21417
c906108c 21418
fdc59709 21419 cd "$ac_dir"
c906108c
SS
21420
21421 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
21422 if test -f "$ac_srcdir/configure.gnu"; then
21423 ac_sub_configure=$ac_srcdir/configure.gnu
21424 elif test -f "$ac_srcdir/configure"; then
21425 ac_sub_configure=$ac_srcdir/configure
21426 elif test -f "$ac_srcdir/configure.in"; then
21427 # This should be Cygnus configure.
21428 ac_sub_configure=$ac_aux_dir/configure
c906108c 21429 else
81ecdfbb
RW
21430 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
21431$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
21432 ac_sub_configure=
21433 fi
21434
21435 # The recursion is here.
21436 if test -n "$ac_sub_configure"; then
c906108c 21437 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
21438 case $cache_file in
21439 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
21440 *) # Relative name.
21441 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 21442 esac
c906108c 21443
81ecdfbb
RW
21444 { $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
21445$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 21446 # The eval makes quoting arguments work.
fdc59709
PB
21447 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
21448 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 21449 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
21450 fi
21451
fdc59709 21452 cd "$ac_popdir"
c906108c
SS
21453 done
21454fi
81ecdfbb
RW
21455if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21456 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21457$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21458fi
c906108c 21459
This page took 4.843349 seconds and 4 git commands to generate.