gdbsupport: replace AC_TRY_COMPILE in common.m4
[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
81ecdfbb
RW
735LTLIBEXPAT
736LIBEXPAT
737HAVE_LIBEXPAT
b8e0a31c 738JIT_READER_DIR
f997c383 739TARGET_PTR
39037522 740READLINE_TEXI_INCFLAG
81ecdfbb
RW
741READLINE_CFLAGS
742READLINE_DEPS
743READLINE
016a3251
DD
744LTLIBICONV
745LIBICONV
711a72d3
L
746zlibinc
747zlibdir
81ecdfbb
RW
748MIG
749WINDRES
750DLLTOOL
c971b7fa 751AR
81ecdfbb
RW
752YFLAGS
753YACC
c971b7fa 754RANLIB
81ecdfbb 755LN_S
c971b7fa
PA
756INSTALL_DATA
757INSTALL_SCRIPT
758INSTALL_PROGRAM
759AWK
81ecdfbb
RW
760REPORT_BUGS_TEXI
761REPORT_BUGS_TO
762PKGVERSION
44cee4fd 763CODESIGN_CERT
f6720b1c
AM
764DEBUGINFOD_LIBS
765DEBUGINFOD_CFLAGS
766PKG_CONFIG_LIBDIR
767PKG_CONFIG_PATH
768PKG_CONFIG
b292c783 769HAVE_NATIVE_GCORE_TARGET
81ecdfbb
RW
770TARGET_OBS
771subdirs
772GDB_DATADIR
773DEBUGDIR
5048e516
JK
774MAKEINFO_EXTRA_FLAGS
775MAKEINFOFLAGS
776MAKEINFO
81ecdfbb 777PACKAGE
81ecdfbb
RW
778CATOBJEXT
779GENCAT
780INSTOBJEXT
781DATADIRNAME
782CATALOGS
783POSUB
784GMSGFMT
785XGETTEXT
786INCINTL
787LIBINTL_DEP
788LIBINTL
789USE_NLS
81ecdfbb
RW
790CCDEPMODE
791DEPDIR
792am__leading_dot
0bcda685
PA
793CXX_DIALECT
794HAVE_CXX11
4869db5e
RM
795INSTALL_STRIP_PROGRAM
796STRIP
797install_sh
c8693053 798LARGEFILE_CPPFLAGS
81ecdfbb
RW
799target_os
800target_vendor
801target_cpu
802target
803host_os
804host_vendor
805host_cpu
806host
807build_os
808build_vendor
809build_cpu
810build
c971b7fa
PA
811EGREP
812GREP
813CPP
3bc3d82a
PA
814ac_ct_CXX
815CXXFLAGS
816CXX
81ecdfbb
RW
817OBJEXT
818EXEEXT
819ac_ct_CC
820CPPFLAGS
821LDFLAGS
822CFLAGS
823CC
824MAINT
825MAINTAINER_MODE_FALSE
826MAINTAINER_MODE_TRUE
827target_alias
828host_alias
829build_alias
830LIBS
831ECHO_T
832ECHO_N
833ECHO_C
834DEFS
835mandir
836localedir
837libdir
838psdir
839pdfdir
840dvidir
841htmldir
842infodir
843docdir
844oldincludedir
845includedir
846localstatedir
847sharedstatedir
848sysconfdir
849datadir
850datarootdir
851libexecdir
852sbindir
853bindir
854program_transform_name
855prefix
856exec_prefix
857PACKAGE_URL
858PACKAGE_BUGREPORT
859PACKAGE_STRING
860PACKAGE_VERSION
861PACKAGE_TARNAME
862PACKAGE_NAME
863PATH_SEPARATOR
864SHELL'
2b351b19 865ac_subst_files='nat_makefile_frag'
81ecdfbb
RW
866ac_user_opts='
867enable_option_checking
868enable_maintainer_mode
da2f07f1
JK
869enable_plugins
870enable_largefile
81ecdfbb
RW
871with_separate_debug_dir
872with_gdb_datadir
873with_relocated_sources
7349ff92 874with_auto_load_dir
bccbefd2 875with_auto_load_safe_path
81ecdfbb
RW
876enable_targets
877enable_64_bit_bfd
81ecdfbb
RW
878enable_gdbmi
879enable_tui
880enable_gdbtk
0d79cdc4 881with_debuginfod
05e7c244 882with_libunwind_ia64
81ecdfbb
RW
883with_curses
884enable_profiling
44cee4fd 885enable_codesign
81ecdfbb
RW
886with_pkgversion
887with_bugurl
711a72d3 888with_system_zlib
016a3251
DD
889with_gnu_ld
890enable_rpath
81ecdfbb 891with_libiconv_prefix
9f1528a1 892with_libiconv_type
478aac75 893with_iconv_bin
81ecdfbb 894with_system_readline
b8e0a31c 895with_jit_reader_dir
81ecdfbb 896with_expat
81ecdfbb 897with_libexpat_prefix
9f1528a1 898with_libexpat_type
2400729e
UW
899with_mpfr
900with_libmpfr_prefix
9f1528a1 901with_libmpfr_type
81ecdfbb 902with_python
d13c7322 903with_python_libdir
ed3ef339 904with_guile
189b8c2e 905enable_source_highlight
58bfce93
MM
906with_intel_pt
907with_libipt_prefix
9f1528a1 908with_libipt_type
81ecdfbb
RW
909with_included_regex
910with_sysroot
911with_system_gdbinit
ed2a2229 912with_system_gdbinit_dir
81ecdfbb
RW
913enable_werror
914enable_build_warnings
915enable_gdb_build_warnings
f35d5ade 916enable_ubsan
608e2dbb
TT
917with_lzma
918with_liblzma_prefix
9f1528a1 919with_liblzma_type
81ecdfbb
RW
920with_tcl
921with_tk
922with_x
923enable_sim
393fd4c3
YQ
924with_babeltrace
925with_libbabeltrace_prefix
9f1528a1 926with_libbabeltrace_type
ccb1ba62 927with_xxhash
1776e3e5 928enable_libctf
ccb1ba62 929with_libxxhash_prefix
9f1528a1 930with_libxxhash_type
8ecfd7bd 931enable_unit_tests
81ecdfbb
RW
932'
933 ac_precious_vars='build_alias
934host_alias
935target_alias
936CC
937CFLAGS
938LDFLAGS
939LIBS
940CPPFLAGS
3bc3d82a
PA
941CXX
942CXXFLAGS
943CCC
81ecdfbb 944CPP
f06e05e0
JK
945MAKEINFO
946MAKEINFOFLAGS
f6720b1c
AM
947PKG_CONFIG
948PKG_CONFIG_PATH
949PKG_CONFIG_LIBDIR
950DEBUGINFOD_CFLAGS
951DEBUGINFOD_LIBS
81ecdfbb
RW
952YACC
953YFLAGS
954XMKMF'
5ae98d25 955ac_subdirs_all='testsuite
919adfe8 956gdbtk'
c906108c
SS
957
958# Initialize some variables set by options.
bec39cab
AC
959ac_init_help=
960ac_init_version=false
81ecdfbb
RW
961ac_unrecognized_opts=
962ac_unrecognized_sep=
c906108c
SS
963# The variables have the same names as the options, with
964# dashes changed to underlines.
bec39cab 965cache_file=/dev/null
c906108c 966exec_prefix=NONE
c906108c 967no_create=
c906108c
SS
968no_recursion=
969prefix=NONE
970program_prefix=NONE
971program_suffix=NONE
972program_transform_name=s,x,x,
973silent=
974site=
975srcdir=
c906108c
SS
976verbose=
977x_includes=NONE
978x_libraries=NONE
bec39cab
AC
979
980# Installation directory options.
981# These are left unexpanded so users can "make install exec_prefix=/foo"
982# and all the variables that are supposed to be based on exec_prefix
983# by default will actually change.
984# Use braces instead of parens because sh, perl, etc. also accept them.
81ecdfbb 985# (The list follows the same order as the GNU Coding Standards.)
c906108c
SS
986bindir='${exec_prefix}/bin'
987sbindir='${exec_prefix}/sbin'
988libexecdir='${exec_prefix}/libexec'
81ecdfbb
RW
989datarootdir='${prefix}/share'
990datadir='${datarootdir}'
c906108c
SS
991sysconfdir='${prefix}/etc'
992sharedstatedir='${prefix}/com'
993localstatedir='${prefix}/var'
c906108c
SS
994includedir='${prefix}/include'
995oldincludedir='/usr/include'
81ecdfbb
RW
996docdir='${datarootdir}/doc/${PACKAGE}'
997infodir='${datarootdir}/info'
998htmldir='${docdir}'
999dvidir='${docdir}'
1000pdfdir='${docdir}'
1001psdir='${docdir}'
1002libdir='${exec_prefix}/lib'
1003localedir='${datarootdir}/locale'
1004mandir='${datarootdir}/man'
c906108c 1005
c906108c 1006ac_prev=
81ecdfbb 1007ac_dashdash=
c906108c
SS
1008for ac_option
1009do
c906108c
SS
1010 # If the previous option needs an argument, assign it.
1011 if test -n "$ac_prev"; then
81ecdfbb 1012 eval $ac_prev=\$ac_option
c906108c
SS
1013 ac_prev=
1014 continue
1015 fi
1016
81ecdfbb 1017 case $ac_option in
d0ac1c44
SM
1018 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1019 *=) ac_optarg= ;;
1020 *) ac_optarg=yes ;;
81ecdfbb 1021 esac
c906108c
SS
1022
1023 # Accept the important Cygnus configure options, so we can diagnose typos.
1024
81ecdfbb
RW
1025 case $ac_dashdash$ac_option in
1026 --)
1027 ac_dashdash=yes ;;
c906108c
SS
1028
1029 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1030 ac_prev=bindir ;;
1031 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 1032 bindir=$ac_optarg ;;
c906108c
SS
1033
1034 -build | --build | --buil | --bui | --bu)
bec39cab 1035 ac_prev=build_alias ;;
c906108c 1036 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 1037 build_alias=$ac_optarg ;;
c906108c
SS
1038
1039 -cache-file | --cache-file | --cache-fil | --cache-fi \
1040 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1041 ac_prev=cache_file ;;
1042 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1043 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
1044 cache_file=$ac_optarg ;;
1045
1046 --config-cache | -C)
1047 cache_file=config.cache ;;
c906108c 1048
81ecdfbb 1049 -datadir | --datadir | --datadi | --datad)
c906108c 1050 ac_prev=datadir ;;
81ecdfbb 1051 -datadir=* | --datadir=* | --datadi=* | --datad=*)
bec39cab 1052 datadir=$ac_optarg ;;
c906108c 1053
81ecdfbb
RW
1054 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1055 | --dataroo | --dataro | --datar)
1056 ac_prev=datarootdir ;;
1057 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1058 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1059 datarootdir=$ac_optarg ;;
1060
c906108c 1061 -disable-* | --disable-*)
81ecdfbb 1062 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 1063 # Reject names that are not valid shell variable names.
81ecdfbb 1064 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1065 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1066 ac_useropt_orig=$ac_useropt
1067 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1068 case $ac_user_opts in
1069 *"
1070"enable_$ac_useropt"
1071"*) ;;
1072 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1073 ac_unrecognized_sep=', ';;
1074 esac
1075 eval enable_$ac_useropt=no ;;
1076
1077 -docdir | --docdir | --docdi | --doc | --do)
1078 ac_prev=docdir ;;
1079 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1080 docdir=$ac_optarg ;;
1081
1082 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1083 ac_prev=dvidir ;;
1084 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1085 dvidir=$ac_optarg ;;
c906108c
SS
1086
1087 -enable-* | --enable-*)
81ecdfbb 1088 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 1089 # Reject names that are not valid shell variable names.
81ecdfbb 1090 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1091 as_fn_error $? "invalid feature name: $ac_useropt"
81ecdfbb
RW
1092 ac_useropt_orig=$ac_useropt
1093 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1094 case $ac_user_opts in
1095 *"
1096"enable_$ac_useropt"
1097"*) ;;
1098 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1099 ac_unrecognized_sep=', ';;
b4e70030 1100 esac
81ecdfbb 1101 eval enable_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1102
1103 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1104 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1105 | --exec | --exe | --ex)
1106 ac_prev=exec_prefix ;;
1107 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1108 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1109 | --exec=* | --exe=* | --ex=*)
bec39cab 1110 exec_prefix=$ac_optarg ;;
c906108c
SS
1111
1112 -gas | --gas | --ga | --g)
1113 # Obsolete; use --with-gas.
1114 with_gas=yes ;;
1115
bec39cab
AC
1116 -help | --help | --hel | --he | -h)
1117 ac_init_help=long ;;
1118 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1119 ac_init_help=recursive ;;
1120 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1121 ac_init_help=short ;;
c906108c
SS
1122
1123 -host | --host | --hos | --ho)
bec39cab 1124 ac_prev=host_alias ;;
c906108c 1125 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 1126 host_alias=$ac_optarg ;;
c906108c 1127
81ecdfbb
RW
1128 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1129 ac_prev=htmldir ;;
1130 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1131 | --ht=*)
1132 htmldir=$ac_optarg ;;
1133
c906108c
SS
1134 -includedir | --includedir | --includedi | --included | --include \
1135 | --includ | --inclu | --incl | --inc)
1136 ac_prev=includedir ;;
1137 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1138 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 1139 includedir=$ac_optarg ;;
c906108c
SS
1140
1141 -infodir | --infodir | --infodi | --infod | --info | --inf)
1142 ac_prev=infodir ;;
1143 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 1144 infodir=$ac_optarg ;;
c906108c
SS
1145
1146 -libdir | --libdir | --libdi | --libd)
1147 ac_prev=libdir ;;
1148 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 1149 libdir=$ac_optarg ;;
c906108c
SS
1150
1151 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1152 | --libexe | --libex | --libe)
1153 ac_prev=libexecdir ;;
1154 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1155 | --libexe=* | --libex=* | --libe=*)
bec39cab 1156 libexecdir=$ac_optarg ;;
c906108c 1157
81ecdfbb
RW
1158 -localedir | --localedir | --localedi | --localed | --locale)
1159 ac_prev=localedir ;;
1160 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1161 localedir=$ac_optarg ;;
1162
c906108c 1163 -localstatedir | --localstatedir | --localstatedi | --localstated \
81ecdfbb 1164 | --localstate | --localstat | --localsta | --localst | --locals)
c906108c
SS
1165 ac_prev=localstatedir ;;
1166 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
81ecdfbb 1167 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
bec39cab 1168 localstatedir=$ac_optarg ;;
c906108c
SS
1169
1170 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1171 ac_prev=mandir ;;
1172 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 1173 mandir=$ac_optarg ;;
c906108c
SS
1174
1175 -nfp | --nfp | --nf)
1176 # Obsolete; use --without-fp.
1177 with_fp=no ;;
1178
1179 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 1180 | --no-cr | --no-c | -n)
c906108c
SS
1181 no_create=yes ;;
1182
1183 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1184 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1185 no_recursion=yes ;;
1186
1187 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1188 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1189 | --oldin | --oldi | --old | --ol | --o)
1190 ac_prev=oldincludedir ;;
1191 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1192 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1193 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 1194 oldincludedir=$ac_optarg ;;
c906108c
SS
1195
1196 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1197 ac_prev=prefix ;;
1198 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 1199 prefix=$ac_optarg ;;
c906108c
SS
1200
1201 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1202 | --program-pre | --program-pr | --program-p)
1203 ac_prev=program_prefix ;;
1204 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1205 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 1206 program_prefix=$ac_optarg ;;
c906108c
SS
1207
1208 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1209 | --program-suf | --program-su | --program-s)
1210 ac_prev=program_suffix ;;
1211 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1212 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 1213 program_suffix=$ac_optarg ;;
c906108c
SS
1214
1215 -program-transform-name | --program-transform-name \
1216 | --program-transform-nam | --program-transform-na \
1217 | --program-transform-n | --program-transform- \
1218 | --program-transform | --program-transfor \
1219 | --program-transfo | --program-transf \
1220 | --program-trans | --program-tran \
1221 | --progr-tra | --program-tr | --program-t)
1222 ac_prev=program_transform_name ;;
1223 -program-transform-name=* | --program-transform-name=* \
1224 | --program-transform-nam=* | --program-transform-na=* \
1225 | --program-transform-n=* | --program-transform-=* \
1226 | --program-transform=* | --program-transfor=* \
1227 | --program-transfo=* | --program-transf=* \
1228 | --program-trans=* | --program-tran=* \
1229 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 1230 program_transform_name=$ac_optarg ;;
c906108c 1231
81ecdfbb
RW
1232 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1233 ac_prev=pdfdir ;;
1234 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1235 pdfdir=$ac_optarg ;;
1236
1237 -psdir | --psdir | --psdi | --psd | --ps)
1238 ac_prev=psdir ;;
1239 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1240 psdir=$ac_optarg ;;
1241
c906108c
SS
1242 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1243 | -silent | --silent | --silen | --sile | --sil)
1244 silent=yes ;;
1245
1246 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1247 ac_prev=sbindir ;;
1248 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1249 | --sbi=* | --sb=*)
bec39cab 1250 sbindir=$ac_optarg ;;
c906108c
SS
1251
1252 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1253 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1254 | --sharedst | --shareds | --shared | --share | --shar \
1255 | --sha | --sh)
1256 ac_prev=sharedstatedir ;;
1257 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1258 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1259 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1260 | --sha=* | --sh=*)
bec39cab 1261 sharedstatedir=$ac_optarg ;;
c906108c
SS
1262
1263 -site | --site | --sit)
1264 ac_prev=site ;;
1265 -site=* | --site=* | --sit=*)
bec39cab 1266 site=$ac_optarg ;;
3ace7edb 1267
c906108c
SS
1268 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1269 ac_prev=srcdir ;;
1270 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 1271 srcdir=$ac_optarg ;;
c906108c
SS
1272
1273 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1274 | --syscon | --sysco | --sysc | --sys | --sy)
1275 ac_prev=sysconfdir ;;
1276 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1277 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 1278 sysconfdir=$ac_optarg ;;
c906108c
SS
1279
1280 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 1281 ac_prev=target_alias ;;
c906108c 1282 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 1283 target_alias=$ac_optarg ;;
c906108c
SS
1284
1285 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1286 verbose=yes ;;
1287
bec39cab
AC
1288 -version | --version | --versio | --versi | --vers | -V)
1289 ac_init_version=: ;;
c906108c
SS
1290
1291 -with-* | --with-*)
81ecdfbb 1292 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 1293 # Reject names that are not valid shell variable names.
81ecdfbb 1294 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1295 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1296 ac_useropt_orig=$ac_useropt
1297 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1298 case $ac_user_opts in
1299 *"
1300"with_$ac_useropt"
1301"*) ;;
1302 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1303 ac_unrecognized_sep=', ';;
b4e70030 1304 esac
81ecdfbb 1305 eval with_$ac_useropt=\$ac_optarg ;;
c906108c
SS
1306
1307 -without-* | --without-*)
81ecdfbb 1308 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 1309 # Reject names that are not valid shell variable names.
81ecdfbb 1310 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1311 as_fn_error $? "invalid package name: $ac_useropt"
81ecdfbb
RW
1312 ac_useropt_orig=$ac_useropt
1313 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1314 case $ac_user_opts in
1315 *"
1316"with_$ac_useropt"
1317"*) ;;
1318 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1319 ac_unrecognized_sep=', ';;
1320 esac
1321 eval with_$ac_useropt=no ;;
c906108c
SS
1322
1323 --x)
1324 # Obsolete; use --with-x.
1325 with_x=yes ;;
1326
1327 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1328 | --x-incl | --x-inc | --x-in | --x-i)
1329 ac_prev=x_includes ;;
1330 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1331 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 1332 x_includes=$ac_optarg ;;
c906108c
SS
1333
1334 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1335 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1336 ac_prev=x_libraries ;;
1337 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1338 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 1339 x_libraries=$ac_optarg ;;
c906108c 1340
d0ac1c44
SM
1341 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1342Try \`$0 --help' for more information"
c906108c
SS
1343 ;;
1344
bec39cab
AC
1345 *=*)
1346 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1347 # Reject names that are not valid shell variable names.
81ecdfbb
RW
1348 case $ac_envvar in #(
1349 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 1350 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
81ecdfbb
RW
1351 esac
1352 eval $ac_envvar=\$ac_optarg
bec39cab
AC
1353 export $ac_envvar ;;
1354
c906108c 1355 *)
bec39cab 1356 # FIXME: should be removed in autoconf 3.0.
81ecdfbb 1357 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
bec39cab 1358 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
81ecdfbb 1359 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 1360 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c906108c
SS
1361 ;;
1362
1363 esac
1364done
1365
1366if test -n "$ac_prev"; then
bec39cab 1367 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 1368 as_fn_error $? "missing argument to $ac_option"
c906108c 1369fi
c906108c 1370
81ecdfbb
RW
1371if test -n "$ac_unrecognized_opts"; then
1372 case $enable_option_checking in
1373 no) ;;
d0ac1c44 1374 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
81ecdfbb 1375 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
b4e70030 1376 esac
81ecdfbb 1377fi
b4e70030 1378
81ecdfbb
RW
1379# Check all directory arguments for consistency.
1380for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1381 datadir sysconfdir sharedstatedir localstatedir includedir \
1382 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1383 libdir localedir mandir
b4e70030 1384do
81ecdfbb
RW
1385 eval ac_val=\$$ac_var
1386 # Remove trailing slashes.
1387 case $ac_val in
1388 */ )
1389 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1390 eval $ac_var=\$ac_val;;
1391 esac
1392 # Be sure to have absolute directory names.
b4e70030 1393 case $ac_val in
81ecdfbb
RW
1394 [\\/$]* | ?:[\\/]* ) continue;;
1395 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
c906108c 1396 esac
d0ac1c44 1397 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c906108c
SS
1398done
1399
bec39cab
AC
1400# There might be people who depend on the old broken behavior: `$host'
1401# used to hold the argument of --host etc.
1402# FIXME: To remove some day.
1403build=$build_alias
1404host=$host_alias
1405target=$target_alias
1406
1407# FIXME: To remove some day.
1408if test "x$host_alias" != x; then
1409 if test "x$build_alias" = x; then
1410 cross_compiling=maybe
bec39cab
AC
1411 elif test "x$build_alias" != "x$host_alias"; then
1412 cross_compiling=yes
1413 fi
1414fi
c906108c 1415
bec39cab
AC
1416ac_tool_prefix=
1417test -n "$host_alias" && ac_tool_prefix=$host_alias-
1418
1419test "$silent" = yes && exec 6>/dev/null
c906108c 1420
c906108c 1421
81ecdfbb
RW
1422ac_pwd=`pwd` && test -n "$ac_pwd" &&
1423ac_ls_di=`ls -di .` &&
1424ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 1425 as_fn_error $? "working directory cannot be determined"
81ecdfbb 1426test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 1427 as_fn_error $? "pwd does not report name of working directory"
81ecdfbb
RW
1428
1429
c906108c
SS
1430# Find the source files, if location was not specified.
1431if test -z "$srcdir"; then
1432 ac_srcdir_defaulted=yes
81ecdfbb
RW
1433 # Try the directory containing this script, then the parent directory.
1434 ac_confdir=`$as_dirname -- "$as_myself" ||
1435$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1436 X"$as_myself" : 'X\(//\)[^/]' \| \
1437 X"$as_myself" : 'X\(//\)$' \| \
1438 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1439$as_echo X"$as_myself" |
1440 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1441 s//\1/
1442 q
1443 }
1444 /^X\(\/\/\)[^/].*/{
1445 s//\1/
1446 q
1447 }
1448 /^X\(\/\/\)$/{
1449 s//\1/
1450 q
1451 }
1452 /^X\(\/\).*/{
1453 s//\1/
1454 q
1455 }
1456 s/.*/./; q'`
c906108c 1457 srcdir=$ac_confdir
81ecdfbb 1458 if test ! -r "$srcdir/$ac_unique_file"; then
c906108c
SS
1459 srcdir=..
1460 fi
1461else
1462 ac_srcdir_defaulted=no
1463fi
81ecdfbb
RW
1464if test ! -r "$srcdir/$ac_unique_file"; then
1465 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 1466 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
81ecdfbb
RW
1467fi
1468ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1469ac_abs_confdir=`(
d0ac1c44 1470 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
81ecdfbb
RW
1471 pwd)`
1472# When building in place, set srcdir=.
1473if test "$ac_abs_confdir" = "$ac_pwd"; then
1474 srcdir=.
1475fi
1476# Remove unnecessary trailing slashes from srcdir.
1477# Double slashes in file names in object file debugging info
1478# mess up M-x gdb in Emacs.
1479case $srcdir in
1480*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1481esac
1482for ac_var in $ac_precious_vars; do
1483 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1484 eval ac_env_${ac_var}_value=\$${ac_var}
1485 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1486 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1487done
c906108c 1488
bec39cab
AC
1489#
1490# Report the --help message.
1491#
1492if test "$ac_init_help" = "long"; then
1493 # Omit some internal or obsolete options to make the list less imposing.
1494 # This message is too long to be a string in the A/UX 3.1 sh.
1495 cat <<_ACEOF
1496\`configure' configures this package to adapt to many kinds of systems.
1497
1498Usage: $0 [OPTION]... [VAR=VALUE]...
1499
1500To assign environment variables (e.g., CC, CFLAGS...), specify them as
1501VAR=VALUE. See below for descriptions of some of the useful variables.
1502
1503Defaults for the options are specified in brackets.
1504
1505Configuration:
1506 -h, --help display this help and exit
1507 --help=short display options specific to this package
1508 --help=recursive display the short help of all the included packages
1509 -V, --version display version information and exit
d0ac1c44 1510 -q, --quiet, --silent do not print \`checking ...' messages
bec39cab
AC
1511 --cache-file=FILE cache test results in FILE [disabled]
1512 -C, --config-cache alias for \`--cache-file=config.cache'
1513 -n, --no-create do not create output files
1514 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1515
bec39cab
AC
1516Installation directories:
1517 --prefix=PREFIX install architecture-independent files in PREFIX
81ecdfbb 1518 [$ac_default_prefix]
bec39cab 1519 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
81ecdfbb 1520 [PREFIX]
bec39cab
AC
1521
1522By default, \`make install' will install all the files in
1523\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1524an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1525for instance \`--prefix=\$HOME'.
1526
1527For better control, use the options below.
1528
1529Fine tuning of the installation directories:
81ecdfbb
RW
1530 --bindir=DIR user executables [EPREFIX/bin]
1531 --sbindir=DIR system admin executables [EPREFIX/sbin]
1532 --libexecdir=DIR program executables [EPREFIX/libexec]
1533 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1534 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1535 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1536 --libdir=DIR object code libraries [EPREFIX/lib]
1537 --includedir=DIR C header files [PREFIX/include]
1538 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1539 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1540 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1541 --infodir=DIR info documentation [DATAROOTDIR/info]
1542 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1543 --mandir=DIR man documentation [DATAROOTDIR/man]
1544 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1545 --htmldir=DIR html documentation [DOCDIR]
1546 --dvidir=DIR dvi documentation [DOCDIR]
1547 --pdfdir=DIR pdf documentation [DOCDIR]
1548 --psdir=DIR ps documentation [DOCDIR]
bec39cab
AC
1549_ACEOF
1550
1551 cat <<\_ACEOF
1552
9009e1ae
MR
1553Program names:
1554 --program-prefix=PREFIX prepend PREFIX to installed program names
1555 --program-suffix=SUFFIX append SUFFIX to installed program names
1556 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1557
bec39cab
AC
1558X features:
1559 --x-includes=DIR X include files are in DIR
1560 --x-libraries=DIR X library files are in DIR
1561
1562System types:
1563 --build=BUILD configure for building on BUILD [guessed]
1564 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1565 --target=TARGET configure for building compilers for TARGET [HOST]
1566_ACEOF
1567fi
1568
1569if test -n "$ac_init_help"; then
1570
1571 cat <<\_ACEOF
1572
1573Optional Features:
81ecdfbb 1574 --disable-option-checking ignore unrecognized --enable/--with options
bec39cab
AC
1575 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1576 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
1577 --enable-maintainer-mode
1578 enable make rules and dependencies not useful (and
1579 sometimes confusing) to the casual installer
2974be62 1580 --enable-plugins Enable support for plugins
da2f07f1 1581 --disable-largefile omit support for large files
a1220294
TT
1582 --enable-targets=TARGETS
1583 alternative target configurations
c0993dbe 1584 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
bec39cab
AC
1585 --disable-gdbmi disable machine-interface (MI)
1586 --enable-tui enable full-screen terminal user interface (TUI)
1587 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1588 --enable-profiling enable profiling of GDB
44cee4fd 1589 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
3841debe 1590 --disable-rpath do not hardcode runtime library paths
189b8c2e
ST
1591 --enable-source-highlight
1592 enable source-highlight for source listings
a1220294 1593 --enable-werror treat compile warnings as errors
32c1c914 1594 --enable-build-warnings enable build-time compiler warnings if gcc is used
a1220294 1595 --enable-gdb-build-warnings
32c1c914 1596 enable GDB specific build-time compiler warnings if
a1220294 1597 gcc is used
f35d5ade 1598 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
32c1c914 1599 --enable-sim link gdb with simulator
1776e3e5 1600 --enable-libctf Handle .ctf type-info sections [default=yes]
8ecfd7bd
SDJ
1601 --enable-unit-tests Enable the inclusion of unit tests when compiling
1602 GDB
bec39cab
AC
1603
1604Optional Packages:
1605 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1606 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
a1220294 1607 --with-separate-debug-dir=PATH
32c1c914 1608 look for global separate debug info in this path
62e4f60c 1609 [LIBDIR/debug]
b14b1491
TT
1610 --with-gdb-datadir=PATH look for global separate data files in this path
1611 [DATADIR/gdb]
29b0e8a2 1612 --with-relocated-sources=PATH
32c1c914 1613 automatically relocate this path for source files
7349ff92 1614 --with-auto-load-dir=PATH
aff139ff 1615 directories from which to load auto-loaded scripts
1564a261 1616 [$debugdir:$datadir/auto-load]
bccbefd2 1617 --with-auto-load-safe-path=PATH
aff139ff 1618 directories safe to hold auto-loaded files
7349ff92 1619 [--with-auto-load-dir]
bccbefd2
JK
1620 --without-auto-load-safe-path
1621 do not restrict auto-loaded files locations
0d79cdc4
AM
1622 --with-debuginfod Enable debuginfo lookups with debuginfod
1623 (auto/yes/no)
05e7c244 1624 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
cb01cfba
JB
1625 --with-curses use the curses library instead of the termcap
1626 library
c16158bc
JM
1627 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1628 --with-bugurl=URL Direct users to URL to report a bug
711a72d3 1629 --with-system-zlib use installed libz
016a3251
DD
1630 --with-gnu-ld assume the C compiler uses GNU ld default=no
1631 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1632 --without-libiconv-prefix don't search for libiconv in includedir and libdir
9f1528a1 1633 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
478aac75 1634 --with-iconv-bin=PATH specify where to find the iconv program
6a30b0a5 1635 --with-system-readline use installed readline library
b8e0a31c
SD
1636 --with-jit-reader-dir=PATH
1637 directory to load the JIT readers from
5c39566f 1638 --with-expat include expat support (auto/yes/no)
3841debe
DJ
1639 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1640 --without-libexpat-prefix don't search for libexpat in includedir and libdir
9f1528a1 1641 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
2400729e
UW
1642 --with-mpfr include MPFR support (auto/yes/no)
1643 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1644 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
9f1528a1 1645 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
0c4a4063
DE
1646 --with-python[=PYTHON] include python support
1647 (auto/yes/no/<python-program>)
d13c7322
AB
1648 --with-python-libdir[=DIR]
1649 search for python's libraries in DIR
ed3ef339
DE
1650 --with-guile[=GUILE] include guile support
1651 (auto/yes/no/<guile-version>/<pkg-config-program>)
bc504a31 1652 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
58bfce93
MM
1653 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1654 --without-libipt-prefix don't search for libipt in includedir and libdir
9f1528a1 1655 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
a1220294
TT
1656 --without-included-regex
1657 don't use included regex; this is the default on
1658 systems with version 2 of the GNU C library (use
1659 with caution on other system)
81ecdfbb 1660 --with-sysroot[=DIR] search for usr/lib et al within DIR
b14b1491 1661 --with-system-gdbinit=PATH
32c1c914 1662 automatically load a system-wide gdbinit file
ed2a2229
CB
1663 --with-system-gdbinit-dir=PATH
1664 automatically load system-wide gdbinit files from
1665 this directory
608e2dbb
TT
1666 --with-lzma support lzma compression (auto/yes/no)
1667 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1668 --without-liblzma-prefix don't search for liblzma in includedir and libdir
9f1528a1 1669 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
5062cc19
KS
1670 --with-tcl directory containing tcl configuration (tclConfig.sh)
1671 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 1672 --with-x use the X Window System
393fd4c3
YQ
1673 --with-babeltrace include babeltrace support (auto/yes/no)
1674 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1675 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
9f1528a1 1676 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
ccb1ba62
CB
1677 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1678 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1679 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
9f1528a1 1680 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
bec39cab
AC
1681
1682Some influential environment variables:
1683 CC C compiler command
1684 CFLAGS C compiler flags
1685 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1686 nonstandard directory <lib dir>
81ecdfbb 1687 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 1688 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
81ecdfbb 1689 you have headers in a nonstandard directory <include dir>
3bc3d82a
PA
1690 CXX C++ compiler command
1691 CXXFLAGS C++ compiler flags
bec39cab 1692 CPP C preprocessor
f06e05e0
JK
1693 MAKEINFO Parent configure detects if it is of sufficient version.
1694 MAKEINFOFLAGS
1695 Parameters for MAKEINFO.
f6720b1c
AM
1696 PKG_CONFIG path to pkg-config utility
1697 PKG_CONFIG_PATH
1698 directories to add to pkg-config's search path
1699 PKG_CONFIG_LIBDIR
1700 path overriding pkg-config's built-in search path
1701 DEBUGINFOD_CFLAGS
1702 C compiler flags for DEBUGINFOD, overriding pkg-config
1703 DEBUGINFOD_LIBS
1704 linker flags for DEBUGINFOD, overriding pkg-config
d0ac1c44
SM
1705 YACC The `Yet Another Compiler Compiler' implementation to use.
1706 Defaults to the first program found out of: `bison -y', `byacc',
1707 `yacc'.
81ecdfbb
RW
1708 YFLAGS The list of arguments that will be passed by default to $YACC.
1709 This script will default YFLAGS to the empty string to avoid a
1710 default value of `-d' given by some make applications.
1711 XMKMF Path to xmkmf, Makefile generator for X Window System
bec39cab
AC
1712
1713Use these variables to override the choices made by `configure' or to help
1714it to find libraries and programs with nonstandard names/locations.
1715
81ecdfbb 1716Report bugs to the package provider.
bec39cab 1717_ACEOF
81ecdfbb 1718ac_status=$?
bec39cab
AC
1719fi
1720
1721if test "$ac_init_help" = "recursive"; then
1722 # If there are subdirs, report their specific --help.
bec39cab 1723 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
81ecdfbb
RW
1724 test -d "$ac_dir" ||
1725 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1726 continue
bec39cab
AC
1727 ac_builddir=.
1728
81ecdfbb
RW
1729case "$ac_dir" in
1730.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1731*)
1732 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1733 # A ".." for each directory in $ac_dir_suffix.
1734 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1735 case $ac_top_builddir_sub in
1736 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1737 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1738 esac ;;
1739esac
1740ac_abs_top_builddir=$ac_pwd
1741ac_abs_builddir=$ac_pwd$ac_dir_suffix
1742# for backward compatibility:
1743ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
1744
1745case $srcdir in
81ecdfbb 1746 .) # We are building in place.
bec39cab 1747 ac_srcdir=.
81ecdfbb
RW
1748 ac_top_srcdir=$ac_top_builddir_sub
1749 ac_abs_top_srcdir=$ac_pwd ;;
1750 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 1751 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
1752 ac_top_srcdir=$srcdir
1753 ac_abs_top_srcdir=$srcdir ;;
1754 *) # Relative name.
1755 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1756 ac_top_srcdir=$ac_top_build_prefix$srcdir
1757 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 1758esac
81ecdfbb 1759ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 1760
81ecdfbb
RW
1761 cd "$ac_dir" || { ac_status=$?; continue; }
1762 # Check for guested configure.
1763 if test -f "$ac_srcdir/configure.gnu"; then
1764 echo &&
1765 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1766 elif test -f "$ac_srcdir/configure"; then
1767 echo &&
1768 $SHELL "$ac_srcdir/configure" --help=recursive
3ace7edb 1769 else
81ecdfbb
RW
1770 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1771 fi || ac_status=$?
1772 cd "$ac_pwd" || { ac_status=$?; break; }
bec39cab
AC
1773 done
1774fi
1775
81ecdfbb 1776test -n "$ac_init_help" && exit $ac_status
bec39cab
AC
1777if $ac_init_version; then
1778 cat <<\_ACEOF
81ecdfbb 1779configure
d0ac1c44 1780generated by GNU Autoconf 2.69
bec39cab 1781
d0ac1c44 1782Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
1783This configure script is free software; the Free Software Foundation
1784gives unlimited permission to copy, distribute and modify it.
1785_ACEOF
81ecdfbb 1786 exit
bec39cab 1787fi
bec39cab 1788
81ecdfbb
RW
1789## ------------------------ ##
1790## Autoconf initialization. ##
1791## ------------------------ ##
bec39cab 1792
81ecdfbb
RW
1793# ac_fn_c_try_compile LINENO
1794# --------------------------
1795# Try to compile conftest.$ac_ext, and return whether this succeeded.
1796ac_fn_c_try_compile ()
1797{
1798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 rm -f conftest.$ac_objext
1800 if { { ac_try="$ac_compile"
1801case "(($ac_try" in
1802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1803 *) ac_try_echo=$ac_try;;
1804esac
1805eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1806$as_echo "$ac_try_echo"; } >&5
1807 (eval "$ac_compile") 2>conftest.err
1808 ac_status=$?
1809 if test -s conftest.err; then
1810 grep -v '^ *+' conftest.err >conftest.er1
1811 cat conftest.er1 >&5
1812 mv -f conftest.er1 conftest.err
1813 fi
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; } && {
1816 test -z "$ac_c_werror_flag" ||
1817 test ! -s conftest.err
1818 } && test -s conftest.$ac_objext; then :
1819 ac_retval=0
1820else
1821 $as_echo "$as_me: failed program was:" >&5
1822sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1823
81ecdfbb
RW
1824 ac_retval=1
1825fi
d0ac1c44
SM
1826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1827 as_fn_set_status $ac_retval
81ecdfbb
RW
1828
1829} # ac_fn_c_try_compile
1830
3bc3d82a
PA
1831# ac_fn_cxx_try_compile LINENO
1832# ----------------------------
1833# Try to compile conftest.$ac_ext, and return whether this succeeded.
1834ac_fn_cxx_try_compile ()
1835{
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 rm -f conftest.$ac_objext
1838 if { { ac_try="$ac_compile"
1839case "(($ac_try" in
1840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841 *) ac_try_echo=$ac_try;;
1842esac
1843eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844$as_echo "$ac_try_echo"; } >&5
1845 (eval "$ac_compile") 2>conftest.err
1846 ac_status=$?
1847 if test -s conftest.err; then
1848 grep -v '^ *+' conftest.err >conftest.er1
1849 cat conftest.er1 >&5
1850 mv -f conftest.er1 conftest.err
1851 fi
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; } && {
1854 test -z "$ac_cxx_werror_flag" ||
1855 test ! -s conftest.err
1856 } && test -s conftest.$ac_objext; then :
1857 ac_retval=0
1858else
1859 $as_echo "$as_me: failed program was:" >&5
1860sed 's/^/| /' conftest.$ac_ext >&5
1861
1862 ac_retval=1
1863fi
d0ac1c44
SM
1864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1865 as_fn_set_status $ac_retval
3bc3d82a
PA
1866
1867} # ac_fn_cxx_try_compile
1868
81ecdfbb
RW
1869# ac_fn_c_try_cpp LINENO
1870# ----------------------
1871# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1872ac_fn_c_try_cpp ()
bec39cab 1873{
81ecdfbb
RW
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if { { ac_try="$ac_cpp conftest.$ac_ext"
1876case "(($ac_try" in
1877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878 *) ac_try_echo=$ac_try;;
1879esac
1880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881$as_echo "$ac_try_echo"; } >&5
1882 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1883 ac_status=$?
1884 if test -s conftest.err; then
1885 grep -v '^ *+' conftest.err >conftest.er1
1886 cat conftest.er1 >&5
1887 mv -f conftest.er1 conftest.err
1888 fi
1889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 1890 test $ac_status = 0; } > conftest.i && {
81ecdfbb
RW
1891 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1892 test ! -s conftest.err
1893 }; then :
1894 ac_retval=0
1895else
1896 $as_echo "$as_me: failed program was:" >&5
1897sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 1898
81ecdfbb
RW
1899 ac_retval=1
1900fi
d0ac1c44
SM
1901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1902 as_fn_set_status $ac_retval
bec39cab 1903
81ecdfbb 1904} # ac_fn_c_try_cpp
bec39cab 1905
81ecdfbb
RW
1906# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1907# -------------------------------------------------------
1908# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1909# the include files in INCLUDES and setting the cache variable VAR
1910# accordingly.
1911ac_fn_c_check_header_mongrel ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 1914 if eval \${$3+:} false; then :
81ecdfbb
RW
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1916$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1917if eval \${$3+:} false; then :
81ecdfbb
RW
1918 $as_echo_n "(cached) " >&6
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
1923else
1924 # Is the header compilable?
1925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1926$as_echo_n "checking $2 usability... " >&6; }
1927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1928/* end confdefs.h. */
1929$4
1930#include <$2>
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933 ac_header_compiler=yes
1934else
1935 ac_header_compiler=no
1936fi
1937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1939$as_echo "$ac_header_compiler" >&6; }
bec39cab 1940
81ecdfbb
RW
1941# Is the header present?
1942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1943$as_echo_n "checking $2 presence... " >&6; }
1944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946#include <$2>
1947_ACEOF
1948if ac_fn_c_try_cpp "$LINENO"; then :
1949 ac_header_preproc=yes
1950else
1951 ac_header_preproc=no
1952fi
d0ac1c44 1953rm -f conftest.err conftest.i conftest.$ac_ext
81ecdfbb
RW
1954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1955$as_echo "$ac_header_preproc" >&6; }
bec39cab 1956
81ecdfbb
RW
1957# So? What about this header?
1958case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1959 yes:no: )
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1961$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1963$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1964 ;;
1965 no:yes:* )
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1967$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1969$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1971$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1973$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1975$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1976 ;;
1977esac
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1979$as_echo_n "checking for $2... " >&6; }
d0ac1c44 1980if eval \${$3+:} false; then :
81ecdfbb
RW
1981 $as_echo_n "(cached) " >&6
1982else
1983 eval "$3=\$ac_header_compiler"
1984fi
1985eval ac_res=\$$3
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987$as_echo "$ac_res" >&6; }
1988fi
d0ac1c44 1989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 1990
81ecdfbb 1991} # ac_fn_c_check_header_mongrel
bec39cab 1992
81ecdfbb
RW
1993# ac_fn_c_try_run LINENO
1994# ----------------------
1995# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1996# that executables *can* be run.
1997ac_fn_c_try_run ()
1998{
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 if { { ac_try="$ac_link"
2001case "(($ac_try" in
2002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2003 *) ac_try_echo=$ac_try;;
2004esac
2005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2006$as_echo "$ac_try_echo"; } >&5
2007 (eval "$ac_link") 2>&5
2008 ac_status=$?
2009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2011 { { case "(($ac_try" in
2012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2013 *) ac_try_echo=$ac_try;;
2014esac
2015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2016$as_echo "$ac_try_echo"; } >&5
2017 (eval "$ac_try") 2>&5
2018 ac_status=$?
2019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2020 test $ac_status = 0; }; }; then :
2021 ac_retval=0
2022else
2023 $as_echo "$as_me: program exited with status $ac_status" >&5
2024 $as_echo "$as_me: failed program was:" >&5
2025sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 2026
81ecdfbb
RW
2027 ac_retval=$ac_status
2028fi
2029 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2030 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031 as_fn_set_status $ac_retval
bec39cab 2032
81ecdfbb 2033} # ac_fn_c_try_run
bec39cab 2034
81ecdfbb
RW
2035# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2036# -------------------------------------------------------
2037# Tests whether HEADER exists and can be compiled using the include files in
2038# INCLUDES, setting the cache variable VAR accordingly.
2039ac_fn_c_check_header_compile ()
2040{
2041 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2043$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2044if eval \${$3+:} false; then :
81ecdfbb
RW
2045 $as_echo_n "(cached) " >&6
2046else
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050#include <$2>
bec39cab 2051_ACEOF
81ecdfbb
RW
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 eval "$3=yes"
2054else
2055 eval "$3=no"
2056fi
2057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2058fi
2059eval ac_res=\$$3
2060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061$as_echo "$ac_res" >&6; }
d0ac1c44 2062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
bec39cab 2063
81ecdfbb 2064} # ac_fn_c_check_header_compile
bec39cab 2065
2974be62
AM
2066# ac_fn_c_try_link LINENO
2067# -----------------------
2068# Try to link conftest.$ac_ext, and return whether this succeeded.
2069ac_fn_c_try_link ()
2070{
2071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072 rm -f conftest.$ac_objext conftest$ac_exeext
2073 if { { ac_try="$ac_link"
2074case "(($ac_try" in
2075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2076 *) ac_try_echo=$ac_try;;
2077esac
2078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2079$as_echo "$ac_try_echo"; } >&5
2080 (eval "$ac_link") 2>conftest.err
2081 ac_status=$?
2082 if test -s conftest.err; then
2083 grep -v '^ *+' conftest.err >conftest.er1
2084 cat conftest.er1 >&5
2085 mv -f conftest.er1 conftest.err
2086 fi
2087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2088 test $ac_status = 0; } && {
2089 test -z "$ac_c_werror_flag" ||
2090 test ! -s conftest.err
2091 } && test -s conftest$ac_exeext && {
2092 test "$cross_compiling" = yes ||
d0ac1c44 2093 test -x conftest$ac_exeext
2974be62
AM
2094 }; then :
2095 ac_retval=0
2096else
2097 $as_echo "$as_me: failed program was:" >&5
2098sed 's/^/| /' conftest.$ac_ext >&5
2099
2100 ac_retval=1
2101fi
2102 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2103 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2104 # interfere with the next link command; also delete a directory that is
2105 # left behind by Apple's compiler. We do this before executing the actions.
2106 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2107 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2108 as_fn_set_status $ac_retval
2974be62
AM
2109
2110} # ac_fn_c_try_link
2111
81ecdfbb
RW
2112# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2113# --------------------------------------------
2114# Tries to find the compile-time value of EXPR in a program that includes
2115# INCLUDES, setting VAR accordingly. Returns whether the value could be
2116# computed
2117ac_fn_c_compute_int ()
2118{
2119 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2120 if test "$cross_compiling" = yes; then
2121 # Depending upon the size, compute the lo and hi bounds.
2122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2129test_array [0] = 0;
2130return test_array [0];
bec39cab 2131
81ecdfbb
RW
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_lo=0 ac_mid=0
2138 while :; do
2139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140/* end confdefs.h. */
2141$4
2142int
2143main ()
2144{
2145static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2146test_array [0] = 0;
2147return test_array [0];
bec39cab 2148
81ecdfbb
RW
2149 ;
2150 return 0;
2151}
2152_ACEOF
2153if ac_fn_c_try_compile "$LINENO"; then :
2154 ac_hi=$ac_mid; break
2155else
2156 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2157 if test $ac_lo -le $ac_mid; then
2158 ac_lo= ac_hi=
2159 break
2160 fi
2161 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
c906108c 2162fi
81ecdfbb
RW
2163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164 done
c906108c 2165else
81ecdfbb
RW
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h. */
2168$4
2169int
2170main ()
2171{
2172static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2173test_array [0] = 0;
2174return test_array [0];
bec39cab 2175
81ecdfbb
RW
2176 ;
2177 return 0;
2178}
2179_ACEOF
2180if ac_fn_c_try_compile "$LINENO"; then :
2181 ac_hi=-1 ac_mid=-1
2182 while :; do
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185$4
2186int
2187main ()
2188{
2189static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2190test_array [0] = 0;
2191return test_array [0];
bec39cab 2192
81ecdfbb
RW
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_lo=$ac_mid; break
2199else
2200 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2201 if test $ac_mid -le $ac_hi; then
2202 ac_lo= ac_hi=
2203 break
2204 fi
2205 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208 done
2209else
2210 ac_lo= ac_hi=
2211fi
2212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213fi
2214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215# Binary search between lo and hi bounds.
2216while test "x$ac_lo" != "x$ac_hi"; do
2217 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h. */
2220$4
2221int
2222main ()
2223{
2224static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2225test_array [0] = 0;
2226return test_array [0];
bec39cab 2227
81ecdfbb
RW
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_compile "$LINENO"; then :
2233 ac_hi=$ac_mid
2234else
2235 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2236fi
2237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238done
2239case $ac_lo in #((
2240?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2241'') ac_retval=1 ;;
2242esac
2243 else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$4
2247static long int longval () { return $2; }
2248static unsigned long int ulongval () { return $2; }
2249#include <stdio.h>
2250#include <stdlib.h>
2251int
2252main ()
2253{
bec39cab 2254
81ecdfbb
RW
2255 FILE *f = fopen ("conftest.val", "w");
2256 if (! f)
2257 return 1;
2258 if (($2) < 0)
2259 {
2260 long int i = longval ();
2261 if (i != ($2))
2262 return 1;
2263 fprintf (f, "%ld", i);
2264 }
2265 else
2266 {
2267 unsigned long int i = ulongval ();
2268 if (i != ($2))
2269 return 1;
2270 fprintf (f, "%lu", i);
2271 }
2272 /* Do not output a trailing newline, as this causes \r\n confusion
2273 on some platforms. */
2274 return ferror (f) || fclose (f) != 0;
bec39cab 2275
81ecdfbb
RW
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_run "$LINENO"; then :
2281 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2282else
2283 ac_retval=1
2284fi
2285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2286 conftest.$ac_objext conftest.beam conftest.$ac_ext
2287rm -f conftest.val
bec39cab 2288
81ecdfbb 2289 fi
d0ac1c44
SM
2290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291 as_fn_set_status $ac_retval
bec39cab 2292
81ecdfbb 2293} # ac_fn_c_compute_int
bec39cab 2294
55a8c076
YQ
2295# ac_fn_c_check_func LINENO FUNC VAR
2296# ----------------------------------
2297# Tests whether FUNC exists, setting the cache variable VAR accordingly
2298ac_fn_c_check_func ()
81ecdfbb
RW
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2302$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2303if eval \${$3+:} false; then :
81ecdfbb
RW
2304 $as_echo_n "(cached) " >&6
2305else
81ecdfbb
RW
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
55a8c076
YQ
2308/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2309 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2310#define $2 innocuous_$2
2311
2312/* System header to define __stub macros and hopefully few prototypes,
2313 which can conflict with char $2 (); below.
2314 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2315 <limits.h> exists even on freestanding compilers. */
2316
2317#ifdef __STDC__
2318# include <limits.h>
2319#else
2320# include <assert.h>
2321#endif
2322
2323#undef $2
2324
2325/* Override any GCC internal prototype to avoid an error.
2326 Use char because int might match the return type of a GCC
2327 builtin and then its argument prototype would still apply. */
2328#ifdef __cplusplus
2329extern "C"
2330#endif
2331char $2 ();
2332/* The GNU C library defines this for functions which it implements
2333 to always fail with ENOSYS. Some functions are actually named
2334 something starting with __ and the normal name is an alias. */
2335#if defined __stub_$2 || defined __stub___$2
2336choke me
2337#endif
2338
2339int
2340main ()
2341{
2342return $2 ();
2343 ;
2344 return 0;
2345}
2346_ACEOF
2347if ac_fn_c_try_link "$LINENO"; then :
2348 eval "$3=yes"
2349else
2350 eval "$3=no"
2351fi
2352rm -f core conftest.err conftest.$ac_objext \
2353 conftest$ac_exeext conftest.$ac_ext
2354fi
2355eval ac_res=\$$3
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357$as_echo "$ac_res" >&6; }
d0ac1c44 2358 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
55a8c076
YQ
2359
2360} # ac_fn_c_check_func
2361
07697489
PA
2362# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2363# -------------------------------------------
2364# Tests whether TYPE exists after having included INCLUDES, setting cache
2365# variable VAR accordingly.
2366ac_fn_c_check_type ()
2367{
2368 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2370$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2371if eval \${$3+:} false; then :
07697489
PA
2372 $as_echo_n "(cached) " >&6
2373else
2374 eval "$3=no"
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$4
2378int
2379main ()
2380{
2381if (sizeof ($2))
2382 return 0;
2383 ;
2384 return 0;
2385}
2386_ACEOF
2387if ac_fn_c_try_compile "$LINENO"; then :
2388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2389/* end confdefs.h. */
2390$4
2391int
2392main ()
2393{
2394if (sizeof (($2)))
2395 return 0;
2396 ;
2397 return 0;
2398}
2399_ACEOF
2400if ac_fn_c_try_compile "$LINENO"; then :
2401
2402else
2403 eval "$3=yes"
2404fi
2405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406fi
2407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408fi
2409eval ac_res=\$$3
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411$as_echo "$ac_res" >&6; }
d0ac1c44 2412 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
07697489
PA
2413
2414} # ac_fn_c_check_type
2415
f6720b1c
AM
2416# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2417# ---------------------------------------------
2418# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2419# accordingly.
2420ac_fn_c_check_decl ()
2421{
2422 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423 as_decl_name=`echo $2|sed 's/ *(.*//'`
2424 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2426$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2427if eval \${$3+:} false; then :
2428 $as_echo_n "(cached) " >&6
2429else
2430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431/* end confdefs.h. */
2432$4
2433int
2434main ()
2435{
2436#ifndef $as_decl_name
2437#ifdef __cplusplus
2438 (void) $as_decl_use;
2439#else
2440 (void) $as_decl_name;
2441#endif
2442#endif
2443
2444 ;
2445 return 0;
2446}
2447_ACEOF
2448if ac_fn_c_try_compile "$LINENO"; then :
2449 eval "$3=yes"
2450else
2451 eval "$3=no"
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454fi
2455eval ac_res=\$$3
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2457$as_echo "$ac_res" >&6; }
2458 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459
2460} # ac_fn_c_check_decl
2461
05ea2a05
TT
2462# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2463# ----------------------------------------------------
2464# Tries to find if the field MEMBER exists in type AGGR, after including
2465# INCLUDES, setting cache variable VAR accordingly.
2466ac_fn_c_check_member ()
2467{
2468 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2470$as_echo_n "checking for $2.$3... " >&6; }
2471if eval \${$4+:} false; then :
2472 $as_echo_n "(cached) " >&6
2473else
2474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2475/* end confdefs.h. */
2476$5
2477int
2478main ()
2479{
2480static $2 ac_aggr;
2481if (ac_aggr.$3)
2482return 0;
2483 ;
2484 return 0;
2485}
2486_ACEOF
2487if ac_fn_c_try_compile "$LINENO"; then :
2488 eval "$4=yes"
2489else
2490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2491/* end confdefs.h. */
2492$5
2493int
2494main ()
2495{
2496static $2 ac_aggr;
2497if (sizeof ac_aggr.$3)
2498return 0;
2499 ;
2500 return 0;
2501}
2502_ACEOF
2503if ac_fn_c_try_compile "$LINENO"; then :
2504 eval "$4=yes"
2505else
2506 eval "$4=no"
2507fi
2508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2509fi
2510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2511fi
2512eval ac_res=\$$4
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2514$as_echo "$ac_res" >&6; }
2515 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516
2517} # ac_fn_c_check_member
2518
f35d5ade
TT
2519# ac_fn_cxx_try_link LINENO
2520# -------------------------
2521# Try to link conftest.$ac_ext, and return whether this succeeded.
2522ac_fn_cxx_try_link ()
2523{
2524 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525 rm -f conftest.$ac_objext conftest$ac_exeext
2526 if { { ac_try="$ac_link"
2527case "(($ac_try" in
2528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2529 *) ac_try_echo=$ac_try;;
2530esac
2531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2532$as_echo "$ac_try_echo"; } >&5
2533 (eval "$ac_link") 2>conftest.err
2534 ac_status=$?
2535 if test -s conftest.err; then
2536 grep -v '^ *+' conftest.err >conftest.er1
2537 cat conftest.er1 >&5
2538 mv -f conftest.er1 conftest.err
2539 fi
2540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2541 test $ac_status = 0; } && {
2542 test -z "$ac_cxx_werror_flag" ||
2543 test ! -s conftest.err
2544 } && test -s conftest$ac_exeext && {
2545 test "$cross_compiling" = yes ||
2546 test -x conftest$ac_exeext
2547 }; then :
2548 ac_retval=0
2549else
2550 $as_echo "$as_me: failed program was:" >&5
2551sed 's/^/| /' conftest.$ac_ext >&5
2552
2553 ac_retval=1
2554fi
2555 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2556 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2557 # interfere with the next link command; also delete a directory that is
2558 # left behind by Apple's compiler. We do this before executing the actions.
2559 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2560 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2561 as_fn_set_status $ac_retval
2562
2563} # ac_fn_cxx_try_link
21987b9c
TT
2564
2565# ac_fn_cxx_check_func LINENO FUNC VAR
2566# ------------------------------------
2567# Tests whether FUNC exists, setting the cache variable VAR accordingly
2568ac_fn_cxx_check_func ()
2569{
2570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2572$as_echo_n "checking for $2... " >&6; }
2573if eval \${$3+:} false; then :
2574 $as_echo_n "(cached) " >&6
2575else
2576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577/* end confdefs.h. */
2578/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2579 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2580#define $2 innocuous_$2
2581
2582/* System header to define __stub macros and hopefully few prototypes,
2583 which can conflict with char $2 (); below.
2584 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2585 <limits.h> exists even on freestanding compilers. */
2586
2587#ifdef __STDC__
2588# include <limits.h>
2589#else
2590# include <assert.h>
2591#endif
2592
2593#undef $2
2594
2595/* Override any GCC internal prototype to avoid an error.
2596 Use char because int might match the return type of a GCC
2597 builtin and then its argument prototype would still apply. */
2598#ifdef __cplusplus
2599extern "C"
2600#endif
2601char $2 ();
2602/* The GNU C library defines this for functions which it implements
2603 to always fail with ENOSYS. Some functions are actually named
2604 something starting with __ and the normal name is an alias. */
2605#if defined __stub_$2 || defined __stub___$2
2606choke me
2607#endif
2608
2609int
2610main ()
2611{
2612return $2 ();
2613 ;
2614 return 0;
2615}
2616_ACEOF
2617if ac_fn_cxx_try_link "$LINENO"; then :
2618 eval "$3=yes"
2619else
2620 eval "$3=no"
2621fi
2622rm -f core conftest.err conftest.$ac_objext \
2623 conftest$ac_exeext conftest.$ac_ext
2624fi
2625eval ac_res=\$$3
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627$as_echo "$ac_res" >&6; }
2628 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2629
2630} # ac_fn_cxx_check_func
81ecdfbb
RW
2631cat >config.log <<_ACEOF
2632This file contains any messages produced by compilers while
2633running configure, to aid debugging if configure makes a mistake.
d5af19ba 2634
81ecdfbb 2635It was created by $as_me, which was
d0ac1c44 2636generated by GNU Autoconf 2.69. Invocation command line was
b4e70030 2637
81ecdfbb 2638 $ $0 $@
413ccac7 2639
81ecdfbb
RW
2640_ACEOF
2641exec 5>>config.log
2642{
2643cat <<_ASUNAME
2644## --------- ##
2645## Platform. ##
2646## --------- ##
413ccac7 2647
81ecdfbb
RW
2648hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2649uname -m = `(uname -m) 2>/dev/null || echo unknown`
2650uname -r = `(uname -r) 2>/dev/null || echo unknown`
2651uname -s = `(uname -s) 2>/dev/null || echo unknown`
2652uname -v = `(uname -v) 2>/dev/null || echo unknown`
85981d60 2653
81ecdfbb
RW
2654/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2655/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
413ccac7 2656
81ecdfbb
RW
2657/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2658/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2659/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2660/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2661/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2662/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2663/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
c906108c 2664
81ecdfbb 2665_ASUNAME
bec39cab 2666
bec39cab
AC
2667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2668for as_dir in $PATH
2669do
2670 IFS=$as_save_IFS
2671 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
2672 $as_echo "PATH: $as_dir"
2673 done
2674IFS=$as_save_IFS
bec39cab 2675
81ecdfbb 2676} >&5
bec39cab 2677
81ecdfbb 2678cat >&5 <<_ACEOF
bec39cab 2679
bec39cab 2680
81ecdfbb
RW
2681## ----------- ##
2682## Core tests. ##
2683## ----------- ##
2684
2685_ACEOF
2686
2687
2688# Keep a trace of the command line.
2689# Strip out --no-create and --no-recursion so they do not pile up.
2690# Strip out --silent because we don't want to record it for future runs.
2691# Also quote any args containing shell meta-characters.
2692# Make two passes to allow for proper duplicate-argument suppression.
2693ac_configure_args=
2694ac_configure_args0=
2695ac_configure_args1=
2696ac_must_keep_next=false
2697for ac_pass in 1 2
2698do
2699 for ac_arg
2700 do
2701 case $ac_arg in
2702 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2703 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2704 | -silent | --silent | --silen | --sile | --sil)
2705 continue ;;
2706 *\'*)
2707 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2708 esac
2709 case $ac_pass in
2710 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2711 2)
2712 as_fn_append ac_configure_args1 " '$ac_arg'"
2713 if test $ac_must_keep_next = true; then
2714 ac_must_keep_next=false # Got value, back to normal.
2715 else
2716 case $ac_arg in
2717 *=* | --config-cache | -C | -disable-* | --disable-* \
2718 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2719 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2720 | -with-* | --with-* | -without-* | --without-* | --x)
2721 case "$ac_configure_args0 " in
2722 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2723 esac
2724 ;;
2725 -* ) ac_must_keep_next=true ;;
2726 esac
2727 fi
2728 as_fn_append ac_configure_args " '$ac_arg'"
2729 ;;
2730 esac
2731 done
2732done
2733{ ac_configure_args0=; unset ac_configure_args0;}
2734{ ac_configure_args1=; unset ac_configure_args1;}
2735
2736# When interrupted or exit'd, cleanup temporary files, and complete
2737# config.log. We remove comments because anyway the quotes in there
2738# would cause problems or look ugly.
2739# WARNING: Use '\'' to represent an apostrophe within the trap.
2740# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2741trap 'exit_status=$?
2742 # Save into config.log some information that might help in debugging.
2743 {
2744 echo
2745
d0ac1c44 2746 $as_echo "## ---------------- ##
81ecdfbb 2747## Cache variables. ##
d0ac1c44 2748## ---------------- ##"
81ecdfbb
RW
2749 echo
2750 # The following way of writing the cache mishandles newlines in values,
2751(
2752 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2753 eval ac_val=\$$ac_var
2754 case $ac_val in #(
2755 *${as_nl}*)
2756 case $ac_var in #(
2757 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2758$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2759 esac
2760 case $ac_var in #(
2761 _ | IFS | as_nl) ;; #(
2762 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2763 *) { eval $ac_var=; unset $ac_var;} ;;
2764 esac ;;
2765 esac
2766 done
2767 (set) 2>&1 |
2768 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2769 *${as_nl}ac_space=\ *)
2770 sed -n \
2771 "s/'\''/'\''\\\\'\'''\''/g;
2772 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2773 ;; #(
2774 *)
2775 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2776 ;;
2777 esac |
2778 sort
2779)
2780 echo
2781
d0ac1c44 2782 $as_echo "## ----------------- ##
81ecdfbb 2783## Output variables. ##
d0ac1c44 2784## ----------------- ##"
81ecdfbb
RW
2785 echo
2786 for ac_var in $ac_subst_vars
2787 do
2788 eval ac_val=\$$ac_var
2789 case $ac_val in
2790 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2791 esac
2792 $as_echo "$ac_var='\''$ac_val'\''"
2793 done | sort
2794 echo
2795
2796 if test -n "$ac_subst_files"; then
d0ac1c44 2797 $as_echo "## ------------------- ##
81ecdfbb 2798## File substitutions. ##
d0ac1c44 2799## ------------------- ##"
81ecdfbb
RW
2800 echo
2801 for ac_var in $ac_subst_files
2802 do
2803 eval ac_val=\$$ac_var
2804 case $ac_val in
2805 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2806 esac
2807 $as_echo "$ac_var='\''$ac_val'\''"
2808 done | sort
2809 echo
2810 fi
2811
2812 if test -s confdefs.h; then
d0ac1c44 2813 $as_echo "## ----------- ##
81ecdfbb 2814## confdefs.h. ##
d0ac1c44 2815## ----------- ##"
81ecdfbb
RW
2816 echo
2817 cat confdefs.h
2818 echo
2819 fi
2820 test "$ac_signal" != 0 &&
2821 $as_echo "$as_me: caught signal $ac_signal"
2822 $as_echo "$as_me: exit $exit_status"
2823 } >&5
2824 rm -f core *.core core.conftest.* &&
2825 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2826 exit $exit_status
2827' 0
2828for ac_signal in 1 2 13 15; do
2829 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2830done
2831ac_signal=0
2832
2833# confdefs.h avoids OS command line length limits that DEFS can exceed.
2834rm -f -r conftest* confdefs.h
2835
2836$as_echo "/* confdefs.h */" > confdefs.h
2837
2838# Predefined preprocessor variables.
2839
2840cat >>confdefs.h <<_ACEOF
2841#define PACKAGE_NAME "$PACKAGE_NAME"
2842_ACEOF
2843
2844cat >>confdefs.h <<_ACEOF
2845#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2846_ACEOF
2847
2848cat >>confdefs.h <<_ACEOF
2849#define PACKAGE_VERSION "$PACKAGE_VERSION"
2850_ACEOF
2851
2852cat >>confdefs.h <<_ACEOF
2853#define PACKAGE_STRING "$PACKAGE_STRING"
2854_ACEOF
2855
2856cat >>confdefs.h <<_ACEOF
2857#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2858_ACEOF
2859
2860cat >>confdefs.h <<_ACEOF
2861#define PACKAGE_URL "$PACKAGE_URL"
2862_ACEOF
2863
2864
2865# Let the site file select an alternate cache file if it wants to.
2866# Prefer an explicitly selected file to automatically selected ones.
2867ac_site_file1=NONE
2868ac_site_file2=NONE
2869if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
2870 # We do not want a PATH search for config.site.
2871 case $CONFIG_SITE in #((
2872 -*) ac_site_file1=./$CONFIG_SITE;;
2873 */*) ac_site_file1=$CONFIG_SITE;;
2874 *) ac_site_file1=./$CONFIG_SITE;;
2875 esac
81ecdfbb
RW
2876elif test "x$prefix" != xNONE; then
2877 ac_site_file1=$prefix/share/config.site
2878 ac_site_file2=$prefix/etc/config.site
2879else
2880 ac_site_file1=$ac_default_prefix/share/config.site
2881 ac_site_file2=$ac_default_prefix/etc/config.site
2882fi
2883for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2884do
2885 test "x$ac_site_file" = xNONE && continue
d0ac1c44 2886 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
81ecdfbb
RW
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2888$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2889 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
2890 . "$ac_site_file" \
2891 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2893as_fn_error $? "failed to load site script $ac_site_file
2894See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
2895 fi
2896done
2897
2898if test -r "$cache_file"; then
d0ac1c44
SM
2899 # Some versions of bash will fail to source /dev/null (special files
2900 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2901 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
81ecdfbb
RW
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2903$as_echo "$as_me: loading cache $cache_file" >&6;}
2904 case $cache_file in
2905 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2906 *) . "./$cache_file";;
2907 esac
2908 fi
2909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2911$as_echo "$as_me: creating cache $cache_file" >&6;}
2912 >$cache_file
bec39cab
AC
2913fi
2914
d0ac1c44
SM
2915as_fn_append ac_header_list " stdlib.h"
2916as_fn_append ac_header_list " unistd.h"
2917as_fn_append ac_header_list " sys/param.h"
81ecdfbb
RW
2918# Check that the precious variables saved in the cache have kept the same
2919# value.
2920ac_cache_corrupted=false
2921for ac_var in $ac_precious_vars; do
2922 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2923 eval ac_new_set=\$ac_env_${ac_var}_set
2924 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2925 eval ac_new_val=\$ac_env_${ac_var}_value
2926 case $ac_old_set,$ac_new_set in
2927 set,)
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2929$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2930 ac_cache_corrupted=: ;;
2931 ,set)
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2933$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2934 ac_cache_corrupted=: ;;
2935 ,);;
2936 *)
2937 if test "x$ac_old_val" != "x$ac_new_val"; then
2938 # differences in whitespace do not lead to failure.
2939 ac_old_val_w=`echo x $ac_old_val`
2940 ac_new_val_w=`echo x $ac_new_val`
2941 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2943$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2944 ac_cache_corrupted=:
2945 else
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2947$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2948 eval $ac_var=\$ac_old_val
2949 fi
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2951$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2953$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2954 fi;;
2955 esac
2956 # Pass precious variables to config.status.
2957 if test "$ac_new_set" = set; then
2958 case $ac_new_val in
2959 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2960 *) ac_arg=$ac_var=$ac_new_val ;;
2961 esac
2962 case " $ac_configure_args " in
2963 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2964 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2965 esac
2966 fi
2967done
2968if $ac_cache_corrupted; then
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2972$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 2973 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
81ecdfbb
RW
2974fi
2975## -------------------- ##
2976## Main body of script. ##
2977## -------------------- ##
2978
2979ac_ext=c
2980ac_cpp='$CPP $CPPFLAGS'
2981ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2982ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2983ac_compiler_gnu=$ac_cv_c_compiler_gnu
2984
2985
2986
2987
2988
5593a99a 2989
81ecdfbb
RW
2990ac_config_headers="$ac_config_headers config.h:config.in"
2991
2992
2993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2994$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2995 # Check whether --enable-maintainer-mode was given.
2996if test "${enable_maintainer_mode+set}" = set; then :
2997 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2998else
2999 USE_MAINTAINER_MODE=no
3000fi
3001
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3003$as_echo "$USE_MAINTAINER_MODE" >&6; }
3004 if test $USE_MAINTAINER_MODE = yes; then
3005 MAINTAINER_MODE_TRUE=
3006 MAINTAINER_MODE_FALSE='#'
3007else
3008 MAINTAINER_MODE_TRUE='#'
3009 MAINTAINER_MODE_FALSE=
3010fi
3011
3012 MAINT=$MAINTAINER_MODE_TRUE
3013
3014
3015
3016ac_ext=c
3017ac_cpp='$CPP $CPPFLAGS'
3018ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3019ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3020ac_compiler_gnu=$ac_cv_c_compiler_gnu
3021if test -n "$ac_tool_prefix"; then
3022 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3023set dummy ${ac_tool_prefix}gcc; ac_word=$2
3024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3025$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3026if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3027 $as_echo_n "(cached) " >&6
c906108c
SS
3028else
3029 if test -n "$CC"; then
3030 ac_cv_prog_CC="$CC" # Let the user override the test.
3031else
bec39cab
AC
3032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3033for as_dir in $PATH
3034do
3035 IFS=$as_save_IFS
3036 test -z "$as_dir" && as_dir=.
81ecdfbb 3037 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3038 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3039 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3041 break 2
3042 fi
3043done
81ecdfbb
RW
3044 done
3045IFS=$as_save_IFS
bec39cab 3046
c906108c
SS
3047fi
3048fi
bec39cab 3049CC=$ac_cv_prog_CC
c906108c 3050if test -n "$CC"; then
81ecdfbb
RW
3051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3052$as_echo "$CC" >&6; }
c906108c 3053else
81ecdfbb
RW
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3055$as_echo "no" >&6; }
c906108c
SS
3056fi
3057
81ecdfbb 3058
b4e70030
JB
3059fi
3060if test -z "$ac_cv_prog_CC"; then
3061 ac_ct_CC=$CC
81ecdfbb
RW
3062 # Extract the first word of "gcc", so it can be a program name with args.
3063set dummy gcc; ac_word=$2
3064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3065$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3066if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3067 $as_echo_n "(cached) " >&6
b4e70030
JB
3068else
3069 if test -n "$ac_ct_CC"; then
3070 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3071else
3072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3073for as_dir in $PATH
3074do
3075 IFS=$as_save_IFS
3076 test -z "$as_dir" && as_dir=.
81ecdfbb 3077 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3079 ac_cv_prog_ac_ct_CC="gcc"
3080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3081 break 2
4e8d927d 3082 fi
b4e70030 3083done
81ecdfbb
RW
3084 done
3085IFS=$as_save_IFS
b4e70030
JB
3086
3087fi
3088fi
3089ac_ct_CC=$ac_cv_prog_ac_ct_CC
3090if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3092$as_echo "$ac_ct_CC" >&6; }
b4e70030 3093else
81ecdfbb
RW
3094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3095$as_echo "no" >&6; }
b4e70030
JB
3096fi
3097
81ecdfbb
RW
3098 if test "x$ac_ct_CC" = x; then
3099 CC=""
3100 else
3101 case $cross_compiling:$ac_tool_warned in
3102yes:)
3103{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3104$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3105ac_tool_warned=yes ;;
3106esac
3107 CC=$ac_ct_CC
3108 fi
b4e70030
JB
3109else
3110 CC="$ac_cv_prog_CC"
3111fi
3112
c906108c 3113if test -z "$CC"; then
81ecdfbb
RW
3114 if test -n "$ac_tool_prefix"; then
3115 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3116set dummy ${ac_tool_prefix}cc; ac_word=$2
3117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3118$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3119if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3120 $as_echo_n "(cached) " >&6
c906108c
SS
3121else
3122 if test -n "$CC"; then
3123 ac_cv_prog_CC="$CC" # Let the user override the test.
3124else
bec39cab
AC
3125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3126for as_dir in $PATH
3127do
3128 IFS=$as_save_IFS
3129 test -z "$as_dir" && as_dir=.
81ecdfbb 3130 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3132 ac_cv_prog_CC="${ac_tool_prefix}cc"
3133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3134 break 2
3135 fi
3136done
81ecdfbb
RW
3137 done
3138IFS=$as_save_IFS
3139
3140fi
3141fi
3142CC=$ac_cv_prog_CC
3143if test -n "$CC"; then
3144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3145$as_echo "$CC" >&6; }
3146else
3147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3148$as_echo "no" >&6; }
3149fi
3150
3151
3152 fi
3153fi
3154if test -z "$CC"; then
3155 # Extract the first word of "cc", so it can be a program name with args.
3156set dummy cc; ac_word=$2
3157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3158$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3159if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3160 $as_echo_n "(cached) " >&6
3161else
3162 if test -n "$CC"; then
3163 ac_cv_prog_CC="$CC" # Let the user override the test.
3164else
3165 ac_prog_rejected=no
3166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3167for as_dir in $PATH
3168do
3169 IFS=$as_save_IFS
3170 test -z "$as_dir" && as_dir=.
3171 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3172 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3173 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3174 ac_prog_rejected=yes
3175 continue
3176 fi
3177 ac_cv_prog_CC="cc"
3178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3179 break 2
3180 fi
3181done
3182 done
3183IFS=$as_save_IFS
bec39cab 3184
c906108c
SS
3185if test $ac_prog_rejected = yes; then
3186 # We found a bogon in the path, so make sure we never use it.
3187 set dummy $ac_cv_prog_CC
3188 shift
bec39cab 3189 if test $# != 0; then
c906108c
SS
3190 # We chose a different compiler from the bogus one.
3191 # However, it has the same basename, so the bogon will be chosen
3192 # first if we set CC to just the basename; use the full file name.
3193 shift
bec39cab 3194 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3195 fi
3196fi
3197fi
3198fi
bec39cab 3199CC=$ac_cv_prog_CC
c906108c 3200if test -n "$CC"; then
81ecdfbb
RW
3201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3202$as_echo "$CC" >&6; }
c906108c 3203else
81ecdfbb
RW
3204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3205$as_echo "no" >&6; }
c906108c
SS
3206fi
3207
81ecdfbb 3208
bec39cab
AC
3209fi
3210if test -z "$CC"; then
3211 if test -n "$ac_tool_prefix"; then
81ecdfbb 3212 for ac_prog in cl.exe
bec39cab
AC
3213 do
3214 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3215set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3217$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3218if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3219 $as_echo_n "(cached) " >&6
c906108c
SS
3220else
3221 if test -n "$CC"; then
3222 ac_cv_prog_CC="$CC" # Let the user override the test.
3223else
bec39cab
AC
3224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3225for as_dir in $PATH
3226do
3227 IFS=$as_save_IFS
3228 test -z "$as_dir" && as_dir=.
81ecdfbb 3229 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3231 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3233 break 2
3234 fi
3235done
81ecdfbb
RW
3236 done
3237IFS=$as_save_IFS
bec39cab 3238
c906108c
SS
3239fi
3240fi
bec39cab 3241CC=$ac_cv_prog_CC
c906108c 3242if test -n "$CC"; then
81ecdfbb
RW
3243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3244$as_echo "$CC" >&6; }
c906108c 3245else
81ecdfbb
RW
3246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3247$as_echo "no" >&6; }
c906108c 3248fi
bec39cab 3249
81ecdfbb 3250
bec39cab
AC
3251 test -n "$CC" && break
3252 done
3253fi
3254if test -z "$CC"; then
3255 ac_ct_CC=$CC
81ecdfbb 3256 for ac_prog in cl.exe
bec39cab
AC
3257do
3258 # Extract the first word of "$ac_prog", so it can be a program name with args.
3259set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3261$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3262if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3263 $as_echo_n "(cached) " >&6
bec39cab
AC
3264else
3265 if test -n "$ac_ct_CC"; then
3266 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3267else
3268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3269for as_dir in $PATH
3270do
3271 IFS=$as_save_IFS
3272 test -z "$as_dir" && as_dir=.
81ecdfbb 3273 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3275 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3277 break 2
c906108c 3278 fi
bec39cab 3279done
81ecdfbb
RW
3280 done
3281IFS=$as_save_IFS
bec39cab
AC
3282
3283fi
3284fi
3285ac_ct_CC=$ac_cv_prog_ac_ct_CC
3286if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3288$as_echo "$ac_ct_CC" >&6; }
bec39cab 3289else
81ecdfbb
RW
3290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3291$as_echo "no" >&6; }
c906108c
SS
3292fi
3293
81ecdfbb 3294
bec39cab
AC
3295 test -n "$ac_ct_CC" && break
3296done
c906108c 3297
81ecdfbb
RW
3298 if test "x$ac_ct_CC" = x; then
3299 CC=""
3300 else
3301 case $cross_compiling:$ac_tool_warned in
3302yes:)
3303{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3304$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3305ac_tool_warned=yes ;;
3306esac
3307 CC=$ac_ct_CC
3308 fi
bec39cab
AC
3309fi
3310
3311fi
3312
3313
81ecdfbb
RW
3314test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3316as_fn_error $? "no acceptable C compiler found in \$PATH
3317See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3318
3319# Provide some information about the compiler.
81ecdfbb
RW
3320$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3321set X $ac_compile
3322ac_compiler=$2
3323for ac_option in --version -v -V -qversion; do
3324 { { ac_try="$ac_compiler $ac_option >&5"
3325case "(($ac_try" in
3326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3327 *) ac_try_echo=$ac_try;;
3328esac
3329eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3330$as_echo "$ac_try_echo"; } >&5
3331 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3332 ac_status=$?
81ecdfbb
RW
3333 if test -s conftest.err; then
3334 sed '10a\
3335... rest of stderr output deleted ...
3336 10q' conftest.err >conftest.er1
3337 cat conftest.er1 >&5
81ecdfbb 3338 fi
d0ac1c44 3339 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3340 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3341 test $ac_status = 0; }
3342done
bec39cab 3343
81ecdfbb 3344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3345/* end confdefs.h. */
3346
3347int
3348main ()
3349{
3350
3351 ;
3352 return 0;
3353}
3354_ACEOF
3355ac_clean_files_save=$ac_clean_files
d0ac1c44 3356ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3357# Try to create an executable without -o first, disregard a.out.
3358# It will help us diagnose broken compilers, and finding out an intuition
3359# of exeext.
d0ac1c44
SM
3360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3361$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3362ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3363
3364# The possible output files:
3365ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3366
3367ac_rmfiles=
3368for ac_file in $ac_files
3369do
3370 case $ac_file in
3371 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3372 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3373 esac
3374done
3375rm -f $ac_rmfiles
3376
3377if { { ac_try="$ac_link_default"
3378case "(($ac_try" in
3379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3380 *) ac_try_echo=$ac_try;;
3381esac
3382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3383$as_echo "$ac_try_echo"; } >&5
3384 (eval "$ac_link_default") 2>&5
3385 ac_status=$?
3386 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3387 test $ac_status = 0; }; then :
3388 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3389# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3390# in a Makefile. We should not override ac_cv_exeext if it was cached,
3391# so that the user can short-circuit this test for compilers unknown to
3392# Autoconf.
3393for ac_file in $ac_files ''
bec39cab
AC
3394do
3395 test -f "$ac_file" || continue
3396 case $ac_file in
81ecdfbb 3397 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3398 ;;
3399 [ab].out )
3400 # We found the default executable, but exeext='' is most
3401 # certainly right.
3402 break;;
3403 *.* )
81ecdfbb
RW
3404 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3405 then :; else
3406 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3407 fi
3408 # We set ac_cv_exeext here because the later test for it is not
3409 # safe: cross compilers may not add the suffix if given an `-o'
3410 # argument, so we may need to know it at that point already.
3411 # Even if this section looks crufty: it has the advantage of
3412 # actually working.
b4e70030
JB
3413 break;;
3414 * )
3415 break;;
bec39cab
AC
3416 esac
3417done
81ecdfbb
RW
3418test "$ac_cv_exeext" = no && ac_cv_exeext=
3419
bec39cab 3420else
81ecdfbb
RW
3421 ac_file=''
3422fi
81ecdfbb 3423if test -z "$ac_file"; then :
d0ac1c44
SM
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3425$as_echo "no" >&6; }
3426$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3427sed 's/^/| /' conftest.$ac_ext >&5
3428
81ecdfbb
RW
3429{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3431as_fn_error 77 "C compiler cannot create executables
3432See \`config.log' for more details" "$LINENO" 5; }
3433else
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3435$as_echo "yes" >&6; }
bec39cab 3436fi
d0ac1c44
SM
3437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3438$as_echo_n "checking for C compiler default output file name... " >&6; }
3439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3440$as_echo "$ac_file" >&6; }
b4e70030 3441ac_exeext=$ac_cv_exeext
b4e70030 3442
d0ac1c44 3443rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3444ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3446$as_echo_n "checking for suffix of executables... " >&6; }
3447if { { ac_try="$ac_link"
3448case "(($ac_try" in
3449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3450 *) ac_try_echo=$ac_try;;
3451esac
3452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3453$as_echo "$ac_try_echo"; } >&5
3454 (eval "$ac_link") 2>&5
bec39cab 3455 ac_status=$?
81ecdfbb
RW
3456 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3457 test $ac_status = 0; }; then :
b4e70030
JB
3458 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3459# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3460# work properly (i.e., refer to `conftest.exe'), while it won't with
3461# `rm'.
3462for ac_file in conftest.exe conftest conftest.*; do
3463 test -f "$ac_file" || continue
3464 case $ac_file in
81ecdfbb 3465 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3466 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3467 break;;
3468 * ) break;;
3469 esac
3470done
c906108c 3471else
81ecdfbb
RW
3472 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3474as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3475See \`config.log' for more details" "$LINENO" 5; }
c906108c 3476fi
d0ac1c44 3477rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3479$as_echo "$ac_cv_exeext" >&6; }
c906108c 3480
b4e70030 3481rm -f conftest.$ac_ext
bec39cab
AC
3482EXEEXT=$ac_cv_exeext
3483ac_exeext=$EXEEXT
d0ac1c44
SM
3484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3485/* end confdefs.h. */
3486#include <stdio.h>
3487int
3488main ()
3489{
3490FILE *f = fopen ("conftest.out", "w");
3491 return ferror (f) || fclose (f) != 0;
3492
3493 ;
3494 return 0;
3495}
3496_ACEOF
3497ac_clean_files="$ac_clean_files conftest.out"
3498# Check that the compiler produces executables we can run. If not, either
3499# the compiler is broken, or we cross compile.
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3501$as_echo_n "checking whether we are cross compiling... " >&6; }
3502if test "$cross_compiling" != yes; then
3503 { { ac_try="$ac_link"
3504case "(($ac_try" in
3505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3506 *) ac_try_echo=$ac_try;;
3507esac
3508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3509$as_echo "$ac_try_echo"; } >&5
3510 (eval "$ac_link") 2>&5
3511 ac_status=$?
3512 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3513 test $ac_status = 0; }
3514 if { ac_try='./conftest$ac_cv_exeext'
3515 { { case "(($ac_try" in
3516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3517 *) ac_try_echo=$ac_try;;
3518esac
3519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3520$as_echo "$ac_try_echo"; } >&5
3521 (eval "$ac_try") 2>&5
3522 ac_status=$?
3523 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3524 test $ac_status = 0; }; }; then
3525 cross_compiling=no
3526 else
3527 if test "$cross_compiling" = maybe; then
3528 cross_compiling=yes
3529 else
3530 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3532as_fn_error $? "cannot run C compiled programs.
3533If you meant to cross compile, use \`--host'.
3534See \`config.log' for more details" "$LINENO" 5; }
3535 fi
3536 fi
3537fi
3538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3539$as_echo "$cross_compiling" >&6; }
3540
3541rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3542ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3544$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3545if ${ac_cv_objext+:} false; then :
81ecdfbb 3546 $as_echo_n "(cached) " >&6
bec39cab 3547else
81ecdfbb 3548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3549/* end confdefs.h. */
3550
3551int
3552main ()
3553{
3554
3555 ;
3556 return 0;
3557}
3558_ACEOF
3559rm -f conftest.o conftest.obj
81ecdfbb
RW
3560if { { ac_try="$ac_compile"
3561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
3565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3566$as_echo "$ac_try_echo"; } >&5
3567 (eval "$ac_compile") 2>&5
3568 ac_status=$?
3569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3570 test $ac_status = 0; }; then :
3571 for ac_file in conftest.o conftest.obj conftest.*; do
3572 test -f "$ac_file" || continue;
bec39cab 3573 case $ac_file in
81ecdfbb 3574 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3575 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3576 break;;
3577 esac
3578done
c906108c 3579else
81ecdfbb 3580 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3581sed 's/^/| /' conftest.$ac_ext >&5
3582
81ecdfbb
RW
3583{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3585as_fn_error $? "cannot compute suffix of object files: cannot compile
3586See \`config.log' for more details" "$LINENO" 5; }
c906108c 3587fi
b4e70030 3588rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3589fi
81ecdfbb
RW
3590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3591$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3592OBJEXT=$ac_cv_objext
3593ac_objext=$OBJEXT
81ecdfbb
RW
3594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3595$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3596if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3597 $as_echo_n "(cached) " >&6
c906108c 3598else
81ecdfbb 3599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3600/* end confdefs.h. */
3601
3602int
3603main ()
3604{
3605#ifndef __GNUC__
3606 choke me
3607#endif
3608
3609 ;
3610 return 0;
3611}
3612_ACEOF
81ecdfbb 3613if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3614 ac_compiler_gnu=yes
3615else
81ecdfbb 3616 ac_compiler_gnu=no
bec39cab 3617fi
81ecdfbb 3618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3619ac_cv_c_compiler_gnu=$ac_compiler_gnu
3620
3621fi
81ecdfbb
RW
3622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3623$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3624if test $ac_compiler_gnu = yes; then
3625 GCC=yes
3626else
3627 GCC=
3628fi
bec39cab
AC
3629ac_test_CFLAGS=${CFLAGS+set}
3630ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3632$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3633if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3634 $as_echo_n "(cached) " >&6
bec39cab 3635else
81ecdfbb
RW
3636 ac_save_c_werror_flag=$ac_c_werror_flag
3637 ac_c_werror_flag=yes
3638 ac_cv_prog_cc_g=no
3639 CFLAGS="-g"
3640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3641/* end confdefs.h. */
3642
3643int
3644main ()
3645{
3646
3647 ;
3648 return 0;
3649}
3650_ACEOF
81ecdfbb 3651if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3652 ac_cv_prog_cc_g=yes
3653else
81ecdfbb
RW
3654 CFLAGS=""
3655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3656/* end confdefs.h. */
3657
3658int
3659main ()
3660{
3661
3662 ;
3663 return 0;
3664}
3665_ACEOF
3666if ac_fn_c_try_compile "$LINENO"; then :
3667
3668else
3669 ac_c_werror_flag=$ac_save_c_werror_flag
3670 CFLAGS="-g"
3671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3672/* end confdefs.h. */
3673
3674int
3675main ()
3676{
c906108c 3677
81ecdfbb
RW
3678 ;
3679 return 0;
3680}
3681_ACEOF
3682if ac_fn_c_try_compile "$LINENO"; then :
3683 ac_cv_prog_cc_g=yes
3684fi
3685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3686fi
3687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3688fi
81ecdfbb
RW
3689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3690 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3691fi
81ecdfbb
RW
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3693$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3694if test "$ac_test_CFLAGS" = set; then
bec39cab 3695 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3696elif test $ac_cv_prog_cc_g = yes; then
3697 if test "$GCC" = yes; then
3698 CFLAGS="-g -O2"
3699 else
3700 CFLAGS="-g"
3701 fi
3702else
3703 if test "$GCC" = yes; then
3704 CFLAGS="-O2"
3705 else
3706 CFLAGS=
3707 fi
3708fi
81ecdfbb
RW
3709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3710$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3711if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3712 $as_echo_n "(cached) " >&6
bec39cab 3713else
81ecdfbb 3714 ac_cv_prog_cc_c89=no
bec39cab 3715ac_save_CC=$CC
81ecdfbb 3716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3717/* end confdefs.h. */
c906108c
SS
3718#include <stdarg.h>
3719#include <stdio.h>
d0ac1c44 3720struct stat;
c906108c
SS
3721/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3722struct buf { int x; };
3723FILE * (*rcsopen) (struct buf *, struct stat *, int);
3724static char *e (p, i)
3725 char **p;
3726 int i;
3727{
3728 return p[i];
3729}
3730static char *f (char * (*g) (char **, int), char **p, ...)
3731{
3732 char *s;
3733 va_list v;
3734 va_start (v,p);
3735 s = g (p, va_arg (v,int));
3736 va_end (v);
3737 return s;
3738}
bec39cab
AC
3739
3740/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3741 function prototypes and stuff, but not '\xHH' hex character constants.
3742 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3743 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3744 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3745 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3746 that's true only with -std. */
bec39cab
AC
3747int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3748
81ecdfbb
RW
3749/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3750 inside strings and character constants. */
3751#define FOO(x) 'x'
3752int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3753
c906108c
SS
3754int test (int i, double x);
3755struct s1 {int (*f) (int a);};
3756struct s2 {int (*f) (double a);};
3757int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3758int argc;
3759char **argv;
bec39cab
AC
3760int
3761main ()
3762{
c906108c 3763return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3764 ;
3765 return 0;
3766}
3767_ACEOF
81ecdfbb
RW
3768for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3769 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3770do
3771 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3772 if ac_fn_c_try_compile "$LINENO"; then :
3773 ac_cv_prog_cc_c89=$ac_arg
c906108c 3774fi
81ecdfbb
RW
3775rm -f core conftest.err conftest.$ac_objext
3776 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3777done
81ecdfbb 3778rm -f conftest.$ac_ext
bec39cab 3779CC=$ac_save_CC
c906108c
SS
3780
3781fi
81ecdfbb
RW
3782# AC_CACHE_VAL
3783case "x$ac_cv_prog_cc_c89" in
3784 x)
3785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3786$as_echo "none needed" >&6; } ;;
3787 xno)
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3789$as_echo "unsupported" >&6; } ;;
bec39cab 3790 *)
81ecdfbb
RW
3791 CC="$CC $ac_cv_prog_cc_c89"
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3793$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3794esac
81ecdfbb 3795if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3796
b4e70030
JB
3797fi
3798
bec39cab
AC
3799ac_ext=c
3800ac_cpp='$CPP $CPPFLAGS'
3801ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3802ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3803ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3804
3bc3d82a
PA
3805ac_ext=cpp
3806ac_cpp='$CXXCPP $CPPFLAGS'
3807ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3808ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3809ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3810if test -z "$CXX"; then
3811 if test -n "$CCC"; then
3812 CXX=$CCC
3813 else
3814 if test -n "$ac_tool_prefix"; then
3815 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3816 do
3817 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3818set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3821if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3822 $as_echo_n "(cached) " >&6
3823else
3824 if test -n "$CXX"; then
3825 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3826else
3827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828for as_dir in $PATH
3829do
3830 IFS=$as_save_IFS
3831 test -z "$as_dir" && as_dir=.
3832 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3833 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3834 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3835 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3836 break 2
3837 fi
3838done
3839 done
3840IFS=$as_save_IFS
3841
3842fi
3843fi
3844CXX=$ac_cv_prog_CXX
3845if test -n "$CXX"; then
3846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3847$as_echo "$CXX" >&6; }
3848else
3849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850$as_echo "no" >&6; }
3851fi
3852
3853
3854 test -n "$CXX" && break
3855 done
3856fi
3857if test -z "$CXX"; then
3858 ac_ct_CXX=$CXX
3859 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3860do
3861 # Extract the first word of "$ac_prog", so it can be a program name with args.
3862set dummy $ac_prog; ac_word=$2
3863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3864$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3865if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3866 $as_echo_n "(cached) " >&6
3867else
3868 if test -n "$ac_ct_CXX"; then
3869 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3870else
3871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872for as_dir in $PATH
3873do
3874 IFS=$as_save_IFS
3875 test -z "$as_dir" && as_dir=.
3876 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3878 ac_cv_prog_ac_ct_CXX="$ac_prog"
3879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3880 break 2
3881 fi
3882done
3883 done
3884IFS=$as_save_IFS
3885
3886fi
3887fi
3888ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3889if test -n "$ac_ct_CXX"; then
3890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3891$as_echo "$ac_ct_CXX" >&6; }
3892else
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894$as_echo "no" >&6; }
3895fi
3896
3897
3898 test -n "$ac_ct_CXX" && break
3899done
3900
3901 if test "x$ac_ct_CXX" = x; then
3902 CXX="g++"
3903 else
3904 case $cross_compiling:$ac_tool_warned in
3905yes:)
3906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3908ac_tool_warned=yes ;;
3909esac
3910 CXX=$ac_ct_CXX
3911 fi
3912fi
3913
3914 fi
3915fi
3916# Provide some information about the compiler.
3917$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3918set X $ac_compile
3919ac_compiler=$2
3920for ac_option in --version -v -V -qversion; do
3921 { { ac_try="$ac_compiler $ac_option >&5"
3922case "(($ac_try" in
3923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3924 *) ac_try_echo=$ac_try;;
3925esac
3926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3927$as_echo "$ac_try_echo"; } >&5
3928 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3929 ac_status=$?
3930 if test -s conftest.err; then
3931 sed '10a\
3932... rest of stderr output deleted ...
3933 10q' conftest.err >conftest.er1
3934 cat conftest.er1 >&5
3bc3d82a 3935 fi
d0ac1c44 3936 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3938 test $ac_status = 0; }
3939done
3940
3941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3942$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3943if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3944 $as_echo_n "(cached) " >&6
3945else
3946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3947/* end confdefs.h. */
3948
3949int
3950main ()
3951{
3952#ifndef __GNUC__
3953 choke me
3954#endif
3955
3956 ;
3957 return 0;
3958}
3959_ACEOF
3960if ac_fn_cxx_try_compile "$LINENO"; then :
3961 ac_compiler_gnu=yes
3962else
3963 ac_compiler_gnu=no
3964fi
3965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3966ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3967
3968fi
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3970$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3971if test $ac_compiler_gnu = yes; then
3972 GXX=yes
3973else
3974 GXX=
3975fi
3976ac_test_CXXFLAGS=${CXXFLAGS+set}
3977ac_save_CXXFLAGS=$CXXFLAGS
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3979$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3980if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3981 $as_echo_n "(cached) " >&6
3982else
3983 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3984 ac_cxx_werror_flag=yes
3985 ac_cv_prog_cxx_g=no
3986 CXXFLAGS="-g"
3987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3988/* end confdefs.h. */
3989
3990int
3991main ()
3992{
3993
3994 ;
3995 return 0;
3996}
3997_ACEOF
3998if ac_fn_cxx_try_compile "$LINENO"; then :
3999 ac_cv_prog_cxx_g=yes
4000else
4001 CXXFLAGS=""
4002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4003/* end confdefs.h. */
4004
4005int
4006main ()
4007{
4008
4009 ;
4010 return 0;
4011}
4012_ACEOF
4013if ac_fn_cxx_try_compile "$LINENO"; then :
4014
4015else
4016 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4017 CXXFLAGS="-g"
4018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4019/* end confdefs.h. */
4020
4021int
4022main ()
4023{
4024
4025 ;
4026 return 0;
4027}
4028_ACEOF
4029if ac_fn_cxx_try_compile "$LINENO"; then :
4030 ac_cv_prog_cxx_g=yes
4031fi
4032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4033fi
4034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4035fi
4036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4037 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4038fi
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4040$as_echo "$ac_cv_prog_cxx_g" >&6; }
4041if test "$ac_test_CXXFLAGS" = set; then
4042 CXXFLAGS=$ac_save_CXXFLAGS
4043elif test $ac_cv_prog_cxx_g = yes; then
4044 if test "$GXX" = yes; then
4045 CXXFLAGS="-g -O2"
4046 else
4047 CXXFLAGS="-g"
4048 fi
4049else
4050 if test "$GXX" = yes; then
4051 CXXFLAGS="-O2"
4052 else
4053 CXXFLAGS=
4054 fi
4055fi
4056ac_ext=c
4057ac_cpp='$CPP $CPPFLAGS'
4058ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4059ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4060ac_compiler_gnu=$ac_cv_c_compiler_gnu
4061
4062
60ca704f 4063
bec39cab
AC
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
81ecdfbb
RW
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4070$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4071# On Suns, sometimes $CPP names a directory.
4072if test -n "$CPP" && test -d "$CPP"; then
4073 CPP=
8bb2c122 4074fi
bec39cab 4075if test -z "$CPP"; then
d0ac1c44 4076 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4077 $as_echo_n "(cached) " >&6
bec39cab
AC
4078else
4079 # Double quotes because CPP needs to be expanded
4080 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4081 do
4082 ac_preproc_ok=false
4083for ac_c_preproc_warn_flag in '' yes
4084do
4085 # Use a header file that comes with gcc, so configuring glibc
4086 # with a fresh cross-compiler works.
4087 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4088 # <limits.h> exists even on freestanding compilers.
4089 # On the NeXT, cc -E runs the code through the compiler's parser,
4090 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4092/* end confdefs.h. */
4093#ifdef __STDC__
4094# include <limits.h>
4095#else
4096# include <assert.h>
4097#endif
4098 Syntax error
4099_ACEOF
81ecdfbb 4100if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4101
81ecdfbb 4102else
bec39cab
AC
4103 # Broken: fails on valid input.
4104continue
4105fi
d0ac1c44 4106rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4107
81ecdfbb 4108 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4109 # can be detected and how.
81ecdfbb 4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4111/* end confdefs.h. */
4112#include <ac_nonexistent.h>
4113_ACEOF
81ecdfbb 4114if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4115 # Broken: success on invalid input.
4116continue
8bb2c122 4117else
bec39cab
AC
4118 # Passes both tests.
4119ac_preproc_ok=:
4120break
8bb2c122 4121fi
d0ac1c44 4122rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4123
bec39cab
AC
4124done
4125# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4126rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4127if $ac_preproc_ok; then :
bec39cab
AC
4128 break
4129fi
8bb2c122 4130
bec39cab
AC
4131 done
4132 ac_cv_prog_CPP=$CPP
ddc9cd0f 4133
c906108c 4134fi
bec39cab
AC
4135 CPP=$ac_cv_prog_CPP
4136else
4137 ac_cv_prog_CPP=$CPP
c906108c 4138fi
81ecdfbb
RW
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4140$as_echo "$CPP" >&6; }
bec39cab
AC
4141ac_preproc_ok=false
4142for ac_c_preproc_warn_flag in '' yes
4143do
4144 # Use a header file that comes with gcc, so configuring glibc
4145 # with a fresh cross-compiler works.
4146 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4147 # <limits.h> exists even on freestanding compilers.
4148 # On the NeXT, cc -E runs the code through the compiler's parser,
4149 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4151/* end confdefs.h. */
4152#ifdef __STDC__
4153# include <limits.h>
4154#else
4155# include <assert.h>
4156#endif
4157 Syntax error
4158_ACEOF
81ecdfbb 4159if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4160
81ecdfbb 4161else
bec39cab
AC
4162 # Broken: fails on valid input.
4163continue
4164fi
d0ac1c44 4165rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4166
81ecdfbb 4167 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4168 # can be detected and how.
81ecdfbb 4169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4170/* end confdefs.h. */
4171#include <ac_nonexistent.h>
4172_ACEOF
81ecdfbb 4173if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4174 # Broken: success on invalid input.
4175continue
c906108c 4176else
bec39cab
AC
4177 # Passes both tests.
4178ac_preproc_ok=:
4179break
c906108c 4180fi
d0ac1c44 4181rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4182
bec39cab
AC
4183done
4184# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4185rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4186if $ac_preproc_ok; then :
4187
c906108c 4188else
81ecdfbb
RW
4189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4191as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4192See \`config.log' for more details" "$LINENO" 5; }
c906108c 4193fi
c906108c 4194
bec39cab
AC
4195ac_ext=c
4196ac_cpp='$CPP $CPPFLAGS'
4197ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4198ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4199ac_compiler_gnu=$ac_cv_c_compiler_gnu
4200
4201
81ecdfbb
RW
4202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4203$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4204if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4205 $as_echo_n "(cached) " >&6
4e8d927d 4206else
81ecdfbb
RW
4207 if test -z "$GREP"; then
4208 ac_path_GREP_found=false
4209 # Loop through the user's path and test for each of PROGNAME-LIST
4210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4211for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4212do
4213 IFS=$as_save_IFS
4214 test -z "$as_dir" && as_dir=.
4215 for ac_prog in grep ggrep; do
4216 for ac_exec_ext in '' $ac_executable_extensions; do
4217 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4218 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4219# Check for GNU ac_path_GREP and select it if it is found.
4220 # Check for GNU $ac_path_GREP
4221case `"$ac_path_GREP" --version 2>&1` in
4222*GNU*)
4223 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4224*)
4225 ac_count=0
4226 $as_echo_n 0123456789 >"conftest.in"
4227 while :
4228 do
4229 cat "conftest.in" "conftest.in" >"conftest.tmp"
4230 mv "conftest.tmp" "conftest.in"
4231 cp "conftest.in" "conftest.nl"
4232 $as_echo 'GREP' >> "conftest.nl"
4233 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4234 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4235 as_fn_arith $ac_count + 1 && ac_count=$as_val
4236 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4237 # Best one so far, save it but keep looking for a better one
4238 ac_cv_path_GREP="$ac_path_GREP"
4239 ac_path_GREP_max=$ac_count
bec39cab 4240 fi
81ecdfbb
RW
4241 # 10*(2^10) chars as input seems more than enough
4242 test $ac_count -gt 10 && break
4243 done
4244 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4245esac
bec39cab 4246
81ecdfbb
RW
4247 $ac_path_GREP_found && break 3
4248 done
4249 done
4250 done
4251IFS=$as_save_IFS
4252 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4253 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4254 fi
c906108c 4255else
81ecdfbb 4256 ac_cv_path_GREP=$GREP
c906108c 4257fi
c906108c 4258
81ecdfbb
RW
4259fi
4260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4261$as_echo "$ac_cv_path_GREP" >&6; }
4262 GREP="$ac_cv_path_GREP"
c906108c 4263
c906108c 4264
81ecdfbb
RW
4265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4266$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4267if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4268 $as_echo_n "(cached) " >&6
783e057b 4269else
81ecdfbb
RW
4270 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4271 then ac_cv_path_EGREP="$GREP -E"
4272 else
4273 if test -z "$EGREP"; then
4274 ac_path_EGREP_found=false
4275 # Loop through the user's path and test for each of PROGNAME-LIST
4276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4277for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4278do
4279 IFS=$as_save_IFS
4280 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4281 for ac_prog in egrep; do
4282 for ac_exec_ext in '' $ac_executable_extensions; do
4283 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4284 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4285# Check for GNU ac_path_EGREP and select it if it is found.
4286 # Check for GNU $ac_path_EGREP
4287case `"$ac_path_EGREP" --version 2>&1` in
4288*GNU*)
4289 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4290*)
4291 ac_count=0
4292 $as_echo_n 0123456789 >"conftest.in"
4293 while :
4294 do
4295 cat "conftest.in" "conftest.in" >"conftest.tmp"
4296 mv "conftest.tmp" "conftest.in"
4297 cp "conftest.in" "conftest.nl"
4298 $as_echo 'EGREP' >> "conftest.nl"
4299 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4300 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4301 as_fn_arith $ac_count + 1 && ac_count=$as_val
4302 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4303 # Best one so far, save it but keep looking for a better one
4304 ac_cv_path_EGREP="$ac_path_EGREP"
4305 ac_path_EGREP_max=$ac_count
4306 fi
4307 # 10*(2^10) chars as input seems more than enough
4308 test $ac_count -gt 10 && break
4309 done
4310 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4311esac
bec39cab 4312
81ecdfbb
RW
4313 $ac_path_EGREP_found && break 3
4314 done
4315 done
4316 done
4317IFS=$as_save_IFS
4318 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4319 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4320 fi
783e057b 4321else
81ecdfbb 4322 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4323fi
4324
81ecdfbb 4325 fi
783e057b 4326fi
81ecdfbb
RW
4327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4328$as_echo "$ac_cv_path_EGREP" >&6; }
4329 EGREP="$ac_cv_path_EGREP"
4330
783e057b 4331
81ecdfbb
RW
4332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4333$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4334if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4335 $as_echo_n "(cached) " >&6
783e057b 4336else
81ecdfbb 4337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4338/* end confdefs.h. */
783e057b 4339#include <stdlib.h>
bec39cab 4340#include <stdarg.h>
783e057b
DJ
4341#include <string.h>
4342#include <float.h>
c906108c 4343
bec39cab
AC
4344int
4345main ()
4346{
c906108c 4347
bec39cab
AC
4348 ;
4349 return 0;
4350}
4351_ACEOF
81ecdfbb 4352if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4353 ac_cv_header_stdc=yes
c906108c 4354else
81ecdfbb 4355 ac_cv_header_stdc=no
c906108c 4356fi
81ecdfbb 4357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4358
783e057b
DJ
4359if test $ac_cv_header_stdc = yes; then
4360 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4362/* end confdefs.h. */
4363#include <string.h>
c906108c 4364
783e057b
DJ
4365_ACEOF
4366if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4367 $EGREP "memchr" >/dev/null 2>&1; then :
4368
c906108c 4369else
783e057b 4370 ac_cv_header_stdc=no
c906108c 4371fi
783e057b 4372rm -f conftest*
c906108c
SS
4373
4374fi
4375
783e057b
DJ
4376if test $ac_cv_header_stdc = yes; then
4377 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4379/* end confdefs.h. */
4380#include <stdlib.h>
bec39cab 4381
783e057b
DJ
4382_ACEOF
4383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4384 $EGREP "free" >/dev/null 2>&1; then :
4385
bec39cab 4386else
783e057b 4387 ac_cv_header_stdc=no
bec39cab 4388fi
783e057b 4389rm -f conftest*
bec39cab
AC
4390
4391fi
bec39cab 4392
783e057b
DJ
4393if test $ac_cv_header_stdc = yes; then
4394 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4395 if test "$cross_compiling" = yes; then :
783e057b 4396 :
bec39cab 4397else
81ecdfbb 4398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4399/* end confdefs.h. */
4400#include <ctype.h>
81ecdfbb 4401#include <stdlib.h>
783e057b
DJ
4402#if ((' ' & 0x0FF) == 0x020)
4403# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4404# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4405#else
4406# define ISLOWER(c) \
4407 (('a' <= (c) && (c) <= 'i') \
4408 || ('j' <= (c) && (c) <= 'r') \
4409 || ('s' <= (c) && (c) <= 'z'))
4410# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4411#endif
4412
4413#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4414int
4415main ()
4416{
4417 int i;
4418 for (i = 0; i < 256; i++)
4419 if (XOR (islower (i), ISLOWER (i))
4420 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4421 return 2;
4422 return 0;
783e057b
DJ
4423}
4424_ACEOF
81ecdfbb 4425if ac_fn_c_try_run "$LINENO"; then :
783e057b 4426
81ecdfbb
RW
4427else
4428 ac_cv_header_stdc=no
783e057b 4429fi
81ecdfbb
RW
4430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4431 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4432fi
81ecdfbb 4433
783e057b
DJ
4434fi
4435fi
81ecdfbb
RW
4436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4437$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4438if test $ac_cv_header_stdc = yes; then
4439
81ecdfbb 4440$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4441
4442fi
4443
4444# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4445for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4446 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4447do :
4448 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4449ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4450"
d0ac1c44 4451if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4452 cat >>confdefs.h <<_ACEOF
81ecdfbb 4453#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4454_ACEOF
4455
4456fi
4457
4458done
4459
4460
4461
81ecdfbb 4462 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4463if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4464 MINIX=yes
4465else
4466 MINIX=
4467fi
4468
4469
4470 if test "$MINIX" = yes; then
4471
81ecdfbb 4472$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4473
4474
81ecdfbb 4475$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4476
4477
81ecdfbb 4478$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4479
4480 fi
4481
4482
81ecdfbb
RW
4483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4484$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4485if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4486 $as_echo_n "(cached) " >&6
783e057b 4487else
81ecdfbb 4488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4489/* end confdefs.h. */
4490
d0ac1c44
SM
4491# define __EXTENSIONS__ 1
4492 $ac_includes_default
783e057b
DJ
4493int
4494main ()
4495{
4496
4497 ;
4498 return 0;
4499}
4500_ACEOF
81ecdfbb 4501if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4502 ac_cv_safe_to_define___extensions__=yes
4503else
81ecdfbb 4504 ac_cv_safe_to_define___extensions__=no
783e057b 4505fi
81ecdfbb 4506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4507fi
81ecdfbb
RW
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4509$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4510 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4511 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4512
81ecdfbb 4513 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4514
81ecdfbb 4515 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4516
81ecdfbb 4517 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4518
81ecdfbb 4519 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4520
4521
c971b7fa
PA
4522ac_aux_dir=
4523for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4524 if test -f "$ac_dir/install-sh"; then
4525 ac_aux_dir=$ac_dir
4526 ac_install_sh="$ac_aux_dir/install-sh -c"
4527 break
4528 elif test -f "$ac_dir/install.sh"; then
4529 ac_aux_dir=$ac_dir
4530 ac_install_sh="$ac_aux_dir/install.sh -c"
4531 break
4532 elif test -f "$ac_dir/shtool"; then
4533 ac_aux_dir=$ac_dir
4534 ac_install_sh="$ac_aux_dir/shtool install -c"
4535 break
4536 fi
c971b7fa
PA
4537done
4538if test -z "$ac_aux_dir"; then
d0ac1c44 4539 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4540fi
770d76d7 4541
c971b7fa
PA
4542# These three variables are undocumented and unsupported,
4543# and are intended to be withdrawn in a future Autoconf release.
4544# They can cause serious problems if a builder's source tree is in a directory
4545# whose full name contains unusual characters.
4546ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4547ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4548ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4549
770d76d7 4550
c971b7fa
PA
4551# Make sure we can run config.sub.
4552$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4553 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4554
c971b7fa
PA
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4556$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4557if ${ac_cv_build+:} false; then :
c971b7fa 4558 $as_echo_n "(cached) " >&6
770d76d7 4559else
c971b7fa
PA
4560 ac_build_alias=$build_alias
4561test "x$ac_build_alias" = x &&
4562 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4563test "x$ac_build_alias" = x &&
d0ac1c44 4564 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4565ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4566 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4567
770d76d7 4568fi
c971b7fa
PA
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4570$as_echo "$ac_cv_build" >&6; }
4571case $ac_cv_build in
4572*-*-*) ;;
d0ac1c44 4573*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4574esac
c971b7fa
PA
4575build=$ac_cv_build
4576ac_save_IFS=$IFS; IFS='-'
4577set x $ac_cv_build
4578shift
4579build_cpu=$1
4580build_vendor=$2
4581shift; shift
4582# Remember, the first character of IFS is used to create $*,
4583# except with old shells:
4584build_os=$*
4585IFS=$ac_save_IFS
4586case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4587
4588
c971b7fa
PA
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4590$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4591if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4592 $as_echo_n "(cached) " >&6
4593else
c971b7fa
PA
4594 if test "x$host_alias" = x; then
4595 ac_cv_host=$ac_cv_build
81ecdfbb 4596else
c971b7fa 4597 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4598 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4599fi
81ecdfbb
RW
4600
4601fi
c971b7fa
PA
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4603$as_echo "$ac_cv_host" >&6; }
4604case $ac_cv_host in
4605*-*-*) ;;
d0ac1c44 4606*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4607esac
c971b7fa
PA
4608host=$ac_cv_host
4609ac_save_IFS=$IFS; IFS='-'
4610set x $ac_cv_host
4611shift
4612host_cpu=$1
4613host_vendor=$2
4614shift; shift
4615# Remember, the first character of IFS is used to create $*,
4616# except with old shells:
4617host_os=$*
4618IFS=$ac_save_IFS
4619case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4620
4621
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4623$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4624if ${ac_cv_target+:} false; then :
3388710e
JM
4625 $as_echo_n "(cached) " >&6
4626else
4627 if test "x$target_alias" = x; then
4628 ac_cv_target=$ac_cv_host
4629else
4630 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4631 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4632fi
4633
4634fi
4635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4636$as_echo "$ac_cv_target" >&6; }
4637case $ac_cv_target in
4638*-*-*) ;;
d0ac1c44 4639*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4640esac
4641target=$ac_cv_target
4642ac_save_IFS=$IFS; IFS='-'
4643set x $ac_cv_target
4644shift
4645target_cpu=$1
4646target_vendor=$2
4647shift; shift
4648# Remember, the first character of IFS is used to create $*,
4649# except with old shells:
4650target_os=$*
4651IFS=$ac_save_IFS
4652case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4653
4654
4655# The aliases save the names the user supplied, while $host etc.
4656# will get canonicalized.
4657test -n "$target_alias" &&
4658 test "$program_prefix$program_suffix$program_transform_name" = \
4659 NONENONEs,x,x, &&
4660 program_prefix=${target_alias}-
4661
4662# The tests for host and target for $enable_largefile require
4663# canonical names.
4664
4665
81ecdfbb 4666
da2f07f1
JK
4667# As the $enable_largefile decision depends on --enable-plugins we must set it
4668# even in directories otherwise not depending on the $plugins option.
4669
4670
2974be62
AM
4671 maybe_plugins=no
4672 for ac_header in dlfcn.h
4673do :
4674 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4675"
d0ac1c44 4676if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4677 cat >>confdefs.h <<_ACEOF
4678#define HAVE_DLFCN_H 1
4679_ACEOF
4680 maybe_plugins=yes
4681fi
4682
4683done
4684
4685 for ac_header in windows.h
4686do :
4687 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4688"
d0ac1c44 4689if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4690 cat >>confdefs.h <<_ACEOF
4691#define HAVE_WINDOWS_H 1
4692_ACEOF
4693 maybe_plugins=yes
4694fi
4695
4696done
4697
4698
4699 # Check whether --enable-plugins was given.
da2f07f1
JK
4700if test "${enable_plugins+set}" = set; then :
4701 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4702 no) plugins=no ;;
4703 *) plugins=yes
4704 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4705 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4706 fi ;;
4707 esac
da2f07f1 4708else
2974be62
AM
4709 plugins=$maybe_plugins
4710
da2f07f1
JK
4711fi
4712
2974be62 4713 if test "$plugins" = "yes"; then
458412c3
TT
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4715$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4716if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4717 $as_echo_n "(cached) " >&6
4718else
4719 ac_func_search_save_LIBS=$LIBS
4720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4721/* end confdefs.h. */
4722
4723/* Override any GCC internal prototype to avoid an error.
4724 Use char because int might match the return type of a GCC
4725 builtin and then its argument prototype would still apply. */
4726#ifdef __cplusplus
4727extern "C"
4728#endif
458412c3 4729char dlsym ();
2974be62
AM
4730int
4731main ()
4732{
458412c3 4733return dlsym ();
2974be62
AM
4734 ;
4735 return 0;
4736}
4737_ACEOF
4738for ac_lib in '' dl; do
4739 if test -z "$ac_lib"; then
4740 ac_res="none required"
4741 else
4742 ac_res=-l$ac_lib
4743 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4744 fi
4745 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4746 ac_cv_search_dlsym=$ac_res
2974be62
AM
4747fi
4748rm -f core conftest.err conftest.$ac_objext \
4749 conftest$ac_exeext
d0ac1c44 4750 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4751 break
4752fi
4753done
d0ac1c44 4754if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4755
4756else
458412c3 4757 ac_cv_search_dlsym=no
2974be62
AM
4758fi
4759rm conftest.$ac_ext
4760LIBS=$ac_func_search_save_LIBS
4761fi
458412c3
TT
4762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4763$as_echo "$ac_cv_search_dlsym" >&6; }
4764ac_res=$ac_cv_search_dlsym
2974be62
AM
4765if test "$ac_res" != no; then :
4766 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4767
4768fi
4769
4770 fi
da2f07f1
JK
4771
4772
4773case "${host}" in
c8693053
RO
4774 sparc-*-solaris*|i?86-*-solaris*)
4775 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4776 # were mutually exclusive until Solaris 11.3. Without procfs support,
4777 # the bfd/ elf module cannot provide certain routines such as
4778 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4779 # explicitly requested large-file support through the
4780 # --enable-largefile switch, disable large-file support in favor of
4781 # procfs support.
4782 #
4783 # Check if <sys/procfs.h> is incompatible with large-file support.
4784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785/* end confdefs.h. */
4786#define _FILE_OFFSET_BITS 64
4787#define _STRUCTURED_PROC 1
4788#include <sys/procfs.h>
4789int
4790main ()
4791{
4792
4793 ;
4794 return 0;
4795}
4796_ACEOF
4797if ac_fn_c_try_compile "$LINENO"; then :
4798 acx_cv_procfs_lfs=yes
4799else
4800 acx_cv_procfs_lfs=no
4801fi
4802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4803 #
4804 # Forcefully disable large-file support only if necessary, gdb is in
4805 # tree and enabled.
4806 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4807 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4808 : ${enable_largefile="no"}
4809 if test "$plugins" = yes; then
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4811plugin support disabled; require large-file support which is incompatible with GDB." >&5
4812$as_echo "$as_me: WARNING:
4813plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4814 plugins=no
4815 fi
4816 fi
4817 #
4818 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4819 # benefit of g++ 9+ which predefines it on Solaris.
4820 if test "$enable_largefile" = no; then
4821 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4822
4823 fi
da2f07f1
JK
4824 ;;
4825esac
4826
4827# Check whether --enable-largefile was given.
4828if test "${enable_largefile+set}" = set; then :
4829 enableval=$enable_largefile;
4830fi
4831
4832if test "$enable_largefile" != no; then
4833
4834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4835$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4836if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4837 $as_echo_n "(cached) " >&6
4838else
4839 ac_cv_sys_largefile_CC=no
4840 if test "$GCC" != yes; then
4841 ac_save_CC=$CC
4842 while :; do
4843 # IRIX 6.2 and later do not support large files by default,
4844 # so use the C compiler's -n32 option if that helps.
4845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4846/* end confdefs.h. */
4847#include <sys/types.h>
4848 /* Check that off_t can represent 2**63 - 1 correctly.
4849 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4850 since some C++ compilers masquerading as C compilers
4851 incorrectly reject 9223372036854775807. */
4852#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4853 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4854 && LARGE_OFF_T % 2147483647 == 1)
4855 ? 1 : -1];
4856int
4857main ()
4858{
4859
4860 ;
4861 return 0;
4862}
4863_ACEOF
4864 if ac_fn_c_try_compile "$LINENO"; then :
4865 break
4866fi
4867rm -f core conftest.err conftest.$ac_objext
4868 CC="$CC -n32"
4869 if ac_fn_c_try_compile "$LINENO"; then :
4870 ac_cv_sys_largefile_CC=' -n32'; break
4871fi
4872rm -f core conftest.err conftest.$ac_objext
4873 break
4874 done
4875 CC=$ac_save_CC
4876 rm -f conftest.$ac_ext
4877 fi
4878fi
4879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4880$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4881 if test "$ac_cv_sys_largefile_CC" != no; then
4882 CC=$CC$ac_cv_sys_largefile_CC
4883 fi
4884
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4886$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4887if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4888 $as_echo_n "(cached) " >&6
4889else
4890 while :; do
4891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4892/* end confdefs.h. */
4893#include <sys/types.h>
4894 /* Check that off_t can represent 2**63 - 1 correctly.
4895 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4896 since some C++ compilers masquerading as C compilers
4897 incorrectly reject 9223372036854775807. */
4898#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4899 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4900 && LARGE_OFF_T % 2147483647 == 1)
4901 ? 1 : -1];
4902int
4903main ()
4904{
4905
4906 ;
4907 return 0;
4908}
4909_ACEOF
4910if ac_fn_c_try_compile "$LINENO"; then :
4911 ac_cv_sys_file_offset_bits=no; break
4912fi
4913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4915/* end confdefs.h. */
4916#define _FILE_OFFSET_BITS 64
4917#include <sys/types.h>
4918 /* Check that off_t can represent 2**63 - 1 correctly.
4919 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4920 since some C++ compilers masquerading as C compilers
4921 incorrectly reject 9223372036854775807. */
4922#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4923 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4924 && LARGE_OFF_T % 2147483647 == 1)
4925 ? 1 : -1];
4926int
4927main ()
4928{
4929
4930 ;
4931 return 0;
4932}
4933_ACEOF
4934if ac_fn_c_try_compile "$LINENO"; then :
4935 ac_cv_sys_file_offset_bits=64; break
4936fi
4937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4938 ac_cv_sys_file_offset_bits=unknown
4939 break
4940done
4941fi
4942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4943$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4944case $ac_cv_sys_file_offset_bits in #(
4945 no | unknown) ;;
4946 *)
4947cat >>confdefs.h <<_ACEOF
4948#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4949_ACEOF
4950;;
4951esac
4952rm -rf conftest*
4953 if test $ac_cv_sys_file_offset_bits = unknown; then
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4955$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4956if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4957 $as_echo_n "(cached) " >&6
4958else
4959 while :; do
4960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4961/* end confdefs.h. */
4962#include <sys/types.h>
4963 /* Check that off_t can represent 2**63 - 1 correctly.
4964 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4965 since some C++ compilers masquerading as C compilers
4966 incorrectly reject 9223372036854775807. */
4967#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4968 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4969 && LARGE_OFF_T % 2147483647 == 1)
4970 ? 1 : -1];
4971int
4972main ()
4973{
4974
4975 ;
4976 return 0;
4977}
4978_ACEOF
4979if ac_fn_c_try_compile "$LINENO"; then :
4980 ac_cv_sys_large_files=no; break
4981fi
4982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4984/* end confdefs.h. */
4985#define _LARGE_FILES 1
4986#include <sys/types.h>
4987 /* Check that off_t can represent 2**63 - 1 correctly.
4988 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4989 since some C++ compilers masquerading as C compilers
4990 incorrectly reject 9223372036854775807. */
4991#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4992 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4993 && LARGE_OFF_T % 2147483647 == 1)
4994 ? 1 : -1];
4995int
4996main ()
4997{
4998
4999 ;
5000 return 0;
5001}
5002_ACEOF
5003if ac_fn_c_try_compile "$LINENO"; then :
5004 ac_cv_sys_large_files=1; break
5005fi
5006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5007 ac_cv_sys_large_files=unknown
5008 break
5009done
5010fi
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5012$as_echo "$ac_cv_sys_large_files" >&6; }
5013case $ac_cv_sys_large_files in #(
5014 no | unknown) ;;
5015 *)
5016cat >>confdefs.h <<_ACEOF
5017#define _LARGE_FILES $ac_cv_sys_large_files
5018_ACEOF
5019;;
5020esac
5021rm -rf conftest*
5022 fi
d0ac1c44
SM
5023
5024
da2f07f1
JK
5025fi
5026
5027
d0ac1c44
SM
5028# Expand $ac_aux_dir to an absolute path.
5029am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5030
d0ac1c44 5031if test x"${install_sh+set}" != xset; then
4869db5e
RM
5032 case $am_aux_dir in
5033 *\ * | *\ *)
5034 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5035 *)
5036 install_sh="\${SHELL} $am_aux_dir/install-sh"
5037 esac
5038fi
5039
d0ac1c44
SM
5040# Installed binaries are usually stripped using 'strip' when the user
5041# run "make install-strip". However 'strip' might not be the right
4869db5e 5042# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5043# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5044if test "$cross_compiling" != no; then
5045 if test -n "$ac_tool_prefix"; then
5046 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5047set dummy ${ac_tool_prefix}strip; ac_word=$2
5048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5049$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5050if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5051 $as_echo_n "(cached) " >&6
5052else
5053 if test -n "$STRIP"; then
5054 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5055else
5056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057for as_dir in $PATH
5058do
5059 IFS=$as_save_IFS
5060 test -z "$as_dir" && as_dir=.
5061 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5062 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5063 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5065 break 2
5066 fi
5067done
5068 done
5069IFS=$as_save_IFS
5070
5071fi
5072fi
5073STRIP=$ac_cv_prog_STRIP
5074if test -n "$STRIP"; then
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5076$as_echo "$STRIP" >&6; }
5077else
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079$as_echo "no" >&6; }
5080fi
5081
5082
5083fi
5084if test -z "$ac_cv_prog_STRIP"; then
5085 ac_ct_STRIP=$STRIP
5086 # Extract the first word of "strip", so it can be a program name with args.
5087set dummy strip; ac_word=$2
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5090if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5091 $as_echo_n "(cached) " >&6
5092else
5093 if test -n "$ac_ct_STRIP"; then
5094 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5095else
5096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5097for as_dir in $PATH
5098do
5099 IFS=$as_save_IFS
5100 test -z "$as_dir" && as_dir=.
5101 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5103 ac_cv_prog_ac_ct_STRIP="strip"
5104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5105 break 2
5106 fi
5107done
5108 done
5109IFS=$as_save_IFS
5110
5111fi
5112fi
5113ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5114if test -n "$ac_ct_STRIP"; then
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5116$as_echo "$ac_ct_STRIP" >&6; }
5117else
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
5120fi
5121
5122 if test "x$ac_ct_STRIP" = x; then
5123 STRIP=":"
5124 else
5125 case $cross_compiling:$ac_tool_warned in
5126yes:)
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5129ac_tool_warned=yes ;;
5130esac
5131 STRIP=$ac_ct_STRIP
5132 fi
5133else
5134 STRIP="$ac_cv_prog_STRIP"
5135fi
5136
5137fi
5138INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5139
783e057b
DJ
5140
5141ac_aux_dir=
81ecdfbb 5142for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5143 if test -f "$ac_dir/install-sh"; then
5144 ac_aux_dir=$ac_dir
5145 ac_install_sh="$ac_aux_dir/install-sh -c"
5146 break
5147 elif test -f "$ac_dir/install.sh"; then
5148 ac_aux_dir=$ac_dir
5149 ac_install_sh="$ac_aux_dir/install.sh -c"
5150 break
5151 elif test -f "$ac_dir/shtool"; then
5152 ac_aux_dir=$ac_dir
5153 ac_install_sh="$ac_aux_dir/shtool install -c"
5154 break
5155 fi
783e057b
DJ
5156done
5157if test -z "$ac_aux_dir"; then
d0ac1c44 5158 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5159fi
81ecdfbb
RW
5160
5161# These three variables are undocumented and unsupported,
5162# and are intended to be withdrawn in a future Autoconf release.
5163# They can cause serious problems if a builder's source tree is in a directory
5164# whose full name contains unusual characters.
5165ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5166ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5167ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5168
783e057b 5169
783e057b 5170
91e1a0ed
SM
5171# Set build, build_cpu, build_vendor and build_os.
5172
5173
5174# Set host, host_cpu, host_vendor, and host_os.
5175
5176
5177# Set target, target_cpu, target_vendor, and target_os.
5178
5179
9009e1ae
MR
5180test "$program_prefix" != NONE &&
5181 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5182# Use a double $ so make ignores it.
5183test "$program_suffix" != NONE &&
5184 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5185# Double any \ or $.
5186# By default was `s,x,x', remove it if useless.
5187ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5188program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5189
81ecdfbb 5190
0bcda685
PA
5191# We require a C++11 compiler. Check if one is available, and if
5192# necessary, set CXX_DIALECT to some -std=xxx switch.
5193
41260ac2 5194 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5195 ac_ext=cpp
5196ac_cpp='$CXXCPP $CPPFLAGS'
5197ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5198ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5199ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5200 CXX_DIALECT=""
5201 ac_success=no
5202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5203$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5204if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5205 $as_echo_n "(cached) " >&6
5206else
5207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5208/* end confdefs.h. */
5209
5210
5211// If the compiler admits that it is not ready for C++11, why torture it?
5212// Hopefully, this will speed up the test.
5213
5214#ifndef __cplusplus
5215
5216#error "This is not a C++ compiler"
5217
5218#elif __cplusplus < 201103L
5219
5220#error "This is not a C++11 compiler"
5221
5222#else
5223
5224namespace cxx11
5225{
5226
5227 namespace test_static_assert
5228 {
5229
5230 template <typename T>
5231 struct check
5232 {
5233 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5234 };
5235
5236 }
5237
5238 namespace test_final_override
5239 {
5240
5241 struct Base
5242 {
5243 virtual void f() {}
5244 };
5245
5246 struct Derived : public Base
5247 {
5248 virtual void f() override {}
5249 };
5250
5251 }
5252
5253 namespace test_double_right_angle_brackets
5254 {
5255
5256 template < typename T >
5257 struct check {};
5258
5259 typedef check<void> single_type;
5260 typedef check<check<void>> double_type;
5261 typedef check<check<check<void>>> triple_type;
5262 typedef check<check<check<check<void>>>> quadruple_type;
5263
5264 }
5265
5266 namespace test_decltype
5267 {
5268
5269 int
5270 f()
5271 {
5272 int a = 1;
5273 decltype(a) b = 2;
5274 return a + b;
5275 }
5276
5277 }
5278
5279 namespace test_type_deduction
5280 {
5281
5282 template < typename T1, typename T2 >
5283 struct is_same
5284 {
5285 static const bool value = false;
5286 };
5287
5288 template < typename T >
5289 struct is_same<T, T>
5290 {
5291 static const bool value = true;
5292 };
5293
5294 template < typename T1, typename T2 >
5295 auto
5296 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5297 {
5298 return a1 + a2;
5299 }
5300
5301 int
5302 test(const int c, volatile int v)
5303 {
5304 static_assert(is_same<int, decltype(0)>::value == true, "");
5305 static_assert(is_same<int, decltype(c)>::value == false, "");
5306 static_assert(is_same<int, decltype(v)>::value == false, "");
5307 auto ac = c;
5308 auto av = v;
5309 auto sumi = ac + av + 'x';
5310 auto sumf = ac + av + 1.0;
5311 static_assert(is_same<int, decltype(ac)>::value == true, "");
5312 static_assert(is_same<int, decltype(av)>::value == true, "");
5313 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5314 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5315 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5316 return (sumf > 0.0) ? sumi : add(c, v);
5317 }
5318
5319 }
5320
5321 namespace test_noexcept
5322 {
5323
5324 int f() { return 0; }
5325 int g() noexcept { return 0; }
5326
5327 static_assert(noexcept(f()) == false, "");
5328 static_assert(noexcept(g()) == true, "");
5329
5330 }
5331
5332 namespace test_constexpr
5333 {
5334
5335 template < typename CharT >
5336 unsigned long constexpr
5337 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5338 {
5339 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5340 }
5341
5342 template < typename CharT >
5343 unsigned long constexpr
5344 strlen_c(const CharT *const s) noexcept
5345 {
5346 return strlen_c_r(s, 0UL);
5347 }
5348
5349 static_assert(strlen_c("") == 0UL, "");
5350 static_assert(strlen_c("1") == 1UL, "");
5351 static_assert(strlen_c("example") == 7UL, "");
5352 static_assert(strlen_c("another\0example") == 7UL, "");
5353
5354 }
5355
5356 namespace test_rvalue_references
5357 {
5358
5359 template < int N >
5360 struct answer
5361 {
5362 static constexpr int value = N;
5363 };
5364
5365 answer<1> f(int&) { return answer<1>(); }
5366 answer<2> f(const int&) { return answer<2>(); }
5367 answer<3> f(int&&) { return answer<3>(); }
5368
5369 void
5370 test()
5371 {
5372 int i = 0;
5373 const int c = 0;
5374 static_assert(decltype(f(i))::value == 1, "");
5375 static_assert(decltype(f(c))::value == 2, "");
5376 static_assert(decltype(f(0))::value == 3, "");
5377 }
5378
5379 }
5380
5381 namespace test_uniform_initialization
5382 {
5383
5384 struct test
5385 {
5386 static const int zero {};
5387 static const int one {1};
5388 };
5389
5390 static_assert(test::zero == 0, "");
5391 static_assert(test::one == 1, "");
5392
5393 }
5394
5395 namespace test_lambdas
5396 {
5397
5398 void
5399 test1()
5400 {
5401 auto lambda1 = [](){};
5402 auto lambda2 = lambda1;
5403 lambda1();
5404 lambda2();
5405 }
5406
5407 int
5408 test2()
5409 {
5410 auto a = [](int i, int j){ return i + j; }(1, 2);
5411 auto b = []() -> int { return '0'; }();
5412 auto c = [=](){ return a + b; }();
5413 auto d = [&](){ return c; }();
5414 auto e = [a, &b](int x) mutable {
5415 const auto identity = [](int y){ return y; };
5416 for (auto i = 0; i < a; ++i)
5417 a += b--;
5418 return x + identity(a + b);
5419 }(0);
5420 return a + b + c + d + e;
5421 }
5422
5423 int
5424 test3()
5425 {
5426 const auto nullary = [](){ return 0; };
5427 const auto unary = [](int x){ return x; };
5428 using nullary_t = decltype(nullary);
5429 using unary_t = decltype(unary);
5430 const auto higher1st = [](nullary_t f){ return f(); };
5431 const auto higher2nd = [unary](nullary_t f1){
5432 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5433 };
5434 return higher1st(nullary) + higher2nd(nullary)(unary);
5435 }
5436
5437 }
5438
5439 namespace test_variadic_templates
5440 {
5441
5442 template <int...>
5443 struct sum;
5444
5445 template <int N0, int... N1toN>
5446 struct sum<N0, N1toN...>
5447 {
5448 static constexpr auto value = N0 + sum<N1toN...>::value;
5449 };
5450
5451 template <>
5452 struct sum<>
5453 {
5454 static constexpr auto value = 0;
5455 };
5456
5457 static_assert(sum<>::value == 0, "");
5458 static_assert(sum<1>::value == 1, "");
5459 static_assert(sum<23>::value == 23, "");
5460 static_assert(sum<1, 2>::value == 3, "");
5461 static_assert(sum<5, 5, 11>::value == 21, "");
5462 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5463
5464 }
5465
5466 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5467 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5468 // because of this.
5469 namespace test_template_alias_sfinae
5470 {
5471
5472 struct foo {};
5473
5474 template<typename T>
5475 using member = typename T::member_type;
5476
5477 template<typename T>
5478 void func(...) {}
5479
5480 template<typename T>
5481 void func(member<T>*) {}
5482
5483 void test();
5484
5485 void test() { func<foo>(0); }
5486
5487 }
5488
5489} // namespace cxx11
5490
5491#endif // __cplusplus >= 201103L
5492
5493
5494
5495_ACEOF
5496if ac_fn_cxx_try_compile "$LINENO"; then :
5497 ax_cv_cxx_compile_cxx11=yes
5498else
5499 ax_cv_cxx_compile_cxx11=no
5500fi
5501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5502fi
5503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5504$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5505 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5506 ac_success=yes
5507 fi
5508
5509 if test x$ac_success = xno; then
41260ac2
SM
5510 for alternative in ${ax_cxx_compile_alternatives}; do
5511 switch="-std=gnu++${alternative}"
0bcda685
PA
5512 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5514$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5515if eval \${$cachevar+:} false; then :
0bcda685
PA
5516 $as_echo_n "(cached) " >&6
5517else
5518 ac_save_CXX="$CXX"
5519 CXX="$CXX $switch"
5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h. */
5522
5523
5524// If the compiler admits that it is not ready for C++11, why torture it?
5525// Hopefully, this will speed up the test.
5526
5527#ifndef __cplusplus
5528
5529#error "This is not a C++ compiler"
5530
5531#elif __cplusplus < 201103L
5532
5533#error "This is not a C++11 compiler"
5534
5535#else
5536
5537namespace cxx11
5538{
5539
5540 namespace test_static_assert
5541 {
5542
5543 template <typename T>
5544 struct check
5545 {
5546 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5547 };
5548
5549 }
5550
5551 namespace test_final_override
5552 {
5553
5554 struct Base
5555 {
5556 virtual void f() {}
5557 };
5558
5559 struct Derived : public Base
5560 {
5561 virtual void f() override {}
5562 };
5563
5564 }
5565
5566 namespace test_double_right_angle_brackets
5567 {
5568
5569 template < typename T >
5570 struct check {};
5571
5572 typedef check<void> single_type;
5573 typedef check<check<void>> double_type;
5574 typedef check<check<check<void>>> triple_type;
5575 typedef check<check<check<check<void>>>> quadruple_type;
5576
5577 }
5578
5579 namespace test_decltype
5580 {
5581
5582 int
5583 f()
5584 {
5585 int a = 1;
5586 decltype(a) b = 2;
5587 return a + b;
5588 }
5589
5590 }
5591
5592 namespace test_type_deduction
5593 {
5594
5595 template < typename T1, typename T2 >
5596 struct is_same
5597 {
5598 static const bool value = false;
5599 };
5600
5601 template < typename T >
5602 struct is_same<T, T>
5603 {
5604 static const bool value = true;
5605 };
5606
5607 template < typename T1, typename T2 >
5608 auto
5609 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5610 {
5611 return a1 + a2;
5612 }
5613
5614 int
5615 test(const int c, volatile int v)
5616 {
5617 static_assert(is_same<int, decltype(0)>::value == true, "");
5618 static_assert(is_same<int, decltype(c)>::value == false, "");
5619 static_assert(is_same<int, decltype(v)>::value == false, "");
5620 auto ac = c;
5621 auto av = v;
5622 auto sumi = ac + av + 'x';
5623 auto sumf = ac + av + 1.0;
5624 static_assert(is_same<int, decltype(ac)>::value == true, "");
5625 static_assert(is_same<int, decltype(av)>::value == true, "");
5626 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5627 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5628 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5629 return (sumf > 0.0) ? sumi : add(c, v);
5630 }
5631
5632 }
5633
5634 namespace test_noexcept
5635 {
5636
5637 int f() { return 0; }
5638 int g() noexcept { return 0; }
5639
5640 static_assert(noexcept(f()) == false, "");
5641 static_assert(noexcept(g()) == true, "");
5642
5643 }
5644
5645 namespace test_constexpr
5646 {
5647
5648 template < typename CharT >
5649 unsigned long constexpr
5650 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5651 {
5652 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5653 }
5654
5655 template < typename CharT >
5656 unsigned long constexpr
5657 strlen_c(const CharT *const s) noexcept
5658 {
5659 return strlen_c_r(s, 0UL);
5660 }
5661
5662 static_assert(strlen_c("") == 0UL, "");
5663 static_assert(strlen_c("1") == 1UL, "");
5664 static_assert(strlen_c("example") == 7UL, "");
5665 static_assert(strlen_c("another\0example") == 7UL, "");
5666
5667 }
5668
5669 namespace test_rvalue_references
5670 {
5671
5672 template < int N >
5673 struct answer
5674 {
5675 static constexpr int value = N;
5676 };
5677
5678 answer<1> f(int&) { return answer<1>(); }
5679 answer<2> f(const int&) { return answer<2>(); }
5680 answer<3> f(int&&) { return answer<3>(); }
5681
5682 void
5683 test()
5684 {
5685 int i = 0;
5686 const int c = 0;
5687 static_assert(decltype(f(i))::value == 1, "");
5688 static_assert(decltype(f(c))::value == 2, "");
5689 static_assert(decltype(f(0))::value == 3, "");
5690 }
5691
5692 }
5693
5694 namespace test_uniform_initialization
5695 {
5696
5697 struct test
5698 {
5699 static const int zero {};
5700 static const int one {1};
5701 };
5702
5703 static_assert(test::zero == 0, "");
5704 static_assert(test::one == 1, "");
5705
5706 }
5707
5708 namespace test_lambdas
5709 {
5710
5711 void
5712 test1()
5713 {
5714 auto lambda1 = [](){};
5715 auto lambda2 = lambda1;
5716 lambda1();
5717 lambda2();
5718 }
5719
5720 int
5721 test2()
5722 {
5723 auto a = [](int i, int j){ return i + j; }(1, 2);
5724 auto b = []() -> int { return '0'; }();
5725 auto c = [=](){ return a + b; }();
5726 auto d = [&](){ return c; }();
5727 auto e = [a, &b](int x) mutable {
5728 const auto identity = [](int y){ return y; };
5729 for (auto i = 0; i < a; ++i)
5730 a += b--;
5731 return x + identity(a + b);
5732 }(0);
5733 return a + b + c + d + e;
5734 }
5735
5736 int
5737 test3()
5738 {
5739 const auto nullary = [](){ return 0; };
5740 const auto unary = [](int x){ return x; };
5741 using nullary_t = decltype(nullary);
5742 using unary_t = decltype(unary);
5743 const auto higher1st = [](nullary_t f){ return f(); };
5744 const auto higher2nd = [unary](nullary_t f1){
5745 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5746 };
5747 return higher1st(nullary) + higher2nd(nullary)(unary);
5748 }
5749
5750 }
5751
5752 namespace test_variadic_templates
5753 {
5754
5755 template <int...>
5756 struct sum;
5757
5758 template <int N0, int... N1toN>
5759 struct sum<N0, N1toN...>
5760 {
5761 static constexpr auto value = N0 + sum<N1toN...>::value;
5762 };
5763
5764 template <>
5765 struct sum<>
5766 {
5767 static constexpr auto value = 0;
5768 };
5769
5770 static_assert(sum<>::value == 0, "");
5771 static_assert(sum<1>::value == 1, "");
5772 static_assert(sum<23>::value == 23, "");
5773 static_assert(sum<1, 2>::value == 3, "");
5774 static_assert(sum<5, 5, 11>::value == 21, "");
5775 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5776
5777 }
5778
5779 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5780 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5781 // because of this.
5782 namespace test_template_alias_sfinae
5783 {
5784
5785 struct foo {};
5786
5787 template<typename T>
5788 using member = typename T::member_type;
5789
5790 template<typename T>
5791 void func(...) {}
5792
5793 template<typename T>
5794 void func(member<T>*) {}
5795
5796 void test();
5797
5798 void test() { func<foo>(0); }
5799
5800 }
5801
5802} // namespace cxx11
5803
5804#endif // __cplusplus >= 201103L
5805
5806
5807
5808_ACEOF
5809if ac_fn_cxx_try_compile "$LINENO"; then :
5810 eval $cachevar=yes
5811else
5812 eval $cachevar=no
5813fi
5814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5815 CXX="$ac_save_CXX"
5816fi
5817eval ac_res=\$$cachevar
5818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5819$as_echo "$ac_res" >&6; }
5820 if eval test x\$$cachevar = xyes; then
5821 CXX_DIALECT="$switch"
5822 ac_success=yes
5823 break
5824 fi
5825 done
5826 fi
5827
5828 if test x$ac_success = xno; then
41260ac2
SM
5829 for alternative in ${ax_cxx_compile_alternatives}; do
5830 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5831 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5833$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5834if eval \${$cachevar+:} false; then :
0bcda685
PA
5835 $as_echo_n "(cached) " >&6
5836else
5837 ac_save_CXX="$CXX"
41260ac2
SM
5838 CXX="$CXX $switch"
5839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5840/* end confdefs.h. */
5841
5842
5843// If the compiler admits that it is not ready for C++11, why torture it?
5844// Hopefully, this will speed up the test.
5845
5846#ifndef __cplusplus
5847
5848#error "This is not a C++ compiler"
5849
5850#elif __cplusplus < 201103L
5851
5852#error "This is not a C++11 compiler"
5853
5854#else
5855
5856namespace cxx11
5857{
5858
5859 namespace test_static_assert
5860 {
5861
5862 template <typename T>
5863 struct check
5864 {
5865 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5866 };
5867
5868 }
5869
5870 namespace test_final_override
5871 {
5872
5873 struct Base
5874 {
5875 virtual void f() {}
5876 };
5877
5878 struct Derived : public Base
5879 {
5880 virtual void f() override {}
5881 };
5882
5883 }
5884
5885 namespace test_double_right_angle_brackets
5886 {
5887
5888 template < typename T >
5889 struct check {};
5890
5891 typedef check<void> single_type;
5892 typedef check<check<void>> double_type;
5893 typedef check<check<check<void>>> triple_type;
5894 typedef check<check<check<check<void>>>> quadruple_type;
5895
5896 }
5897
5898 namespace test_decltype
5899 {
5900
5901 int
5902 f()
5903 {
5904 int a = 1;
5905 decltype(a) b = 2;
5906 return a + b;
5907 }
5908
5909 }
5910
5911 namespace test_type_deduction
5912 {
5913
5914 template < typename T1, typename T2 >
5915 struct is_same
5916 {
5917 static const bool value = false;
5918 };
5919
5920 template < typename T >
5921 struct is_same<T, T>
5922 {
5923 static const bool value = true;
5924 };
5925
5926 template < typename T1, typename T2 >
5927 auto
5928 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5929 {
5930 return a1 + a2;
5931 }
5932
5933 int
5934 test(const int c, volatile int v)
5935 {
5936 static_assert(is_same<int, decltype(0)>::value == true, "");
5937 static_assert(is_same<int, decltype(c)>::value == false, "");
5938 static_assert(is_same<int, decltype(v)>::value == false, "");
5939 auto ac = c;
5940 auto av = v;
5941 auto sumi = ac + av + 'x';
5942 auto sumf = ac + av + 1.0;
5943 static_assert(is_same<int, decltype(ac)>::value == true, "");
5944 static_assert(is_same<int, decltype(av)>::value == true, "");
5945 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5946 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5947 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5948 return (sumf > 0.0) ? sumi : add(c, v);
5949 }
5950
5951 }
5952
5953 namespace test_noexcept
5954 {
5955
5956 int f() { return 0; }
5957 int g() noexcept { return 0; }
5958
5959 static_assert(noexcept(f()) == false, "");
5960 static_assert(noexcept(g()) == true, "");
5961
5962 }
5963
5964 namespace test_constexpr
5965 {
5966
5967 template < typename CharT >
5968 unsigned long constexpr
5969 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5970 {
5971 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5972 }
5973
5974 template < typename CharT >
5975 unsigned long constexpr
5976 strlen_c(const CharT *const s) noexcept
5977 {
5978 return strlen_c_r(s, 0UL);
5979 }
5980
5981 static_assert(strlen_c("") == 0UL, "");
5982 static_assert(strlen_c("1") == 1UL, "");
5983 static_assert(strlen_c("example") == 7UL, "");
5984 static_assert(strlen_c("another\0example") == 7UL, "");
5985
5986 }
5987
5988 namespace test_rvalue_references
5989 {
5990
5991 template < int N >
5992 struct answer
5993 {
5994 static constexpr int value = N;
5995 };
5996
5997 answer<1> f(int&) { return answer<1>(); }
5998 answer<2> f(const int&) { return answer<2>(); }
5999 answer<3> f(int&&) { return answer<3>(); }
6000
6001 void
6002 test()
6003 {
6004 int i = 0;
6005 const int c = 0;
6006 static_assert(decltype(f(i))::value == 1, "");
6007 static_assert(decltype(f(c))::value == 2, "");
6008 static_assert(decltype(f(0))::value == 3, "");
6009 }
6010
6011 }
6012
6013 namespace test_uniform_initialization
6014 {
6015
6016 struct test
6017 {
6018 static const int zero {};
6019 static const int one {1};
6020 };
6021
6022 static_assert(test::zero == 0, "");
6023 static_assert(test::one == 1, "");
6024
6025 }
6026
6027 namespace test_lambdas
6028 {
6029
6030 void
6031 test1()
6032 {
6033 auto lambda1 = [](){};
6034 auto lambda2 = lambda1;
6035 lambda1();
6036 lambda2();
6037 }
6038
6039 int
6040 test2()
6041 {
6042 auto a = [](int i, int j){ return i + j; }(1, 2);
6043 auto b = []() -> int { return '0'; }();
6044 auto c = [=](){ return a + b; }();
6045 auto d = [&](){ return c; }();
6046 auto e = [a, &b](int x) mutable {
6047 const auto identity = [](int y){ return y; };
6048 for (auto i = 0; i < a; ++i)
6049 a += b--;
6050 return x + identity(a + b);
6051 }(0);
6052 return a + b + c + d + e;
6053 }
6054
6055 int
6056 test3()
6057 {
6058 const auto nullary = [](){ return 0; };
6059 const auto unary = [](int x){ return x; };
6060 using nullary_t = decltype(nullary);
6061 using unary_t = decltype(unary);
6062 const auto higher1st = [](nullary_t f){ return f(); };
6063 const auto higher2nd = [unary](nullary_t f1){
6064 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6065 };
6066 return higher1st(nullary) + higher2nd(nullary)(unary);
6067 }
6068
6069 }
6070
6071 namespace test_variadic_templates
6072 {
6073
6074 template <int...>
6075 struct sum;
6076
6077 template <int N0, int... N1toN>
6078 struct sum<N0, N1toN...>
6079 {
6080 static constexpr auto value = N0 + sum<N1toN...>::value;
6081 };
6082
6083 template <>
6084 struct sum<>
6085 {
6086 static constexpr auto value = 0;
6087 };
6088
6089 static_assert(sum<>::value == 0, "");
6090 static_assert(sum<1>::value == 1, "");
6091 static_assert(sum<23>::value == 23, "");
6092 static_assert(sum<1, 2>::value == 3, "");
6093 static_assert(sum<5, 5, 11>::value == 21, "");
6094 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6095
6096 }
6097
6098 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6099 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6100 // because of this.
6101 namespace test_template_alias_sfinae
6102 {
6103
6104 struct foo {};
6105
6106 template<typename T>
6107 using member = typename T::member_type;
6108
6109 template<typename T>
6110 void func(...) {}
6111
6112 template<typename T>
6113 void func(member<T>*) {}
6114
6115 void test();
6116
6117 void test() { func<foo>(0); }
6118
6119 }
6120
6121} // namespace cxx11
6122
6123#endif // __cplusplus >= 201103L
6124
6125
6126
6127_ACEOF
6128if ac_fn_cxx_try_compile "$LINENO"; then :
6129 eval $cachevar=yes
6130else
6131 eval $cachevar=no
6132fi
6133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6134 CXX="$ac_save_CXX"
0bcda685
PA
6135fi
6136eval ac_res=\$$cachevar
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6138$as_echo "$ac_res" >&6; }
41260ac2
SM
6139 if eval test x\$$cachevar = xyes; then
6140 CXX_DIALECT="$switch"
6141 ac_success=yes
6142 break
6143 fi
6144 done
6145 if test x$ac_success = xyes; then
0bcda685
PA
6146 break
6147 fi
6148 done
6149 fi
6150 ac_ext=c
6151ac_cpp='$CPP $CPPFLAGS'
6152ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6153ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6154ac_compiler_gnu=$ac_cv_c_compiler_gnu
6155
6156 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6157 if test x$ac_success = xno; then
d0ac1c44 6158 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6159 fi
6160 fi
6161 if test x$ac_success = xno; then
6162 HAVE_CXX11=0
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6164$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6165 else
6166 HAVE_CXX11=1
6167
6168$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6169
6170 fi
6171
6172
6173
6174
a417dc56
RW
6175# Dependency checking.
6176rm -rf .tst 2>/dev/null
6177mkdir .tst 2>/dev/null
6178if test -d .tst; then
6179 am__leading_dot=.
6180else
6181 am__leading_dot=_
6182fi
6183rmdir .tst 2>/dev/null
6184
6185DEPDIR="${am__leading_dot}deps"
6186
81ecdfbb 6187ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6188
6189
6190depcc="$CC" am_compiler_list=
6191
6192am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6194$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6195if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6196 $as_echo_n "(cached) " >&6
a417dc56
RW
6197else
6198 if test -f "$am_depcomp"; then
6199 # We make a subdir and do the tests there. Otherwise we can end up
6200 # making bogus files that we don't know about and never remove. For
6201 # instance it was reported that on HP-UX the gcc test will end up
6202 # making a dummy file named `D' -- because `-MD' means `put the output
6203 # in D'.
6204 mkdir conftest.dir
6205 # Copy depcomp to subdir because otherwise we won't find it if we're
6206 # using a relative directory.
6207 cp "$am_depcomp" conftest.dir
6208 cd conftest.dir
6209 # We will build objects and dependencies in a subdirectory because
6210 # it helps to detect inapplicable dependency modes. For instance
6211 # both Tru64's cc and ICC support -MD to output dependencies as a
6212 # side effect of compilation, but ICC will put the dependencies in
6213 # the current directory while Tru64 will put them in the object
6214 # directory.
6215 mkdir sub
6216
6217 am_cv_CC_dependencies_compiler_type=none
6218 if test "$am_compiler_list" = ""; then
6219 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6220 fi
6221 for depmode in $am_compiler_list; do
6222 if test $depmode = none; then break; fi
6223
81ecdfbb 6224 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6225 # Setup a source with many dependencies, because some compilers
6226 # like to wrap large dependency lists on column 80 (with \), and
6227 # we should not choose a depcomp mode which is confused by this.
6228 #
6229 # We need to recreate these files for each test, as the compiler may
6230 # overwrite some of them when testing with obscure command lines.
6231 # This happens at least with the AIX C compiler.
6232 : > sub/conftest.c
6233 for i in 1 2 3 4 5 6; do
6234 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6235 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6236 # Solaris 8's {/usr,}/bin/sh.
6237 touch sub/conftst$i.h
6238 done
6239 echo "include sub/conftest.Po" > confmf
6240
6241 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6242 # mode. It turns out that the SunPro C++ compiler does not properly
6243 # handle `-M -o', and we need to detect this.
6244 depcmd="depmode=$depmode \
6245 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6246 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6247 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6248 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6249 if env $depcmd > conftest.err 2>&1 &&
6250 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6251 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6252 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6253 # icc doesn't choke on unknown options, it will just issue warnings
6254 # or remarks (even with -Werror). So we grep stderr for any message
6255 # that says an option was ignored or not supported.
6256 # When given -MP, icc 7.0 and 7.1 complain thusly:
6257 # icc: Command line warning: ignoring option '-M'; no argument required
6258 # The diagnosis changed in icc 8.0:
6259 # icc: Command line remark: option '-MP' not supported
6260 if (grep 'ignoring option' conftest.err ||
6261 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6262 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6263 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6264 break
6265 fi
6266 fi
81ecdfbb 6267 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6268 sed -e 's/^/| /' < conftest.err >&5
6269 done
6270
6271 cd ..
6272 rm -rf conftest.dir
6273else
6274 am_cv_CC_dependencies_compiler_type=none
6275fi
6276
6277fi
81ecdfbb
RW
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6279$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6280if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6281then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6282else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6283
6284fi
6285
6286
c971b7fa
PA
6287
6288CONFIG_OBS=
6289CONFIG_DEPS=
6290CONFIG_SRCS=
6291ENABLE_CFLAGS=
6292
6293CONFIG_ALL=
6294CONFIG_CLEAN=
6295CONFIG_INSTALL=
6296CONFIG_UNINSTALL=
6297
6298# If we haven't got the data from the intl directory,
6299# assume NLS is disabled.
6300USE_NLS=no
6301LIBINTL=
6302LIBINTL_DEP=
6303INCINTL=
6304XGETTEXT=
6305GMSGFMT=
6306POSUB=
783e057b
DJ
6307
6308if test -f ../intl/config.intl; then
6309 . ../intl/config.intl
6310fi
81ecdfbb
RW
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6312$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6313if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
783e057b 6316else
81ecdfbb
RW
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6318$as_echo "yes" >&6; }
783e057b 6319
81ecdfbb 6320$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6321
6322
81ecdfbb
RW
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6324$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6325 # Look for .po and .gmo files in the source directory.
6326 CATALOGS=
6327 XLINGUAS=
6328 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6329 # If there aren't any .gmo files the shell will give us the
6330 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6331 # weeded out.
6332 case "$cat" in *\**)
6333 continue;;
6334 esac
6335 # The quadruple backslash is collapsed to a double backslash
6336 # by the backticks, then collapsed again by the double quotes,
6337 # leaving us with one backslash in the sed expression (right
6338 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6339 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6340 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6341 # The user is allowed to set LINGUAS to a list of languages to
6342 # install catalogs for. If it's empty that means "all of them."
6343 if test "x$LINGUAS" = x; then
6344 CATALOGS="$CATALOGS $cat"
6345 XLINGUAS="$XLINGUAS $lang"
6346 else
6347 case "$LINGUAS" in *$lang*)
6348 CATALOGS="$CATALOGS $cat"
6349 XLINGUAS="$XLINGUAS $lang"
6350 ;;
6351 esac
e28b3332
DJ
6352 fi
6353 done
c971b7fa
PA
6354 LINGUAS="$XLINGUAS"
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6356$as_echo "$LINGUAS" >&6; }
6357
6358
6359 DATADIRNAME=share
6360
6361 INSTOBJEXT=.mo
6362
6363 GENCAT=gencat
6364
6365 CATOBJEXT=.gmo
e28b3332 6366
e28b3332
DJ
6367fi
6368
c971b7fa
PA
6369localedir='${datadir}/locale'
6370
6371
6372if test x"$USE_NLS" = xyes; then
6373 CONFIG_ALL="$CONFIG_ALL all-po"
6374 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6375 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6376 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6377fi
e28b3332 6378
c971b7fa
PA
6379PACKAGE=gdb
6380
6381cat >>confdefs.h <<_ACEOF
6382#define PACKAGE "$PACKAGE"
6383_ACEOF
6384
6385
6386
6387# We never need to detect it in this sub-configure.
6388# But preserve it for config.status --recheck.
6389
6390
6391
6392MAKEINFO_EXTRA_FLAGS=""
6393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6394$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6395if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6396 $as_echo_n "(cached) " >&6
6397else
6398 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6399 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6400 gdb_cv_have_makeinfo_click=yes
6401 else
6402 gdb_cv_have_makeinfo_click=no
6403 fi
6404fi
6405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6406$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6407if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6408 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6409fi
e28b3332
DJ
6410
6411
bec39cab
AC
6412
6413
81ecdfbb
RW
6414# Check whether --with-separate-debug-dir was given.
6415if test "${with_separate_debug_dir+set}" = set; then :
6416 withval=$with_separate_debug_dir;
b14b1491
TT
6417 DEBUGDIR=$withval
6418else
6419 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6420fi
6421
20e95c23 6422
783e057b
DJ
6423 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6424 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6425 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6426 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6427
783e057b
DJ
6428cat >>confdefs.h <<_ACEOF
6429#define DEBUGDIR "$ac_define_dir"
20e95c23 6430_ACEOF
20e95c23 6431
20e95c23 6432
20e95c23 6433
0c4a4063 6434
b14b1491
TT
6435 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6436 if test "x$prefix" = xNONE; then
6437 test_prefix=/usr/local
6438 else
6439 test_prefix=$prefix
6440 fi
783e057b 6441 else
b14b1491 6442 test_prefix=$exec_prefix
783e057b 6443 fi
b14b1491
TT
6444 value=0
6445 case ${ac_define_dir} in
6446 "${test_prefix}"|"${test_prefix}/"*|\
6447 '${exec_prefix}'|'${exec_prefix}/'*)
6448 value=1
6449 ;;
6450 esac
6451
6452cat >>confdefs.h <<_ACEOF
6453#define DEBUGDIR_RELOCATABLE $value
6454_ACEOF
6455
6456
6457
0c4a4063 6458
f83d8a90
DE
6459# We can't pass paths as command line arguments.
6460# Mingw32 tries to be clever and will convert the paths for us.
6461# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6462# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6463# This breaks GDB's relocatable path conversions since paths passed in
6464# config.h would not get so translated, the path prefixes no longer match.
6465
6466 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6467 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6468 ac_define_dir=`eval echo $bindir`
6469 ac_define_dir=`eval echo $ac_define_dir`
6470
6471cat >>confdefs.h <<_ACEOF
6472#define BINDIR "$ac_define_dir"
6473_ACEOF
6474
6475
6476
b14b1491
TT
6477# GDB's datadir relocation
6478
6479
6480
81ecdfbb
RW
6481# Check whether --with-gdb-datadir was given.
6482if test "${with_gdb_datadir+set}" = set; then :
6483 withval=$with_gdb_datadir;
b14b1491 6484 GDB_DATADIR=$withval
20e95c23 6485else
b14b1491 6486 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6487fi
6488
20e95c23 6489
b14b1491
TT
6490 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6491 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6492 ac_define_dir=`eval echo $GDB_DATADIR`
6493 ac_define_dir=`eval echo $ac_define_dir`
6494
6495cat >>confdefs.h <<_ACEOF
6496#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6497_ACEOF
6498
b14b1491
TT
6499
6500
0c4a4063 6501
b14b1491
TT
6502 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6503 if test "x$prefix" = xNONE; then
6504 test_prefix=/usr/local
6505 else
6506 test_prefix=$prefix
6507 fi
6508 else
6509 test_prefix=$exec_prefix
6510 fi
6511 value=0
6512 case ${ac_define_dir} in
6513 "${test_prefix}"|"${test_prefix}/"*|\
6514 '${exec_prefix}'|'${exec_prefix}/'*)
6515 value=1
6516 ;;
6517 esac
6518
6519cat >>confdefs.h <<_ACEOF
6520#define GDB_DATADIR_RELOCATABLE $value
6521_ACEOF
6522
6523
783e057b 6524
20e95c23 6525
0c4a4063 6526
81ecdfbb
RW
6527# Check whether --with-relocated-sources was given.
6528if test "${with_relocated_sources+set}" = set; then :
6529 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6530
6531 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6532 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6533 ac_define_dir=`eval echo $reloc_srcdir`
6534 ac_define_dir=`eval echo $ac_define_dir`
6535
6536cat >>confdefs.h <<_ACEOF
6537#define RELOC_SRCDIR "$ac_define_dir"
6538_ACEOF
6539
6540
6541
81ecdfbb
RW
6542fi
6543
29b0e8a2 6544
7349ff92
JK
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6546$as_echo_n "checking for default auto-load directory... " >&6; }
6547
6548# Check whether --with-auto-load-dir was given.
6549if test "${with_auto_load_dir+set}" = set; then :
6550 withval=$with_auto_load_dir;
6551else
1564a261 6552 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6553fi
6554
2861ee4f 6555escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6556
6557 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6558 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6559 ac_define_dir=`eval echo $escape_dir`
6560 ac_define_dir=`eval echo $ac_define_dir`
6561
6562cat >>confdefs.h <<_ACEOF
6563#define AUTO_LOAD_DIR "$ac_define_dir"
6564_ACEOF
6565
6566
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6568$as_echo "$with_auto_load_dir" >&6; }
6569
bccbefd2
JK
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6571$as_echo_n "checking for default auto-load safe-path... " >&6; }
6572
6573# Check whether --with-auto-load-safe-path was given.
6574if test "${with_auto_load_safe_path+set}" = set; then :
6575 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6576 with_auto_load_safe_path="/"
6577 fi
bccbefd2 6578else
7349ff92 6579 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6580fi
6581
2861ee4f 6582escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6583
6584 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6585 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6586 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6587 ac_define_dir=`eval echo $ac_define_dir`
6588
6589cat >>confdefs.h <<_ACEOF
6dea1fbd 6590#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6591_ACEOF
6592
6593
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6595$as_echo "$with_auto_load_safe_path" >&6; }
6596
29b0e8a2 6597
20e95c23 6598
5ae98d25 6599subdirs="$subdirs testsuite"
20e95c23
DJ
6600
6601
783e057b 6602# Check whether to support alternative target configurations
81ecdfbb
RW
6603# Check whether --enable-targets was given.
6604if test "${enable_targets+set}" = set; then :
6605 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6606 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6607 ;;
6608 no) enable_targets= ;;
6609 *) enable_targets=$enableval ;;
6610esac
81ecdfbb
RW
6611fi
6612
20e95c23 6613
783e057b 6614# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6615# Check whether --enable-64-bit-bfd was given.
6616if test "${enable_64_bit_bfd+set}" = set; then :
6617 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6618 yes) want64=true ;;
6619 no) want64=false ;;
d0ac1c44 6620 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6621esac
6622else
6623 want64=false
81ecdfbb
RW
6624fi
6625
783e057b
DJ
6626# Provide defaults for some variables set by the per-host and per-target
6627# configuration.
6628gdb_host_obs=posix-hdep.o
20e95c23 6629
783e057b
DJ
6630if test "${target}" = "${host}"; then
6631 gdb_native=yes
6632else
6633 gdb_native=no
6634fi
20e95c23 6635
783e057b 6636. $srcdir/configure.host
20e95c23 6637
783e057b 6638# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6639
783e057b
DJ
6640TARGET_OBS=
6641all_targets=
b292c783 6642HAVE_NATIVE_GCORE_TARGET=
20e95c23 6643
783e057b 6644for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6645do
783e057b
DJ
6646 if test "$targ_alias" = "all"; then
6647 all_targets=true
6648 else
6649 # Canonicalize the secondary target names.
6650 result=`$ac_config_sub $targ_alias 2>/dev/null`
6651 if test -n "$result"; then
6652 targ=$result
6653 else
6654 targ=$targ_alias
6655 fi
20e95c23 6656
783e057b 6657 . ${srcdir}/configure.tgt
20e95c23 6658
bf307134 6659 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6660 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6661fi
6662
783e057b
DJ
6663 # Target-specific object files
6664 for i in ${gdb_target_obs}; do
6665 case " $TARGET_OBS " in
6666 *" ${i} "*) ;;
6667 *)
6668 TARGET_OBS="$TARGET_OBS ${i}"
6669 ;;
6670 esac
6671 done
20e95c23 6672
783e057b
DJ
6673 # Check whether this target needs 64-bit CORE_ADDR
6674 if test x${want64} = xfalse; then
6675 . ${srcdir}/../bfd/config.bfd
6676 fi
b292c783
JK
6677
6678 # Check whether this target is native and supports gcore.
6679 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6680 && $gdb_have_gcore; then
6681 HAVE_NATIVE_GCORE_TARGET=1
6682 fi
783e057b 6683 fi
20e95c23
DJ
6684done
6685
783e057b
DJ
6686if test x${all_targets} = xtrue; then
6687
6688 # We want all 64-bit targets if we either:
6689 # - run on a 64-bit host or
6690 # - already require 64-bit support for some other target or
6691 # - the --enable-64-bit-bfd option was supplied
6692 # Otherwise we only support all 32-bit targets.
6693 #
6694 # NOTE: This test must be in sync with the corresponding
6695 # tests in BFD!
20e95c23 6696
783e057b 6697 if test x${want64} = xfalse; then
81ecdfbb
RW
6698 # The cast to long int works around a bug in the HP C Compiler
6699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6701# This bug is HP SR number 8606223364.
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6703$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6704if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6705 $as_echo_n "(cached) " >&6
c0993dbe 6706else
81ecdfbb 6707 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6708
81ecdfbb
RW
6709else
6710 if test "$ac_cv_type_long" = yes; then
6711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6713as_fn_error 77 "cannot compute sizeof (long)
6714See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6715 else
6716 ac_cv_sizeof_long=0
6717 fi
c0993dbe 6718fi
81ecdfbb 6719
c0993dbe 6720fi
81ecdfbb
RW
6721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6722$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6723
c0993dbe 6724
c0993dbe 6725
c0993dbe
UW
6726cat >>confdefs.h <<_ACEOF
6727#define SIZEOF_LONG $ac_cv_sizeof_long
6728_ACEOF
6729
6730
6731 if test "x${ac_cv_sizeof_long}" = "x8"; then
6732 want64=true
6733 fi
6734 fi
6735 if test x${want64} = xtrue; then
6736 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6737 else
6738 TARGET_OBS='$(ALL_TARGET_OBS)'
6739 fi
6740fi
6741
6742
6743
b292c783 6744
c0993dbe
UW
6745# For other settings, only the main target counts.
6746gdb_sim=
6747gdb_osabi=
c0993dbe
UW
6748targ=$target; . ${srcdir}/configure.tgt
6749
6750# Fetch the default architecture and default target vector from BFD.
6751targ=$target; . $srcdir/../bfd/config.bfd
6752
6753# We only want the first architecture, so strip off the others if
6754# there is more than one.
6755targ_archs=`echo $targ_archs | sed 's/ .*//'`
6756
6757if test "x$targ_archs" != x; then
6758
6759cat >>confdefs.h <<_ACEOF
6760#define DEFAULT_BFD_ARCH $targ_archs
6761_ACEOF
6762
6763fi
6764if test "x$targ_defvec" != x; then
6765
6766cat >>confdefs.h <<_ACEOF
6767#define DEFAULT_BFD_VEC $targ_defvec
6768_ACEOF
6769
6770fi
6771
c0993dbe 6772# Enable MI.
81ecdfbb
RW
6773# Check whether --enable-gdbmi was given.
6774if test "${enable_gdbmi+set}" = set; then :
6775 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6776 yes | no)
6777 ;;
6778 *)
d0ac1c44 6779 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6780 esac
6781else
6782 enable_gdbmi=yes
81ecdfbb
RW
6783fi
6784
c0993dbe 6785if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6786 if test -d "$srcdir/mi"; then
c0993dbe
UW
6787 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6788 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6789 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6790 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6791 fi
6792fi
6793
6794# Enable TUI.
81ecdfbb
RW
6795# Check whether --enable-tui was given.
6796if test "${enable_tui+set}" = set; then :
6797 enableval=$enable_tui; case $enableval in
3ca64bd3 6798 yes | no | auto)
c0993dbe
UW
6799 ;;
6800 *)
d0ac1c44 6801 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6802 esac
6803else
3ca64bd3 6804 enable_tui=auto
81ecdfbb
RW
6805fi
6806
c0993dbe
UW
6807
6808# Enable gdbtk.
81ecdfbb
RW
6809# Check whether --enable-gdbtk was given.
6810if test "${enable_gdbtk+set}" = set; then :
6811 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6812 yes | no)
6813 ;;
6814 *)
d0ac1c44 6815 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6816 esac
6817else
0ad6b8ee 6818 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6819 enable_gdbtk=yes
6820 else
6821 enable_gdbtk=no
6822 fi
81ecdfbb
RW
6823fi
6824
c0993dbe
UW
6825# We unconditionally disable gdbtk tests on selected platforms.
6826case $host_os in
6827 go32* | windows*)
81ecdfbb
RW
6828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6829$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6830 enable_gdbtk=no ;;
6831esac
6832
0d79cdc4
AM
6833# Handle optional debuginfod support
6834
f6720b1c
AM
6835
6836
6837
6838
6839
6840
6841if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6842 if test -n "$ac_tool_prefix"; then
6843 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6844set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6846$as_echo_n "checking for $ac_word... " >&6; }
6847if ${ac_cv_path_PKG_CONFIG+:} false; then :
6848 $as_echo_n "(cached) " >&6
6849else
6850 case $PKG_CONFIG in
6851 [\\/]* | ?:[\\/]*)
6852 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6853 ;;
6854 *)
6855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6856for as_dir in $PATH
6857do
6858 IFS=$as_save_IFS
6859 test -z "$as_dir" && as_dir=.
6860 for ac_exec_ext in '' $ac_executable_extensions; do
6861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6862 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6864 break 2
6865 fi
6866done
6867 done
6868IFS=$as_save_IFS
6869
6870 ;;
6871esac
6872fi
6873PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6874if test -n "$PKG_CONFIG"; then
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6876$as_echo "$PKG_CONFIG" >&6; }
6877else
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6879$as_echo "no" >&6; }
6880fi
6881
6882
6883fi
6884if test -z "$ac_cv_path_PKG_CONFIG"; then
6885 ac_pt_PKG_CONFIG=$PKG_CONFIG
6886 # Extract the first word of "pkg-config", so it can be a program name with args.
6887set dummy pkg-config; ac_word=$2
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6889$as_echo_n "checking for $ac_word... " >&6; }
6890if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6891 $as_echo_n "(cached) " >&6
6892else
6893 case $ac_pt_PKG_CONFIG in
6894 [\\/]* | ?:[\\/]*)
6895 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6896 ;;
6897 *)
6898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6899for as_dir in $PATH
6900do
6901 IFS=$as_save_IFS
6902 test -z "$as_dir" && as_dir=.
6903 for ac_exec_ext in '' $ac_executable_extensions; do
6904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6905 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6907 break 2
6908 fi
6909done
6910 done
6911IFS=$as_save_IFS
6912
6913 ;;
6914esac
6915fi
6916ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6917if test -n "$ac_pt_PKG_CONFIG"; then
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6919$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6920else
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6922$as_echo "no" >&6; }
6923fi
6924
6925 if test "x$ac_pt_PKG_CONFIG" = x; then
6926 PKG_CONFIG=""
6927 else
6928 case $cross_compiling:$ac_tool_warned in
6929yes:)
6930{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6931$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6932ac_tool_warned=yes ;;
6933esac
6934 PKG_CONFIG=$ac_pt_PKG_CONFIG
6935 fi
6936else
6937 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6938fi
6939
6940fi
6941if test -n "$PKG_CONFIG"; then
6942 _pkg_min_version=0.9.0
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6944$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6945 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6947$as_echo "yes" >&6; }
6948 else
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6950$as_echo "no" >&6; }
6951 PKG_CONFIG=""
6952 fi
6953fi
6954
6955# Handle optional debuginfod support
0d79cdc4
AM
6956
6957# Check whether --with-debuginfod was given.
6958if test "${with_debuginfod+set}" = set; then :
6959 withval=$with_debuginfod;
6960else
6961 with_debuginfod=auto
6962fi
6963
6964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6965$as_echo_n "checking whether to use debuginfod... " >&6; }
6966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6967$as_echo "$with_debuginfod" >&6; }
6968
f6720b1c 6969if test "x$with_debuginfod" != xno; then
0d79cdc4 6970
f6720b1c
AM
6971pkg_failed=no
6972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
6973$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
6974
6975if test -n "$DEBUGINFOD_CFLAGS"; then
6976 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
6977 elif test -n "$PKG_CONFIG"; then
6978 if test -n "$PKG_CONFIG" && \
6979 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
6980 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
6981 ac_status=$?
6982 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6983 test $ac_status = 0; }; then
6984 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
6985 test "x$?" != "x0" && pkg_failed=yes
0d79cdc4 6986else
f6720b1c 6987 pkg_failed=yes
0d79cdc4 6988fi
f6720b1c
AM
6989 else
6990 pkg_failed=untried
0d79cdc4 6991fi
f6720b1c
AM
6992if test -n "$DEBUGINFOD_LIBS"; then
6993 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
6994 elif test -n "$PKG_CONFIG"; then
6995 if test -n "$PKG_CONFIG" && \
6996 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
6997 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
6998 ac_status=$?
6999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7000 test $ac_status = 0; }; then
7001 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7002 test "x$?" != "x0" && pkg_failed=yes
7003else
7004 pkg_failed=yes
0d79cdc4 7005fi
f6720b1c
AM
7006 else
7007 pkg_failed=untried
0d79cdc4 7008fi
bec39cab 7009
377170fa
L
7010if test $pkg_failed = no; then
7011 pkg_save_LDFLAGS="$LDFLAGS"
7012 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d70f978b
L
7014/* end confdefs.h. */
7015
7016int
7017main ()
7018{
377170fa 7019
d70f978b
L
7020 ;
7021 return 0;
7022}
7023_ACEOF
7024if ac_fn_c_try_link "$LINENO"; then :
377170fa 7025
d70f978b
L
7026else
7027 pkg_failed=yes
7028fi
7029rm -f core conftest.err conftest.$ac_objext \
7030 conftest$ac_exeext conftest.$ac_ext
377170fa
L
7031 LDFLAGS=$pkg_save_LDFLAGS
7032fi
d70f978b 7033
0d79cdc4 7034
0d79cdc4 7035
f6720b1c
AM
7036if test $pkg_failed = yes; then
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7038$as_echo "no" >&6; }
0d79cdc4 7039
f6720b1c
AM
7040if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7041 _pkg_short_errors_supported=yes
7042else
7043 _pkg_short_errors_supported=no
7044fi
7045 if test $_pkg_short_errors_supported = yes; then
7046 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7047 else
7048 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7049 fi
7050 # Put the nasty error message in config.log where it belongs
7051 echo "$DEBUGINFOD_PKG_ERRORS" >&5
0d79cdc4 7052
f6720b1c
AM
7053 if test "x$with_debuginfod" = xyes; then
7054 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7055 else
7056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7057$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7058 fi
7059elif test $pkg_failed = untried; then
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7061$as_echo "no" >&6; }
7062 if test "x$with_debuginfod" = xyes; then
7063 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7064 else
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7066$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7067 fi
7068else
7069 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7070 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7072$as_echo "yes" >&6; }
7073
7074$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7075
7076fi
7077else
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7079$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
0d79cdc4
AM
7080fi
7081
7082
7083# Libunwind support for ia64.
05e7c244
JK
7084
7085# Check whether --with-libunwind-ia64 was given.
7086if test "${with_libunwind_ia64+set}" = set; then :
7087 withval=$with_libunwind_ia64;
bec39cab 7088else
05e7c244
JK
7089 with_libunwind_ia64=auto
7090fi
bec39cab 7091
05e7c244
JK
7092
7093# Backward compatibility option.
7094if test "${with_libunwind+set}" = set; then
7095 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 7096 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
7097 fi
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7099$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7100 with_libunwind_ia64="$with_libunwind"
7101fi
7102
7103case "$with_libunwind_ia64" in
7104 yes | no)
7105 ;;
7106 auto)
7107 for ac_header in libunwind-ia64.h
81ecdfbb 7108do :
b54a8fd7 7109 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7110if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7111 cat >>confdefs.h <<_ACEOF
b54a8fd7 7112#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7113_ACEOF
7114
7115fi
7116
7117done
7118
05e7c244
JK
7119 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7120 ;;
7121 *)
d0ac1c44 7122 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
7123 ;;
7124esac
bec39cab 7125
05e7c244 7126if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 7127 for ac_header in libunwind-ia64.h
81ecdfbb 7128do :
b54a8fd7 7129 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7130if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7131 cat >>confdefs.h <<_ACEOF
b54a8fd7 7132#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7133_ACEOF
7134
7135fi
7136
7137done
7138
05e7c244 7139 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 7140 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
7141 fi
7142 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7143 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7144 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
7145fi
7146
cb01cfba
JB
7147opt_curses=no
7148
81ecdfbb
RW
7149# Check whether --with-curses was given.
7150if test "${with_curses+set}" = set; then :
7151 withval=$with_curses; opt_curses=$withval
7152fi
7153
cb01cfba 7154
76a39ba7 7155prefer_curses=no
cb01cfba 7156if test "$opt_curses" = "yes"; then
76a39ba7 7157 prefer_curses=yes
cb01cfba
JB
7158fi
7159
a9322a30 7160# Profiling support.
81ecdfbb
RW
7161# Check whether --enable-profiling was given.
7162if test "${enable_profiling+set}" = set; then :
7163 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7164 yes | no)
7165 ;;
7166 *)
d0ac1c44 7167 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7168 esac
7169else
7170 enable_profiling=no
81ecdfbb 7171fi
bec39cab 7172
a9322a30
TT
7173
7174for ac_func in monstartup _mcleanup
81ecdfbb
RW
7175do :
7176 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7177ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7178if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
7179 cat >>confdefs.h <<_ACEOF
7180#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7181_ACEOF
a9322a30 7182
81ecdfbb
RW
7183fi
7184done
a9322a30 7185
81ecdfbb
RW
7186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7187$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 7188if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
7189 $as_echo_n "(cached) " >&6
7190else
7191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7192/* end confdefs.h. */
7193#include <stdlib.h>
5593a99a 7194 extern char _etext;
a9322a30
TT
7195int
7196main ()
7197{
7198free (&_etext);
5593a99a 7199
a9322a30
TT
7200 ;
7201 return 0;
7202}
bec39cab 7203_ACEOF
81ecdfbb 7204if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7205 ac_cv_var__etext=yes
bec39cab 7206else
81ecdfbb 7207 ac_cv_var__etext=no
5593a99a 7208
bec39cab 7209fi
81ecdfbb
RW
7210rm -f core conftest.err conftest.$ac_objext \
7211 conftest$ac_exeext conftest.$ac_ext
5593a99a 7212
bec39cab 7213fi
81ecdfbb
RW
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7215$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 7216if test "$ac_cv_var__etext" = yes; then
60ca704f 7217
81ecdfbb 7218$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7219
bec39cab 7220fi
81ecdfbb
RW
7221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7222$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7223if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7224 $as_echo_n "(cached) " >&6
bec39cab 7225else
81ecdfbb 7226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7227/* end confdefs.h. */
a9322a30 7228#include <stdlib.h>
5593a99a 7229 extern char etext;
bec39cab
AC
7230int
7231main ()
7232{
a9322a30 7233free (&etext);
5593a99a 7234
bec39cab
AC
7235 ;
7236 return 0;
7237}
7238_ACEOF
81ecdfbb 7239if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7240 ac_cv_var_etext=yes
bec39cab 7241else
81ecdfbb 7242 ac_cv_var_etext=no
5593a99a 7243
bec39cab 7244fi
81ecdfbb
RW
7245rm -f core conftest.err conftest.$ac_objext \
7246 conftest$ac_exeext conftest.$ac_ext
5593a99a 7247
bec39cab 7248fi
81ecdfbb
RW
7249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7250$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 7251if test "$ac_cv_var_etext" = yes; then
a9322a30 7252
81ecdfbb 7253$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7254
7255fi
a9322a30 7256if test "$enable_profiling" = yes ; then
0ad6b8ee 7257 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 7258 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7259 fi
7260 PROFILE_CFLAGS=-pg
7261 OLD_CFLAGS="$CFLAGS"
7262 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7263
81ecdfbb
RW
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7265$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7266if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7267 $as_echo_n "(cached) " >&6
bec39cab 7268else
81ecdfbb 7269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7270/* end confdefs.h. */
bec39cab
AC
7271
7272int
7273main ()
7274{
a9322a30 7275int x;
bec39cab
AC
7276 ;
7277 return 0;
7278}
7279_ACEOF
81ecdfbb 7280if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7281 ac_cv_cc_supports_pg=yes
bec39cab 7282else
81ecdfbb 7283 ac_cv_cc_supports_pg=no
5593a99a 7284
bec39cab 7285fi
81ecdfbb 7286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 7287
bec39cab 7288fi
81ecdfbb
RW
7289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7290$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7291
0ad6b8ee 7292 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7293 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7294 fi
bec39cab 7295
a9322a30 7296 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7297fi
7298
44cee4fd
TT
7299CODESIGN_CERT=
7300# Check whether --enable-codesign was given.
7301if test "${enable_codesign+set}" = set; then :
7302 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7303fi
7304
7305
7306
c16158bc
JM
7307
7308
81ecdfbb
RW
7309# Check whether --with-pkgversion was given.
7310if test "${with_pkgversion+set}" = set; then :
7311 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7312 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7313 no) PKGVERSION= ;;
7314 *) PKGVERSION="($withval) " ;;
7315 esac
7316else
7317 PKGVERSION="(GDB) "
7318
81ecdfbb 7319fi
c16158bc
JM
7320
7321
7322
7323
81ecdfbb
RW
7324
7325# Check whether --with-bugurl was given.
7326if test "${with_bugurl+set}" = set; then :
7327 withval=$with_bugurl; case "$withval" in
d0ac1c44 7328 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7329 no) BUGURL=
7330 ;;
7331 *) BUGURL="$withval"
7332 ;;
7333 esac
7334else
112c22ed 7335 BUGURL="https://www.gnu.org/software/gdb/bugs/"
c16158bc 7336
81ecdfbb
RW
7337fi
7338
c16158bc
JM
7339 case ${BUGURL} in
7340 "")
7341 REPORT_BUGS_TO=
7342 REPORT_BUGS_TEXI=
7343 ;;
7344 *)
7345 REPORT_BUGS_TO="<$BUGURL>"
7346 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7347 ;;
7348 esac;
7349
7350
7351
7352
7353cat >>confdefs.h <<_ACEOF
7354#define PKGVERSION "$PKGVERSION"
7355_ACEOF
7356
7357
7358cat >>confdefs.h <<_ACEOF
7359#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7360_ACEOF
7361
7362
bec39cab
AC
7363# --------------------- #
7364# Checks for programs. #
7365# --------------------- #
7366
7367for ac_prog in gawk mawk nawk awk
7368do
7369 # Extract the first word of "$ac_prog", so it can be a program name with args.
7370set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7373if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7374 $as_echo_n "(cached) " >&6
bec39cab
AC
7375else
7376 if test -n "$AWK"; then
7377 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7378else
7379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7380for as_dir in $PATH
7381do
7382 IFS=$as_save_IFS
7383 test -z "$as_dir" && as_dir=.
81ecdfbb 7384 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7385 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7386 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7387 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7388 break 2
7389 fi
7390done
81ecdfbb
RW
7391 done
7392IFS=$as_save_IFS
bec39cab
AC
7393
7394fi
7395fi
7396AWK=$ac_cv_prog_AWK
7397if test -n "$AWK"; then
81ecdfbb
RW
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7399$as_echo "$AWK" >&6; }
bec39cab 7400else
81ecdfbb
RW
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7402$as_echo "no" >&6; }
bec39cab
AC
7403fi
7404
bec39cab 7405
81ecdfbb 7406 test -n "$AWK" && break
bec39cab
AC
7407done
7408
c971b7fa
PA
7409# Find a good install program. We prefer a C program (faster),
7410# so one script is as good as another. But avoid the broken or
7411# incompatible versions:
7412# SysV /etc/install, /usr/sbin/install
7413# SunOS /usr/etc/install
7414# IRIX /sbin/install
7415# AIX /bin/install
7416# AmigaOS /C/install, which installs bootblocks on floppy discs
7417# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7418# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7419# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7420# OS/2's system install, which has a completely different semantic
7421# ./install, which can be erroneously created by make from ./install.sh.
7422# Reject install programs that cannot install multiple files.
7423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7424$as_echo_n "checking for a BSD-compatible install... " >&6; }
7425if test -z "$INSTALL"; then
d0ac1c44 7426if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7427 $as_echo_n "(cached) " >&6
7428else
7429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7430for as_dir in $PATH
7431do
7432 IFS=$as_save_IFS
7433 test -z "$as_dir" && as_dir=.
7434 # Account for people who put trailing slashes in PATH elements.
7435case $as_dir/ in #((
7436 ./ | .// | /[cC]/* | \
7437 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7438 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7439 /usr/ucb/* ) ;;
7440 *)
7441 # OSF1 and SCO ODT 3.0 have their own names for install.
7442 # Don't use installbsd from OSF since it installs stuff as root
7443 # by default.
7444 for ac_prog in ginstall scoinst install; do
7445 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7446 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7447 if test $ac_prog = install &&
7448 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7449 # AIX install. It has an incompatible calling convention.
7450 :
7451 elif test $ac_prog = install &&
7452 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7453 # program-specific install script used by HP pwplus--don't use.
7454 :
7455 else
7456 rm -rf conftest.one conftest.two conftest.dir
7457 echo one > conftest.one
7458 echo two > conftest.two
7459 mkdir conftest.dir
7460 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7461 test -s conftest.one && test -s conftest.two &&
7462 test -s conftest.dir/conftest.one &&
7463 test -s conftest.dir/conftest.two
7464 then
7465 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7466 break 3
7467 fi
7468 fi
7469 fi
7470 done
7471 done
7472 ;;
7473esac
7474
7475 done
7476IFS=$as_save_IFS
7477
7478rm -rf conftest.one conftest.two conftest.dir
7479
7480fi
7481 if test "${ac_cv_path_install+set}" = set; then
7482 INSTALL=$ac_cv_path_install
7483 else
7484 # As a last resort, use the slow shell script. Don't cache a
7485 # value for INSTALL within a source directory, because that will
7486 # break other packages using the cache if that directory is
7487 # removed, or if the value is a relative name.
7488 INSTALL=$ac_install_sh
7489 fi
7490fi
7491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7492$as_echo "$INSTALL" >&6; }
7493
7494# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7495# It thinks the first close brace ends the variable substitution.
7496test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7497
7498test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7499
7500test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7501
81ecdfbb
RW
7502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7503$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7504LN_S=$as_ln_s
7505if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7507$as_echo "yes" >&6; }
bec39cab 7508else
81ecdfbb
RW
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7510$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7511fi
7512
7513if test -n "$ac_tool_prefix"; then
7514 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7515set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7517$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7518if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7519 $as_echo_n "(cached) " >&6
bec39cab
AC
7520else
7521 if test -n "$RANLIB"; then
7522 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7523else
7524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7525for as_dir in $PATH
7526do
7527 IFS=$as_save_IFS
7528 test -z "$as_dir" && as_dir=.
81ecdfbb 7529 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7531 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7533 break 2
7534 fi
7535done
81ecdfbb
RW
7536 done
7537IFS=$as_save_IFS
bec39cab
AC
7538
7539fi
7540fi
7541RANLIB=$ac_cv_prog_RANLIB
7542if test -n "$RANLIB"; then
81ecdfbb
RW
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7544$as_echo "$RANLIB" >&6; }
bec39cab 7545else
81ecdfbb
RW
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547$as_echo "no" >&6; }
bec39cab
AC
7548fi
7549
81ecdfbb 7550
bec39cab
AC
7551fi
7552if test -z "$ac_cv_prog_RANLIB"; then
7553 ac_ct_RANLIB=$RANLIB
7554 # Extract the first word of "ranlib", so it can be a program name with args.
7555set dummy ranlib; ac_word=$2
81ecdfbb
RW
7556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7557$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7558if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7559 $as_echo_n "(cached) " >&6
bec39cab
AC
7560else
7561 if test -n "$ac_ct_RANLIB"; then
7562 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7563else
7564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7565for as_dir in $PATH
7566do
7567 IFS=$as_save_IFS
7568 test -z "$as_dir" && as_dir=.
81ecdfbb 7569 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7570 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7571 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7573 break 2
7574 fi
7575done
81ecdfbb
RW
7576 done
7577IFS=$as_save_IFS
bec39cab 7578
bec39cab
AC
7579fi
7580fi
7581ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7582if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7584$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7585else
81ecdfbb
RW
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587$as_echo "no" >&6; }
bec39cab
AC
7588fi
7589
81ecdfbb
RW
7590 if test "x$ac_ct_RANLIB" = x; then
7591 RANLIB=":"
7592 else
7593 case $cross_compiling:$ac_tool_warned in
7594yes:)
7595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7597ac_tool_warned=yes ;;
7598esac
7599 RANLIB=$ac_ct_RANLIB
7600 fi
bec39cab
AC
7601else
7602 RANLIB="$ac_cv_prog_RANLIB"
7603fi
7604
7605for ac_prog in 'bison -y' byacc
7606do
7607 # Extract the first word of "$ac_prog", so it can be a program name with args.
7608set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7610$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7611if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7612 $as_echo_n "(cached) " >&6
bec39cab
AC
7613else
7614 if test -n "$YACC"; then
7615 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7616else
7617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7618for as_dir in $PATH
7619do
7620 IFS=$as_save_IFS
7621 test -z "$as_dir" && as_dir=.
81ecdfbb 7622 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7624 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7625 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7626 break 2
7627 fi
7628done
81ecdfbb
RW
7629 done
7630IFS=$as_save_IFS
bec39cab
AC
7631
7632fi
7633fi
7634YACC=$ac_cv_prog_YACC
7635if test -n "$YACC"; then
81ecdfbb
RW
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7637$as_echo "$YACC" >&6; }
bec39cab 7638else
81ecdfbb
RW
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7640$as_echo "no" >&6; }
bec39cab
AC
7641fi
7642
81ecdfbb 7643
bec39cab
AC
7644 test -n "$YACC" && break
7645done
7646test -n "$YACC" || YACC="yacc"
7647
7648
7649if test -n "$ac_tool_prefix"; then
7650 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7651set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7653$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7654if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7655 $as_echo_n "(cached) " >&6
bec39cab
AC
7656else
7657 if test -n "$AR"; then
7658 ac_cv_prog_AR="$AR" # Let the user override the test.
7659else
7660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7661for as_dir in $PATH
7662do
7663 IFS=$as_save_IFS
7664 test -z "$as_dir" && as_dir=.
81ecdfbb 7665 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7667 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7669 break 2
7670 fi
7671done
81ecdfbb
RW
7672 done
7673IFS=$as_save_IFS
bec39cab
AC
7674
7675fi
7676fi
7677AR=$ac_cv_prog_AR
7678if test -n "$AR"; then
81ecdfbb
RW
7679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7680$as_echo "$AR" >&6; }
bec39cab 7681else
81ecdfbb
RW
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683$as_echo "no" >&6; }
bec39cab
AC
7684fi
7685
81ecdfbb 7686
bec39cab
AC
7687fi
7688if test -z "$ac_cv_prog_AR"; then
7689 ac_ct_AR=$AR
7690 # Extract the first word of "ar", so it can be a program name with args.
7691set dummy ar; ac_word=$2
81ecdfbb
RW
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7693$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7694if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7695 $as_echo_n "(cached) " >&6
bec39cab
AC
7696else
7697 if test -n "$ac_ct_AR"; then
7698 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7699else
7700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7701for as_dir in $PATH
7702do
7703 IFS=$as_save_IFS
7704 test -z "$as_dir" && as_dir=.
81ecdfbb 7705 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7707 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7709 break 2
7710 fi
7711done
81ecdfbb
RW
7712 done
7713IFS=$as_save_IFS
bec39cab
AC
7714
7715fi
7716fi
7717ac_ct_AR=$ac_cv_prog_ac_ct_AR
7718if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7720$as_echo "$ac_ct_AR" >&6; }
bec39cab 7721else
81ecdfbb
RW
7722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7723$as_echo "no" >&6; }
bec39cab
AC
7724fi
7725
81ecdfbb
RW
7726 if test "x$ac_ct_AR" = x; then
7727 AR=""
7728 else
7729 case $cross_compiling:$ac_tool_warned in
7730yes:)
7731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7733ac_tool_warned=yes ;;
7734esac
7735 AR=$ac_ct_AR
7736 fi
bec39cab
AC
7737else
7738 AR="$ac_cv_prog_AR"
7739fi
7740
7741if test -n "$ac_tool_prefix"; then
7742 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7743set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7745$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7746if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7747 $as_echo_n "(cached) " >&6
bec39cab
AC
7748else
7749 if test -n "$DLLTOOL"; then
7750 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7751else
7752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7753for as_dir in $PATH
7754do
7755 IFS=$as_save_IFS
7756 test -z "$as_dir" && as_dir=.
81ecdfbb 7757 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7759 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7761 break 2
7762 fi
7763done
81ecdfbb
RW
7764 done
7765IFS=$as_save_IFS
bec39cab
AC
7766
7767fi
7768fi
7769DLLTOOL=$ac_cv_prog_DLLTOOL
7770if test -n "$DLLTOOL"; then
81ecdfbb
RW
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7772$as_echo "$DLLTOOL" >&6; }
bec39cab 7773else
81ecdfbb
RW
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775$as_echo "no" >&6; }
bec39cab
AC
7776fi
7777
81ecdfbb 7778
bec39cab
AC
7779fi
7780if test -z "$ac_cv_prog_DLLTOOL"; then
7781 ac_ct_DLLTOOL=$DLLTOOL
7782 # Extract the first word of "dlltool", so it can be a program name with args.
7783set dummy dlltool; ac_word=$2
81ecdfbb
RW
7784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7785$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7786if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7787 $as_echo_n "(cached) " >&6
bec39cab
AC
7788else
7789 if test -n "$ac_ct_DLLTOOL"; then
7790 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7791else
7792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7793for as_dir in $PATH
7794do
7795 IFS=$as_save_IFS
7796 test -z "$as_dir" && as_dir=.
81ecdfbb 7797 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7799 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7801 break 2
7802 fi
7803done
81ecdfbb
RW
7804 done
7805IFS=$as_save_IFS
bec39cab
AC
7806
7807fi
7808fi
7809ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7810if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7812$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7813else
81ecdfbb
RW
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
bec39cab
AC
7816fi
7817
81ecdfbb
RW
7818 if test "x$ac_ct_DLLTOOL" = x; then
7819 DLLTOOL=""
7820 else
7821 case $cross_compiling:$ac_tool_warned in
7822yes:)
7823{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7824$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7825ac_tool_warned=yes ;;
7826esac
7827 DLLTOOL=$ac_ct_DLLTOOL
7828 fi
bec39cab
AC
7829else
7830 DLLTOOL="$ac_cv_prog_DLLTOOL"
7831fi
7832
7833if test -n "$ac_tool_prefix"; then
7834 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7835set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7837$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7838if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7839 $as_echo_n "(cached) " >&6
bec39cab
AC
7840else
7841 if test -n "$WINDRES"; then
7842 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7843else
7844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7845for as_dir in $PATH
7846do
7847 IFS=$as_save_IFS
7848 test -z "$as_dir" && as_dir=.
81ecdfbb 7849 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7851 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7853 break 2
7854 fi
7855done
81ecdfbb
RW
7856 done
7857IFS=$as_save_IFS
bec39cab
AC
7858
7859fi
7860fi
7861WINDRES=$ac_cv_prog_WINDRES
7862if test -n "$WINDRES"; then
81ecdfbb
RW
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7864$as_echo "$WINDRES" >&6; }
bec39cab 7865else
81ecdfbb
RW
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7867$as_echo "no" >&6; }
bec39cab
AC
7868fi
7869
81ecdfbb 7870
bec39cab
AC
7871fi
7872if test -z "$ac_cv_prog_WINDRES"; then
7873 ac_ct_WINDRES=$WINDRES
7874 # Extract the first word of "windres", so it can be a program name with args.
7875set dummy windres; ac_word=$2
81ecdfbb
RW
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7878if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7879 $as_echo_n "(cached) " >&6
bec39cab
AC
7880else
7881 if test -n "$ac_ct_WINDRES"; then
7882 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7883else
7884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885for as_dir in $PATH
7886do
7887 IFS=$as_save_IFS
7888 test -z "$as_dir" && as_dir=.
81ecdfbb 7889 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7891 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7893 break 2
7894 fi
7895done
81ecdfbb
RW
7896 done
7897IFS=$as_save_IFS
bec39cab
AC
7898
7899fi
7900fi
7901ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7902if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7904$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7905else
81ecdfbb
RW
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907$as_echo "no" >&6; }
c906108c 7908fi
bec39cab 7909
81ecdfbb
RW
7910 if test "x$ac_ct_WINDRES" = x; then
7911 WINDRES=""
7912 else
7913 case $cross_compiling:$ac_tool_warned in
7914yes:)
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7916$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7917ac_tool_warned=yes ;;
7918esac
7919 WINDRES=$ac_ct_WINDRES
7920 fi
c906108c 7921else
bec39cab 7922 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7923fi
7924
bec39cab 7925
036c3acb
TS
7926case $host_os in
7927 gnu*)
7928 # Needed for GNU Hurd hosts.
7929 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7930 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7931set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7934if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7935 $as_echo_n "(cached) " >&6
c906108c 7936else
bec39cab
AC
7937 if test -n "$MIG"; then
7938 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7939else
7940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7941for as_dir in $PATH
7942do
7943 IFS=$as_save_IFS
7944 test -z "$as_dir" && as_dir=.
81ecdfbb 7945 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7947 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7949 break 2
7950 fi
7951done
81ecdfbb
RW
7952 done
7953IFS=$as_save_IFS
bec39cab 7954
c906108c 7955fi
bec39cab
AC
7956fi
7957MIG=$ac_cv_prog_MIG
7958if test -n "$MIG"; then
81ecdfbb
RW
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7960$as_echo "$MIG" >&6; }
c906108c 7961else
81ecdfbb
RW
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7963$as_echo "no" >&6; }
c906108c
SS
7964fi
7965
81ecdfbb 7966
bec39cab
AC
7967fi
7968if test -z "$ac_cv_prog_MIG"; then
7969 ac_ct_MIG=$MIG
7970 # Extract the first word of "mig", so it can be a program name with args.
7971set dummy mig; ac_word=$2
81ecdfbb
RW
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7973$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7974if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7975 $as_echo_n "(cached) " >&6
bec39cab
AC
7976else
7977 if test -n "$ac_ct_MIG"; then
7978 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7979else
7980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7981for as_dir in $PATH
7982do
7983 IFS=$as_save_IFS
7984 test -z "$as_dir" && as_dir=.
81ecdfbb 7985 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7987 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7989 break 2
7990 fi
7991done
81ecdfbb
RW
7992 done
7993IFS=$as_save_IFS
c906108c 7994
bec39cab
AC
7995fi
7996fi
7997ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7998if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8000$as_echo "$ac_ct_MIG" >&6; }
bec39cab 8001else
81ecdfbb
RW
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003$as_echo "no" >&6; }
bec39cab 8004fi
c906108c 8005
81ecdfbb
RW
8006 if test "x$ac_ct_MIG" = x; then
8007 MIG=""
8008 else
8009 case $cross_compiling:$ac_tool_warned in
8010yes:)
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8012$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8013ac_tool_warned=yes ;;
8014esac
8015 MIG=$ac_ct_MIG
8016 fi
bec39cab
AC
8017else
8018 MIG="$ac_cv_prog_MIG"
8019fi
c906108c 8020
036c3acb 8021 if test x"$MIG" = x; then
d0ac1c44 8022 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
8023 fi
8024 ;;
8025esac
c906108c 8026
bec39cab
AC
8027# ---------------------- #
8028# Checks for libraries. #
8029# ---------------------- #
c906108c 8030
bec39cab 8031# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8033$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 8034if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 8035 $as_echo_n "(cached) " >&6
bec39cab
AC
8036else
8037 ac_check_lib_save_LIBS=$LIBS
8038LIBS="-lm $LIBS"
81ecdfbb 8039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8040/* end confdefs.h. */
c906108c 8041
c906108c 8042
bec39cab
AC
8043int
8044main ()
8045{
81ecdfbb 8046return main ();
bec39cab
AC
8047 ;
8048 return 0;
8049}
8050_ACEOF
81ecdfbb 8051if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8052 ac_cv_lib_m_main=yes
8053else
81ecdfbb 8054 ac_cv_lib_m_main=no
bec39cab 8055fi
81ecdfbb
RW
8056rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8058LIBS=$ac_check_lib_save_LIBS
8059fi
81ecdfbb
RW
8060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8061$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 8062if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
8063 cat >>confdefs.h <<_ACEOF
8064#define HAVE_LIBM 1
8065_ACEOF
8066
8067 LIBS="-lm $LIBS"
c906108c 8068
c906108c 8069fi
bec39cab
AC
8070
8071
bec39cab 8072# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8074$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 8075if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 8076 $as_echo_n "(cached) " >&6
bec39cab
AC
8077else
8078 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8080/* end confdefs.h. */
ddc9cd0f 8081
81ecdfbb
RW
8082/* Override any GCC internal prototype to avoid an error.
8083 Use char because int might match the return type of a GCC
8084 builtin and then its argument prototype would still apply. */
bec39cab
AC
8085#ifdef __cplusplus
8086extern "C"
8087#endif
bec39cab
AC
8088char gethostbyname ();
8089int
8090main ()
8091{
81ecdfbb 8092return gethostbyname ();
bec39cab
AC
8093 ;
8094 return 0;
8095}
8096_ACEOF
81ecdfbb
RW
8097for ac_lib in '' nsl; do
8098 if test -z "$ac_lib"; then
8099 ac_res="none required"
8100 else
8101 ac_res=-l$ac_lib
b4e70030 8102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8103 fi
8104 if ac_fn_c_try_link "$LINENO"; then :
8105 ac_cv_search_gethostbyname=$ac_res
8106fi
8107rm -f core conftest.err conftest.$ac_objext \
8108 conftest$ac_exeext
d0ac1c44 8109 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
8110 break
8111fi
8112done
d0ac1c44 8113if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 8114
bec39cab 8115else
81ecdfbb 8116 ac_cv_search_gethostbyname=no
bec39cab 8117fi
81ecdfbb 8118rm conftest.$ac_ext
bec39cab
AC
8119LIBS=$ac_func_search_save_LIBS
8120fi
81ecdfbb
RW
8121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8122$as_echo "$ac_cv_search_gethostbyname" >&6; }
8123ac_res=$ac_cv_search_gethostbyname
8124if test "$ac_res" != no; then :
8125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8126
bec39cab 8127fi
96baa820 8128
c906108c 8129
b4e70030 8130# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8132$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 8133if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 8134 $as_echo_n "(cached) " >&6
b4e70030
JB
8135else
8136 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8138/* end confdefs.h. */
8139
81ecdfbb
RW
8140/* Override any GCC internal prototype to avoid an error.
8141 Use char because int might match the return type of a GCC
8142 builtin and then its argument prototype would still apply. */
b4e70030
JB
8143#ifdef __cplusplus
8144extern "C"
8145#endif
b4e70030
JB
8146char socketpair ();
8147int
8148main ()
8149{
81ecdfbb 8150return socketpair ();
b4e70030
JB
8151 ;
8152 return 0;
8153}
8154_ACEOF
81ecdfbb
RW
8155for ac_lib in '' socket; do
8156 if test -z "$ac_lib"; then
8157 ac_res="none required"
8158 else
8159 ac_res=-l$ac_lib
b4e70030 8160 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8161 fi
8162 if ac_fn_c_try_link "$LINENO"; then :
8163 ac_cv_search_socketpair=$ac_res
8164fi
8165rm -f core conftest.err conftest.$ac_objext \
8166 conftest$ac_exeext
d0ac1c44 8167 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
8168 break
8169fi
8170done
d0ac1c44 8171if ${ac_cv_search_socketpair+:} false; then :
b4e70030 8172
b4e70030 8173else
81ecdfbb 8174 ac_cv_search_socketpair=no
b4e70030 8175fi
81ecdfbb 8176rm conftest.$ac_ext
b4e70030
JB
8177LIBS=$ac_func_search_save_LIBS
8178fi
81ecdfbb
RW
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8180$as_echo "$ac_cv_search_socketpair" >&6; }
8181ac_res=$ac_cv_search_socketpair
8182if test "$ac_res" != no; then :
8183 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8184
8185fi
8186
8187
233a11ab 8188# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 8189
711a72d3 8190 # Use the system's zlib library.
39f3de7c
L
8191 zlibdir="-L\$(top_builddir)/../zlib"
8192 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 8193
711a72d3
L
8194# Check whether --with-system-zlib was given.
8195if test "${with_system_zlib+set}" = set; then :
afa59b79
L
8196 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8197 zlibdir=
8198 zlibinc=
8199 fi
b040ad30 8200
233a11ab 8201fi
233a11ab 8202
233a11ab 8203
233a11ab 8204
b040ad30 8205
233a11ab 8206
77f120bf 8207
016a3251
DD
8208 if test "X$prefix" = "XNONE"; then
8209 acl_final_prefix="$ac_default_prefix"
8210 else
8211 acl_final_prefix="$prefix"
8212 fi
8213 if test "X$exec_prefix" = "XNONE"; then
8214 acl_final_exec_prefix='${prefix}'
8215 else
8216 acl_final_exec_prefix="$exec_prefix"
8217 fi
8218 acl_save_prefix="$prefix"
8219 prefix="$acl_final_prefix"
8220 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8221 prefix="$acl_save_prefix"
8222
8223
8224# Check whether --with-gnu-ld was given.
8225if test "${with_gnu_ld+set}" = set; then :
8226 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8227else
8228 with_gnu_ld=no
8229fi
8230
8231# Prepare PATH_SEPARATOR.
8232# The user is always right.
8233if test "${PATH_SEPARATOR+set}" != set; then
8234 echo "#! /bin/sh" >conf$$.sh
8235 echo "exit 0" >>conf$$.sh
8236 chmod +x conf$$.sh
8237 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8238 PATH_SEPARATOR=';'
8239 else
8240 PATH_SEPARATOR=:
8241 fi
8242 rm -f conf$$.sh
8243fi
8244ac_prog=ld
8245if test "$GCC" = yes; then
8246 # Check if gcc -print-prog-name=ld gives a path.
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8248$as_echo_n "checking for ld used by GCC... " >&6; }
8249 case $host in
8250 *-*-mingw*)
8251 # gcc leaves a trailing carriage return which upsets mingw
8252 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8253 *)
8254 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8255 esac
8256 case $ac_prog in
8257 # Accept absolute paths.
8258 [\\/]* | [A-Za-z]:[\\/]*)
8259 re_direlt='/[^/][^/]*/\.\./'
8260 # Canonicalize the path of ld
8261 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8262 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8263 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8264 done
8265 test -z "$LD" && LD="$ac_prog"
8266 ;;
8267 "")
8268 # If it fails, then pretend we aren't using GCC.
8269 ac_prog=ld
8270 ;;
8271 *)
8272 # If it is relative, then search for the first ld in PATH.
8273 with_gnu_ld=unknown
8274 ;;
8275 esac
8276elif test "$with_gnu_ld" = yes; then
8277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8278$as_echo_n "checking for GNU ld... " >&6; }
8279else
8280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8281$as_echo_n "checking for non-GNU ld... " >&6; }
8282fi
d0ac1c44 8283if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8284 $as_echo_n "(cached) " >&6
8285else
8286 if test -z "$LD"; then
8287 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8288 for ac_dir in $PATH; do
8289 test -z "$ac_dir" && ac_dir=.
8290 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8291 acl_cv_path_LD="$ac_dir/$ac_prog"
8292 # Check to see if the program is GNU ld. I'd rather use --version,
8293 # but apparently some GNU ld's only accept -v.
8294 # Break only if it was the GNU/non-GNU ld that we prefer.
8295 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8296 test "$with_gnu_ld" != no && break
8297 else
8298 test "$with_gnu_ld" != yes && break
8299 fi
8300 fi
8301 done
8302 IFS="$ac_save_ifs"
8303else
8304 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8305fi
8306fi
8307
8308LD="$acl_cv_path_LD"
8309if test -n "$LD"; then
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8311$as_echo "$LD" >&6; }
8312else
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8314$as_echo "no" >&6; }
8315fi
d0ac1c44 8316test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8318$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8319if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8320 $as_echo_n "(cached) " >&6
8321else
8322 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8323if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8324 acl_cv_prog_gnu_ld=yes
8325else
8326 acl_cv_prog_gnu_ld=no
8327fi
8328fi
8329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8330$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8331with_gnu_ld=$acl_cv_prog_gnu_ld
8332
8333
8334
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8336$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8337if ${acl_cv_rpath+:} false; then :
016a3251
DD
8338 $as_echo_n "(cached) " >&6
8339else
8340
8341 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8342 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8343 . ./conftest.sh
8344 rm -f ./conftest.sh
8345 acl_cv_rpath=done
8346
8347fi
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8349$as_echo "$acl_cv_rpath" >&6; }
8350 wl="$acl_cv_wl"
8351 libext="$acl_cv_libext"
8352 shlibext="$acl_cv_shlibext"
8353 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8354 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8355 hardcode_direct="$acl_cv_hardcode_direct"
8356 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8357 # Check whether --enable-rpath was given.
8358if test "${enable_rpath+set}" = set; then :
8359 enableval=$enable_rpath; :
8360else
8361 enable_rpath=yes
8362fi
8363
8364
8365
8366
8367
8368
8369
8370
8371 use_additional=yes
8372
8373 acl_save_prefix="$prefix"
8374 prefix="$acl_final_prefix"
8375 acl_save_exec_prefix="$exec_prefix"
8376 exec_prefix="$acl_final_exec_prefix"
8377
8378 eval additional_includedir=\"$includedir\"
8379 eval additional_libdir=\"$libdir\"
8380
8381 exec_prefix="$acl_save_exec_prefix"
8382 prefix="$acl_save_prefix"
77f120bf 8383
6c7a06a3 8384
81ecdfbb
RW
8385# Check whether --with-libiconv-prefix was given.
8386if test "${with_libiconv_prefix+set}" = set; then :
8387 withval=$with_libiconv_prefix;
016a3251
DD
8388 if test "X$withval" = "Xno"; then
8389 use_additional=no
8390 else
8391 if test "X$withval" = "X"; then
8392
8393 acl_save_prefix="$prefix"
8394 prefix="$acl_final_prefix"
8395 acl_save_exec_prefix="$exec_prefix"
8396 exec_prefix="$acl_final_exec_prefix"
8397
8398 eval additional_includedir=\"$includedir\"
8399 eval additional_libdir=\"$libdir\"
8400
8401 exec_prefix="$acl_save_exec_prefix"
8402 prefix="$acl_save_prefix"
8403
8404 else
8405 additional_includedir="$withval/include"
8406 additional_libdir="$withval/lib"
8407 fi
8408 fi
6c7a06a3 8409
81ecdfbb
RW
8410fi
8411
9f1528a1
AB
8412
8413# Check whether --with-libiconv-type was given.
8414if test "${with_libiconv_type+set}" = set; then :
8415 withval=$with_libiconv_type; with_libiconv_type=$withval
8416else
8417 with_libiconv_type=auto
8418fi
8419
8420 lib_type=`eval echo \$with_libiconv_type`
8421
016a3251
DD
8422 LIBICONV=
8423 LTLIBICONV=
8424 INCICONV=
8425 rpathdirs=
8426 ltrpathdirs=
8427 names_already_handled=
8428 names_next_round='iconv '
8429 while test -n "$names_next_round"; do
8430 names_this_round="$names_next_round"
8431 names_next_round=
8432 for name in $names_this_round; do
8433 already_handled=
8434 for n in $names_already_handled; do
8435 if test "$n" = "$name"; then
8436 already_handled=yes
8437 break
8438 fi
8439 done
8440 if test -z "$already_handled"; then
8441 names_already_handled="$names_already_handled $name"
8442 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8443 eval value=\"\$HAVE_LIB$uppername\"
8444 if test -n "$value"; then
8445 if test "$value" = yes; then
8446 eval value=\"\$LIB$uppername\"
8447 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8448 eval value=\"\$LTLIB$uppername\"
8449 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8450 else
8451 :
8452 fi
8453 else
8454 found_dir=
8455 found_la=
8456 found_so=
8457 found_a=
8458 if test $use_additional = yes; then
9f1528a1 8459 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8460 found_dir="$additional_libdir"
8461 found_so="$additional_libdir/lib$name.$shlibext"
8462 if test -f "$additional_libdir/lib$name.la"; then
8463 found_la="$additional_libdir/lib$name.la"
8464 fi
9f1528a1 8465 elif test x$lib_type != xshared; then
016a3251
DD
8466 if test -f "$additional_libdir/lib$name.$libext"; then
8467 found_dir="$additional_libdir"
8468 found_a="$additional_libdir/lib$name.$libext"
8469 if test -f "$additional_libdir/lib$name.la"; then
8470 found_la="$additional_libdir/lib$name.la"
8471 fi
8472 fi
8473 fi
8474 fi
8475 if test "X$found_dir" = "X"; then
8476 for x in $LDFLAGS $LTLIBICONV; do
8477
8478 acl_save_prefix="$prefix"
8479 prefix="$acl_final_prefix"
8480 acl_save_exec_prefix="$exec_prefix"
8481 exec_prefix="$acl_final_exec_prefix"
8482 eval x=\"$x\"
8483 exec_prefix="$acl_save_exec_prefix"
8484 prefix="$acl_save_prefix"
8485
8486 case "$x" in
8487 -L*)
8488 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8489 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8490 found_dir="$dir"
8491 found_so="$dir/lib$name.$shlibext"
8492 if test -f "$dir/lib$name.la"; then
8493 found_la="$dir/lib$name.la"
8494 fi
9f1528a1 8495 elif test x$lib_type != xshared; then
016a3251
DD
8496 if test -f "$dir/lib$name.$libext"; then
8497 found_dir="$dir"
8498 found_a="$dir/lib$name.$libext"
8499 if test -f "$dir/lib$name.la"; then
8500 found_la="$dir/lib$name.la"
8501 fi
8502 fi
8503 fi
8504 ;;
8505 esac
8506 if test "X$found_dir" != "X"; then
8507 break
8508 fi
8509 done
8510 fi
8511 if test "X$found_dir" != "X"; then
8512 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8513 if test "X$found_so" != "X"; then
8514 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8515 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8516 else
8517 haveit=
8518 for x in $ltrpathdirs; do
8519 if test "X$x" = "X$found_dir"; then
8520 haveit=yes
8521 break
8522 fi
8523 done
8524 if test -z "$haveit"; then
8525 ltrpathdirs="$ltrpathdirs $found_dir"
8526 fi
8527 if test "$hardcode_direct" = yes; then
8528 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8529 else
8530 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8531 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8532 haveit=
8533 for x in $rpathdirs; do
8534 if test "X$x" = "X$found_dir"; then
8535 haveit=yes
8536 break
8537 fi
8538 done
8539 if test -z "$haveit"; then
8540 rpathdirs="$rpathdirs $found_dir"
8541 fi
8542 else
8543 haveit=
8544 for x in $LDFLAGS $LIBICONV; do
8545
8546 acl_save_prefix="$prefix"
8547 prefix="$acl_final_prefix"
8548 acl_save_exec_prefix="$exec_prefix"
8549 exec_prefix="$acl_final_exec_prefix"
8550 eval x=\"$x\"
8551 exec_prefix="$acl_save_exec_prefix"
8552 prefix="$acl_save_prefix"
8553
8554 if test "X$x" = "X-L$found_dir"; then
8555 haveit=yes
8556 break
8557 fi
8558 done
8559 if test -z "$haveit"; then
8560 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8561 fi
8562 if test "$hardcode_minus_L" != no; then
8563 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8564 else
8565 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8566 fi
8567 fi
8568 fi
8569 fi
8570 else
8571 if test "X$found_a" != "X"; then
8572 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8573 else
8574 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8575 fi
8576 fi
8577 additional_includedir=
8578 case "$found_dir" in
8579 */lib | */lib/)
8580 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8581 additional_includedir="$basedir/include"
8582 ;;
8583 esac
8584 if test "X$additional_includedir" != "X"; then
8585 if test "X$additional_includedir" != "X/usr/include"; then
8586 haveit=
8587 if test "X$additional_includedir" = "X/usr/local/include"; then
8588 if test -n "$GCC"; then
8589 case $host_os in
8590 linux*) haveit=yes;;
8591 esac
8592 fi
8593 fi
8594 if test -z "$haveit"; then
8595 for x in $CPPFLAGS $INCICONV; do
8596
8597 acl_save_prefix="$prefix"
8598 prefix="$acl_final_prefix"
8599 acl_save_exec_prefix="$exec_prefix"
8600 exec_prefix="$acl_final_exec_prefix"
8601 eval x=\"$x\"
8602 exec_prefix="$acl_save_exec_prefix"
8603 prefix="$acl_save_prefix"
8604
8605 if test "X$x" = "X-I$additional_includedir"; then
8606 haveit=yes
8607 break
8608 fi
8609 done
8610 if test -z "$haveit"; then
8611 if test -d "$additional_includedir"; then
8612 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8613 fi
8614 fi
8615 fi
8616 fi
8617 fi
8618 if test -n "$found_la"; then
8619 save_libdir="$libdir"
8620 case "$found_la" in
8621 */* | *\\*) . "$found_la" ;;
8622 *) . "./$found_la" ;;
8623 esac
8624 libdir="$save_libdir"
8625 for dep in $dependency_libs; do
8626 case "$dep" in
8627 -L*)
8628 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8629 if test "X$additional_libdir" != "X/usr/lib"; then
8630 haveit=
8631 if test "X$additional_libdir" = "X/usr/local/lib"; then
8632 if test -n "$GCC"; then
8633 case $host_os in
8634 linux*) haveit=yes;;
8635 esac
8636 fi
8637 fi
8638 if test -z "$haveit"; then
8639 haveit=
8640 for x in $LDFLAGS $LIBICONV; do
8641
8642 acl_save_prefix="$prefix"
8643 prefix="$acl_final_prefix"
8644 acl_save_exec_prefix="$exec_prefix"
8645 exec_prefix="$acl_final_exec_prefix"
8646 eval x=\"$x\"
8647 exec_prefix="$acl_save_exec_prefix"
8648 prefix="$acl_save_prefix"
8649
8650 if test "X$x" = "X-L$additional_libdir"; then
8651 haveit=yes
8652 break
8653 fi
8654 done
8655 if test -z "$haveit"; then
8656 if test -d "$additional_libdir"; then
8657 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8658 fi
8659 fi
8660 haveit=
8661 for x in $LDFLAGS $LTLIBICONV; do
8662
8663 acl_save_prefix="$prefix"
8664 prefix="$acl_final_prefix"
8665 acl_save_exec_prefix="$exec_prefix"
8666 exec_prefix="$acl_final_exec_prefix"
8667 eval x=\"$x\"
8668 exec_prefix="$acl_save_exec_prefix"
8669 prefix="$acl_save_prefix"
8670
8671 if test "X$x" = "X-L$additional_libdir"; then
8672 haveit=yes
8673 break
8674 fi
8675 done
8676 if test -z "$haveit"; then
8677 if test -d "$additional_libdir"; then
8678 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8679 fi
8680 fi
8681 fi
8682 fi
8683 ;;
8684 -R*)
8685 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8686 if test "$enable_rpath" != no; then
8687 haveit=
8688 for x in $rpathdirs; do
8689 if test "X$x" = "X$dir"; then
8690 haveit=yes
8691 break
8692 fi
8693 done
8694 if test -z "$haveit"; then
8695 rpathdirs="$rpathdirs $dir"
8696 fi
8697 haveit=
8698 for x in $ltrpathdirs; do
8699 if test "X$x" = "X$dir"; then
8700 haveit=yes
8701 break
8702 fi
8703 done
8704 if test -z "$haveit"; then
8705 ltrpathdirs="$ltrpathdirs $dir"
8706 fi
8707 fi
8708 ;;
8709 -l*)
8710 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8711 ;;
8712 *.la)
8713 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8714 ;;
8715 *)
8716 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8717 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8718 ;;
8719 esac
8720 done
8721 fi
8722 else
9f1528a1
AB
8723 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8724 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8725 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8726 else
8727 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8728 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8729 fi
016a3251
DD
8730 fi
8731 fi
8732 fi
8733 done
8734 done
8735 if test "X$rpathdirs" != "X"; then
8736 if test -n "$hardcode_libdir_separator"; then
8737 alldirs=
8738 for found_dir in $rpathdirs; do
8739 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8740 done
8741 acl_save_libdir="$libdir"
8742 libdir="$alldirs"
8743 eval flag=\"$hardcode_libdir_flag_spec\"
8744 libdir="$acl_save_libdir"
8745 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8746 else
8747 for found_dir in $rpathdirs; do
8748 acl_save_libdir="$libdir"
8749 libdir="$found_dir"
8750 eval flag=\"$hardcode_libdir_flag_spec\"
8751 libdir="$acl_save_libdir"
8752 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8753 done
8754 fi
8755 fi
8756 if test "X$ltrpathdirs" != "X"; then
8757 for found_dir in $ltrpathdirs; do
8758 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8759 done
8760 fi
8761
8762
8763
8764
8765
6c7a06a3 8766
6c7a06a3 8767
81ecdfbb
RW
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8769$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8770if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8771 $as_echo_n "(cached) " >&6
d542061a 8772else
6c7a06a3
TT
8773
8774 am_cv_func_iconv="no, consider installing GNU libiconv"
8775 am_cv_lib_iconv=no
016a3251
DD
8776 am_save_CPPFLAGS="$CPPFLAGS"
8777 CPPFLAGS="$CPPFLAGS $INCICONV"
8778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8779/* end confdefs.h. */
6c7a06a3
TT
8780#include <stdlib.h>
8781#include <iconv.h>
d542061a
UW
8782int
8783main ()
8784{
6c7a06a3 8785iconv_t cd = iconv_open("","");
016a3251
DD
8786 iconv(cd,NULL,NULL,NULL,NULL);
8787 iconv_close(cd);
d542061a
UW
8788 ;
8789 return 0;
8790}
8791_ACEOF
81ecdfbb 8792if ac_fn_c_try_link "$LINENO"; then :
016a3251 8793 am_cv_func_iconv=yes
d542061a 8794fi
81ecdfbb
RW
8795rm -f core conftest.err conftest.$ac_objext \
8796 conftest$ac_exeext conftest.$ac_ext
016a3251 8797 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8798
016a3251
DD
8799 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8800 for _libs in .libs _libs; do
8801 am_save_CPPFLAGS="$CPPFLAGS"
8802 am_save_LIBS="$LIBS"
8803 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8804 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8806/* end confdefs.h. */
6c7a06a3
TT
8807#include <stdlib.h>
8808#include <iconv.h>
d542061a
UW
8809int
8810main ()
8811{
6c7a06a3 8812iconv_t cd = iconv_open("","");
016a3251
DD
8813 iconv(cd,NULL,NULL,NULL,NULL);
8814 iconv_close(cd);
d542061a
UW
8815 ;
8816 return 0;
8817}
8818_ACEOF
81ecdfbb 8819if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8820 INCICONV="-I../libiconv/include"
8821 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8822 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8823 am_cv_lib_iconv=yes
8824 am_cv_func_iconv=yes
d542061a 8825fi
81ecdfbb
RW
8826rm -f core conftest.err conftest.$ac_objext \
8827 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8828 CPPFLAGS="$am_save_CPPFLAGS"
8829 LIBS="$am_save_LIBS"
8830 if test "$am_cv_func_iconv" = "yes"; then
8831 break
8832 fi
8833 done
77f120bf 8834 fi
94ae1714 8835
4edb1e84 8836 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8837 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8838 am_save_LIBS="$LIBS"
5d762de0 8839 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8840 LIBS="$LIBS $LIBICONV"
81ecdfbb 8841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8842/* end confdefs.h. */
6c7a06a3
TT
8843#include <stdlib.h>
8844#include <iconv.h>
bec39cab
AC
8845int
8846main ()
8847{
6c7a06a3
TT
8848iconv_t cd = iconv_open("","");
8849 iconv(cd,NULL,NULL,NULL,NULL);
8850 iconv_close(cd);
bec39cab
AC
8851 ;
8852 return 0;
8853}
8854_ACEOF
81ecdfbb 8855if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8856 am_cv_lib_iconv=yes
6c7a06a3 8857 am_cv_func_iconv=yes
627af7ea 8858fi
81ecdfbb
RW
8859rm -f core conftest.err conftest.$ac_objext \
8860 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8861 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8862 LIBS="$am_save_LIBS"
6c7a06a3
TT
8863 fi
8864
8865fi
81ecdfbb
RW
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8867$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8868 if test "$am_cv_func_iconv" = yes; then
8869
8870$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8871
016a3251 8872 fi
fc3b640d 8873 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8874
8875 for element in $INCICONV; do
8876 haveit=
8877 for x in $CPPFLAGS; do
8878
8879 acl_save_prefix="$prefix"
8880 prefix="$acl_final_prefix"
8881 acl_save_exec_prefix="$exec_prefix"
8882 exec_prefix="$acl_final_exec_prefix"
8883 eval x=\"$x\"
8884 exec_prefix="$acl_save_exec_prefix"
8885 prefix="$acl_save_prefix"
8886
8887 if test "X$x" = "X$element"; then
8888 haveit=yes
8889 break
8890 fi
8891 done
8892 if test -z "$haveit"; then
8893 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8894 fi
8895 done
8896
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8898$as_echo_n "checking how to link with libiconv... " >&6; }
8899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8900$as_echo "$LIBICONV" >&6; }
94ae1714 8901 else
016a3251
DD
8902 LIBICONV=
8903 LTLIBICONV=
fc3b640d 8904 fi
94ae1714 8905
6c7a06a3 8906
6c7a06a3 8907
016a3251 8908 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8910$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8911 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8912 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8913else
8914
81ecdfbb 8915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8916/* end confdefs.h. */
8917
6c7a06a3
TT
8918#include <stdlib.h>
8919#include <iconv.h>
8920extern
b4e70030 8921#ifdef __cplusplus
6c7a06a3 8922"C"
b4e70030 8923#endif
6c7a06a3
TT
8924#if defined(__STDC__) || defined(__cplusplus)
8925size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8926#else
8927size_t iconv();
8928#endif
8929
b4e70030
JB
8930int
8931main ()
8932{
6c7a06a3 8933
b4e70030
JB
8934 ;
8935 return 0;
8936}
8937_ACEOF
81ecdfbb 8938if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8939 am_cv_proto_iconv_arg1=""
4e8d927d 8940else
81ecdfbb 8941 am_cv_proto_iconv_arg1="const"
b4e70030 8942fi
81ecdfbb 8943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8944 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);"
8945fi
8946
8947 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8949 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8950$as_echo "${ac_t:-
8951 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8952
8953cat >>confdefs.h <<_ACEOF
8954#define ICONV_CONST $am_cv_proto_iconv_arg1
8955_ACEOF
8956
8957 fi
6c7a06a3
TT
8958
8959
478aac75
DE
8960# GDB may fork/exec the iconv program to get the list of supported character
8961# sets. Allow the user to specify where to find it.
8962# There are several factors affecting the choice of option name:
8963# - There is already --with-libiconv-prefix but we can't use it, it specifies
8964# the build-time location of libiconv files.
8965# - The program we need to find is iconv, which comes with glibc. The user
8966# doesn't necessarily have libiconv installed. Therefore naming this
8967# --with-libiconv-foo feels wrong.
8968# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8969# defined to work on directories not files (though it really doesn't know
8970# the difference).
8971# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8972# with --with-libiconv-prefix.
8973# Putting these together is why the option name is --with-iconv-bin.
8974
8975
8976# Check whether --with-iconv-bin was given.
8977if test "${with_iconv_bin+set}" = set; then :
8978 withval=$with_iconv_bin; iconv_bin="${withval}"
8979
8980cat >>confdefs.h <<_ACEOF
8981#define ICONV_BIN "${iconv_bin}"
8982_ACEOF
8983
8984
8985 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8986 if test "x$prefix" = xNONE; then
8987 test_prefix=/usr/local
8988 else
8989 test_prefix=$prefix
8990 fi
8991 else
8992 test_prefix=$exec_prefix
8993 fi
8994 value=0
8995 case ${iconv_bin} in
8996 "${test_prefix}"|"${test_prefix}/"*|\
8997 '${exec_prefix}'|'${exec_prefix}/'*)
8998 value=1
8999 ;;
9000 esac
9001
9002cat >>confdefs.h <<_ACEOF
9003#define ICONV_BIN_RELOCATABLE $value
9004_ACEOF
9005
9006
9007
9008fi
9009
9010
cb01cfba 9011# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9012if test x"$enable_tui" != xno; then
cb01cfba
JB
9013 prefer_curses=yes
9014fi
9015
9016curses_found=no
9017if test x"$prefer_curses" = xyes; then
9018 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9019 # curses library because the latter might not provide all the
9020 # functionality we need. However, this leads to problems on systems
9021 # where the linker searches /usr/local/lib, but the compiler doesn't
9022 # search /usr/local/include, if ncurses is installed in /usr/local. A
9023 # default installation of ncurses on alpha*-dec-osf* will lead to such
9024 # a situation.
81ecdfbb
RW
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9026$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 9027if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9028 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9029else
9030 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9032/* end confdefs.h. */
9033
81ecdfbb
RW
9034/* Override any GCC internal prototype to avoid an error.
9035 Use char because int might match the return type of a GCC
9036 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9037#ifdef __cplusplus
9038extern "C"
9039#endif
6c7a06a3
TT
9040char waddstr ();
9041int
9042main ()
9043{
81ecdfbb 9044return waddstr ();
6c7a06a3
TT
9045 ;
9046 return 0;
9047}
9048_ACEOF
5007d765 9049for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
9050 if test -z "$ac_lib"; then
9051 ac_res="none required"
9052 else
9053 ac_res=-l$ac_lib
9054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9055 fi
9056 if ac_fn_c_try_link "$LINENO"; then :
9057 ac_cv_search_waddstr=$ac_res
9058fi
9059rm -f core conftest.err conftest.$ac_objext \
9060 conftest$ac_exeext
d0ac1c44 9061 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
9062 break
9063fi
9064done
d0ac1c44 9065if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9066
6c7a06a3 9067else
81ecdfbb
RW
9068 ac_cv_search_waddstr=no
9069fi
9070rm conftest.$ac_ext
9071LIBS=$ac_func_search_save_LIBS
9072fi
9073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9074$as_echo "$ac_cv_search_waddstr" >&6; }
9075ac_res=$ac_cv_search_waddstr
9076if test "$ac_res" != no; then :
9077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9078
9079fi
9080
9081
cb01cfba
JB
9082 if test "$ac_cv_search_waddstr" != no; then
9083 curses_found=yes
9084 fi
9085fi
9086
9087# Check whether we should enable the TUI, but only do so if we really
9088# can.
9089if test x"$enable_tui" != xno; then
0ad6b8ee 9090 if test -d "$srcdir/tui"; then
cb01cfba 9091 if test "$curses_found" != no; then
6c7a06a3
TT
9092 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9093 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9094 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9095 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9096 else
9097 if test x"$enable_tui" = xyes; then
d0ac1c44 9098 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9099 else
81ecdfbb
RW
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9101$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9102 fi
9103 fi
9104 fi
9105fi
9106
9107# Since GDB uses Readline, we need termcap functionality. In many
9108# cases this will be provided by the curses library, but some systems
96fe4562 9109# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
9110
9111case $host_os in
9112 cygwin*)
0ad6b8ee 9113 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
9114 LIBS="../libtermcap/libtermcap.a $LIBS"
9115 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9116 fi ;;
9117 go32* | *djgpp*)
9118 ac_cv_search_tgetent="none required"
9119 ;;
6c7a06a3
TT
9120esac
9121
9122# These are the libraries checked by Readline.
81ecdfbb
RW
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9124$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9125if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9126 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9127else
9128 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9130/* end confdefs.h. */
9131
81ecdfbb
RW
9132/* Override any GCC internal prototype to avoid an error.
9133 Use char because int might match the return type of a GCC
9134 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9135#ifdef __cplusplus
9136extern "C"
9137#endif
6c7a06a3
TT
9138char tgetent ();
9139int
9140main ()
9141{
81ecdfbb 9142return tgetent ();
6c7a06a3
TT
9143 ;
9144 return 0;
9145}
9146_ACEOF
2578ecb1 9147for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9148 if test -z "$ac_lib"; then
9149 ac_res="none required"
9150 else
9151 ac_res=-l$ac_lib
6c7a06a3 9152 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9153 fi
9154 if ac_fn_c_try_link "$LINENO"; then :
9155 ac_cv_search_tgetent=$ac_res
9156fi
9157rm -f core conftest.err conftest.$ac_objext \
9158 conftest$ac_exeext
d0ac1c44 9159 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9160 break
9161fi
9162done
d0ac1c44 9163if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9164
6c7a06a3 9165else
81ecdfbb 9166 ac_cv_search_tgetent=no
6c7a06a3 9167fi
81ecdfbb 9168rm conftest.$ac_ext
6c7a06a3
TT
9169LIBS=$ac_func_search_save_LIBS
9170fi
81ecdfbb
RW
9171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9172$as_echo "$ac_cv_search_tgetent" >&6; }
9173ac_res=$ac_cv_search_tgetent
9174if test "$ac_res" != no; then :
9175 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9176
06825bd1
MK
9177fi
9178
06825bd1 9179
bec39cab 9180if test "$ac_cv_search_tgetent" = no; then
7a85168d 9181 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9182fi
9183
3841debe 9184
81ecdfbb
RW
9185# Check whether --with-system-readline was given.
9186if test "${with_system_readline+set}" = set; then :
9187 withval=$with_system_readline;
9188fi
6a30b0a5 9189
6a30b0a5
AS
9190
9191if test "$with_system_readline" = yes; then
5593a99a 9192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
86c6b807
TT
9193$as_echo_n "checking whether system readline is new enough... " >&6; }
9194if ${gdb_cv_readline_ok+:} false; then :
9195 $as_echo_n "(cached) " >&6
9196else
9197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9198/* end confdefs.h. */
9199#include <stdio.h>
5593a99a 9200 #include <readline/readline.h>
86c6b807
TT
9201int
9202main ()
9203{
9204#if RL_VERSION_MAJOR < 7
5593a99a
SM
9205 # error "readline version 7 required"
9206 #endif
9207
86c6b807
TT
9208 ;
9209 return 0;
9210}
9211_ACEOF
9212if ac_fn_c_try_compile "$LINENO"; then :
9213 gdb_cv_readline_ok=yes
9214else
9215 gdb_cv_readline_ok=no
5593a99a 9216
86c6b807
TT
9217fi
9218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 9219
86c6b807
TT
9220fi
9221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9222$as_echo "$gdb_cv_readline_ok" >&6; }
9223 if test "$gdb_cv_readline_ok" != yes; then
9224 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9225 fi
9226
6a30b0a5
AS
9227 READLINE=-lreadline
9228 READLINE_DEPS=
9229 READLINE_CFLAGS=
39037522 9230 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9231else
9232 READLINE='$(READLINE_DIR)/libreadline.a'
9233 READLINE_DEPS='$(READLINE)'
9234 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9235 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9236fi
9237
9238
9239
9240
9241
f997c383
SD
9242# Generate jit-reader.h
9243
9244# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9245TARGET_PTR=
9246
9247# The cast to long int works around a bug in the HP C Compiler
9248# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9249# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9250# This bug is HP SR number 8606223364.
9251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9252$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9253if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9254 $as_echo_n "(cached) " >&6
9255else
9256 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9257
9258else
9259 if test "$ac_cv_type_unsigned_long_long" = yes; then
9260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9262as_fn_error 77 "cannot compute sizeof (unsigned long long)
9263See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9264 else
9265 ac_cv_sizeof_unsigned_long_long=0
9266 fi
9267fi
9268
9269fi
9270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9271$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9272
9273
9274
9275cat >>confdefs.h <<_ACEOF
9276#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9277_ACEOF
9278
9279
9280# The cast to long int works around a bug in the HP C Compiler
9281# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9282# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9283# This bug is HP SR number 8606223364.
9284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9285$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9286if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9287 $as_echo_n "(cached) " >&6
9288else
9289 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9290
9291else
9292 if test "$ac_cv_type_unsigned_long" = yes; then
9293 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9295as_fn_error 77 "cannot compute sizeof (unsigned long)
9296See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9297 else
9298 ac_cv_sizeof_unsigned_long=0
9299 fi
9300fi
9301
9302fi
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9304$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9305
9306
9307
9308cat >>confdefs.h <<_ACEOF
9309#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9310_ACEOF
9311
9312
9313# The cast to long int works around a bug in the HP C Compiler
9314# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9315# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9316# This bug is HP SR number 8606223364.
9317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9318$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9319if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9320 $as_echo_n "(cached) " >&6
9321else
9322 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9323
9324else
9325 if test "$ac_cv_type_unsigned___int128" = yes; then
9326 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9328as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9329See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9330 else
9331 ac_cv_sizeof_unsigned___int128=0
9332 fi
9333fi
9334
9335fi
9336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9337$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9338
9339
9340
9341cat >>confdefs.h <<_ACEOF
9342#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9343_ACEOF
9344
9345
9346
9347if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9348 TARGET_PTR="unsigned long"
9349elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9350 TARGET_PTR="unsigned long long"
9351elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9352 TARGET_PTR="unsigned __int128"
9353else
9354 TARGET_PTR="unsigned long"
9355fi
9356
9357
9358ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9359
9360
a2d08b9e
SD
9361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9362$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9363if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9364 $as_echo_n "(cached) " >&6
9365else
9366 ac_func_search_save_LIBS=$LIBS
9367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9368/* end confdefs.h. */
9369
9370/* Override any GCC internal prototype to avoid an error.
9371 Use char because int might match the return type of a GCC
9372 builtin and then its argument prototype would still apply. */
9373#ifdef __cplusplus
9374extern "C"
9375#endif
9376char dlopen ();
9377int
9378main ()
9379{
9380return dlopen ();
9381 ;
9382 return 0;
9383}
9384_ACEOF
9385for ac_lib in '' dl; do
9386 if test -z "$ac_lib"; then
9387 ac_res="none required"
9388 else
9389 ac_res=-l$ac_lib
9390 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9391 fi
9392 if ac_fn_c_try_link "$LINENO"; then :
9393 ac_cv_search_dlopen=$ac_res
9394fi
9395rm -f core conftest.err conftest.$ac_objext \
9396 conftest$ac_exeext
d0ac1c44 9397 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9398 break
9399fi
9400done
d0ac1c44 9401if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9402
9403else
9404 ac_cv_search_dlopen=no
9405fi
9406rm conftest.$ac_ext
9407LIBS=$ac_func_search_save_LIBS
9408fi
9409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9410$as_echo "$ac_cv_search_dlopen" >&6; }
9411ac_res=$ac_cv_search_dlopen
9412if test "$ac_res" != no; then :
9413 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9414
9415fi
9416
9417
39037522 9418
b8e0a31c
SD
9419
9420# Check whether --with-jit-reader-dir was given.
9421if test "${with_jit_reader_dir+set}" = set; then :
9422 withval=$with_jit_reader_dir;
9423 JIT_READER_DIR=$withval
9424else
9425 JIT_READER_DIR=${libdir}/gdb
9426fi
9427
9428
9429 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9430 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9431 ac_define_dir=`eval echo $JIT_READER_DIR`
9432 ac_define_dir=`eval echo $ac_define_dir`
9433
9434cat >>confdefs.h <<_ACEOF
9435#define JIT_READER_DIR "$ac_define_dir"
9436_ACEOF
9437
9438
9439
9440
9441 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9442 if test "x$prefix" = xNONE; then
9443 test_prefix=/usr/local
9444 else
9445 test_prefix=$prefix
9446 fi
9447 else
9448 test_prefix=$exec_prefix
9449 fi
9450 value=0
9451 case ${ac_define_dir} in
9452 "${test_prefix}"|"${test_prefix}/"*|\
9453 '${exec_prefix}'|'${exec_prefix}/'*)
9454 value=1
9455 ;;
9456 esac
9457
9458cat >>confdefs.h <<_ACEOF
9459#define JIT_READER_DIR_RELOCATABLE $value
9460_ACEOF
9461
9462
9463
9464
9465
81ecdfbb
RW
9466# Check whether --with-expat was given.
9467if test "${with_expat+set}" = set; then :
9468 withval=$with_expat;
5c39566f
DJ
9469else
9470 with_expat=auto
81ecdfbb
RW
9471fi
9472
9473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9474$as_echo_n "checking whether to use expat... " >&6; }
9475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9476$as_echo "$with_expat" >&6; }
5c39566f
DJ
9477
9478if test "${with_expat}" = no; then
81ecdfbb
RW
9479 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9480$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9481 HAVE_LIBEXPAT=no
9482else
9483
3841debe
DJ
9484
9485
9486
9487
9488
9489
9490
9491 use_additional=yes
9492
9493 acl_save_prefix="$prefix"
9494 prefix="$acl_final_prefix"
9495 acl_save_exec_prefix="$exec_prefix"
9496 exec_prefix="$acl_final_exec_prefix"
9497
9498 eval additional_includedir=\"$includedir\"
9499 eval additional_libdir=\"$libdir\"
9500
9501 exec_prefix="$acl_save_exec_prefix"
9502 prefix="$acl_save_prefix"
9503
9504
81ecdfbb
RW
9505# Check whether --with-libexpat-prefix was given.
9506if test "${with_libexpat_prefix+set}" = set; then :
9507 withval=$with_libexpat_prefix;
3841debe
DJ
9508 if test "X$withval" = "Xno"; then
9509 use_additional=no
9510 else
9511 if test "X$withval" = "X"; then
9512
9513 acl_save_prefix="$prefix"
9514 prefix="$acl_final_prefix"
9515 acl_save_exec_prefix="$exec_prefix"
9516 exec_prefix="$acl_final_exec_prefix"
9517
9518 eval additional_includedir=\"$includedir\"
9519 eval additional_libdir=\"$libdir\"
9520
9521 exec_prefix="$acl_save_exec_prefix"
9522 prefix="$acl_save_prefix"
9523
9524 else
9525 additional_includedir="$withval/include"
9526 additional_libdir="$withval/lib"
9527 fi
9528 fi
9529
81ecdfbb
RW
9530fi
9531
9f1528a1
AB
9532
9533# Check whether --with-libexpat-type was given.
9534if test "${with_libexpat_type+set}" = set; then :
9535 withval=$with_libexpat_type; with_libexpat_type=$withval
9536else
9537 with_libexpat_type=auto
9538fi
9539
9540 lib_type=`eval echo \$with_libexpat_type`
9541
3841debe
DJ
9542 LIBEXPAT=
9543 LTLIBEXPAT=
9544 INCEXPAT=
9545 rpathdirs=
9546 ltrpathdirs=
9547 names_already_handled=
9548 names_next_round='expat '
9549 while test -n "$names_next_round"; do
9550 names_this_round="$names_next_round"
9551 names_next_round=
9552 for name in $names_this_round; do
9553 already_handled=
9554 for n in $names_already_handled; do
9555 if test "$n" = "$name"; then
9556 already_handled=yes
9557 break
9558 fi
9559 done
9560 if test -z "$already_handled"; then
9561 names_already_handled="$names_already_handled $name"
9562 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9563 eval value=\"\$HAVE_LIB$uppername\"
9564 if test -n "$value"; then
9565 if test "$value" = yes; then
9566 eval value=\"\$LIB$uppername\"
9567 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9568 eval value=\"\$LTLIB$uppername\"
9569 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9570 else
9571 :
9572 fi
9573 else
9574 found_dir=
9575 found_la=
9576 found_so=
9577 found_a=
9578 if test $use_additional = yes; then
9f1528a1 9579 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9580 found_dir="$additional_libdir"
9581 found_so="$additional_libdir/lib$name.$shlibext"
9582 if test -f "$additional_libdir/lib$name.la"; then
9583 found_la="$additional_libdir/lib$name.la"
9584 fi
9f1528a1 9585 elif test x$lib_type != xshared; then
3841debe
DJ
9586 if test -f "$additional_libdir/lib$name.$libext"; then
9587 found_dir="$additional_libdir"
9588 found_a="$additional_libdir/lib$name.$libext"
9589 if test -f "$additional_libdir/lib$name.la"; then
9590 found_la="$additional_libdir/lib$name.la"
9591 fi
9592 fi
9593 fi
9594 fi
9595 if test "X$found_dir" = "X"; then
9596 for x in $LDFLAGS $LTLIBEXPAT; do
9597
9598 acl_save_prefix="$prefix"
9599 prefix="$acl_final_prefix"
9600 acl_save_exec_prefix="$exec_prefix"
9601 exec_prefix="$acl_final_exec_prefix"
9602 eval x=\"$x\"
9603 exec_prefix="$acl_save_exec_prefix"
9604 prefix="$acl_save_prefix"
9605
9606 case "$x" in
9607 -L*)
9608 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9609 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9610 found_dir="$dir"
9611 found_so="$dir/lib$name.$shlibext"
9612 if test -f "$dir/lib$name.la"; then
9613 found_la="$dir/lib$name.la"
9614 fi
9f1528a1 9615 elif test x$lib_type != xshared; then
3841debe
DJ
9616 if test -f "$dir/lib$name.$libext"; then
9617 found_dir="$dir"
9618 found_a="$dir/lib$name.$libext"
9619 if test -f "$dir/lib$name.la"; then
9620 found_la="$dir/lib$name.la"
9621 fi
9622 fi
9623 fi
9624 ;;
9625 esac
9626 if test "X$found_dir" != "X"; then
9627 break
9628 fi
9629 done
9630 fi
9631 if test "X$found_dir" != "X"; then
9632 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9633 if test "X$found_so" != "X"; then
9634 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9635 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9636 else
9637 haveit=
9638 for x in $ltrpathdirs; do
9639 if test "X$x" = "X$found_dir"; then
9640 haveit=yes
9641 break
9642 fi
9643 done
9644 if test -z "$haveit"; then
9645 ltrpathdirs="$ltrpathdirs $found_dir"
9646 fi
9647 if test "$hardcode_direct" = yes; then
9648 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9649 else
9650 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9651 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9652 haveit=
9653 for x in $rpathdirs; do
9654 if test "X$x" = "X$found_dir"; then
9655 haveit=yes
9656 break
9657 fi
9658 done
9659 if test -z "$haveit"; then
9660 rpathdirs="$rpathdirs $found_dir"
9661 fi
9662 else
9663 haveit=
9664 for x in $LDFLAGS $LIBEXPAT; do
9665
9666 acl_save_prefix="$prefix"
9667 prefix="$acl_final_prefix"
9668 acl_save_exec_prefix="$exec_prefix"
9669 exec_prefix="$acl_final_exec_prefix"
9670 eval x=\"$x\"
9671 exec_prefix="$acl_save_exec_prefix"
9672 prefix="$acl_save_prefix"
9673
9674 if test "X$x" = "X-L$found_dir"; then
9675 haveit=yes
9676 break
9677 fi
9678 done
9679 if test -z "$haveit"; then
9680 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9681 fi
9682 if test "$hardcode_minus_L" != no; then
9683 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9684 else
9685 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9686 fi
9687 fi
9688 fi
9689 fi
9690 else
9691 if test "X$found_a" != "X"; then
9692 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9693 else
9694 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9695 fi
9696 fi
9697 additional_includedir=
9698 case "$found_dir" in
9699 */lib | */lib/)
9700 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9701 additional_includedir="$basedir/include"
9702 ;;
9703 esac
9704 if test "X$additional_includedir" != "X"; then
9705 if test "X$additional_includedir" != "X/usr/include"; then
9706 haveit=
9707 if test "X$additional_includedir" = "X/usr/local/include"; then
9708 if test -n "$GCC"; then
9709 case $host_os in
9710 linux*) haveit=yes;;
9711 esac
9712 fi
9713 fi
9714 if test -z "$haveit"; then
9715 for x in $CPPFLAGS $INCEXPAT; do
9716
9717 acl_save_prefix="$prefix"
9718 prefix="$acl_final_prefix"
9719 acl_save_exec_prefix="$exec_prefix"
9720 exec_prefix="$acl_final_exec_prefix"
9721 eval x=\"$x\"
9722 exec_prefix="$acl_save_exec_prefix"
9723 prefix="$acl_save_prefix"
9724
9725 if test "X$x" = "X-I$additional_includedir"; then
9726 haveit=yes
9727 break
9728 fi
9729 done
9730 if test -z "$haveit"; then
9731 if test -d "$additional_includedir"; then
9732 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9733 fi
9734 fi
9735 fi
9736 fi
9737 fi
9738 if test -n "$found_la"; then
9739 save_libdir="$libdir"
9740 case "$found_la" in
9741 */* | *\\*) . "$found_la" ;;
9742 *) . "./$found_la" ;;
9743 esac
9744 libdir="$save_libdir"
9745 for dep in $dependency_libs; do
9746 case "$dep" in
9747 -L*)
9748 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9749 if test "X$additional_libdir" != "X/usr/lib"; then
9750 haveit=
9751 if test "X$additional_libdir" = "X/usr/local/lib"; then
9752 if test -n "$GCC"; then
9753 case $host_os in
9754 linux*) haveit=yes;;
9755 esac
9756 fi
9757 fi
9758 if test -z "$haveit"; then
9759 haveit=
9760 for x in $LDFLAGS $LIBEXPAT; do
9761
9762 acl_save_prefix="$prefix"
9763 prefix="$acl_final_prefix"
9764 acl_save_exec_prefix="$exec_prefix"
9765 exec_prefix="$acl_final_exec_prefix"
9766 eval x=\"$x\"
9767 exec_prefix="$acl_save_exec_prefix"
9768 prefix="$acl_save_prefix"
9769
9770 if test "X$x" = "X-L$additional_libdir"; then
9771 haveit=yes
9772 break
9773 fi
9774 done
9775 if test -z "$haveit"; then
9776 if test -d "$additional_libdir"; then
9777 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9778 fi
9779 fi
9780 haveit=
9781 for x in $LDFLAGS $LTLIBEXPAT; do
9782
9783 acl_save_prefix="$prefix"
9784 prefix="$acl_final_prefix"
9785 acl_save_exec_prefix="$exec_prefix"
9786 exec_prefix="$acl_final_exec_prefix"
9787 eval x=\"$x\"
9788 exec_prefix="$acl_save_exec_prefix"
9789 prefix="$acl_save_prefix"
9790
9791 if test "X$x" = "X-L$additional_libdir"; then
9792 haveit=yes
9793 break
9794 fi
9795 done
9796 if test -z "$haveit"; then
9797 if test -d "$additional_libdir"; then
9798 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9799 fi
9800 fi
9801 fi
9802 fi
9803 ;;
9804 -R*)
9805 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9806 if test "$enable_rpath" != no; then
9807 haveit=
9808 for x in $rpathdirs; do
9809 if test "X$x" = "X$dir"; then
9810 haveit=yes
9811 break
9812 fi
9813 done
9814 if test -z "$haveit"; then
9815 rpathdirs="$rpathdirs $dir"
9816 fi
9817 haveit=
9818 for x in $ltrpathdirs; do
9819 if test "X$x" = "X$dir"; then
9820 haveit=yes
9821 break
9822 fi
9823 done
9824 if test -z "$haveit"; then
9825 ltrpathdirs="$ltrpathdirs $dir"
9826 fi
9827 fi
9828 ;;
9829 -l*)
9830 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9831 ;;
9832 *.la)
9833 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9834 ;;
9835 *)
9836 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9837 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9838 ;;
81ecdfbb
RW
9839 esac
9840 done
9841 fi
9842 else
9f1528a1
AB
9843 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9844 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9845 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9846 else
9847 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9848 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9849 fi
81ecdfbb
RW
9850 fi
9851 fi
9852 fi
9853 done
9854 done
9855 if test "X$rpathdirs" != "X"; then
9856 if test -n "$hardcode_libdir_separator"; then
9857 alldirs=
9858 for found_dir in $rpathdirs; do
9859 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9860 done
9861 acl_save_libdir="$libdir"
9862 libdir="$alldirs"
9863 eval flag=\"$hardcode_libdir_flag_spec\"
9864 libdir="$acl_save_libdir"
9865 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9866 else
9867 for found_dir in $rpathdirs; do
9868 acl_save_libdir="$libdir"
9869 libdir="$found_dir"
9870 eval flag=\"$hardcode_libdir_flag_spec\"
9871 libdir="$acl_save_libdir"
9872 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9873 done
9874 fi
9875 fi
9876 if test "X$ltrpathdirs" != "X"; then
9877 for found_dir in $ltrpathdirs; do
9878 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9879 done
9880 fi
a9322a30
TT
9881
9882
81ecdfbb 9883 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9884
81ecdfbb
RW
9885 for element in $INCEXPAT; do
9886 haveit=
9887 for x in $CPPFLAGS; do
a9322a30 9888
81ecdfbb
RW
9889 acl_save_prefix="$prefix"
9890 prefix="$acl_final_prefix"
9891 acl_save_exec_prefix="$exec_prefix"
9892 exec_prefix="$acl_final_exec_prefix"
9893 eval x=\"$x\"
9894 exec_prefix="$acl_save_exec_prefix"
9895 prefix="$acl_save_prefix"
a8111142 9896
81ecdfbb
RW
9897 if test "X$x" = "X$element"; then
9898 haveit=yes
9899 break
9900 fi
9901 done
9902 if test -z "$haveit"; then
9903 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9904 fi
9905 done
a9322a30
TT
9906
9907
81ecdfbb
RW
9908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9909$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9910if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9911 $as_echo_n "(cached) " >&6
bec39cab 9912else
bec39cab 9913
81ecdfbb
RW
9914 ac_save_LIBS="$LIBS"
9915 LIBS="$LIBS $LIBEXPAT"
9916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9917/* end confdefs.h. */
81ecdfbb
RW
9918#include "expat.h"
9919int
9920main ()
9921{
9922XML_Parser p = XML_ParserCreate (0);
9923 ;
9924 return 0;
9925}
bec39cab 9926_ACEOF
81ecdfbb
RW
9927if ac_fn_c_try_link "$LINENO"; then :
9928 ac_cv_libexpat=yes
c906108c 9929else
81ecdfbb 9930 ac_cv_libexpat=no
bec39cab 9931fi
81ecdfbb
RW
9932rm -f core conftest.err conftest.$ac_objext \
9933 conftest$ac_exeext conftest.$ac_ext
9934 LIBS="$ac_save_LIBS"
c906108c 9935
95ca63c4 9936fi
81ecdfbb
RW
9937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9938$as_echo "$ac_cv_libexpat" >&6; }
9939 if test "$ac_cv_libexpat" = yes; then
9940 HAVE_LIBEXPAT=yes
bec39cab 9941
81ecdfbb 9942$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9943
81ecdfbb
RW
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9945$as_echo_n "checking how to link with libexpat... " >&6; }
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9947$as_echo "$LIBEXPAT" >&6; }
9948 else
9949 HAVE_LIBEXPAT=no
9950 CPPFLAGS="$ac_save_CPPFLAGS"
9951 LIBEXPAT=
9952 LTLIBEXPAT=
9953 fi
95ca63c4
CF
9954
9955
9956
7cb9022a
MK
9957
9958
bec39cab 9959
81ecdfbb
RW
9960 if test "$HAVE_LIBEXPAT" != yes; then
9961 if test "$with_expat" = yes; then
d0ac1c44 9962 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9963 else
9964 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9965$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9966 fi
9967 else
9968 save_LIBS=$LIBS
9969 LIBS="$LIBS $LIBEXPAT"
9970 for ac_func in XML_StopParser
9971do :
9972 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9973if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9974 cat >>confdefs.h <<_ACEOF
81ecdfbb 9975#define HAVE_XML_STOPPARSER 1
bec39cab 9976_ACEOF
95ca63c4 9977
bec39cab 9978fi
bec39cab 9979done
95ca63c4 9980
81ecdfbb
RW
9981 LIBS=$save_LIBS
9982 fi
a9322a30
TT
9983fi
9984
2400729e
UW
9985
9986# Check whether --with-mpfr was given.
9987if test "${with_mpfr+set}" = set; then :
9988 withval=$with_mpfr;
9989else
9990 with_mpfr=auto
9991fi
9992
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9994$as_echo_n "checking whether to use MPFR... " >&6; }
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9996$as_echo "$with_mpfr" >&6; }
9997
9998if test "${with_mpfr}" = no; then
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10000$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10001 HAVE_LIBMPFR=no
10002else
10003
10004
10005
10006
10007
10008
10009
10010
10011 use_additional=yes
10012
10013 acl_save_prefix="$prefix"
10014 prefix="$acl_final_prefix"
10015 acl_save_exec_prefix="$exec_prefix"
10016 exec_prefix="$acl_final_exec_prefix"
10017
10018 eval additional_includedir=\"$includedir\"
10019 eval additional_libdir=\"$libdir\"
10020
10021 exec_prefix="$acl_save_exec_prefix"
10022 prefix="$acl_save_prefix"
10023
10024
10025# Check whether --with-libmpfr-prefix was given.
10026if test "${with_libmpfr_prefix+set}" = set; then :
10027 withval=$with_libmpfr_prefix;
10028 if test "X$withval" = "Xno"; then
10029 use_additional=no
10030 else
10031 if test "X$withval" = "X"; then
10032
10033 acl_save_prefix="$prefix"
10034 prefix="$acl_final_prefix"
10035 acl_save_exec_prefix="$exec_prefix"
10036 exec_prefix="$acl_final_exec_prefix"
10037
10038 eval additional_includedir=\"$includedir\"
10039 eval additional_libdir=\"$libdir\"
10040
10041 exec_prefix="$acl_save_exec_prefix"
10042 prefix="$acl_save_prefix"
10043
10044 else
10045 additional_includedir="$withval/include"
10046 additional_libdir="$withval/lib"
10047 fi
10048 fi
10049
10050fi
10051
9f1528a1
AB
10052
10053# Check whether --with-libmpfr-type was given.
10054if test "${with_libmpfr_type+set}" = set; then :
10055 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10056else
10057 with_libmpfr_type=auto
10058fi
10059
10060 lib_type=`eval echo \$with_libmpfr_type`
10061
2400729e
UW
10062 LIBMPFR=
10063 LTLIBMPFR=
10064 INCMPFR=
10065 rpathdirs=
10066 ltrpathdirs=
10067 names_already_handled=
da658607 10068 names_next_round='mpfr gmp'
2400729e
UW
10069 while test -n "$names_next_round"; do
10070 names_this_round="$names_next_round"
10071 names_next_round=
10072 for name in $names_this_round; do
10073 already_handled=
10074 for n in $names_already_handled; do
10075 if test "$n" = "$name"; then
10076 already_handled=yes
10077 break
10078 fi
10079 done
10080 if test -z "$already_handled"; then
10081 names_already_handled="$names_already_handled $name"
10082 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10083 eval value=\"\$HAVE_LIB$uppername\"
10084 if test -n "$value"; then
10085 if test "$value" = yes; then
10086 eval value=\"\$LIB$uppername\"
10087 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10088 eval value=\"\$LTLIB$uppername\"
10089 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10090 else
10091 :
10092 fi
10093 else
10094 found_dir=
10095 found_la=
10096 found_so=
10097 found_a=
10098 if test $use_additional = yes; then
9f1528a1 10099 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10100 found_dir="$additional_libdir"
10101 found_so="$additional_libdir/lib$name.$shlibext"
10102 if test -f "$additional_libdir/lib$name.la"; then
10103 found_la="$additional_libdir/lib$name.la"
10104 fi
9f1528a1 10105 elif test x$lib_type != xshared; then
2400729e
UW
10106 if test -f "$additional_libdir/lib$name.$libext"; then
10107 found_dir="$additional_libdir"
10108 found_a="$additional_libdir/lib$name.$libext"
10109 if test -f "$additional_libdir/lib$name.la"; then
10110 found_la="$additional_libdir/lib$name.la"
10111 fi
10112 fi
10113 fi
10114 fi
10115 if test "X$found_dir" = "X"; then
10116 for x in $LDFLAGS $LTLIBMPFR; do
10117
10118 acl_save_prefix="$prefix"
10119 prefix="$acl_final_prefix"
10120 acl_save_exec_prefix="$exec_prefix"
10121 exec_prefix="$acl_final_exec_prefix"
10122 eval x=\"$x\"
10123 exec_prefix="$acl_save_exec_prefix"
10124 prefix="$acl_save_prefix"
10125
10126 case "$x" in
10127 -L*)
10128 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 10129 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10130 found_dir="$dir"
10131 found_so="$dir/lib$name.$shlibext"
10132 if test -f "$dir/lib$name.la"; then
10133 found_la="$dir/lib$name.la"
10134 fi
9f1528a1 10135 elif test x$lib_type != xshared; then
2400729e
UW
10136 if test -f "$dir/lib$name.$libext"; then
10137 found_dir="$dir"
10138 found_a="$dir/lib$name.$libext"
10139 if test -f "$dir/lib$name.la"; then
10140 found_la="$dir/lib$name.la"
10141 fi
10142 fi
10143 fi
10144 ;;
10145 esac
10146 if test "X$found_dir" != "X"; then
10147 break
10148 fi
10149 done
10150 fi
10151 if test "X$found_dir" != "X"; then
10152 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10153 if test "X$found_so" != "X"; then
10154 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10155 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10156 else
10157 haveit=
10158 for x in $ltrpathdirs; do
10159 if test "X$x" = "X$found_dir"; then
10160 haveit=yes
10161 break
10162 fi
10163 done
10164 if test -z "$haveit"; then
10165 ltrpathdirs="$ltrpathdirs $found_dir"
10166 fi
10167 if test "$hardcode_direct" = yes; then
10168 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10169 else
10170 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10171 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10172 haveit=
10173 for x in $rpathdirs; do
10174 if test "X$x" = "X$found_dir"; then
10175 haveit=yes
10176 break
10177 fi
10178 done
10179 if test -z "$haveit"; then
10180 rpathdirs="$rpathdirs $found_dir"
10181 fi
10182 else
10183 haveit=
10184 for x in $LDFLAGS $LIBMPFR; do
10185
10186 acl_save_prefix="$prefix"
10187 prefix="$acl_final_prefix"
10188 acl_save_exec_prefix="$exec_prefix"
10189 exec_prefix="$acl_final_exec_prefix"
10190 eval x=\"$x\"
10191 exec_prefix="$acl_save_exec_prefix"
10192 prefix="$acl_save_prefix"
10193
10194 if test "X$x" = "X-L$found_dir"; then
10195 haveit=yes
10196 break
10197 fi
10198 done
10199 if test -z "$haveit"; then
10200 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10201 fi
10202 if test "$hardcode_minus_L" != no; then
10203 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10204 else
10205 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10206 fi
10207 fi
10208 fi
10209 fi
10210 else
10211 if test "X$found_a" != "X"; then
10212 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10213 else
10214 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10215 fi
10216 fi
10217 additional_includedir=
10218 case "$found_dir" in
10219 */lib | */lib/)
10220 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10221 additional_includedir="$basedir/include"
10222 ;;
10223 esac
10224 if test "X$additional_includedir" != "X"; then
10225 if test "X$additional_includedir" != "X/usr/include"; then
10226 haveit=
10227 if test "X$additional_includedir" = "X/usr/local/include"; then
10228 if test -n "$GCC"; then
10229 case $host_os in
10230 linux*) haveit=yes;;
10231 esac
10232 fi
10233 fi
10234 if test -z "$haveit"; then
10235 for x in $CPPFLAGS $INCMPFR; do
10236
10237 acl_save_prefix="$prefix"
10238 prefix="$acl_final_prefix"
10239 acl_save_exec_prefix="$exec_prefix"
10240 exec_prefix="$acl_final_exec_prefix"
10241 eval x=\"$x\"
10242 exec_prefix="$acl_save_exec_prefix"
10243 prefix="$acl_save_prefix"
10244
10245 if test "X$x" = "X-I$additional_includedir"; then
10246 haveit=yes
10247 break
10248 fi
10249 done
10250 if test -z "$haveit"; then
10251 if test -d "$additional_includedir"; then
10252 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10253 fi
10254 fi
10255 fi
10256 fi
10257 fi
10258 if test -n "$found_la"; then
10259 save_libdir="$libdir"
10260 case "$found_la" in
10261 */* | *\\*) . "$found_la" ;;
10262 *) . "./$found_la" ;;
10263 esac
10264 libdir="$save_libdir"
10265 for dep in $dependency_libs; do
10266 case "$dep" in
10267 -L*)
10268 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10269 if test "X$additional_libdir" != "X/usr/lib"; then
10270 haveit=
10271 if test "X$additional_libdir" = "X/usr/local/lib"; then
10272 if test -n "$GCC"; then
10273 case $host_os in
10274 linux*) haveit=yes;;
10275 esac
10276 fi
10277 fi
10278 if test -z "$haveit"; then
10279 haveit=
10280 for x in $LDFLAGS $LIBMPFR; do
10281
10282 acl_save_prefix="$prefix"
10283 prefix="$acl_final_prefix"
10284 acl_save_exec_prefix="$exec_prefix"
10285 exec_prefix="$acl_final_exec_prefix"
10286 eval x=\"$x\"
10287 exec_prefix="$acl_save_exec_prefix"
10288 prefix="$acl_save_prefix"
10289
10290 if test "X$x" = "X-L$additional_libdir"; then
10291 haveit=yes
10292 break
10293 fi
10294 done
10295 if test -z "$haveit"; then
10296 if test -d "$additional_libdir"; then
10297 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10298 fi
10299 fi
10300 haveit=
10301 for x in $LDFLAGS $LTLIBMPFR; do
10302
10303 acl_save_prefix="$prefix"
10304 prefix="$acl_final_prefix"
10305 acl_save_exec_prefix="$exec_prefix"
10306 exec_prefix="$acl_final_exec_prefix"
10307 eval x=\"$x\"
10308 exec_prefix="$acl_save_exec_prefix"
10309 prefix="$acl_save_prefix"
10310
10311 if test "X$x" = "X-L$additional_libdir"; then
10312 haveit=yes
10313 break
10314 fi
10315 done
10316 if test -z "$haveit"; then
10317 if test -d "$additional_libdir"; then
10318 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10319 fi
10320 fi
10321 fi
10322 fi
10323 ;;
10324 -R*)
10325 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10326 if test "$enable_rpath" != no; then
10327 haveit=
10328 for x in $rpathdirs; do
10329 if test "X$x" = "X$dir"; then
10330 haveit=yes
10331 break
10332 fi
10333 done
10334 if test -z "$haveit"; then
10335 rpathdirs="$rpathdirs $dir"
10336 fi
10337 haveit=
10338 for x in $ltrpathdirs; do
10339 if test "X$x" = "X$dir"; then
10340 haveit=yes
10341 break
10342 fi
10343 done
10344 if test -z "$haveit"; then
10345 ltrpathdirs="$ltrpathdirs $dir"
10346 fi
10347 fi
10348 ;;
10349 -l*)
10350 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10351 ;;
10352 *.la)
10353 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10354 ;;
10355 *)
10356 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10357 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10358 ;;
10359 esac
10360 done
10361 fi
10362 else
9f1528a1
AB
10363 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10364 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10365 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10366 else
10367 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10368 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10369 fi
2400729e
UW
10370 fi
10371 fi
10372 fi
10373 done
10374 done
10375 if test "X$rpathdirs" != "X"; then
10376 if test -n "$hardcode_libdir_separator"; then
10377 alldirs=
10378 for found_dir in $rpathdirs; do
10379 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10380 done
10381 acl_save_libdir="$libdir"
10382 libdir="$alldirs"
10383 eval flag=\"$hardcode_libdir_flag_spec\"
10384 libdir="$acl_save_libdir"
10385 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10386 else
10387 for found_dir in $rpathdirs; do
10388 acl_save_libdir="$libdir"
10389 libdir="$found_dir"
10390 eval flag=\"$hardcode_libdir_flag_spec\"
10391 libdir="$acl_save_libdir"
10392 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10393 done
10394 fi
10395 fi
10396 if test "X$ltrpathdirs" != "X"; then
10397 for found_dir in $ltrpathdirs; do
10398 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10399 done
10400 fi
10401
10402
10403 ac_save_CPPFLAGS="$CPPFLAGS"
10404
10405 for element in $INCMPFR; do
10406 haveit=
10407 for x in $CPPFLAGS; do
10408
10409 acl_save_prefix="$prefix"
10410 prefix="$acl_final_prefix"
10411 acl_save_exec_prefix="$exec_prefix"
10412 exec_prefix="$acl_final_exec_prefix"
10413 eval x=\"$x\"
10414 exec_prefix="$acl_save_exec_prefix"
10415 prefix="$acl_save_prefix"
10416
10417 if test "X$x" = "X$element"; then
10418 haveit=yes
10419 break
10420 fi
10421 done
10422 if test -z "$haveit"; then
10423 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10424 fi
10425 done
10426
10427
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10429$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10430if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10431 $as_echo_n "(cached) " >&6
10432else
10433
10434 ac_save_LIBS="$LIBS"
10435 LIBS="$LIBS $LIBMPFR"
10436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10437/* end confdefs.h. */
10438#include <mpfr.h>
10439int
10440main ()
10441{
10442mpfr_exp_t exp; mpfr_t x;
10443 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10444 ;
10445 return 0;
10446}
10447_ACEOF
10448if ac_fn_c_try_link "$LINENO"; then :
10449 ac_cv_libmpfr=yes
10450else
10451 ac_cv_libmpfr=no
10452fi
10453rm -f core conftest.err conftest.$ac_objext \
10454 conftest$ac_exeext conftest.$ac_ext
10455 LIBS="$ac_save_LIBS"
10456
10457fi
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10459$as_echo "$ac_cv_libmpfr" >&6; }
10460 if test "$ac_cv_libmpfr" = yes; then
10461 HAVE_LIBMPFR=yes
10462
10463$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10464
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10466$as_echo_n "checking how to link with libmpfr... " >&6; }
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10468$as_echo "$LIBMPFR" >&6; }
10469 else
10470 HAVE_LIBMPFR=no
10471 CPPFLAGS="$ac_save_CPPFLAGS"
10472 LIBMPFR=
10473 LTLIBMPFR=
10474 fi
10475
10476
10477
10478
10479
10480
10481 if test "$HAVE_LIBMPFR" != yes; then
10482 if test "$with_mpfr" = yes; then
d0ac1c44 10483 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10484 else
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10486$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10487 fi
10488 fi
10489fi
10490
d344e670
DE
10491# --------------------- #
10492# Check for libpython. #
10493# --------------------- #
10494
a9322a30 10495
a9322a30
TT
10496
10497
ec685c5e 10498
0c4a4063 10499
81ecdfbb
RW
10500# Check whether --with-python was given.
10501if test "${with_python+set}" = set; then :
10502 withval=$with_python;
bec39cab 10503else
81ecdfbb 10504 with_python=auto
bec39cab 10505fi
bec39cab 10506
81ecdfbb
RW
10507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10508$as_echo_n "checking whether to use python... " >&6; }
10509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10510$as_echo "$with_python" >&6; }
9a156167 10511
81ecdfbb
RW
10512if test "${with_python}" = no; then
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10514$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10515 have_libpython=no
bec39cab 10516else
81ecdfbb 10517 case "${with_python}" in
8c85a4e2 10518 [\\/]* | ?:[\\/]*)
0ad6b8ee 10519 if test -d "${with_python}"; then
ec685c5e 10520 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10521 python_prog="${with_python}/bin/python"
0c4a4063 10522 python_prefix=
9c4ea6c5
JB
10523 # If python does not exit ${with_python}/bin, then try in
10524 # ${with_python}. On Windows/MinGW, this is where the Python
10525 # executable is.
10526 if test ! -x "${python_prog}"; then
10527 python_prog="${with_python}/python"
10528 python_prefix=
10529 fi
e7a30f46 10530 if test ! -x "${python_prog}"; then
ec685c5e
DE
10531 # Fall back to gdb 7.0/7.1 behaviour.
10532 python_prog=missing
0c4a4063 10533 python_prefix=${with_python}
ec685c5e 10534 fi
e7a30f46 10535 elif test -x "${with_python}"; then
ec685c5e
DE
10536 # While we can't run python compiled for $host (unless host == build),
10537 # the user could write a script that provides the needed information,
10538 # so we support that.
ec685c5e 10539 python_prog=${with_python}
0c4a4063 10540 python_prefix=
ec685c5e 10541 else
d0ac1c44 10542 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10543 fi
81ecdfbb 10544 ;;
ec685c5e
DE
10545 */*)
10546 # Disallow --with-python=foo/bar.
d0ac1c44 10547 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10548 ;;
ec685c5e
DE
10549 *)
10550 # The user has either specified auto, yes, or the name of the python
10551 # program assumed to be in $PATH.
10552 python_prefix=
10553 case "${with_python}" in
10554 yes | auto)
0ad6b8ee 10555 if test "${build}" = "${host}"; then
ec685c5e
DE
10556 # Extract the first word of "python", so it can be a program name with args.
10557set dummy python; ac_word=$2
10558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10559$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10560if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10561 $as_echo_n "(cached) " >&6
10562else
10563 case $python_prog_path in
10564 [\\/]* | ?:[\\/]*)
10565 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10566 ;;
10567 *)
10568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569for as_dir in $PATH
10570do
10571 IFS=$as_save_IFS
10572 test -z "$as_dir" && as_dir=.
10573 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10575 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577 break 2
10578 fi
10579done
10580 done
10581IFS=$as_save_IFS
10582
10583 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10584 ;;
10585esac
10586fi
10587python_prog_path=$ac_cv_path_python_prog_path
10588if test -n "$python_prog_path"; then
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10590$as_echo "$python_prog_path" >&6; }
10591else
10592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10593$as_echo "no" >&6; }
10594fi
10595
10596
10597 if test "${python_prog_path}" = missing; then
10598 python_prog=missing
10599 else
10600 python_prog=${python_prog_path}
10601 fi
10602 else
10603 # Not much we can do except assume the cross-compiler will find the
10604 # right files.
10605 python_prog=missing
10606 fi
10607 ;;
10608 *)
10609 # While we can't run python compiled for $host (unless host == build),
10610 # the user could write a script that provides the needed information,
10611 # so we support that.
10612 python_prog="${with_python}"
10613 # Extract the first word of "${python_prog}", so it can be a program name with args.
10614set dummy ${python_prog}; ac_word=$2
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10616$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10617if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10618 $as_echo_n "(cached) " >&6
10619else
10620 case $python_prog_path in
10621 [\\/]* | ?:[\\/]*)
10622 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10623 ;;
10624 *)
10625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10626for as_dir in $PATH
10627do
10628 IFS=$as_save_IFS
10629 test -z "$as_dir" && as_dir=.
10630 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10632 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10634 break 2
10635 fi
10636done
10637 done
10638IFS=$as_save_IFS
10639
10640 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10641 ;;
10642esac
10643fi
10644python_prog_path=$ac_cv_path_python_prog_path
10645if test -n "$python_prog_path"; then
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10647$as_echo "$python_prog_path" >&6; }
10648else
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10650$as_echo "no" >&6; }
10651fi
10652
10653
10654 if test "${python_prog_path}" = missing; then
5593a99a 10655 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10656 fi
10657 ;;
10658 esac
81ecdfbb
RW
10659 esac
10660
ec685c5e 10661 if test "${python_prog}" != missing; then
e7a30f46
DE
10662 # We have a python program to use, but it may be too old.
10663 # Don't flag an error for --with-python=auto (the default).
10664 have_python_config=yes
ec685c5e
DE
10665 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10666 if test $? != 0; then
e7a30f46
DE
10667 have_python_config=failed
10668 if test "${with_python}" != auto; then
5593a99a 10669 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10670 fi
ec685c5e
DE
10671 fi
10672 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10673 if test $? != 0; then
e7a30f46
DE
10674 have_python_config=failed
10675 if test "${with_python}" != auto; then
5593a99a 10676 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10677 fi
ec685c5e 10678 fi
0c4a4063
DE
10679 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10680 if test $? != 0; then
e7a30f46
DE
10681 have_python_config=failed
10682 if test "${with_python}" != auto; then
5593a99a 10683 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10684 fi
0c4a4063 10685 fi
ec685c5e 10686 else
ac534cba
JB
10687 # We do not have a python executable we can use to determine where
10688 # to find the Python headers and libs. We cannot guess the include
10689 # path from the python_prefix either, because that include path
10690 # depends on the Python version. So, there is nothing much we can
10691 # do except assume that the compiler will be able to find those files.
10692 python_includes=
10693 python_libs=
0c4a4063 10694 have_python_config=no
ec685c5e 10695 fi
bec39cab 10696
ec685c5e
DE
10697 # If we have python-config, only try the configuration it provides.
10698 # Otherwise fallback on the old way of trying different versions of
10699 # python in turn.
81ecdfbb 10700
ec685c5e
DE
10701 have_libpython=no
10702 if test "${have_python_config}" = yes; then
71737c43 10703
ec685c5e
DE
10704
10705 new_CPPFLAGS=${python_includes}
10706 new_LIBS=${python_libs}
71737c43
CB
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10708$as_echo_n "checking for python... " >&6; }
ec685c5e 10709 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10710 save_LIBS=$LIBS
ec685c5e 10711 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10712 LIBS="$new_LIBS $LIBS"
ec685c5e 10713 found_usable_python=no
81ecdfbb 10714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10715/* end confdefs.h. */
ac534cba 10716#include "Python.h"
81ecdfbb
RW
10717int
10718main ()
10719{
10720Py_Initialize ();
10721 ;
10722 return 0;
10723}
bec39cab 10724_ACEOF
81ecdfbb 10725if ac_fn_c_try_link "$LINENO"; then :
71737c43 10726 have_libpython=yes
ec685c5e 10727 found_usable_python=yes
ac534cba
JB
10728 PYTHON_CPPFLAGS=$new_CPPFLAGS
10729 PYTHON_LIBS=$new_LIBS
9a156167 10730fi
81ecdfbb
RW
10731rm -f core conftest.err conftest.$ac_objext \
10732 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10733 CPPFLAGS=$save_CPPFLAGS
10734 LIBS=$save_LIBS
ec685c5e
DE
10735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10736$as_echo "${found_usable_python}" >&6; }
9a156167 10737
e7a30f46 10738 elif test "${have_python_config}" != failed; then
ec685c5e 10739 if test "${have_libpython}" = no; then
9a156167 10740
420697bb
TT
10741
10742 new_CPPFLAGS=${python_includes}
bf27f0e2 10743 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10745$as_echo_n "checking for python... " >&6; }
420697bb
TT
10746 save_CPPFLAGS=$CPPFLAGS
10747 save_LIBS=$LIBS
10748 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10749 LIBS="$new_LIBS $LIBS"
420697bb
TT
10750 found_usable_python=no
10751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10752/* end confdefs.h. */
ac534cba 10753#include "Python.h"
420697bb
TT
10754int
10755main ()
10756{
10757Py_Initialize ();
10758 ;
10759 return 0;
10760}
10761_ACEOF
10762if ac_fn_c_try_link "$LINENO"; then :
71737c43 10763 have_libpython=yes
420697bb 10764 found_usable_python=yes
ac534cba
JB
10765 PYTHON_CPPFLAGS=$new_CPPFLAGS
10766 PYTHON_LIBS=$new_LIBS
420697bb
TT
10767fi
10768rm -f core conftest.err conftest.$ac_objext \
10769 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10770 CPPFLAGS=$save_CPPFLAGS
10771 LIBS=$save_LIBS
420697bb
TT
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10773$as_echo "${found_usable_python}" >&6; }
10774
10775 fi
10776 if test "${have_libpython}" = no; then
10777
ec685c5e
DE
10778
10779 new_CPPFLAGS=${python_includes}
bf27f0e2 10780 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10782$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10783 save_CPPFLAGS=$CPPFLAGS
10784 save_LIBS=$LIBS
10785 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10786 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10787 found_usable_python=no
10788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10789/* end confdefs.h. */
ac534cba 10790#include "Python.h"
ec685c5e
DE
10791int
10792main ()
10793{
10794Py_Initialize ();
10795 ;
10796 return 0;
10797}
10798_ACEOF
10799if ac_fn_c_try_link "$LINENO"; then :
71737c43 10800 have_libpython=yes
ec685c5e 10801 found_usable_python=yes
ac534cba
JB
10802 PYTHON_CPPFLAGS=$new_CPPFLAGS
10803 PYTHON_LIBS=$new_LIBS
ec685c5e 10804fi
81ecdfbb
RW
10805rm -f core conftest.err conftest.$ac_objext \
10806 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10807 CPPFLAGS=$save_CPPFLAGS
10808 LIBS=$save_LIBS
ec685c5e
DE
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10810$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10811
ec685c5e
DE
10812 fi
10813 fi
ec685c5e
DE
10814
10815 if test "${have_libpython}" = no; then
81ecdfbb
RW
10816 case "${with_python}" in
10817 yes)
d0ac1c44 10818 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10819 ;;
10820 auto)
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10822$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10823 ;;
10824 *)
d0ac1c44 10825 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10826 ;;
10827 esac
0c4a4063
DE
10828 else
10829 if test -n "${python_prefix}"; then
10830
10831cat >>confdefs.h <<_ACEOF
10832#define WITH_PYTHON_PATH "${python_prefix}"
10833_ACEOF
10834
10835
10836 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10837 if test "x$prefix" = xNONE; then
10838 test_prefix=/usr/local
10839 else
10840 test_prefix=$prefix
10841 fi
10842 else
10843 test_prefix=$exec_prefix
10844 fi
10845 value=0
10846 case ${python_prefix} in
10847 "${test_prefix}"|"${test_prefix}/"*|\
10848 '${exec_prefix}'|'${exec_prefix}/'*)
10849 value=1
10850 ;;
10851 esac
10852
10853cat >>confdefs.h <<_ACEOF
10854#define PYTHON_PATH_RELOCATABLE $value
10855_ACEOF
10856
10857
10858 fi
81ecdfbb 10859 fi
436868fb 10860fi
436868fb 10861
d13c7322
AB
10862
10863# Check whether --with-python-libdir was given.
10864if test "${with_python_libdir+set}" = set; then :
10865 withval=$with_python_libdir;
10866else
10867
10868 # If no python libdir is specified then select one based on
10869 # python's prefix path.
10870 if test -n "${python_prefix}"; then
10871 with_python_libdir=${python_prefix}/lib
10872 fi
10873
10874fi
10875
10876
ec685c5e 10877if test "${have_libpython}" != no; then
436868fb 10878
81ecdfbb 10879$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10880
81ecdfbb
RW
10881 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10882 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10883 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10884 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10885 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10886
d13c7322
AB
10887 if test -n "${with_python_libdir}"; then
10888
10889cat >>confdefs.h <<_ACEOF
10890#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10891_ACEOF
10892
10893
10894 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10895 if test "x$prefix" = xNONE; then
10896 test_prefix=/usr/local
10897 else
10898 test_prefix=$prefix
10899 fi
10900 else
10901 test_prefix=$exec_prefix
10902 fi
10903 value=0
10904 case ${with_python_libdir} in
10905 "${test_prefix}"|"${test_prefix}/"*|\
10906 '${exec_prefix}'|'${exec_prefix}/'*)
10907 value=1
10908 ;;
10909 esac
10910
10911cat >>confdefs.h <<_ACEOF
10912#define PYTHON_LIBDIR_RELOCATABLE $value
10913_ACEOF
10914
10915
10916 fi
10917
81ecdfbb
RW
10918 # Flags needed to compile Python code (taken from python-config --cflags).
10919 # We cannot call python-config directly because it will output whatever was
10920 # used when compiling the Python interpreter itself, including flags which
10921 # would make the python-related objects be compiled differently from the
10922 # rest of GDB (e.g., -O2 and -fPIC).
10923 if test "${GCC}" = yes; then
ae292b3a
TT
10924 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10925 # Python headers recommend -DNDEBUG, but it's unclear if that just
10926 # refers to building Python itself. In release mode, though, it
10927 # doesn't hurt for the Python code in gdb to follow.
10928 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10929 fi
436868fb 10930
81ecdfbb
RW
10931 if test "x${tentative_python_cflags}" != x; then
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10933$as_echo_n "checking compiler flags for python code... " >&6; }
10934 for flag in ${tentative_python_cflags}; do
10935 # Check that the compiler accepts it
10936 saved_CFLAGS="$CFLAGS"
10937 CFLAGS="$CFLAGS $flag"
10938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10939/* end confdefs.h. */
81ecdfbb 10940
a9322a30
TT
10941int
10942main ()
10943{
a9322a30
TT
10944
10945 ;
10946 return 0;
10947}
bec39cab 10948_ACEOF
81ecdfbb
RW
10949if ac_fn_c_try_compile "$LINENO"; then :
10950 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10951fi
81ecdfbb
RW
10952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10953 CFLAGS="$saved_CFLAGS"
10954 done
10955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10956$as_echo "${PYTHON_CFLAGS}" >&6; }
10957 fi
043b6510 10958
c83393b9
JB
10959 # On x64 Windows, Python's include headers, and pyconfig.h in
10960 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10961 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10962 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10963 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10964 # The issue was reported to the Python community, but still isn't
10965 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10966
043b6510 10967 case "$gdb_host" in
c83393b9
JB
10968 mingw64)
10969 if test "${GCC}" = yes; then
10970 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10971 fi
10972 ;;
043b6510 10973 esac
81ecdfbb 10974else
6dddc817
DE
10975 # Even if Python support is not compiled in, we need to have this file
10976 # included so that the "python" command, et.al., still exists.
8fd8d003 10977 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10978 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10979fi
9a156167 10980
a4a1c157
PA
10981# Work around Python http://bugs.python.org/issue10112. See also
10982# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10983# no effect. Note that the only test after this that uses Python is
10984# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10985# run without -export-dynamic too.
10986PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10987
10988
ed3ef339
DE
10989
10990
4df42755
DE
10991 if test "${have_libpython}" != no; then
10992 HAVE_PYTHON_TRUE=
10993 HAVE_PYTHON_FALSE='#'
10994else
10995 HAVE_PYTHON_TRUE='#'
10996 HAVE_PYTHON_FALSE=
10997fi
10998
ed3ef339
DE
10999
11000# -------------------- #
11001# Check for libguile. #
11002# -------------------- #
11003
11004
e1402065
DE
11005
11006
11007
11008
11009# Check whether --with-guile was given.
11010if test "${with_guile+set}" = set; then :
11011 withval=$with_guile;
11012else
11013 with_guile=auto
11014fi
11015
11016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11017$as_echo_n "checking whether to use guile... " >&6; }
11018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11019$as_echo "$with_guile" >&6; }
11020
ed3ef339
DE
11021# Extract the first word of "pkg-config", so it can be a program name with args.
11022set dummy pkg-config; ac_word=$2
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11024$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11025if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
11026 $as_echo_n "(cached) " >&6
11027else
11028 case $pkg_config_prog_path in
11029 [\\/]* | ?:[\\/]*)
11030 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11031 ;;
11032 *)
11033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11034for as_dir in $PATH
11035do
11036 IFS=$as_save_IFS
11037 test -z "$as_dir" && as_dir=.
11038 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
11040 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11042 break 2
11043 fi
11044done
11045 done
11046IFS=$as_save_IFS
11047
11048 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11049 ;;
11050esac
11051fi
11052pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11053if test -n "$pkg_config_prog_path"; then
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11055$as_echo "$pkg_config_prog_path" >&6; }
11056else
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11058$as_echo "no" >&6; }
11059fi
11060
11061
11062
ae5369e7 11063try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
ed3ef339
DE
11064have_libguile=no
11065case "${with_guile}" in
11066no)
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11068$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11069 ;;
11070auto)
e1402065
DE
11071 if test "${pkg_config_prog_path}" = "missing"; then
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11073$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11074 else
ed3ef339
DE
11075
11076 pkg_config=${pkg_config_prog_path}
11077 guile_version_list=${try_guile_versions}
11078 flag_errors=no
11079
ed3ef339
DE
11080 found_usable_guile=checking
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11082$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11083 for guile_version in ${guile_version_list}; do
11084 ${pkg_config} --exists ${guile_version} 2>/dev/null
11085 if test $? != 0; then
11086 continue
11087 fi
11088 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11089 if test $? != 0; then
d0ac1c44 11090 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11091 fi
11092 new_LIBS=`${pkg_config} --libs ${guile_version}`
11093 if test $? != 0; then
d0ac1c44 11094 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11095 fi
11096 found_usable_guile=${guile_version}
11097 break
11098 done
11099 if test "${found_usable_guile}" = "checking"; then
11100 if test "${flag_errors}" = "yes"; then
d0ac1c44 11101 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11102 else
11103 found_usable_guile=no
11104 fi
11105 fi
11106 if test "${found_usable_guile}" != no; then
11107 save_CPPFLAGS=$CPPFLAGS
11108 save_LIBS=$LIBS
11109 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11110 LIBS="$LIBS $new_LIBS"
11111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11112/* end confdefs.h. */
11113#include "libguile.h"
11114int
11115main ()
11116{
11117scm_init_guile ();
11118 ;
11119 return 0;
11120}
11121_ACEOF
11122if ac_fn_c_try_link "$LINENO"; then :
11123 have_libguile=yes
11124 GUILE_CPPFLAGS=$new_CPPFLAGS
11125 GUILE_LIBS=$new_LIBS
11126else
11127 found_usable_guile=no
11128fi
11129rm -f core conftest.err conftest.$ac_objext \
11130 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11131 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11132if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11133
11134$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11135
11136
11137fi
11138
ed3ef339
DE
11139 CPPFLAGS=$save_CPPFLAGS
11140 LIBS=$save_LIBS
11141 if test "${found_usable_guile}" = no; then
11142 if test "${flag_errors}" = yes; then
11143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11145as_fn_error $? "linking guile version ${guile_version} test program failed
11146See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11147 fi
11148 fi
11149 fi
11150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11151$as_echo "${found_usable_guile}" >&6; }
11152
e1402065 11153 fi
ed3ef339
DE
11154 ;;
11155yes)
e1402065 11156 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11157 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11158 fi
ed3ef339
DE
11159
11160 pkg_config=${pkg_config_prog_path}
11161 guile_version_list=${try_guile_versions}
11162 flag_errors=yes
11163
ed3ef339
DE
11164 found_usable_guile=checking
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11166$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11167 for guile_version in ${guile_version_list}; do
11168 ${pkg_config} --exists ${guile_version} 2>/dev/null
11169 if test $? != 0; then
11170 continue
11171 fi
11172 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11173 if test $? != 0; then
d0ac1c44 11174 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11175 fi
11176 new_LIBS=`${pkg_config} --libs ${guile_version}`
11177 if test $? != 0; then
d0ac1c44 11178 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11179 fi
11180 found_usable_guile=${guile_version}
11181 break
11182 done
11183 if test "${found_usable_guile}" = "checking"; then
11184 if test "${flag_errors}" = "yes"; then
d0ac1c44 11185 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11186 else
11187 found_usable_guile=no
11188 fi
11189 fi
11190 if test "${found_usable_guile}" != no; then
11191 save_CPPFLAGS=$CPPFLAGS
11192 save_LIBS=$LIBS
11193 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11194 LIBS="$LIBS $new_LIBS"
11195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11196/* end confdefs.h. */
11197#include "libguile.h"
11198int
11199main ()
11200{
11201scm_init_guile ();
11202 ;
11203 return 0;
11204}
11205_ACEOF
11206if ac_fn_c_try_link "$LINENO"; then :
11207 have_libguile=yes
11208 GUILE_CPPFLAGS=$new_CPPFLAGS
11209 GUILE_LIBS=$new_LIBS
11210else
11211 found_usable_guile=no
11212fi
11213rm -f core conftest.err conftest.$ac_objext \
11214 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11215 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11216if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11217
11218$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11219
11220
11221fi
11222
ed3ef339
DE
11223 CPPFLAGS=$save_CPPFLAGS
11224 LIBS=$save_LIBS
11225 if test "${found_usable_guile}" = no; then
11226 if test "${flag_errors}" = yes; then
11227 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11229as_fn_error $? "linking guile version ${guile_version} test program failed
11230See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11231 fi
11232 fi
11233 fi
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11235$as_echo "${found_usable_guile}" >&6; }
11236
11237 ;;
11238[\\/]* | ?:[\\/]*)
e1402065 11239 if test -x "${with_guile}"; then
ed3ef339
DE
11240
11241 pkg_config=${with_guile}
11242 guile_version_list=${try_guile_versions}
11243 flag_errors=yes
11244
ed3ef339
DE
11245 found_usable_guile=checking
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11247$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11248 for guile_version in ${guile_version_list}; do
11249 ${pkg_config} --exists ${guile_version} 2>/dev/null
11250 if test $? != 0; then
11251 continue
11252 fi
11253 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11254 if test $? != 0; then
d0ac1c44 11255 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11256 fi
11257 new_LIBS=`${pkg_config} --libs ${guile_version}`
11258 if test $? != 0; then
d0ac1c44 11259 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11260 fi
11261 found_usable_guile=${guile_version}
11262 break
11263 done
11264 if test "${found_usable_guile}" = "checking"; then
11265 if test "${flag_errors}" = "yes"; then
d0ac1c44 11266 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11267 else
11268 found_usable_guile=no
11269 fi
11270 fi
11271 if test "${found_usable_guile}" != no; then
11272 save_CPPFLAGS=$CPPFLAGS
11273 save_LIBS=$LIBS
11274 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11275 LIBS="$LIBS $new_LIBS"
11276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11277/* end confdefs.h. */
11278#include "libguile.h"
11279int
11280main ()
11281{
11282scm_init_guile ();
11283 ;
11284 return 0;
11285}
11286_ACEOF
11287if ac_fn_c_try_link "$LINENO"; then :
11288 have_libguile=yes
11289 GUILE_CPPFLAGS=$new_CPPFLAGS
11290 GUILE_LIBS=$new_LIBS
11291else
11292 found_usable_guile=no
11293fi
11294rm -f core conftest.err conftest.$ac_objext \
11295 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11296 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11297if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11298
11299$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11300
11301
11302fi
11303
ed3ef339
DE
11304 CPPFLAGS=$save_CPPFLAGS
11305 LIBS=$save_LIBS
11306 if test "${found_usable_guile}" = no; then
11307 if test "${flag_errors}" = yes; then
11308 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11310as_fn_error $? "linking guile version ${guile_version} test program failed
11311See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11312 fi
11313 fi
11314 fi
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11316$as_echo "${found_usable_guile}" >&6; }
11317
e1402065 11318 else
d0ac1c44 11319 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11320 fi
ed3ef339
DE
11321 ;;
11322"" | */*)
11323 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11324 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11325 ;;
11326*)
11327 # A space separate list of guile versions to try, in order.
e1402065 11328 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11329 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11330 fi
ed3ef339
DE
11331
11332 pkg_config=${pkg_config_prog_path}
11333 guile_version_list=${with_guile}
11334 flag_errors=yes
11335
ed3ef339
DE
11336 found_usable_guile=checking
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11338$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11339 for guile_version in ${guile_version_list}; do
11340 ${pkg_config} --exists ${guile_version} 2>/dev/null
11341 if test $? != 0; then
11342 continue
11343 fi
11344 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11345 if test $? != 0; then
d0ac1c44 11346 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11347 fi
11348 new_LIBS=`${pkg_config} --libs ${guile_version}`
11349 if test $? != 0; then
d0ac1c44 11350 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11351 fi
11352 found_usable_guile=${guile_version}
11353 break
11354 done
11355 if test "${found_usable_guile}" = "checking"; then
11356 if test "${flag_errors}" = "yes"; then
d0ac1c44 11357 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11358 else
11359 found_usable_guile=no
11360 fi
11361 fi
11362 if test "${found_usable_guile}" != no; then
11363 save_CPPFLAGS=$CPPFLAGS
11364 save_LIBS=$LIBS
11365 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11366 LIBS="$LIBS $new_LIBS"
11367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11368/* end confdefs.h. */
11369#include "libguile.h"
11370int
11371main ()
11372{
11373scm_init_guile ();
11374 ;
11375 return 0;
11376}
11377_ACEOF
11378if ac_fn_c_try_link "$LINENO"; then :
11379 have_libguile=yes
11380 GUILE_CPPFLAGS=$new_CPPFLAGS
11381 GUILE_LIBS=$new_LIBS
11382else
11383 found_usable_guile=no
11384fi
11385rm -f core conftest.err conftest.$ac_objext \
11386 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11387 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11388if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11389
11390$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11391
11392
11393fi
11394
ed3ef339
DE
11395 CPPFLAGS=$save_CPPFLAGS
11396 LIBS=$save_LIBS
11397 if test "${found_usable_guile}" = no; then
11398 if test "${flag_errors}" = yes; then
11399 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11401as_fn_error $? "linking guile version ${guile_version} test program failed
11402See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11403 fi
11404 fi
11405 fi
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11407$as_echo "${found_usable_guile}" >&6; }
11408
11409 ;;
11410esac
11411
e76c5d17 11412if test "${have_libguile}" != no; then
d342a0da
DE
11413 case "${with_guile}" in
11414 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11415
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11417$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11418if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11419 $as_echo_n "(cached) " >&6
11420else
d342a0da 11421 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11422
11423 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11424 # the 'guild' and 'bindir' variables. In that case, try to guess
11425 # what the program name is, at the risk of getting it wrong if
11426 # Guile was configured with '--program-suffix' or similar.
11427 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11428 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11429 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11430 fi
11431
11432fi
11433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11434$as_echo "$ac_cv_guild_program_name" >&6; }
11435
11436 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11437 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11438 fi
11439
11440 GUILD="$ac_cv_guild_program_name"
11441
11442
d342a0da
DE
11443 ;;
11444 *)
11445
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11447$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11448if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11449 $as_echo_n "(cached) " >&6
11450else
11451 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11452
11453 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11454 # the 'guild' and 'bindir' variables. In that case, try to guess
11455 # what the program name is, at the risk of getting it wrong if
11456 # Guile was configured with '--program-suffix' or similar.
11457 if test "x$ac_cv_guild_program_name" = "x"; then
11458 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11459 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11460 fi
11461
11462fi
11463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11464$as_echo "$ac_cv_guild_program_name" >&6; }
11465
11466 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11467 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11468 fi
11469
11470 GUILD="$ac_cv_guild_program_name"
11471
11472
11473 ;;
11474 esac
e76c5d17
DE
11475
11476
11477 if test "$cross_compiling" = no; then
11478 GUILD_TARGET_FLAG=
11479 else
11480 GUILD_TARGET_FLAG="--target=$host"
11481 fi
11482
11483
11484
11485
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11487$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11488if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11489 $as_echo_n "(cached) " >&6
11490else
11491 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11492 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11493 ac_cv_guild_ok=yes
11494 else
11495 ac_cv_guild_ok=no
11496 fi
11497fi
11498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11499$as_echo "$ac_cv_guild_ok" >&6; }
11500
11501 if test "$ac_cv_guild_ok" = no; then
11502 have_libguile=no
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11504$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11505 fi
11506fi
11507
ed3ef339
DE
11508if test "${have_libguile}" != no; then
11509
11510$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11511
11512 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11513 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11514 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11515 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11516 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11517
11518 save_LIBS="$LIBS"
11519 save_CPPFLAGS="$CPPFLAGS"
11520 LIBS="$GUILE_LIBS"
11521 CPPFLAGS="$GUILE_CPPFLAGS"
11522 for ac_func in scm_new_smob
11523do :
11524 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11525if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11526 cat >>confdefs.h <<_ACEOF
11527#define HAVE_SCM_NEW_SMOB 1
11528_ACEOF
11529
11530fi
11531done
11532
11533 LIBS="$save_LIBS"
11534 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11535else
11536 # Even if Guile support is not compiled in, we need to have these files
11537 # included.
bd810fff 11538 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11539 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11540fi
9a156167 11541
ac534cba 11542
4df42755
DE
11543 if test "${have_libguile}" != no; then
11544 HAVE_GUILE_TRUE=
11545 HAVE_GUILE_FALSE='#'
11546else
11547 HAVE_GUILE_TRUE='#'
11548 HAVE_GUILE_FALSE=
11549fi
11550
ac534cba 11551
62f29fda
TT
11552# ---------------------------- #
11553# Check for source highlight. #
11554# ---------------------------- #
11555
11556SRCHIGH_LIBS=
11557SRCHIGH_CFLAGS=
189b8c2e
ST
11558
11559# Check whether --enable-source-highlight was given.
11560if test "${enable_source_highlight+set}" = set; then :
11561 enableval=$enable_source_highlight; case "${enableval}" in
11562 yes) enable_source_highlight=yes ;;
11563 no) enable_source_highlight=no ;;
11564 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11565esac
11566else
11567 enable_source_highlight=auto
11568fi
11569
11570
11571if test "${enable_source_highlight}" != "no"; then
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11573$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11574 if test "${pkg_config_prog_path}" = "missing"; then
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11576$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11577 if test "${enable_source_highlight}" = "yes"; then
11578 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11579 fi
11580 else
d806ea2d
TT
11581 case "$LDFLAGS" in
11582 *static-libstdc*)
11583 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11584 ;;
11585 esac
11586
189b8c2e 11587 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11588 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11589 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11590
11591$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11592
11593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11594$as_echo "yes" >&6; }
189b8c2e 11595 else
62f29fda
TT
11596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597$as_echo "no" >&6; }
189b8c2e
ST
11598 if test "${enable_source_highlight}" = "yes"; then
11599 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11600 fi
11601 fi
11602 fi
62f29fda
TT
11603fi
11604
11605
11606
05ea2a05
TT
11607# ------------------------- #
11608# Checks for header files. #
11609# ------------------------- #
58bfce93 11610
05ea2a05
TT
11611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11612$as_echo_n "checking for ANSI C header files... " >&6; }
11613if ${ac_cv_header_stdc+:} false; then :
11614 $as_echo_n "(cached) " >&6
58bfce93 11615else
5599c404
MM
11616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11617/* end confdefs.h. */
05ea2a05
TT
11618#include <stdlib.h>
11619#include <stdarg.h>
11620#include <string.h>
11621#include <float.h>
5599c404 11622
05ea2a05
TT
11623int
11624main ()
11625{
5599c404 11626
05ea2a05
TT
11627 ;
11628 return 0;
11629}
5599c404 11630_ACEOF
05ea2a05
TT
11631if ac_fn_c_try_compile "$LINENO"; then :
11632 ac_cv_header_stdc=yes
5599c404 11633else
05ea2a05 11634 ac_cv_header_stdc=no
5599c404 11635fi
05ea2a05 11636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 11637
05ea2a05
TT
11638if test $ac_cv_header_stdc = yes; then
11639 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11641/* end confdefs.h. */
11642#include <string.h>
58bfce93 11643
05ea2a05
TT
11644_ACEOF
11645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11646 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 11647
05ea2a05
TT
11648else
11649 ac_cv_header_stdc=no
11650fi
11651rm -f conftest*
58bfce93 11652
05ea2a05 11653fi
58bfce93 11654
05ea2a05
TT
11655if test $ac_cv_header_stdc = yes; then
11656 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11658/* end confdefs.h. */
11659#include <stdlib.h>
58bfce93 11660
05ea2a05
TT
11661_ACEOF
11662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11663 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 11664
05ea2a05
TT
11665else
11666 ac_cv_header_stdc=no
11667fi
11668rm -f conftest*
58bfce93 11669
05ea2a05 11670fi
58bfce93 11671
05ea2a05
TT
11672if test $ac_cv_header_stdc = yes; then
11673 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11674 if test "$cross_compiling" = yes; then :
11675 :
11676else
11677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11678/* end confdefs.h. */
11679#include <ctype.h>
11680#include <stdlib.h>
11681#if ((' ' & 0x0FF) == 0x020)
11682# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11683# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11684#else
11685# define ISLOWER(c) \
11686 (('a' <= (c) && (c) <= 'i') \
11687 || ('j' <= (c) && (c) <= 'r') \
11688 || ('s' <= (c) && (c) <= 'z'))
11689# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11690#endif
58bfce93 11691
05ea2a05
TT
11692#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11693int
11694main ()
11695{
11696 int i;
11697 for (i = 0; i < 256; i++)
11698 if (XOR (islower (i), ISLOWER (i))
11699 || toupper (i) != TOUPPER (i))
11700 return 2;
11701 return 0;
11702}
11703_ACEOF
11704if ac_fn_c_try_run "$LINENO"; then :
58bfce93 11705
05ea2a05
TT
11706else
11707 ac_cv_header_stdc=no
11708fi
11709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11710 conftest.$ac_objext conftest.beam conftest.$ac_ext
11711fi
58bfce93 11712
05ea2a05
TT
11713fi
11714fi
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11716$as_echo "$ac_cv_header_stdc" >&6; }
11717if test $ac_cv_header_stdc = yes; then
58bfce93 11718
05ea2a05 11719$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 11720
05ea2a05 11721fi
58bfce93 11722
05ea2a05 11723# elf_hp.h is for HP/UX 64-bit shared library support.
8ae8e197 11724for ac_header in nlist.h machine/reg.h \
05ea2a05
TT
11725 thread_db.h \
11726 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11727 sys/resource.h sys/ptrace.h ptrace.h \
8ae8e197 11728 sys/reg.h sys/debugreg.h \
05ea2a05
TT
11729 termios.h elf_hp.h
11730do :
11731 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11732ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11733if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11734 cat >>confdefs.h <<_ACEOF
11735#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11736_ACEOF
58bfce93
MM
11737
11738fi
11739
05ea2a05 11740done
58bfce93 11741
05ea2a05
TT
11742for ac_header in sys/user.h
11743do :
11744 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11745# include <sys/param.h>
11746#endif
58bfce93 11747
05ea2a05
TT
11748"
11749if test "x$ac_cv_header_sys_user_h" = xyes; then :
11750 cat >>confdefs.h <<_ACEOF
11751#define HAVE_SYS_USER_H 1
11752_ACEOF
58bfce93 11753
05ea2a05 11754fi
58bfce93 11755
05ea2a05 11756done
58bfce93 11757
58bfce93 11758
05ea2a05
TT
11759for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11760do :
11761 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11762ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11763if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11764 cat >>confdefs.h <<_ACEOF
11765#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11766_ACEOF
58bfce93 11767
05ea2a05 11768fi
58bfce93 11769
05ea2a05 11770done
58bfce93 11771
05ea2a05
TT
11772for ac_header in term.h
11773do :
11774 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11775# include <curses.h>
11776#endif
58bfce93 11777
05ea2a05
TT
11778"
11779if test "x$ac_cv_header_term_h" = xyes; then :
11780 cat >>confdefs.h <<_ACEOF
11781#define HAVE_TERM_H 1
11782_ACEOF
58bfce93 11783
05ea2a05 11784fi
58bfce93 11785
05ea2a05 11786done
58bfce93 11787
58bfce93 11788
95420d30 11789for ac_header in sys/socket.h
05a6b8c2 11790do :
95420d30
TV
11791 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
11792if test "x$ac_cv_header_sys_socket_h" = xyes; then :
05a6b8c2 11793 cat >>confdefs.h <<_ACEOF
95420d30 11794#define HAVE_SYS_SOCKET_H 1
05a6b8c2
EZ
11795_ACEOF
11796
11797fi
11798
11799done
11800
11801for ac_header in ws2tcpip.h
11802do :
11803 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
11804if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
11805 cat >>confdefs.h <<_ACEOF
11806#define HAVE_WS2TCPIP_H 1
11807_ACEOF
11808
11809fi
11810
11811done
11812
11813
05ea2a05
TT
11814# ------------------------- #
11815# Checks for declarations. #
11816# ------------------------- #
58bfce93 11817
58bfce93 11818
05ea2a05
TT
11819 # Check for presence and size of long long.
11820 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11821if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 11822
05ea2a05
TT
11823cat >>confdefs.h <<_ACEOF
11824#define HAVE_LONG_LONG 1
11825_ACEOF
11826
11827# The cast to long int works around a bug in the HP C Compiler
11828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11830# This bug is HP SR number 8606223364.
11831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11832$as_echo_n "checking size of long long... " >&6; }
11833if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
11834 $as_echo_n "(cached) " >&6
11835else
05ea2a05 11836 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 11837
58bfce93 11838else
05ea2a05
TT
11839 if test "$ac_cv_type_long_long" = yes; then
11840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11842as_fn_error 77 "cannot compute sizeof (long long)
11843See \`config.log' for more details" "$LINENO" 5; }
11844 else
11845 ac_cv_sizeof_long_long=0
11846 fi
58bfce93 11847fi
58bfce93
MM
11848
11849fi
05ea2a05
TT
11850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11851$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 11852
58bfce93 11853
58bfce93 11854
05ea2a05
TT
11855cat >>confdefs.h <<_ACEOF
11856#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11857_ACEOF
58bfce93
MM
11858
11859
05ea2a05 11860fi
58bfce93
MM
11861
11862
05ea2a05
TT
11863 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11864ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11865if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11866 ac_have_decl=1
11867else
11868 ac_have_decl=0
11869fi
58bfce93 11870
05ea2a05
TT
11871cat >>confdefs.h <<_ACEOF
11872#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 11873_ACEOF
05ea2a05
TT
11874ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11875if test "x$ac_cv_have_decl_ffs" = xyes; then :
11876 ac_have_decl=1
11877else
11878 ac_have_decl=0
c56ccc05 11879fi
c56ccc05
MM
11880
11881cat >>confdefs.h <<_ACEOF
05ea2a05 11882#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 11883_ACEOF
05ea2a05
TT
11884ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11885if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11886 ac_have_decl=1
11887else
11888 ac_have_decl=0
c56ccc05 11889fi
c56ccc05
MM
11890
11891cat >>confdefs.h <<_ACEOF
05ea2a05 11892#define HAVE_DECL_ASPRINTF $ac_have_decl
c56ccc05 11893_ACEOF
05ea2a05
TT
11894ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11895if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11896 ac_have_decl=1
11897else
11898 ac_have_decl=0
11899fi
c56ccc05 11900
05ea2a05
TT
11901cat >>confdefs.h <<_ACEOF
11902#define HAVE_DECL_VASPRINTF $ac_have_decl
11903_ACEOF
11904ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11905if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11906 ac_have_decl=1
11907else
11908 ac_have_decl=0
c56ccc05
MM
11909fi
11910
05ea2a05
TT
11911cat >>confdefs.h <<_ACEOF
11912#define HAVE_DECL_SNPRINTF $ac_have_decl
11913_ACEOF
11914ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11915if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11916 ac_have_decl=1
11917else
11918 ac_have_decl=0
58bfce93
MM
11919fi
11920
05ea2a05
TT
11921cat >>confdefs.h <<_ACEOF
11922#define HAVE_DECL_VSNPRINTF $ac_have_decl
11923_ACEOF
c890192f 11924
05ea2a05
TT
11925 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11926if test "x$ac_cv_have_decl_strtol" = xyes; then :
11927 ac_have_decl=1
bec39cab 11928else
05ea2a05
TT
11929 ac_have_decl=0
11930fi
81ecdfbb 11931
05ea2a05
TT
11932cat >>confdefs.h <<_ACEOF
11933#define HAVE_DECL_STRTOL $ac_have_decl
11934_ACEOF
11935ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11936if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11937 ac_have_decl=1
11938else
11939 ac_have_decl=0
11940fi
a9322a30 11941
05ea2a05
TT
11942cat >>confdefs.h <<_ACEOF
11943#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 11944_ACEOF
05ea2a05
TT
11945ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11946if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11947 ac_have_decl=1
bec39cab 11948else
05ea2a05 11949 ac_have_decl=0
a9322a30 11950fi
bec39cab 11951
05ea2a05
TT
11952cat >>confdefs.h <<_ACEOF
11953#define HAVE_DECL_STRTOLL $ac_have_decl
11954_ACEOF
11955ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11956if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11957 ac_have_decl=1
11958else
11959 ac_have_decl=0
11960fi
bec39cab 11961
05ea2a05
TT
11962cat >>confdefs.h <<_ACEOF
11963#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 11964_ACEOF
bec39cab 11965
05ea2a05
TT
11966 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11967if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11968 ac_have_decl=1
bec39cab 11969else
05ea2a05 11970 ac_have_decl=0
81ecdfbb 11971fi
81ecdfbb 11972
05ea2a05
TT
11973cat >>confdefs.h <<_ACEOF
11974#define HAVE_DECL_STRVERSCMP $ac_have_decl
11975_ACEOF
81ecdfbb 11976
81ecdfbb 11977
06825bd1 11978
05ea2a05
TT
11979ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11980if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11981 ac_have_decl=1
81ecdfbb 11982else
05ea2a05 11983 ac_have_decl=0
81ecdfbb 11984fi
bec39cab 11985
05ea2a05
TT
11986cat >>confdefs.h <<_ACEOF
11987#define HAVE_DECL_SNPRINTF $ac_have_decl
11988_ACEOF
81ecdfbb 11989
05ea2a05
TT
11990
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11992$as_echo_n "checking for LC_MESSAGES... " >&6; }
11993if ${am_cv_val_LC_MESSAGES+:} false; then :
11994 $as_echo_n "(cached) " >&6
bec39cab 11995else
81ecdfbb 11996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11997/* end confdefs.h. */
05ea2a05 11998#include <locale.h>
a9322a30
TT
11999int
12000main ()
12001{
05ea2a05
TT
12002return LC_MESSAGES
12003 ;
a9322a30
TT
12004 return 0;
12005}
bec39cab 12006_ACEOF
05ea2a05
TT
12007if ac_fn_c_try_link "$LINENO"; then :
12008 am_cv_val_LC_MESSAGES=yes
bec39cab 12009else
05ea2a05 12010 am_cv_val_LC_MESSAGES=no
81ecdfbb 12011fi
05ea2a05
TT
12012rm -f core conftest.err conftest.$ac_objext \
12013 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12014fi
05ea2a05
TT
12015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12016$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12017 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12018
05ea2a05 12019$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 12020
05ea2a05 12021 fi
5ee754fc 12022
bec39cab 12023
05ea2a05
TT
12024# ------------------ #
12025# Checks for types. #
12026# ------------------ #
12027
12028ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
05a6b8c2
EZ
12029#if HAVE_SYS_SOCKET_H
12030# include <sys/socket.h>
12031#elif HAVE_WS2TCPIP_H
12032# include <ws2tcpip.h>
12033#endif
05ea2a05
TT
12034
12035"
12036if test "x$ac_cv_type_socklen_t" = xyes; then :
12037
12038cat >>confdefs.h <<_ACEOF
12039#define HAVE_SOCKLEN_T 1
bec39cab 12040_ACEOF
c906108c 12041
05ea2a05 12042
bec39cab 12043fi
81ecdfbb 12044
81ecdfbb 12045
05ea2a05
TT
12046# ------------------------------------- #
12047# Checks for compiler characteristics. #
12048# ------------------------------------- #
a9322a30 12049
05ea2a05
TT
12050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12051$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12052if ${ac_cv_c_const+:} false; then :
12053 $as_echo_n "(cached) " >&6
12054else
12055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12056/* end confdefs.h. */
bec39cab 12057
05ea2a05
TT
12058int
12059main ()
12060{
bec39cab 12061
05ea2a05
TT
12062#ifndef __cplusplus
12063 /* Ultrix mips cc rejects this sort of thing. */
12064 typedef int charset[2];
12065 const charset cs = { 0, 0 };
12066 /* SunOS 4.1.1 cc rejects this. */
12067 char const *const *pcpcc;
12068 char **ppc;
12069 /* NEC SVR4.0.2 mips cc rejects this. */
12070 struct point {int x, y;};
12071 static struct point const zero = {0,0};
12072 /* AIX XL C 1.02.0.0 rejects this.
12073 It does not let you subtract one const X* pointer from another in
12074 an arm of an if-expression whose if-part is not a constant
12075 expression */
12076 const char *g = "string";
12077 pcpcc = &g + (g ? g-g : 0);
12078 /* HPUX 7.0 cc rejects these. */
12079 ++pcpcc;
12080 ppc = (char**) pcpcc;
12081 pcpcc = (char const *const *) ppc;
12082 { /* SCO 3.2v4 cc rejects this sort of thing. */
12083 char tx;
12084 char *t = &tx;
12085 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 12086
05ea2a05
TT
12087 *t++ = 0;
12088 if (s) return 0;
12089 }
12090 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12091 int x[] = {25, 17};
12092 const int *foo = &x[0];
12093 ++foo;
12094 }
12095 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12096 typedef const int *iptr;
12097 iptr p = 0;
12098 ++p;
12099 }
12100 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12101 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12102 struct s { int j; const int *ap[3]; } bx;
12103 struct s *b = &bx; b->j = 5;
12104 }
12105 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12106 const int foo = 10;
12107 if (!foo) return 0;
12108 }
12109 return !cs[0] && !zero.x;
12110#endif
5ee754fc 12111
05ea2a05
TT
12112 ;
12113 return 0;
12114}
bec39cab 12115_ACEOF
05ea2a05
TT
12116if ac_fn_c_try_compile "$LINENO"; then :
12117 ac_cv_c_const=yes
12118else
12119 ac_cv_c_const=no
12120fi
12121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12122fi
05ea2a05
TT
12123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12124$as_echo "$ac_cv_c_const" >&6; }
12125if test $ac_cv_c_const = no; then
5ee754fc 12126
05ea2a05 12127$as_echo "#define const /**/" >>confdefs.h
bec39cab 12128
05ea2a05
TT
12129fi
12130
12131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12132$as_echo_n "checking for inline... " >&6; }
12133if ${ac_cv_c_inline+:} false; then :
12134 $as_echo_n "(cached) " >&6
12135else
12136 ac_cv_c_inline=no
12137for ac_kw in inline __inline__ __inline; do
12138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12139/* end confdefs.h. */
12140#ifndef __cplusplus
12141typedef int foo_t;
12142static $ac_kw foo_t static_foo () {return 0; }
12143$ac_kw foo_t foo () {return 0; }
81ecdfbb 12144#endif
bec39cab 12145
a8111142 12146_ACEOF
05ea2a05
TT
12147if ac_fn_c_try_compile "$LINENO"; then :
12148 ac_cv_c_inline=$ac_kw
a8111142 12149fi
05ea2a05
TT
12150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12151 test "$ac_cv_c_inline" != no && break
81ecdfbb 12152done
a8111142 12153
05ea2a05
TT
12154fi
12155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12156$as_echo "$ac_cv_c_inline" >&6; }
a8111142 12157
05ea2a05
TT
12158case $ac_cv_c_inline in
12159 inline | yes) ;;
12160 *)
12161 case $ac_cv_c_inline in
12162 no) ac_val=;;
12163 *) ac_val=$ac_cv_c_inline;;
12164 esac
12165 cat >>confdefs.h <<_ACEOF
12166#ifndef __cplusplus
12167#define inline $ac_val
12168#endif
07697489 12169_ACEOF
05ea2a05
TT
12170 ;;
12171esac
07697489 12172
05ea2a05
TT
12173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12174$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12175if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
12176 $as_echo_n "(cached) " >&6
12177else
05ea2a05
TT
12178 ac_cv_c_bigendian=unknown
12179 # See if we're dealing with a universal compiler.
12180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12181/* end confdefs.h. */
12182#ifndef __APPLE_CC__
12183 not a universal capable compiler
12184 #endif
12185 typedef int dummy;
07697489 12186
05ea2a05
TT
12187_ACEOF
12188if ac_fn_c_try_compile "$LINENO"; then :
07697489 12189
05ea2a05
TT
12190 # Check for potential -arch flags. It is not universal unless
12191 # there are at least two -arch flags with different values.
12192 ac_arch=
12193 ac_prev=
12194 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12195 if test -n "$ac_prev"; then
12196 case $ac_word in
12197 i?86 | x86_64 | ppc | ppc64)
12198 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12199 ac_arch=$ac_word
12200 else
12201 ac_cv_c_bigendian=universal
12202 break
12203 fi
12204 ;;
12205 esac
12206 ac_prev=
12207 elif test "x$ac_word" = "x-arch"; then
12208 ac_prev=arch
12209 fi
12210 done
07697489 12211fi
05ea2a05
TT
12212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12213 if test $ac_cv_c_bigendian = unknown; then
12214 # See if sys/param.h defines the BYTE_ORDER macro.
12215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12216/* end confdefs.h. */
12217#include <sys/types.h>
12218 #include <sys/param.h>
07697489 12219
05ea2a05
TT
12220int
12221main ()
12222{
12223#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12224 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12225 && LITTLE_ENDIAN)
12226 bogus endian macros
12227 #endif
07697489 12228
05ea2a05
TT
12229 ;
12230 return 0;
12231}
07697489 12232_ACEOF
05ea2a05
TT
12233if ac_fn_c_try_compile "$LINENO"; then :
12234 # It does; now see whether it defined to BIG_ENDIAN or not.
12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236/* end confdefs.h. */
12237#include <sys/types.h>
12238 #include <sys/param.h>
07697489 12239
05ea2a05
TT
12240int
12241main ()
12242{
12243#if BYTE_ORDER != BIG_ENDIAN
12244 not big endian
12245 #endif
07697489 12246
05ea2a05
TT
12247 ;
12248 return 0;
12249}
07697489 12250_ACEOF
05ea2a05
TT
12251if ac_fn_c_try_compile "$LINENO"; then :
12252 ac_cv_c_bigendian=yes
07697489 12253else
05ea2a05 12254 ac_cv_c_bigendian=no
07697489 12255fi
05ea2a05 12256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12257fi
05ea2a05
TT
12258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12259 fi
12260 if test $ac_cv_c_bigendian = unknown; then
12261 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12263/* end confdefs.h. */
12264#include <limits.h>
07697489 12265
05ea2a05
TT
12266int
12267main ()
12268{
12269#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12270 bogus endian macros
12271 #endif
07697489 12272
05ea2a05
TT
12273 ;
12274 return 0;
12275}
07697489 12276_ACEOF
05ea2a05
TT
12277if ac_fn_c_try_compile "$LINENO"; then :
12278 # It does; now see whether it defined to _BIG_ENDIAN or not.
12279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12280/* end confdefs.h. */
12281#include <limits.h>
07697489 12282
05ea2a05
TT
12283int
12284main ()
12285{
12286#ifndef _BIG_ENDIAN
12287 not big endian
12288 #endif
07697489 12289
05ea2a05
TT
12290 ;
12291 return 0;
12292}
07697489 12293_ACEOF
05ea2a05
TT
12294if ac_fn_c_try_compile "$LINENO"; then :
12295 ac_cv_c_bigendian=yes
07697489 12296else
05ea2a05 12297 ac_cv_c_bigendian=no
07697489 12298fi
05ea2a05 12299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12300fi
05ea2a05
TT
12301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12302 fi
12303 if test $ac_cv_c_bigendian = unknown; then
12304 # Compile a test program.
12305 if test "$cross_compiling" = yes; then :
12306 # Try to guess by grepping values from an object file.
12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12308/* end confdefs.h. */
12309short int ascii_mm[] =
12310 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12311 short int ascii_ii[] =
12312 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12313 int use_ascii (int i) {
12314 return ascii_mm[i] + ascii_ii[i];
12315 }
12316 short int ebcdic_ii[] =
12317 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12318 short int ebcdic_mm[] =
12319 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12320 int use_ebcdic (int i) {
12321 return ebcdic_mm[i] + ebcdic_ii[i];
12322 }
12323 extern int foo;
07697489 12324
05ea2a05
TT
12325int
12326main ()
12327{
12328return use_ascii (foo) == use_ebcdic (foo);
12329 ;
12330 return 0;
12331}
07697489 12332_ACEOF
05ea2a05
TT
12333if ac_fn_c_try_compile "$LINENO"; then :
12334 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12335 ac_cv_c_bigendian=yes
12336 fi
12337 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12338 if test "$ac_cv_c_bigendian" = unknown; then
12339 ac_cv_c_bigendian=no
12340 else
12341 # finding both strings is unlikely to happen, but who knows?
12342 ac_cv_c_bigendian=unknown
12343 fi
12344 fi
07697489 12345fi
05ea2a05
TT
12346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12347else
12348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12349/* end confdefs.h. */
12350$ac_includes_default
12351int
12352main ()
12353{
07697489 12354
05ea2a05
TT
12355 /* Are we little or big endian? From Harbison&Steele. */
12356 union
12357 {
12358 long int l;
12359 char c[sizeof (long int)];
12360 } u;
12361 u.l = 1;
12362 return u.c[sizeof (long int) - 1] == 1;
12363
12364 ;
12365 return 0;
12366}
07697489 12367_ACEOF
05ea2a05
TT
12368if ac_fn_c_try_run "$LINENO"; then :
12369 ac_cv_c_bigendian=no
07697489 12370else
05ea2a05
TT
12371 ac_cv_c_bigendian=yes
12372fi
12373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12374 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12375fi
12376
05ea2a05 12377 fi
07697489 12378fi
05ea2a05
TT
12379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12380$as_echo "$ac_cv_c_bigendian" >&6; }
12381 case $ac_cv_c_bigendian in #(
12382 yes)
12383 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12384;; #(
12385 no)
12386 ;; #(
12387 universal)
07697489 12388
05ea2a05 12389$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12390
05ea2a05
TT
12391 ;; #(
12392 *)
12393 as_fn_error $? "unknown endianness
12394 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12395 esac
07697489
PA
12396
12397
05ea2a05
TT
12398# ------------------------------ #
12399# Checks for library functions. #
12400# ------------------------------ #
81ecdfbb 12401
05ea2a05 12402for ac_func in getuid getgid \
8ae8e197 12403 pipe pread pread64 pwrite resize_term \
05ea2a05
TT
12404 getpgid setsid \
12405 sigaction sigsetmask socketpair \
12406 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12407 setrlimit getrlimit posix_madvise waitpid \
12408 use_default_colors
12409do :
12410 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12411ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12412if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12413 cat >>confdefs.h <<_ACEOF
12414#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12415_ACEOF
5ee754fc 12416
05ea2a05
TT
12417fi
12418done
5ee754fc 12419
05ea2a05
TT
12420
12421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12422$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12423if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12424 $as_echo_n "(cached) " >&6
bec39cab 12425else
81ecdfbb 12426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12427/* end confdefs.h. */
05ea2a05 12428#include <langinfo.h>
a9322a30
TT
12429int
12430main ()
12431{
05ea2a05 12432char* cs = nl_langinfo(CODESET);
a9322a30
TT
12433 ;
12434 return 0;
12435}
bec39cab 12436_ACEOF
81ecdfbb 12437if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12438 am_cv_langinfo_codeset=yes
bec39cab 12439else
05ea2a05 12440 am_cv_langinfo_codeset=no
81ecdfbb
RW
12441fi
12442rm -f core conftest.err conftest.$ac_objext \
12443 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12444
81ecdfbb 12445fi
05ea2a05
TT
12446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12447$as_echo "$am_cv_langinfo_codeset" >&6; }
12448 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12449
05ea2a05 12450$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12451
12452 fi
12453
05ea2a05
TT
12454ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12455if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12456
05ea2a05 12457else
81ecdfbb
RW
12458
12459cat >>confdefs.h <<_ACEOF
05ea2a05 12460#define size_t unsigned int
7eb368b3 12461_ACEOF
7eb368b3 12462
7eb368b3 12463fi
7eb368b3 12464
7eb368b3 12465
a9322a30 12466
7eb368b3 12467
05ea2a05
TT
12468 for ac_header in $ac_header_list
12469do :
12470 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12471ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12472"
12473if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12474 cat >>confdefs.h <<_ACEOF
12475#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12476_ACEOF
7eb368b3 12477
05ea2a05 12478fi
7eb368b3 12479
05ea2a05 12480done
a9322a30 12481
05ea2a05
TT
12482
12483
12484
12485
12486
12487
12488ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12489if test "x$ac_cv_type_pid_t" = xyes; then :
12490
12491else
bec39cab 12492
a9322a30 12493cat >>confdefs.h <<_ACEOF
05ea2a05 12494#define pid_t int
a9322a30
TT
12495_ACEOF
12496
05ea2a05
TT
12497fi
12498
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12500$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12501if ${ac_cv_path_SED+:} false; then :
12502 $as_echo_n "(cached) " >&6
12503else
12504 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12505 for ac_i in 1 2 3 4 5 6 7; do
12506 ac_script="$ac_script$as_nl$ac_script"
12507 done
12508 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12509 { ac_script=; unset ac_script;}
12510 if test -z "$SED"; then
12511 ac_path_SED_found=false
12512 # Loop through the user's path and test for each of PROGNAME-LIST
12513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12514for as_dir in $PATH
12515do
12516 IFS=$as_save_IFS
12517 test -z "$as_dir" && as_dir=.
12518 for ac_prog in sed gsed; do
12519 for ac_exec_ext in '' $ac_executable_extensions; do
12520 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12521 as_fn_executable_p "$ac_path_SED" || continue
12522# Check for GNU ac_path_SED and select it if it is found.
12523 # Check for GNU $ac_path_SED
12524case `"$ac_path_SED" --version 2>&1` in
12525*GNU*)
12526 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12527*)
12528 ac_count=0
12529 $as_echo_n 0123456789 >"conftest.in"
12530 while :
12531 do
12532 cat "conftest.in" "conftest.in" >"conftest.tmp"
12533 mv "conftest.tmp" "conftest.in"
12534 cp "conftest.in" "conftest.nl"
12535 $as_echo '' >> "conftest.nl"
12536 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12537 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12538 as_fn_arith $ac_count + 1 && ac_count=$as_val
12539 if test $ac_count -gt ${ac_path_SED_max-0}; then
12540 # Best one so far, save it but keep looking for a better one
12541 ac_cv_path_SED="$ac_path_SED"
12542 ac_path_SED_max=$ac_count
12543 fi
12544 # 10*(2^10) chars as input seems more than enough
12545 test $ac_count -gt 10 && break
12546 done
12547 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12548esac
a9322a30 12549
05ea2a05
TT
12550 $ac_path_SED_found && break 3
12551 done
12552 done
12553 done
12554IFS=$as_save_IFS
12555 if test -z "$ac_cv_path_SED"; then
12556 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12557 fi
12558else
12559 ac_cv_path_SED=$SED
a9322a30
TT
12560fi
12561
05ea2a05
TT
12562fi
12563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12564$as_echo "$ac_cv_path_SED" >&6; }
12565 SED="$ac_cv_path_SED"
12566 rm -f conftest.sed
a9322a30 12567
a9322a30 12568
db6878ac
SM
12569 # Set the 'development' global.
12570 . $srcdir/../bfd/development.sh
12571
05ea2a05
TT
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12573$as_echo_n "checking for ANSI C header files... " >&6; }
12574if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12575 $as_echo_n "(cached) " >&6
a9322a30 12576else
81ecdfbb 12577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12578/* end confdefs.h. */
05ea2a05
TT
12579#include <stdlib.h>
12580#include <stdarg.h>
12581#include <string.h>
12582#include <float.h>
a9322a30
TT
12583
12584int
12585main ()
12586{
d0ac1c44 12587
a9322a30
TT
12588 ;
12589 return 0;
12590}
bec39cab 12591_ACEOF
81ecdfbb 12592if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 12593 ac_cv_header_stdc=yes
5ee754fc 12594else
05ea2a05 12595 ac_cv_header_stdc=no
5ee754fc 12596fi
81ecdfbb 12597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12598
05ea2a05
TT
12599if test $ac_cv_header_stdc = yes; then
12600 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12602/* end confdefs.h. */
12603#include <string.h>
bec39cab 12604
05ea2a05
TT
12605_ACEOF
12606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12607 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12608
bec39cab 12609else
05ea2a05
TT
12610 ac_cv_header_stdc=no
12611fi
12612rm -f conftest*
12613
12614fi
12615
12616if test $ac_cv_header_stdc = yes; then
12617 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12619/* end confdefs.h. */
05ea2a05 12620#include <stdlib.h>
a9322a30 12621
bec39cab 12622_ACEOF
05ea2a05
TT
12623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12624 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 12625
05ea2a05
TT
12626else
12627 ac_cv_header_stdc=no
5ee754fc 12628fi
05ea2a05 12629rm -f conftest*
5ee754fc 12630
05ea2a05 12631fi
bec39cab 12632
05ea2a05
TT
12633if test $ac_cv_header_stdc = yes; then
12634 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12635 if test "$cross_compiling" = yes; then :
12636 :
bec39cab 12637else
05ea2a05 12638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 12639/* end confdefs.h. */
05ea2a05
TT
12640#include <ctype.h>
12641#include <stdlib.h>
12642#if ((' ' & 0x0FF) == 0x020)
12643# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12644# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12645#else
12646# define ISLOWER(c) \
12647 (('a' <= (c) && (c) <= 'i') \
12648 || ('j' <= (c) && (c) <= 'r') \
12649 || ('s' <= (c) && (c) <= 'z'))
12650# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12651#endif
a9322a30 12652
05ea2a05 12653#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12654int
12655main ()
12656{
05ea2a05
TT
12657 int i;
12658 for (i = 0; i < 256; i++)
12659 if (XOR (islower (i), ISLOWER (i))
12660 || toupper (i) != TOUPPER (i))
12661 return 2;
a9322a30
TT
12662 return 0;
12663}
bec39cab 12664_ACEOF
05ea2a05 12665if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12666
5ee754fc 12667else
05ea2a05 12668 ac_cv_header_stdc=no
5ee754fc 12669fi
05ea2a05
TT
12670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12671 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 12672fi
bec39cab 12673
05ea2a05
TT
12674fi
12675fi
12676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12677$as_echo "$ac_cv_header_stdc" >&6; }
12678if test $ac_cv_header_stdc = yes; then
81ecdfbb 12679
05ea2a05
TT
12680$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12681
12682fi
81ecdfbb 12683
05ea2a05
TT
12684 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12685# for constant arguments. Useless!
12686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12687$as_echo_n "checking for working alloca.h... " >&6; }
12688if ${ac_cv_working_alloca_h+:} false; then :
12689 $as_echo_n "(cached) " >&6
12690else
12691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12692/* end confdefs.h. */
12693#include <alloca.h>
7eb368b3
NR
12694int
12695main ()
12696{
05ea2a05
TT
12697char *p = (char *) alloca (2 * sizeof (int));
12698 if (p) return 0;
7eb368b3
NR
12699 ;
12700 return 0;
12701}
12702_ACEOF
05ea2a05
TT
12703if ac_fn_c_try_link "$LINENO"; then :
12704 ac_cv_working_alloca_h=yes
81ecdfbb 12705else
05ea2a05 12706 ac_cv_working_alloca_h=no
a9322a30 12707fi
05ea2a05
TT
12708rm -f core conftest.err conftest.$ac_objext \
12709 conftest$ac_exeext conftest.$ac_ext
a9322a30 12710fi
05ea2a05
TT
12711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12712$as_echo "$ac_cv_working_alloca_h" >&6; }
12713if test $ac_cv_working_alloca_h = yes; then
12714
12715$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 12716
7eb368b3 12717fi
05ea2a05
TT
12718
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12720$as_echo_n "checking for alloca... " >&6; }
12721if ${ac_cv_func_alloca_works+:} false; then :
12722 $as_echo_n "(cached) " >&6
bec39cab 12723else
81ecdfbb 12724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12725/* end confdefs.h. */
05ea2a05
TT
12726#ifdef __GNUC__
12727# define alloca __builtin_alloca
12728#else
12729# ifdef _MSC_VER
12730# include <malloc.h>
12731# define alloca _alloca
12732# else
12733# ifdef HAVE_ALLOCA_H
12734# include <alloca.h>
12735# else
12736# ifdef _AIX
12737 #pragma alloca
12738# else
12739# ifndef alloca /* predefined by HP cc +Olibcalls */
12740void *alloca (size_t);
12741# endif
12742# endif
12743# endif
12744# endif
12745#endif
12746
d3ea6809
MM
12747int
12748main ()
12749{
05ea2a05
TT
12750char *p = (char *) alloca (1);
12751 if (p) return 0;
81ecdfbb
RW
12752 ;
12753 return 0;
d3ea6809
MM
12754}
12755_ACEOF
05ea2a05
TT
12756if ac_fn_c_try_link "$LINENO"; then :
12757 ac_cv_func_alloca_works=yes
d3ea6809 12758else
05ea2a05 12759 ac_cv_func_alloca_works=no
a9322a30 12760fi
05ea2a05
TT
12761rm -f core conftest.err conftest.$ac_objext \
12762 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12763fi
05ea2a05
TT
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12765$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 12766
05ea2a05 12767if test $ac_cv_func_alloca_works = yes; then
d3ea6809 12768
05ea2a05 12769$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 12770
05ea2a05
TT
12771else
12772 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12773# that cause trouble. Some versions do not even contain alloca or
12774# contain a buggy version. If you still want to use their alloca,
12775# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 12776
05ea2a05 12777ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 12778
05ea2a05 12779$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
12780
12781
05ea2a05
TT
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12783$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12784if ${ac_cv_os_cray+:} false; then :
12785 $as_echo_n "(cached) " >&6
12786else
12787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12788/* end confdefs.h. */
12789#if defined CRAY && ! defined CRAY2
12790webecray
12791#else
12792wenotbecray
12793#endif
12794
12795_ACEOF
12796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12797 $EGREP "webecray" >/dev/null 2>&1; then :
12798 ac_cv_os_cray=yes
12799else
12800 ac_cv_os_cray=no
12801fi
12802rm -f conftest*
12803
12804fi
12805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12806$as_echo "$ac_cv_os_cray" >&6; }
12807if test $ac_cv_os_cray = yes; then
12808 for ac_func in _getb67 GETB67 getb67; do
12809 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12810ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12811if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12812
12813cat >>confdefs.h <<_ACEOF
12814#define CRAY_STACKSEG_END $ac_func
12815_ACEOF
12816
12817 break
12818fi
12819
12820 done
12821fi
12822
12823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12824$as_echo_n "checking stack direction for C alloca... " >&6; }
12825if ${ac_cv_c_stack_direction+:} false; then :
12826 $as_echo_n "(cached) " >&6
12827else
12828 if test "$cross_compiling" = yes; then :
12829 ac_cv_c_stack_direction=0
12830else
12831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12832/* end confdefs.h. */
12833$ac_includes_default
12834int
12835find_stack_direction (int *addr, int depth)
12836{
12837 int dir, dummy = 0;
12838 if (! addr)
12839 addr = &dummy;
12840 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12841 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12842 return dir + dummy;
12843}
12844
12845int
12846main (int argc, char **argv)
12847{
12848 return find_stack_direction (0, argc + !argv + 20) < 0;
12849}
12850_ACEOF
12851if ac_fn_c_try_run "$LINENO"; then :
12852 ac_cv_c_stack_direction=1
12853else
12854 ac_cv_c_stack_direction=-1
12855fi
12856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12857 conftest.$ac_objext conftest.beam conftest.$ac_ext
12858fi
12859
12860fi
12861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12862$as_echo "$ac_cv_c_stack_direction" >&6; }
12863cat >>confdefs.h <<_ACEOF
12864#define STACK_DIRECTION $ac_cv_c_stack_direction
12865_ACEOF
12866
12867
12868fi
12869
12870
12871 WIN32APILIBS=
12872 case ${host} in
12873 *mingw32*)
12874
12875$as_echo "#define USE_WIN32API 1" >>confdefs.h
12876
12877 WIN32APILIBS="-lws2_32"
12878 ;;
12879 esac
12880
12881
12882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12883$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12884if ${am_cv_langinfo_codeset+:} false; then :
12885 $as_echo_n "(cached) " >&6
12886else
12887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12888/* end confdefs.h. */
12889#include <langinfo.h>
12890int
12891main ()
12892{
12893char* cs = nl_langinfo(CODESET);
12894 ;
12895 return 0;
12896}
12897_ACEOF
12898if ac_fn_c_try_link "$LINENO"; then :
12899 am_cv_langinfo_codeset=yes
12900else
12901 am_cv_langinfo_codeset=no
12902fi
12903rm -f core conftest.err conftest.$ac_objext \
12904 conftest$ac_exeext conftest.$ac_ext
12905
12906fi
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12908$as_echo "$am_cv_langinfo_codeset" >&6; }
12909 if test $am_cv_langinfo_codeset = yes; then
12910
12911$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12912
12913 fi
12914
12915
c8693053 12916 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
12917do :
12918 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 12919ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12920if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12921 cat >>confdefs.h <<_ACEOF
81ecdfbb 12922#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12923_ACEOF
b757528f 12924
b757528f 12925fi
bec39cab 12926
a9322a30 12927done
a3828db0 12928
d0ac1c44
SM
12929
12930
a9322a30 12931for ac_func in getpagesize
81ecdfbb
RW
12932do :
12933 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12934if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12935 cat >>confdefs.h <<_ACEOF
81ecdfbb 12936#define HAVE_GETPAGESIZE 1
bec39cab 12937_ACEOF
bcb3dc3d 12938
bcb3dc3d
MK
12939fi
12940done
12941
81ecdfbb
RW
12942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12943$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12944if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12945 $as_echo_n "(cached) " >&6
a9322a30 12946else
81ecdfbb 12947 if test "$cross_compiling" = yes; then :
a9322a30 12948 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12949else
81ecdfbb 12950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12951/* end confdefs.h. */
a9322a30
TT
12952$ac_includes_default
12953/* malloc might have been renamed as rpl_malloc. */
12954#undef malloc
bec39cab 12955
a9322a30
TT
12956/* Thanks to Mike Haertel and Jim Avera for this test.
12957 Here is a matrix of mmap possibilities:
12958 mmap private not fixed
12959 mmap private fixed at somewhere currently unmapped
12960 mmap private fixed at somewhere already mapped
12961 mmap shared not fixed
12962 mmap shared fixed at somewhere currently unmapped
12963 mmap shared fixed at somewhere already mapped
12964 For private mappings, we should verify that changes cannot be read()
12965 back from the file, nor mmap's back from the file at a different
12966 address. (There have been systems where private was not correctly
12967 implemented like the infamous i386 svr4.0, and systems where the
12968 VM page cache was not coherent with the file system buffer cache
12969 like early versions of FreeBSD and possibly contemporary NetBSD.)
12970 For shared mappings, we should conversely verify that changes get
12971 propagated back to all the places they're supposed to be.
bec39cab 12972
a9322a30
TT
12973 Grep wants private fixed already mapped.
12974 The main things grep needs to know about mmap are:
12975 * does it exist and is it safe to write into the mmap'd area
12976 * how to use it (BSD variants) */
8b9cf735 12977
a9322a30
TT
12978#include <fcntl.h>
12979#include <sys/mman.h>
8b9cf735 12980
81ecdfbb 12981#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12982char *malloc ();
a3828db0
MK
12983#endif
12984
a9322a30 12985/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12986#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12987# ifdef _SC_PAGESIZE
12988# define getpagesize() sysconf(_SC_PAGESIZE)
12989# else /* no _SC_PAGESIZE */
81ecdfbb 12990# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12991# include <sys/param.h>
12992# ifdef EXEC_PAGESIZE
12993# define getpagesize() EXEC_PAGESIZE
12994# else /* no EXEC_PAGESIZE */
12995# ifdef NBPG
12996# define getpagesize() NBPG * CLSIZE
12997# ifndef CLSIZE
12998# define CLSIZE 1
12999# endif /* no CLSIZE */
13000# else /* no NBPG */
13001# ifdef NBPC
13002# define getpagesize() NBPC
13003# else /* no NBPC */
13004# ifdef PAGESIZE
13005# define getpagesize() PAGESIZE
13006# endif /* PAGESIZE */
13007# endif /* no NBPC */
13008# endif /* no NBPG */
13009# endif /* no EXEC_PAGESIZE */
13010# else /* no HAVE_SYS_PARAM_H */
13011# define getpagesize() 8192 /* punt totally */
13012# endif /* no HAVE_SYS_PARAM_H */
13013# endif /* no _SC_PAGESIZE */
13014
13015#endif /* no HAVE_GETPAGESIZE */
13016
bec39cab
AC
13017int
13018main ()
13019{
a9322a30 13020 char *data, *data2, *data3;
d0ac1c44 13021 const char *cdata2;
a9322a30 13022 int i, pagesize;
d0ac1c44 13023 int fd, fd2;
a9322a30
TT
13024
13025 pagesize = getpagesize ();
13026
13027 /* First, make a file with some known garbage in it. */
13028 data = (char *) malloc (pagesize);
13029 if (!data)
81ecdfbb 13030 return 1;
a9322a30
TT
13031 for (i = 0; i < pagesize; ++i)
13032 *(data + i) = rand ();
13033 umask (0);
13034 fd = creat ("conftest.mmap", 0600);
13035 if (fd < 0)
d0ac1c44 13036 return 2;
a9322a30 13037 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13038 return 3;
a9322a30
TT
13039 close (fd);
13040
d0ac1c44
SM
13041 /* Next, check that the tail of a page is zero-filled. File must have
13042 non-zero length, otherwise we risk SIGBUS for entire page. */
13043 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13044 if (fd2 < 0)
13045 return 4;
13046 cdata2 = "";
13047 if (write (fd2, cdata2, 1) != 1)
13048 return 5;
13049 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13050 if (data2 == MAP_FAILED)
13051 return 6;
13052 for (i = 0; i < pagesize; ++i)
13053 if (*(data2 + i))
13054 return 7;
13055 close (fd2);
13056 if (munmap (data2, pagesize))
13057 return 8;
13058
a9322a30
TT
13059 /* Next, try to mmap the file at a fixed address which already has
13060 something else allocated at it. If we can, also make sure that
13061 we see the same garbage. */
13062 fd = open ("conftest.mmap", O_RDWR);
13063 if (fd < 0)
d0ac1c44 13064 return 9;
a9322a30
TT
13065 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13066 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13067 return 10;
a9322a30
TT
13068 for (i = 0; i < pagesize; ++i)
13069 if (*(data + i) != *(data2 + i))
d0ac1c44 13070 return 11;
a9322a30
TT
13071
13072 /* Finally, make sure that changes to the mapped area do not
13073 percolate back to the file as seen by read(). (This is a bug on
13074 some variants of i386 svr4.0.) */
13075 for (i = 0; i < pagesize; ++i)
13076 *(data2 + i) = *(data2 + i) + 1;
13077 data3 = (char *) malloc (pagesize);
13078 if (!data3)
d0ac1c44 13079 return 12;
a9322a30 13080 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13081 return 13;
a9322a30
TT
13082 for (i = 0; i < pagesize; ++i)
13083 if (*(data + i) != *(data3 + i))
d0ac1c44 13084 return 14;
a9322a30 13085 close (fd);
81ecdfbb 13086 return 0;
bec39cab
AC
13087}
13088_ACEOF
81ecdfbb 13089if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13090 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13091else
81ecdfbb 13092 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13093fi
81ecdfbb
RW
13094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13095 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13096fi
81ecdfbb 13097
a9322a30 13098fi
81ecdfbb
RW
13099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13100$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13101if test $ac_cv_func_mmap_fixed_mapped = yes; then
13102
81ecdfbb 13103$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13104
086ec9eb 13105fi
d0ac1c44 13106rm -f conftest.mmap conftest.txt
a3828db0 13107
05ea2a05 13108 for ac_header in vfork.h
81ecdfbb
RW
13109do :
13110 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13111if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13112 cat >>confdefs.h <<_ACEOF
81ecdfbb 13113#define HAVE_VFORK_H 1
bec39cab 13114_ACEOF
c906108c
SS
13115
13116fi
a9322a30 13117
a3828db0 13118done
c906108c 13119
a9322a30 13120for ac_func in fork vfork
81ecdfbb
RW
13121do :
13122 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13123ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13124if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13125 cat >>confdefs.h <<_ACEOF
81ecdfbb 13126#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13127_ACEOF
b83266a0 13128
97bf5e38 13129fi
a3828db0 13130done
b83266a0 13131
a9322a30 13132if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13134$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13135if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13136 $as_echo_n "(cached) " >&6
a9322a30 13137else
81ecdfbb 13138 if test "$cross_compiling" = yes; then :
a9322a30
TT
13139 ac_cv_func_fork_works=cross
13140else
81ecdfbb
RW
13141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13142/* end confdefs.h. */
13143$ac_includes_default
13144int
13145main ()
13146{
13147
13148 /* By Ruediger Kuhlmann. */
13149 return fork () < 0;
13150
13151 ;
13152 return 0;
13153}
a9322a30 13154_ACEOF
81ecdfbb 13155if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13156 ac_cv_func_fork_works=yes
13157else
81ecdfbb 13158 ac_cv_func_fork_works=no
a9322a30 13159fi
81ecdfbb
RW
13160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13161 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13162fi
81ecdfbb 13163
a9322a30 13164fi
81ecdfbb
RW
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13166$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13167
13168else
13169 ac_cv_func_fork_works=$ac_cv_func_fork
13170fi
13171if test "x$ac_cv_func_fork_works" = xcross; then
13172 case $host in
13173 *-*-amigaos* | *-*-msdosdjgpp*)
13174 # Override, as these systems have only a dummy fork() stub
13175 ac_cv_func_fork_works=no
13176 ;;
13177 *)
13178 ac_cv_func_fork_works=yes
13179 ;;
13180 esac
81ecdfbb
RW
13181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13182$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13183fi
13184ac_cv_func_vfork_works=$ac_cv_func_vfork
13185if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13187$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13188if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13189 $as_echo_n "(cached) " >&6
a9322a30 13190else
81ecdfbb 13191 if test "$cross_compiling" = yes; then :
a9322a30
TT
13192 ac_cv_func_vfork_works=cross
13193else
81ecdfbb 13194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13195/* end confdefs.h. */
13196/* Thanks to Paul Eggert for this test. */
81ecdfbb 13197$ac_includes_default
a9322a30 13198#include <sys/wait.h>
81ecdfbb 13199#ifdef HAVE_VFORK_H
a9322a30
TT
13200# include <vfork.h>
13201#endif
13202/* On some sparc systems, changes by the child to local and incoming
13203 argument registers are propagated back to the parent. The compiler
13204 is told about this with #include <vfork.h>, but some compilers
13205 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13206 static variable whose address is put into a register that is
13207 clobbered by the vfork. */
13208static void
13209#ifdef __cplusplus
13210sparc_address_test (int arg)
13211# else
13212sparc_address_test (arg) int arg;
13213#endif
13214{
13215 static pid_t child;
13216 if (!child) {
13217 child = vfork ();
13218 if (child < 0) {
13219 perror ("vfork");
13220 _exit(2);
13221 }
13222 if (!child) {
13223 arg = getpid();
13224 write(-1, "", 0);
13225 _exit (arg);
13226 }
13227 }
13228}
13229
13230int
13231main ()
13232{
13233 pid_t parent = getpid ();
13234 pid_t child;
13235
13236 sparc_address_test (0);
13237
13238 child = vfork ();
13239
13240 if (child == 0) {
13241 /* Here is another test for sparc vfork register problems. This
13242 test uses lots of local variables, at least as many local
13243 variables as main has allocated so far including compiler
13244 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13245 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13246 reuse the register of parent for one of the local variables,
13247 since it will think that parent can't possibly be used any more
13248 in this routine. Assigning to the local variable will thus
13249 munge parent in the parent process. */
13250 pid_t
13251 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13252 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13253 /* Convince the compiler that p..p7 are live; otherwise, it might
13254 use the same hardware register for all 8 local variables. */
13255 if (p != p1 || p != p2 || p != p3 || p != p4
13256 || p != p5 || p != p6 || p != p7)
13257 _exit(1);
13258
13259 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13260 from child file descriptors. If the child closes a descriptor
13261 before it execs or exits, this munges the parent's descriptor
13262 as well. Test for this by closing stdout in the child. */
13263 _exit(close(fileno(stdout)) != 0);
13264 } else {
13265 int status;
13266 struct stat st;
13267
13268 while (wait(&status) != child)
13269 ;
81ecdfbb 13270 return (
a9322a30
TT
13271 /* Was there some problem with vforking? */
13272 child < 0
13273
13274 /* Did the child fail? (This shouldn't happen.) */
13275 || status
13276
13277 /* Did the vfork/compiler bug occur? */
13278 || parent != getpid()
13279
13280 /* Did the file descriptor bug occur? */
13281 || fstat(fileno(stdout), &st) != 0
13282 );
13283 }
13284}
13285_ACEOF
81ecdfbb 13286if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13287 ac_cv_func_vfork_works=yes
13288else
81ecdfbb 13289 ac_cv_func_vfork_works=no
a9322a30 13290fi
81ecdfbb
RW
13291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13292 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13293fi
81ecdfbb 13294
a9322a30 13295fi
81ecdfbb
RW
13296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13297$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13298
13299fi;
13300if test "x$ac_cv_func_fork_works" = xcross; then
13301 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13302 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13303$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13304fi
13305
13306if test "x$ac_cv_func_vfork_works" = xyes; then
13307
81ecdfbb 13308$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13309
13310else
13311
81ecdfbb 13312$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13313
13314fi
13315if test "x$ac_cv_func_fork_works" = xyes; then
13316
81ecdfbb 13317$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13318
13319fi
13320
8ae8e197 13321 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05
TT
13322 ptrace64 sbrk setns sigaltstack sigprocmask \
13323 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
13324do :
13325 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13326ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13327if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13328 cat >>confdefs.h <<_ACEOF
81ecdfbb 13329#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13330_ACEOF
13331
13332fi
13333done
13334
13335
05ea2a05
TT
13336 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13337"
13338if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13339 ac_have_decl=1
6c7a06a3 13340else
05ea2a05
TT
13341 ac_have_decl=0
13342fi
13343
13344cat >>confdefs.h <<_ACEOF
13345#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13346_ACEOF
13347
13348
13349 if test "$cross_compiling" = yes; then :
81ecdfbb 13350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3 13351/* end confdefs.h. */
05ea2a05 13352#include <sys/personality.h>
6c7a06a3
TT
13353int
13354main ()
13355{
05ea2a05
TT
13356
13357 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13358 # define ADDR_NO_RANDOMIZE 0x0040000
13359 # endif
13360 /* Test the flag could be set and stays set. */
13361 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13362 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13363 return 1
bec39cab
AC
13364 ;
13365 return 0;
13366}
13367_ACEOF
81ecdfbb 13368if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13369 have_personality=true
a4db0f07 13370else
05ea2a05 13371 have_personality=false
a4db0f07 13372fi
81ecdfbb
RW
13373rm -f core conftest.err conftest.$ac_objext \
13374 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13375else
13376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13377/* end confdefs.h. */
13378#include <sys/personality.h>
13379int
13380main ()
13381{
6c7a06a3 13382
05ea2a05
TT
13383 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13384 # define ADDR_NO_RANDOMIZE 0x0040000
13385 # endif
13386 /* Test the flag could be set and stays set. */
13387 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13388 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13389 return 1
13390 ;
13391 return 0;
13392}
13393_ACEOF
13394if ac_fn_c_try_run "$LINENO"; then :
13395 have_personality=true
13396else
13397 have_personality=false
13398fi
13399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13400 conftest.$ac_objext conftest.beam conftest.$ac_ext
a4db0f07 13401fi
6c7a06a3 13402
05ea2a05
TT
13403 if $have_personality
13404 then
a4db0f07 13405
05ea2a05 13406$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
c906108c 13407
05ea2a05 13408 fi
d0ac1c44 13409
05ea2a05
TT
13410 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13411if test "x$ac_cv_have_decl_strstr" = xyes; then :
13412 ac_have_decl=1
d0ac1c44 13413else
05ea2a05
TT
13414 ac_have_decl=0
13415fi
d0ac1c44
SM
13416
13417cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13418#define HAVE_DECL_STRSTR $ac_have_decl
13419_ACEOF
13420
13421
13422 # ----------------------- #
13423 # Checks for structures. #
13424 # ----------------------- #
13425
13426 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13427if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13428
13429cat >>confdefs.h <<_ACEOF
13430#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13431_ACEOF
13432
05ea2a05 13433
d0ac1c44 13434fi
05ea2a05
TT
13435ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13436if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13437
05ea2a05
TT
13438cat >>confdefs.h <<_ACEOF
13439#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13440_ACEOF
13441
13442
13443fi
13444
13445
e911c666
JB
13446 # On FreeBSD we need libutil for the kinfo_get* functions. On
13447 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13448 # Figure out which one to use.
05ea2a05
TT
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13450$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13451if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13452 $as_echo_n "(cached) " >&6
13453else
05ea2a05
TT
13454 ac_func_search_save_LIBS=$LIBS
13455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13456/* end confdefs.h. */
3266f10b 13457
05ea2a05
TT
13458/* Override any GCC internal prototype to avoid an error.
13459 Use char because int might match the return type of a GCC
13460 builtin and then its argument prototype would still apply. */
13461#ifdef __cplusplus
13462extern "C"
13463#endif
13464char kinfo_getfile ();
3266f10b
TT
13465int
13466main ()
13467{
05ea2a05 13468return kinfo_getfile ();
3266f10b
TT
13469 ;
13470 return 0;
13471}
13472_ACEOF
05ea2a05
TT
13473for ac_lib in '' util util-freebsd; do
13474 if test -z "$ac_lib"; then
13475 ac_res="none required"
13476 else
13477 ac_res=-l$ac_lib
13478 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13479 fi
13480 if ac_fn_c_try_link "$LINENO"; then :
13481 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13482fi
05ea2a05
TT
13483rm -f core conftest.err conftest.$ac_objext \
13484 conftest$ac_exeext
13485 if ${ac_cv_search_kinfo_getfile+:} false; then :
13486 break
13487fi
13488done
13489if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13490
13491else
05ea2a05 13492 ac_cv_search_kinfo_getfile=no
3266f10b 13493fi
05ea2a05
TT
13494rm conftest.$ac_ext
13495LIBS=$ac_func_search_save_LIBS
13496fi
13497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13498$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13499ac_res=$ac_cv_search_kinfo_getfile
13500if test "$ac_res" != no; then :
13501 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13502
e911c666
JB
13503fi
13504
13505
13506 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
13507 for ac_func in kinfo_getfile
13508do :
13509 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
13510if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
13511 cat >>confdefs.h <<_ACEOF
13512#define HAVE_KINFO_GETFILE 1
13513_ACEOF
3266f10b
TT
13514
13515fi
e911c666 13516done
3266f10b 13517
3266f10b 13518
05ea2a05
TT
13519 # Check for std::thread. This does not work on some platforms, like
13520 # mingw and DJGPP.
13521 ac_ext=cpp
13522ac_cpp='$CXXCPP $CPPFLAGS'
13523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 13526
3266f10b 13527
3266f10b 13528
3266f10b 13529
3266f10b 13530
05ea2a05
TT
13531ac_ext=c
13532ac_cpp='$CPP $CPPFLAGS'
13533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13535ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 13536
05ea2a05 13537ax_pthread_ok=no
3266f10b 13538
05ea2a05
TT
13539# We used to check for pthread.h first, but this fails if pthread.h
13540# requires special compiler flags (e.g. on Tru64 or Sequent).
13541# It gets checked for in the link test anyway.
3266f10b 13542
05ea2a05
TT
13543# First of all, check if the user has set any of the PTHREAD_LIBS,
13544# etcetera environment variables, and if threads linking works using
13545# them:
13546if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13547 ax_pthread_save_CC="$CC"
13548 ax_pthread_save_CFLAGS="$CFLAGS"
13549 ax_pthread_save_LIBS="$LIBS"
13550 if test "x$PTHREAD_CC" != "x"; then :
13551 CC="$PTHREAD_CC"
3266f10b 13552fi
05ea2a05
TT
13553 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13554 LIBS="$PTHREAD_LIBS $LIBS"
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13556$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13558/* end confdefs.h. */
05ea2a05
TT
13559
13560/* Override any GCC internal prototype to avoid an error.
13561 Use char because int might match the return type of a GCC
13562 builtin and then its argument prototype would still apply. */
13563#ifdef __cplusplus
13564extern "C"
13565#endif
13566char pthread_join ();
3266f10b
TT
13567int
13568main ()
13569{
05ea2a05 13570return pthread_join ();
3266f10b
TT
13571 ;
13572 return 0;
13573}
13574_ACEOF
13575if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13576 ax_pthread_ok=yes
3266f10b
TT
13577fi
13578rm -f core conftest.err conftest.$ac_objext \
13579 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13581$as_echo "$ax_pthread_ok" >&6; }
13582 if test "x$ax_pthread_ok" = "xno"; then
13583 PTHREAD_LIBS=""
13584 PTHREAD_CFLAGS=""
13585 fi
13586 CC="$ax_pthread_save_CC"
13587 CFLAGS="$ax_pthread_save_CFLAGS"
13588 LIBS="$ax_pthread_save_LIBS"
3266f10b 13589fi
3266f10b 13590
05ea2a05
TT
13591# We must check for the threads library under a number of different
13592# names; the ordering is very important because some systems
13593# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13594# libraries is broken (non-POSIX).
3266f10b 13595
05ea2a05
TT
13596# Create a list of thread flags to try. Items starting with a "-" are
13597# C compiler flags, and other items are library names, except for "none"
13598# which indicates that we try without any flags at all, and "pthread-config"
13599# which is a program returning the flags for the Pth emulation library.
3266f10b 13600
05ea2a05 13601ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 13602
05ea2a05
TT
13603# The ordering *is* (sometimes) important. Some notes on the
13604# individual items follow:
3266f10b 13605
05ea2a05
TT
13606# pthreads: AIX (must check this before -lpthread)
13607# none: in case threads are in libc; should be tried before -Kthread and
13608# other compiler flags to prevent continual compiler warnings
13609# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13610# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13611# (Note: HP C rejects this with "bad form for `-t' option")
13612# -pthreads: Solaris/gcc (Note: HP C also rejects)
13613# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13614# doesn't hurt to check since this sometimes defines pthreads and
13615# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13616# is present but should not be used directly; and before -mthreads,
13617# because the compiler interprets this as "-mt" + "-hreads")
13618# -mthreads: Mingw32/gcc, Lynx/gcc
13619# pthread: Linux, etcetera
13620# --thread-safe: KAI C++
13621# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 13622
05ea2a05 13623case $host_os in
3266f10b 13624
05ea2a05 13625 freebsd*)
3266f10b 13626
05ea2a05
TT
13627 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13628 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 13629
05ea2a05
TT
13630 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13631 ;;
3266f10b 13632
05ea2a05 13633 hpux*)
3266f10b 13634
05ea2a05
TT
13635 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13636 # multi-threading and also sets -lpthread."
13637
13638 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13639 ;;
13640
13641 openedition*)
13642
13643 # IBM z/OS requires a feature-test macro to be defined in order to
13644 # enable POSIX threads at all, so give the user a hint if this is
13645 # not set. (We don't define these ourselves, as they can affect
13646 # other portions of the system API in unpredictable ways.)
13647
13648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13649/* end confdefs.h. */
05ea2a05
TT
13650
13651# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13652 AX_PTHREAD_ZOS_MISSING
13653# endif
3266f10b
TT
13654
13655_ACEOF
13656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
13657 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13659$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
13660fi
13661rm -f conftest*
13662
05ea2a05 13663 ;;
3266f10b 13664
05ea2a05 13665 solaris*)
3266f10b 13666
05ea2a05
TT
13667 # On Solaris (at least, for some versions), libc contains stubbed
13668 # (non-functional) versions of the pthreads routines, so link-based
13669 # tests will erroneously succeed. (N.B.: The stubs are missing
13670 # pthread_cleanup_push, or rather a function called by this macro,
13671 # so we could check for that, but who knows whether they'll stub
13672 # that too in a future libc.) So we'll check first for the
13673 # standard Solaris way of linking pthreads (-mt -lpthread).
13674
13675 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13676 ;;
13677esac
13678
13679# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13680
13681if test "x$GCC" = "xyes"; then :
13682 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
13683fi
13684
05ea2a05
TT
13685# The presence of a feature test macro requesting re-entrant function
13686# definitions is, on some systems, a strong hint that pthreads support is
13687# correctly enabled
13688
13689case $host_os in
13690 darwin* | hpux* | linux* | osf* | solaris*)
13691 ax_pthread_check_macro="_REENTRANT"
13692 ;;
13693
13694 aix*)
13695 ax_pthread_check_macro="_THREAD_SAFE"
13696 ;;
13697
13698 *)
13699 ax_pthread_check_macro="--"
13700 ;;
13701esac
13702if test "x$ax_pthread_check_macro" = "x--"; then :
13703 ax_pthread_check_cond=0
13704else
13705 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
13706fi
13707
05ea2a05
TT
13708# Are we compiling with Clang?
13709
13710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13711$as_echo_n "checking whether $CC is Clang... " >&6; }
13712if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
13713 $as_echo_n "(cached) " >&6
13714else
05ea2a05
TT
13715 ax_cv_PTHREAD_CLANG=no
13716 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13717 if test "x$GCC" = "xyes"; then
13718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13719/* end confdefs.h. */
05ea2a05
TT
13720/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13721# if defined(__clang__) && defined(__llvm__)
13722 AX_PTHREAD_CC_IS_CLANG
13723# endif
3266f10b 13724
3266f10b 13725_ACEOF
05ea2a05
TT
13726if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13727 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13728 ax_cv_PTHREAD_CLANG=yes
3266f10b 13729fi
05ea2a05
TT
13730rm -f conftest*
13731
13732 fi
3266f10b
TT
13733
13734fi
05ea2a05
TT
13735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13736$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13737ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 13738
05ea2a05 13739ax_pthread_clang_warning=no
3266f10b 13740
05ea2a05
TT
13741# Clang needs special handling, because older versions handle the -pthread
13742# option in a rather... idiosyncratic way
3266f10b 13743
05ea2a05 13744if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 13745
05ea2a05 13746 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 13747
05ea2a05
TT
13748 # (Note 1: This will need to be revisited if a system that Clang
13749 # supports has POSIX threads in a separate library. This tends not
13750 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 13751
05ea2a05
TT
13752 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13753 # to get POSIX threads support; the API is always present and
13754 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13755 # -pthread does define _REENTRANT, and while the Darwin headers
13756 # ignore this macro, third-party headers might not.)
b2ceabe8 13757
05ea2a05
TT
13758 PTHREAD_CFLAGS="-pthread"
13759 PTHREAD_LIBS=
3266f10b 13760
05ea2a05
TT
13761 ax_pthread_ok=yes
13762
13763 # However, older versions of Clang make a point of warning the user
13764 # that, in an invocation where only linking and no compilation is
13765 # taking place, the -pthread option has no effect ("argument unused
13766 # during compilation"). They expect -pthread to be passed in only
13767 # when source code is being compiled.
13768 #
13769 # Problem is, this is at odds with the way Automake and most other
13770 # C build frameworks function, which is that the same flags used in
13771 # compilation (CFLAGS) are also used in linking. Many systems
13772 # supported by AX_PTHREAD require exactly this for POSIX threads
13773 # support, and in fact it is often not straightforward to specify a
13774 # flag that is used only in the compilation phase and not in
13775 # linking. Such a scenario is extremely rare in practice.
13776 #
13777 # Even though use of the -pthread flag in linking would only print
13778 # a warning, this can be a nuisance for well-run software projects
13779 # that build with -Werror. So if the active version of Clang has
13780 # this misfeature, we search for an option to squash it.
13781
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13783$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13784if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13785 $as_echo_n "(cached) " >&6
13786else
13787 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13788 # Create an alternate version of $ac_link that compiles and
13789 # links in two steps (.c -> .o, .o -> exe) instead of one
13790 # (.c -> exe), because the warning occurs only in the second
13791 # step
13792 ax_pthread_save_ac_link="$ac_link"
13793 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13794 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13795 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13796 ax_pthread_save_CFLAGS="$CFLAGS"
13797 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13798 if test "x$ax_pthread_try" = "xunknown"; then :
13799 break
13800fi
13801 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13802 ac_link="$ax_pthread_save_ac_link"
13803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804/* end confdefs.h. */
13805int main(void){return 0;}
3266f10b
TT
13806_ACEOF
13807if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
13808 ac_link="$ax_pthread_2step_ac_link"
13809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13810/* end confdefs.h. */
13811int main(void){return 0;}
13812_ACEOF
13813if ac_fn_c_try_link "$LINENO"; then :
13814 break
3266f10b
TT
13815fi
13816rm -f core conftest.err conftest.$ac_objext \
13817 conftest$ac_exeext conftest.$ac_ext
13818
13819fi
05ea2a05
TT
13820rm -f core conftest.err conftest.$ac_objext \
13821 conftest$ac_exeext conftest.$ac_ext
13822 done
13823 ac_link="$ax_pthread_save_ac_link"
13824 CFLAGS="$ax_pthread_save_CFLAGS"
13825 if test "x$ax_pthread_try" = "x"; then :
13826 ax_pthread_try=no
13827fi
13828 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 13829
05ea2a05
TT
13830fi
13831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13832$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 13833
05ea2a05
TT
13834 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13835 no | unknown) ;;
13836 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13837 esac
3266f10b 13838
05ea2a05 13839fi # $ax_pthread_clang = yes
3266f10b 13840
05ea2a05
TT
13841if test "x$ax_pthread_ok" = "xno"; then
13842for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 13843
05ea2a05
TT
13844 case $ax_pthread_try_flag in
13845 none)
13846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13847$as_echo_n "checking whether pthreads work without any flags... " >&6; }
13848 ;;
3266f10b 13849
05ea2a05
TT
13850 -mt,pthread)
13851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13852$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13853 PTHREAD_CFLAGS="-mt"
13854 PTHREAD_LIBS="-lpthread"
13855 ;;
3266f10b 13856
05ea2a05
TT
13857 -*)
13858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13859$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13860 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13861 ;;
3266f10b 13862
05ea2a05
TT
13863 pthread-config)
13864 # Extract the first word of "pthread-config", so it can be a program name with args.
13865set dummy pthread-config; ac_word=$2
13866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13867$as_echo_n "checking for $ac_word... " >&6; }
13868if ${ac_cv_prog_ax_pthread_config+:} false; then :
13869 $as_echo_n "(cached) " >&6
13870else
13871 if test -n "$ax_pthread_config"; then
13872 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13873else
13874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13875for as_dir in $PATH
13876do
13877 IFS=$as_save_IFS
13878 test -z "$as_dir" && as_dir=.
13879 for ac_exec_ext in '' $ac_executable_extensions; do
13880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13881 ac_cv_prog_ax_pthread_config="yes"
13882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13883 break 2
13884 fi
3266f10b 13885done
05ea2a05
TT
13886 done
13887IFS=$as_save_IFS
3266f10b 13888
05ea2a05
TT
13889 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13890fi
13891fi
13892ax_pthread_config=$ac_cv_prog_ax_pthread_config
13893if test -n "$ax_pthread_config"; then
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13895$as_echo "$ax_pthread_config" >&6; }
3266f10b 13896else
05ea2a05
TT
13897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13898$as_echo "no" >&6; }
3266f10b
TT
13899fi
13900
5e030278 13901
05ea2a05
TT
13902 if test "x$ax_pthread_config" = "xno"; then :
13903 continue
13904fi
13905 PTHREAD_CFLAGS="`pthread-config --cflags`"
13906 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13907 ;;
5e030278 13908
05ea2a05
TT
13909 *)
13910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13911$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13912 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13913 ;;
13914 esac
5e030278 13915
5e030278
TT
13916 ax_pthread_save_CFLAGS="$CFLAGS"
13917 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
13918 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13919 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
13920
13921 # Check for various functions. We must include pthread.h,
13922 # since some functions may be macros. (On the Sequent, we
13923 # need a special flag -Kthread to make this header compile.)
13924 # We check for pthread_join because it is in -lpthread on IRIX
13925 # while pthread_create is in libc. We check for pthread_attr_init
13926 # due to DEC craziness with -lpthreads. We check for
13927 # pthread_cleanup_push because it is one of the few pthread
13928 # functions on Solaris that doesn't have a non-functional libc stub.
13929 # We try pthread_create on general principles.
13930
5e030278
TT
13931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13932/* end confdefs.h. */
05ea2a05
TT
13933#include <pthread.h>
13934# if $ax_pthread_check_cond
13935# error "$ax_pthread_check_macro must be defined"
13936# endif
13937 static void routine(void *a) { a = 0; }
13938 static void *start_routine(void *a) { return a; }
5e030278
TT
13939int
13940main ()
13941{
05ea2a05
TT
13942pthread_t th; pthread_attr_t attr;
13943 pthread_create(&th, 0, start_routine, 0);
13944 pthread_join(th, 0);
13945 pthread_attr_init(&attr);
13946 pthread_cleanup_push(routine, 0);
13947 pthread_cleanup_pop(0) /* ; */
5e030278
TT
13948 ;
13949 return 0;
13950}
13951_ACEOF
13952if ac_fn_c_try_link "$LINENO"; then :
13953 ax_pthread_ok=yes
13954fi
13955rm -f core conftest.err conftest.$ac_objext \
13956 conftest$ac_exeext conftest.$ac_ext
05ea2a05 13957
5e030278
TT
13958 CFLAGS="$ax_pthread_save_CFLAGS"
13959 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
13960
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13962$as_echo "$ax_pthread_ok" >&6; }
13963 if test "x$ax_pthread_ok" = "xyes"; then :
13964 break
5e030278
TT
13965fi
13966
05ea2a05
TT
13967 PTHREAD_LIBS=""
13968 PTHREAD_CFLAGS=""
13969done
13970fi
5e030278 13971
05ea2a05
TT
13972# Various other checks:
13973if test "x$ax_pthread_ok" = "xyes"; then
13974 ax_pthread_save_CFLAGS="$CFLAGS"
13975 ax_pthread_save_LIBS="$LIBS"
13976 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13977 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 13978
05ea2a05
TT
13979 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13981$as_echo_n "checking for joinable pthread attribute... " >&6; }
13982if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13983 $as_echo_n "(cached) " >&6
13984else
13985 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13986 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13988/* end confdefs.h. */
13989#include <pthread.h>
13990int
13991main ()
13992{
13993int attr = $ax_pthread_attr; return attr /* ; */
13994 ;
13995 return 0;
13996}
13997_ACEOF
13998if ac_fn_c_try_link "$LINENO"; then :
13999 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14000fi
14001rm -f core conftest.err conftest.$ac_objext \
14002 conftest$ac_exeext conftest.$ac_ext
14003 done
5e030278 14004
05ea2a05
TT
14005fi
14006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14007$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14008 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14009 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14010 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 14011
05ea2a05
TT
14012cat >>confdefs.h <<_ACEOF
14013#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14014_ACEOF
5e030278 14015
05ea2a05 14016 ax_pthread_joinable_attr_defined=yes
5e030278 14017
05ea2a05 14018fi
5e030278 14019
05ea2a05
TT
14020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14021$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14022if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14023 $as_echo_n "(cached) " >&6
14024else
14025 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14026 case $host_os in
14027 solaris*)
14028 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14029 ;;
14030 esac
5e030278 14031
05ea2a05
TT
14032fi
14033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14034$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14035 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14036 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14037 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14038 ax_pthread_special_flags_added=yes
14039fi
5e030278 14040
05ea2a05
TT
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14042$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14043if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14044 $as_echo_n "(cached) " >&6
14045else
14046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14047/* end confdefs.h. */
14048#include <pthread.h>
14049int
14050main ()
14051{
14052int i = PTHREAD_PRIO_INHERIT;
14053 ;
14054 return 0;
14055}
14056_ACEOF
14057if ac_fn_c_try_link "$LINENO"; then :
14058 ax_cv_PTHREAD_PRIO_INHERIT=yes
14059else
14060 ax_cv_PTHREAD_PRIO_INHERIT=no
14061fi
14062rm -f core conftest.err conftest.$ac_objext \
14063 conftest$ac_exeext conftest.$ac_ext
5e030278 14064
05ea2a05
TT
14065fi
14066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14067$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14068 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14069 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 14070
05ea2a05 14071$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 14072
05ea2a05 14073 ax_pthread_prio_inherit_defined=yes
5e030278 14074
05ea2a05 14075fi
5e030278 14076
05ea2a05
TT
14077 CFLAGS="$ax_pthread_save_CFLAGS"
14078 LIBS="$ax_pthread_save_LIBS"
5e030278 14079
05ea2a05
TT
14080 # More AIX lossage: compile with *_r variant
14081 if test "x$GCC" != "xyes"; then
14082 case $host_os in
14083 aix*)
14084 case "x/$CC" in #(
14085 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14086 #handle absolute path differently from PATH based program lookup
14087 case "x$CC" in #(
14088 x/*) :
14089 if as_fn_executable_p ${CC}_r; then :
14090 PTHREAD_CC="${CC}_r"
14091fi ;; #(
14092 *) :
14093 for ac_prog in ${CC}_r
14094do
14095 # Extract the first word of "$ac_prog", so it can be a program name with args.
14096set dummy $ac_prog; ac_word=$2
14097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14098$as_echo_n "checking for $ac_word... " >&6; }
14099if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14100 $as_echo_n "(cached) " >&6
14101else
14102 if test -n "$PTHREAD_CC"; then
14103 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14104else
14105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14106for as_dir in $PATH
14107do
14108 IFS=$as_save_IFS
14109 test -z "$as_dir" && as_dir=.
14110 for ac_exec_ext in '' $ac_executable_extensions; do
14111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14112 ac_cv_prog_PTHREAD_CC="$ac_prog"
14113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14114 break 2
14115 fi
14116done
14117 done
14118IFS=$as_save_IFS
5e030278 14119
5e030278 14120fi
05ea2a05
TT
14121fi
14122PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14123if test -n "$PTHREAD_CC"; then
14124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14125$as_echo "$PTHREAD_CC" >&6; }
14126else
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14128$as_echo "no" >&6; }
14129fi
5e030278 14130
5e030278 14131
05ea2a05
TT
14132 test -n "$PTHREAD_CC" && break
14133done
14134test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14135 ;;
14136esac ;; #(
14137 *) :
14138 ;;
5e030278 14139esac
05ea2a05
TT
14140 ;;
14141 esac
14142 fi
14143fi
5e030278 14144
05ea2a05 14145test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 14146
5e030278 14147
5e030278 14148
5e030278 14149
5e030278 14150
05ea2a05
TT
14151# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14152if test "x$ax_pthread_ok" = "xyes"; then
14153 threads=yes
14154 :
5e030278 14155else
05ea2a05
TT
14156 ax_pthread_ok=no
14157 threads=no
5e030278 14158fi
05ea2a05
TT
14159ac_ext=cpp
14160ac_cpp='$CXXCPP $CPPFLAGS'
14161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 14164
5e030278 14165
05ea2a05
TT
14166 if test "$threads" = "yes"; then
14167 save_LIBS="$LIBS"
14168 LIBS="$PTHREAD_LIBS $LIBS"
14169 save_CXXFLAGS="$CXXFLAGS"
14170 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14172$as_echo_n "checking for std::thread... " >&6; }
14173if ${gdb_cv_cxx_std_thread+:} false; then :
14174 $as_echo_n "(cached) " >&6
14175else
14176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14177/* end confdefs.h. */
05ea2a05
TT
14178#include <thread>
14179 void callback() { }
14180int
14181main ()
14182{
14183std::thread t(callback);
14184 ;
14185 return 0;
14186}
5e030278 14187_ACEOF
05ea2a05
TT
14188if ac_fn_cxx_try_compile "$LINENO"; then :
14189 gdb_cv_cxx_std_thread=yes
14190else
14191 gdb_cv_cxx_std_thread=no
5e030278 14192fi
05ea2a05
TT
14193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14194fi
14195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14196$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 14197
05ea2a05
TT
14198 # This check must be here, while LIBS includes any necessary
14199 # threading library.
14200 for ac_func in pthread_sigmask pthread_setname_np
14201do :
14202 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14203ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14204if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14205 cat >>confdefs.h <<_ACEOF
14206#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14207_ACEOF
5e030278
TT
14208
14209fi
05ea2a05 14210done
5e030278 14211
5e030278 14212
05ea2a05
TT
14213 LIBS="$save_LIBS"
14214 CXXFLAGS="$save_CXXFLAGS"
14215 fi
14216 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 14217
05ea2a05 14218$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 14219
05ea2a05
TT
14220 fi
14221 ac_ext=c
14222ac_cpp='$CPP $CPPFLAGS'
14223ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14224ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14225ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 14226
5e030278 14227
05ea2a05
TT
14228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14229$as_echo_n "checking for sigsetjmp... " >&6; }
14230if ${gdb_cv_func_sigsetjmp+:} false; then :
14231 $as_echo_n "(cached) " >&6
14232else
14233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14234/* end confdefs.h. */
b9442ec1 14235#include <setjmp.h>
05ea2a05
TT
14236int
14237main ()
14238{
b9442ec1
SM
14239sigjmp_buf env;
14240 while (! sigsetjmp (env, 1))
14241 siglongjmp (env, 1);
14242
05ea2a05
TT
14243 ;
14244 return 0;
14245}
14246_ACEOF
14247if ac_fn_c_try_compile "$LINENO"; then :
14248 gdb_cv_func_sigsetjmp=yes
14249else
14250 gdb_cv_func_sigsetjmp=no
b9442ec1 14251
05ea2a05
TT
14252fi
14253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b9442ec1 14254
05ea2a05
TT
14255fi
14256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14257$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14258 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 14259
05ea2a05 14260$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 14261
05ea2a05
TT
14262 fi
14263
14264
14265# Check whether --with-intel_pt was given.
14266if test "${with_intel_pt+set}" = set; then :
14267 withval=$with_intel_pt;
5e030278 14268else
05ea2a05 14269 with_intel_pt=auto
5e030278 14270fi
05ea2a05
TT
14271
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14273$as_echo_n "checking whether to use intel pt... " >&6; }
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14275$as_echo "$with_intel_pt" >&6; }
14276
14277 if test "${with_intel_pt}" = no; then
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14279$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14280 HAVE_LIBIPT=no
14281 else
14282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14283/* end confdefs.h. */
5e030278 14284
05ea2a05
TT
14285 #include <linux/perf_event.h>
14286 #ifndef PERF_ATTR_SIZE_VER5
14287 # error
14288 #endif
5e030278 14289
05ea2a05
TT
14290_ACEOF
14291if ac_fn_c_try_cpp "$LINENO"; then :
14292 perf_event=yes
14293else
14294 perf_event=no
5e030278 14295fi
05ea2a05
TT
14296rm -f conftest.err conftest.i conftest.$ac_ext
14297 if test "$perf_event" != yes; then
14298 if test "$with_intel_pt" = yes; then
14299 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14300 else
14301 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14302$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14303 fi
14304 fi
5e030278 14305
5e030278 14306
5e030278 14307
5e030278 14308
5e030278 14309
5e030278 14310
5e030278 14311
5e030278 14312
5e030278 14313
05ea2a05 14314 use_additional=yes
5e030278 14315
05ea2a05
TT
14316 acl_save_prefix="$prefix"
14317 prefix="$acl_final_prefix"
14318 acl_save_exec_prefix="$exec_prefix"
14319 exec_prefix="$acl_final_exec_prefix"
5e030278 14320
05ea2a05
TT
14321 eval additional_includedir=\"$includedir\"
14322 eval additional_libdir=\"$libdir\"
5e030278 14323
05ea2a05
TT
14324 exec_prefix="$acl_save_exec_prefix"
14325 prefix="$acl_save_prefix"
5e030278 14326
5e030278 14327
05ea2a05
TT
14328# Check whether --with-libipt-prefix was given.
14329if test "${with_libipt_prefix+set}" = set; then :
14330 withval=$with_libipt_prefix;
14331 if test "X$withval" = "Xno"; then
14332 use_additional=no
14333 else
14334 if test "X$withval" = "X"; then
5e030278 14335
05ea2a05
TT
14336 acl_save_prefix="$prefix"
14337 prefix="$acl_final_prefix"
14338 acl_save_exec_prefix="$exec_prefix"
14339 exec_prefix="$acl_final_exec_prefix"
5e030278 14340
05ea2a05
TT
14341 eval additional_includedir=\"$includedir\"
14342 eval additional_libdir=\"$libdir\"
5e030278 14343
05ea2a05
TT
14344 exec_prefix="$acl_save_exec_prefix"
14345 prefix="$acl_save_prefix"
5e030278 14346
05ea2a05
TT
14347 else
14348 additional_includedir="$withval/include"
14349 additional_libdir="$withval/lib"
14350 fi
14351 fi
5e030278
TT
14352
14353fi
5e030278 14354
9f1528a1
AB
14355
14356# Check whether --with-libipt-type was given.
14357if test "${with_libipt_type+set}" = set; then :
14358 withval=$with_libipt_type; with_libipt_type=$withval
14359else
14360 with_libipt_type=auto
14361fi
14362
14363 lib_type=`eval echo \$with_libipt_type`
14364
05ea2a05
TT
14365 LIBIPT=
14366 LTLIBIPT=
14367 INCIPT=
14368 rpathdirs=
14369 ltrpathdirs=
14370 names_already_handled=
14371 names_next_round='ipt '
14372 while test -n "$names_next_round"; do
14373 names_this_round="$names_next_round"
14374 names_next_round=
14375 for name in $names_this_round; do
14376 already_handled=
14377 for n in $names_already_handled; do
14378 if test "$n" = "$name"; then
14379 already_handled=yes
14380 break
14381 fi
14382 done
14383 if test -z "$already_handled"; then
14384 names_already_handled="$names_already_handled $name"
14385 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14386 eval value=\"\$HAVE_LIB$uppername\"
14387 if test -n "$value"; then
14388 if test "$value" = yes; then
14389 eval value=\"\$LIB$uppername\"
14390 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14391 eval value=\"\$LTLIB$uppername\"
14392 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14393 else
14394 :
14395 fi
14396 else
14397 found_dir=
14398 found_la=
14399 found_so=
14400 found_a=
14401 if test $use_additional = yes; then
9f1528a1 14402 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14403 found_dir="$additional_libdir"
14404 found_so="$additional_libdir/lib$name.$shlibext"
14405 if test -f "$additional_libdir/lib$name.la"; then
14406 found_la="$additional_libdir/lib$name.la"
14407 fi
9f1528a1 14408 elif test x$lib_type != xshared; then
05ea2a05
TT
14409 if test -f "$additional_libdir/lib$name.$libext"; then
14410 found_dir="$additional_libdir"
14411 found_a="$additional_libdir/lib$name.$libext"
14412 if test -f "$additional_libdir/lib$name.la"; then
14413 found_la="$additional_libdir/lib$name.la"
14414 fi
14415 fi
14416 fi
14417 fi
14418 if test "X$found_dir" = "X"; then
14419 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14420
05ea2a05
TT
14421 acl_save_prefix="$prefix"
14422 prefix="$acl_final_prefix"
14423 acl_save_exec_prefix="$exec_prefix"
14424 exec_prefix="$acl_final_exec_prefix"
14425 eval x=\"$x\"
14426 exec_prefix="$acl_save_exec_prefix"
14427 prefix="$acl_save_prefix"
5e030278 14428
05ea2a05
TT
14429 case "$x" in
14430 -L*)
14431 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 14432 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14433 found_dir="$dir"
14434 found_so="$dir/lib$name.$shlibext"
14435 if test -f "$dir/lib$name.la"; then
14436 found_la="$dir/lib$name.la"
14437 fi
9f1528a1 14438 elif test x$lib_type != xshared; then
05ea2a05
TT
14439 if test -f "$dir/lib$name.$libext"; then
14440 found_dir="$dir"
14441 found_a="$dir/lib$name.$libext"
14442 if test -f "$dir/lib$name.la"; then
14443 found_la="$dir/lib$name.la"
14444 fi
14445 fi
14446 fi
14447 ;;
14448 esac
14449 if test "X$found_dir" != "X"; then
14450 break
14451 fi
14452 done
14453 fi
14454 if test "X$found_dir" != "X"; then
14455 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14456 if test "X$found_so" != "X"; then
14457 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14458 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14459 else
14460 haveit=
14461 for x in $ltrpathdirs; do
14462 if test "X$x" = "X$found_dir"; then
14463 haveit=yes
14464 break
14465 fi
14466 done
14467 if test -z "$haveit"; then
14468 ltrpathdirs="$ltrpathdirs $found_dir"
14469 fi
14470 if test "$hardcode_direct" = yes; then
14471 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14472 else
14473 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14474 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14475 haveit=
14476 for x in $rpathdirs; do
14477 if test "X$x" = "X$found_dir"; then
14478 haveit=yes
14479 break
14480 fi
14481 done
14482 if test -z "$haveit"; then
14483 rpathdirs="$rpathdirs $found_dir"
14484 fi
14485 else
14486 haveit=
14487 for x in $LDFLAGS $LIBIPT; do
5e030278 14488
05ea2a05
TT
14489 acl_save_prefix="$prefix"
14490 prefix="$acl_final_prefix"
14491 acl_save_exec_prefix="$exec_prefix"
14492 exec_prefix="$acl_final_exec_prefix"
14493 eval x=\"$x\"
14494 exec_prefix="$acl_save_exec_prefix"
14495 prefix="$acl_save_prefix"
5e030278 14496
05ea2a05
TT
14497 if test "X$x" = "X-L$found_dir"; then
14498 haveit=yes
14499 break
14500 fi
14501 done
14502 if test -z "$haveit"; then
14503 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14504 fi
14505 if test "$hardcode_minus_L" != no; then
14506 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14507 else
14508 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14509 fi
14510 fi
14511 fi
14512 fi
14513 else
14514 if test "X$found_a" != "X"; then
14515 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14516 else
14517 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14518 fi
14519 fi
14520 additional_includedir=
14521 case "$found_dir" in
14522 */lib | */lib/)
14523 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14524 additional_includedir="$basedir/include"
14525 ;;
14526 esac
14527 if test "X$additional_includedir" != "X"; then
14528 if test "X$additional_includedir" != "X/usr/include"; then
14529 haveit=
14530 if test "X$additional_includedir" = "X/usr/local/include"; then
14531 if test -n "$GCC"; then
14532 case $host_os in
14533 linux*) haveit=yes;;
14534 esac
14535 fi
14536 fi
14537 if test -z "$haveit"; then
14538 for x in $CPPFLAGS $INCIPT; do
5e030278 14539
05ea2a05
TT
14540 acl_save_prefix="$prefix"
14541 prefix="$acl_final_prefix"
14542 acl_save_exec_prefix="$exec_prefix"
14543 exec_prefix="$acl_final_exec_prefix"
14544 eval x=\"$x\"
14545 exec_prefix="$acl_save_exec_prefix"
14546 prefix="$acl_save_prefix"
5e030278 14547
05ea2a05
TT
14548 if test "X$x" = "X-I$additional_includedir"; then
14549 haveit=yes
14550 break
14551 fi
14552 done
14553 if test -z "$haveit"; then
14554 if test -d "$additional_includedir"; then
14555 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14556 fi
14557 fi
14558 fi
14559 fi
14560 fi
14561 if test -n "$found_la"; then
14562 save_libdir="$libdir"
14563 case "$found_la" in
14564 */* | *\\*) . "$found_la" ;;
14565 *) . "./$found_la" ;;
14566 esac
14567 libdir="$save_libdir"
14568 for dep in $dependency_libs; do
14569 case "$dep" in
14570 -L*)
14571 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14572 if test "X$additional_libdir" != "X/usr/lib"; then
14573 haveit=
14574 if test "X$additional_libdir" = "X/usr/local/lib"; then
14575 if test -n "$GCC"; then
14576 case $host_os in
14577 linux*) haveit=yes;;
14578 esac
14579 fi
14580 fi
14581 if test -z "$haveit"; then
14582 haveit=
14583 for x in $LDFLAGS $LIBIPT; do
5e030278 14584
05ea2a05
TT
14585 acl_save_prefix="$prefix"
14586 prefix="$acl_final_prefix"
14587 acl_save_exec_prefix="$exec_prefix"
14588 exec_prefix="$acl_final_exec_prefix"
14589 eval x=\"$x\"
14590 exec_prefix="$acl_save_exec_prefix"
14591 prefix="$acl_save_prefix"
5e030278 14592
05ea2a05
TT
14593 if test "X$x" = "X-L$additional_libdir"; then
14594 haveit=yes
14595 break
14596 fi
14597 done
14598 if test -z "$haveit"; then
14599 if test -d "$additional_libdir"; then
14600 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14601 fi
14602 fi
14603 haveit=
14604 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14605
05ea2a05
TT
14606 acl_save_prefix="$prefix"
14607 prefix="$acl_final_prefix"
14608 acl_save_exec_prefix="$exec_prefix"
14609 exec_prefix="$acl_final_exec_prefix"
14610 eval x=\"$x\"
14611 exec_prefix="$acl_save_exec_prefix"
14612 prefix="$acl_save_prefix"
5e030278 14613
05ea2a05
TT
14614 if test "X$x" = "X-L$additional_libdir"; then
14615 haveit=yes
14616 break
14617 fi
14618 done
14619 if test -z "$haveit"; then
14620 if test -d "$additional_libdir"; then
14621 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14622 fi
14623 fi
14624 fi
14625 fi
14626 ;;
14627 -R*)
14628 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14629 if test "$enable_rpath" != no; then
14630 haveit=
14631 for x in $rpathdirs; do
14632 if test "X$x" = "X$dir"; then
14633 haveit=yes
14634 break
14635 fi
14636 done
14637 if test -z "$haveit"; then
14638 rpathdirs="$rpathdirs $dir"
14639 fi
14640 haveit=
14641 for x in $ltrpathdirs; do
14642 if test "X$x" = "X$dir"; then
14643 haveit=yes
14644 break
14645 fi
14646 done
14647 if test -z "$haveit"; then
14648 ltrpathdirs="$ltrpathdirs $dir"
14649 fi
14650 fi
14651 ;;
14652 -l*)
14653 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14654 ;;
14655 *.la)
14656 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14657 ;;
14658 *)
14659 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14660 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14661 ;;
14662 esac
14663 done
14664 fi
14665 else
9f1528a1
AB
14666 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14667 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14668 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14669 else
14670 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14671 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14672 fi
05ea2a05 14673 fi
5e030278 14674 fi
05ea2a05
TT
14675 fi
14676 done
14677 done
14678 if test "X$rpathdirs" != "X"; then
14679 if test -n "$hardcode_libdir_separator"; then
14680 alldirs=
14681 for found_dir in $rpathdirs; do
14682 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14683 done
14684 acl_save_libdir="$libdir"
14685 libdir="$alldirs"
14686 eval flag=\"$hardcode_libdir_flag_spec\"
14687 libdir="$acl_save_libdir"
14688 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14689 else
14690 for found_dir in $rpathdirs; do
14691 acl_save_libdir="$libdir"
14692 libdir="$found_dir"
14693 eval flag=\"$hardcode_libdir_flag_spec\"
14694 libdir="$acl_save_libdir"
14695 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14696 done
14697 fi
14698 fi
14699 if test "X$ltrpathdirs" != "X"; then
14700 for found_dir in $ltrpathdirs; do
14701 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14702 done
14703 fi
5e030278
TT
14704
14705
05ea2a05 14706 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 14707
05ea2a05
TT
14708 for element in $INCIPT; do
14709 haveit=
14710 for x in $CPPFLAGS; do
5e030278 14711
05ea2a05
TT
14712 acl_save_prefix="$prefix"
14713 prefix="$acl_final_prefix"
14714 acl_save_exec_prefix="$exec_prefix"
14715 exec_prefix="$acl_final_exec_prefix"
14716 eval x=\"$x\"
14717 exec_prefix="$acl_save_exec_prefix"
14718 prefix="$acl_save_prefix"
5e030278 14719
05ea2a05
TT
14720 if test "X$x" = "X$element"; then
14721 haveit=yes
14722 break
14723 fi
14724 done
14725 if test -z "$haveit"; then
14726 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14727 fi
14728 done
5e030278
TT
14729
14730
05ea2a05
TT
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14732$as_echo_n "checking for libipt... " >&6; }
14733if ${ac_cv_libipt+:} false; then :
5e030278
TT
14734 $as_echo_n "(cached) " >&6
14735else
05ea2a05
TT
14736
14737 ac_save_LIBS="$LIBS"
14738 LIBS="$LIBS $LIBIPT"
14739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14740/* end confdefs.h. */
05ea2a05 14741#include "intel-pt.h"
5e030278
TT
14742int
14743main ()
14744{
05ea2a05 14745pt_insn_alloc_decoder (0);
5e030278
TT
14746 ;
14747 return 0;
14748}
14749_ACEOF
05ea2a05
TT
14750if ac_fn_c_try_link "$LINENO"; then :
14751 ac_cv_libipt=yes
5e030278 14752else
05ea2a05 14753 ac_cv_libipt=no
5e030278 14754fi
05ea2a05
TT
14755rm -f core conftest.err conftest.$ac_objext \
14756 conftest$ac_exeext conftest.$ac_ext
14757 LIBS="$ac_save_LIBS"
14758
5e030278 14759fi
05ea2a05
TT
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14761$as_echo "$ac_cv_libipt" >&6; }
14762 if test "$ac_cv_libipt" = yes; then
14763 HAVE_LIBIPT=yes
21987b9c 14764
05ea2a05
TT
14765$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14766
14767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14768$as_echo_n "checking how to link with libipt... " >&6; }
14769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14770$as_echo "$LIBIPT" >&6; }
14771 else
14772 HAVE_LIBIPT=no
14773 CPPFLAGS="$ac_save_CPPFLAGS"
14774 LIBIPT=
14775 LTLIBIPT=
14776 fi
14777
14778
14779
14780
14781
14782
14783 if test "$HAVE_LIBIPT" != yes; then
14784 if test "$with_intel_pt" = yes; then
14785 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14786 else
14787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14788$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14789 fi
14790 else
14791 save_LIBS=$LIBS
14792 LIBS="$LIBS $LIBIPT"
14793 for ac_func in pt_insn_event
21987b9c 14794do :
05ea2a05
TT
14795 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14796if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 14797 cat >>confdefs.h <<_ACEOF
05ea2a05 14798#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
14799_ACEOF
14800
14801fi
14802done
14803
05ea2a05
TT
14804 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14805"
14806if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 14807
05ea2a05
TT
14808cat >>confdefs.h <<_ACEOF
14809#define HAVE_STRUCT_PT_INSN_ENABLED 1
14810_ACEOF
5e030278 14811
5e030278 14812
05ea2a05
TT
14813fi
14814ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14815"
14816if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14817
14818cat >>confdefs.h <<_ACEOF
14819#define HAVE_STRUCT_PT_INSN_RESYNCED 1
14820_ACEOF
5e030278
TT
14821
14822
05ea2a05
TT
14823fi
14824
14825 LIBS=$save_LIBS
14826 fi
14827 fi
14828
c8693053
RO
14829
14830$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
14831
14832 for ac_header in sys/procfs.h
14833do :
14834 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
14835if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
14836 cat >>confdefs.h <<_ACEOF
14837#define HAVE_SYS_PROCFS_H 1
14838_ACEOF
14839
14840fi
14841
14842done
14843
05ea2a05 14844 if test "$ac_cv_header_sys_procfs_h" = yes; then
c8693053
RO
14845
14846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
05ea2a05
TT
14847$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14848 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
14849 $as_echo_n "(cached) " >&6
14850else
14851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14852/* end confdefs.h. */
14853
05ea2a05 14854#define _SYSCALL32
05ea2a05 14855#include <sys/procfs.h>
e9bcb658
GB
14856int
14857main ()
14858{
05ea2a05 14859gregset_t avar
e9bcb658
GB
14860 ;
14861 return 0;
14862}
14863_ACEOF
14864if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14865 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 14866else
05ea2a05 14867 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
14868
14869fi
05ea2a05 14870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 14871fi
06825bd1 14872
05ea2a05 14873 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 14874
05ea2a05 14875$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 14876
05ea2a05
TT
14877 fi
14878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14879$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14880
c8693053
RO
14881
14882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
14883$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14884 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14885 $as_echo_n "(cached) " >&6
bec39cab 14886else
81ecdfbb 14887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14888/* end confdefs.h. */
05ea2a05
TT
14889
14890#define _SYSCALL32
05ea2a05 14891#include <sys/procfs.h>
bec39cab
AC
14892int
14893main ()
14894{
05ea2a05 14895fpregset_t avar
064ef605
DJ
14896 ;
14897 return 0;
14898}
14899_ACEOF
9b30624b 14900if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14901 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14902else
14903 bfd_cv_have_sys_procfs_type_fpregset_t=no
14904
14905fi
14906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14907fi
14908
14909 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14910
14911$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14912
14913 fi
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14915$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14916
c8693053
RO
14917
14918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
05ea2a05
TT
14919$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14920 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14921 $as_echo_n "(cached) " >&6
064ef605 14922else
81ecdfbb 14923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14924/* end confdefs.h. */
05ea2a05
TT
14925
14926#define _SYSCALL32
05ea2a05 14927#include <sys/procfs.h>
064ef605
DJ
14928int
14929main ()
14930{
05ea2a05 14931prgregset_t avar
bec39cab
AC
14932 ;
14933 return 0;
14934}
14935_ACEOF
9b30624b 14936if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14937 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 14938else
05ea2a05
TT
14939 bfd_cv_have_sys_procfs_type_prgregset_t=no
14940
70f9f479 14941fi
81ecdfbb 14942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14943fi
bec39cab 14944
05ea2a05 14945 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 14946
05ea2a05
TT
14947$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14948
14949 fi
14950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14951$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14952
c8693053
RO
14953
14954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
05ea2a05
TT
14955$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14956 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14957 $as_echo_n "(cached) " >&6
bec39cab 14958else
81ecdfbb 14959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14960/* end confdefs.h. */
05ea2a05
TT
14961
14962#define _SYSCALL32
05ea2a05 14963#include <sys/procfs.h>
064ef605
DJ
14964int
14965main ()
14966{
05ea2a05 14967prfpregset_t avar
064ef605
DJ
14968 ;
14969 return 0;
14970}
14971_ACEOF
9b30624b 14972if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14973 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 14974else
05ea2a05 14975 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 14976
5c7f2947 14977fi
81ecdfbb 14978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
14979fi
14980
14981 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14982
14983$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14984
14985 fi
14986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14987$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14988
c8693053
RO
14989
14990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
05ea2a05
TT
14991$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14992 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14993 $as_echo_n "(cached) " >&6
14994else
14995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14996/* end confdefs.h. */
05ea2a05
TT
14997
14998#define _SYSCALL32
05ea2a05 14999#include <sys/procfs.h>
bec39cab
AC
15000int
15001main ()
15002{
05ea2a05 15003prgregset32_t avar
bec39cab
AC
15004 ;
15005 return 0;
15006}
15007_ACEOF
9b30624b 15008if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
15009 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15010else
15011 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 15012
064ef605 15013fi
81ecdfbb 15014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 15015fi
96d7229d 15016
05ea2a05 15017 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 15018
05ea2a05 15019$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 15020
05ea2a05
TT
15021 fi
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15023$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 15024
c8693053
RO
15025
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
05ea2a05
TT
15027$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15028 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 15029 $as_echo_n "(cached) " >&6
bec39cab 15030else
81ecdfbb 15031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15032/* end confdefs.h. */
05ea2a05
TT
15033
15034#define _SYSCALL32
05ea2a05 15035#include <sys/procfs.h>
bec39cab
AC
15036int
15037main ()
15038{
05ea2a05 15039lwpid_t avar
bec39cab
AC
15040 ;
15041 return 0;
15042}
15043_ACEOF
05ea2a05
TT
15044if ac_fn_c_try_compile "$LINENO"; then :
15045 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 15046else
05ea2a05
TT
15047 bfd_cv_have_sys_procfs_type_lwpid_t=no
15048
c906108c 15049fi
05ea2a05 15050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15051fi
81ecdfbb 15052
05ea2a05 15053 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 15054
05ea2a05 15055$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 15056
05ea2a05
TT
15057 fi
15058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15059$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 15060
c8693053
RO
15061
15062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
05ea2a05
TT
15063$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15064 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 15065 $as_echo_n "(cached) " >&6
97bf5e38 15066else
81ecdfbb 15067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15068/* end confdefs.h. */
a3828db0 15069
05ea2a05 15070#define _SYSCALL32
05ea2a05 15071#include <sys/procfs.h>
bec39cab
AC
15072int
15073main ()
15074{
05ea2a05 15075psaddr_t avar
bec39cab
AC
15076 ;
15077 return 0;
15078}
15079_ACEOF
81ecdfbb 15080if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15081 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15082else
05ea2a05
TT
15083 bfd_cv_have_sys_procfs_type_psaddr_t=no
15084
c906108c 15085fi
81ecdfbb 15086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15087fi
c3f6f71d 15088
05ea2a05 15089 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 15090
05ea2a05 15091$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 15092
05ea2a05
TT
15093 fi
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15095$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15096
c8693053
RO
15097
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15099$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15100 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
15101 $as_echo_n "(cached) " >&6
15102else
15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15104/* end confdefs.h. */
05ea2a05
TT
15105
15106#define _SYSCALL32
05ea2a05 15107#include <sys/procfs.h>
db1ff28b
JK
15108int
15109main ()
15110{
05ea2a05 15111elf_fpregset_t avar
db1ff28b
JK
15112 ;
15113 return 0;
15114}
15115_ACEOF
15116if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15117 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 15118else
05ea2a05
TT
15119 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15120
db1ff28b
JK
15121fi
15122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15123fi
db1ff28b 15124
05ea2a05 15125 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 15126
05ea2a05 15127$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 15128
05ea2a05
TT
15129 fi
15130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15131$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 15132
05ea2a05
TT
15133 fi
15134
15135
15136# Check the return and argument types of ptrace.
15137
15138
15139for ac_header in sys/ptrace.h ptrace.h
15140do :
15141 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15142ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15143if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15144 cat >>confdefs.h <<_ACEOF
15145#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15146_ACEOF
db1ff28b
JK
15147
15148fi
15149
05ea2a05
TT
15150done
15151
81ecdfbb 15152
05ea2a05
TT
15153gdb_ptrace_headers='
15154#include <sys/types.h>
15155#if HAVE_SYS_PTRACE_H
15156# include <sys/ptrace.h>
15157#endif
15158#if HAVE_UNISTD_H
15159# include <unistd.h>
15160#endif
15161'
5c45e068 15162
05ea2a05
TT
15163# Check return type. Varargs (used on GNU/Linux) conflict with the
15164# empty argument list, so check for that explicitly.
15165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15166$as_echo_n "checking return type of ptrace... " >&6; }
15167if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 15168 $as_echo_n "(cached) " >&6
bec39cab 15169else
81ecdfbb 15170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15171/* end confdefs.h. */
5164c117 15172 $gdb_ptrace_headers
bec39cab
AC
15173int
15174main ()
15175{
05ea2a05 15176extern long ptrace (enum __ptrace_request, ...);
5164c117 15177
bec39cab
AC
15178 ;
15179 return 0;
15180}
15181_ACEOF
81ecdfbb 15182if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15183 gdb_cv_func_ptrace_ret='long'
bec39cab 15184else
81ecdfbb 15185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15186/* end confdefs.h. */
05ea2a05 15187$gdb_ptrace_headers
bec39cab
AC
15188int
15189main ()
15190{
05ea2a05 15191extern int ptrace ();
5164c117 15192
bec39cab
AC
15193 ;
15194 return 0;
15195}
15196_ACEOF
81ecdfbb 15197if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15198 gdb_cv_func_ptrace_ret='int'
27ca5dad 15199else
05ea2a05 15200 gdb_cv_func_ptrace_ret='long'
b6fb30ed 15201
27ca5dad 15202fi
81ecdfbb 15203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15204
27ca5dad 15205fi
05ea2a05 15206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15207
27ca5dad 15208fi
05ea2a05
TT
15209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15210$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068 15211
b6fb30ed 15212
5c45e068 15213cat >>confdefs.h <<_ACEOF
05ea2a05 15214#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15215_ACEOF
3862412b 15216
b6fb30ed 15217
05ea2a05
TT
15218# Check argument types.
15219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15220$as_echo_n "checking types of arguments for ptrace... " >&6; }
15221if ${gdb_cv_func_ptrace_args+:} false; then :
15222 $as_echo_n "(cached) " >&6
15223else
05ea2a05
TT
15224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15225/* end confdefs.h. */
15226$gdb_ptrace_headers
15227int
15228main ()
15229{
15230extern long ptrace (enum __ptrace_request, ...);
5164c117 15231
05ea2a05
TT
15232 ;
15233 return 0;
15234}
bec39cab 15235_ACEOF
05ea2a05
TT
15236if ac_fn_c_try_compile "$LINENO"; then :
15237 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15238else
b6fb30ed
SM
15239 for gdb_arg1 in 'int' 'long'; do
15240 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15241 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15242 for gdb_arg4 in 'int' 'long' 'void *'; do
15243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
15244/* end confdefs.h. */
15245$gdb_ptrace_headers
15246int
15247main ()
15248{
b6fb30ed 15249extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5164c117 15250
05ea2a05
TT
15251 ;
15252 return 0;
15253}
15254_ACEOF
15255if ac_fn_c_try_compile "$LINENO"; then :
15256 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
b6fb30ed
SM
15257 break 4;
15258
97bf5e38 15259fi
05ea2a05 15260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
15261
15262 for gdb_arg5 in 'int *' 'int' 'long'; do
15263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
05ea2a05
TT
15264/* end confdefs.h. */
15265$gdb_ptrace_headers
15266int
15267main ()
15268{
b6fb30ed 15269extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5164c117 15270
05ea2a05
TT
15271 ;
15272 return 0;
15273}
6fea9e18 15274_ACEOF
05ea2a05 15275if ac_fn_c_try_compile "$LINENO"; then :
b6fb30ed
SM
15276 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15277 break 5;
6fea9e18 15278
05ea2a05
TT
15279fi
15280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed
SM
15281 done
15282 done
15283 done
15284 done
15285 done
15286 # Provide a safe default value.
15287 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
15288
15289fi
05ea2a05 15290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b6fb30ed 15291
05ea2a05
TT
15292fi
15293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15294$as_echo "$gdb_cv_func_ptrace_args" >&6; }
b6fb30ed 15295
05ea2a05
TT
15296ac_save_IFS=$IFS; IFS=','
15297set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15298IFS=$ac_save_IFS
15299shift
6fea9e18
L
15300
15301cat >>confdefs.h <<_ACEOF
05ea2a05 15302#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
15303_ACEOF
15304
15305
05ea2a05
TT
15306cat >>confdefs.h <<_ACEOF
15307#define PTRACE_TYPE_ARG3 $3
bec39cab 15308_ACEOF
451928c5 15309
60ca704f 15310
05ea2a05
TT
15311cat >>confdefs.h <<_ACEOF
15312#define PTRACE_TYPE_ARG4 $4
15313_ACEOF
15314
15315if test -n "$5"; then
15316
15317cat >>confdefs.h <<_ACEOF
15318#define PTRACE_TYPE_ARG5 $5
15319_ACEOF
451928c5 15320
97bf5e38 15321fi
451928c5 15322
05ea2a05
TT
15323
15324if test "$cross_compiling" = no; then
15325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15326$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15327if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15328 $as_echo_n "(cached) " >&6
05ea2a05
TT
15329else
15330 if test "$cross_compiling" = yes; then :
15331 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 15332else
81ecdfbb 15333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15334/* end confdefs.h. */
05ea2a05 15335$ac_includes_default
bec39cab
AC
15336int
15337main ()
15338{
05ea2a05
TT
15339/* If this system has a BSD-style setpgrp which takes arguments,
15340 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15341 exit successfully. */
15342 return setpgrp (1,1) != -1;
bec39cab
AC
15343 ;
15344 return 0;
15345}
15346_ACEOF
05ea2a05
TT
15347if ac_fn_c_try_run "$LINENO"; then :
15348 ac_cv_func_setpgrp_void=no
451928c5 15349else
05ea2a05 15350 ac_cv_func_setpgrp_void=yes
451928c5 15351fi
05ea2a05
TT
15352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15353 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
15354fi
15355
05ea2a05
TT
15356fi
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15358$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15359if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15360
05ea2a05 15361$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15362
97bf5e38 15363fi
451928c5 15364
05ea2a05
TT
15365else
15366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15367$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15368if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15369 $as_echo_n "(cached) " >&6
3862412b 15370else
81ecdfbb 15371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15372/* end confdefs.h. */
05ea2a05 15373#include <unistd.h>
bec39cab
AC
15374int
15375main ()
15376{
5593a99a
SM
15377if (setpgrp(1,1) == -1)
15378 exit (0);
15379 else
15380 exit (1);
05ea2a05 15381
bec39cab
AC
15382 ;
15383 return 0;
15384}
15385_ACEOF
81ecdfbb 15386if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15387 ac_cv_func_setpgrp_void=no
3862412b 15388else
05ea2a05 15389 ac_cv_func_setpgrp_void=yes
5593a99a 15390
3862412b 15391fi
81ecdfbb 15392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15393
3862412b 15394fi
05ea2a05
TT
15395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15396$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15397if test "$ac_cv_func_setpgrp_void" = yes; then
15398 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15399
05ea2a05 15400fi
97bf5e38 15401fi
3862412b 15402
05ea2a05
TT
15403# Assume we'll default to using the included libiberty regex.
15404gdb_use_included_regex=yes
15405
15406# However, if the system regex is GNU regex, then default to *not*
15407# using the included regex.
15408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15409$as_echo_n "checking for GNU regex... " >&6; }
15410if ${gdb_cv_have_gnu_regex+:} false; then :
81ecdfbb 15411 $as_echo_n "(cached) " >&6
3862412b 15412else
81ecdfbb 15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15414/* end confdefs.h. */
05ea2a05 15415#include <gnu-versions.h>
bec39cab
AC
15416int
15417main ()
15418{
05ea2a05 15419#define REGEX_INTERFACE_VERSION 1
5593a99a
SM
15420 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15421 # error "Version mismatch"
15422 #endif
15423
bec39cab
AC
15424 ;
15425 return 0;
15426}
15427_ACEOF
81ecdfbb 15428if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15429 gdb_cv_have_gnu_regex=yes
3862412b 15430else
05ea2a05 15431 gdb_cv_have_gnu_regex=no
5593a99a 15432
3862412b 15433fi
81ecdfbb 15434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15435
3862412b 15436fi
05ea2a05
TT
15437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15438$as_echo "$gdb_cv_have_gnu_regex" >&6; }
15439if test "$gdb_cv_have_gnu_regex" = yes; then
15440 gdb_use_included_regex=no
15441fi
3862412b 15442
3862412b 15443
05ea2a05
TT
15444# Check whether --with-included-regex was given.
15445if test "${with_included_regex+set}" = set; then :
15446 withval=$with_included_regex; gdb_with_regex=$withval
15447else
15448 gdb_with_regex=$gdb_use_included_regex
97bf5e38 15449fi
3862412b 15450
05ea2a05 15451if test "$gdb_with_regex" = yes; then
6e9567fe 15452
05ea2a05 15453$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
6e9567fe
JB
15454
15455fi
15456
05ea2a05
TT
15457# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15458ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15459#include <sys/proc.h>
6e9567fe 15460
e6cdd38e 15461"
05ea2a05 15462if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15463
15464cat >>confdefs.h <<_ACEOF
05ea2a05 15465#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15466_ACEOF
15467
15468
15469fi
15470
6e9567fe 15471
05ea2a05
TT
15472# See if <sys/lwp.h> defines `struct lwp`.
15473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15474$as_echo_n "checking for struct lwp... " >&6; }
15475if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15476 $as_echo_n "(cached) " >&6
596c9d4b 15477else
81ecdfbb 15478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15479/* end confdefs.h. */
05ea2a05 15480#include <sys/param.h>
5593a99a
SM
15481 #define _KMEMUSER
15482 #include <sys/lwp.h>
bec39cab
AC
15483int
15484main ()
15485{
05ea2a05 15486struct lwp l;
5593a99a 15487
bec39cab
AC
15488 ;
15489 return 0;
15490}
15491_ACEOF
81ecdfbb 15492if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15493 gdb_cv_struct_lwp=yes
596c9d4b 15494else
05ea2a05 15495 gdb_cv_struct_lwp=no
5593a99a 15496
596c9d4b 15497fi
81ecdfbb 15498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15499
596c9d4b 15500fi
05ea2a05
TT
15501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15502$as_echo "$gdb_cv_struct_lwp" >&6; }
15503if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15504
05ea2a05 15505$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15506
05ea2a05 15507fi
451928c5 15508
05ea2a05
TT
15509# See if <machine/reg.h> degines `struct reg'.
15510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15511$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15512if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 15513 $as_echo_n "(cached) " >&6
d84dd0c5 15514else
81ecdfbb 15515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15516/* end confdefs.h. */
05ea2a05 15517#include <sys/types.h>
5593a99a 15518 #include <machine/reg.h>
bec39cab
AC
15519int
15520main ()
15521{
05ea2a05 15522struct reg r;
5593a99a 15523
bec39cab
AC
15524 ;
15525 return 0;
15526}
15527_ACEOF
81ecdfbb 15528if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15529 gdb_cv_struct_reg=yes
d84dd0c5 15530else
05ea2a05 15531 gdb_cv_struct_reg=no
5593a99a 15532
d84dd0c5 15533fi
81ecdfbb 15534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15535
d84dd0c5 15536fi
05ea2a05
TT
15537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15538$as_echo "$gdb_cv_struct_reg" >&6; }
15539if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 15540
05ea2a05 15541$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 15542
05ea2a05 15543fi
d84dd0c5 15544
05ea2a05
TT
15545# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15546# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15547ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15548#include <machine/reg.h>
15549"
15550if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 15551
05ea2a05
TT
15552cat >>confdefs.h <<_ACEOF
15553#define HAVE_STRUCT_REG_R_FS 1
15554_ACEOF
15555
15556
15557fi
15558ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15559#include <machine/reg.h>
15560"
15561if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15562
15563cat >>confdefs.h <<_ACEOF
15564#define HAVE_STRUCT_REG_R_GS 1
15565_ACEOF
15566
15567
15568fi
15569
15570
05ea2a05
TT
15571# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15573$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15574if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 15575 $as_echo_n "(cached) " >&6
d45fe813 15576else
81ecdfbb 15577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15578/* end confdefs.h. */
05ea2a05 15579#include <sys/ptrace.h>
bec39cab
AC
15580int
15581main ()
15582{
05ea2a05 15583PTRACE_GETREGS;
bec39cab
AC
15584 ;
15585 return 0;
15586}
15587_ACEOF
81ecdfbb 15588if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15589 gdb_cv_have_ptrace_getregs=yes
d45fe813 15590else
05ea2a05 15591 gdb_cv_have_ptrace_getregs=no
5593a99a 15592
d45fe813 15593fi
81ecdfbb 15594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15595
d45fe813
KB
15596fi
15597
05ea2a05
TT
15598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15599$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15600if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 15601
05ea2a05 15602$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 15603
05ea2a05 15604fi
d45fe813 15605
05ea2a05
TT
15606# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15608$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15609if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 15610 $as_echo_n "(cached) " >&6
d45fe813 15611else
81ecdfbb 15612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15613/* end confdefs.h. */
05ea2a05 15614#include <sys/ptrace.h>
bec39cab
AC
15615int
15616main ()
15617{
05ea2a05 15618PTRACE_GETFPXREGS;
bec39cab
AC
15619 ;
15620 return 0;
15621}
15622_ACEOF
81ecdfbb 15623if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15624 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 15625else
05ea2a05 15626 gdb_cv_have_ptrace_getfpxregs=no
5593a99a 15627
d45fe813 15628fi
81ecdfbb 15629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15630
d45fe813
KB
15631fi
15632
05ea2a05
TT
15633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15634$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15635if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 15636
05ea2a05 15637$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 15638
05ea2a05 15639fi
d45fe813 15640
05ea2a05
TT
15641# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15643$as_echo_n "checking for PT_GETDBREGS... " >&6; }
15644if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 15645 $as_echo_n "(cached) " >&6
d45fe813 15646else
81ecdfbb 15647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15648/* end confdefs.h. */
05ea2a05 15649#include <sys/types.h>
5593a99a 15650 #include <sys/ptrace.h>
bec39cab
AC
15651int
15652main ()
15653{
05ea2a05 15654PT_GETDBREGS;
5593a99a 15655
bec39cab
AC
15656 ;
15657 return 0;
15658}
15659_ACEOF
81ecdfbb 15660if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15661 gdb_cv_have_pt_getdbregs=yes
d45fe813 15662else
05ea2a05 15663 gdb_cv_have_pt_getdbregs=no
5593a99a 15664
d45fe813 15665fi
81ecdfbb 15666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15667
d45fe813
KB
15668fi
15669
05ea2a05
TT
15670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15671$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15672if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 15673
05ea2a05 15674$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 15675
05ea2a05 15676fi
c906108c 15677
05ea2a05
TT
15678# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15680$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15681if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 15682 $as_echo_n "(cached) " >&6
c906108c 15683else
81ecdfbb 15684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15685/* end confdefs.h. */
05ea2a05 15686#include <sys/types.h>
5593a99a 15687 #include <sys/ptrace.h>
bec39cab
AC
15688int
15689main ()
15690{
05ea2a05 15691PT_GETXMMREGS;
5593a99a 15692
bec39cab
AC
15693 ;
15694 return 0;
15695}
15696_ACEOF
81ecdfbb 15697if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15698 gdb_cv_have_pt_getxmmregs=yes
c906108c 15699else
05ea2a05 15700 gdb_cv_have_pt_getxmmregs=no
5593a99a 15701
c906108c 15702fi
81ecdfbb 15703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 15704
c906108c
SS
15705fi
15706
05ea2a05
TT
15707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15708$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15709if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 15710
05ea2a05 15711$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 15712
05ea2a05 15713fi
c906108c 15714
05ea2a05
TT
15715# See if <sys/ptrace.h> supports LWP names on FreeBSD
15716# Older FreeBSD versions don't have the pl_tdname member of
15717# `struct ptrace_lwpinfo'.
15718ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15719"
15720if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 15721
05ea2a05
TT
15722cat >>confdefs.h <<_ACEOF
15723#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 15724_ACEOF
43b7e92b 15725
05ea2a05 15726
43b7e92b
GB
15727fi
15728
43b7e92b 15729
05ea2a05
TT
15730# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15731# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15732# FreeBSD 10.3.
15733ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15734"
15735if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15736
15737cat >>confdefs.h <<_ACEOF
15738#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15739_ACEOF
43b7e92b 15740
43b7e92b 15741
c906108c 15742fi
c906108c 15743
05ea2a05 15744
bc8bcb4b 15745# Check if the compiler supports the `long long' type.
c906108c 15746
81ecdfbb
RW
15747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15748$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15749if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15750 $as_echo_n "(cached) " >&6
97bf5e38 15751else
81ecdfbb 15752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15753/* end confdefs.h. */
bc8bcb4b 15754extern long long foo;
bec39cab
AC
15755int
15756main ()
15757{
bc8bcb4b 15758switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15759 ;
15760 return 0;
15761}
15762_ACEOF
81ecdfbb 15763if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15764 gdb_cv_c_long_long=yes
15765else
81ecdfbb 15766 gdb_cv_c_long_long=no
97bf5e38 15767fi
81ecdfbb 15768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15769fi
81ecdfbb
RW
15770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15771$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15772if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15773 # libdecnumber requires long long.
d0ac1c44 15774 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15775fi
15776
bc8bcb4b 15777# Check if the compiler and runtime support printing long longs.
97bf5e38 15778
81ecdfbb
RW
15779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15780$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15781if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15782 $as_echo_n "(cached) " >&6
97bf5e38 15783else
81ecdfbb 15784 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15785 gdb_cv_printf_has_long_long=no
15786else
81ecdfbb 15787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15788/* end confdefs.h. */
bc8bcb4b
MK
15789$ac_includes_default
15790int
15791main ()
15792{
15793char buf[32];
97bf5e38
MK
15794 long long l = 0;
15795 l = (l << 16) + 0x0123;
15796 l = (l << 16) + 0x4567;
15797 l = (l << 16) + 0x89ab;
15798 l = (l << 16) + 0xcdef;
15799 sprintf (buf, "0x%016llx", l);
15800 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15801 ;
15802 return 0;
c906108c 15803}
bec39cab 15804_ACEOF
81ecdfbb 15805if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15806 gdb_cv_printf_has_long_long=yes
15807else
81ecdfbb 15808 gdb_cv_printf_has_long_long=no
97bf5e38 15809fi
81ecdfbb
RW
15810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15811 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15812fi
81ecdfbb 15813
97bf5e38 15814fi
81ecdfbb
RW
15815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15816$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15817if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15818
81ecdfbb 15819$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15820
15821fi
97bf5e38 15822
1a619819
LM
15823# Check if the compiler and runtime support printing decfloats.
15824
81ecdfbb
RW
15825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15826$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15827if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15828 $as_echo_n "(cached) " >&6
1a619819 15829else
81ecdfbb 15830 if test "$cross_compiling" = yes; then :
1a619819
LM
15831 gdb_cv_printf_has_decfloat=no
15832else
81ecdfbb 15833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15834/* end confdefs.h. */
15835$ac_includes_default
15836int
15837main ()
15838{
15839char buf[64];
15840 _Decimal32 d32 = 1.2345df;
15841 _Decimal64 d64 = 1.2345dd;
15842 _Decimal128 d128 = 1.2345dl;
15843 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15844 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15845 ;
15846 return 0;
15847}
15848_ACEOF
81ecdfbb 15849if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15850 gdb_cv_printf_has_decfloat=yes
15851else
81ecdfbb 15852 gdb_cv_printf_has_decfloat=no
1a619819 15853fi
81ecdfbb
RW
15854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15855 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15856fi
81ecdfbb 15857
1a619819 15858fi
81ecdfbb
RW
15859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15860$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15861if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15862
81ecdfbb 15863$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15864
15865fi
15866
bc8bcb4b
MK
15867# Check if the compiler supports the `long double' type. We can't use
15868# AC_C_LONG_DOUBLE because that one does additional checks on the
15869# constants defined in <float.h> that fail on some systems,
15870# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15871
81ecdfbb
RW
15872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15873$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15874if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15875 $as_echo_n "(cached) " >&6
97bf5e38 15876else
81ecdfbb 15877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15878/* end confdefs.h. */
97bf5e38 15879long double foo;
bec39cab 15880_ACEOF
81ecdfbb 15881if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15882 gdb_cv_c_long_double=yes
97bf5e38 15883else
81ecdfbb 15884 gdb_cv_c_long_double=no
97bf5e38 15885fi
81ecdfbb 15886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15887fi
81ecdfbb
RW
15888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15889$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15890if test "$gdb_cv_c_long_double" = yes; then
c906108c 15891
81ecdfbb 15892$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15893
15894fi
15895
bc8bcb4b 15896# Check if the compiler and runtime support printing long doubles.
97bf5e38 15897
81ecdfbb
RW
15898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15899$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15900if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15901 $as_echo_n "(cached) " >&6
97bf5e38 15902else
81ecdfbb 15903 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15904 gdb_cv_printf_has_long_double=no
15905else
81ecdfbb 15906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15907/* end confdefs.h. */
bc8bcb4b
MK
15908$ac_includes_default
15909int
15910main ()
15911{
15912char buf[16];
97bf5e38
MK
15913 long double f = 3.141592653;
15914 sprintf (buf, "%Lg", f);
15915 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15916 ;
15917 return 0;
97bf5e38 15918}
bec39cab 15919_ACEOF
81ecdfbb 15920if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15921 gdb_cv_printf_has_long_double=yes
c906108c 15922else
81ecdfbb 15923 gdb_cv_printf_has_long_double=no
c906108c 15924fi
81ecdfbb
RW
15925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15926 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15927fi
81ecdfbb 15928
c906108c 15929fi
81ecdfbb
RW
15930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15931$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15932if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15933
81ecdfbb 15934$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15935
15936fi
97bf5e38 15937
bc8bcb4b 15938# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15939
81ecdfbb
RW
15940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15941$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15942if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15943 $as_echo_n "(cached) " >&6
97bf5e38 15944else
81ecdfbb 15945 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15946 gdb_cv_scanf_has_long_double=no
15947else
81ecdfbb 15948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15949/* end confdefs.h. */
bc8bcb4b
MK
15950#include <stdio.h>
15951int
15952main ()
15953{
15954char *buf = "3.141592653";
97bf5e38
MK
15955 long double f = 0;
15956 sscanf (buf, "%Lg", &f);
15957 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15958 ;
15959 return 0;
97bf5e38 15960}
bec39cab 15961_ACEOF
81ecdfbb 15962if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15963 gdb_cv_scanf_has_long_double=yes
15964else
81ecdfbb 15965 gdb_cv_scanf_has_long_double=no
97bf5e38 15966fi
81ecdfbb
RW
15967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15968 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15969fi
81ecdfbb 15970
c906108c 15971fi
81ecdfbb
RW
15972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15973$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 15974if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 15975
81ecdfbb 15976$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15977
15978fi
c906108c 15979
438013df
AO
15980case ${host_os} in
15981aix*)
81ecdfbb
RW
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15983$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 15984if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 15985 $as_echo_n "(cached) " >&6
438013df 15986else
5593a99a 15987 SAVE_LDFLAGS=$LDFLAGS
bec39cab 15988
5593a99a
SM
15989 case $GCC in
15990 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15991 *) gdb_cv_bigtoc=-bbigtoc ;;
15992 esac
438013df 15993
5593a99a
SM
15994 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15996/* end confdefs.h. */
438013df 15997
bec39cab
AC
15998int
15999main ()
16000{
438013df 16001int i;
bec39cab
AC
16002 ;
16003 return 0;
16004}
16005_ACEOF
81ecdfbb 16006if ac_fn_c_try_link "$LINENO"; then :
bec39cab 16007
81ecdfbb
RW
16008else
16009 gdb_cv_bigtoc=
5593a99a 16010
438013df 16011fi
81ecdfbb
RW
16012rm -f core conftest.err conftest.$ac_objext \
16013 conftest$ac_exeext conftest.$ac_ext
5593a99a 16014 LDFLAGS="${SAVE_LDFLAGS}"
438013df 16015
bec39cab 16016fi
81ecdfbb
RW
16017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16018$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
16019 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16020 ;;
16021esac
16022
38f6b338 16023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 16024$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
16025dynamic_list=false
16026if test "${gdb_native}" = yes; then
16027 # The dynamically loaded libthread_db needs access to symbols in the gdb
16028 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16029 # may not be supported there.
16030 old_LDFLAGS="$LDFLAGS"
16031 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16032 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16033 LDFLAGS="$LDFLAGS $RDYNAMIC"
16034 if test "${have_libpython}" = no; then
16035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
16036/* end confdefs.h. */
16037
16038int
16039main ()
16040{
16041
16042 ;
16043 return 0;
16044}
16045_ACEOF
16046if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
16047 dynamic_list=true
16048fi
16049rm -f core conftest.err conftest.$ac_objext \
16050 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
16051 else
16052 # Workaround http://bugs.python.org/issue4434 where static
16053 # libpythonX.Y.a would get its symbols required for
16054 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16055 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
16056
16057 # Note the workaround for Python
16058 # http://bugs.python.org/issue10112 earlier has removed
16059 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16060 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16061 # always pass.
38f6b338
JK
16062 old_CFLAGS="$CFLAGS"
16063 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
16064 old_LIBS="$LIBS"
16065 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
16066 old_CPPFLAGS="$CPPFLAGS"
16067 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 16068 if test "$cross_compiling" = yes; then :
3bebe2f2 16069 true
f6528abd 16070else
3bebe2f2
JK
16071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16072/* end confdefs.h. */
1b4f615e 16073#include "Python.h"
3bebe2f2
JK
16074int
16075main ()
16076{
16077int err;
38f6b338
JK
16078 Py_Initialize ();
16079 err = PyRun_SimpleString ("import itertools\n");
16080 Py_Finalize ();
16081 return err == 0 ? 0 : 1;
3bebe2f2
JK
16082 ;
16083 return 0;
16084}
16085_ACEOF
16086if ac_fn_c_try_run "$LINENO"; then :
16087 dynamic_list=true
16088fi
16089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16090 conftest.$ac_objext conftest.beam conftest.$ac_ext
16091fi
16092
8c1fb155 16093 LIBS="$old_LIBS"
38f6b338 16094 CFLAGS="$old_CFLAGS"
1b4f615e 16095 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
16096 fi
16097 LDFLAGS="$old_LDFLAGS"
16098fi
16099if $dynamic_list; then
16100 found="-Wl,--dynamic-list"
16101 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 16102else
38f6b338
JK
16103 found="-rdynamic"
16104 RDYNAMIC="-rdynamic"
f6528abd 16105fi
f6528abd 16106
38f6b338 16107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 16108$as_echo "$found" >&6; }
0407b3f1 16109
f6528abd 16110
0ad6b8ee 16111if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 16112 case ${host_os} in
d92419e5 16113 aix*)
81ecdfbb
RW
16114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16115$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 16116 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 16117 $as_echo_n "(cached) " >&6
bec39cab 16118else
81ecdfbb 16119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16120/* end confdefs.h. */
d92419e5 16121#include <sys/pthdebug.h>
bec39cab
AC
16122int
16123main ()
16124{
d92419e5 16125#ifndef PTHDB_VERSION_3
5593a99a
SM
16126 #error
16127 #endif
16128
bec39cab
AC
16129 ;
16130 return 0;
16131}
16132_ACEOF
81ecdfbb 16133if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
16134 gdb_cv_have_aix_thread_debug=yes
16135else
81ecdfbb 16136 gdb_cv_have_aix_thread_debug=no
5593a99a 16137
d92419e5 16138fi
81ecdfbb 16139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593a99a 16140
d92419e5
JB
16141fi
16142
81ecdfbb
RW
16143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16144$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 16145 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 16146 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 16147 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 16148 LIBS="$LIBS -lpthdebug"
d645e32e
JB
16149
16150 # Older versions of AIX do not provide the declaration for
16151 # the getthrds function (it appears that it was introduced
16152 # with AIX 6.x).
16153 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16154"
d0ac1c44 16155if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
16156 ac_have_decl=1
16157else
16158 ac_have_decl=0
16159fi
16160
16161cat >>confdefs.h <<_ACEOF
16162#define HAVE_DECL_GETTHRDS $ac_have_decl
16163_ACEOF
16164
d92419e5
JB
16165 fi
16166 ;;
c906108c 16167 esac
bec39cab 16168
c906108c
SS
16169fi
16170
3f47be5c 16171if test "x$ac_cv_header_thread_db_h" = "xyes"; then
5593a99a 16172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
81ecdfbb 16173$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 16174if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 16175 $as_echo_n "(cached) " >&6
bec39cab 16176else
81ecdfbb 16177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16178/* end confdefs.h. */
3f47be5c 16179#include <thread_db.h>
bec39cab
AC
16180int
16181main ()
16182{
3f47be5c 16183int i = TD_NOTALLOC;
5593a99a 16184
bec39cab
AC
16185 ;
16186 return 0;
16187}
16188_ACEOF
81ecdfbb 16189if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
16190 gdb_cv_thread_db_h_has_td_notalloc=yes
16191else
81ecdfbb 16192 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 16193
3f47be5c 16194fi
81ecdfbb 16195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 16196
bec39cab 16197fi
81ecdfbb
RW
16198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16199$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
5593a99a
SM
16200
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
81ecdfbb 16202$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 16203if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 16204 $as_echo_n "(cached) " >&6
59f80f10 16205else
81ecdfbb 16206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16207/* end confdefs.h. */
16208#include <thread_db.h>
16209int
16210main ()
16211{
16212int i = TD_VERSION;
5593a99a 16213
59f80f10
DJ
16214 ;
16215 return 0;
16216}
16217_ACEOF
81ecdfbb 16218if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16219 gdb_cv_thread_db_h_has_td_version=yes
16220else
81ecdfbb 16221 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
16222
16223fi
81ecdfbb 16224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16225
16226fi
81ecdfbb
RW
16227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16228$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
5593a99a
SM
16229
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
81ecdfbb 16231$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 16232if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 16233 $as_echo_n "(cached) " >&6
59f80f10 16234else
81ecdfbb 16235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16236/* end confdefs.h. */
16237#include <thread_db.h>
16238int
16239main ()
16240{
16241int i = TD_NOTLS;
5593a99a 16242
59f80f10
DJ
16243 ;
16244 return 0;
16245}
16246_ACEOF
81ecdfbb 16247if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16248 gdb_cv_thread_db_h_has_td_notls=yes
16249else
81ecdfbb 16250 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
16251
16252fi
81ecdfbb 16253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16254
16255fi
81ecdfbb
RW
16256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16257$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
16258fi
16259if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 16260
81ecdfbb 16261$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 16262
59f80f10
DJ
16263fi
16264if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16265
81ecdfbb 16266$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
16267
16268fi
16269if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16270
81ecdfbb 16271$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 16272
3f47be5c
EZ
16273fi
16274
e655c1a2
PA
16275case $host_os in
16276 go32* | *djgpp*)
16277 gdbinit=gdb.ini
16278 ;;
16279 *)
16280 gdbinit=.gdbinit
16281 ;;
16282esac
16283
16284cat >>confdefs.h <<_ACEOF
16285#define GDBINIT "$gdbinit"
16286_ACEOF
16287
16288
fb40c209 16289
f83d8a90
DE
16290# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16291# except that the argument to --with-sysroot is optional.
16292# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16293if test "x$with_sysroot" = xyes; then
16294 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16295fi
bec39cab 16296
81ecdfbb
RW
16297# Check whether --with-sysroot was given.
16298if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16299 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16300else
16301 TARGET_SYSTEM_ROOT=
16302fi
030292b7 16303
030292b7 16304
f83d8a90
DE
16305 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16306 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16307 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16308 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16309
f83d8a90
DE
16310cat >>confdefs.h <<_ACEOF
16311#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16312_ACEOF
bec39cab 16313
030292b7 16314
b14b1491 16315
f83d8a90
DE
16316
16317 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16318 if test "x$prefix" = xNONE; then
16319 test_prefix=/usr/local
16320 else
16321 test_prefix=$prefix
16322 fi
16323 else
16324 test_prefix=$exec_prefix
16325 fi
16326 value=0
16327 case ${ac_define_dir} in
16328 "${test_prefix}"|"${test_prefix}/"*|\
16329 '${exec_prefix}'|'${exec_prefix}/'*)
16330 value=1
16331 ;;
16332 esac
16333
16334cat >>confdefs.h <<_ACEOF
16335#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16336_ACEOF
030292b7
DJ
16337
16338
16339
16e7150e 16340
16e7150e 16341
81ecdfbb
RW
16342# Check whether --with-system-gdbinit was given.
16343if test "${with_system_gdbinit+set}" = set; then :
16344 withval=$with_system_gdbinit;
b14b1491
TT
16345 SYSTEM_GDBINIT=$withval
16346else
16347 SYSTEM_GDBINIT=
81ecdfbb
RW
16348fi
16349
16e7150e
JG
16350
16351 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16352 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16353 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16354 ac_define_dir=`eval echo $ac_define_dir`
16355
16356cat >>confdefs.h <<_ACEOF
16357#define SYSTEM_GDBINIT "$ac_define_dir"
16358_ACEOF
16359
16360
16361
0c4a4063 16362
b14b1491
TT
16363 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16364 if test "x$prefix" = xNONE; then
16365 test_prefix=/usr/local
16366 else
16367 test_prefix=$prefix
16368 fi
16369 else
16370 test_prefix=$exec_prefix
16371 fi
16372 value=0
16373 case ${ac_define_dir} in
16374 "${test_prefix}"|"${test_prefix}/"*|\
16375 '${exec_prefix}'|'${exec_prefix}/'*)
16376 value=1
16377 ;;
16378 esac
16e7150e 16379
b14b1491
TT
16380cat >>confdefs.h <<_ACEOF
16381#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16382_ACEOF
16383
b14b1491 16384
16e7150e 16385
0c4a4063 16386
b835bb52 16387
ed2a2229
CB
16388# Check whether --with-system-gdbinit-dir was given.
16389if test "${with_system_gdbinit_dir+set}" = set; then :
16390 withval=$with_system_gdbinit_dir;
16391 SYSTEM_GDBINIT_DIR=$withval
16392else
16393 SYSTEM_GDBINIT_DIR=
16394fi
16395
16396
16397 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16398 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16399 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16400 ac_define_dir=`eval echo $ac_define_dir`
16401
16402cat >>confdefs.h <<_ACEOF
16403#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16404_ACEOF
16405
16406
16407
16408
16409 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16410 if test "x$prefix" = xNONE; then
16411 test_prefix=/usr/local
16412 else
16413 test_prefix=$prefix
16414 fi
16415 else
16416 test_prefix=$exec_prefix
16417 fi
16418 value=0
16419 case ${ac_define_dir} in
16420 "${test_prefix}"|"${test_prefix}/"*|\
16421 '${exec_prefix}'|'${exec_prefix}/'*)
16422 value=1
16423 ;;
16424 esac
16425
16426cat >>confdefs.h <<_ACEOF
16427#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16428_ACEOF
16429
16430
16431
16432
16433
81ecdfbb
RW
16434# Check whether --enable-werror was given.
16435if test "${enable_werror+set}" = set; then :
16436 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16437 yes | y) ERROR_ON_WARNING="yes" ;;
16438 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16439 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16440 esac
81ecdfbb
RW
16441fi
16442
094a342e 16443
9a084706
PA
16444# Enable -Werror by default when using gcc. Turn it off for releases.
16445if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16446 ERROR_ON_WARNING=yes
16447fi
16448
16449WERROR_CFLAGS=""
16450if test "${ERROR_ON_WARNING}" = yes ; then
16451 WERROR_CFLAGS="-Werror"
16452fi
16453
cf6de44d 16454# The options we'll try to enable.
aac331e4 16455build_warnings="-Wall -Wpointer-arith \
a0de763e 16456-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16457-Wno-switch -Wno-char-subscripts \
cf6de44d 16458-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16459-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16460-Wno-mismatched-tags \
632e107b 16461-Wno-error=deprecated-register \
85e26832 16462-Wsuggest-override \
1a34f210 16463-Wimplicit-fallthrough=3 \
96643e35 16464-Wduplicated-cond \
33a6bc35
TT
16465-Wshadow=local \
16466-Wdeprecated-copy \
16467-Wdeprecated-copy-dtor \
bb564c58 16468-Wredundant-move \
8ddd8e0e 16469-Wmissing-declarations \
a0761e34 16470-Wmissing-prototypes \
898e7f60
SM
16471-Wstrict-null-sentinel \
16472"
3bc3d82a 16473
3526781e 16474case "${host}" in
4fa7574e
RO
16475 *-*-mingw32*)
16476 # Enable -Wno-format by default when using gcc on mingw since many
16477 # GCC versions complain about %I64.
16478 build_warnings="$build_warnings -Wno-format" ;;
16479 *-*-solaris*)
16480 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16481 # doesn't understand.
16482 build_warnings="$build_warnings -Wno-unknown-pragmas"
16483 # Solaris 11 <unistd.h> marks vfork deprecated.
16484 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16485 *)
16486 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16487 # but there's a special case for this below.
16488 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16489esac
16490
81ecdfbb
RW
16491# Check whether --enable-build-warnings was given.
16492if test "${enable_build_warnings+set}" = set; then :
16493 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16494 yes) ;;
16495 no) build_warnings="-w";;
16496 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16497 build_warnings="${build_warnings} ${t}";;
16498 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16499 build_warnings="${t} ${build_warnings}";;
16500 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16501esac
d4f3574e 16502if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16503 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16504fi
81ecdfbb
RW
16505fi
16506# Check whether --enable-gdb-build-warnings was given.
16507if test "${enable_gdb_build_warnings+set}" = set; then :
16508 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16509 yes) ;;
16510 no) build_warnings="-w";;
16511 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16512 build_warnings="${build_warnings} ${t}";;
16513 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16514 build_warnings="${t} ${build_warnings}";;
16515 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16516esac
16517if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16518 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16519fi
81ecdfbb 16520fi
3bc3d82a
PA
16521
16522# The set of warnings supported by a C++ compiler is not the same as
16523# of the C compiler.
cf6de44d 16524ac_ext=cpp
3bc3d82a
PA
16525ac_cpp='$CXXCPP $CPPFLAGS'
16526ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16527ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16528ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16529
3bc3d82a 16530
81ecdfbb 16531WARN_CFLAGS=""
c906108c
SS
16532if test "x${build_warnings}" != x -a "x$GCC" = xyes
16533then
81ecdfbb
RW
16534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16535$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16536 # Separate out the -Werror flag as some files just cannot be
16537 # compiled with it enabled.
16538 for w in ${build_warnings}; do
7544db95
PA
16539 # GCC does not complain about -Wno-unknown-warning. Invert
16540 # and test -Wunknown-warning instead.
16541 case $w in
16542 -Wno-*)
16543 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16544 -Wformat-nonliteral)
16545 # gcc requires -Wformat before -Wformat-nonliteral
16546 # will work, so stick them together.
16547 w="-Wformat $w"
16548 wtest="$w"
16549 ;;
7544db95
PA
16550 *)
16551 wtest=$w ;;
16552 esac
16553
746a987d
AC
16554 case $w in
16555 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16556 *)
16557 # Check whether GCC accepts it.
4536bbc6 16558 saved_CFLAGS="$CFLAGS"
3e019bdc 16559 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16560 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16561 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16562 if test "x$w" = "x-Wunused-variable"; then
16563 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16564 # fixed in GCC 4.9. This test is derived from the gdb
16565 # source code that triggered this bug in GCC.
16566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16567/* end confdefs.h. */
16568struct scoped_restore_base {};
864ca435
SM
16569 struct scoped_restore_tmpl : public scoped_restore_base {
16570 ~scoped_restore_tmpl() {}
16571 };
a0de763e
TT
16572int
16573main ()
16574{
16575const scoped_restore_base &b = scoped_restore_tmpl();
864ca435 16576
a0de763e
TT
16577 ;
16578 return 0;
16579}
16580_ACEOF
16581if ac_fn_cxx_try_compile "$LINENO"; then :
16582 WARN_CFLAGS="${WARN_CFLAGS} $w"
16583fi
16584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16585 else
16586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16587/* end confdefs.h. */
4536bbc6 16588
bec39cab
AC
16589int
16590main ()
16591{
4536bbc6 16592
bec39cab
AC
16593 ;
16594 return 0;
16595}
16596_ACEOF
3bc3d82a 16597if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16598 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16599fi
81ecdfbb 16600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16601 fi
4536bbc6 16602 CFLAGS="$saved_CFLAGS"
3bc3d82a 16603 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16604 esac
16605 done
81ecdfbb
RW
16606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16607$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16608fi
16609
16610
104c1213 16611
cf6de44d 16612ac_ext=c
3bc3d82a
PA
16613ac_cpp='$CPP $CPPFLAGS'
16614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16616ac_compiler_gnu=$ac_cv_c_compiler_gnu
16617
3bc3d82a 16618
b835bb52 16619
f35d5ade
TT
16620# Check whether --enable-ubsan was given.
16621if test "${enable_ubsan+set}" = set; then :
16622 enableval=$enable_ubsan;
16623else
eff98030 16624 enable_ubsan=no
f35d5ade
TT
16625fi
16626
16627if test "x$enable_ubsan" = xauto; then
16628 if $development; then
16629 enable_ubsan=yes
16630 fi
16631fi
16632ac_ext=cpp
16633ac_cpp='$CXXCPP $CPPFLAGS'
16634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16637
16638if test "x$enable_ubsan" = xyes; then
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16640$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16641 saved_CXXFLAGS="$CXXFLAGS"
16642 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16644/* end confdefs.h. */
16645
16646int
16647main ()
16648{
16649
16650 ;
16651 return 0;
16652}
16653_ACEOF
16654if ac_fn_cxx_try_link "$LINENO"; then :
16655 enable_ubsan=yes
16656else
16657 enable_ubsan=no
16658fi
16659rm -f core conftest.err conftest.$ac_objext \
16660 conftest$ac_exeext conftest.$ac_ext
16661 CXXFLAGS="$saved_CXXFLAGS"
16662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16663$as_echo "$enable_ubsan" >&6; }
16664 if test "x$enable_ubsan" = xyes; then
16665 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16666 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16667 fi
16668fi
16669ac_ext=c
16670ac_cpp='$CPP $CPPFLAGS'
16671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16673ac_compiler_gnu=$ac_cv_c_compiler_gnu
16674
16675
16676
7a292a7a 16677# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16679$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16680if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16681 $as_echo_n "(cached) " >&6
bec39cab 16682else
81ecdfbb 16683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16684/* end confdefs.h. */
7a292a7a
SS
16685
16686#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16687lose
16688#endif
bec39cab 16689_ACEOF
7a292a7a 16690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16691 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16692 gdb_cv_os_cygwin=yes
16693else
7a292a7a
SS
16694 gdb_cv_os_cygwin=no
16695fi
16696rm -f conftest*
16697
16698fi
81ecdfbb
RW
16699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16700$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16701
aff38e61 16702
3eb25fda 16703SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16704case ${host} in
95cbc983
AC
16705 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16706 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16707 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16708 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16709esac
16710
16711
cd0fc7c3
SS
16712# libreadline needs libuser32.a in a cygwin environment
16713WIN32LIBS=
0ad6b8ee 16714if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16715 WIN32LIBS="-luser32"
16716 case "${target}" in
16717 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16718 ;;
16719 esac
cd0fc7c3 16720fi
c906108c 16721
b4505029 16722# The ser-tcp.c module requires sockets.
b2ceabe8
TT
16723# Note that WIN32APILIBS is set by GDB_AC_COMMON.
16724WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 16725
31d99776 16726# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16727
16728 OLD_CFLAGS=$CFLAGS
16729 OLD_LDFLAGS=$LDFLAGS
16730 OLD_LIBS=$LIBS
16731 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16732 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16733 # always want our bfd.
16734 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16735 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16736 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16737 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16738 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16740$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16741if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16742 $as_echo_n "(cached) " >&6
31d99776 16743else
81ecdfbb 16744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16745/* end confdefs.h. */
16746#include <stdlib.h>
294f2697
SM
16747 #include "bfd.h"
16748 #include "elf-bfd.h"
31d99776
DJ
16749int
16750main ()
16751{
def63ff0 16752return bfd_get_elf_phdr_upper_bound (NULL);
294f2697 16753
31d99776
DJ
16754 ;
16755 return 0;
16756}
16757_ACEOF
81ecdfbb 16758if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16759 gdb_cv_var_elf=yes
16760else
81ecdfbb 16761 gdb_cv_var_elf=no
294f2697 16762
31d99776 16763fi
81ecdfbb
RW
16764rm -f core conftest.err conftest.$ac_objext \
16765 conftest$ac_exeext conftest.$ac_ext
294f2697 16766
31d99776 16767fi
81ecdfbb
RW
16768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16769$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16770 CFLAGS=$OLD_CFLAGS
16771 LDFLAGS=$OLD_LDFLAGS
16772 LIBS=$OLD_LIBS
0ad6b8ee 16773if test "$gdb_cv_var_elf" = yes; then
d4777acb 16774 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16775
81ecdfbb 16776$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16777
075ff26d
JK
16778 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16779 if test "$plugins" = "yes"; then
a48b32c0
L
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16781$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16782if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16783 $as_echo_n "(cached) " >&6
16784else
16785 ac_func_search_save_LIBS=$LIBS
16786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16787/* end confdefs.h. */
16788
16789/* Override any GCC internal prototype to avoid an error.
16790 Use char because int might match the return type of a GCC
16791 builtin and then its argument prototype would still apply. */
16792#ifdef __cplusplus
16793extern "C"
16794#endif
16795char dlopen ();
16796int
16797main ()
16798{
16799return dlopen ();
16800 ;
16801 return 0;
16802}
16803_ACEOF
16804for ac_lib in '' dl; do
16805 if test -z "$ac_lib"; then
16806 ac_res="none required"
16807 else
16808 ac_res=-l$ac_lib
16809 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16810 fi
16811 if ac_fn_c_try_link "$LINENO"; then :
16812 ac_cv_search_dlopen=$ac_res
16813fi
16814rm -f core conftest.err conftest.$ac_objext \
16815 conftest$ac_exeext
d0ac1c44 16816 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16817 break
16818fi
16819done
d0ac1c44 16820if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16821
16822else
16823 ac_cv_search_dlopen=no
16824fi
16825rm conftest.$ac_ext
16826LIBS=$ac_func_search_save_LIBS
16827fi
16828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16829$as_echo "$ac_cv_search_dlopen" >&6; }
16830ac_res=$ac_cv_search_dlopen
16831if test "$ac_res" != no; then :
16832 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16833
16834fi
16835
075ff26d 16836 fi
31d99776 16837fi
31d99776 16838
4f05add4
TT
16839# Add macho support to GDB, but only if BFD includes it.
16840
16841 OLD_CFLAGS=$CFLAGS
16842 OLD_LDFLAGS=$LDFLAGS
16843 OLD_LIBS=$LIBS
16844 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16845 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16846 # always want our bfd.
16847 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16848 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16849 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16850 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16851 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16853$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16854if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16855 $as_echo_n "(cached) " >&6
16856else
16857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16858/* end confdefs.h. */
16859#include <stdlib.h>
294f2697
SM
16860 #include "bfd.h"
16861 #include "mach-o.h"
4f05add4
TT
16862int
16863main ()
16864{
16865return bfd_mach_o_lookup_command (NULL, 0, NULL);
294f2697 16866
4f05add4
TT
16867 ;
16868 return 0;
16869}
16870_ACEOF
16871if ac_fn_c_try_link "$LINENO"; then :
16872 gdb_cv_var_macho=yes
16873else
16874 gdb_cv_var_macho=no
294f2697 16875
4f05add4
TT
16876fi
16877rm -f core conftest.err conftest.$ac_objext \
16878 conftest$ac_exeext conftest.$ac_ext
294f2697 16879
4f05add4
TT
16880fi
16881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16882$as_echo "$gdb_cv_var_macho" >&6; }
16883 CFLAGS=$OLD_CFLAGS
16884 LDFLAGS=$OLD_LDFLAGS
16885 LIBS=$OLD_LIBS
0ad6b8ee 16886if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16887 CONFIG_OBS="$CONFIG_OBS machoread.o"
16888fi
16889
121ce6e5
DJ
16890# Add any host-specific objects to GDB.
16891CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16892
608e2dbb 16893# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16894if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16895
16896# Check whether --with-lzma was given.
16897if test "${with_lzma+set}" = set; then :
16898 withval=$with_lzma;
16899else
16900 with_lzma=auto
16901fi
16902
16903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16904$as_echo_n "checking whether to use lzma... " >&6; }
16905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16906$as_echo "$with_lzma" >&6; }
16907
16908 if test "${with_lzma}" != no; then
16909
16910
16911
16912
16913
16914
16915
16916
16917 use_additional=yes
16918
16919 acl_save_prefix="$prefix"
16920 prefix="$acl_final_prefix"
16921 acl_save_exec_prefix="$exec_prefix"
16922 exec_prefix="$acl_final_exec_prefix"
16923
16924 eval additional_includedir=\"$includedir\"
16925 eval additional_libdir=\"$libdir\"
16926
16927 exec_prefix="$acl_save_exec_prefix"
16928 prefix="$acl_save_prefix"
16929
16930
16931# Check whether --with-liblzma-prefix was given.
16932if test "${with_liblzma_prefix+set}" = set; then :
16933 withval=$with_liblzma_prefix;
16934 if test "X$withval" = "Xno"; then
16935 use_additional=no
16936 else
16937 if test "X$withval" = "X"; then
16938
16939 acl_save_prefix="$prefix"
16940 prefix="$acl_final_prefix"
16941 acl_save_exec_prefix="$exec_prefix"
16942 exec_prefix="$acl_final_exec_prefix"
16943
16944 eval additional_includedir=\"$includedir\"
16945 eval additional_libdir=\"$libdir\"
16946
16947 exec_prefix="$acl_save_exec_prefix"
16948 prefix="$acl_save_prefix"
16949
16950 else
16951 additional_includedir="$withval/include"
16952 additional_libdir="$withval/lib"
16953 fi
16954 fi
16955
16956fi
16957
9f1528a1
AB
16958
16959# Check whether --with-liblzma-type was given.
16960if test "${with_liblzma_type+set}" = set; then :
16961 withval=$with_liblzma_type; with_liblzma_type=$withval
16962else
16963 with_liblzma_type=auto
16964fi
16965
16966 lib_type=`eval echo \$with_liblzma_type`
16967
608e2dbb
TT
16968 LIBLZMA=
16969 LTLIBLZMA=
16970 INCLZMA=
16971 rpathdirs=
16972 ltrpathdirs=
16973 names_already_handled=
16974 names_next_round='lzma '
16975 while test -n "$names_next_round"; do
16976 names_this_round="$names_next_round"
16977 names_next_round=
16978 for name in $names_this_round; do
16979 already_handled=
16980 for n in $names_already_handled; do
16981 if test "$n" = "$name"; then
16982 already_handled=yes
16983 break
16984 fi
16985 done
16986 if test -z "$already_handled"; then
16987 names_already_handled="$names_already_handled $name"
16988 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16989 eval value=\"\$HAVE_LIB$uppername\"
16990 if test -n "$value"; then
16991 if test "$value" = yes; then
16992 eval value=\"\$LIB$uppername\"
16993 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16994 eval value=\"\$LTLIB$uppername\"
16995 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16996 else
16997 :
16998 fi
16999 else
17000 found_dir=
17001 found_la=
17002 found_so=
17003 found_a=
17004 if test $use_additional = yes; then
9f1528a1 17005 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17006 found_dir="$additional_libdir"
17007 found_so="$additional_libdir/lib$name.$shlibext"
17008 if test -f "$additional_libdir/lib$name.la"; then
17009 found_la="$additional_libdir/lib$name.la"
17010 fi
9f1528a1 17011 elif test x$lib_type != xshared; then
608e2dbb
TT
17012 if test -f "$additional_libdir/lib$name.$libext"; then
17013 found_dir="$additional_libdir"
17014 found_a="$additional_libdir/lib$name.$libext"
17015 if test -f "$additional_libdir/lib$name.la"; then
17016 found_la="$additional_libdir/lib$name.la"
17017 fi
17018 fi
17019 fi
17020 fi
17021 if test "X$found_dir" = "X"; then
17022 for x in $LDFLAGS $LTLIBLZMA; do
17023
17024 acl_save_prefix="$prefix"
17025 prefix="$acl_final_prefix"
17026 acl_save_exec_prefix="$exec_prefix"
17027 exec_prefix="$acl_final_exec_prefix"
17028 eval x=\"$x\"
17029 exec_prefix="$acl_save_exec_prefix"
17030 prefix="$acl_save_prefix"
17031
17032 case "$x" in
17033 -L*)
17034 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 17035 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
17036 found_dir="$dir"
17037 found_so="$dir/lib$name.$shlibext"
17038 if test -f "$dir/lib$name.la"; then
17039 found_la="$dir/lib$name.la"
17040 fi
9f1528a1 17041 elif test x$lib_type != xshared; then
608e2dbb
TT
17042 if test -f "$dir/lib$name.$libext"; then
17043 found_dir="$dir"
17044 found_a="$dir/lib$name.$libext"
17045 if test -f "$dir/lib$name.la"; then
17046 found_la="$dir/lib$name.la"
17047 fi
17048 fi
17049 fi
17050 ;;
17051 esac
17052 if test "X$found_dir" != "X"; then
17053 break
17054 fi
17055 done
17056 fi
17057 if test "X$found_dir" != "X"; then
17058 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17059 if test "X$found_so" != "X"; then
17060 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17061 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17062 else
17063 haveit=
17064 for x in $ltrpathdirs; do
17065 if test "X$x" = "X$found_dir"; then
17066 haveit=yes
17067 break
17068 fi
17069 done
17070 if test -z "$haveit"; then
17071 ltrpathdirs="$ltrpathdirs $found_dir"
17072 fi
17073 if test "$hardcode_direct" = yes; then
17074 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17075 else
17076 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17077 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17078 haveit=
17079 for x in $rpathdirs; do
17080 if test "X$x" = "X$found_dir"; then
17081 haveit=yes
17082 break
17083 fi
17084 done
17085 if test -z "$haveit"; then
17086 rpathdirs="$rpathdirs $found_dir"
17087 fi
17088 else
17089 haveit=
17090 for x in $LDFLAGS $LIBLZMA; do
17091
17092 acl_save_prefix="$prefix"
17093 prefix="$acl_final_prefix"
17094 acl_save_exec_prefix="$exec_prefix"
17095 exec_prefix="$acl_final_exec_prefix"
17096 eval x=\"$x\"
17097 exec_prefix="$acl_save_exec_prefix"
17098 prefix="$acl_save_prefix"
17099
17100 if test "X$x" = "X-L$found_dir"; then
17101 haveit=yes
17102 break
17103 fi
17104 done
17105 if test -z "$haveit"; then
17106 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17107 fi
17108 if test "$hardcode_minus_L" != no; then
17109 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17110 else
17111 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17112 fi
17113 fi
17114 fi
17115 fi
17116 else
17117 if test "X$found_a" != "X"; then
17118 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17119 else
17120 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17121 fi
17122 fi
17123 additional_includedir=
17124 case "$found_dir" in
17125 */lib | */lib/)
17126 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17127 additional_includedir="$basedir/include"
17128 ;;
17129 esac
17130 if test "X$additional_includedir" != "X"; then
17131 if test "X$additional_includedir" != "X/usr/include"; then
17132 haveit=
17133 if test "X$additional_includedir" = "X/usr/local/include"; then
17134 if test -n "$GCC"; then
17135 case $host_os in
17136 linux*) haveit=yes;;
17137 esac
17138 fi
17139 fi
17140 if test -z "$haveit"; then
17141 for x in $CPPFLAGS $INCLZMA; do
17142
17143 acl_save_prefix="$prefix"
17144 prefix="$acl_final_prefix"
17145 acl_save_exec_prefix="$exec_prefix"
17146 exec_prefix="$acl_final_exec_prefix"
17147 eval x=\"$x\"
17148 exec_prefix="$acl_save_exec_prefix"
17149 prefix="$acl_save_prefix"
17150
17151 if test "X$x" = "X-I$additional_includedir"; then
17152 haveit=yes
17153 break
17154 fi
17155 done
17156 if test -z "$haveit"; then
17157 if test -d "$additional_includedir"; then
17158 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17159 fi
17160 fi
17161 fi
17162 fi
17163 fi
17164 if test -n "$found_la"; then
17165 save_libdir="$libdir"
17166 case "$found_la" in
17167 */* | *\\*) . "$found_la" ;;
17168 *) . "./$found_la" ;;
17169 esac
17170 libdir="$save_libdir"
17171 for dep in $dependency_libs; do
17172 case "$dep" in
17173 -L*)
17174 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17175 if test "X$additional_libdir" != "X/usr/lib"; then
17176 haveit=
17177 if test "X$additional_libdir" = "X/usr/local/lib"; then
17178 if test -n "$GCC"; then
17179 case $host_os in
17180 linux*) haveit=yes;;
17181 esac
17182 fi
17183 fi
17184 if test -z "$haveit"; then
17185 haveit=
17186 for x in $LDFLAGS $LIBLZMA; do
17187
17188 acl_save_prefix="$prefix"
17189 prefix="$acl_final_prefix"
17190 acl_save_exec_prefix="$exec_prefix"
17191 exec_prefix="$acl_final_exec_prefix"
17192 eval x=\"$x\"
17193 exec_prefix="$acl_save_exec_prefix"
17194 prefix="$acl_save_prefix"
17195
17196 if test "X$x" = "X-L$additional_libdir"; then
17197 haveit=yes
17198 break
17199 fi
17200 done
17201 if test -z "$haveit"; then
17202 if test -d "$additional_libdir"; then
17203 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17204 fi
17205 fi
17206 haveit=
17207 for x in $LDFLAGS $LTLIBLZMA; do
17208
17209 acl_save_prefix="$prefix"
17210 prefix="$acl_final_prefix"
17211 acl_save_exec_prefix="$exec_prefix"
17212 exec_prefix="$acl_final_exec_prefix"
17213 eval x=\"$x\"
17214 exec_prefix="$acl_save_exec_prefix"
17215 prefix="$acl_save_prefix"
17216
17217 if test "X$x" = "X-L$additional_libdir"; then
17218 haveit=yes
17219 break
17220 fi
17221 done
17222 if test -z "$haveit"; then
17223 if test -d "$additional_libdir"; then
17224 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17225 fi
17226 fi
17227 fi
17228 fi
17229 ;;
17230 -R*)
17231 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17232 if test "$enable_rpath" != no; then
17233 haveit=
17234 for x in $rpathdirs; do
17235 if test "X$x" = "X$dir"; then
17236 haveit=yes
17237 break
17238 fi
17239 done
17240 if test -z "$haveit"; then
17241 rpathdirs="$rpathdirs $dir"
17242 fi
17243 haveit=
17244 for x in $ltrpathdirs; do
17245 if test "X$x" = "X$dir"; then
17246 haveit=yes
17247 break
17248 fi
17249 done
17250 if test -z "$haveit"; then
17251 ltrpathdirs="$ltrpathdirs $dir"
17252 fi
17253 fi
17254 ;;
17255 -l*)
17256 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17257 ;;
17258 *.la)
17259 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17260 ;;
17261 *)
17262 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17263 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17264 ;;
17265 esac
17266 done
17267 fi
17268 else
9f1528a1
AB
17269 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17270 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17271 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17272 else
17273 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17274 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17275 fi
608e2dbb
TT
17276 fi
17277 fi
17278 fi
17279 done
17280 done
17281 if test "X$rpathdirs" != "X"; then
17282 if test -n "$hardcode_libdir_separator"; then
17283 alldirs=
17284 for found_dir in $rpathdirs; do
17285 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17286 done
17287 acl_save_libdir="$libdir"
17288 libdir="$alldirs"
17289 eval flag=\"$hardcode_libdir_flag_spec\"
17290 libdir="$acl_save_libdir"
17291 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17292 else
17293 for found_dir in $rpathdirs; do
17294 acl_save_libdir="$libdir"
17295 libdir="$found_dir"
17296 eval flag=\"$hardcode_libdir_flag_spec\"
17297 libdir="$acl_save_libdir"
17298 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17299 done
17300 fi
17301 fi
17302 if test "X$ltrpathdirs" != "X"; then
17303 for found_dir in $ltrpathdirs; do
17304 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17305 done
17306 fi
17307
17308
17309 ac_save_CPPFLAGS="$CPPFLAGS"
17310
17311 for element in $INCLZMA; do
17312 haveit=
17313 for x in $CPPFLAGS; do
17314
17315 acl_save_prefix="$prefix"
17316 prefix="$acl_final_prefix"
17317 acl_save_exec_prefix="$exec_prefix"
17318 exec_prefix="$acl_final_exec_prefix"
17319 eval x=\"$x\"
17320 exec_prefix="$acl_save_exec_prefix"
17321 prefix="$acl_save_prefix"
17322
17323 if test "X$x" = "X$element"; then
17324 haveit=yes
17325 break
17326 fi
17327 done
17328 if test -z "$haveit"; then
17329 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17330 fi
17331 done
17332
17333
17334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17335$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 17336if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
17337 $as_echo_n "(cached) " >&6
17338else
17339
17340 ac_save_LIBS="$LIBS"
17341 LIBS="$LIBS $LIBLZMA"
17342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17343/* end confdefs.h. */
17344#include "lzma.h"
17345int
17346main ()
17347{
17348lzma_index_iter iter;
17349 lzma_index_iter_init (&iter, 0);
17350 lzma_mf_is_supported (LZMA_MF_HC3);
17351 ;
17352 return 0;
17353}
17354_ACEOF
17355if ac_fn_c_try_link "$LINENO"; then :
17356 ac_cv_liblzma=yes
17357else
17358 ac_cv_liblzma=no
17359fi
17360rm -f core conftest.err conftest.$ac_objext \
17361 conftest$ac_exeext conftest.$ac_ext
17362 LIBS="$ac_save_LIBS"
17363
17364fi
17365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17366$as_echo "$ac_cv_liblzma" >&6; }
17367 if test "$ac_cv_liblzma" = yes; then
17368 HAVE_LIBLZMA=yes
17369
17370$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17371
17372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17373$as_echo_n "checking how to link with liblzma... " >&6; }
17374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17375$as_echo "$LIBLZMA" >&6; }
17376 else
17377 HAVE_LIBLZMA=no
17378 CPPFLAGS="$ac_save_CPPFLAGS"
17379 LIBLZMA=
17380 LTLIBLZMA=
17381 fi
17382
17383
17384
17385
17386
17387
17388 if test "$HAVE_LIBLZMA" != yes; then
17389 if test "$with_lzma" = yes; then
d0ac1c44 17390 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17391 fi
17392 fi
17393 fi
17394fi
17395
3fc11d3e
JM
17396LIBGUI="../libgui/src/libgui.a"
17397GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17398
17399
7a292a7a 17400
3fc11d3e
JM
17401WIN32LDAPP=
17402
17403
17404
d91670b9 17405case "${host}" in
686a5eed 17406*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17407 configdir="win"
17408 ;;
17409*)
17410 configdir="unix"
17411 ;;
17412esac
3fc11d3e
JM
17413
17414GDBTKLIBS=
17415if test "${enable_gdbtk}" = "yes"; then
17416
d1c3b63a
KS
17417 # Gdbtk must have an absolute path to srcdir in order to run
17418 # properly when not installed.
17419 here=`pwd`
17420 cd ${srcdir}
17421 GDBTK_SRC_DIR=`pwd`
17422 cd $here
17423
bec39cab 17424
5062cc19
KS
17425 #
17426 # Ok, lets find the tcl configuration
17427 # First, look for one uninstalled.
17428 # the alternative search directory is invoked by --with-tcl
17429 #
3fc11d3e 17430
5062cc19
KS
17431 if test x"${no_tcl}" = x ; then
17432 # we reset no_tcl in case something fails here
17433 no_tcl=true
bec39cab 17434
81ecdfbb
RW
17435# Check whether --with-tcl was given.
17436if test "${with_tcl+set}" = set; then :
17437 withval=$with_tcl; with_tclconfig=${withval}
17438fi
17439
17440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17441$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17442 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17443 $as_echo_n "(cached) " >&6
3fc11d3e 17444else
bec39cab 17445
3fc11d3e 17446
5062cc19
KS
17447 # First check to see if --with-tcl was specified.
17448 case "${host}" in
17449 *-*-cygwin*) platDir="win" ;;
17450 *) platDir="unix" ;;
17451 esac
17452 if test x"${with_tclconfig}" != x ; then
17453 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17454 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17455 else
d0ac1c44 17456 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17457 fi
17458 fi
17459
17460 # then check for a private Tcl installation
17461 if test x"${ac_cv_c_tclconfig}" = x ; then
17462 for i in \
17463 ../tcl \
17464 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17465 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17466 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17467 ../../tcl \
17468 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17469 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17470 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17471 ../../../tcl \
17472 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17473 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17474 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17475 if test -f "$i/$platDir/tclConfig.sh" ; then
17476 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17477 break
17478 fi
17479 done
17480 fi
17481
17482 # on Darwin, check in Framework installation locations
17483 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17484 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17485 `ls -d /Library/Frameworks 2>/dev/null` \
17486 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17487 `ls -d /System/Library/Frameworks 2>/dev/null` \
17488 ; do
17489 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17490 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17491 break
17492 fi
17493 done
17494 fi
17495
17496 # check in a few common install locations
17497 if test x"${ac_cv_c_tclconfig}" = x ; then
17498 for i in `ls -d ${libdir} 2>/dev/null` \
17499 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17500 `ls -d ${prefix}/lib 2>/dev/null` \
17501 `ls -d /usr/local/lib 2>/dev/null` \
17502 `ls -d /usr/contrib/lib 2>/dev/null` \
17503 `ls -d /usr/lib 2>/dev/null` \
17504 ; do
17505 if test -f "$i/tclConfig.sh" ; then
17506 ac_cv_c_tclconfig=`(cd $i; pwd)`
17507 break
17508 fi
17509 done
17510 fi
3fc11d3e 17511
5062cc19
KS
17512 # check in a few other private locations
17513 if test x"${ac_cv_c_tclconfig}" = x ; then
17514 for i in \
17515 ${srcdir}/../tcl \
17516 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17517 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17518 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17519 if test -f "$i/$platDir/tclConfig.sh" ; then
17520 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17521 break
17522 fi
17523 done
17524 fi
bec39cab 17525
3fc11d3e
JM
17526fi
17527
5062cc19
KS
17528
17529 if test x"${ac_cv_c_tclconfig}" = x ; then
17530 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17531 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17532$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17533 else
17534 no_tcl=
17535 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17537$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17538 fi
17539 fi
3fc11d3e 17540
bec39cab 17541
85541719
DE
17542 # If $no_tk is nonempty, then we can't do Tk, and there is no
17543 # point to doing Tcl.
bec39cab 17544
5062cc19
KS
17545 #
17546 # Ok, lets find the tk configuration
17547 # First, look for one uninstalled.
17548 # the alternative search directory is invoked by --with-tk
17549 #
3fc11d3e 17550
5062cc19
KS
17551 if test x"${no_tk}" = x ; then
17552 # we reset no_tk in case something fails here
17553 no_tk=true
bec39cab 17554
81ecdfbb
RW
17555# Check whether --with-tk was given.
17556if test "${with_tk+set}" = set; then :
17557 withval=$with_tk; with_tkconfig=${withval}
17558fi
17559
17560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17561$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17562 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17563 $as_echo_n "(cached) " >&6
bec39cab 17564else
3fc11d3e
JM
17565
17566
5062cc19
KS
17567 # First check to see if --with-tkconfig was specified.
17568 if test x"${with_tkconfig}" != x ; then
17569 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17570 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17571 else
d0ac1c44 17572 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17573 fi
17574 fi
3fc11d3e 17575
5062cc19
KS
17576 # then check for a private Tk library
17577 case "${host}" in
17578 *-*-cygwin*) platDir="win" ;;
17579 *) platDir="unix" ;;
17580 esac
17581 if test x"${ac_cv_c_tkconfig}" = x ; then
17582 for i in \
17583 ../tk \
17584 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17585 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17586 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17587 ../../tk \
17588 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17589 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17590 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17591 ../../../tk \
17592 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17593 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17594 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17595 if test -f "$i/$platDir/tkConfig.sh" ; then
17596 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17597 break
17598 fi
17599 done
17600 fi
17601
17602 # on Darwin, check in Framework installation locations
17603 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17604 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17605 `ls -d /Library/Frameworks 2>/dev/null` \
17606 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17607 `ls -d /System/Library/Frameworks 2>/dev/null` \
17608 ; do
17609 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17610 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17611 break
17612 fi
17613 done
17614 fi
17615
17616 # check in a few common install locations
17617 if test x"${ac_cv_c_tkconfig}" = x ; then
17618 for i in `ls -d ${libdir} 2>/dev/null` \
17619 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17620 `ls -d ${prefix}/lib 2>/dev/null` \
17621 `ls -d /usr/local/lib 2>/dev/null` \
17622 `ls -d /usr/contrib/lib 2>/dev/null` \
17623 `ls -d /usr/lib 2>/dev/null` \
17624 ; do
17625 if test -f "$i/tkConfig.sh" ; then
17626 ac_cv_c_tkconfig=`(cd $i; pwd)`
17627 break
17628 fi
17629 done
17630 fi
17631 # check in a few other private locations
17632 if test x"${ac_cv_c_tkconfig}" = x ; then
17633 for i in \
17634 ${srcdir}/../tk \
17635 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17636 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17637 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17638 if test -f "$i/$platDir/tkConfig.sh" ; then
17639 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17640 break
17641 fi
17642 done
17643 fi
3fc11d3e 17644
3fc11d3e
JM
17645fi
17646
17647
5062cc19
KS
17648 if test x"${ac_cv_c_tkconfig}" = x ; then
17649 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17651$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17652 else
17653 no_tk=
17654 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17656$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17657 fi
3fc11d3e 17658 fi
dd2504ab 17659
dd2504ab 17660
85541719
DE
17661 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17662
81ecdfbb
RW
17663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17664$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17665
17666 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17668$as_echo "loading" >&6; }
85541719
DE
17669 . ${TCL_BIN_DIR}/tclConfig.sh
17670 else
81ecdfbb
RW
17671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17672$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17673 fi
17674
17675 # eval is required to do the TCL_DBGX substitution
17676 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17677 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17678
17679 # If the TCL_BIN_DIR is the build directory (not the install directory),
17680 # then set the common variable name to the value of the build variables.
17681 # For example, the variable TCL_LIB_SPEC will be set to the value
17682 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17683 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17684 # installed and uninstalled version of Tcl.
17685 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17686 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17687 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17688 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17689 elif test "`uname -s`" = "Darwin"; then
17690 # If Tcl was built as a framework, attempt to use the libraries
17691 # from the framework at the given location so that linking works
a68ffae9 17692 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17693 case ${TCL_DEFS} in
17694 *TCL_FRAMEWORK*)
17695 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17696 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17697 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17698 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17699 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17700 break
17701 fi
17702 done
17703 fi
17704 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17705 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17706 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17707 fi
17708 ;;
17709 esac
17710 fi
17711
17712 # eval is required to do the TCL_DBGX substitution
17713 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17714 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17715 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17716 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732 # Check for in-tree tcl
17733 here=`pwd`
17734 cd ${srcdir}/..
17735 topdir=`pwd`
17736 cd ${here}
17737
17738 intree="no"
17739 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17740 intree="yes"
17741 fi
17742
17743 # Find Tcl private headers
17744 if test x"${intree}" = xno; then
17745
81ecdfbb
RW
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17747$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17748 private_dir=""
17749 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17750 if test -f ${dir}/tclInt.h ; then
17751 private_dir=${dir}
17752 fi
17753
17754 if test x"${private_dir}" = x; then
d0ac1c44 17755 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17756 else
17757 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17759$as_echo "${private_dir}" >&6; }
85541719
DE
17760 fi
17761
17762 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17763 TCL_LIBRARY="${TCL_LIB_SPEC}"
17764 TCL_DEPS=""
17765 else
17766 # If building tcl in the same src tree, private headers
17767 # are not needed, but we need to be sure to use the right
17768 # headers library
17769 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17770 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17771 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17772 fi
17773
17774
17775
17776
17777
81ecdfbb
RW
17778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17779$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17780
5062cc19 17781 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17783$as_echo "loading" >&6; }
5062cc19 17784 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17785 else
81ecdfbb
RW
17786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17787$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17788 fi
bec39cab 17789
5062cc19
KS
17790 # eval is required to do the TK_DBGX substitution
17791 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17792 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17793
17794 # If the TK_BIN_DIR is the build directory (not the install directory),
17795 # then set the common variable name to the value of the build variables.
17796 # For example, the variable TK_LIB_SPEC will be set to the value
17797 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17798 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17799 # installed and uninstalled version of Tcl.
85541719 17800 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17801 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17802 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17803 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17804 elif test "`uname -s`" = "Darwin"; then
17805 # If Tk was built as a framework, attempt to use the libraries
17806 # from the framework at the given location so that linking works
a68ffae9 17807 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17808 case ${TK_DEFS} in
17809 *TK_FRAMEWORK*)
85541719 17810 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17811 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17812 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17813 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17814 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17815 break
17816 fi
17817 done
17818 fi
85541719 17819 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17820 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17821 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17822 fi
17823 ;;
17824 esac
3fc11d3e
JM
17825 fi
17826
5062cc19
KS
17827 # eval is required to do the TK_DBGX substitution
17828 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17829 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17830 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17831 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17832
3fc11d3e
JM
17833
17834
bec39cab
AC
17835
17836
17837
17838
17839
17840
17841
3fc11d3e 17842
3fc11d3e 17843
bec39cab 17844
bec39cab 17845
85541719
DE
17846 # Check for in-tree Tk
17847 intree="no"
17848 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17849 intree="yes"
17850 fi
3fc11d3e 17851
85541719
DE
17852 # Find Tk private headers
17853 if test x"${intree}" = xno; then
3fc11d3e 17854
81ecdfbb
RW
17855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17856$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17857 private_dir=""
17858 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17859 if test -f ${dir}/tkInt.h; then
17860 private_dir=${dir}
3fc11d3e 17861 fi
bec39cab 17862
5062cc19 17863 if test x"${private_dir}" = x; then
d0ac1c44 17864 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17865 else
5062cc19 17866 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17868$as_echo "${private_dir}" >&6; }
3fc11d3e 17869 fi
3fc11d3e 17870
85541719
DE
17871 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17872 TK_LIBRARY=${TK_LIB_SPEC}
17873 TK_DEPS=""
17874 else
17875 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17876 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17877 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17878 fi
3fc11d3e
JM
17879
17880
3fc11d3e
JM
17881
17882
3fc11d3e 17883
85541719 17884 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17885
85541719
DE
17886 # Include some libraries that Tcl and Tk want.
17887 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17888 # Yes, the ordering seems wrong here. But it isn't.
17889 # TK_LIBS is the list of libraries that need to be linked
17890 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17891 # were in LIBS then any link tests after this point would
17892 # try to include things like `$(LIBGUI)', which wouldn't work.
17893 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17894
85541719
DE
17895 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17896 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17897 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17898 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17899 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17900 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17901 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17902
0ad6b8ee 17903 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17904 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17905 WIN32LDAPP="-Wl,--subsystem,console"
17906 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17907 fi
ffc6a242 17908
81ecdfbb 17909 subdirs="$subdirs gdbtk"
3ace7edb 17910
85541719 17911 fi
3fc11d3e
JM
17912fi
17913
17914
17915
17916
17917
17918
17919
17920
81ecdfbb
RW
17921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17922$as_echo_n "checking for X... " >&6; }
bec39cab 17923
c906108c 17924
81ecdfbb
RW
17925# Check whether --with-x was given.
17926if test "${with_x+set}" = set; then :
17927 withval=$with_x;
17928fi
c906108c
SS
17929
17930# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17931if test "x$with_x" = xno; then
17932 # The user explicitly disabled X.
17933 have_x=disabled
17934else
81ecdfbb 17935 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17936 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17937 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17938 $as_echo_n "(cached) " >&6
c906108c
SS
17939else
17940 # One or both of the vars are not set, and there is no cached value.
bec39cab 17941ac_x_includes=no ac_x_libraries=no
81ecdfbb 17942rm -f -r conftest.dir
bec39cab
AC
17943if mkdir conftest.dir; then
17944 cd conftest.dir
bec39cab 17945 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17946incroot:
17947 @echo incroot='${INCROOT}'
17948usrlibdir:
17949 @echo usrlibdir='${USRLIBDIR}'
17950libdir:
17951 @echo libdir='${LIBDIR}'
17952_ACEOF
17953 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17954 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17955 for ac_var in incroot usrlibdir libdir; do
17956 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17957 done
c906108c 17958 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17959 for ac_extension in a so sl dylib la dll; do
17960 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17961 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17962 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17963 fi
17964 done
17965 # Screen out bogus values from the imake configuration. They are
17966 # bogus both because they are the default anyway, and because
17967 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17968 case $ac_im_incroot in
81ecdfbb 17969 /usr/include) ac_x_includes= ;;
bec39cab 17970 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17971 esac
bec39cab 17972 case $ac_im_usrlibdir in
81ecdfbb 17973 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17974 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17975 esac
17976 fi
17977 cd ..
81ecdfbb 17978 rm -f -r conftest.dir
c906108c
SS
17979fi
17980
bec39cab
AC
17981# Standard set of common directories for X headers.
17982# Check X11 before X11Rn because it is often a symlink to the current release.
17983ac_x_header_dirs='
17984/usr/X11/include
81ecdfbb 17985/usr/X11R7/include
bec39cab
AC
17986/usr/X11R6/include
17987/usr/X11R5/include
17988/usr/X11R4/include
17989
17990/usr/include/X11
81ecdfbb 17991/usr/include/X11R7
bec39cab
AC
17992/usr/include/X11R6
17993/usr/include/X11R5
17994/usr/include/X11R4
17995
17996/usr/local/X11/include
81ecdfbb 17997/usr/local/X11R7/include
bec39cab
AC
17998/usr/local/X11R6/include
17999/usr/local/X11R5/include
18000/usr/local/X11R4/include
18001
18002/usr/local/include/X11
81ecdfbb 18003/usr/local/include/X11R7
bec39cab
AC
18004/usr/local/include/X11R6
18005/usr/local/include/X11R5
18006/usr/local/include/X11R4
18007
18008/usr/X386/include
18009/usr/x386/include
18010/usr/XFree86/include/X11
18011
18012/usr/include
18013/usr/local/include
18014/usr/unsupported/include
18015/usr/athena/include
18016/usr/local/x11r5/include
18017/usr/lpp/Xamples/include
18018
18019/usr/openwin/include
18020/usr/openwin/share/include'
18021
18022if test "$ac_x_includes" = no; then
81ecdfbb 18023 # Guess where to find include files, by looking for Xlib.h.
c906108c 18024 # First, try using that file with no special directory specified.
81ecdfbb 18025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18026/* end confdefs.h. */
81ecdfbb 18027#include <X11/Xlib.h>
bec39cab 18028_ACEOF
81ecdfbb 18029if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
18030 # We can compile using X headers with no special include directory.
18031ac_x_includes=
18032else
bec39cab 18033 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 18034 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
18035 ac_x_includes=$ac_dir
18036 break
18037 fi
18038done
c906108c 18039fi
d0ac1c44 18040rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 18041fi # $ac_x_includes = no
c906108c 18042
bec39cab 18043if test "$ac_x_libraries" = no; then
c906108c 18044 # Check for the libraries.
c906108c
SS
18045 # See if we find them without any special options.
18046 # Don't add to $LIBS permanently.
bec39cab 18047 ac_save_LIBS=$LIBS
81ecdfbb
RW
18048 LIBS="-lX11 $LIBS"
18049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18050/* end confdefs.h. */
81ecdfbb 18051#include <X11/Xlib.h>
bec39cab
AC
18052int
18053main ()
18054{
81ecdfbb 18055XrmInitialize ()
bec39cab
AC
18056 ;
18057 return 0;
18058}
18059_ACEOF
81ecdfbb 18060if ac_fn_c_try_link "$LINENO"; then :
bec39cab 18061 LIBS=$ac_save_LIBS
c906108c
SS
18062# We can link X programs with no special library path.
18063ac_x_libraries=
18064else
81ecdfbb
RW
18065 LIBS=$ac_save_LIBS
18066for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 18067do
bec39cab 18068 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
18069 for ac_extension in a so sl dylib la dll; do
18070 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
18071 ac_x_libraries=$ac_dir
18072 break 2
18073 fi
18074 done
18075done
18076fi
81ecdfbb
RW
18077rm -f core conftest.err conftest.$ac_objext \
18078 conftest$ac_exeext conftest.$ac_ext
bec39cab 18079fi # $ac_x_libraries = no
c906108c 18080
81ecdfbb
RW
18081case $ac_x_includes,$ac_x_libraries in #(
18082 no,* | *,no | *\'*)
18083 # Didn't find X, or a directory has "'" in its name.
18084 ac_cv_have_x="have_x=no";; #(
18085 *)
18086 # Record where we found X for the cache.
18087 ac_cv_have_x="have_x=yes\
18088 ac_x_includes='$ac_x_includes'\
18089 ac_x_libraries='$ac_x_libraries'"
18090esac
c906108c 18091fi
81ecdfbb
RW
18092;; #(
18093 *) have_x=yes;;
18094 esac
c906108c
SS
18095 eval "$ac_cv_have_x"
18096fi # $with_x != no
18097
18098if test "$have_x" != yes; then
81ecdfbb
RW
18099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18100$as_echo "$have_x" >&6; }
c906108c
SS
18101 no_x=yes
18102else
18103 # If each of the values was on the command line, it overrides each guess.
18104 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18105 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18106 # Update the cache value to reflect the command line values.
81ecdfbb
RW
18107 ac_cv_have_x="have_x=yes\
18108 ac_x_includes='$x_includes'\
18109 ac_x_libraries='$x_libraries'"
18110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18111$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
18112fi
18113
18114
bec39cab 18115# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 18116# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
18117# This code just checks for a few cases where we'd like to ignore those
18118# definitions, even when they're present in the '.mt' file. These cases
18119# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 18120# not part of the source tree.
7a292a7a 18121#
81ecdfbb
RW
18122# Check whether --enable-sim was given.
18123if test "${enable_sim+set}" = set; then :
18124 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
18125 echo "enableval = ${enableval}";
18126 case "${enableval}" in
18127 yes) ignore_sim=false ;;
18128 no) ignore_sim=true ;;
18129 *) ignore_sim=false ;;
18130 esac
18131else
18132 ignore_sim=false
81ecdfbb
RW
18133fi
18134
7a292a7a
SS
18135
18136if test ! -d "${srcdir}/../sim"; then
18137 ignore_sim=true
18138fi
18139
9b624dbe
UW
18140SIM=
18141SIM_OBS=
18142if test "${ignore_sim}" = "false"; then
18143 if test x"${gdb_sim}" != x ; then
18144 SIM="${gdb_sim}"
18145 SIM_OBS="remote-sim.o"
60ca704f 18146
81ecdfbb 18147$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 18148
976102cd
PA
18149
18150 # Some tdep code should only be compiled in when the ppc sim is
18151 # built. PR sim/13418.
18152 case $target in
18153 powerpc*-*-*)
18154
18155$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18156
18157 ;;
18158 esac
9b624dbe 18159 fi
7a292a7a
SS
18160fi
18161
18162
18163
c906108c
SS
18164
18165
18166
18167
18168
18169
dfcd3bfb 18170
e56ac5c3
AC
18171
18172
b3a90332
AC
18173
18174
c35f4ffc 18175# List of host floatformats.
bec39cab
AC
18176
18177cat >>confdefs.h <<_ACEOF
c35f4ffc 18178#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 18179_ACEOF
c35f4ffc 18180
bec39cab
AC
18181
18182cat >>confdefs.h <<_ACEOF
c35f4ffc 18183#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
18184_ACEOF
18185
c35f4ffc 18186
bec39cab 18187cat >>confdefs.h <<_ACEOF
c35f4ffc 18188#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 18189_ACEOF
c35f4ffc
AC
18190
18191
c906108c
SS
18192# target_subdir is used by the testsuite to find the target libraries.
18193target_subdir=
18194if test "${host}" != "${target}"; then
18195 target_subdir="${target_alias}/"
18196fi
18197
18198
21ea5acd 18199# Import nat definitions.
2b351b19 18200nat_makefile_frag=/dev/null
771b4502 18201if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
18202 . ${srcdir}/configure.nat
18203 nativefile=$NAT_FILE
c906108c 18204fi
c906108c 18205
c906108c
SS
18206
18207
18208
21ea5acd
SDJ
18209
18210
18211
18212
18213
c906108c
SS
18214
18215
b00a8037 18216if test x"${gdb_osabi}" != x ; then
bec39cab
AC
18217
18218cat >>confdefs.h <<_ACEOF
b00a8037 18219#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 18220_ACEOF
b00a8037
DJ
18221
18222fi
18223
393fd4c3
YQ
18224# Check for babeltrace and babeltrace-ctf
18225
18226# Check whether --with-babeltrace was given.
18227if test "${with_babeltrace+set}" = set; then :
18228 withval=$with_babeltrace;
18229else
18230 with_babeltrace=auto
18231fi
18232
18233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18234$as_echo_n "checking whether to use babeltrace... " >&6; }
18235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18236$as_echo "$with_babeltrace" >&6; }
18237
18238if test "x$with_babeltrace" = "xno"; then
18239 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18240$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18241else
18242 # Append -Werror to CFLAGS so that configure can catch the warning
18243 # "assignment from incompatible pointer type", which is related to
18244 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18245 # in GDB, while babeltrace 1.0.3 is broken.
18246 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18247 # safe to save and restore CFLAGS here.
18248 saved_CFLAGS=$CFLAGS
18249 CFLAGS="$CFLAGS -Werror"
18250
18251
18252
18253
18254
18255
18256
18257
18258 use_additional=yes
18259
18260 acl_save_prefix="$prefix"
18261 prefix="$acl_final_prefix"
18262 acl_save_exec_prefix="$exec_prefix"
18263 exec_prefix="$acl_final_exec_prefix"
18264
18265 eval additional_includedir=\"$includedir\"
18266 eval additional_libdir=\"$libdir\"
18267
18268 exec_prefix="$acl_save_exec_prefix"
18269 prefix="$acl_save_prefix"
18270
18271
18272# Check whether --with-libbabeltrace-prefix was given.
18273if test "${with_libbabeltrace_prefix+set}" = set; then :
18274 withval=$with_libbabeltrace_prefix;
18275 if test "X$withval" = "Xno"; then
18276 use_additional=no
18277 else
18278 if test "X$withval" = "X"; then
18279
18280 acl_save_prefix="$prefix"
18281 prefix="$acl_final_prefix"
18282 acl_save_exec_prefix="$exec_prefix"
18283 exec_prefix="$acl_final_exec_prefix"
18284
18285 eval additional_includedir=\"$includedir\"
18286 eval additional_libdir=\"$libdir\"
18287
18288 exec_prefix="$acl_save_exec_prefix"
18289 prefix="$acl_save_prefix"
18290
18291 else
18292 additional_includedir="$withval/include"
18293 additional_libdir="$withval/lib"
18294 fi
18295 fi
18296
18297fi
18298
9f1528a1
AB
18299
18300# Check whether --with-libbabeltrace-type was given.
18301if test "${with_libbabeltrace_type+set}" = set; then :
18302 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18303else
18304 with_libbabeltrace_type=auto
18305fi
18306
18307 lib_type=`eval echo \$with_libbabeltrace_type`
18308
393fd4c3
YQ
18309 LIBBABELTRACE=
18310 LTLIBBABELTRACE=
18311 INCBABELTRACE=
18312 rpathdirs=
18313 ltrpathdirs=
18314 names_already_handled=
18315 names_next_round='babeltrace babeltrace-ctf'
18316 while test -n "$names_next_round"; do
18317 names_this_round="$names_next_round"
18318 names_next_round=
18319 for name in $names_this_round; do
18320 already_handled=
18321 for n in $names_already_handled; do
18322 if test "$n" = "$name"; then
18323 already_handled=yes
18324 break
18325 fi
18326 done
18327 if test -z "$already_handled"; then
18328 names_already_handled="$names_already_handled $name"
18329 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18330 eval value=\"\$HAVE_LIB$uppername\"
18331 if test -n "$value"; then
18332 if test "$value" = yes; then
18333 eval value=\"\$LIB$uppername\"
18334 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18335 eval value=\"\$LTLIB$uppername\"
18336 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18337 else
18338 :
18339 fi
18340 else
18341 found_dir=
18342 found_la=
18343 found_so=
18344 found_a=
18345 if test $use_additional = yes; then
9f1528a1 18346 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18347 found_dir="$additional_libdir"
18348 found_so="$additional_libdir/lib$name.$shlibext"
18349 if test -f "$additional_libdir/lib$name.la"; then
18350 found_la="$additional_libdir/lib$name.la"
18351 fi
9f1528a1 18352 elif test x$lib_type != xshared; then
393fd4c3
YQ
18353 if test -f "$additional_libdir/lib$name.$libext"; then
18354 found_dir="$additional_libdir"
18355 found_a="$additional_libdir/lib$name.$libext"
18356 if test -f "$additional_libdir/lib$name.la"; then
18357 found_la="$additional_libdir/lib$name.la"
18358 fi
18359 fi
18360 fi
18361 fi
18362 if test "X$found_dir" = "X"; then
18363 for x in $LDFLAGS $LTLIBBABELTRACE; do
18364
18365 acl_save_prefix="$prefix"
18366 prefix="$acl_final_prefix"
18367 acl_save_exec_prefix="$exec_prefix"
18368 exec_prefix="$acl_final_exec_prefix"
18369 eval x=\"$x\"
18370 exec_prefix="$acl_save_exec_prefix"
18371 prefix="$acl_save_prefix"
18372
18373 case "$x" in
18374 -L*)
18375 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18376 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18377 found_dir="$dir"
18378 found_so="$dir/lib$name.$shlibext"
18379 if test -f "$dir/lib$name.la"; then
18380 found_la="$dir/lib$name.la"
18381 fi
9f1528a1 18382 elif test x$lib_type != xshared; then
393fd4c3
YQ
18383 if test -f "$dir/lib$name.$libext"; then
18384 found_dir="$dir"
18385 found_a="$dir/lib$name.$libext"
18386 if test -f "$dir/lib$name.la"; then
18387 found_la="$dir/lib$name.la"
18388 fi
18389 fi
18390 fi
18391 ;;
18392 esac
18393 if test "X$found_dir" != "X"; then
18394 break
18395 fi
18396 done
18397 fi
18398 if test "X$found_dir" != "X"; then
18399 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18400 if test "X$found_so" != "X"; then
18401 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18402 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18403 else
18404 haveit=
18405 for x in $ltrpathdirs; do
18406 if test "X$x" = "X$found_dir"; then
18407 haveit=yes
18408 break
18409 fi
18410 done
18411 if test -z "$haveit"; then
18412 ltrpathdirs="$ltrpathdirs $found_dir"
18413 fi
18414 if test "$hardcode_direct" = yes; then
18415 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18416 else
18417 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18418 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18419 haveit=
18420 for x in $rpathdirs; do
18421 if test "X$x" = "X$found_dir"; then
18422 haveit=yes
18423 break
18424 fi
18425 done
18426 if test -z "$haveit"; then
18427 rpathdirs="$rpathdirs $found_dir"
18428 fi
18429 else
18430 haveit=
18431 for x in $LDFLAGS $LIBBABELTRACE; do
18432
18433 acl_save_prefix="$prefix"
18434 prefix="$acl_final_prefix"
18435 acl_save_exec_prefix="$exec_prefix"
18436 exec_prefix="$acl_final_exec_prefix"
18437 eval x=\"$x\"
18438 exec_prefix="$acl_save_exec_prefix"
18439 prefix="$acl_save_prefix"
18440
18441 if test "X$x" = "X-L$found_dir"; then
18442 haveit=yes
18443 break
18444 fi
18445 done
18446 if test -z "$haveit"; then
18447 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18448 fi
18449 if test "$hardcode_minus_L" != no; then
18450 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18451 else
18452 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18453 fi
18454 fi
18455 fi
18456 fi
18457 else
18458 if test "X$found_a" != "X"; then
18459 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18460 else
18461 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18462 fi
18463 fi
18464 additional_includedir=
18465 case "$found_dir" in
18466 */lib | */lib/)
18467 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18468 additional_includedir="$basedir/include"
18469 ;;
18470 esac
18471 if test "X$additional_includedir" != "X"; then
18472 if test "X$additional_includedir" != "X/usr/include"; then
18473 haveit=
18474 if test "X$additional_includedir" = "X/usr/local/include"; then
18475 if test -n "$GCC"; then
18476 case $host_os in
18477 linux*) haveit=yes;;
18478 esac
18479 fi
18480 fi
18481 if test -z "$haveit"; then
18482 for x in $CPPFLAGS $INCBABELTRACE; do
18483
18484 acl_save_prefix="$prefix"
18485 prefix="$acl_final_prefix"
18486 acl_save_exec_prefix="$exec_prefix"
18487 exec_prefix="$acl_final_exec_prefix"
18488 eval x=\"$x\"
18489 exec_prefix="$acl_save_exec_prefix"
18490 prefix="$acl_save_prefix"
18491
18492 if test "X$x" = "X-I$additional_includedir"; then
18493 haveit=yes
18494 break
18495 fi
18496 done
18497 if test -z "$haveit"; then
18498 if test -d "$additional_includedir"; then
18499 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18500 fi
18501 fi
18502 fi
18503 fi
18504 fi
18505 if test -n "$found_la"; then
18506 save_libdir="$libdir"
18507 case "$found_la" in
18508 */* | *\\*) . "$found_la" ;;
18509 *) . "./$found_la" ;;
18510 esac
18511 libdir="$save_libdir"
18512 for dep in $dependency_libs; do
18513 case "$dep" in
18514 -L*)
18515 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18516 if test "X$additional_libdir" != "X/usr/lib"; then
18517 haveit=
18518 if test "X$additional_libdir" = "X/usr/local/lib"; then
18519 if test -n "$GCC"; then
18520 case $host_os in
18521 linux*) haveit=yes;;
18522 esac
18523 fi
18524 fi
18525 if test -z "$haveit"; then
18526 haveit=
18527 for x in $LDFLAGS $LIBBABELTRACE; do
18528
18529 acl_save_prefix="$prefix"
18530 prefix="$acl_final_prefix"
18531 acl_save_exec_prefix="$exec_prefix"
18532 exec_prefix="$acl_final_exec_prefix"
18533 eval x=\"$x\"
18534 exec_prefix="$acl_save_exec_prefix"
18535 prefix="$acl_save_prefix"
18536
18537 if test "X$x" = "X-L$additional_libdir"; then
18538 haveit=yes
18539 break
18540 fi
18541 done
18542 if test -z "$haveit"; then
18543 if test -d "$additional_libdir"; then
18544 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18545 fi
18546 fi
18547 haveit=
18548 for x in $LDFLAGS $LTLIBBABELTRACE; do
18549
18550 acl_save_prefix="$prefix"
18551 prefix="$acl_final_prefix"
18552 acl_save_exec_prefix="$exec_prefix"
18553 exec_prefix="$acl_final_exec_prefix"
18554 eval x=\"$x\"
18555 exec_prefix="$acl_save_exec_prefix"
18556 prefix="$acl_save_prefix"
18557
18558 if test "X$x" = "X-L$additional_libdir"; then
18559 haveit=yes
18560 break
18561 fi
18562 done
18563 if test -z "$haveit"; then
18564 if test -d "$additional_libdir"; then
18565 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18566 fi
18567 fi
18568 fi
18569 fi
18570 ;;
18571 -R*)
18572 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18573 if test "$enable_rpath" != no; then
18574 haveit=
18575 for x in $rpathdirs; do
18576 if test "X$x" = "X$dir"; then
18577 haveit=yes
18578 break
18579 fi
18580 done
18581 if test -z "$haveit"; then
18582 rpathdirs="$rpathdirs $dir"
18583 fi
18584 haveit=
18585 for x in $ltrpathdirs; do
18586 if test "X$x" = "X$dir"; then
18587 haveit=yes
18588 break
18589 fi
18590 done
18591 if test -z "$haveit"; then
18592 ltrpathdirs="$ltrpathdirs $dir"
18593 fi
18594 fi
18595 ;;
18596 -l*)
18597 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18598 ;;
18599 *.la)
18600 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18601 ;;
18602 *)
18603 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18604 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18605 ;;
18606 esac
18607 done
18608 fi
18609 else
9f1528a1
AB
18610 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18611 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18612 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18613 else
18614 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18615 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18616 fi
393fd4c3
YQ
18617 fi
18618 fi
18619 fi
18620 done
18621 done
18622 if test "X$rpathdirs" != "X"; then
18623 if test -n "$hardcode_libdir_separator"; then
18624 alldirs=
18625 for found_dir in $rpathdirs; do
18626 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18627 done
18628 acl_save_libdir="$libdir"
18629 libdir="$alldirs"
18630 eval flag=\"$hardcode_libdir_flag_spec\"
18631 libdir="$acl_save_libdir"
18632 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18633 else
18634 for found_dir in $rpathdirs; do
18635 acl_save_libdir="$libdir"
18636 libdir="$found_dir"
18637 eval flag=\"$hardcode_libdir_flag_spec\"
18638 libdir="$acl_save_libdir"
18639 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18640 done
18641 fi
18642 fi
18643 if test "X$ltrpathdirs" != "X"; then
18644 for found_dir in $ltrpathdirs; do
18645 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18646 done
18647 fi
18648
18649
18650 ac_save_CPPFLAGS="$CPPFLAGS"
18651
18652 for element in $INCBABELTRACE; do
18653 haveit=
18654 for x in $CPPFLAGS; do
18655
18656 acl_save_prefix="$prefix"
18657 prefix="$acl_final_prefix"
18658 acl_save_exec_prefix="$exec_prefix"
18659 exec_prefix="$acl_final_exec_prefix"
18660 eval x=\"$x\"
18661 exec_prefix="$acl_save_exec_prefix"
18662 prefix="$acl_save_prefix"
18663
18664 if test "X$x" = "X$element"; then
18665 haveit=yes
18666 break
18667 fi
18668 done
18669 if test -z "$haveit"; then
18670 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18671 fi
18672 done
18673
18674
18675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18676$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18677if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18678 $as_echo_n "(cached) " >&6
18679else
18680
18681 ac_save_LIBS="$LIBS"
18682 LIBS="$LIBS $LIBBABELTRACE"
18683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18684/* end confdefs.h. */
18685#include <babeltrace/babeltrace.h>
18686 #include <babeltrace/ctf/events.h>
18687 #include <babeltrace/ctf/iterator.h>
18688int
18689main ()
18690{
18691struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18692 struct bt_ctf_event *event = NULL;
18693 const struct bt_definition *scope;
18694
13cdc2af 18695 pos->type = BT_SEEK_BEGIN;
65c749e7 18696 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18697 scope = bt_ctf_get_top_level_scope (event,
18698 BT_STREAM_EVENT_HEADER);
18699 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18700
18701 ;
18702 return 0;
18703}
18704_ACEOF
18705if ac_fn_c_try_link "$LINENO"; then :
18706 ac_cv_libbabeltrace=yes
18707else
18708 ac_cv_libbabeltrace=no
18709fi
18710rm -f core conftest.err conftest.$ac_objext \
18711 conftest$ac_exeext conftest.$ac_ext
18712 LIBS="$ac_save_LIBS"
18713
18714fi
18715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18716$as_echo "$ac_cv_libbabeltrace" >&6; }
18717 if test "$ac_cv_libbabeltrace" = yes; then
18718 HAVE_LIBBABELTRACE=yes
18719
18720$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18721
18722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18723$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18725$as_echo "$LIBBABELTRACE" >&6; }
18726 else
18727 HAVE_LIBBABELTRACE=no
18728 CPPFLAGS="$ac_save_CPPFLAGS"
18729 LIBBABELTRACE=
18730 LTLIBBABELTRACE=
18731 fi
18732
18733
18734
18735
18736
18737
18738 CFLAGS=$saved_CFLAGS
18739
18740 if test "$HAVE_LIBBABELTRACE" != yes; then
18741 if test "$with_babeltrace" = yes; then
d0ac1c44 18742 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18743 else
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18745$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18746 fi
18747 fi
18748fi
18749
ccb1ba62
CB
18750# Check for xxhash
18751
18752# Check whether --with-xxhash was given.
18753if test "${with_xxhash+set}" = set; then :
18754 withval=$with_xxhash;
18755else
18756 with_xxhash=auto
18757fi
18758
18759
1776e3e5
NA
18760 # Check whether --enable-libctf was given.
18761if test "${enable_libctf+set}" = set; then :
18762 enableval=$enable_libctf;
18763 case "$enableval" in
18764 yes|no) ;;
18765 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18766 esac
18767
18768else
18769 enable_libctf=yes
18770fi
18771
18772
18773if test x${enable_static} = xno; then
18774 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18775 CTF_DEPS="../libctf/.libs/libctf.so"
18776else
18777 LIBCTF="../libctf/.libs/libctf.a"
18778 CTF_DEPS="$LIBCTF"
18779fi
18780if test "${enable_libctf}" = yes; then
18781
18782$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18783
18784else
18785 LIBCTF=
18786 CTF_DEPS=
18787fi
18788
18789
18790
18791
18792# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18793# empty version.
18794
ccb1ba62
CB
18795if test "x$with_xxhash" != "xno"; then
18796
18797
18798
18799
18800
18801
18802
18803
18804 use_additional=yes
18805
18806 acl_save_prefix="$prefix"
18807 prefix="$acl_final_prefix"
18808 acl_save_exec_prefix="$exec_prefix"
18809 exec_prefix="$acl_final_exec_prefix"
18810
18811 eval additional_includedir=\"$includedir\"
18812 eval additional_libdir=\"$libdir\"
18813
18814 exec_prefix="$acl_save_exec_prefix"
18815 prefix="$acl_save_prefix"
18816
18817
18818# Check whether --with-libxxhash-prefix was given.
18819if test "${with_libxxhash_prefix+set}" = set; then :
18820 withval=$with_libxxhash_prefix;
18821 if test "X$withval" = "Xno"; then
18822 use_additional=no
18823 else
18824 if test "X$withval" = "X"; then
18825
18826 acl_save_prefix="$prefix"
18827 prefix="$acl_final_prefix"
18828 acl_save_exec_prefix="$exec_prefix"
18829 exec_prefix="$acl_final_exec_prefix"
18830
18831 eval additional_includedir=\"$includedir\"
18832 eval additional_libdir=\"$libdir\"
18833
18834 exec_prefix="$acl_save_exec_prefix"
18835 prefix="$acl_save_prefix"
18836
18837 else
18838 additional_includedir="$withval/include"
18839 additional_libdir="$withval/lib"
18840 fi
18841 fi
18842
18843fi
18844
9f1528a1
AB
18845
18846# Check whether --with-libxxhash-type was given.
18847if test "${with_libxxhash_type+set}" = set; then :
18848 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18849else
18850 with_libxxhash_type=auto
18851fi
18852
18853 lib_type=`eval echo \$with_libxxhash_type`
18854
ccb1ba62
CB
18855 LIBXXHASH=
18856 LTLIBXXHASH=
18857 INCXXHASH=
18858 rpathdirs=
18859 ltrpathdirs=
18860 names_already_handled=
18861 names_next_round='xxhash '
18862 while test -n "$names_next_round"; do
18863 names_this_round="$names_next_round"
18864 names_next_round=
18865 for name in $names_this_round; do
18866 already_handled=
18867 for n in $names_already_handled; do
18868 if test "$n" = "$name"; then
18869 already_handled=yes
18870 break
18871 fi
18872 done
18873 if test -z "$already_handled"; then
18874 names_already_handled="$names_already_handled $name"
18875 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18876 eval value=\"\$HAVE_LIB$uppername\"
18877 if test -n "$value"; then
18878 if test "$value" = yes; then
18879 eval value=\"\$LIB$uppername\"
18880 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18881 eval value=\"\$LTLIB$uppername\"
18882 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18883 else
18884 :
18885 fi
18886 else
18887 found_dir=
18888 found_la=
18889 found_so=
18890 found_a=
18891 if test $use_additional = yes; then
9f1528a1 18892 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18893 found_dir="$additional_libdir"
18894 found_so="$additional_libdir/lib$name.$shlibext"
18895 if test -f "$additional_libdir/lib$name.la"; then
18896 found_la="$additional_libdir/lib$name.la"
18897 fi
9f1528a1 18898 elif test x$lib_type != xshared; then
ccb1ba62
CB
18899 if test -f "$additional_libdir/lib$name.$libext"; then
18900 found_dir="$additional_libdir"
18901 found_a="$additional_libdir/lib$name.$libext"
18902 if test -f "$additional_libdir/lib$name.la"; then
18903 found_la="$additional_libdir/lib$name.la"
18904 fi
18905 fi
18906 fi
18907 fi
18908 if test "X$found_dir" = "X"; then
18909 for x in $LDFLAGS $LTLIBXXHASH; do
18910
18911 acl_save_prefix="$prefix"
18912 prefix="$acl_final_prefix"
18913 acl_save_exec_prefix="$exec_prefix"
18914 exec_prefix="$acl_final_exec_prefix"
18915 eval x=\"$x\"
18916 exec_prefix="$acl_save_exec_prefix"
18917 prefix="$acl_save_prefix"
18918
18919 case "$x" in
18920 -L*)
18921 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18922 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18923 found_dir="$dir"
18924 found_so="$dir/lib$name.$shlibext"
18925 if test -f "$dir/lib$name.la"; then
18926 found_la="$dir/lib$name.la"
18927 fi
9f1528a1 18928 elif test x$lib_type != xshared; then
ccb1ba62
CB
18929 if test -f "$dir/lib$name.$libext"; then
18930 found_dir="$dir"
18931 found_a="$dir/lib$name.$libext"
18932 if test -f "$dir/lib$name.la"; then
18933 found_la="$dir/lib$name.la"
18934 fi
18935 fi
18936 fi
18937 ;;
18938 esac
18939 if test "X$found_dir" != "X"; then
18940 break
18941 fi
18942 done
18943 fi
18944 if test "X$found_dir" != "X"; then
18945 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18946 if test "X$found_so" != "X"; then
18947 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18948 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18949 else
18950 haveit=
18951 for x in $ltrpathdirs; do
18952 if test "X$x" = "X$found_dir"; then
18953 haveit=yes
18954 break
18955 fi
18956 done
18957 if test -z "$haveit"; then
18958 ltrpathdirs="$ltrpathdirs $found_dir"
18959 fi
18960 if test "$hardcode_direct" = yes; then
18961 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18962 else
18963 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18964 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18965 haveit=
18966 for x in $rpathdirs; do
18967 if test "X$x" = "X$found_dir"; then
18968 haveit=yes
18969 break
18970 fi
18971 done
18972 if test -z "$haveit"; then
18973 rpathdirs="$rpathdirs $found_dir"
18974 fi
18975 else
18976 haveit=
18977 for x in $LDFLAGS $LIBXXHASH; 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-L$found_dir"; then
18988 haveit=yes
18989 break
18990 fi
18991 done
18992 if test -z "$haveit"; then
18993 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18994 fi
18995 if test "$hardcode_minus_L" != no; then
18996 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18997 else
18998 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18999 fi
19000 fi
19001 fi
19002 fi
19003 else
19004 if test "X$found_a" != "X"; then
19005 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19006 else
19007 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19008 fi
19009 fi
19010 additional_includedir=
19011 case "$found_dir" in
19012 */lib | */lib/)
19013 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19014 additional_includedir="$basedir/include"
19015 ;;
19016 esac
19017 if test "X$additional_includedir" != "X"; then
19018 if test "X$additional_includedir" != "X/usr/include"; then
19019 haveit=
19020 if test "X$additional_includedir" = "X/usr/local/include"; then
19021 if test -n "$GCC"; then
19022 case $host_os in
19023 linux*) haveit=yes;;
19024 esac
19025 fi
19026 fi
19027 if test -z "$haveit"; then
19028 for x in $CPPFLAGS $INCXXHASH; do
19029
19030 acl_save_prefix="$prefix"
19031 prefix="$acl_final_prefix"
19032 acl_save_exec_prefix="$exec_prefix"
19033 exec_prefix="$acl_final_exec_prefix"
19034 eval x=\"$x\"
19035 exec_prefix="$acl_save_exec_prefix"
19036 prefix="$acl_save_prefix"
19037
19038 if test "X$x" = "X-I$additional_includedir"; then
19039 haveit=yes
19040 break
19041 fi
19042 done
19043 if test -z "$haveit"; then
19044 if test -d "$additional_includedir"; then
19045 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19046 fi
19047 fi
19048 fi
19049 fi
19050 fi
19051 if test -n "$found_la"; then
19052 save_libdir="$libdir"
19053 case "$found_la" in
19054 */* | *\\*) . "$found_la" ;;
19055 *) . "./$found_la" ;;
19056 esac
19057 libdir="$save_libdir"
19058 for dep in $dependency_libs; do
19059 case "$dep" in
19060 -L*)
19061 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19062 if test "X$additional_libdir" != "X/usr/lib"; then
19063 haveit=
19064 if test "X$additional_libdir" = "X/usr/local/lib"; then
19065 if test -n "$GCC"; then
19066 case $host_os in
19067 linux*) haveit=yes;;
19068 esac
19069 fi
19070 fi
19071 if test -z "$haveit"; then
19072 haveit=
19073 for x in $LDFLAGS $LIBXXHASH; do
19074
19075 acl_save_prefix="$prefix"
19076 prefix="$acl_final_prefix"
19077 acl_save_exec_prefix="$exec_prefix"
19078 exec_prefix="$acl_final_exec_prefix"
19079 eval x=\"$x\"
19080 exec_prefix="$acl_save_exec_prefix"
19081 prefix="$acl_save_prefix"
19082
19083 if test "X$x" = "X-L$additional_libdir"; then
19084 haveit=yes
19085 break
19086 fi
19087 done
19088 if test -z "$haveit"; then
19089 if test -d "$additional_libdir"; then
19090 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19091 fi
19092 fi
19093 haveit=
19094 for x in $LDFLAGS $LTLIBXXHASH; do
19095
19096 acl_save_prefix="$prefix"
19097 prefix="$acl_final_prefix"
19098 acl_save_exec_prefix="$exec_prefix"
19099 exec_prefix="$acl_final_exec_prefix"
19100 eval x=\"$x\"
19101 exec_prefix="$acl_save_exec_prefix"
19102 prefix="$acl_save_prefix"
19103
19104 if test "X$x" = "X-L$additional_libdir"; then
19105 haveit=yes
19106 break
19107 fi
19108 done
19109 if test -z "$haveit"; then
19110 if test -d "$additional_libdir"; then
19111 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19112 fi
19113 fi
19114 fi
19115 fi
19116 ;;
19117 -R*)
19118 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19119 if test "$enable_rpath" != no; then
19120 haveit=
19121 for x in $rpathdirs; do
19122 if test "X$x" = "X$dir"; then
19123 haveit=yes
19124 break
19125 fi
19126 done
19127 if test -z "$haveit"; then
19128 rpathdirs="$rpathdirs $dir"
19129 fi
19130 haveit=
19131 for x in $ltrpathdirs; do
19132 if test "X$x" = "X$dir"; then
19133 haveit=yes
19134 break
19135 fi
19136 done
19137 if test -z "$haveit"; then
19138 ltrpathdirs="$ltrpathdirs $dir"
19139 fi
19140 fi
19141 ;;
19142 -l*)
19143 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19144 ;;
19145 *.la)
19146 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19147 ;;
19148 *)
19149 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19150 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19151 ;;
19152 esac
19153 done
19154 fi
19155 else
9f1528a1
AB
19156 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19157 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19158 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19159 else
19160 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19161 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19162 fi
ccb1ba62
CB
19163 fi
19164 fi
19165 fi
19166 done
19167 done
19168 if test "X$rpathdirs" != "X"; then
19169 if test -n "$hardcode_libdir_separator"; then
19170 alldirs=
19171 for found_dir in $rpathdirs; do
19172 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19173 done
19174 acl_save_libdir="$libdir"
19175 libdir="$alldirs"
19176 eval flag=\"$hardcode_libdir_flag_spec\"
19177 libdir="$acl_save_libdir"
19178 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19179 else
19180 for found_dir in $rpathdirs; do
19181 acl_save_libdir="$libdir"
19182 libdir="$found_dir"
19183 eval flag=\"$hardcode_libdir_flag_spec\"
19184 libdir="$acl_save_libdir"
19185 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19186 done
19187 fi
19188 fi
19189 if test "X$ltrpathdirs" != "X"; then
19190 for found_dir in $ltrpathdirs; do
19191 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19192 done
19193 fi
19194
19195
19196 ac_save_CPPFLAGS="$CPPFLAGS"
19197
19198 for element in $INCXXHASH; do
19199 haveit=
19200 for x in $CPPFLAGS; do
19201
19202 acl_save_prefix="$prefix"
19203 prefix="$acl_final_prefix"
19204 acl_save_exec_prefix="$exec_prefix"
19205 exec_prefix="$acl_final_exec_prefix"
19206 eval x=\"$x\"
19207 exec_prefix="$acl_save_exec_prefix"
19208 prefix="$acl_save_prefix"
19209
19210 if test "X$x" = "X$element"; then
19211 haveit=yes
19212 break
19213 fi
19214 done
19215 if test -z "$haveit"; then
19216 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19217 fi
19218 done
19219
19220
19221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19222$as_echo_n "checking for libxxhash... " >&6; }
19223if ${ac_cv_libxxhash+:} false; then :
19224 $as_echo_n "(cached) " >&6
19225else
19226
19227 ac_save_LIBS="$LIBS"
19228 LIBS="$LIBS $LIBXXHASH"
19229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19230/* end confdefs.h. */
19231#include <xxhash.h>
19232int
19233main ()
19234{
19235XXH32("foo", 3, 0);
19236
19237 ;
19238 return 0;
19239}
19240_ACEOF
19241if ac_fn_c_try_link "$LINENO"; then :
19242 ac_cv_libxxhash=yes
19243else
19244 ac_cv_libxxhash=no
19245fi
19246rm -f core conftest.err conftest.$ac_objext \
19247 conftest$ac_exeext conftest.$ac_ext
19248 LIBS="$ac_save_LIBS"
19249
19250fi
19251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19252$as_echo "$ac_cv_libxxhash" >&6; }
19253 if test "$ac_cv_libxxhash" = yes; then
19254 HAVE_LIBXXHASH=yes
19255
19256$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19257
19258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19259$as_echo_n "checking how to link with libxxhash... " >&6; }
19260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19261$as_echo "$LIBXXHASH" >&6; }
19262 else
19263 HAVE_LIBXXHASH=no
19264 CPPFLAGS="$ac_save_CPPFLAGS"
19265 LIBXXHASH=
19266 LTLIBXXHASH=
19267 fi
19268
19269
19270
19271
19272
19273
19274 if test "$HAVE_LIBXXHASH" != yes; then
19275 if test "$with_xxhash" = yes; then
19276 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19277 fi
19278 fi
19279 if test "x$with_xxhash" = "xauto"; then
19280 with_xxhash="$HAVE_LIBXXHASH"
19281 fi
19282fi
19283
19284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19285$as_echo_n "checking whether to use xxhash... " >&6; }
19286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19287$as_echo "$with_xxhash" >&6; }
19288
a0a461e5 19289NM_H=
c906108c
SS
19290rm -f nm.h
19291if test "${nativefile}" != ""; then
0f475e27
AC
19292 case "${nativefile}" in
19293 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19294 * ) GDB_NM_FILE="${nativefile}"
19295 esac
a0a461e5
TT
19296 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19297
60ca704f
SE
19298
19299cat >>confdefs.h <<_ACEOF
b78960be 19300#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 19301_ACEOF
5a2402b8 19302
a0a461e5 19303 NM_H=nm.h
c906108c 19304fi
5a2402b8
AC
19305
19306
a0a461e5 19307
e3487908
GKB
19308for ac_prog in xsltproc
19309do
19310 # Extract the first word of "$ac_prog", so it can be a program name with args.
19311set dummy $ac_prog; ac_word=$2
19312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19313$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 19314if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
19315 $as_echo_n "(cached) " >&6
19316else
19317 case $XSLTPROC in
19318 [\\/]* | ?:[\\/]*)
19319 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19320 ;;
19321 *)
19322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19323for as_dir in $PATH
19324do
19325 IFS=$as_save_IFS
19326 test -z "$as_dir" && as_dir=.
19327 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 19328 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
19329 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19331 break 2
19332 fi
19333done
19334 done
19335IFS=$as_save_IFS
19336
19337 ;;
19338esac
19339fi
19340XSLTPROC=$ac_cv_path_XSLTPROC
19341if test -n "$XSLTPROC"; then
19342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19343$as_echo "$XSLTPROC" >&6; }
19344else
19345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19346$as_echo "no" >&6; }
19347fi
19348
19349
19350 test -n "$XSLTPROC" && break
19351done
19352test -n "$XSLTPROC" || XSLTPROC="missing"
19353
19354if test "x$USE_MAINTAINER_MODE" = xyes; then
19355 if test "${XSLTPROC}" = missing; then
d0ac1c44 19356 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
19357 fi
19358fi
19359
19360
c906108c
SS
19361
19362
c906108c 19363
81ecdfbb 19364$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 19365
bec39cab 19366
8ecfd7bd
SDJ
19367
19368# Check whether we will enable the inclusion of unit tests when
19369# compiling GDB.
19370#
19371# The default value of this option changes depending whether we're on
19372# development mode (in which case it's "true") or not (in which case
db6878ac
SM
19373# it's "false"). The $development variable is set by the GDB_AC_COMMON
19374# macro, which must therefore be used before GDB_AC_SELFTEST.
4d696a5c
SM
19375
19376if test "x$development" != xtrue && test "x$development" != xfalse; then :
19377 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19378fi
19379
8ecfd7bd
SDJ
19380# Check whether --enable-unit-tests was given.
19381if test "${enable_unit_tests+set}" = set; then :
19382 enableval=$enable_unit_tests; case "${enableval}" in
19383 yes) enable_unittests=true ;;
19384 no) enable_unittests=false ;;
19385 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19386esac
19387else
19388 enable_unittests=$development
19389fi
19390
19391
19392if $enable_unittests; then
dcd1f979
TT
19393
19394$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19395
8ecfd7bd 19396
74cd3f9d
SM
19397 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19398 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
8ecfd7bd 19399
dcd1f979
TT
19400fi
19401
b292c783 19402
8ecfd7bd 19403
f6a88844
JM
19404 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19405 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19406 if test "x$GDB_TRANSFORM_NAME" = x; then
19407 GDB_TRANSFORM_NAME=gdb
19408 fi
19409
19410
19411
19412 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19413 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19414 if test "x$GCORE_TRANSFORM_NAME" = x; then
19415 GCORE_TRANSFORM_NAME=gcore
19416 fi
19417
b292c783
JK
19418
19419ac_config_files="$ac_config_files gcore"
19420
141ec9f6 19421ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19422
89a34d1b 19423
bec39cab
AC
19424cat >confcache <<\_ACEOF
19425# This file is a shell script that caches the results of configure
19426# tests run on this system so they can be shared between configure
19427# scripts and configure runs, see configure's option --config-cache.
19428# It is not useful on other systems. If it contains results you don't
19429# want to keep, you may remove or edit it.
19430#
19431# config.status only pays attention to the cache file if you give it
19432# the --recheck option to rerun configure.
19433#
19434# `ac_cv_env_foo' variables (set or unset) will be overridden when
19435# loading this file, other *unset* `ac_cv_foo' will be assigned the
19436# following values.
19437
19438_ACEOF
19439
19440# The following way of writing the cache mishandles newlines in values,
19441# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19442# So, we kill variables containing newlines.
bec39cab
AC
19443# Ultrix sh set writes to stderr and can't be redirected directly,
19444# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19445(
19446 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19447 eval ac_val=\$$ac_var
19448 case $ac_val in #(
19449 *${as_nl}*)
19450 case $ac_var in #(
19451 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19452$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19453 esac
19454 case $ac_var in #(
19455 _ | IFS | as_nl) ;; #(
19456 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19457 *) { eval $ac_var=; unset $ac_var;} ;;
19458 esac ;;
19459 esac
19460 done
19461
bec39cab 19462 (set) 2>&1 |
81ecdfbb
RW
19463 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19464 *${as_nl}ac_space=\ *)
19465 # `set' does not quote correctly, so add quotes: double-quote
19466 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19467 sed -n \
19468 "s/'/'\\\\''/g;
19469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19470 ;; #(
bec39cab
AC
19471 *)
19472 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19474 ;;
81ecdfbb
RW
19475 esac |
19476 sort
19477) |
bec39cab 19478 sed '
81ecdfbb 19479 /^ac_cv_env_/b end
bec39cab 19480 t clear
81ecdfbb 19481 :clear
bec39cab
AC
19482 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19483 t end
81ecdfbb
RW
19484 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19485 :end' >>confcache
19486if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19487 if test -w "$cache_file"; then
d0ac1c44 19488 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19489 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19490$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19491 if test ! -f "$cache_file" || test -h "$cache_file"; then
19492 cat confcache >"$cache_file"
19493 else
19494 case $cache_file in #(
19495 */* | ?:*)
19496 mv -f confcache "$cache_file"$$ &&
19497 mv -f "$cache_file"$$ "$cache_file" ;; #(
19498 *)
19499 mv -f confcache "$cache_file" ;;
19500 esac
19501 fi
19502 fi
bec39cab 19503 else
81ecdfbb
RW
19504 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19505$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19506 fi
19507fi
19508rm -f confcache
19509
19510test "x$prefix" = xNONE && prefix=$ac_default_prefix
19511# Let make expand exec_prefix.
19512test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19513
bec39cab
AC
19514DEFS=-DHAVE_CONFIG_H
19515
19516ac_libobjs=
19517ac_ltlibobjs=
d0ac1c44 19518U=
bec39cab
AC
19519for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19520 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19521 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19522 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19523 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19524 # will be set to the directory where LIBOBJS objects are built.
19525 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19526 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19527done
19528LIBOBJS=$ac_libobjs
19529
19530LTLIBOBJS=$ac_ltlibobjs
19531
19532
85981d60 19533if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19534 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19535Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19536fi
4df42755 19537if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19538 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19539Usually this means the macro was only invoked conditionally." "$LINENO" 5
19540fi
19541if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19542 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19543Usually this means the macro was only invoked conditionally." "$LINENO" 5
19544fi
81ecdfbb
RW
19545
19546
d0ac1c44 19547: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19548ac_write_fail=0
bec39cab
AC
19549ac_clean_files_save=$ac_clean_files
19550ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19551{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19552$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19553as_write_fail=0
19554cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19555#! $SHELL
19556# Generated by $as_me.
19557# Run this file to recreate the current configuration.
19558# Compiler output produced by configure, useful for debugging
19559# configure, is in config.log if it exists.
19560
19561debug=false
19562ac_cs_recheck=false
19563ac_cs_silent=false
bec39cab 19564
81ecdfbb
RW
19565SHELL=\${CONFIG_SHELL-$SHELL}
19566export SHELL
19567_ASEOF
19568cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19569## -------------------- ##
19570## M4sh Initialization. ##
19571## -------------------- ##
19572
19573# Be more Bourne compatible
19574DUALCASE=1; export DUALCASE # for MKS sh
19575if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19576 emulate sh
19577 NULLCMD=:
81ecdfbb 19578 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19579 # is contrary to our usage. Disable this feature.
19580 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19581 setopt NO_GLOB_SUBST
19582else
19583 case `(set -o) 2>/dev/null` in #(
19584 *posix*) :
19585 set -o posix ;; #(
19586 *) :
19587 ;;
19588esac
bec39cab 19589fi
bec39cab 19590
81ecdfbb
RW
19591
19592as_nl='
19593'
19594export as_nl
19595# Printing a long string crashes Solaris 7 /usr/bin/printf.
19596as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19597as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19598as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19599# Prefer a ksh shell builtin over an external printf program on Solaris,
19600# but without wasting forks for bash or zsh.
19601if test -z "$BASH_VERSION$ZSH_VERSION" \
19602 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19603 as_echo='print -r --'
19604 as_echo_n='print -rn --'
19605elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19606 as_echo='printf %s\n'
19607 as_echo_n='printf %s'
19608else
19609 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19610 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19611 as_echo_n='/usr/ucb/echo -n'
19612 else
19613 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19614 as_echo_n_body='eval
19615 arg=$1;
19616 case $arg in #(
19617 *"$as_nl"*)
19618 expr "X$arg" : "X\\(.*\\)$as_nl";
19619 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19620 esac;
19621 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19622 '
19623 export as_echo_n_body
19624 as_echo_n='sh -c $as_echo_n_body as_echo'
19625 fi
19626 export as_echo_body
19627 as_echo='sh -c $as_echo_body as_echo'
19628fi
19629
19630# The user is always right.
19631if test "${PATH_SEPARATOR+set}" != set; then
19632 PATH_SEPARATOR=:
19633 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19634 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19635 PATH_SEPARATOR=';'
19636 }
bec39cab
AC
19637fi
19638
19639
81ecdfbb
RW
19640# IFS
19641# We need space, tab and new line, in precisely that order. Quoting is
19642# there to prevent editors from complaining about space-tab.
19643# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19644# splitting by setting IFS to empty value.)
19645IFS=" "" $as_nl"
19646
19647# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19648as_myself=
81ecdfbb
RW
19649case $0 in #((
19650 *[\\/]* ) as_myself=$0 ;;
19651 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19652for as_dir in $PATH
19653do
19654 IFS=$as_save_IFS
19655 test -z "$as_dir" && as_dir=.
19656 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19657 done
19658IFS=$as_save_IFS
19659
19660 ;;
19661esac
19662# We did not find ourselves, most probably we were run as `sh COMMAND'
19663# in which case we are not to be found in the path.
19664if test "x$as_myself" = x; then
19665 as_myself=$0
19666fi
19667if test ! -f "$as_myself"; then
19668 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19669 exit 1
19670fi
19671
19672# Unset variables that we do not need and which cause bugs (e.g. in
19673# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19674# suppresses any "Segmentation fault" message there. '((' could
19675# trigger a bug in pdksh 5.2.14.
19676for as_var in BASH_ENV ENV MAIL MAILPATH
19677do eval test x\${$as_var+set} = xset \
19678 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19679done
bec39cab
AC
19680PS1='$ '
19681PS2='> '
19682PS4='+ '
19683
19684# NLS nuisances.
81ecdfbb
RW
19685LC_ALL=C
19686export LC_ALL
19687LANGUAGE=C
19688export LANGUAGE
19689
19690# CDPATH.
19691(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19692
19693
d0ac1c44
SM
19694# as_fn_error STATUS ERROR [LINENO LOG_FD]
19695# ----------------------------------------
81ecdfbb
RW
19696# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19697# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19698# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19699as_fn_error ()
19700{
d0ac1c44
SM
19701 as_status=$1; test $as_status -eq 0 && as_status=1
19702 if test "$4"; then
19703 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19704 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19705 fi
d0ac1c44 19706 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19707 as_fn_exit $as_status
19708} # as_fn_error
19709
19710
19711# as_fn_set_status STATUS
19712# -----------------------
19713# Set $? to STATUS, without forking.
19714as_fn_set_status ()
19715{
19716 return $1
19717} # as_fn_set_status
19718
19719# as_fn_exit STATUS
19720# -----------------
19721# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19722as_fn_exit ()
19723{
19724 set +e
19725 as_fn_set_status $1
19726 exit $1
19727} # as_fn_exit
19728
19729# as_fn_unset VAR
19730# ---------------
19731# Portably unset VAR.
19732as_fn_unset ()
19733{
19734 { eval $1=; unset $1;}
19735}
19736as_unset=as_fn_unset
19737# as_fn_append VAR VALUE
19738# ----------------------
19739# Append the text in VALUE to the end of the definition contained in VAR. Take
19740# advantage of any shell optimizations that allow amortized linear growth over
19741# repeated appends, instead of the typical quadratic growth present in naive
19742# implementations.
19743if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19744 eval 'as_fn_append ()
19745 {
19746 eval $1+=\$2
19747 }'
19748else
19749 as_fn_append ()
19750 {
19751 eval $1=\$$1\$2
19752 }
19753fi # as_fn_append
19754
19755# as_fn_arith ARG...
19756# ------------------
19757# Perform arithmetic evaluation on the ARGs, and store the result in the
19758# global $as_val. Take advantage of shells that can avoid forks. The arguments
19759# must be portable across $(()) and expr.
19760if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19761 eval 'as_fn_arith ()
19762 {
19763 as_val=$(( $* ))
19764 }'
19765else
19766 as_fn_arith ()
19767 {
19768 as_val=`expr "$@" || test $? -eq 1`
19769 }
19770fi # as_fn_arith
bec39cab 19771
81ecdfbb
RW
19772
19773if expr a : '\(a\)' >/dev/null 2>&1 &&
19774 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19775 as_expr=expr
19776else
19777 as_expr=false
19778fi
19779
81ecdfbb 19780if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19781 as_basename=basename
19782else
19783 as_basename=false
19784fi
19785
81ecdfbb
RW
19786if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19787 as_dirname=dirname
19788else
19789 as_dirname=false
19790fi
bec39cab 19791
81ecdfbb 19792as_me=`$as_basename -- "$0" ||
bec39cab
AC
19793$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19794 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19795 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19796$as_echo X/"$0" |
19797 sed '/^.*\/\([^/][^/]*\)\/*$/{
19798 s//\1/
19799 q
19800 }
19801 /^X\/\(\/\/\)$/{
19802 s//\1/
19803 q
19804 }
19805 /^X\/\(\/\).*/{
19806 s//\1/
19807 q
19808 }
19809 s/.*/./; q'`
b4e70030 19810
b4e70030
JB
19811# Avoid depending upon Character Ranges.
19812as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19813as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19814as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19815as_cr_digits='0123456789'
19816as_cr_alnum=$as_cr_Letters$as_cr_digits
19817
81ecdfbb
RW
19818ECHO_C= ECHO_N= ECHO_T=
19819case `echo -n x` in #(((((
19820-n*)
19821 case `echo 'xy\c'` in
19822 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19823 xy) ECHO_C='\c';;
19824 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19825 ECHO_T=' ';;
19826 esac;;
19827*)
19828 ECHO_N='-n';;
bec39cab
AC
19829esac
19830
81ecdfbb
RW
19831rm -f conf$$ conf$$.exe conf$$.file
19832if test -d conf$$.dir; then
19833 rm -f conf$$.dir/conf$$.file
bec39cab 19834else
81ecdfbb
RW
19835 rm -f conf$$.dir
19836 mkdir conf$$.dir 2>/dev/null
bec39cab 19837fi
81ecdfbb
RW
19838if (echo >conf$$.file) 2>/dev/null; then
19839 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19840 as_ln_s='ln -s'
81ecdfbb
RW
19841 # ... but there are two gotchas:
19842 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19843 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19844 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19845 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19846 as_ln_s='cp -pR'
81ecdfbb
RW
19847 elif ln conf$$.file conf$$ 2>/dev/null; then
19848 as_ln_s=ln
19849 else
d0ac1c44 19850 as_ln_s='cp -pR'
b4e70030 19851 fi
bec39cab 19852else
d0ac1c44 19853 as_ln_s='cp -pR'
bec39cab 19854fi
81ecdfbb
RW
19855rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19856rmdir conf$$.dir 2>/dev/null
19857
19858
19859# as_fn_mkdir_p
19860# -------------
19861# Create "$as_dir" as a directory, including parents if necessary.
19862as_fn_mkdir_p ()
19863{
19864
19865 case $as_dir in #(
19866 -*) as_dir=./$as_dir;;
19867 esac
19868 test -d "$as_dir" || eval $as_mkdir_p || {
19869 as_dirs=
19870 while :; do
19871 case $as_dir in #(
19872 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19873 *) as_qdir=$as_dir;;
19874 esac
19875 as_dirs="'$as_qdir' $as_dirs"
19876 as_dir=`$as_dirname -- "$as_dir" ||
19877$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19878 X"$as_dir" : 'X\(//\)[^/]' \| \
19879 X"$as_dir" : 'X\(//\)$' \| \
19880 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19881$as_echo X"$as_dir" |
19882 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19883 s//\1/
19884 q
19885 }
19886 /^X\(\/\/\)[^/].*/{
19887 s//\1/
19888 q
19889 }
19890 /^X\(\/\/\)$/{
19891 s//\1/
19892 q
19893 }
19894 /^X\(\/\).*/{
19895 s//\1/
19896 q
19897 }
19898 s/.*/./; q'`
19899 test -d "$as_dir" && break
19900 done
19901 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19902 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19903
bec39cab 19904
81ecdfbb 19905} # as_fn_mkdir_p
bec39cab 19906if mkdir -p . 2>/dev/null; then
81ecdfbb 19907 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19908else
19909 test -d ./-p && rmdir ./-p
19910 as_mkdir_p=false
19911fi
19912
d0ac1c44
SM
19913
19914# as_fn_executable_p FILE
19915# -----------------------
19916# Test if FILE is an executable regular file.
19917as_fn_executable_p ()
19918{
19919 test -f "$1" && test -x "$1"
19920} # as_fn_executable_p
19921as_test_x='test -x'
19922as_executable_p=as_fn_executable_p
bec39cab
AC
19923
19924# Sed expression to map a string onto a valid CPP name.
19925as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19926
19927# Sed expression to map a string onto a valid variable name.
19928as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19929
19930
bec39cab 19931exec 6>&1
81ecdfbb
RW
19932## ----------------------------------- ##
19933## Main body of $CONFIG_STATUS script. ##
19934## ----------------------------------- ##
19935_ASEOF
19936test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19937
19938cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19939# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19940# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19941# values after options handling.
19942ac_log="
bec39cab 19943This file was extended by $as_me, which was
d0ac1c44 19944generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19945
19946 CONFIG_FILES = $CONFIG_FILES
19947 CONFIG_HEADERS = $CONFIG_HEADERS
19948 CONFIG_LINKS = $CONFIG_LINKS
19949 CONFIG_COMMANDS = $CONFIG_COMMANDS
19950 $ $0 $@
19951
81ecdfbb
RW
19952on `(hostname || uname -n) 2>/dev/null | sed 1q`
19953"
19954
bec39cab
AC
19955_ACEOF
19956
81ecdfbb
RW
19957case $ac_config_files in *"
19958"*) set x $ac_config_files; shift; ac_config_files=$*;;
19959esac
234b45d4 19960
81ecdfbb
RW
19961case $ac_config_headers in *"
19962"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19963esac
b4e70030 19964
b4e70030 19965
81ecdfbb
RW
19966cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19967# Files that config.status was made for.
19968config_files="$ac_config_files"
19969config_headers="$ac_config_headers"
19970config_links="$ac_config_links"
19971config_commands="$ac_config_commands"
234b45d4 19972
81ecdfbb 19973_ACEOF
b4e70030 19974
81ecdfbb 19975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19976ac_cs_usage="\
81ecdfbb
RW
19977\`$as_me' instantiates files and other configuration actions
19978from templates according to the current configuration. Unless the files
19979and actions are specified as TAGs, all are instantiated by default.
234b45d4 19980
81ecdfbb 19981Usage: $0 [OPTION]... [TAG]...
234b45d4 19982
bec39cab 19983 -h, --help print this help, then exit
81ecdfbb 19984 -V, --version print version number and configuration settings, then exit
d0ac1c44 19985 --config print configuration, then exit
81ecdfbb
RW
19986 -q, --quiet, --silent
19987 do not print progress messages
bec39cab
AC
19988 -d, --debug don't remove temporary files
19989 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
19990 --file=FILE[:TEMPLATE]
19991 instantiate the configuration file FILE
19992 --header=FILE[:TEMPLATE]
19993 instantiate the configuration header FILE
234b45d4 19994
bec39cab
AC
19995Configuration files:
19996$config_files
234b45d4 19997
bec39cab
AC
19998Configuration headers:
19999$config_headers
234b45d4 20000
bec39cab
AC
20001Configuration links:
20002$config_links
234b45d4 20003
bec39cab
AC
20004Configuration commands:
20005$config_commands
20006
81ecdfbb 20007Report bugs to the package provider."
b4e70030 20008
81ecdfbb
RW
20009_ACEOF
20010cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20011ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
20012ac_cs_version="\\
20013config.status
d0ac1c44
SM
20014configured by $0, generated by GNU Autoconf 2.69,
20015 with options \\"\$ac_cs_config\\"
bec39cab 20016
d0ac1c44 20017Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
20018This config.status script is free software; the Free Software Foundation
20019gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
20020
20021ac_pwd='$ac_pwd'
20022srcdir='$srcdir'
20023INSTALL='$INSTALL'
81ecdfbb
RW
20024AWK='$AWK'
20025test -n "\$AWK" || AWK=awk
bec39cab
AC
20026_ACEOF
20027
81ecdfbb
RW
20028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20029# The default lists apply if the user does not specify any file.
bec39cab
AC
20030ac_need_defaults=:
20031while test $# != 0
20032do
20033 case $1 in
d0ac1c44 20034 --*=?*)
81ecdfbb
RW
20035 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20036 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 20037 ac_shift=:
c906108c 20038 ;;
d0ac1c44
SM
20039 --*=)
20040 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20041 ac_optarg=
20042 ac_shift=:
20043 ;;
81ecdfbb 20044 *)
bec39cab
AC
20045 ac_option=$1
20046 ac_optarg=$2
20047 ac_shift=shift
c906108c 20048 ;;
bec39cab 20049 esac
c906108c 20050
bec39cab
AC
20051 case $ac_option in
20052 # Handling of the options.
bec39cab
AC
20053 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20054 ac_cs_recheck=: ;;
81ecdfbb
RW
20055 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20056 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
20057 --config | --confi | --conf | --con | --co | --c )
20058 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 20059 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
20060 debug=: ;;
20061 --file | --fil | --fi | --f )
20062 $ac_shift
81ecdfbb
RW
20063 case $ac_optarg in
20064 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 20065 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
20066 esac
20067 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
20068 ac_need_defaults=false;;
20069 --header | --heade | --head | --hea )
20070 $ac_shift
81ecdfbb
RW
20071 case $ac_optarg in
20072 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20073 esac
20074 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 20075 ac_need_defaults=false;;
81ecdfbb
RW
20076 --he | --h)
20077 # Conflict between --help and --header
d0ac1c44 20078 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
20079Try \`$0 --help' for more information.";;
20080 --help | --hel | -h )
20081 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
20082 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20083 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20084 ac_cs_silent=: ;;
c906108c 20085
bec39cab 20086 # This is an error.
d0ac1c44 20087 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 20088Try \`$0 --help' for more information." ;;
c906108c 20089
81ecdfbb
RW
20090 *) as_fn_append ac_config_targets " $1"
20091 ac_need_defaults=false ;;
c906108c 20092
bec39cab
AC
20093 esac
20094 shift
20095done
c906108c 20096
bec39cab 20097ac_configure_extra_args=
c906108c 20098
bec39cab
AC
20099if $ac_cs_silent; then
20100 exec 6>/dev/null
20101 ac_configure_extra_args="$ac_configure_extra_args --silent"
20102fi
c906108c 20103
bec39cab 20104_ACEOF
81ecdfbb 20105cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 20106if \$ac_cs_recheck; then
d0ac1c44 20107 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
20108 shift
20109 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20110 CONFIG_SHELL='$SHELL'
20111 export CONFIG_SHELL
20112 exec "\$@"
bec39cab
AC
20113fi
20114
20115_ACEOF
81ecdfbb
RW
20116cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20117exec 5>>config.log
20118{
20119 echo
20120 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20121## Running $as_me. ##
20122_ASBOX
20123 $as_echo "$ac_log"
20124} >&5
bec39cab 20125
81ecdfbb
RW
20126_ACEOF
20127cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 20128#
81ecdfbb 20129# INIT-COMMANDS
c906108c 20130#
a417dc56 20131ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 20132GDB_NM_FILE=$GDB_NM_FILE
b4e70030 20133
bec39cab
AC
20134_ACEOF
20135
81ecdfbb 20136cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 20137
81ecdfbb 20138# Handling of arguments.
bec39cab 20139for ac_config_target in $ac_config_targets
c906108c 20140do
81ecdfbb
RW
20141 case $ac_config_target in
20142 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20143 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 20144 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 20145 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 20146 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 20147 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 20148 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 20149 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 20150 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 20151 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 20152
d0ac1c44 20153 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
20154 esac
20155done
20156
81ecdfbb 20157
bec39cab
AC
20158# If the user did not use the arguments to specify the items to instantiate,
20159# then the envvar interface is used. Set only those that are not.
20160# We use the long form for the default assignment because of an extremely
20161# bizarre bug on SunOS 4.1.3.
20162if $ac_need_defaults; then
20163 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20164 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20165 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20166 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20167fi
20168
b4e70030 20169# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 20170# simply because there is no reason against having it here, and in addition,
b4e70030 20171# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
20172# Hook for its removal unless debugging.
20173# Note that there is a small window in which the directory will not be cleaned:
20174# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
20175$debug ||
20176{
d0ac1c44 20177 tmp= ac_tmp=
81ecdfbb 20178 trap 'exit_status=$?
d0ac1c44
SM
20179 : "${ac_tmp:=$tmp}"
20180 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
20181' 0
20182 trap 'as_fn_exit 1' 1 2 13 15
20183}
20184# Create a (secure) tmp directory for tmp files.
20185
20186{
20187 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 20188 test -d "$tmp"
81ecdfbb
RW
20189} ||
20190{
20191 tmp=./conf$$-$RANDOM
20192 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
20193} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20194ac_tmp=$tmp
81ecdfbb
RW
20195
20196# Set up the scripts for CONFIG_FILES section.
20197# No need to generate them if there are no CONFIG_FILES.
20198# This happens for instance with `./config.status config.h'.
20199if test -n "$CONFIG_FILES"; then
20200
20201if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20202 ac_cs_awk_getline=:
20203 ac_cs_awk_pipe_init=
20204 ac_cs_awk_read_file='
20205 while ((getline aline < (F[key])) > 0)
20206 print(aline)
20207 close(F[key])'
20208 ac_cs_awk_pipe_fini=
20209else
20210 ac_cs_awk_getline=false
20211 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20212 ac_cs_awk_read_file='
20213 print "|#_!!_#|"
20214 print "cat " F[key] " &&"
20215 '$ac_cs_awk_pipe_init
20216 # The final `:' finishes the AND list.
20217 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20218fi
20219ac_cr=`echo X | tr X '\015'`
20220# On cygwin, bash can eat \r inside `` if the user requested igncr.
20221# But we know of no other shell where ac_cr would be empty at this
20222# point, so we can use a bashism as a fallback.
20223if test "x$ac_cr" = x; then
20224 eval ac_cr=\$\'\\r\'
20225fi
20226ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20227if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 20228 ac_cs_awk_cr='\\r'
81ecdfbb
RW
20229else
20230 ac_cs_awk_cr=$ac_cr
20231fi
20232
d0ac1c44 20233echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
20234_ACEOF
20235
20236# Create commands to substitute file output variables.
20237{
20238 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 20239 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
20240 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20241 echo "_ACAWK" &&
20242 echo "_ACEOF"
20243} >conf$$files.sh &&
20244. ./conf$$files.sh ||
d0ac1c44 20245 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20246rm -f conf$$files.sh
20247
20248{
20249 echo "cat >conf$$subs.awk <<_ACEOF" &&
20250 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20251 echo "_ACEOF"
20252} >conf$$subs.sh ||
d0ac1c44
SM
20253 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20254ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
20255ac_delim='%!_!# '
20256for ac_last_try in false false false false false :; do
20257 . ./conf$$subs.sh ||
d0ac1c44 20258 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20259
20260 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20261 if test $ac_delim_n = $ac_delim_num; then
20262 break
20263 elif $ac_last_try; then
d0ac1c44 20264 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20265 else
20266 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20267 fi
20268done
20269rm -f conf$$subs.sh
20270
20271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20272cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
20273_ACEOF
20274sed -n '
20275h
20276s/^/S["/; s/!.*/"]=/
20277p
20278g
20279s/^[^!]*!//
20280:repl
20281t repl
20282s/'"$ac_delim"'$//
20283t delim
20284:nl
20285h
d0ac1c44 20286s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20287t more1
20288s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20289p
20290n
20291b repl
20292:more1
20293s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20294p
20295g
20296s/.\{148\}//
20297t nl
20298:delim
20299h
d0ac1c44 20300s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20301t more2
20302s/["\\]/\\&/g; s/^/"/; s/$/"/
20303p
20304b
20305:more2
20306s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20307p
20308g
20309s/.\{148\}//
20310t delim
20311' <conf$$subs.awk | sed '
20312/^[^""]/{
20313 N
20314 s/\n//
20315}
20316' >>$CONFIG_STATUS || ac_write_fail=1
20317rm -f conf$$subs.awk
20318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20319_ACAWK
d0ac1c44 20320cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
20321 for (key in S) S_is_set[key] = 1
20322 FS = "\a"
20323 \$ac_cs_awk_pipe_init
20324}
20325{
20326 line = $ 0
20327 nfields = split(line, field, "@")
20328 substed = 0
20329 len = length(field[1])
20330 for (i = 2; i < nfields; i++) {
20331 key = field[i]
20332 keylen = length(key)
20333 if (S_is_set[key]) {
20334 value = S[key]
20335 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20336 len += length(value) + length(field[++i])
20337 substed = 1
20338 } else
20339 len += 1 + keylen
20340 }
20341 if (nfields == 3 && !substed) {
20342 key = field[2]
20343 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20344 \$ac_cs_awk_read_file
20345 next
20346 }
20347 }
20348 print line
b4e70030 20349}
81ecdfbb
RW
20350\$ac_cs_awk_pipe_fini
20351_ACAWK
20352_ACEOF
20353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20354if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20355 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20356else
20357 cat
d0ac1c44
SM
20358fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20359 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
20360_ACEOF
20361
d0ac1c44
SM
20362# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20363# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
20364# trailing colons and then remove the whole line if VPATH becomes empty
20365# (actually we leave an empty line to preserve line numbers).
20366if test "x$srcdir" = x.; then
d0ac1c44
SM
20367 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20368h
20369s///
20370s/^/:/
20371s/[ ]*$/:/
20372s/:\$(srcdir):/:/g
20373s/:\${srcdir}:/:/g
20374s/:@srcdir@:/:/g
20375s/^:*//
81ecdfbb 20376s/:*$//
d0ac1c44
SM
20377x
20378s/\(=[ ]*\).*/\1/
20379G
20380s/\n//
81ecdfbb
RW
20381s/^[^=]*=[ ]*$//
20382}'
20383fi
20384
20385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20386fi # test -n "$CONFIG_FILES"
20387
20388# Set up the scripts for CONFIG_HEADERS section.
20389# No need to generate them if there are no CONFIG_HEADERS.
20390# This happens for instance with `./config.status Makefile'.
20391if test -n "$CONFIG_HEADERS"; then
d0ac1c44 20392cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
20393BEGIN {
20394_ACEOF
20395
20396# Transform confdefs.h into an awk script `defines.awk', embedded as
20397# here-document in config.status, that substitutes the proper values into
20398# config.h.in to produce config.h.
4e8d927d 20399
81ecdfbb
RW
20400# Create a delimiter string that does not exist in confdefs.h, to ease
20401# handling of long lines.
20402ac_delim='%!_!# '
20403for ac_last_try in false false :; do
d0ac1c44
SM
20404 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20405 if test -z "$ac_tt"; then
81ecdfbb
RW
20406 break
20407 elif $ac_last_try; then
d0ac1c44 20408 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
20409 else
20410 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20411 fi
20412done
4e8d927d 20413
81ecdfbb
RW
20414# For the awk script, D is an array of macro values keyed by name,
20415# likewise P contains macro parameters if any. Preserve backslash
20416# newline sequences.
20417
20418ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20419sed -n '
20420s/.\{148\}/&'"$ac_delim"'/g
20421t rset
20422:rset
20423s/^[ ]*#[ ]*define[ ][ ]*/ /
20424t def
20425d
20426:def
20427s/\\$//
20428t bsnl
20429s/["\\]/\\&/g
20430s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20431D["\1"]=" \3"/p
20432s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20433d
20434:bsnl
20435s/["\\]/\\&/g
20436s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20437D["\1"]=" \3\\\\\\n"\\/p
20438t cont
20439s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20440t cont
20441d
20442:cont
20443n
20444s/.\{148\}/&'"$ac_delim"'/g
20445t clear
20446:clear
20447s/\\$//
20448t bsnlc
20449s/["\\]/\\&/g; s/^/"/; s/$/"/p
20450d
20451:bsnlc
20452s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20453b cont
20454' <confdefs.h | sed '
20455s/'"$ac_delim"'/"\\\
20456"/g' >>$CONFIG_STATUS || ac_write_fail=1
20457
20458cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20459 for (key in D) D_is_set[key] = 1
20460 FS = "\a"
20461}
20462/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20463 line = \$ 0
20464 split(line, arg, " ")
20465 if (arg[1] == "#") {
20466 defundef = arg[2]
20467 mac1 = arg[3]
20468 } else {
20469 defundef = substr(arg[1], 2)
20470 mac1 = arg[2]
20471 }
20472 split(mac1, mac2, "(") #)
20473 macro = mac2[1]
20474 prefix = substr(line, 1, index(line, defundef) - 1)
20475 if (D_is_set[macro]) {
20476 # Preserve the white space surrounding the "#".
20477 print prefix "define", macro P[macro] D[macro]
20478 next
20479 } else {
20480 # Replace #undef with comments. This is necessary, for example,
20481 # in the case of _POSIX_SOURCE, which is predefined and required
20482 # on some systems where configure will not decide to define it.
20483 if (defundef == "undef") {
20484 print "/*", prefix defundef, macro, "*/"
20485 next
20486 }
20487 }
b4e70030 20488}
81ecdfbb
RW
20489{ print }
20490_ACAWK
b4e70030 20491_ACEOF
81ecdfbb 20492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20493 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20494fi # test -n "$CONFIG_HEADERS"
4e8d927d 20495
4e8d927d 20496
81ecdfbb
RW
20497eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20498shift
20499for ac_tag
20500do
20501 case $ac_tag in
20502 :[FHLC]) ac_mode=$ac_tag; continue;;
20503 esac
20504 case $ac_mode$ac_tag in
20505 :[FHL]*:*);;
d0ac1c44 20506 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20507 :[FH]-) ac_tag=-:-;;
20508 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20509 esac
20510 ac_save_IFS=$IFS
20511 IFS=:
20512 set x $ac_tag
20513 IFS=$ac_save_IFS
20514 shift
20515 ac_file=$1
20516 shift
4e8d927d 20517
81ecdfbb
RW
20518 case $ac_mode in
20519 :L) ac_source=$1;;
20520 :[FH])
20521 ac_file_inputs=
20522 for ac_f
20523 do
20524 case $ac_f in
d0ac1c44 20525 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20526 *) # Look for the file first in the build tree, then in the source tree
20527 # (if the path is not absolute). The absolute path cannot be DOS-style,
20528 # because $ac_f cannot contain `:'.
20529 test -f "$ac_f" ||
20530 case $ac_f in
20531 [\\/$]*) false;;
20532 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20533 esac ||
d0ac1c44 20534 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20535 esac
20536 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20537 as_fn_append ac_file_inputs " '$ac_f'"
20538 done
20539
20540 # Let's still pretend it is `configure' which instantiates (i.e., don't
20541 # use $as_me), people would be surprised to read:
20542 # /* config.h. Generated by config.status. */
20543 configure_input='Generated from '`
20544 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20545 `' by configure.'
20546 if test x"$ac_file" != x-; then
20547 configure_input="$ac_file. $configure_input"
20548 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20549$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20550 fi
81ecdfbb
RW
20551 # Neutralize special characters interpreted by sed in replacement strings.
20552 case $configure_input in #(
20553 *\&* | *\|* | *\\* )
20554 ac_sed_conf_input=`$as_echo "$configure_input" |
20555 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20556 *) ac_sed_conf_input=$configure_input;;
20557 esac
4e8d927d 20558
81ecdfbb 20559 case $ac_tag in
d0ac1c44
SM
20560 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20561 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20562 esac
20563 ;;
c906108c
SS
20564 esac
20565
81ecdfbb 20566 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20567$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20568 X"$ac_file" : 'X\(//\)[^/]' \| \
20569 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20570 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20571$as_echo X"$ac_file" |
20572 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20573 s//\1/
20574 q
20575 }
20576 /^X\(\/\/\)[^/].*/{
20577 s//\1/
20578 q
20579 }
20580 /^X\(\/\/\)$/{
20581 s//\1/
20582 q
20583 }
20584 /^X\(\/\).*/{
20585 s//\1/
20586 q
20587 }
20588 s/.*/./; q'`
20589 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20590 ac_builddir=.
20591
81ecdfbb
RW
20592case "$ac_dir" in
20593.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20594*)
20595 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20596 # A ".." for each directory in $ac_dir_suffix.
20597 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20598 case $ac_top_builddir_sub in
20599 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20600 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20601 esac ;;
20602esac
20603ac_abs_top_builddir=$ac_pwd
20604ac_abs_builddir=$ac_pwd$ac_dir_suffix
20605# for backward compatibility:
20606ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20607
20608case $srcdir in
81ecdfbb 20609 .) # We are building in place.
bec39cab 20610 ac_srcdir=.
81ecdfbb
RW
20611 ac_top_srcdir=$ac_top_builddir_sub
20612 ac_abs_top_srcdir=$ac_pwd ;;
20613 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20614 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20615 ac_top_srcdir=$srcdir
20616 ac_abs_top_srcdir=$srcdir ;;
20617 *) # Relative name.
20618 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20619 ac_top_srcdir=$ac_top_build_prefix$srcdir
20620 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20621esac
81ecdfbb 20622ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20623
c906108c 20624
81ecdfbb
RW
20625 case $ac_mode in
20626 :F)
20627 #
20628 # CONFIG_FILE
20629 #
c906108c 20630
bec39cab
AC
20631 case $INSTALL in
20632 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20633 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20634 esac
81ecdfbb 20635_ACEOF
121ce6e5 20636
81ecdfbb
RW
20637cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20638# If the template does not know about datarootdir, expand it.
20639# FIXME: This hack should be removed a few years after 2.60.
20640ac_datarootdir_hack=; ac_datarootdir_seen=
20641ac_sed_dataroot='
20642/datarootdir/ {
20643 p
20644 q
20645}
20646/@datadir@/p
20647/@docdir@/p
20648/@infodir@/p
20649/@localedir@/p
20650/@mandir@/p'
20651case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20652*datarootdir*) ac_datarootdir_seen=yes;;
20653*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20655$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20656_ACEOF
20657cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20658 ac_datarootdir_hack='
20659 s&@datadir@&$datadir&g
20660 s&@docdir@&$docdir&g
20661 s&@infodir@&$infodir&g
20662 s&@localedir@&$localedir&g
20663 s&@mandir@&$mandir&g
20664 s&\\\${datarootdir}&$datarootdir&g' ;;
20665esac
4e8d927d 20666_ACEOF
81ecdfbb
RW
20667
20668# Neutralize VPATH when `$srcdir' = `.'.
20669# Shell code in configure.ac might set extrasub.
20670# FIXME: do we really want to maintain this feature?
20671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20672ac_sed_extra="$ac_vpsub
bec39cab
AC
20673$extrasub
20674_ACEOF
81ecdfbb 20675cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20676:t
20677/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20678s|@configure_input@|$ac_sed_conf_input|;t t
20679s&@top_builddir@&$ac_top_builddir_sub&;t t
20680s&@top_build_prefix@&$ac_top_build_prefix&;t t
20681s&@srcdir@&$ac_srcdir&;t t
20682s&@abs_srcdir@&$ac_abs_srcdir&;t t
20683s&@top_srcdir@&$ac_top_srcdir&;t t
20684s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20685s&@builddir@&$ac_builddir&;t t
20686s&@abs_builddir@&$ac_abs_builddir&;t t
20687s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20688s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20689$ac_datarootdir_hack
20690"
20691eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20692if $ac_cs_awk_getline; then
d0ac1c44 20693 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20694else
d0ac1c44
SM
20695 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20696fi \
20697 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20698
20699test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20700 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20701 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20702 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20704which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20705$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20706which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20707
d0ac1c44 20708 rm -f "$ac_tmp/stdin"
bec39cab 20709 case $ac_file in
d0ac1c44
SM
20710 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20711 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20712 esac \
d0ac1c44 20713 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20714 ;;
20715 :H)
20716 #
20717 # CONFIG_HEADER
20718 #
bec39cab 20719 if test x"$ac_file" != x-; then
81ecdfbb
RW
20720 {
20721 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20722 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20723 } >"$ac_tmp/config.h" \
20724 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20725 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20726 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20727$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20728 else
81ecdfbb 20729 rm -f "$ac_file"
d0ac1c44
SM
20730 mv "$ac_tmp/config.h" "$ac_file" \
20731 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20732 fi
20733 else
81ecdfbb 20734 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20735 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20736 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20737 fi
81ecdfbb
RW
20738 ;;
20739 :L)
20740 #
20741 # CONFIG_LINK
20742 #
c906108c 20743
81ecdfbb
RW
20744 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20745 :
b4e70030 20746 else
81ecdfbb
RW
20747 # Prefer the file from the source tree if names are identical.
20748 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20749 ac_source=$srcdir/$ac_source
20750 fi
b4e70030 20751
81ecdfbb
RW
20752 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20753$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20754
81ecdfbb 20755 if test ! -r "$ac_source"; then
d0ac1c44 20756 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20757 fi
20758 rm -f "$ac_file"
bec39cab 20759
81ecdfbb 20760 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20761 case $ac_source in
81ecdfbb
RW
20762 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20763 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20764 esac
20765 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20766 ln "$ac_source" "$ac_file" 2>/dev/null ||
20767 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20768 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20769 fi
20770 ;;
20771 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20772$as_echo "$as_me: executing $ac_file commands" >&6;}
20773 ;;
c906108c 20774 esac
b4e70030 20775
bec39cab 20776
81ecdfbb 20777 case $ac_file$ac_mode in
c5adaa19 20778 "config.h":H) echo > stamp-h ;;
81ecdfbb 20779 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20780 "nm.h":L) echo > stamp-nmh ;;
b292c783 20781 "gcore":F) chmod +x gcore ;;
81ecdfbb 20782
bec39cab 20783 esac
81ecdfbb 20784done # for ac_tag
c906108c 20785
bec39cab 20786
81ecdfbb 20787as_fn_exit 0
bec39cab 20788_ACEOF
bec39cab
AC
20789ac_clean_files=$ac_clean_files_save
20790
81ecdfbb 20791test $ac_write_fail = 0 ||
d0ac1c44 20792 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20793
bec39cab
AC
20794
20795# configure is writing to config.log, and then calls config.status.
20796# config.status does its own redirection, appending to config.log.
20797# Unfortunately, on DOS this fails, as config.log is still kept open
20798# by configure, so config.status won't be able to write to it; its
20799# output is simply discarded. So we exec the FD to /dev/null,
20800# effectively closing config.log, so it can be properly (re)opened and
20801# appended to by config.status. When coming back to configure, we
20802# need to make the FD available again.
20803if test "$no_create" != yes; then
20804 ac_cs_success=:
20805 ac_config_status_args=
20806 test "$silent" = yes &&
20807 ac_config_status_args="$ac_config_status_args --quiet"
20808 exec 5>/dev/null
20809 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20810 exec 5>>config.log
20811 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20812 # would make configure fail if this is the last instruction.
d0ac1c44 20813 $ac_cs_success || as_fn_exit 1
bec39cab 20814fi
c906108c 20815
bec39cab 20816#
81ecdfbb 20817# CONFIG_SUBDIRS section.
bec39cab 20818#
c906108c
SS
20819if test "$no_recursion" != yes; then
20820
81ecdfbb
RW
20821 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20822 # so they do not pile up.
c906108c
SS
20823 ac_sub_configure_args=
20824 ac_prev=
fdc59709
PB
20825 eval "set x $ac_configure_args"
20826 shift
20827 for ac_arg
20828 do
c906108c
SS
20829 if test -n "$ac_prev"; then
20830 ac_prev=
20831 continue
20832 fi
bec39cab 20833 case $ac_arg in
c906108c
SS
20834 -cache-file | --cache-file | --cache-fil | --cache-fi \
20835 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20836 ac_prev=cache_file ;;
20837 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20838 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20839 | --c=*)
20840 ;;
20841 --config-cache | -C)
c906108c
SS
20842 ;;
20843 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20844 ac_prev=srcdir ;;
20845 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20846 ;;
bec39cab
AC
20847 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20848 ac_prev=prefix ;;
20849 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20850 ;;
81ecdfbb
RW
20851 --disable-option-checking)
20852 ;;
fdc59709
PB
20853 *)
20854 case $ac_arg in
81ecdfbb 20855 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20856 esac
81ecdfbb 20857 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20858 esac
20859 done
20860
bec39cab
AC
20861 # Always prepend --prefix to ensure using the same prefix
20862 # in subdir configurations.
fdc59709
PB
20863 ac_arg="--prefix=$prefix"
20864 case $ac_arg in
81ecdfbb 20865 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20866 esac
81ecdfbb
RW
20867 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20868
20869 # Pass --silent
20870 if test "$silent" = yes; then
20871 ac_sub_configure_args="--silent $ac_sub_configure_args"
20872 fi
20873
20874 # Always prepend --disable-option-checking to silence warnings, since
20875 # different subdirs can have different --enable and --with options.
20876 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20877
b4e70030 20878 ac_popdir=`pwd`
bec39cab 20879 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20880
20881 # Do not complain, so a configure script can configure whichever
20882 # parts of a large source tree are present.
fdc59709 20883 test -d "$srcdir/$ac_dir" || continue
c906108c 20884
81ecdfbb
RW
20885 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20886 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20887 $as_echo "$ac_msg" >&6
20888 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20889 ac_builddir=.
20890
81ecdfbb
RW
20891case "$ac_dir" in
20892.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20893*)
20894 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20895 # A ".." for each directory in $ac_dir_suffix.
20896 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20897 case $ac_top_builddir_sub in
20898 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20899 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20900 esac ;;
20901esac
20902ac_abs_top_builddir=$ac_pwd
20903ac_abs_builddir=$ac_pwd$ac_dir_suffix
20904# for backward compatibility:
20905ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20906
20907case $srcdir in
81ecdfbb 20908 .) # We are building in place.
bec39cab 20909 ac_srcdir=.
81ecdfbb
RW
20910 ac_top_srcdir=$ac_top_builddir_sub
20911 ac_abs_top_srcdir=$ac_pwd ;;
20912 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20913 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20914 ac_top_srcdir=$srcdir
20915 ac_abs_top_srcdir=$srcdir ;;
20916 *) # Relative name.
20917 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20918 ac_top_srcdir=$ac_top_build_prefix$srcdir
20919 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20920esac
81ecdfbb 20921ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20922
c906108c 20923
fdc59709 20924 cd "$ac_dir"
c906108c
SS
20925
20926 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20927 if test -f "$ac_srcdir/configure.gnu"; then
20928 ac_sub_configure=$ac_srcdir/configure.gnu
20929 elif test -f "$ac_srcdir/configure"; then
20930 ac_sub_configure=$ac_srcdir/configure
20931 elif test -f "$ac_srcdir/configure.in"; then
20932 # This should be Cygnus configure.
20933 ac_sub_configure=$ac_aux_dir/configure
c906108c 20934 else
81ecdfbb
RW
20935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20936$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20937 ac_sub_configure=
20938 fi
20939
20940 # The recursion is here.
20941 if test -n "$ac_sub_configure"; then
c906108c 20942 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20943 case $cache_file in
20944 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20945 *) # Relative name.
20946 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20947 esac
c906108c 20948
81ecdfbb
RW
20949 { $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
20950$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20951 # The eval makes quoting arguments work.
fdc59709
PB
20952 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20953 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20954 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20955 fi
20956
fdc59709 20957 cd "$ac_popdir"
c906108c
SS
20958 done
20959fi
81ecdfbb
RW
20960if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20962$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20963fi
c906108c 20964
This page took 3.639508 seconds and 4 git commands to generate.