gdbserver: modernize configure.ac
[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
2989ac_config_headers="$ac_config_headers config.h:config.in"
2990
2991
2992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2993$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2994 # Check whether --enable-maintainer-mode was given.
2995if test "${enable_maintainer_mode+set}" = set; then :
2996 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2997else
2998 USE_MAINTAINER_MODE=no
2999fi
3000
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3002$as_echo "$USE_MAINTAINER_MODE" >&6; }
3003 if test $USE_MAINTAINER_MODE = yes; then
3004 MAINTAINER_MODE_TRUE=
3005 MAINTAINER_MODE_FALSE='#'
3006else
3007 MAINTAINER_MODE_TRUE='#'
3008 MAINTAINER_MODE_FALSE=
3009fi
3010
3011 MAINT=$MAINTAINER_MODE_TRUE
3012
3013
3014
3015ac_ext=c
3016ac_cpp='$CPP $CPPFLAGS'
3017ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3018ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3019ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020if test -n "$ac_tool_prefix"; then
3021 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3022set dummy ${ac_tool_prefix}gcc; ac_word=$2
3023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3024$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3025if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3026 $as_echo_n "(cached) " >&6
c906108c
SS
3027else
3028 if test -n "$CC"; then
3029 ac_cv_prog_CC="$CC" # Let the user override the test.
3030else
bec39cab
AC
3031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3032for as_dir in $PATH
3033do
3034 IFS=$as_save_IFS
3035 test -z "$as_dir" && as_dir=.
81ecdfbb 3036 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3038 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3040 break 2
3041 fi
3042done
81ecdfbb
RW
3043 done
3044IFS=$as_save_IFS
bec39cab 3045
c906108c
SS
3046fi
3047fi
bec39cab 3048CC=$ac_cv_prog_CC
c906108c 3049if test -n "$CC"; then
81ecdfbb
RW
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3051$as_echo "$CC" >&6; }
c906108c 3052else
81ecdfbb
RW
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3054$as_echo "no" >&6; }
c906108c
SS
3055fi
3056
81ecdfbb 3057
b4e70030
JB
3058fi
3059if test -z "$ac_cv_prog_CC"; then
3060 ac_ct_CC=$CC
81ecdfbb
RW
3061 # Extract the first word of "gcc", so it can be a program name with args.
3062set dummy gcc; ac_word=$2
3063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3064$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3065if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3066 $as_echo_n "(cached) " >&6
b4e70030
JB
3067else
3068 if test -n "$ac_ct_CC"; then
3069 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3070else
3071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3072for as_dir in $PATH
3073do
3074 IFS=$as_save_IFS
3075 test -z "$as_dir" && as_dir=.
81ecdfbb 3076 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3078 ac_cv_prog_ac_ct_CC="gcc"
3079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b4e70030 3080 break 2
4e8d927d 3081 fi
b4e70030 3082done
81ecdfbb
RW
3083 done
3084IFS=$as_save_IFS
b4e70030
JB
3085
3086fi
3087fi
3088ac_ct_CC=$ac_cv_prog_ac_ct_CC
3089if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3091$as_echo "$ac_ct_CC" >&6; }
b4e70030 3092else
81ecdfbb
RW
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094$as_echo "no" >&6; }
b4e70030
JB
3095fi
3096
81ecdfbb
RW
3097 if test "x$ac_ct_CC" = x; then
3098 CC=""
3099 else
3100 case $cross_compiling:$ac_tool_warned in
3101yes:)
3102{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3103$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3104ac_tool_warned=yes ;;
3105esac
3106 CC=$ac_ct_CC
3107 fi
b4e70030
JB
3108else
3109 CC="$ac_cv_prog_CC"
3110fi
3111
c906108c 3112if test -z "$CC"; then
81ecdfbb
RW
3113 if test -n "$ac_tool_prefix"; then
3114 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3115set dummy ${ac_tool_prefix}cc; ac_word=$2
3116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3117$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3118if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3119 $as_echo_n "(cached) " >&6
c906108c
SS
3120else
3121 if test -n "$CC"; then
3122 ac_cv_prog_CC="$CC" # Let the user override the test.
3123else
bec39cab
AC
3124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125for as_dir in $PATH
3126do
3127 IFS=$as_save_IFS
3128 test -z "$as_dir" && as_dir=.
81ecdfbb 3129 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3131 ac_cv_prog_CC="${ac_tool_prefix}cc"
3132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3133 break 2
3134 fi
3135done
81ecdfbb
RW
3136 done
3137IFS=$as_save_IFS
3138
3139fi
3140fi
3141CC=$ac_cv_prog_CC
3142if test -n "$CC"; then
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3144$as_echo "$CC" >&6; }
3145else
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3147$as_echo "no" >&6; }
3148fi
3149
3150
3151 fi
3152fi
3153if test -z "$CC"; then
3154 # Extract the first word of "cc", so it can be a program name with args.
3155set dummy cc; ac_word=$2
3156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3157$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3158if ${ac_cv_prog_CC+:} false; then :
81ecdfbb
RW
3159 $as_echo_n "(cached) " >&6
3160else
3161 if test -n "$CC"; then
3162 ac_cv_prog_CC="$CC" # Let the user override the test.
3163else
3164 ac_prog_rejected=no
3165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3166for as_dir in $PATH
3167do
3168 IFS=$as_save_IFS
3169 test -z "$as_dir" && as_dir=.
3170 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81ecdfbb
RW
3172 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3173 ac_prog_rejected=yes
3174 continue
3175 fi
3176 ac_cv_prog_CC="cc"
3177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3178 break 2
3179 fi
3180done
3181 done
3182IFS=$as_save_IFS
bec39cab 3183
c906108c
SS
3184if test $ac_prog_rejected = yes; then
3185 # We found a bogon in the path, so make sure we never use it.
3186 set dummy $ac_cv_prog_CC
3187 shift
bec39cab 3188 if test $# != 0; then
c906108c
SS
3189 # We chose a different compiler from the bogus one.
3190 # However, it has the same basename, so the bogon will be chosen
3191 # first if we set CC to just the basename; use the full file name.
3192 shift
bec39cab 3193 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
3194 fi
3195fi
3196fi
3197fi
bec39cab 3198CC=$ac_cv_prog_CC
c906108c 3199if test -n "$CC"; then
81ecdfbb
RW
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3201$as_echo "$CC" >&6; }
c906108c 3202else
81ecdfbb
RW
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3204$as_echo "no" >&6; }
c906108c
SS
3205fi
3206
81ecdfbb 3207
bec39cab
AC
3208fi
3209if test -z "$CC"; then
3210 if test -n "$ac_tool_prefix"; then
81ecdfbb 3211 for ac_prog in cl.exe
bec39cab
AC
3212 do
3213 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3214set dummy $ac_tool_prefix$ac_prog; ac_word=$2
81ecdfbb
RW
3215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3216$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3217if ${ac_cv_prog_CC+:} false; then :
81ecdfbb 3218 $as_echo_n "(cached) " >&6
c906108c
SS
3219else
3220 if test -n "$CC"; then
3221 ac_cv_prog_CC="$CC" # Let the user override the test.
3222else
bec39cab
AC
3223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224for as_dir in $PATH
3225do
3226 IFS=$as_save_IFS
3227 test -z "$as_dir" && as_dir=.
81ecdfbb 3228 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3229 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3230 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
81ecdfbb 3231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
3232 break 2
3233 fi
3234done
81ecdfbb
RW
3235 done
3236IFS=$as_save_IFS
bec39cab 3237
c906108c
SS
3238fi
3239fi
bec39cab 3240CC=$ac_cv_prog_CC
c906108c 3241if test -n "$CC"; then
81ecdfbb
RW
3242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3243$as_echo "$CC" >&6; }
c906108c 3244else
81ecdfbb
RW
3245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3246$as_echo "no" >&6; }
c906108c 3247fi
bec39cab 3248
81ecdfbb 3249
bec39cab
AC
3250 test -n "$CC" && break
3251 done
3252fi
3253if test -z "$CC"; then
3254 ac_ct_CC=$CC
81ecdfbb 3255 for ac_prog in cl.exe
bec39cab
AC
3256do
3257 # Extract the first word of "$ac_prog", so it can be a program name with args.
3258set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
3259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3261if ${ac_cv_prog_ac_ct_CC+:} false; then :
81ecdfbb 3262 $as_echo_n "(cached) " >&6
bec39cab
AC
3263else
3264 if test -n "$ac_ct_CC"; then
3265 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3266else
3267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
81ecdfbb 3272 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3273 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 3274 ac_cv_prog_ac_ct_CC="$ac_prog"
81ecdfbb 3275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab 3276 break 2
c906108c 3277 fi
bec39cab 3278done
81ecdfbb
RW
3279 done
3280IFS=$as_save_IFS
bec39cab
AC
3281
3282fi
3283fi
3284ac_ct_CC=$ac_cv_prog_ac_ct_CC
3285if test -n "$ac_ct_CC"; then
81ecdfbb
RW
3286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3287$as_echo "$ac_ct_CC" >&6; }
bec39cab 3288else
81ecdfbb
RW
3289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290$as_echo "no" >&6; }
c906108c
SS
3291fi
3292
81ecdfbb 3293
bec39cab
AC
3294 test -n "$ac_ct_CC" && break
3295done
c906108c 3296
81ecdfbb
RW
3297 if test "x$ac_ct_CC" = x; then
3298 CC=""
3299 else
3300 case $cross_compiling:$ac_tool_warned in
3301yes:)
3302{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3303$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3304ac_tool_warned=yes ;;
3305esac
3306 CC=$ac_ct_CC
3307 fi
bec39cab
AC
3308fi
3309
3310fi
3311
3312
81ecdfbb
RW
3313test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3315as_fn_error $? "no acceptable C compiler found in \$PATH
3316See \`config.log' for more details" "$LINENO" 5; }
bec39cab
AC
3317
3318# Provide some information about the compiler.
81ecdfbb
RW
3319$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3320set X $ac_compile
3321ac_compiler=$2
3322for ac_option in --version -v -V -qversion; do
3323 { { ac_try="$ac_compiler $ac_option >&5"
3324case "(($ac_try" in
3325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3326 *) ac_try_echo=$ac_try;;
3327esac
3328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3329$as_echo "$ac_try_echo"; } >&5
3330 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bec39cab 3331 ac_status=$?
81ecdfbb
RW
3332 if test -s conftest.err; then
3333 sed '10a\
3334... rest of stderr output deleted ...
3335 10q' conftest.err >conftest.er1
3336 cat conftest.er1 >&5
81ecdfbb 3337 fi
d0ac1c44 3338 rm -f conftest.er1 conftest.err
81ecdfbb
RW
3339 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3340 test $ac_status = 0; }
3341done
bec39cab 3342
81ecdfbb 3343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3344/* end confdefs.h. */
3345
3346int
3347main ()
3348{
3349
3350 ;
3351 return 0;
3352}
3353_ACEOF
3354ac_clean_files_save=$ac_clean_files
d0ac1c44 3355ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
bec39cab
AC
3356# Try to create an executable without -o first, disregard a.out.
3357# It will help us diagnose broken compilers, and finding out an intuition
3358# of exeext.
d0ac1c44
SM
3359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3360$as_echo_n "checking whether the C compiler works... " >&6; }
81ecdfbb
RW
3361ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3362
3363# The possible output files:
3364ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3365
3366ac_rmfiles=
3367for ac_file in $ac_files
3368do
3369 case $ac_file in
3370 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3371 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3372 esac
3373done
3374rm -f $ac_rmfiles
3375
3376if { { ac_try="$ac_link_default"
3377case "(($ac_try" in
3378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3379 *) ac_try_echo=$ac_try;;
3380esac
3381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3382$as_echo "$ac_try_echo"; } >&5
3383 (eval "$ac_link_default") 2>&5
3384 ac_status=$?
3385 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3386 test $ac_status = 0; }; then :
3387 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3388# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3389# in a Makefile. We should not override ac_cv_exeext if it was cached,
3390# so that the user can short-circuit this test for compilers unknown to
3391# Autoconf.
3392for ac_file in $ac_files ''
bec39cab
AC
3393do
3394 test -f "$ac_file" || continue
3395 case $ac_file in
81ecdfbb 3396 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
b4e70030
JB
3397 ;;
3398 [ab].out )
3399 # We found the default executable, but exeext='' is most
3400 # certainly right.
3401 break;;
3402 *.* )
81ecdfbb
RW
3403 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3404 then :; else
3405 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3406 fi
3407 # We set ac_cv_exeext here because the later test for it is not
3408 # safe: cross compilers may not add the suffix if given an `-o'
3409 # argument, so we may need to know it at that point already.
3410 # Even if this section looks crufty: it has the advantage of
3411 # actually working.
b4e70030
JB
3412 break;;
3413 * )
3414 break;;
bec39cab
AC
3415 esac
3416done
81ecdfbb
RW
3417test "$ac_cv_exeext" = no && ac_cv_exeext=
3418
bec39cab 3419else
81ecdfbb
RW
3420 ac_file=''
3421fi
81ecdfbb 3422if test -z "$ac_file"; then :
d0ac1c44
SM
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3424$as_echo "no" >&6; }
3425$as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3426sed 's/^/| /' conftest.$ac_ext >&5
3427
81ecdfbb
RW
3428{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3430as_fn_error 77 "C compiler cannot create executables
3431See \`config.log' for more details" "$LINENO" 5; }
3432else
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3434$as_echo "yes" >&6; }
bec39cab 3435fi
d0ac1c44
SM
3436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3437$as_echo_n "checking for C compiler default output file name... " >&6; }
3438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3439$as_echo "$ac_file" >&6; }
b4e70030 3440ac_exeext=$ac_cv_exeext
b4e70030 3441
d0ac1c44 3442rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
b4e70030 3443ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3445$as_echo_n "checking for suffix of executables... " >&6; }
3446if { { ac_try="$ac_link"
3447case "(($ac_try" in
3448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3449 *) ac_try_echo=$ac_try;;
3450esac
3451eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3452$as_echo "$ac_try_echo"; } >&5
3453 (eval "$ac_link") 2>&5
bec39cab 3454 ac_status=$?
81ecdfbb
RW
3455 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3456 test $ac_status = 0; }; then :
b4e70030
JB
3457 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3458# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3459# work properly (i.e., refer to `conftest.exe'), while it won't with
3460# `rm'.
3461for ac_file in conftest.exe conftest conftest.*; do
3462 test -f "$ac_file" || continue
3463 case $ac_file in
81ecdfbb 3464 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b4e70030 3465 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
b4e70030
JB
3466 break;;
3467 * ) break;;
3468 esac
3469done
c906108c 3470else
81ecdfbb
RW
3471 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3472$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3473as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3474See \`config.log' for more details" "$LINENO" 5; }
c906108c 3475fi
d0ac1c44 3476rm -f conftest conftest$ac_cv_exeext
81ecdfbb
RW
3477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3478$as_echo "$ac_cv_exeext" >&6; }
c906108c 3479
b4e70030 3480rm -f conftest.$ac_ext
bec39cab
AC
3481EXEEXT=$ac_cv_exeext
3482ac_exeext=$EXEEXT
d0ac1c44
SM
3483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3484/* end confdefs.h. */
3485#include <stdio.h>
3486int
3487main ()
3488{
3489FILE *f = fopen ("conftest.out", "w");
3490 return ferror (f) || fclose (f) != 0;
3491
3492 ;
3493 return 0;
3494}
3495_ACEOF
3496ac_clean_files="$ac_clean_files conftest.out"
3497# Check that the compiler produces executables we can run. If not, either
3498# the compiler is broken, or we cross compile.
3499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3500$as_echo_n "checking whether we are cross compiling... " >&6; }
3501if test "$cross_compiling" != yes; then
3502 { { ac_try="$ac_link"
3503case "(($ac_try" in
3504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3505 *) ac_try_echo=$ac_try;;
3506esac
3507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3508$as_echo "$ac_try_echo"; } >&5
3509 (eval "$ac_link") 2>&5
3510 ac_status=$?
3511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512 test $ac_status = 0; }
3513 if { ac_try='./conftest$ac_cv_exeext'
3514 { { case "(($ac_try" in
3515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3516 *) ac_try_echo=$ac_try;;
3517esac
3518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3519$as_echo "$ac_try_echo"; } >&5
3520 (eval "$ac_try") 2>&5
3521 ac_status=$?
3522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3523 test $ac_status = 0; }; }; then
3524 cross_compiling=no
3525 else
3526 if test "$cross_compiling" = maybe; then
3527 cross_compiling=yes
3528 else
3529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3531as_fn_error $? "cannot run C compiled programs.
3532If you meant to cross compile, use \`--host'.
3533See \`config.log' for more details" "$LINENO" 5; }
3534 fi
3535 fi
3536fi
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3538$as_echo "$cross_compiling" >&6; }
3539
3540rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3541ac_clean_files=$ac_clean_files_save
81ecdfbb
RW
3542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3543$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 3544if ${ac_cv_objext+:} false; then :
81ecdfbb 3545 $as_echo_n "(cached) " >&6
bec39cab 3546else
81ecdfbb 3547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
3548/* end confdefs.h. */
3549
3550int
3551main ()
3552{
3553
3554 ;
3555 return 0;
3556}
3557_ACEOF
3558rm -f conftest.o conftest.obj
81ecdfbb
RW
3559if { { ac_try="$ac_compile"
3560case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563esac
3564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3565$as_echo "$ac_try_echo"; } >&5
3566 (eval "$ac_compile") 2>&5
3567 ac_status=$?
3568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3569 test $ac_status = 0; }; then :
3570 for ac_file in conftest.o conftest.obj conftest.*; do
3571 test -f "$ac_file" || continue;
bec39cab 3572 case $ac_file in
81ecdfbb 3573 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
bec39cab
AC
3574 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3575 break;;
3576 esac
3577done
c906108c 3578else
81ecdfbb 3579 $as_echo "$as_me: failed program was:" >&5
bec39cab
AC
3580sed 's/^/| /' conftest.$ac_ext >&5
3581
81ecdfbb
RW
3582{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3584as_fn_error $? "cannot compute suffix of object files: cannot compile
3585See \`config.log' for more details" "$LINENO" 5; }
c906108c 3586fi
b4e70030 3587rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 3588fi
81ecdfbb
RW
3589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3590$as_echo "$ac_cv_objext" >&6; }
bec39cab
AC
3591OBJEXT=$ac_cv_objext
3592ac_objext=$OBJEXT
81ecdfbb
RW
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3594$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 3595if ${ac_cv_c_compiler_gnu+:} false; then :
81ecdfbb 3596 $as_echo_n "(cached) " >&6
c906108c 3597else
81ecdfbb 3598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3599/* end confdefs.h. */
3600
3601int
3602main ()
3603{
3604#ifndef __GNUC__
3605 choke me
3606#endif
3607
3608 ;
3609 return 0;
3610}
3611_ACEOF
81ecdfbb 3612if ac_fn_c_try_compile "$LINENO"; then :
bec39cab
AC
3613 ac_compiler_gnu=yes
3614else
81ecdfbb 3615 ac_compiler_gnu=no
bec39cab 3616fi
81ecdfbb 3617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
3618ac_cv_c_compiler_gnu=$ac_compiler_gnu
3619
3620fi
81ecdfbb
RW
3621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3622$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3623if test $ac_compiler_gnu = yes; then
3624 GCC=yes
3625else
3626 GCC=
3627fi
bec39cab
AC
3628ac_test_CFLAGS=${CFLAGS+set}
3629ac_save_CFLAGS=$CFLAGS
81ecdfbb
RW
3630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3631$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 3632if ${ac_cv_prog_cc_g+:} false; then :
81ecdfbb 3633 $as_echo_n "(cached) " >&6
bec39cab 3634else
81ecdfbb
RW
3635 ac_save_c_werror_flag=$ac_c_werror_flag
3636 ac_c_werror_flag=yes
3637 ac_cv_prog_cc_g=no
3638 CFLAGS="-g"
3639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
3640/* end confdefs.h. */
3641
3642int
3643main ()
3644{
3645
3646 ;
3647 return 0;
3648}
3649_ACEOF
81ecdfbb 3650if ac_fn_c_try_compile "$LINENO"; then :
c906108c
SS
3651 ac_cv_prog_cc_g=yes
3652else
81ecdfbb
RW
3653 CFLAGS=""
3654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3655/* end confdefs.h. */
3656
3657int
3658main ()
3659{
3660
3661 ;
3662 return 0;
3663}
3664_ACEOF
3665if ac_fn_c_try_compile "$LINENO"; then :
3666
3667else
3668 ac_c_werror_flag=$ac_save_c_werror_flag
3669 CFLAGS="-g"
3670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3671/* end confdefs.h. */
3672
3673int
3674main ()
3675{
c906108c 3676
81ecdfbb
RW
3677 ;
3678 return 0;
3679}
3680_ACEOF
3681if ac_fn_c_try_compile "$LINENO"; then :
3682 ac_cv_prog_cc_g=yes
3683fi
3684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3685fi
3686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4e8d927d 3687fi
81ecdfbb
RW
3688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3689 ac_c_werror_flag=$ac_save_c_werror_flag
bec39cab 3690fi
81ecdfbb
RW
3691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3692$as_echo "$ac_cv_prog_cc_g" >&6; }
c906108c 3693if test "$ac_test_CFLAGS" = set; then
bec39cab 3694 CFLAGS=$ac_save_CFLAGS
c906108c
SS
3695elif test $ac_cv_prog_cc_g = yes; then
3696 if test "$GCC" = yes; then
3697 CFLAGS="-g -O2"
3698 else
3699 CFLAGS="-g"
3700 fi
3701else
3702 if test "$GCC" = yes; then
3703 CFLAGS="-O2"
3704 else
3705 CFLAGS=
3706 fi
3707fi
81ecdfbb
RW
3708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3709$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 3710if ${ac_cv_prog_cc_c89+:} false; then :
81ecdfbb 3711 $as_echo_n "(cached) " >&6
bec39cab 3712else
81ecdfbb 3713 ac_cv_prog_cc_c89=no
bec39cab 3714ac_save_CC=$CC
81ecdfbb 3715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 3716/* end confdefs.h. */
c906108c
SS
3717#include <stdarg.h>
3718#include <stdio.h>
d0ac1c44 3719struct stat;
c906108c
SS
3720/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3721struct buf { int x; };
3722FILE * (*rcsopen) (struct buf *, struct stat *, int);
3723static char *e (p, i)
3724 char **p;
3725 int i;
3726{
3727 return p[i];
3728}
3729static char *f (char * (*g) (char **, int), char **p, ...)
3730{
3731 char *s;
3732 va_list v;
3733 va_start (v,p);
3734 s = g (p, va_arg (v,int));
3735 va_end (v);
3736 return s;
3737}
bec39cab
AC
3738
3739/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3740 function prototypes and stuff, but not '\xHH' hex character constants.
3741 These don't provoke an error unfortunately, instead are silently treated
81ecdfbb 3742 as 'x'. The following induces an error, until -std is added to get
bec39cab
AC
3743 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3744 array size at least. It's necessary to write '\x00'==0 to get something
81ecdfbb 3745 that's true only with -std. */
bec39cab
AC
3746int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3747
81ecdfbb
RW
3748/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3749 inside strings and character constants. */
3750#define FOO(x) 'x'
3751int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3752
c906108c
SS
3753int test (int i, double x);
3754struct s1 {int (*f) (int a);};
3755struct s2 {int (*f) (double a);};
3756int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3757int argc;
3758char **argv;
bec39cab
AC
3759int
3760main ()
3761{
c906108c 3762return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
3763 ;
3764 return 0;
3765}
3766_ACEOF
81ecdfbb
RW
3767for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3768 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
3769do
3770 CC="$ac_save_CC $ac_arg"
81ecdfbb
RW
3771 if ac_fn_c_try_compile "$LINENO"; then :
3772 ac_cv_prog_cc_c89=$ac_arg
c906108c 3773fi
81ecdfbb
RW
3774rm -f core conftest.err conftest.$ac_objext
3775 test "x$ac_cv_prog_cc_c89" != "xno" && break
c906108c 3776done
81ecdfbb 3777rm -f conftest.$ac_ext
bec39cab 3778CC=$ac_save_CC
c906108c
SS
3779
3780fi
81ecdfbb
RW
3781# AC_CACHE_VAL
3782case "x$ac_cv_prog_cc_c89" in
3783 x)
3784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3785$as_echo "none needed" >&6; } ;;
3786 xno)
3787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3788$as_echo "unsupported" >&6; } ;;
bec39cab 3789 *)
81ecdfbb
RW
3790 CC="$CC $ac_cv_prog_cc_c89"
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3792$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c906108c 3793esac
81ecdfbb 3794if test "x$ac_cv_prog_cc_c89" != xno; then :
c906108c 3795
b4e70030
JB
3796fi
3797
bec39cab
AC
3798ac_ext=c
3799ac_cpp='$CPP $CPPFLAGS'
3800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3802ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 3803
3bc3d82a
PA
3804ac_ext=cpp
3805ac_cpp='$CXXCPP $CPPFLAGS'
3806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3809if test -z "$CXX"; then
3810 if test -n "$CCC"; then
3811 CXX=$CCC
3812 else
3813 if test -n "$ac_tool_prefix"; then
3814 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3815 do
3816 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3819$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3820if ${ac_cv_prog_CXX+:} false; then :
3bc3d82a
PA
3821 $as_echo_n "(cached) " >&6
3822else
3823 if test -n "$CXX"; then
3824 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3825else
3826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827for as_dir in $PATH
3828do
3829 IFS=$as_save_IFS
3830 test -z "$as_dir" && as_dir=.
3831 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3833 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3835 break 2
3836 fi
3837done
3838 done
3839IFS=$as_save_IFS
3840
3841fi
3842fi
3843CXX=$ac_cv_prog_CXX
3844if test -n "$CXX"; then
3845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3846$as_echo "$CXX" >&6; }
3847else
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3849$as_echo "no" >&6; }
3850fi
3851
3852
3853 test -n "$CXX" && break
3854 done
3855fi
3856if test -z "$CXX"; then
3857 ac_ct_CXX=$CXX
3858 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3859do
3860 # Extract the first word of "$ac_prog", so it can be a program name with args.
3861set dummy $ac_prog; ac_word=$2
3862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3863$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3864if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3bc3d82a
PA
3865 $as_echo_n "(cached) " >&6
3866else
3867 if test -n "$ac_ct_CXX"; then
3868 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3869else
3870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871for as_dir in $PATH
3872do
3873 IFS=$as_save_IFS
3874 test -z "$as_dir" && as_dir=.
3875 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3bc3d82a
PA
3877 ac_cv_prog_ac_ct_CXX="$ac_prog"
3878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3879 break 2
3880 fi
3881done
3882 done
3883IFS=$as_save_IFS
3884
3885fi
3886fi
3887ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3888if test -n "$ac_ct_CXX"; then
3889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3890$as_echo "$ac_ct_CXX" >&6; }
3891else
3892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3893$as_echo "no" >&6; }
3894fi
3895
3896
3897 test -n "$ac_ct_CXX" && break
3898done
3899
3900 if test "x$ac_ct_CXX" = x; then
3901 CXX="g++"
3902 else
3903 case $cross_compiling:$ac_tool_warned in
3904yes:)
3905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3907ac_tool_warned=yes ;;
3908esac
3909 CXX=$ac_ct_CXX
3910 fi
3911fi
3912
3913 fi
3914fi
3915# Provide some information about the compiler.
3916$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3917set X $ac_compile
3918ac_compiler=$2
3919for ac_option in --version -v -V -qversion; do
3920 { { ac_try="$ac_compiler $ac_option >&5"
3921case "(($ac_try" in
3922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3923 *) ac_try_echo=$ac_try;;
3924esac
3925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3926$as_echo "$ac_try_echo"; } >&5
3927 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3928 ac_status=$?
3929 if test -s conftest.err; then
3930 sed '10a\
3931... rest of stderr output deleted ...
3932 10q' conftest.err >conftest.er1
3933 cat conftest.er1 >&5
3bc3d82a 3934 fi
d0ac1c44 3935 rm -f conftest.er1 conftest.err
3bc3d82a
PA
3936 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3937 test $ac_status = 0; }
3938done
3939
3940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3941$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
d0ac1c44 3942if ${ac_cv_cxx_compiler_gnu+:} false; then :
3bc3d82a
PA
3943 $as_echo_n "(cached) " >&6
3944else
3945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3946/* end confdefs.h. */
3947
3948int
3949main ()
3950{
3951#ifndef __GNUC__
3952 choke me
3953#endif
3954
3955 ;
3956 return 0;
3957}
3958_ACEOF
3959if ac_fn_cxx_try_compile "$LINENO"; then :
3960 ac_compiler_gnu=yes
3961else
3962 ac_compiler_gnu=no
3963fi
3964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3965ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3966
3967fi
3968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3969$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3970if test $ac_compiler_gnu = yes; then
3971 GXX=yes
3972else
3973 GXX=
3974fi
3975ac_test_CXXFLAGS=${CXXFLAGS+set}
3976ac_save_CXXFLAGS=$CXXFLAGS
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3978$as_echo_n "checking whether $CXX accepts -g... " >&6; }
d0ac1c44 3979if ${ac_cv_prog_cxx_g+:} false; then :
3bc3d82a
PA
3980 $as_echo_n "(cached) " >&6
3981else
3982 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3983 ac_cxx_werror_flag=yes
3984 ac_cv_prog_cxx_g=no
3985 CXXFLAGS="-g"
3986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3987/* end confdefs.h. */
3988
3989int
3990main ()
3991{
3992
3993 ;
3994 return 0;
3995}
3996_ACEOF
3997if ac_fn_cxx_try_compile "$LINENO"; then :
3998 ac_cv_prog_cxx_g=yes
3999else
4000 CXXFLAGS=""
4001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002/* end confdefs.h. */
4003
4004int
4005main ()
4006{
4007
4008 ;
4009 return 0;
4010}
4011_ACEOF
4012if ac_fn_cxx_try_compile "$LINENO"; then :
4013
4014else
4015 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4016 CXXFLAGS="-g"
4017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4018/* end confdefs.h. */
4019
4020int
4021main ()
4022{
4023
4024 ;
4025 return 0;
4026}
4027_ACEOF
4028if ac_fn_cxx_try_compile "$LINENO"; then :
4029 ac_cv_prog_cxx_g=yes
4030fi
4031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4032fi
4033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4034fi
4035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4036 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4037fi
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4039$as_echo "$ac_cv_prog_cxx_g" >&6; }
4040if test "$ac_test_CXXFLAGS" = set; then
4041 CXXFLAGS=$ac_save_CXXFLAGS
4042elif test $ac_cv_prog_cxx_g = yes; then
4043 if test "$GXX" = yes; then
4044 CXXFLAGS="-g -O2"
4045 else
4046 CXXFLAGS="-g"
4047 fi
4048else
4049 if test "$GXX" = yes; then
4050 CXXFLAGS="-O2"
4051 else
4052 CXXFLAGS=
4053 fi
4054fi
4055ac_ext=c
4056ac_cpp='$CPP $CPPFLAGS'
4057ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4058ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4059ac_compiler_gnu=$ac_cv_c_compiler_gnu
4060
4061
60ca704f 4062
bec39cab
AC
4063ac_ext=c
4064ac_cpp='$CPP $CPPFLAGS'
4065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4067ac_compiler_gnu=$ac_cv_c_compiler_gnu
81ecdfbb
RW
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4069$as_echo_n "checking how to run the C preprocessor... " >&6; }
bec39cab
AC
4070# On Suns, sometimes $CPP names a directory.
4071if test -n "$CPP" && test -d "$CPP"; then
4072 CPP=
8bb2c122 4073fi
bec39cab 4074if test -z "$CPP"; then
d0ac1c44 4075 if ${ac_cv_prog_CPP+:} false; then :
81ecdfbb 4076 $as_echo_n "(cached) " >&6
bec39cab
AC
4077else
4078 # Double quotes because CPP needs to be expanded
4079 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4080 do
4081 ac_preproc_ok=false
4082for ac_c_preproc_warn_flag in '' yes
4083do
4084 # Use a header file that comes with gcc, so configuring glibc
4085 # with a fresh cross-compiler works.
4086 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4087 # <limits.h> exists even on freestanding compilers.
4088 # On the NeXT, cc -E runs the code through the compiler's parser,
4089 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4091/* end confdefs.h. */
4092#ifdef __STDC__
4093# include <limits.h>
4094#else
4095# include <assert.h>
4096#endif
4097 Syntax error
4098_ACEOF
81ecdfbb 4099if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4100
81ecdfbb 4101else
bec39cab
AC
4102 # Broken: fails on valid input.
4103continue
4104fi
d0ac1c44 4105rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4106
81ecdfbb 4107 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4108 # can be detected and how.
81ecdfbb 4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4110/* end confdefs.h. */
4111#include <ac_nonexistent.h>
4112_ACEOF
81ecdfbb 4113if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4114 # Broken: success on invalid input.
4115continue
8bb2c122 4116else
bec39cab
AC
4117 # Passes both tests.
4118ac_preproc_ok=:
4119break
8bb2c122 4120fi
d0ac1c44 4121rm -f conftest.err conftest.i conftest.$ac_ext
8bb2c122 4122
bec39cab
AC
4123done
4124# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4125rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb 4126if $ac_preproc_ok; then :
bec39cab
AC
4127 break
4128fi
8bb2c122 4129
bec39cab
AC
4130 done
4131 ac_cv_prog_CPP=$CPP
ddc9cd0f 4132
c906108c 4133fi
bec39cab
AC
4134 CPP=$ac_cv_prog_CPP
4135else
4136 ac_cv_prog_CPP=$CPP
c906108c 4137fi
81ecdfbb
RW
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4139$as_echo "$CPP" >&6; }
bec39cab
AC
4140ac_preproc_ok=false
4141for ac_c_preproc_warn_flag in '' yes
4142do
4143 # Use a header file that comes with gcc, so configuring glibc
4144 # with a fresh cross-compiler works.
4145 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4146 # <limits.h> exists even on freestanding compilers.
4147 # On the NeXT, cc -E runs the code through the compiler's parser,
4148 # not just through cpp. "Syntax error" is here to catch this case.
81ecdfbb 4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4150/* end confdefs.h. */
4151#ifdef __STDC__
4152# include <limits.h>
4153#else
4154# include <assert.h>
4155#endif
4156 Syntax error
4157_ACEOF
81ecdfbb 4158if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab 4159
81ecdfbb 4160else
bec39cab
AC
4161 # Broken: fails on valid input.
4162continue
4163fi
d0ac1c44 4164rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 4165
81ecdfbb 4166 # OK, works on sane cases. Now check whether nonexistent headers
bec39cab 4167 # can be detected and how.
81ecdfbb 4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab
AC
4169/* end confdefs.h. */
4170#include <ac_nonexistent.h>
4171_ACEOF
81ecdfbb 4172if ac_fn_c_try_cpp "$LINENO"; then :
bec39cab
AC
4173 # Broken: success on invalid input.
4174continue
c906108c 4175else
bec39cab
AC
4176 # Passes both tests.
4177ac_preproc_ok=:
4178break
c906108c 4179fi
d0ac1c44 4180rm -f conftest.err conftest.i conftest.$ac_ext
c906108c 4181
bec39cab
AC
4182done
4183# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4184rm -f conftest.i conftest.err conftest.$ac_ext
81ecdfbb
RW
4185if $ac_preproc_ok; then :
4186
c906108c 4187else
81ecdfbb
RW
4188 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4189$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4190as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4191See \`config.log' for more details" "$LINENO" 5; }
c906108c 4192fi
c906108c 4193
bec39cab
AC
4194ac_ext=c
4195ac_cpp='$CPP $CPPFLAGS'
4196ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4197ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4198ac_compiler_gnu=$ac_cv_c_compiler_gnu
4199
4200
81ecdfbb
RW
4201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4202$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4203if ${ac_cv_path_GREP+:} false; then :
81ecdfbb 4204 $as_echo_n "(cached) " >&6
4e8d927d 4205else
81ecdfbb
RW
4206 if test -z "$GREP"; then
4207 ac_path_GREP_found=false
4208 # Loop through the user's path and test for each of PROGNAME-LIST
4209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4210for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4211do
4212 IFS=$as_save_IFS
4213 test -z "$as_dir" && as_dir=.
4214 for ac_prog in grep ggrep; do
4215 for ac_exec_ext in '' $ac_executable_extensions; do
4216 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4217 as_fn_executable_p "$ac_path_GREP" || continue
81ecdfbb
RW
4218# Check for GNU ac_path_GREP and select it if it is found.
4219 # Check for GNU $ac_path_GREP
4220case `"$ac_path_GREP" --version 2>&1` in
4221*GNU*)
4222 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4223*)
4224 ac_count=0
4225 $as_echo_n 0123456789 >"conftest.in"
4226 while :
4227 do
4228 cat "conftest.in" "conftest.in" >"conftest.tmp"
4229 mv "conftest.tmp" "conftest.in"
4230 cp "conftest.in" "conftest.nl"
4231 $as_echo 'GREP' >> "conftest.nl"
4232 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4233 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4234 as_fn_arith $ac_count + 1 && ac_count=$as_val
4235 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4236 # Best one so far, save it but keep looking for a better one
4237 ac_cv_path_GREP="$ac_path_GREP"
4238 ac_path_GREP_max=$ac_count
bec39cab 4239 fi
81ecdfbb
RW
4240 # 10*(2^10) chars as input seems more than enough
4241 test $ac_count -gt 10 && break
4242 done
4243 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4244esac
bec39cab 4245
81ecdfbb
RW
4246 $ac_path_GREP_found && break 3
4247 done
4248 done
4249 done
4250IFS=$as_save_IFS
4251 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4252 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
81ecdfbb 4253 fi
c906108c 4254else
81ecdfbb 4255 ac_cv_path_GREP=$GREP
c906108c 4256fi
c906108c 4257
81ecdfbb
RW
4258fi
4259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4260$as_echo "$ac_cv_path_GREP" >&6; }
4261 GREP="$ac_cv_path_GREP"
c906108c 4262
c906108c 4263
81ecdfbb
RW
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4265$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4266if ${ac_cv_path_EGREP+:} false; then :
81ecdfbb 4267 $as_echo_n "(cached) " >&6
783e057b 4268else
81ecdfbb
RW
4269 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4270 then ac_cv_path_EGREP="$GREP -E"
4271 else
4272 if test -z "$EGREP"; then
4273 ac_path_EGREP_found=false
4274 # Loop through the user's path and test for each of PROGNAME-LIST
4275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4276for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
783e057b
DJ
4277do
4278 IFS=$as_save_IFS
4279 test -z "$as_dir" && as_dir=.
81ecdfbb
RW
4280 for ac_prog in egrep; do
4281 for ac_exec_ext in '' $ac_executable_extensions; do
4282 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4283 as_fn_executable_p "$ac_path_EGREP" || continue
81ecdfbb
RW
4284# Check for GNU ac_path_EGREP and select it if it is found.
4285 # Check for GNU $ac_path_EGREP
4286case `"$ac_path_EGREP" --version 2>&1` in
4287*GNU*)
4288 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4289*)
4290 ac_count=0
4291 $as_echo_n 0123456789 >"conftest.in"
4292 while :
4293 do
4294 cat "conftest.in" "conftest.in" >"conftest.tmp"
4295 mv "conftest.tmp" "conftest.in"
4296 cp "conftest.in" "conftest.nl"
4297 $as_echo 'EGREP' >> "conftest.nl"
4298 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4299 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4300 as_fn_arith $ac_count + 1 && ac_count=$as_val
4301 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4302 # Best one so far, save it but keep looking for a better one
4303 ac_cv_path_EGREP="$ac_path_EGREP"
4304 ac_path_EGREP_max=$ac_count
4305 fi
4306 # 10*(2^10) chars as input seems more than enough
4307 test $ac_count -gt 10 && break
4308 done
4309 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4310esac
bec39cab 4311
81ecdfbb
RW
4312 $ac_path_EGREP_found && break 3
4313 done
4314 done
4315 done
4316IFS=$as_save_IFS
4317 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4318 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
783e057b 4319 fi
783e057b 4320else
81ecdfbb 4321 ac_cv_path_EGREP=$EGREP
783e057b
DJ
4322fi
4323
81ecdfbb 4324 fi
783e057b 4325fi
81ecdfbb
RW
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4327$as_echo "$ac_cv_path_EGREP" >&6; }
4328 EGREP="$ac_cv_path_EGREP"
4329
783e057b 4330
81ecdfbb
RW
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4332$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4333if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 4334 $as_echo_n "(cached) " >&6
783e057b 4335else
81ecdfbb 4336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 4337/* end confdefs.h. */
783e057b 4338#include <stdlib.h>
bec39cab 4339#include <stdarg.h>
783e057b
DJ
4340#include <string.h>
4341#include <float.h>
c906108c 4342
bec39cab
AC
4343int
4344main ()
4345{
c906108c 4346
bec39cab
AC
4347 ;
4348 return 0;
4349}
4350_ACEOF
81ecdfbb 4351if ac_fn_c_try_compile "$LINENO"; then :
783e057b 4352 ac_cv_header_stdc=yes
c906108c 4353else
81ecdfbb 4354 ac_cv_header_stdc=no
c906108c 4355fi
81ecdfbb 4356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 4357
783e057b
DJ
4358if test $ac_cv_header_stdc = yes; then
4359 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
81ecdfbb 4360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4361/* end confdefs.h. */
4362#include <string.h>
c906108c 4363
783e057b
DJ
4364_ACEOF
4365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4366 $EGREP "memchr" >/dev/null 2>&1; then :
4367
c906108c 4368else
783e057b 4369 ac_cv_header_stdc=no
c906108c 4370fi
783e057b 4371rm -f conftest*
c906108c
SS
4372
4373fi
4374
783e057b
DJ
4375if test $ac_cv_header_stdc = yes; then
4376 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 4377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4378/* end confdefs.h. */
4379#include <stdlib.h>
bec39cab 4380
783e057b
DJ
4381_ACEOF
4382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81ecdfbb
RW
4383 $EGREP "free" >/dev/null 2>&1; then :
4384
bec39cab 4385else
783e057b 4386 ac_cv_header_stdc=no
bec39cab 4387fi
783e057b 4388rm -f conftest*
bec39cab
AC
4389
4390fi
bec39cab 4391
783e057b
DJ
4392if test $ac_cv_header_stdc = yes; then
4393 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
81ecdfbb 4394 if test "$cross_compiling" = yes; then :
783e057b 4395 :
bec39cab 4396else
81ecdfbb 4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4398/* end confdefs.h. */
4399#include <ctype.h>
81ecdfbb 4400#include <stdlib.h>
783e057b
DJ
4401#if ((' ' & 0x0FF) == 0x020)
4402# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4403# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4404#else
4405# define ISLOWER(c) \
4406 (('a' <= (c) && (c) <= 'i') \
4407 || ('j' <= (c) && (c) <= 'r') \
4408 || ('s' <= (c) && (c) <= 'z'))
4409# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4410#endif
4411
4412#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4413int
4414main ()
4415{
4416 int i;
4417 for (i = 0; i < 256; i++)
4418 if (XOR (islower (i), ISLOWER (i))
4419 || toupper (i) != TOUPPER (i))
81ecdfbb
RW
4420 return 2;
4421 return 0;
783e057b
DJ
4422}
4423_ACEOF
81ecdfbb 4424if ac_fn_c_try_run "$LINENO"; then :
783e057b 4425
81ecdfbb
RW
4426else
4427 ac_cv_header_stdc=no
783e057b 4428fi
81ecdfbb
RW
4429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4430 conftest.$ac_objext conftest.beam conftest.$ac_ext
783e057b 4431fi
81ecdfbb 4432
783e057b
DJ
4433fi
4434fi
81ecdfbb
RW
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4436$as_echo "$ac_cv_header_stdc" >&6; }
783e057b
DJ
4437if test $ac_cv_header_stdc = yes; then
4438
81ecdfbb 4439$as_echo "#define STDC_HEADERS 1" >>confdefs.h
783e057b
DJ
4440
4441fi
4442
4443# On IRIX 5.3, sys/types and inttypes.h are conflicting.
783e057b
DJ
4444for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4445 inttypes.h stdint.h unistd.h
81ecdfbb
RW
4446do :
4447 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4448ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4449"
d0ac1c44 4450if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
783e057b 4451 cat >>confdefs.h <<_ACEOF
81ecdfbb 4452#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
783e057b
DJ
4453_ACEOF
4454
4455fi
4456
4457done
4458
4459
4460
81ecdfbb 4461 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4462if test "x$ac_cv_header_minix_config_h" = xyes; then :
783e057b
DJ
4463 MINIX=yes
4464else
4465 MINIX=
4466fi
4467
4468
4469 if test "$MINIX" = yes; then
4470
81ecdfbb 4471$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
783e057b
DJ
4472
4473
81ecdfbb 4474$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
783e057b
DJ
4475
4476
81ecdfbb 4477$as_echo "#define _MINIX 1" >>confdefs.h
783e057b
DJ
4478
4479 fi
4480
4481
81ecdfbb
RW
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4483$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4484if ${ac_cv_safe_to_define___extensions__+:} false; then :
81ecdfbb 4485 $as_echo_n "(cached) " >&6
783e057b 4486else
81ecdfbb 4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
783e057b
DJ
4488/* end confdefs.h. */
4489
d0ac1c44
SM
4490# define __EXTENSIONS__ 1
4491 $ac_includes_default
783e057b
DJ
4492int
4493main ()
4494{
4495
4496 ;
4497 return 0;
4498}
4499_ACEOF
81ecdfbb 4500if ac_fn_c_try_compile "$LINENO"; then :
783e057b
DJ
4501 ac_cv_safe_to_define___extensions__=yes
4502else
81ecdfbb 4503 ac_cv_safe_to_define___extensions__=no
783e057b 4504fi
81ecdfbb 4505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
783e057b 4506fi
81ecdfbb
RW
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4508$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
783e057b 4509 test $ac_cv_safe_to_define___extensions__ = yes &&
81ecdfbb 4510 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
783e057b 4511
81ecdfbb 4512 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
783e057b 4513
81ecdfbb 4514 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
783e057b 4515
81ecdfbb 4516 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
783e057b 4517
81ecdfbb 4518 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
783e057b
DJ
4519
4520
c971b7fa
PA
4521ac_aux_dir=
4522for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
d0ac1c44
SM
4523 if test -f "$ac_dir/install-sh"; then
4524 ac_aux_dir=$ac_dir
4525 ac_install_sh="$ac_aux_dir/install-sh -c"
4526 break
4527 elif test -f "$ac_dir/install.sh"; then
4528 ac_aux_dir=$ac_dir
4529 ac_install_sh="$ac_aux_dir/install.sh -c"
4530 break
4531 elif test -f "$ac_dir/shtool"; then
4532 ac_aux_dir=$ac_dir
4533 ac_install_sh="$ac_aux_dir/shtool install -c"
4534 break
4535 fi
c971b7fa
PA
4536done
4537if test -z "$ac_aux_dir"; then
d0ac1c44 4538 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
c971b7fa 4539fi
770d76d7 4540
c971b7fa
PA
4541# These three variables are undocumented and unsupported,
4542# and are intended to be withdrawn in a future Autoconf release.
4543# They can cause serious problems if a builder's source tree is in a directory
4544# whose full name contains unusual characters.
4545ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4546ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4547ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
770d76d7 4548
770d76d7 4549
c971b7fa
PA
4550# Make sure we can run config.sub.
4551$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 4552 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
770d76d7 4553
c971b7fa
PA
4554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4555$as_echo_n "checking build system type... " >&6; }
d0ac1c44 4556if ${ac_cv_build+:} false; then :
c971b7fa 4557 $as_echo_n "(cached) " >&6
770d76d7 4558else
c971b7fa
PA
4559 ac_build_alias=$build_alias
4560test "x$ac_build_alias" = x &&
4561 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4562test "x$ac_build_alias" = x &&
d0ac1c44 4563 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
c971b7fa 4564ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 4565 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
c971b7fa 4566
770d76d7 4567fi
c971b7fa
PA
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4569$as_echo "$ac_cv_build" >&6; }
4570case $ac_cv_build in
4571*-*-*) ;;
d0ac1c44 4572*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
770d76d7 4573esac
c971b7fa
PA
4574build=$ac_cv_build
4575ac_save_IFS=$IFS; IFS='-'
4576set x $ac_cv_build
4577shift
4578build_cpu=$1
4579build_vendor=$2
4580shift; shift
4581# Remember, the first character of IFS is used to create $*,
4582# except with old shells:
4583build_os=$*
4584IFS=$ac_save_IFS
4585case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
770d76d7
PA
4586
4587
c971b7fa
PA
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4589$as_echo_n "checking host system type... " >&6; }
d0ac1c44 4590if ${ac_cv_host+:} false; then :
81ecdfbb
RW
4591 $as_echo_n "(cached) " >&6
4592else
c971b7fa
PA
4593 if test "x$host_alias" = x; then
4594 ac_cv_host=$ac_cv_build
81ecdfbb 4595else
c971b7fa 4596 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 4597 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
81ecdfbb 4598fi
81ecdfbb
RW
4599
4600fi
c971b7fa
PA
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4602$as_echo "$ac_cv_host" >&6; }
4603case $ac_cv_host in
4604*-*-*) ;;
d0ac1c44 4605*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
81ecdfbb 4606esac
c971b7fa
PA
4607host=$ac_cv_host
4608ac_save_IFS=$IFS; IFS='-'
4609set x $ac_cv_host
4610shift
4611host_cpu=$1
4612host_vendor=$2
4613shift; shift
4614# Remember, the first character of IFS is used to create $*,
4615# except with old shells:
4616host_os=$*
4617IFS=$ac_save_IFS
4618case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3388710e
JM
4619
4620
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4622$as_echo_n "checking target system type... " >&6; }
d0ac1c44 4623if ${ac_cv_target+:} false; then :
3388710e
JM
4624 $as_echo_n "(cached) " >&6
4625else
4626 if test "x$target_alias" = x; then
4627 ac_cv_target=$ac_cv_host
4628else
4629 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 4630 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3388710e
JM
4631fi
4632
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4635$as_echo "$ac_cv_target" >&6; }
4636case $ac_cv_target in
4637*-*-*) ;;
d0ac1c44 4638*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3388710e
JM
4639esac
4640target=$ac_cv_target
4641ac_save_IFS=$IFS; IFS='-'
4642set x $ac_cv_target
4643shift
4644target_cpu=$1
4645target_vendor=$2
4646shift; shift
4647# Remember, the first character of IFS is used to create $*,
4648# except with old shells:
4649target_os=$*
4650IFS=$ac_save_IFS
4651case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4652
4653
4654# The aliases save the names the user supplied, while $host etc.
4655# will get canonicalized.
4656test -n "$target_alias" &&
4657 test "$program_prefix$program_suffix$program_transform_name" = \
4658 NONENONEs,x,x, &&
4659 program_prefix=${target_alias}-
4660
4661# The tests for host and target for $enable_largefile require
4662# canonical names.
4663
4664
81ecdfbb 4665
da2f07f1
JK
4666# As the $enable_largefile decision depends on --enable-plugins we must set it
4667# even in directories otherwise not depending on the $plugins option.
4668
4669
2974be62
AM
4670 maybe_plugins=no
4671 for ac_header in dlfcn.h
4672do :
4673 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4674"
d0ac1c44 4675if test "x$ac_cv_header_dlfcn_h" = xyes; then :
2974be62
AM
4676 cat >>confdefs.h <<_ACEOF
4677#define HAVE_DLFCN_H 1
4678_ACEOF
4679 maybe_plugins=yes
4680fi
4681
4682done
4683
4684 for ac_header in windows.h
4685do :
4686 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4687"
d0ac1c44 4688if test "x$ac_cv_header_windows_h" = xyes; then :
2974be62
AM
4689 cat >>confdefs.h <<_ACEOF
4690#define HAVE_WINDOWS_H 1
4691_ACEOF
4692 maybe_plugins=yes
4693fi
4694
4695done
4696
4697
4698 # Check whether --enable-plugins was given.
da2f07f1
JK
4699if test "${enable_plugins+set}" = set; then :
4700 enableval=$enable_plugins; case "${enableval}" in
2974be62
AM
4701 no) plugins=no ;;
4702 *) plugins=yes
4703 if test "$maybe_plugins" != "yes" ; then
d0ac1c44 4704 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
2974be62
AM
4705 fi ;;
4706 esac
da2f07f1 4707else
2974be62
AM
4708 plugins=$maybe_plugins
4709
da2f07f1
JK
4710fi
4711
2974be62 4712 if test "$plugins" = "yes"; then
458412c3
TT
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4714$as_echo_n "checking for library containing dlsym... " >&6; }
d0ac1c44 4715if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4716 $as_echo_n "(cached) " >&6
4717else
4718 ac_func_search_save_LIBS=$LIBS
4719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4720/* end confdefs.h. */
4721
4722/* Override any GCC internal prototype to avoid an error.
4723 Use char because int might match the return type of a GCC
4724 builtin and then its argument prototype would still apply. */
4725#ifdef __cplusplus
4726extern "C"
4727#endif
458412c3 4728char dlsym ();
2974be62
AM
4729int
4730main ()
4731{
458412c3 4732return dlsym ();
2974be62
AM
4733 ;
4734 return 0;
4735}
4736_ACEOF
4737for ac_lib in '' dl; do
4738 if test -z "$ac_lib"; then
4739 ac_res="none required"
4740 else
4741 ac_res=-l$ac_lib
4742 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4743 fi
4744 if ac_fn_c_try_link "$LINENO"; then :
458412c3 4745 ac_cv_search_dlsym=$ac_res
2974be62
AM
4746fi
4747rm -f core conftest.err conftest.$ac_objext \
4748 conftest$ac_exeext
d0ac1c44 4749 if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4750 break
4751fi
4752done
d0ac1c44 4753if ${ac_cv_search_dlsym+:} false; then :
2974be62
AM
4754
4755else
458412c3 4756 ac_cv_search_dlsym=no
2974be62
AM
4757fi
4758rm conftest.$ac_ext
4759LIBS=$ac_func_search_save_LIBS
4760fi
458412c3
TT
4761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4762$as_echo "$ac_cv_search_dlsym" >&6; }
4763ac_res=$ac_cv_search_dlsym
2974be62
AM
4764if test "$ac_res" != no; then :
4765 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4766
4767fi
4768
4769 fi
da2f07f1
JK
4770
4771
4772case "${host}" in
c8693053
RO
4773 sparc-*-solaris*|i?86-*-solaris*)
4774 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4775 # were mutually exclusive until Solaris 11.3. Without procfs support,
4776 # the bfd/ elf module cannot provide certain routines such as
4777 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4778 # explicitly requested large-file support through the
4779 # --enable-largefile switch, disable large-file support in favor of
4780 # procfs support.
4781 #
4782 # Check if <sys/procfs.h> is incompatible with large-file support.
4783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4784/* end confdefs.h. */
4785#define _FILE_OFFSET_BITS 64
4786#define _STRUCTURED_PROC 1
4787#include <sys/procfs.h>
4788int
4789main ()
4790{
4791
4792 ;
4793 return 0;
4794}
4795_ACEOF
4796if ac_fn_c_try_compile "$LINENO"; then :
4797 acx_cv_procfs_lfs=yes
4798else
4799 acx_cv_procfs_lfs=no
4800fi
4801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802 #
4803 # Forcefully disable large-file support only if necessary, gdb is in
4804 # tree and enabled.
4805 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4806 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4807 : ${enable_largefile="no"}
4808 if test "$plugins" = yes; then
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4810plugin support disabled; require large-file support which is incompatible with GDB." >&5
4811$as_echo "$as_me: WARNING:
4812plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4813 plugins=no
4814 fi
4815 fi
4816 #
4817 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4818 # benefit of g++ 9+ which predefines it on Solaris.
4819 if test "$enable_largefile" = no; then
4820 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4821
4822 fi
da2f07f1
JK
4823 ;;
4824esac
4825
4826# Check whether --enable-largefile was given.
4827if test "${enable_largefile+set}" = set; then :
4828 enableval=$enable_largefile;
4829fi
4830
4831if test "$enable_largefile" != no; then
4832
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4834$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 4835if ${ac_cv_sys_largefile_CC+:} false; then :
da2f07f1
JK
4836 $as_echo_n "(cached) " >&6
4837else
4838 ac_cv_sys_largefile_CC=no
4839 if test "$GCC" != yes; then
4840 ac_save_CC=$CC
4841 while :; do
4842 # IRIX 6.2 and later do not support large files by default,
4843 # so use the C compiler's -n32 option if that helps.
4844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4845/* end confdefs.h. */
4846#include <sys/types.h>
4847 /* Check that off_t can represent 2**63 - 1 correctly.
4848 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4849 since some C++ compilers masquerading as C compilers
4850 incorrectly reject 9223372036854775807. */
4851#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4852 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4853 && LARGE_OFF_T % 2147483647 == 1)
4854 ? 1 : -1];
4855int
4856main ()
4857{
4858
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863 if ac_fn_c_try_compile "$LINENO"; then :
4864 break
4865fi
4866rm -f core conftest.err conftest.$ac_objext
4867 CC="$CC -n32"
4868 if ac_fn_c_try_compile "$LINENO"; then :
4869 ac_cv_sys_largefile_CC=' -n32'; break
4870fi
4871rm -f core conftest.err conftest.$ac_objext
4872 break
4873 done
4874 CC=$ac_save_CC
4875 rm -f conftest.$ac_ext
4876 fi
4877fi
4878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4879$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4880 if test "$ac_cv_sys_largefile_CC" != no; then
4881 CC=$CC$ac_cv_sys_largefile_CC
4882 fi
4883
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4885$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 4886if ${ac_cv_sys_file_offset_bits+:} false; then :
da2f07f1
JK
4887 $as_echo_n "(cached) " >&6
4888else
4889 while :; do
4890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4891/* end confdefs.h. */
4892#include <sys/types.h>
4893 /* Check that off_t can represent 2**63 - 1 correctly.
4894 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4895 since some C++ compilers masquerading as C compilers
4896 incorrectly reject 9223372036854775807. */
4897#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4898 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4899 && LARGE_OFF_T % 2147483647 == 1)
4900 ? 1 : -1];
4901int
4902main ()
4903{
4904
4905 ;
4906 return 0;
4907}
4908_ACEOF
4909if ac_fn_c_try_compile "$LINENO"; then :
4910 ac_cv_sys_file_offset_bits=no; break
4911fi
4912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4914/* end confdefs.h. */
4915#define _FILE_OFFSET_BITS 64
4916#include <sys/types.h>
4917 /* Check that off_t can represent 2**63 - 1 correctly.
4918 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4919 since some C++ compilers masquerading as C compilers
4920 incorrectly reject 9223372036854775807. */
4921#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4922 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4923 && LARGE_OFF_T % 2147483647 == 1)
4924 ? 1 : -1];
4925int
4926main ()
4927{
4928
4929 ;
4930 return 0;
4931}
4932_ACEOF
4933if ac_fn_c_try_compile "$LINENO"; then :
4934 ac_cv_sys_file_offset_bits=64; break
4935fi
4936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937 ac_cv_sys_file_offset_bits=unknown
4938 break
4939done
4940fi
4941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4942$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4943case $ac_cv_sys_file_offset_bits in #(
4944 no | unknown) ;;
4945 *)
4946cat >>confdefs.h <<_ACEOF
4947#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4948_ACEOF
4949;;
4950esac
4951rm -rf conftest*
4952 if test $ac_cv_sys_file_offset_bits = unknown; then
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4954$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 4955if ${ac_cv_sys_large_files+:} false; then :
da2f07f1
JK
4956 $as_echo_n "(cached) " >&6
4957else
4958 while :; do
4959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4960/* end confdefs.h. */
4961#include <sys/types.h>
4962 /* Check that off_t can represent 2**63 - 1 correctly.
4963 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4964 since some C++ compilers masquerading as C compilers
4965 incorrectly reject 9223372036854775807. */
4966#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4967 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4968 && LARGE_OFF_T % 2147483647 == 1)
4969 ? 1 : -1];
4970int
4971main ()
4972{
4973
4974 ;
4975 return 0;
4976}
4977_ACEOF
4978if ac_fn_c_try_compile "$LINENO"; then :
4979 ac_cv_sys_large_files=no; break
4980fi
4981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4983/* end confdefs.h. */
4984#define _LARGE_FILES 1
4985#include <sys/types.h>
4986 /* Check that off_t can represent 2**63 - 1 correctly.
4987 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4988 since some C++ compilers masquerading as C compilers
4989 incorrectly reject 9223372036854775807. */
4990#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4991 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4992 && LARGE_OFF_T % 2147483647 == 1)
4993 ? 1 : -1];
4994int
4995main ()
4996{
4997
4998 ;
4999 return 0;
5000}
5001_ACEOF
5002if ac_fn_c_try_compile "$LINENO"; then :
5003 ac_cv_sys_large_files=1; break
5004fi
5005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5006 ac_cv_sys_large_files=unknown
5007 break
5008done
5009fi
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5011$as_echo "$ac_cv_sys_large_files" >&6; }
5012case $ac_cv_sys_large_files in #(
5013 no | unknown) ;;
5014 *)
5015cat >>confdefs.h <<_ACEOF
5016#define _LARGE_FILES $ac_cv_sys_large_files
5017_ACEOF
5018;;
5019esac
5020rm -rf conftest*
5021 fi
d0ac1c44
SM
5022
5023
da2f07f1
JK
5024fi
5025
5026
d0ac1c44
SM
5027# Expand $ac_aux_dir to an absolute path.
5028am_aux_dir=`cd "$ac_aux_dir" && pwd`
4869db5e 5029
d0ac1c44 5030if test x"${install_sh+set}" != xset; then
4869db5e
RM
5031 case $am_aux_dir in
5032 *\ * | *\ *)
5033 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5034 *)
5035 install_sh="\${SHELL} $am_aux_dir/install-sh"
5036 esac
5037fi
5038
d0ac1c44
SM
5039# Installed binaries are usually stripped using 'strip' when the user
5040# run "make install-strip". However 'strip' might not be the right
4869db5e 5041# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 5042# will honor the 'STRIP' environment variable to overrule this program.
4869db5e
RM
5043if test "$cross_compiling" != no; then
5044 if test -n "$ac_tool_prefix"; then
5045 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5046set dummy ${ac_tool_prefix}strip; ac_word=$2
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5048$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5049if ${ac_cv_prog_STRIP+:} false; then :
4869db5e
RM
5050 $as_echo_n "(cached) " >&6
5051else
5052 if test -n "$STRIP"; then
5053 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5054else
5055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5056for as_dir in $PATH
5057do
5058 IFS=$as_save_IFS
5059 test -z "$as_dir" && as_dir=.
5060 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5062 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5064 break 2
5065 fi
5066done
5067 done
5068IFS=$as_save_IFS
5069
5070fi
5071fi
5072STRIP=$ac_cv_prog_STRIP
5073if test -n "$STRIP"; then
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5075$as_echo "$STRIP" >&6; }
5076else
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078$as_echo "no" >&6; }
5079fi
5080
5081
5082fi
5083if test -z "$ac_cv_prog_STRIP"; then
5084 ac_ct_STRIP=$STRIP
5085 # Extract the first word of "strip", so it can be a program name with args.
5086set dummy strip; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5089if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4869db5e
RM
5090 $as_echo_n "(cached) " >&6
5091else
5092 if test -n "$ac_ct_STRIP"; then
5093 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5094else
5095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in $PATH
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869db5e
RM
5102 ac_cv_prog_ac_ct_STRIP="strip"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106done
5107 done
5108IFS=$as_save_IFS
5109
5110fi
5111fi
5112ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5113if test -n "$ac_ct_STRIP"; then
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5115$as_echo "$ac_ct_STRIP" >&6; }
5116else
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121 if test "x$ac_ct_STRIP" = x; then
5122 STRIP=":"
5123 else
5124 case $cross_compiling:$ac_tool_warned in
5125yes:)
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5128ac_tool_warned=yes ;;
5129esac
5130 STRIP=$ac_ct_STRIP
5131 fi
5132else
5133 STRIP="$ac_cv_prog_STRIP"
5134fi
5135
5136fi
5137INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5138
783e057b
DJ
5139
5140ac_aux_dir=
81ecdfbb 5141for ac_dir in .. "$srcdir"/..; do
d0ac1c44
SM
5142 if test -f "$ac_dir/install-sh"; then
5143 ac_aux_dir=$ac_dir
5144 ac_install_sh="$ac_aux_dir/install-sh -c"
5145 break
5146 elif test -f "$ac_dir/install.sh"; then
5147 ac_aux_dir=$ac_dir
5148 ac_install_sh="$ac_aux_dir/install.sh -c"
5149 break
5150 elif test -f "$ac_dir/shtool"; then
5151 ac_aux_dir=$ac_dir
5152 ac_install_sh="$ac_aux_dir/shtool install -c"
5153 break
5154 fi
783e057b
DJ
5155done
5156if test -z "$ac_aux_dir"; then
d0ac1c44 5157 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
783e057b 5158fi
81ecdfbb
RW
5159
5160# These three variables are undocumented and unsupported,
5161# and are intended to be withdrawn in a future Autoconf release.
5162# They can cause serious problems if a builder's source tree is in a directory
5163# whose full name contains unusual characters.
5164ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5165ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5166ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5167
783e057b 5168
783e057b 5169
91e1a0ed
SM
5170# Set build, build_cpu, build_vendor and build_os.
5171
5172
5173# Set host, host_cpu, host_vendor, and host_os.
5174
5175
5176# Set target, target_cpu, target_vendor, and target_os.
5177
5178
9009e1ae
MR
5179test "$program_prefix" != NONE &&
5180 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5181# Use a double $ so make ignores it.
5182test "$program_suffix" != NONE &&
5183 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5184# Double any \ or $.
5185# By default was `s,x,x', remove it if useless.
5186ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5187program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5188
81ecdfbb 5189
0bcda685
PA
5190# We require a C++11 compiler. Check if one is available, and if
5191# necessary, set CXX_DIALECT to some -std=xxx switch.
5192
41260ac2 5193 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
0bcda685
PA
5194 ac_ext=cpp
5195ac_cpp='$CXXCPP $CPPFLAGS'
5196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5199 CXX_DIALECT=""
5200 ac_success=no
5201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5202$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
d0ac1c44 5203if ${ax_cv_cxx_compile_cxx11+:} false; then :
0bcda685
PA
5204 $as_echo_n "(cached) " >&6
5205else
5206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5207/* end confdefs.h. */
5208
5209
5210// If the compiler admits that it is not ready for C++11, why torture it?
5211// Hopefully, this will speed up the test.
5212
5213#ifndef __cplusplus
5214
5215#error "This is not a C++ compiler"
5216
5217#elif __cplusplus < 201103L
5218
5219#error "This is not a C++11 compiler"
5220
5221#else
5222
5223namespace cxx11
5224{
5225
5226 namespace test_static_assert
5227 {
5228
5229 template <typename T>
5230 struct check
5231 {
5232 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5233 };
5234
5235 }
5236
5237 namespace test_final_override
5238 {
5239
5240 struct Base
5241 {
5242 virtual void f() {}
5243 };
5244
5245 struct Derived : public Base
5246 {
5247 virtual void f() override {}
5248 };
5249
5250 }
5251
5252 namespace test_double_right_angle_brackets
5253 {
5254
5255 template < typename T >
5256 struct check {};
5257
5258 typedef check<void> single_type;
5259 typedef check<check<void>> double_type;
5260 typedef check<check<check<void>>> triple_type;
5261 typedef check<check<check<check<void>>>> quadruple_type;
5262
5263 }
5264
5265 namespace test_decltype
5266 {
5267
5268 int
5269 f()
5270 {
5271 int a = 1;
5272 decltype(a) b = 2;
5273 return a + b;
5274 }
5275
5276 }
5277
5278 namespace test_type_deduction
5279 {
5280
5281 template < typename T1, typename T2 >
5282 struct is_same
5283 {
5284 static const bool value = false;
5285 };
5286
5287 template < typename T >
5288 struct is_same<T, T>
5289 {
5290 static const bool value = true;
5291 };
5292
5293 template < typename T1, typename T2 >
5294 auto
5295 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5296 {
5297 return a1 + a2;
5298 }
5299
5300 int
5301 test(const int c, volatile int v)
5302 {
5303 static_assert(is_same<int, decltype(0)>::value == true, "");
5304 static_assert(is_same<int, decltype(c)>::value == false, "");
5305 static_assert(is_same<int, decltype(v)>::value == false, "");
5306 auto ac = c;
5307 auto av = v;
5308 auto sumi = ac + av + 'x';
5309 auto sumf = ac + av + 1.0;
5310 static_assert(is_same<int, decltype(ac)>::value == true, "");
5311 static_assert(is_same<int, decltype(av)>::value == true, "");
5312 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5313 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5314 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5315 return (sumf > 0.0) ? sumi : add(c, v);
5316 }
5317
5318 }
5319
5320 namespace test_noexcept
5321 {
5322
5323 int f() { return 0; }
5324 int g() noexcept { return 0; }
5325
5326 static_assert(noexcept(f()) == false, "");
5327 static_assert(noexcept(g()) == true, "");
5328
5329 }
5330
5331 namespace test_constexpr
5332 {
5333
5334 template < typename CharT >
5335 unsigned long constexpr
5336 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5337 {
5338 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5339 }
5340
5341 template < typename CharT >
5342 unsigned long constexpr
5343 strlen_c(const CharT *const s) noexcept
5344 {
5345 return strlen_c_r(s, 0UL);
5346 }
5347
5348 static_assert(strlen_c("") == 0UL, "");
5349 static_assert(strlen_c("1") == 1UL, "");
5350 static_assert(strlen_c("example") == 7UL, "");
5351 static_assert(strlen_c("another\0example") == 7UL, "");
5352
5353 }
5354
5355 namespace test_rvalue_references
5356 {
5357
5358 template < int N >
5359 struct answer
5360 {
5361 static constexpr int value = N;
5362 };
5363
5364 answer<1> f(int&) { return answer<1>(); }
5365 answer<2> f(const int&) { return answer<2>(); }
5366 answer<3> f(int&&) { return answer<3>(); }
5367
5368 void
5369 test()
5370 {
5371 int i = 0;
5372 const int c = 0;
5373 static_assert(decltype(f(i))::value == 1, "");
5374 static_assert(decltype(f(c))::value == 2, "");
5375 static_assert(decltype(f(0))::value == 3, "");
5376 }
5377
5378 }
5379
5380 namespace test_uniform_initialization
5381 {
5382
5383 struct test
5384 {
5385 static const int zero {};
5386 static const int one {1};
5387 };
5388
5389 static_assert(test::zero == 0, "");
5390 static_assert(test::one == 1, "");
5391
5392 }
5393
5394 namespace test_lambdas
5395 {
5396
5397 void
5398 test1()
5399 {
5400 auto lambda1 = [](){};
5401 auto lambda2 = lambda1;
5402 lambda1();
5403 lambda2();
5404 }
5405
5406 int
5407 test2()
5408 {
5409 auto a = [](int i, int j){ return i + j; }(1, 2);
5410 auto b = []() -> int { return '0'; }();
5411 auto c = [=](){ return a + b; }();
5412 auto d = [&](){ return c; }();
5413 auto e = [a, &b](int x) mutable {
5414 const auto identity = [](int y){ return y; };
5415 for (auto i = 0; i < a; ++i)
5416 a += b--;
5417 return x + identity(a + b);
5418 }(0);
5419 return a + b + c + d + e;
5420 }
5421
5422 int
5423 test3()
5424 {
5425 const auto nullary = [](){ return 0; };
5426 const auto unary = [](int x){ return x; };
5427 using nullary_t = decltype(nullary);
5428 using unary_t = decltype(unary);
5429 const auto higher1st = [](nullary_t f){ return f(); };
5430 const auto higher2nd = [unary](nullary_t f1){
5431 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5432 };
5433 return higher1st(nullary) + higher2nd(nullary)(unary);
5434 }
5435
5436 }
5437
5438 namespace test_variadic_templates
5439 {
5440
5441 template <int...>
5442 struct sum;
5443
5444 template <int N0, int... N1toN>
5445 struct sum<N0, N1toN...>
5446 {
5447 static constexpr auto value = N0 + sum<N1toN...>::value;
5448 };
5449
5450 template <>
5451 struct sum<>
5452 {
5453 static constexpr auto value = 0;
5454 };
5455
5456 static_assert(sum<>::value == 0, "");
5457 static_assert(sum<1>::value == 1, "");
5458 static_assert(sum<23>::value == 23, "");
5459 static_assert(sum<1, 2>::value == 3, "");
5460 static_assert(sum<5, 5, 11>::value == 21, "");
5461 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5462
5463 }
5464
5465 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5466 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5467 // because of this.
5468 namespace test_template_alias_sfinae
5469 {
5470
5471 struct foo {};
5472
5473 template<typename T>
5474 using member = typename T::member_type;
5475
5476 template<typename T>
5477 void func(...) {}
5478
5479 template<typename T>
5480 void func(member<T>*) {}
5481
5482 void test();
5483
5484 void test() { func<foo>(0); }
5485
5486 }
5487
5488} // namespace cxx11
5489
5490#endif // __cplusplus >= 201103L
5491
5492
5493
5494_ACEOF
5495if ac_fn_cxx_try_compile "$LINENO"; then :
5496 ax_cv_cxx_compile_cxx11=yes
5497else
5498 ax_cv_cxx_compile_cxx11=no
5499fi
5500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5501fi
5502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5503$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5504 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5505 ac_success=yes
5506 fi
5507
5508 if test x$ac_success = xno; then
41260ac2
SM
5509 for alternative in ${ax_cxx_compile_alternatives}; do
5510 switch="-std=gnu++${alternative}"
0bcda685
PA
5511 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5513$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5514if eval \${$cachevar+:} false; then :
0bcda685
PA
5515 $as_echo_n "(cached) " >&6
5516else
5517 ac_save_CXX="$CXX"
5518 CXX="$CXX $switch"
5519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5520/* end confdefs.h. */
5521
5522
5523// If the compiler admits that it is not ready for C++11, why torture it?
5524// Hopefully, this will speed up the test.
5525
5526#ifndef __cplusplus
5527
5528#error "This is not a C++ compiler"
5529
5530#elif __cplusplus < 201103L
5531
5532#error "This is not a C++11 compiler"
5533
5534#else
5535
5536namespace cxx11
5537{
5538
5539 namespace test_static_assert
5540 {
5541
5542 template <typename T>
5543 struct check
5544 {
5545 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5546 };
5547
5548 }
5549
5550 namespace test_final_override
5551 {
5552
5553 struct Base
5554 {
5555 virtual void f() {}
5556 };
5557
5558 struct Derived : public Base
5559 {
5560 virtual void f() override {}
5561 };
5562
5563 }
5564
5565 namespace test_double_right_angle_brackets
5566 {
5567
5568 template < typename T >
5569 struct check {};
5570
5571 typedef check<void> single_type;
5572 typedef check<check<void>> double_type;
5573 typedef check<check<check<void>>> triple_type;
5574 typedef check<check<check<check<void>>>> quadruple_type;
5575
5576 }
5577
5578 namespace test_decltype
5579 {
5580
5581 int
5582 f()
5583 {
5584 int a = 1;
5585 decltype(a) b = 2;
5586 return a + b;
5587 }
5588
5589 }
5590
5591 namespace test_type_deduction
5592 {
5593
5594 template < typename T1, typename T2 >
5595 struct is_same
5596 {
5597 static const bool value = false;
5598 };
5599
5600 template < typename T >
5601 struct is_same<T, T>
5602 {
5603 static const bool value = true;
5604 };
5605
5606 template < typename T1, typename T2 >
5607 auto
5608 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5609 {
5610 return a1 + a2;
5611 }
5612
5613 int
5614 test(const int c, volatile int v)
5615 {
5616 static_assert(is_same<int, decltype(0)>::value == true, "");
5617 static_assert(is_same<int, decltype(c)>::value == false, "");
5618 static_assert(is_same<int, decltype(v)>::value == false, "");
5619 auto ac = c;
5620 auto av = v;
5621 auto sumi = ac + av + 'x';
5622 auto sumf = ac + av + 1.0;
5623 static_assert(is_same<int, decltype(ac)>::value == true, "");
5624 static_assert(is_same<int, decltype(av)>::value == true, "");
5625 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5626 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5627 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5628 return (sumf > 0.0) ? sumi : add(c, v);
5629 }
5630
5631 }
5632
5633 namespace test_noexcept
5634 {
5635
5636 int f() { return 0; }
5637 int g() noexcept { return 0; }
5638
5639 static_assert(noexcept(f()) == false, "");
5640 static_assert(noexcept(g()) == true, "");
5641
5642 }
5643
5644 namespace test_constexpr
5645 {
5646
5647 template < typename CharT >
5648 unsigned long constexpr
5649 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5650 {
5651 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5652 }
5653
5654 template < typename CharT >
5655 unsigned long constexpr
5656 strlen_c(const CharT *const s) noexcept
5657 {
5658 return strlen_c_r(s, 0UL);
5659 }
5660
5661 static_assert(strlen_c("") == 0UL, "");
5662 static_assert(strlen_c("1") == 1UL, "");
5663 static_assert(strlen_c("example") == 7UL, "");
5664 static_assert(strlen_c("another\0example") == 7UL, "");
5665
5666 }
5667
5668 namespace test_rvalue_references
5669 {
5670
5671 template < int N >
5672 struct answer
5673 {
5674 static constexpr int value = N;
5675 };
5676
5677 answer<1> f(int&) { return answer<1>(); }
5678 answer<2> f(const int&) { return answer<2>(); }
5679 answer<3> f(int&&) { return answer<3>(); }
5680
5681 void
5682 test()
5683 {
5684 int i = 0;
5685 const int c = 0;
5686 static_assert(decltype(f(i))::value == 1, "");
5687 static_assert(decltype(f(c))::value == 2, "");
5688 static_assert(decltype(f(0))::value == 3, "");
5689 }
5690
5691 }
5692
5693 namespace test_uniform_initialization
5694 {
5695
5696 struct test
5697 {
5698 static const int zero {};
5699 static const int one {1};
5700 };
5701
5702 static_assert(test::zero == 0, "");
5703 static_assert(test::one == 1, "");
5704
5705 }
5706
5707 namespace test_lambdas
5708 {
5709
5710 void
5711 test1()
5712 {
5713 auto lambda1 = [](){};
5714 auto lambda2 = lambda1;
5715 lambda1();
5716 lambda2();
5717 }
5718
5719 int
5720 test2()
5721 {
5722 auto a = [](int i, int j){ return i + j; }(1, 2);
5723 auto b = []() -> int { return '0'; }();
5724 auto c = [=](){ return a + b; }();
5725 auto d = [&](){ return c; }();
5726 auto e = [a, &b](int x) mutable {
5727 const auto identity = [](int y){ return y; };
5728 for (auto i = 0; i < a; ++i)
5729 a += b--;
5730 return x + identity(a + b);
5731 }(0);
5732 return a + b + c + d + e;
5733 }
5734
5735 int
5736 test3()
5737 {
5738 const auto nullary = [](){ return 0; };
5739 const auto unary = [](int x){ return x; };
5740 using nullary_t = decltype(nullary);
5741 using unary_t = decltype(unary);
5742 const auto higher1st = [](nullary_t f){ return f(); };
5743 const auto higher2nd = [unary](nullary_t f1){
5744 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5745 };
5746 return higher1st(nullary) + higher2nd(nullary)(unary);
5747 }
5748
5749 }
5750
5751 namespace test_variadic_templates
5752 {
5753
5754 template <int...>
5755 struct sum;
5756
5757 template <int N0, int... N1toN>
5758 struct sum<N0, N1toN...>
5759 {
5760 static constexpr auto value = N0 + sum<N1toN...>::value;
5761 };
5762
5763 template <>
5764 struct sum<>
5765 {
5766 static constexpr auto value = 0;
5767 };
5768
5769 static_assert(sum<>::value == 0, "");
5770 static_assert(sum<1>::value == 1, "");
5771 static_assert(sum<23>::value == 23, "");
5772 static_assert(sum<1, 2>::value == 3, "");
5773 static_assert(sum<5, 5, 11>::value == 21, "");
5774 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5775
5776 }
5777
5778 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5779 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5780 // because of this.
5781 namespace test_template_alias_sfinae
5782 {
5783
5784 struct foo {};
5785
5786 template<typename T>
5787 using member = typename T::member_type;
5788
5789 template<typename T>
5790 void func(...) {}
5791
5792 template<typename T>
5793 void func(member<T>*) {}
5794
5795 void test();
5796
5797 void test() { func<foo>(0); }
5798
5799 }
5800
5801} // namespace cxx11
5802
5803#endif // __cplusplus >= 201103L
5804
5805
5806
5807_ACEOF
5808if ac_fn_cxx_try_compile "$LINENO"; then :
5809 eval $cachevar=yes
5810else
5811 eval $cachevar=no
5812fi
5813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5814 CXX="$ac_save_CXX"
5815fi
5816eval ac_res=\$$cachevar
5817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5818$as_echo "$ac_res" >&6; }
5819 if eval test x\$$cachevar = xyes; then
5820 CXX_DIALECT="$switch"
5821 ac_success=yes
5822 break
5823 fi
5824 done
5825 fi
5826
5827 if test x$ac_success = xno; then
41260ac2
SM
5828 for alternative in ${ax_cxx_compile_alternatives}; do
5829 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5830 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
0bcda685 5832$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
d0ac1c44 5833if eval \${$cachevar+:} false; then :
0bcda685
PA
5834 $as_echo_n "(cached) " >&6
5835else
5836 ac_save_CXX="$CXX"
41260ac2
SM
5837 CXX="$CXX $switch"
5838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0bcda685
PA
5839/* end confdefs.h. */
5840
5841
5842// If the compiler admits that it is not ready for C++11, why torture it?
5843// Hopefully, this will speed up the test.
5844
5845#ifndef __cplusplus
5846
5847#error "This is not a C++ compiler"
5848
5849#elif __cplusplus < 201103L
5850
5851#error "This is not a C++11 compiler"
5852
5853#else
5854
5855namespace cxx11
5856{
5857
5858 namespace test_static_assert
5859 {
5860
5861 template <typename T>
5862 struct check
5863 {
5864 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5865 };
5866
5867 }
5868
5869 namespace test_final_override
5870 {
5871
5872 struct Base
5873 {
5874 virtual void f() {}
5875 };
5876
5877 struct Derived : public Base
5878 {
5879 virtual void f() override {}
5880 };
5881
5882 }
5883
5884 namespace test_double_right_angle_brackets
5885 {
5886
5887 template < typename T >
5888 struct check {};
5889
5890 typedef check<void> single_type;
5891 typedef check<check<void>> double_type;
5892 typedef check<check<check<void>>> triple_type;
5893 typedef check<check<check<check<void>>>> quadruple_type;
5894
5895 }
5896
5897 namespace test_decltype
5898 {
5899
5900 int
5901 f()
5902 {
5903 int a = 1;
5904 decltype(a) b = 2;
5905 return a + b;
5906 }
5907
5908 }
5909
5910 namespace test_type_deduction
5911 {
5912
5913 template < typename T1, typename T2 >
5914 struct is_same
5915 {
5916 static const bool value = false;
5917 };
5918
5919 template < typename T >
5920 struct is_same<T, T>
5921 {
5922 static const bool value = true;
5923 };
5924
5925 template < typename T1, typename T2 >
5926 auto
5927 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5928 {
5929 return a1 + a2;
5930 }
5931
5932 int
5933 test(const int c, volatile int v)
5934 {
5935 static_assert(is_same<int, decltype(0)>::value == true, "");
5936 static_assert(is_same<int, decltype(c)>::value == false, "");
5937 static_assert(is_same<int, decltype(v)>::value == false, "");
5938 auto ac = c;
5939 auto av = v;
5940 auto sumi = ac + av + 'x';
5941 auto sumf = ac + av + 1.0;
5942 static_assert(is_same<int, decltype(ac)>::value == true, "");
5943 static_assert(is_same<int, decltype(av)>::value == true, "");
5944 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5945 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5946 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5947 return (sumf > 0.0) ? sumi : add(c, v);
5948 }
5949
5950 }
5951
5952 namespace test_noexcept
5953 {
5954
5955 int f() { return 0; }
5956 int g() noexcept { return 0; }
5957
5958 static_assert(noexcept(f()) == false, "");
5959 static_assert(noexcept(g()) == true, "");
5960
5961 }
5962
5963 namespace test_constexpr
5964 {
5965
5966 template < typename CharT >
5967 unsigned long constexpr
5968 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5969 {
5970 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5971 }
5972
5973 template < typename CharT >
5974 unsigned long constexpr
5975 strlen_c(const CharT *const s) noexcept
5976 {
5977 return strlen_c_r(s, 0UL);
5978 }
5979
5980 static_assert(strlen_c("") == 0UL, "");
5981 static_assert(strlen_c("1") == 1UL, "");
5982 static_assert(strlen_c("example") == 7UL, "");
5983 static_assert(strlen_c("another\0example") == 7UL, "");
5984
5985 }
5986
5987 namespace test_rvalue_references
5988 {
5989
5990 template < int N >
5991 struct answer
5992 {
5993 static constexpr int value = N;
5994 };
5995
5996 answer<1> f(int&) { return answer<1>(); }
5997 answer<2> f(const int&) { return answer<2>(); }
5998 answer<3> f(int&&) { return answer<3>(); }
5999
6000 void
6001 test()
6002 {
6003 int i = 0;
6004 const int c = 0;
6005 static_assert(decltype(f(i))::value == 1, "");
6006 static_assert(decltype(f(c))::value == 2, "");
6007 static_assert(decltype(f(0))::value == 3, "");
6008 }
6009
6010 }
6011
6012 namespace test_uniform_initialization
6013 {
6014
6015 struct test
6016 {
6017 static const int zero {};
6018 static const int one {1};
6019 };
6020
6021 static_assert(test::zero == 0, "");
6022 static_assert(test::one == 1, "");
6023
6024 }
6025
6026 namespace test_lambdas
6027 {
6028
6029 void
6030 test1()
6031 {
6032 auto lambda1 = [](){};
6033 auto lambda2 = lambda1;
6034 lambda1();
6035 lambda2();
6036 }
6037
6038 int
6039 test2()
6040 {
6041 auto a = [](int i, int j){ return i + j; }(1, 2);
6042 auto b = []() -> int { return '0'; }();
6043 auto c = [=](){ return a + b; }();
6044 auto d = [&](){ return c; }();
6045 auto e = [a, &b](int x) mutable {
6046 const auto identity = [](int y){ return y; };
6047 for (auto i = 0; i < a; ++i)
6048 a += b--;
6049 return x + identity(a + b);
6050 }(0);
6051 return a + b + c + d + e;
6052 }
6053
6054 int
6055 test3()
6056 {
6057 const auto nullary = [](){ return 0; };
6058 const auto unary = [](int x){ return x; };
6059 using nullary_t = decltype(nullary);
6060 using unary_t = decltype(unary);
6061 const auto higher1st = [](nullary_t f){ return f(); };
6062 const auto higher2nd = [unary](nullary_t f1){
6063 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6064 };
6065 return higher1st(nullary) + higher2nd(nullary)(unary);
6066 }
6067
6068 }
6069
6070 namespace test_variadic_templates
6071 {
6072
6073 template <int...>
6074 struct sum;
6075
6076 template <int N0, int... N1toN>
6077 struct sum<N0, N1toN...>
6078 {
6079 static constexpr auto value = N0 + sum<N1toN...>::value;
6080 };
6081
6082 template <>
6083 struct sum<>
6084 {
6085 static constexpr auto value = 0;
6086 };
6087
6088 static_assert(sum<>::value == 0, "");
6089 static_assert(sum<1>::value == 1, "");
6090 static_assert(sum<23>::value == 23, "");
6091 static_assert(sum<1, 2>::value == 3, "");
6092 static_assert(sum<5, 5, 11>::value == 21, "");
6093 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6094
6095 }
6096
6097 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6098 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6099 // because of this.
6100 namespace test_template_alias_sfinae
6101 {
6102
6103 struct foo {};
6104
6105 template<typename T>
6106 using member = typename T::member_type;
6107
6108 template<typename T>
6109 void func(...) {}
6110
6111 template<typename T>
6112 void func(member<T>*) {}
6113
6114 void test();
6115
6116 void test() { func<foo>(0); }
6117
6118 }
6119
6120} // namespace cxx11
6121
6122#endif // __cplusplus >= 201103L
6123
6124
6125
6126_ACEOF
6127if ac_fn_cxx_try_compile "$LINENO"; then :
6128 eval $cachevar=yes
6129else
6130 eval $cachevar=no
6131fi
6132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260ac2 6133 CXX="$ac_save_CXX"
0bcda685
PA
6134fi
6135eval ac_res=\$$cachevar
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6137$as_echo "$ac_res" >&6; }
41260ac2
SM
6138 if eval test x\$$cachevar = xyes; then
6139 CXX_DIALECT="$switch"
6140 ac_success=yes
6141 break
6142 fi
6143 done
6144 if test x$ac_success = xyes; then
0bcda685
PA
6145 break
6146 fi
6147 done
6148 fi
6149 ac_ext=c
6150ac_cpp='$CPP $CPPFLAGS'
6151ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6152ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6153ac_compiler_gnu=$ac_cv_c_compiler_gnu
6154
6155 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6156 if test x$ac_success = xno; then
d0ac1c44 6157 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
0bcda685
PA
6158 fi
6159 fi
6160 if test x$ac_success = xno; then
6161 HAVE_CXX11=0
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6163$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6164 else
6165 HAVE_CXX11=1
6166
6167$as_echo "#define HAVE_CXX11 1" >>confdefs.h
6168
6169 fi
6170
6171
6172
6173
a417dc56
RW
6174# Dependency checking.
6175rm -rf .tst 2>/dev/null
6176mkdir .tst 2>/dev/null
6177if test -d .tst; then
6178 am__leading_dot=.
6179else
6180 am__leading_dot=_
6181fi
6182rmdir .tst 2>/dev/null
6183
6184DEPDIR="${am__leading_dot}deps"
6185
81ecdfbb 6186ac_config_commands="$ac_config_commands depdir"
a417dc56
RW
6187
6188
6189depcc="$CC" am_compiler_list=
6190
6191am_depcomp=$ac_aux_dir/depcomp
81ecdfbb
RW
6192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6193$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 6194if ${am_cv_CC_dependencies_compiler_type+:} false; then :
81ecdfbb 6195 $as_echo_n "(cached) " >&6
a417dc56
RW
6196else
6197 if test -f "$am_depcomp"; then
6198 # We make a subdir and do the tests there. Otherwise we can end up
6199 # making bogus files that we don't know about and never remove. For
6200 # instance it was reported that on HP-UX the gcc test will end up
6201 # making a dummy file named `D' -- because `-MD' means `put the output
6202 # in D'.
6203 mkdir conftest.dir
6204 # Copy depcomp to subdir because otherwise we won't find it if we're
6205 # using a relative directory.
6206 cp "$am_depcomp" conftest.dir
6207 cd conftest.dir
6208 # We will build objects and dependencies in a subdirectory because
6209 # it helps to detect inapplicable dependency modes. For instance
6210 # both Tru64's cc and ICC support -MD to output dependencies as a
6211 # side effect of compilation, but ICC will put the dependencies in
6212 # the current directory while Tru64 will put them in the object
6213 # directory.
6214 mkdir sub
6215
6216 am_cv_CC_dependencies_compiler_type=none
6217 if test "$am_compiler_list" = ""; then
6218 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6219 fi
6220 for depmode in $am_compiler_list; do
6221 if test $depmode = none; then break; fi
6222
81ecdfbb 6223 $as_echo "$as_me:$LINENO: trying $depmode" >&5
a417dc56
RW
6224 # Setup a source with many dependencies, because some compilers
6225 # like to wrap large dependency lists on column 80 (with \), and
6226 # we should not choose a depcomp mode which is confused by this.
6227 #
6228 # We need to recreate these files for each test, as the compiler may
6229 # overwrite some of them when testing with obscure command lines.
6230 # This happens at least with the AIX C compiler.
6231 : > sub/conftest.c
6232 for i in 1 2 3 4 5 6; do
6233 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6234 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6235 # Solaris 8's {/usr,}/bin/sh.
6236 touch sub/conftst$i.h
6237 done
6238 echo "include sub/conftest.Po" > confmf
6239
6240 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6241 # mode. It turns out that the SunPro C++ compiler does not properly
6242 # handle `-M -o', and we need to detect this.
6243 depcmd="depmode=$depmode \
6244 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6245 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6246 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6247 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6248 if env $depcmd > conftest.err 2>&1 &&
6249 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6250 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6251 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6252 # icc doesn't choke on unknown options, it will just issue warnings
6253 # or remarks (even with -Werror). So we grep stderr for any message
6254 # that says an option was ignored or not supported.
6255 # When given -MP, icc 7.0 and 7.1 complain thusly:
6256 # icc: Command line warning: ignoring option '-M'; no argument required
6257 # The diagnosis changed in icc 8.0:
6258 # icc: Command line remark: option '-MP' not supported
6259 if (grep 'ignoring option' conftest.err ||
6260 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6261 am_cv_CC_dependencies_compiler_type=$depmode
81ecdfbb 6262 $as_echo "$as_me:$LINENO: success" >&5
a417dc56
RW
6263 break
6264 fi
6265 fi
81ecdfbb 6266 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
a417dc56
RW
6267 sed -e 's/^/| /' < conftest.err >&5
6268 done
6269
6270 cd ..
6271 rm -rf conftest.dir
6272else
6273 am_cv_CC_dependencies_compiler_type=none
6274fi
6275
6276fi
81ecdfbb
RW
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6278$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
a417dc56 6279if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
d0ac1c44 6280then as_fn_error $? "no usable dependency style found" "$LINENO" 5
a417dc56
RW
6281else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6282
6283fi
6284
6285
c971b7fa
PA
6286
6287CONFIG_OBS=
6288CONFIG_DEPS=
6289CONFIG_SRCS=
6290ENABLE_CFLAGS=
6291
6292CONFIG_ALL=
6293CONFIG_CLEAN=
6294CONFIG_INSTALL=
6295CONFIG_UNINSTALL=
6296
6297# If we haven't got the data from the intl directory,
6298# assume NLS is disabled.
6299USE_NLS=no
6300LIBINTL=
6301LIBINTL_DEP=
6302INCINTL=
6303XGETTEXT=
6304GMSGFMT=
6305POSUB=
783e057b
DJ
6306
6307if test -f ../intl/config.intl; then
6308 . ../intl/config.intl
6309fi
81ecdfbb
RW
6310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6311$as_echo_n "checking whether NLS is requested... " >&6; }
783e057b 6312if test x"$USE_NLS" != xyes; then
81ecdfbb
RW
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6314$as_echo "no" >&6; }
783e057b 6315else
81ecdfbb
RW
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6317$as_echo "yes" >&6; }
783e057b 6318
81ecdfbb 6319$as_echo "#define ENABLE_NLS 1" >>confdefs.h
783e057b
DJ
6320
6321
81ecdfbb
RW
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6323$as_echo_n "checking for catalogs to be installed... " >&6; }
783e057b
DJ
6324 # Look for .po and .gmo files in the source directory.
6325 CATALOGS=
6326 XLINGUAS=
6327 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6328 # If there aren't any .gmo files the shell will give us the
6329 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6330 # weeded out.
6331 case "$cat" in *\**)
6332 continue;;
6333 esac
6334 # The quadruple backslash is collapsed to a double backslash
6335 # by the backticks, then collapsed again by the double quotes,
6336 # leaving us with one backslash in the sed expression (right
6337 # before the dot that mustn't act as a wildcard).
c971b7fa
PA
6338 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6339 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6340 # The user is allowed to set LINGUAS to a list of languages to
6341 # install catalogs for. If it's empty that means "all of them."
6342 if test "x$LINGUAS" = x; then
6343 CATALOGS="$CATALOGS $cat"
6344 XLINGUAS="$XLINGUAS $lang"
6345 else
6346 case "$LINGUAS" in *$lang*)
6347 CATALOGS="$CATALOGS $cat"
6348 XLINGUAS="$XLINGUAS $lang"
6349 ;;
6350 esac
e28b3332
DJ
6351 fi
6352 done
c971b7fa
PA
6353 LINGUAS="$XLINGUAS"
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6355$as_echo "$LINGUAS" >&6; }
6356
6357
6358 DATADIRNAME=share
6359
6360 INSTOBJEXT=.mo
6361
6362 GENCAT=gencat
6363
6364 CATOBJEXT=.gmo
e28b3332 6365
e28b3332
DJ
6366fi
6367
c971b7fa
PA
6368localedir='${datadir}/locale'
6369
6370
6371if test x"$USE_NLS" = xyes; then
6372 CONFIG_ALL="$CONFIG_ALL all-po"
6373 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6374 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6375 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
e28b3332 6376fi
e28b3332 6377
c971b7fa
PA
6378PACKAGE=gdb
6379
6380cat >>confdefs.h <<_ACEOF
6381#define PACKAGE "$PACKAGE"
6382_ACEOF
6383
6384
6385
6386# We never need to detect it in this sub-configure.
6387# But preserve it for config.status --recheck.
6388
6389
6390
6391MAKEINFO_EXTRA_FLAGS=""
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6393$as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
d0ac1c44 6394if ${gdb_cv_have_makeinfo_click+:} false; then :
c971b7fa
PA
6395 $as_echo_n "(cached) " >&6
6396else
6397 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6398 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6399 gdb_cv_have_makeinfo_click=yes
6400 else
6401 gdb_cv_have_makeinfo_click=no
6402 fi
6403fi
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6405$as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6406if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6407 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6408fi
e28b3332
DJ
6409
6410
bec39cab
AC
6411
6412
81ecdfbb
RW
6413# Check whether --with-separate-debug-dir was given.
6414if test "${with_separate_debug_dir+set}" = set; then :
6415 withval=$with_separate_debug_dir;
b14b1491
TT
6416 DEBUGDIR=$withval
6417else
6418 DEBUGDIR=${libdir}/debug
81ecdfbb
RW
6419fi
6420
20e95c23 6421
783e057b
DJ
6422 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6423 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 6424 ac_define_dir=`eval echo $DEBUGDIR`
783e057b 6425 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 6426
783e057b
DJ
6427cat >>confdefs.h <<_ACEOF
6428#define DEBUGDIR "$ac_define_dir"
20e95c23 6429_ACEOF
20e95c23 6430
20e95c23 6431
20e95c23 6432
0c4a4063 6433
b14b1491
TT
6434 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6435 if test "x$prefix" = xNONE; then
6436 test_prefix=/usr/local
6437 else
6438 test_prefix=$prefix
6439 fi
783e057b 6440 else
b14b1491 6441 test_prefix=$exec_prefix
783e057b 6442 fi
b14b1491
TT
6443 value=0
6444 case ${ac_define_dir} in
6445 "${test_prefix}"|"${test_prefix}/"*|\
6446 '${exec_prefix}'|'${exec_prefix}/'*)
6447 value=1
6448 ;;
6449 esac
6450
6451cat >>confdefs.h <<_ACEOF
6452#define DEBUGDIR_RELOCATABLE $value
6453_ACEOF
6454
6455
6456
0c4a4063 6457
f83d8a90
DE
6458# We can't pass paths as command line arguments.
6459# Mingw32 tries to be clever and will convert the paths for us.
6460# For example -DBINDIR="/usr/local/bin" passed on the command line may get
6461# converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6462# This breaks GDB's relocatable path conversions since paths passed in
6463# config.h would not get so translated, the path prefixes no longer match.
6464
6465 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6466 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6467 ac_define_dir=`eval echo $bindir`
6468 ac_define_dir=`eval echo $ac_define_dir`
6469
6470cat >>confdefs.h <<_ACEOF
6471#define BINDIR "$ac_define_dir"
6472_ACEOF
6473
6474
6475
b14b1491
TT
6476# GDB's datadir relocation
6477
6478
6479
81ecdfbb
RW
6480# Check whether --with-gdb-datadir was given.
6481if test "${with_gdb_datadir+set}" = set; then :
6482 withval=$with_gdb_datadir;
b14b1491 6483 GDB_DATADIR=$withval
20e95c23 6484else
b14b1491 6485 GDB_DATADIR=${datadir}/gdb
81ecdfbb
RW
6486fi
6487
20e95c23 6488
b14b1491
TT
6489 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6490 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6491 ac_define_dir=`eval echo $GDB_DATADIR`
6492 ac_define_dir=`eval echo $ac_define_dir`
6493
6494cat >>confdefs.h <<_ACEOF
6495#define GDB_DATADIR "$ac_define_dir"
20e95c23
DJ
6496_ACEOF
6497
b14b1491
TT
6498
6499
0c4a4063 6500
b14b1491
TT
6501 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6502 if test "x$prefix" = xNONE; then
6503 test_prefix=/usr/local
6504 else
6505 test_prefix=$prefix
6506 fi
6507 else
6508 test_prefix=$exec_prefix
6509 fi
6510 value=0
6511 case ${ac_define_dir} in
6512 "${test_prefix}"|"${test_prefix}/"*|\
6513 '${exec_prefix}'|'${exec_prefix}/'*)
6514 value=1
6515 ;;
6516 esac
6517
6518cat >>confdefs.h <<_ACEOF
6519#define GDB_DATADIR_RELOCATABLE $value
6520_ACEOF
6521
6522
783e057b 6523
20e95c23 6524
0c4a4063 6525
81ecdfbb
RW
6526# Check whether --with-relocated-sources was given.
6527if test "${with_relocated_sources+set}" = set; then :
6528 withval=$with_relocated_sources; reloc_srcdir="${withval}"
29b0e8a2
JM
6529
6530 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6531 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6532 ac_define_dir=`eval echo $reloc_srcdir`
6533 ac_define_dir=`eval echo $ac_define_dir`
6534
6535cat >>confdefs.h <<_ACEOF
6536#define RELOC_SRCDIR "$ac_define_dir"
6537_ACEOF
6538
6539
6540
81ecdfbb
RW
6541fi
6542
29b0e8a2 6543
7349ff92
JK
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6545$as_echo_n "checking for default auto-load directory... " >&6; }
6546
6547# Check whether --with-auto-load-dir was given.
6548if test "${with_auto_load_dir+set}" = set; then :
6549 withval=$with_auto_load_dir;
6550else
1564a261 6551 with_auto_load_dir='$debugdir:$datadir/auto-load'
7349ff92
JK
6552fi
6553
2861ee4f 6554escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
7349ff92
JK
6555
6556 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6557 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6558 ac_define_dir=`eval echo $escape_dir`
6559 ac_define_dir=`eval echo $ac_define_dir`
6560
6561cat >>confdefs.h <<_ACEOF
6562#define AUTO_LOAD_DIR "$ac_define_dir"
6563_ACEOF
6564
6565
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6567$as_echo "$with_auto_load_dir" >&6; }
6568
bccbefd2
JK
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6570$as_echo_n "checking for default auto-load safe-path... " >&6; }
6571
6572# Check whether --with-auto-load-safe-path was given.
6573if test "${with_auto_load_safe_path+set}" = set; then :
6574 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6dea1fbd
JK
6575 with_auto_load_safe_path="/"
6576 fi
bccbefd2 6577else
7349ff92 6578 with_auto_load_safe_path="$with_auto_load_dir"
bccbefd2
JK
6579fi
6580
2861ee4f 6581escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
bccbefd2
JK
6582
6583 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6584 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6dea1fbd 6585 ac_define_dir=`eval echo $escape_dir`
bccbefd2
JK
6586 ac_define_dir=`eval echo $ac_define_dir`
6587
6588cat >>confdefs.h <<_ACEOF
6dea1fbd 6589#define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
bccbefd2
JK
6590_ACEOF
6591
6592
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6594$as_echo "$with_auto_load_safe_path" >&6; }
6595
29b0e8a2 6596
20e95c23 6597
5ae98d25 6598subdirs="$subdirs testsuite"
20e95c23
DJ
6599
6600
783e057b 6601# Check whether to support alternative target configurations
81ecdfbb
RW
6602# Check whether --enable-targets was given.
6603if test "${enable_targets+set}" = set; then :
6604 enableval=$enable_targets; case "${enableval}" in
d0ac1c44 6605 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
783e057b
DJ
6606 ;;
6607 no) enable_targets= ;;
6608 *) enable_targets=$enableval ;;
6609esac
81ecdfbb
RW
6610fi
6611
20e95c23 6612
783e057b 6613# Check whether to enable 64-bit support on 32-bit hosts
81ecdfbb
RW
6614# Check whether --enable-64-bit-bfd was given.
6615if test "${enable_64_bit_bfd+set}" = set; then :
6616 enableval=$enable_64_bit_bfd; case "${enableval}" in
783e057b
DJ
6617 yes) want64=true ;;
6618 no) want64=false ;;
d0ac1c44 6619 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
783e057b
DJ
6620esac
6621else
6622 want64=false
81ecdfbb
RW
6623fi
6624
783e057b
DJ
6625# Provide defaults for some variables set by the per-host and per-target
6626# configuration.
6627gdb_host_obs=posix-hdep.o
20e95c23 6628
783e057b
DJ
6629if test "${target}" = "${host}"; then
6630 gdb_native=yes
6631else
6632 gdb_native=no
6633fi
20e95c23 6634
783e057b 6635. $srcdir/configure.host
20e95c23 6636
783e057b 6637# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 6638
783e057b
DJ
6639TARGET_OBS=
6640all_targets=
b292c783 6641HAVE_NATIVE_GCORE_TARGET=
20e95c23 6642
783e057b 6643for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 6644do
783e057b
DJ
6645 if test "$targ_alias" = "all"; then
6646 all_targets=true
6647 else
6648 # Canonicalize the secondary target names.
6649 result=`$ac_config_sub $targ_alias 2>/dev/null`
6650 if test -n "$result"; then
6651 targ=$result
6652 else
6653 targ=$targ_alias
6654 fi
20e95c23 6655
783e057b 6656 . ${srcdir}/configure.tgt
20e95c23 6657
bf307134 6658 if test -z "${gdb_target_obs}"; then :
d0ac1c44 6659 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
bf307134
JB
6660fi
6661
783e057b
DJ
6662 # Target-specific object files
6663 for i in ${gdb_target_obs}; do
6664 case " $TARGET_OBS " in
6665 *" ${i} "*) ;;
6666 *)
6667 TARGET_OBS="$TARGET_OBS ${i}"
6668 ;;
6669 esac
6670 done
20e95c23 6671
783e057b
DJ
6672 # Check whether this target needs 64-bit CORE_ADDR
6673 if test x${want64} = xfalse; then
6674 . ${srcdir}/../bfd/config.bfd
6675 fi
b292c783
JK
6676
6677 # Check whether this target is native and supports gcore.
6678 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6679 && $gdb_have_gcore; then
6680 HAVE_NATIVE_GCORE_TARGET=1
6681 fi
783e057b 6682 fi
20e95c23
DJ
6683done
6684
783e057b
DJ
6685if test x${all_targets} = xtrue; then
6686
6687 # We want all 64-bit targets if we either:
6688 # - run on a 64-bit host or
6689 # - already require 64-bit support for some other target or
6690 # - the --enable-64-bit-bfd option was supplied
6691 # Otherwise we only support all 32-bit targets.
6692 #
6693 # NOTE: This test must be in sync with the corresponding
6694 # tests in BFD!
20e95c23 6695
783e057b 6696 if test x${want64} = xfalse; then
81ecdfbb
RW
6697 # The cast to long int works around a bug in the HP C Compiler
6698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6700# This bug is HP SR number 8606223364.
6701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6702$as_echo_n "checking size of long... " >&6; }
d0ac1c44 6703if ${ac_cv_sizeof_long+:} false; then :
81ecdfbb 6704 $as_echo_n "(cached) " >&6
c0993dbe 6705else
81ecdfbb 6706 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
c0993dbe 6707
81ecdfbb
RW
6708else
6709 if test "$ac_cv_type_long" = yes; then
6710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6712as_fn_error 77 "cannot compute sizeof (long)
6713See \`config.log' for more details" "$LINENO" 5; }
81ecdfbb
RW
6714 else
6715 ac_cv_sizeof_long=0
6716 fi
c0993dbe 6717fi
81ecdfbb 6718
c0993dbe 6719fi
81ecdfbb
RW
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6721$as_echo "$ac_cv_sizeof_long" >&6; }
c0993dbe 6722
c0993dbe 6723
c0993dbe 6724
c0993dbe
UW
6725cat >>confdefs.h <<_ACEOF
6726#define SIZEOF_LONG $ac_cv_sizeof_long
6727_ACEOF
6728
6729
6730 if test "x${ac_cv_sizeof_long}" = "x8"; then
6731 want64=true
6732 fi
6733 fi
6734 if test x${want64} = xtrue; then
6735 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6736 else
6737 TARGET_OBS='$(ALL_TARGET_OBS)'
6738 fi
6739fi
6740
6741
6742
b292c783 6743
c0993dbe
UW
6744# For other settings, only the main target counts.
6745gdb_sim=
6746gdb_osabi=
c0993dbe
UW
6747targ=$target; . ${srcdir}/configure.tgt
6748
6749# Fetch the default architecture and default target vector from BFD.
6750targ=$target; . $srcdir/../bfd/config.bfd
6751
6752# We only want the first architecture, so strip off the others if
6753# there is more than one.
6754targ_archs=`echo $targ_archs | sed 's/ .*//'`
6755
6756if test "x$targ_archs" != x; then
6757
6758cat >>confdefs.h <<_ACEOF
6759#define DEFAULT_BFD_ARCH $targ_archs
6760_ACEOF
6761
6762fi
6763if test "x$targ_defvec" != x; then
6764
6765cat >>confdefs.h <<_ACEOF
6766#define DEFAULT_BFD_VEC $targ_defvec
6767_ACEOF
6768
6769fi
6770
c0993dbe 6771# Enable MI.
81ecdfbb
RW
6772# Check whether --enable-gdbmi was given.
6773if test "${enable_gdbmi+set}" = set; then :
6774 enableval=$enable_gdbmi; case $enableval in
c0993dbe
UW
6775 yes | no)
6776 ;;
6777 *)
d0ac1c44 6778 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
c0993dbe
UW
6779 esac
6780else
6781 enable_gdbmi=yes
81ecdfbb
RW
6782fi
6783
c0993dbe 6784if test x"$enable_gdbmi" = xyes; then
0ad6b8ee 6785 if test -d "$srcdir/mi"; then
c0993dbe
UW
6786 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6787 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6788 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6789 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6790 fi
6791fi
6792
6793# Enable TUI.
81ecdfbb
RW
6794# Check whether --enable-tui was given.
6795if test "${enable_tui+set}" = set; then :
6796 enableval=$enable_tui; case $enableval in
3ca64bd3 6797 yes | no | auto)
c0993dbe
UW
6798 ;;
6799 *)
d0ac1c44 6800 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
c0993dbe
UW
6801 esac
6802else
3ca64bd3 6803 enable_tui=auto
81ecdfbb
RW
6804fi
6805
c0993dbe
UW
6806
6807# Enable gdbtk.
81ecdfbb
RW
6808# Check whether --enable-gdbtk was given.
6809if test "${enable_gdbtk+set}" = set; then :
6810 enableval=$enable_gdbtk; case $enableval in
c0993dbe
UW
6811 yes | no)
6812 ;;
6813 *)
d0ac1c44 6814 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
c0993dbe
UW
6815 esac
6816else
0ad6b8ee 6817 if test -d "$srcdir/gdbtk"; then
c0993dbe
UW
6818 enable_gdbtk=yes
6819 else
6820 enable_gdbtk=no
6821 fi
81ecdfbb
RW
6822fi
6823
c0993dbe
UW
6824# We unconditionally disable gdbtk tests on selected platforms.
6825case $host_os in
6826 go32* | windows*)
81ecdfbb
RW
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6828$as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
c0993dbe
UW
6829 enable_gdbtk=no ;;
6830esac
6831
0d79cdc4
AM
6832# Handle optional debuginfod support
6833
f6720b1c
AM
6834
6835
6836
6837
6838
6839
6840if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6841 if test -n "$ac_tool_prefix"; then
6842 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6843set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6845$as_echo_n "checking for $ac_word... " >&6; }
6846if ${ac_cv_path_PKG_CONFIG+:} false; then :
6847 $as_echo_n "(cached) " >&6
6848else
6849 case $PKG_CONFIG in
6850 [\\/]* | ?:[\\/]*)
6851 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6852 ;;
6853 *)
6854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6855for as_dir in $PATH
6856do
6857 IFS=$as_save_IFS
6858 test -z "$as_dir" && as_dir=.
6859 for ac_exec_ext in '' $ac_executable_extensions; do
6860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6861 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6863 break 2
6864 fi
6865done
6866 done
6867IFS=$as_save_IFS
6868
6869 ;;
6870esac
6871fi
6872PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6873if test -n "$PKG_CONFIG"; then
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6875$as_echo "$PKG_CONFIG" >&6; }
6876else
6877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6878$as_echo "no" >&6; }
6879fi
6880
6881
6882fi
6883if test -z "$ac_cv_path_PKG_CONFIG"; then
6884 ac_pt_PKG_CONFIG=$PKG_CONFIG
6885 # Extract the first word of "pkg-config", so it can be a program name with args.
6886set dummy pkg-config; ac_word=$2
6887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6888$as_echo_n "checking for $ac_word... " >&6; }
6889if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6890 $as_echo_n "(cached) " >&6
6891else
6892 case $ac_pt_PKG_CONFIG in
6893 [\\/]* | ?:[\\/]*)
6894 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6895 ;;
6896 *)
6897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6898for as_dir in $PATH
6899do
6900 IFS=$as_save_IFS
6901 test -z "$as_dir" && as_dir=.
6902 for ac_exec_ext in '' $ac_executable_extensions; do
6903 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6904 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6906 break 2
6907 fi
6908done
6909 done
6910IFS=$as_save_IFS
6911
6912 ;;
6913esac
6914fi
6915ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6916if test -n "$ac_pt_PKG_CONFIG"; then
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6918$as_echo "$ac_pt_PKG_CONFIG" >&6; }
6919else
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6921$as_echo "no" >&6; }
6922fi
6923
6924 if test "x$ac_pt_PKG_CONFIG" = x; then
6925 PKG_CONFIG=""
6926 else
6927 case $cross_compiling:$ac_tool_warned in
6928yes:)
6929{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6930$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6931ac_tool_warned=yes ;;
6932esac
6933 PKG_CONFIG=$ac_pt_PKG_CONFIG
6934 fi
6935else
6936 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6937fi
6938
6939fi
6940if test -n "$PKG_CONFIG"; then
6941 _pkg_min_version=0.9.0
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6943$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6944 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6946$as_echo "yes" >&6; }
6947 else
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6949$as_echo "no" >&6; }
6950 PKG_CONFIG=""
6951 fi
6952fi
6953
6954# Handle optional debuginfod support
0d79cdc4
AM
6955
6956# Check whether --with-debuginfod was given.
6957if test "${with_debuginfod+set}" = set; then :
6958 withval=$with_debuginfod;
6959else
6960 with_debuginfod=auto
6961fi
6962
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6964$as_echo_n "checking whether to use debuginfod... " >&6; }
6965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6966$as_echo "$with_debuginfod" >&6; }
6967
f6720b1c 6968if test "x$with_debuginfod" != xno; then
0d79cdc4 6969
f6720b1c
AM
6970pkg_failed=no
6971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
6972$as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
6973
6974if test -n "$DEBUGINFOD_CFLAGS"; then
6975 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
6976 elif test -n "$PKG_CONFIG"; then
6977 if test -n "$PKG_CONFIG" && \
6978 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
6979 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
6980 ac_status=$?
6981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6982 test $ac_status = 0; }; then
6983 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
6984 test "x$?" != "x0" && pkg_failed=yes
0d79cdc4 6985else
f6720b1c 6986 pkg_failed=yes
0d79cdc4 6987fi
f6720b1c
AM
6988 else
6989 pkg_failed=untried
0d79cdc4 6990fi
f6720b1c
AM
6991if test -n "$DEBUGINFOD_LIBS"; then
6992 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
6993 elif test -n "$PKG_CONFIG"; then
6994 if test -n "$PKG_CONFIG" && \
6995 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
6996 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
6997 ac_status=$?
6998 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6999 test $ac_status = 0; }; then
7000 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7001 test "x$?" != "x0" && pkg_failed=yes
7002else
7003 pkg_failed=yes
0d79cdc4 7004fi
f6720b1c
AM
7005 else
7006 pkg_failed=untried
0d79cdc4 7007fi
bec39cab 7008
377170fa
L
7009if test $pkg_failed = no; then
7010 pkg_save_LDFLAGS="$LDFLAGS"
7011 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d70f978b
L
7013/* end confdefs.h. */
7014
7015int
7016main ()
7017{
377170fa 7018
d70f978b
L
7019 ;
7020 return 0;
7021}
7022_ACEOF
7023if ac_fn_c_try_link "$LINENO"; then :
377170fa 7024
d70f978b
L
7025else
7026 pkg_failed=yes
7027fi
7028rm -f core conftest.err conftest.$ac_objext \
7029 conftest$ac_exeext conftest.$ac_ext
377170fa
L
7030 LDFLAGS=$pkg_save_LDFLAGS
7031fi
d70f978b 7032
0d79cdc4 7033
0d79cdc4 7034
f6720b1c
AM
7035if test $pkg_failed = yes; then
7036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7037$as_echo "no" >&6; }
0d79cdc4 7038
f6720b1c
AM
7039if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7040 _pkg_short_errors_supported=yes
7041else
7042 _pkg_short_errors_supported=no
7043fi
7044 if test $_pkg_short_errors_supported = yes; then
7045 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7046 else
7047 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7048 fi
7049 # Put the nasty error message in config.log where it belongs
7050 echo "$DEBUGINFOD_PKG_ERRORS" >&5
0d79cdc4 7051
f6720b1c
AM
7052 if test "x$with_debuginfod" = xyes; then
7053 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7054 else
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7056$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7057 fi
7058elif test $pkg_failed = untried; then
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060$as_echo "no" >&6; }
7061 if test "x$with_debuginfod" = xyes; then
7062 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7063 else
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7065$as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7066 fi
7067else
7068 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7069 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7071$as_echo "yes" >&6; }
7072
7073$as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7074
7075fi
7076else
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7078$as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
0d79cdc4
AM
7079fi
7080
7081
7082# Libunwind support for ia64.
05e7c244
JK
7083
7084# Check whether --with-libunwind-ia64 was given.
7085if test "${with_libunwind_ia64+set}" = set; then :
7086 withval=$with_libunwind_ia64;
bec39cab 7087else
05e7c244
JK
7088 with_libunwind_ia64=auto
7089fi
bec39cab 7090
05e7c244
JK
7091
7092# Backward compatibility option.
7093if test "${with_libunwind+set}" = set; then
7094 if test x"$with_libunwind_ia64" != xauto; then
d0ac1c44 7095 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
05e7c244
JK
7096 fi
7097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7098$as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7099 with_libunwind_ia64="$with_libunwind"
7100fi
7101
7102case "$with_libunwind_ia64" in
7103 yes | no)
7104 ;;
7105 auto)
7106 for ac_header in libunwind-ia64.h
81ecdfbb 7107do :
b54a8fd7 7108 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7109if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7110 cat >>confdefs.h <<_ACEOF
b54a8fd7 7111#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7112_ACEOF
7113
7114fi
7115
7116done
7117
05e7c244
JK
7118 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7119 ;;
7120 *)
d0ac1c44 7121 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
05e7c244
JK
7122 ;;
7123esac
bec39cab 7124
05e7c244 7125if test x"$with_libunwind_ia64" = xyes; then
b54a8fd7 7126 for ac_header in libunwind-ia64.h
81ecdfbb 7127do :
b54a8fd7 7128 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
d0ac1c44 7129if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
bec39cab 7130 cat >>confdefs.h <<_ACEOF
b54a8fd7 7131#define HAVE_LIBUNWIND_IA64_H 1
bec39cab
AC
7132_ACEOF
7133
7134fi
7135
7136done
7137
05e7c244 7138 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
d0ac1c44 7139 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
05e7c244
JK
7140 fi
7141 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7142 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7143 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
a9322a30
TT
7144fi
7145
cb01cfba
JB
7146opt_curses=no
7147
81ecdfbb
RW
7148# Check whether --with-curses was given.
7149if test "${with_curses+set}" = set; then :
7150 withval=$with_curses; opt_curses=$withval
7151fi
7152
cb01cfba 7153
76a39ba7 7154prefer_curses=no
cb01cfba 7155if test "$opt_curses" = "yes"; then
76a39ba7 7156 prefer_curses=yes
cb01cfba
JB
7157fi
7158
a9322a30 7159# Profiling support.
81ecdfbb
RW
7160# Check whether --enable-profiling was given.
7161if test "${enable_profiling+set}" = set; then :
7162 enableval=$enable_profiling; case $enableval in
a9322a30
TT
7163 yes | no)
7164 ;;
7165 *)
d0ac1c44 7166 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
a9322a30
TT
7167 esac
7168else
7169 enable_profiling=no
81ecdfbb 7170fi
bec39cab 7171
a9322a30
TT
7172
7173for ac_func in monstartup _mcleanup
81ecdfbb
RW
7174do :
7175 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7176ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 7177if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81ecdfbb
RW
7178 cat >>confdefs.h <<_ACEOF
7179#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 7180_ACEOF
a9322a30 7181
81ecdfbb
RW
7182fi
7183done
a9322a30 7184
81ecdfbb
RW
7185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7186$as_echo_n "checking for _etext... " >&6; }
d0ac1c44 7187if ${ac_cv_var__etext+:} false; then :
81ecdfbb
RW
7188 $as_echo_n "(cached) " >&6
7189else
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191/* end confdefs.h. */
7192#include <stdlib.h>
7193extern char _etext;
a9322a30
TT
7194
7195int
7196main ()
7197{
7198free (&_etext);
7199 ;
7200 return 0;
7201}
bec39cab 7202_ACEOF
81ecdfbb 7203if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7204 ac_cv_var__etext=yes
bec39cab 7205else
81ecdfbb 7206 ac_cv_var__etext=no
bec39cab 7207fi
81ecdfbb
RW
7208rm -f core conftest.err conftest.$ac_objext \
7209 conftest$ac_exeext conftest.$ac_ext
bec39cab 7210fi
81ecdfbb
RW
7211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7212$as_echo "$ac_cv_var__etext" >&6; }
0ad6b8ee 7213if test "$ac_cv_var__etext" = yes; then
60ca704f 7214
81ecdfbb 7215$as_echo "#define HAVE__ETEXT 1" >>confdefs.h
bec39cab 7216
bec39cab 7217fi
81ecdfbb
RW
7218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7219$as_echo_n "checking for etext... " >&6; }
d0ac1c44 7220if ${ac_cv_var_etext+:} false; then :
81ecdfbb 7221 $as_echo_n "(cached) " >&6
bec39cab 7222else
81ecdfbb 7223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7224/* end confdefs.h. */
a9322a30
TT
7225#include <stdlib.h>
7226extern char etext;
bec39cab
AC
7227
7228int
7229main ()
7230{
a9322a30 7231free (&etext);
bec39cab
AC
7232 ;
7233 return 0;
7234}
7235_ACEOF
81ecdfbb 7236if ac_fn_c_try_link "$LINENO"; then :
a9322a30 7237 ac_cv_var_etext=yes
bec39cab 7238else
81ecdfbb 7239 ac_cv_var_etext=no
bec39cab 7240fi
81ecdfbb
RW
7241rm -f core conftest.err conftest.$ac_objext \
7242 conftest$ac_exeext conftest.$ac_ext
bec39cab 7243fi
81ecdfbb
RW
7244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7245$as_echo "$ac_cv_var_etext" >&6; }
0ad6b8ee 7246if test "$ac_cv_var_etext" = yes; then
a9322a30 7247
81ecdfbb 7248$as_echo "#define HAVE_ETEXT 1" >>confdefs.h
bec39cab
AC
7249
7250fi
a9322a30 7251if test "$enable_profiling" = yes ; then
0ad6b8ee 7252 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
d0ac1c44 7253 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
a9322a30
TT
7254 fi
7255 PROFILE_CFLAGS=-pg
7256 OLD_CFLAGS="$CFLAGS"
7257 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 7258
81ecdfbb
RW
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7260$as_echo_n "checking whether $CC supports -pg... " >&6; }
d0ac1c44 7261if ${ac_cv_cc_supports_pg+:} false; then :
81ecdfbb 7262 $as_echo_n "(cached) " >&6
bec39cab 7263else
81ecdfbb 7264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 7265/* end confdefs.h. */
bec39cab
AC
7266
7267int
7268main ()
7269{
a9322a30 7270int x;
bec39cab
AC
7271 ;
7272 return 0;
7273}
7274_ACEOF
81ecdfbb 7275if ac_fn_c_try_compile "$LINENO"; then :
a9322a30 7276 ac_cv_cc_supports_pg=yes
bec39cab 7277else
81ecdfbb 7278 ac_cv_cc_supports_pg=no
bec39cab 7279fi
81ecdfbb 7280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 7281fi
81ecdfbb
RW
7282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7283$as_echo "$ac_cv_cc_supports_pg" >&6; }
bec39cab 7284
0ad6b8ee 7285 if test "$ac_cv_cc_supports_pg" = no; then
d0ac1c44 7286 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
a9322a30 7287 fi
bec39cab 7288
a9322a30 7289 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
7290fi
7291
44cee4fd
TT
7292CODESIGN_CERT=
7293# Check whether --enable-codesign was given.
7294if test "${enable_codesign+set}" = set; then :
7295 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7296fi
7297
7298
7299
c16158bc
JM
7300
7301
81ecdfbb
RW
7302# Check whether --with-pkgversion was given.
7303if test "${with_pkgversion+set}" = set; then :
7304 withval=$with_pkgversion; case "$withval" in
d0ac1c44 7305 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
c16158bc
JM
7306 no) PKGVERSION= ;;
7307 *) PKGVERSION="($withval) " ;;
7308 esac
7309else
7310 PKGVERSION="(GDB) "
7311
81ecdfbb 7312fi
c16158bc
JM
7313
7314
7315
7316
81ecdfbb
RW
7317
7318# Check whether --with-bugurl was given.
7319if test "${with_bugurl+set}" = set; then :
7320 withval=$with_bugurl; case "$withval" in
d0ac1c44 7321 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
c16158bc
JM
7322 no) BUGURL=
7323 ;;
7324 *) BUGURL="$withval"
7325 ;;
7326 esac
7327else
112c22ed 7328 BUGURL="https://www.gnu.org/software/gdb/bugs/"
c16158bc 7329
81ecdfbb
RW
7330fi
7331
c16158bc
JM
7332 case ${BUGURL} in
7333 "")
7334 REPORT_BUGS_TO=
7335 REPORT_BUGS_TEXI=
7336 ;;
7337 *)
7338 REPORT_BUGS_TO="<$BUGURL>"
7339 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7340 ;;
7341 esac;
7342
7343
7344
7345
7346cat >>confdefs.h <<_ACEOF
7347#define PKGVERSION "$PKGVERSION"
7348_ACEOF
7349
7350
7351cat >>confdefs.h <<_ACEOF
7352#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7353_ACEOF
7354
7355
bec39cab
AC
7356# --------------------- #
7357# Checks for programs. #
7358# --------------------- #
7359
7360for ac_prog in gawk mawk nawk awk
7361do
7362 # Extract the first word of "$ac_prog", so it can be a program name with args.
7363set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7365$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7366if ${ac_cv_prog_AWK+:} false; then :
81ecdfbb 7367 $as_echo_n "(cached) " >&6
bec39cab
AC
7368else
7369 if test -n "$AWK"; then
7370 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7371else
7372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7373for as_dir in $PATH
7374do
7375 IFS=$as_save_IFS
7376 test -z "$as_dir" && as_dir=.
81ecdfbb 7377 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7379 ac_cv_prog_AWK="$ac_prog"
81ecdfbb 7380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7381 break 2
7382 fi
7383done
81ecdfbb
RW
7384 done
7385IFS=$as_save_IFS
bec39cab
AC
7386
7387fi
7388fi
7389AWK=$ac_cv_prog_AWK
7390if test -n "$AWK"; then
81ecdfbb
RW
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7392$as_echo "$AWK" >&6; }
bec39cab 7393else
81ecdfbb
RW
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7395$as_echo "no" >&6; }
bec39cab
AC
7396fi
7397
bec39cab 7398
81ecdfbb 7399 test -n "$AWK" && break
bec39cab
AC
7400done
7401
c971b7fa
PA
7402# Find a good install program. We prefer a C program (faster),
7403# so one script is as good as another. But avoid the broken or
7404# incompatible versions:
7405# SysV /etc/install, /usr/sbin/install
7406# SunOS /usr/etc/install
7407# IRIX /sbin/install
7408# AIX /bin/install
7409# AmigaOS /C/install, which installs bootblocks on floppy discs
7410# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7411# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7412# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7413# OS/2's system install, which has a completely different semantic
7414# ./install, which can be erroneously created by make from ./install.sh.
7415# Reject install programs that cannot install multiple files.
7416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7417$as_echo_n "checking for a BSD-compatible install... " >&6; }
7418if test -z "$INSTALL"; then
d0ac1c44 7419if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
7420 $as_echo_n "(cached) " >&6
7421else
7422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423for as_dir in $PATH
7424do
7425 IFS=$as_save_IFS
7426 test -z "$as_dir" && as_dir=.
7427 # Account for people who put trailing slashes in PATH elements.
7428case $as_dir/ in #((
7429 ./ | .// | /[cC]/* | \
7430 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7431 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7432 /usr/ucb/* ) ;;
7433 *)
7434 # OSF1 and SCO ODT 3.0 have their own names for install.
7435 # Don't use installbsd from OSF since it installs stuff as root
7436 # by default.
7437 for ac_prog in ginstall scoinst install; do
7438 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7439 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
7440 if test $ac_prog = install &&
7441 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7442 # AIX install. It has an incompatible calling convention.
7443 :
7444 elif test $ac_prog = install &&
7445 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7446 # program-specific install script used by HP pwplus--don't use.
7447 :
7448 else
7449 rm -rf conftest.one conftest.two conftest.dir
7450 echo one > conftest.one
7451 echo two > conftest.two
7452 mkdir conftest.dir
7453 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7454 test -s conftest.one && test -s conftest.two &&
7455 test -s conftest.dir/conftest.one &&
7456 test -s conftest.dir/conftest.two
7457 then
7458 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7459 break 3
7460 fi
7461 fi
7462 fi
7463 done
7464 done
7465 ;;
7466esac
7467
7468 done
7469IFS=$as_save_IFS
7470
7471rm -rf conftest.one conftest.two conftest.dir
7472
7473fi
7474 if test "${ac_cv_path_install+set}" = set; then
7475 INSTALL=$ac_cv_path_install
7476 else
7477 # As a last resort, use the slow shell script. Don't cache a
7478 # value for INSTALL within a source directory, because that will
7479 # break other packages using the cache if that directory is
7480 # removed, or if the value is a relative name.
7481 INSTALL=$ac_install_sh
7482 fi
7483fi
7484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7485$as_echo "$INSTALL" >&6; }
7486
7487# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7488# It thinks the first close brace ends the variable substitution.
7489test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7490
7491test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7492
7493test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
bec39cab 7494
81ecdfbb
RW
7495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7496$as_echo_n "checking whether ln -s works... " >&6; }
bec39cab
AC
7497LN_S=$as_ln_s
7498if test "$LN_S" = "ln -s"; then
81ecdfbb
RW
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7500$as_echo "yes" >&6; }
bec39cab 7501else
81ecdfbb
RW
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7503$as_echo "no, using $LN_S" >&6; }
bec39cab
AC
7504fi
7505
7506if test -n "$ac_tool_prefix"; then
7507 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7508set dummy ${ac_tool_prefix}ranlib; ac_word=$2
81ecdfbb
RW
7509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7510$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7511if ${ac_cv_prog_RANLIB+:} false; then :
81ecdfbb 7512 $as_echo_n "(cached) " >&6
bec39cab
AC
7513else
7514 if test -n "$RANLIB"; then
7515 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7516else
7517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7518for as_dir in $PATH
7519do
7520 IFS=$as_save_IFS
7521 test -z "$as_dir" && as_dir=.
81ecdfbb 7522 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7524 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
81ecdfbb 7525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7526 break 2
7527 fi
7528done
81ecdfbb
RW
7529 done
7530IFS=$as_save_IFS
bec39cab
AC
7531
7532fi
7533fi
7534RANLIB=$ac_cv_prog_RANLIB
7535if test -n "$RANLIB"; then
81ecdfbb
RW
7536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7537$as_echo "$RANLIB" >&6; }
bec39cab 7538else
81ecdfbb
RW
7539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7540$as_echo "no" >&6; }
bec39cab
AC
7541fi
7542
81ecdfbb 7543
bec39cab
AC
7544fi
7545if test -z "$ac_cv_prog_RANLIB"; then
7546 ac_ct_RANLIB=$RANLIB
7547 # Extract the first word of "ranlib", so it can be a program name with args.
7548set dummy ranlib; ac_word=$2
81ecdfbb
RW
7549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7550$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7551if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
81ecdfbb 7552 $as_echo_n "(cached) " >&6
bec39cab
AC
7553else
7554 if test -n "$ac_ct_RANLIB"; then
7555 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7556else
7557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7558for as_dir in $PATH
7559do
7560 IFS=$as_save_IFS
7561 test -z "$as_dir" && as_dir=.
81ecdfbb 7562 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7563 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7564 ac_cv_prog_ac_ct_RANLIB="ranlib"
81ecdfbb 7565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7566 break 2
7567 fi
7568done
81ecdfbb
RW
7569 done
7570IFS=$as_save_IFS
bec39cab 7571
bec39cab
AC
7572fi
7573fi
7574ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7575if test -n "$ac_ct_RANLIB"; then
81ecdfbb
RW
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7577$as_echo "$ac_ct_RANLIB" >&6; }
bec39cab 7578else
81ecdfbb
RW
7579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7580$as_echo "no" >&6; }
bec39cab
AC
7581fi
7582
81ecdfbb
RW
7583 if test "x$ac_ct_RANLIB" = x; then
7584 RANLIB=":"
7585 else
7586 case $cross_compiling:$ac_tool_warned in
7587yes:)
7588{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7590ac_tool_warned=yes ;;
7591esac
7592 RANLIB=$ac_ct_RANLIB
7593 fi
bec39cab
AC
7594else
7595 RANLIB="$ac_cv_prog_RANLIB"
7596fi
7597
7598for ac_prog in 'bison -y' byacc
7599do
7600 # Extract the first word of "$ac_prog", so it can be a program name with args.
7601set dummy $ac_prog; ac_word=$2
81ecdfbb
RW
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7603$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7604if ${ac_cv_prog_YACC+:} false; then :
81ecdfbb 7605 $as_echo_n "(cached) " >&6
bec39cab
AC
7606else
7607 if test -n "$YACC"; then
7608 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7609else
7610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613 IFS=$as_save_IFS
7614 test -z "$as_dir" && as_dir=.
81ecdfbb 7615 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7617 ac_cv_prog_YACC="$ac_prog"
81ecdfbb 7618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7619 break 2
7620 fi
7621done
81ecdfbb
RW
7622 done
7623IFS=$as_save_IFS
bec39cab
AC
7624
7625fi
7626fi
7627YACC=$ac_cv_prog_YACC
7628if test -n "$YACC"; then
81ecdfbb
RW
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7630$as_echo "$YACC" >&6; }
bec39cab 7631else
81ecdfbb
RW
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633$as_echo "no" >&6; }
bec39cab
AC
7634fi
7635
81ecdfbb 7636
bec39cab
AC
7637 test -n "$YACC" && break
7638done
7639test -n "$YACC" || YACC="yacc"
7640
7641
7642if test -n "$ac_tool_prefix"; then
7643 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7644set dummy ${ac_tool_prefix}ar; ac_word=$2
81ecdfbb
RW
7645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7646$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7647if ${ac_cv_prog_AR+:} false; then :
81ecdfbb 7648 $as_echo_n "(cached) " >&6
bec39cab
AC
7649else
7650 if test -n "$AR"; then
7651 ac_cv_prog_AR="$AR" # Let the user override the test.
7652else
7653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7654for as_dir in $PATH
7655do
7656 IFS=$as_save_IFS
7657 test -z "$as_dir" && as_dir=.
81ecdfbb 7658 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7660 ac_cv_prog_AR="${ac_tool_prefix}ar"
81ecdfbb 7661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7662 break 2
7663 fi
7664done
81ecdfbb
RW
7665 done
7666IFS=$as_save_IFS
bec39cab
AC
7667
7668fi
7669fi
7670AR=$ac_cv_prog_AR
7671if test -n "$AR"; then
81ecdfbb
RW
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7673$as_echo "$AR" >&6; }
bec39cab 7674else
81ecdfbb
RW
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7676$as_echo "no" >&6; }
bec39cab
AC
7677fi
7678
81ecdfbb 7679
bec39cab
AC
7680fi
7681if test -z "$ac_cv_prog_AR"; then
7682 ac_ct_AR=$AR
7683 # Extract the first word of "ar", so it can be a program name with args.
7684set dummy ar; ac_word=$2
81ecdfbb
RW
7685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7686$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7687if ${ac_cv_prog_ac_ct_AR+:} false; then :
81ecdfbb 7688 $as_echo_n "(cached) " >&6
bec39cab
AC
7689else
7690 if test -n "$ac_ct_AR"; then
7691 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7692else
7693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7694for as_dir in $PATH
7695do
7696 IFS=$as_save_IFS
7697 test -z "$as_dir" && as_dir=.
81ecdfbb 7698 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7700 ac_cv_prog_ac_ct_AR="ar"
81ecdfbb 7701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7702 break 2
7703 fi
7704done
81ecdfbb
RW
7705 done
7706IFS=$as_save_IFS
bec39cab
AC
7707
7708fi
7709fi
7710ac_ct_AR=$ac_cv_prog_ac_ct_AR
7711if test -n "$ac_ct_AR"; then
81ecdfbb
RW
7712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7713$as_echo "$ac_ct_AR" >&6; }
bec39cab 7714else
81ecdfbb
RW
7715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7716$as_echo "no" >&6; }
bec39cab
AC
7717fi
7718
81ecdfbb
RW
7719 if test "x$ac_ct_AR" = x; then
7720 AR=""
7721 else
7722 case $cross_compiling:$ac_tool_warned in
7723yes:)
7724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7726ac_tool_warned=yes ;;
7727esac
7728 AR=$ac_ct_AR
7729 fi
bec39cab
AC
7730else
7731 AR="$ac_cv_prog_AR"
7732fi
7733
7734if test -n "$ac_tool_prefix"; then
7735 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7736set dummy ${ac_tool_prefix}dlltool; ac_word=$2
81ecdfbb
RW
7737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7738$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7739if ${ac_cv_prog_DLLTOOL+:} false; then :
81ecdfbb 7740 $as_echo_n "(cached) " >&6
bec39cab
AC
7741else
7742 if test -n "$DLLTOOL"; then
7743 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7744else
7745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7746for as_dir in $PATH
7747do
7748 IFS=$as_save_IFS
7749 test -z "$as_dir" && as_dir=.
81ecdfbb 7750 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7752 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
81ecdfbb 7753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7754 break 2
7755 fi
7756done
81ecdfbb
RW
7757 done
7758IFS=$as_save_IFS
bec39cab
AC
7759
7760fi
7761fi
7762DLLTOOL=$ac_cv_prog_DLLTOOL
7763if test -n "$DLLTOOL"; then
81ecdfbb
RW
7764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7765$as_echo "$DLLTOOL" >&6; }
bec39cab 7766else
81ecdfbb
RW
7767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7768$as_echo "no" >&6; }
bec39cab
AC
7769fi
7770
81ecdfbb 7771
bec39cab
AC
7772fi
7773if test -z "$ac_cv_prog_DLLTOOL"; then
7774 ac_ct_DLLTOOL=$DLLTOOL
7775 # Extract the first word of "dlltool", so it can be a program name with args.
7776set dummy dlltool; ac_word=$2
81ecdfbb
RW
7777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7778$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7779if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
81ecdfbb 7780 $as_echo_n "(cached) " >&6
bec39cab
AC
7781else
7782 if test -n "$ac_ct_DLLTOOL"; then
7783 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7784else
7785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7786for as_dir in $PATH
7787do
7788 IFS=$as_save_IFS
7789 test -z "$as_dir" && as_dir=.
81ecdfbb 7790 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7792 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
81ecdfbb 7793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7794 break 2
7795 fi
7796done
81ecdfbb
RW
7797 done
7798IFS=$as_save_IFS
bec39cab
AC
7799
7800fi
7801fi
7802ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7803if test -n "$ac_ct_DLLTOOL"; then
81ecdfbb
RW
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7805$as_echo "$ac_ct_DLLTOOL" >&6; }
bec39cab 7806else
81ecdfbb
RW
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7808$as_echo "no" >&6; }
bec39cab
AC
7809fi
7810
81ecdfbb
RW
7811 if test "x$ac_ct_DLLTOOL" = x; then
7812 DLLTOOL=""
7813 else
7814 case $cross_compiling:$ac_tool_warned in
7815yes:)
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7817$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7818ac_tool_warned=yes ;;
7819esac
7820 DLLTOOL=$ac_ct_DLLTOOL
7821 fi
bec39cab
AC
7822else
7823 DLLTOOL="$ac_cv_prog_DLLTOOL"
7824fi
7825
7826if test -n "$ac_tool_prefix"; then
7827 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7828set dummy ${ac_tool_prefix}windres; ac_word=$2
81ecdfbb
RW
7829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7830$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7831if ${ac_cv_prog_WINDRES+:} false; then :
81ecdfbb 7832 $as_echo_n "(cached) " >&6
bec39cab
AC
7833else
7834 if test -n "$WINDRES"; then
7835 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7836else
7837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840 IFS=$as_save_IFS
7841 test -z "$as_dir" && as_dir=.
81ecdfbb 7842 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7844 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
81ecdfbb 7845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7846 break 2
7847 fi
7848done
81ecdfbb
RW
7849 done
7850IFS=$as_save_IFS
bec39cab
AC
7851
7852fi
7853fi
7854WINDRES=$ac_cv_prog_WINDRES
7855if test -n "$WINDRES"; then
81ecdfbb
RW
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7857$as_echo "$WINDRES" >&6; }
bec39cab 7858else
81ecdfbb
RW
7859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7860$as_echo "no" >&6; }
bec39cab
AC
7861fi
7862
81ecdfbb 7863
bec39cab
AC
7864fi
7865if test -z "$ac_cv_prog_WINDRES"; then
7866 ac_ct_WINDRES=$WINDRES
7867 # Extract the first word of "windres", so it can be a program name with args.
7868set dummy windres; ac_word=$2
81ecdfbb
RW
7869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7870$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7871if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
81ecdfbb 7872 $as_echo_n "(cached) " >&6
bec39cab
AC
7873else
7874 if test -n "$ac_ct_WINDRES"; then
7875 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7876else
7877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7878for as_dir in $PATH
7879do
7880 IFS=$as_save_IFS
7881 test -z "$as_dir" && as_dir=.
81ecdfbb 7882 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7884 ac_cv_prog_ac_ct_WINDRES="windres"
81ecdfbb 7885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7886 break 2
7887 fi
7888done
81ecdfbb
RW
7889 done
7890IFS=$as_save_IFS
bec39cab
AC
7891
7892fi
7893fi
7894ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7895if test -n "$ac_ct_WINDRES"; then
81ecdfbb
RW
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7897$as_echo "$ac_ct_WINDRES" >&6; }
bec39cab 7898else
81ecdfbb
RW
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7900$as_echo "no" >&6; }
c906108c 7901fi
bec39cab 7902
81ecdfbb
RW
7903 if test "x$ac_ct_WINDRES" = x; then
7904 WINDRES=""
7905 else
7906 case $cross_compiling:$ac_tool_warned in
7907yes:)
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7910ac_tool_warned=yes ;;
7911esac
7912 WINDRES=$ac_ct_WINDRES
7913 fi
c906108c 7914else
bec39cab 7915 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
7916fi
7917
bec39cab 7918
036c3acb
TS
7919case $host_os in
7920 gnu*)
7921 # Needed for GNU Hurd hosts.
7922 if test -n "$ac_tool_prefix"; then
bec39cab
AC
7923 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7924set dummy ${ac_tool_prefix}mig; ac_word=$2
81ecdfbb
RW
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7926$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7927if ${ac_cv_prog_MIG+:} false; then :
81ecdfbb 7928 $as_echo_n "(cached) " >&6
c906108c 7929else
bec39cab
AC
7930 if test -n "$MIG"; then
7931 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7932else
7933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7934for as_dir in $PATH
7935do
7936 IFS=$as_save_IFS
7937 test -z "$as_dir" && as_dir=.
81ecdfbb 7938 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7940 ac_cv_prog_MIG="${ac_tool_prefix}mig"
81ecdfbb 7941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7942 break 2
7943 fi
7944done
81ecdfbb
RW
7945 done
7946IFS=$as_save_IFS
bec39cab 7947
c906108c 7948fi
bec39cab
AC
7949fi
7950MIG=$ac_cv_prog_MIG
7951if test -n "$MIG"; then
81ecdfbb
RW
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7953$as_echo "$MIG" >&6; }
c906108c 7954else
81ecdfbb
RW
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7956$as_echo "no" >&6; }
c906108c
SS
7957fi
7958
81ecdfbb 7959
bec39cab
AC
7960fi
7961if test -z "$ac_cv_prog_MIG"; then
7962 ac_ct_MIG=$MIG
7963 # Extract the first word of "mig", so it can be a program name with args.
7964set dummy mig; ac_word=$2
81ecdfbb
RW
7965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7966$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 7967if ${ac_cv_prog_ac_ct_MIG+:} false; then :
81ecdfbb 7968 $as_echo_n "(cached) " >&6
bec39cab
AC
7969else
7970 if test -n "$ac_ct_MIG"; then
7971 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7972else
7973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976 IFS=$as_save_IFS
7977 test -z "$as_dir" && as_dir=.
81ecdfbb 7978 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 7979 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab 7980 ac_cv_prog_ac_ct_MIG="mig"
81ecdfbb 7981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bec39cab
AC
7982 break 2
7983 fi
7984done
81ecdfbb
RW
7985 done
7986IFS=$as_save_IFS
c906108c 7987
bec39cab
AC
7988fi
7989fi
7990ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7991if test -n "$ac_ct_MIG"; then
81ecdfbb
RW
7992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7993$as_echo "$ac_ct_MIG" >&6; }
bec39cab 7994else
81ecdfbb
RW
7995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7996$as_echo "no" >&6; }
bec39cab 7997fi
c906108c 7998
81ecdfbb
RW
7999 if test "x$ac_ct_MIG" = x; then
8000 MIG=""
8001 else
8002 case $cross_compiling:$ac_tool_warned in
8003yes:)
8004{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8005$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8006ac_tool_warned=yes ;;
8007esac
8008 MIG=$ac_ct_MIG
8009 fi
bec39cab
AC
8010else
8011 MIG="$ac_cv_prog_MIG"
8012fi
c906108c 8013
036c3acb 8014 if test x"$MIG" = x; then
d0ac1c44 8015 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
036c3acb
TS
8016 fi
8017 ;;
8018esac
c906108c 8019
bec39cab
AC
8020# ---------------------- #
8021# Checks for libraries. #
8022# ---------------------- #
c906108c 8023
bec39cab 8024# We might need to link with -lm; most simulators need it.
81ecdfbb
RW
8025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8026$as_echo_n "checking for main in -lm... " >&6; }
d0ac1c44 8027if ${ac_cv_lib_m_main+:} false; then :
81ecdfbb 8028 $as_echo_n "(cached) " >&6
bec39cab
AC
8029else
8030 ac_check_lib_save_LIBS=$LIBS
8031LIBS="-lm $LIBS"
81ecdfbb 8032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8033/* end confdefs.h. */
c906108c 8034
c906108c 8035
bec39cab
AC
8036int
8037main ()
8038{
81ecdfbb 8039return main ();
bec39cab
AC
8040 ;
8041 return 0;
8042}
8043_ACEOF
81ecdfbb 8044if ac_fn_c_try_link "$LINENO"; then :
bec39cab
AC
8045 ac_cv_lib_m_main=yes
8046else
81ecdfbb 8047 ac_cv_lib_m_main=no
bec39cab 8048fi
81ecdfbb
RW
8049rm -f core conftest.err conftest.$ac_objext \
8050 conftest$ac_exeext conftest.$ac_ext
bec39cab
AC
8051LIBS=$ac_check_lib_save_LIBS
8052fi
81ecdfbb
RW
8053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8054$as_echo "$ac_cv_lib_m_main" >&6; }
d0ac1c44 8055if test "x$ac_cv_lib_m_main" = xyes; then :
bec39cab
AC
8056 cat >>confdefs.h <<_ACEOF
8057#define HAVE_LIBM 1
8058_ACEOF
8059
8060 LIBS="-lm $LIBS"
c906108c 8061
c906108c 8062fi
bec39cab
AC
8063
8064
bec39cab 8065# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
81ecdfbb
RW
8066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8067$as_echo_n "checking for library containing gethostbyname... " >&6; }
d0ac1c44 8068if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb 8069 $as_echo_n "(cached) " >&6
bec39cab
AC
8070else
8071 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8073/* end confdefs.h. */
ddc9cd0f 8074
81ecdfbb
RW
8075/* Override any GCC internal prototype to avoid an error.
8076 Use char because int might match the return type of a GCC
8077 builtin and then its argument prototype would still apply. */
bec39cab
AC
8078#ifdef __cplusplus
8079extern "C"
8080#endif
bec39cab
AC
8081char gethostbyname ();
8082int
8083main ()
8084{
81ecdfbb 8085return gethostbyname ();
bec39cab
AC
8086 ;
8087 return 0;
8088}
8089_ACEOF
81ecdfbb
RW
8090for ac_lib in '' nsl; do
8091 if test -z "$ac_lib"; then
8092 ac_res="none required"
8093 else
8094 ac_res=-l$ac_lib
b4e70030 8095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8096 fi
8097 if ac_fn_c_try_link "$LINENO"; then :
8098 ac_cv_search_gethostbyname=$ac_res
8099fi
8100rm -f core conftest.err conftest.$ac_objext \
8101 conftest$ac_exeext
d0ac1c44 8102 if ${ac_cv_search_gethostbyname+:} false; then :
81ecdfbb
RW
8103 break
8104fi
8105done
d0ac1c44 8106if ${ac_cv_search_gethostbyname+:} false; then :
ddc9cd0f 8107
bec39cab 8108else
81ecdfbb 8109 ac_cv_search_gethostbyname=no
bec39cab 8110fi
81ecdfbb 8111rm conftest.$ac_ext
bec39cab
AC
8112LIBS=$ac_func_search_save_LIBS
8113fi
81ecdfbb
RW
8114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8115$as_echo "$ac_cv_search_gethostbyname" >&6; }
8116ac_res=$ac_cv_search_gethostbyname
8117if test "$ac_res" != no; then :
8118 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
96baa820 8119
bec39cab 8120fi
96baa820 8121
c906108c 8122
b4e70030 8123# Some systems (e.g. Solaris) have `socketpair' in libsocket.
81ecdfbb
RW
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8125$as_echo_n "checking for library containing socketpair... " >&6; }
d0ac1c44 8126if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb 8127 $as_echo_n "(cached) " >&6
b4e70030
JB
8128else
8129 ac_func_search_save_LIBS=$LIBS
81ecdfbb 8130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8131/* end confdefs.h. */
8132
81ecdfbb
RW
8133/* Override any GCC internal prototype to avoid an error.
8134 Use char because int might match the return type of a GCC
8135 builtin and then its argument prototype would still apply. */
b4e70030
JB
8136#ifdef __cplusplus
8137extern "C"
8138#endif
b4e70030
JB
8139char socketpair ();
8140int
8141main ()
8142{
81ecdfbb 8143return socketpair ();
b4e70030
JB
8144 ;
8145 return 0;
8146}
8147_ACEOF
81ecdfbb
RW
8148for ac_lib in '' socket; do
8149 if test -z "$ac_lib"; then
8150 ac_res="none required"
8151 else
8152 ac_res=-l$ac_lib
b4e70030 8153 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
8154 fi
8155 if ac_fn_c_try_link "$LINENO"; then :
8156 ac_cv_search_socketpair=$ac_res
8157fi
8158rm -f core conftest.err conftest.$ac_objext \
8159 conftest$ac_exeext
d0ac1c44 8160 if ${ac_cv_search_socketpair+:} false; then :
81ecdfbb
RW
8161 break
8162fi
8163done
d0ac1c44 8164if ${ac_cv_search_socketpair+:} false; then :
b4e70030 8165
b4e70030 8166else
81ecdfbb 8167 ac_cv_search_socketpair=no
b4e70030 8168fi
81ecdfbb 8169rm conftest.$ac_ext
b4e70030
JB
8170LIBS=$ac_func_search_save_LIBS
8171fi
81ecdfbb
RW
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8173$as_echo "$ac_cv_search_socketpair" >&6; }
8174ac_res=$ac_cv_search_socketpair
8175if test "$ac_res" != no; then :
8176 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b4e70030
JB
8177
8178fi
8179
8180
233a11ab 8181# Link in zlib if we can. This allows us to read compressed debug sections.
b040ad30 8182
711a72d3 8183 # Use the system's zlib library.
39f3de7c
L
8184 zlibdir="-L\$(top_builddir)/../zlib"
8185 zlibinc="-I\$(top_srcdir)/../zlib"
b040ad30 8186
711a72d3
L
8187# Check whether --with-system-zlib was given.
8188if test "${with_system_zlib+set}" = set; then :
afa59b79
L
8189 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8190 zlibdir=
8191 zlibinc=
8192 fi
b040ad30 8193
233a11ab 8194fi
233a11ab 8195
233a11ab 8196
233a11ab 8197
b040ad30 8198
233a11ab 8199
77f120bf 8200
016a3251
DD
8201 if test "X$prefix" = "XNONE"; then
8202 acl_final_prefix="$ac_default_prefix"
8203 else
8204 acl_final_prefix="$prefix"
8205 fi
8206 if test "X$exec_prefix" = "XNONE"; then
8207 acl_final_exec_prefix='${prefix}'
8208 else
8209 acl_final_exec_prefix="$exec_prefix"
8210 fi
8211 acl_save_prefix="$prefix"
8212 prefix="$acl_final_prefix"
8213 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8214 prefix="$acl_save_prefix"
8215
8216
8217# Check whether --with-gnu-ld was given.
8218if test "${with_gnu_ld+set}" = set; then :
8219 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8220else
8221 with_gnu_ld=no
8222fi
8223
8224# Prepare PATH_SEPARATOR.
8225# The user is always right.
8226if test "${PATH_SEPARATOR+set}" != set; then
8227 echo "#! /bin/sh" >conf$$.sh
8228 echo "exit 0" >>conf$$.sh
8229 chmod +x conf$$.sh
8230 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8231 PATH_SEPARATOR=';'
8232 else
8233 PATH_SEPARATOR=:
8234 fi
8235 rm -f conf$$.sh
8236fi
8237ac_prog=ld
8238if test "$GCC" = yes; then
8239 # Check if gcc -print-prog-name=ld gives a path.
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8241$as_echo_n "checking for ld used by GCC... " >&6; }
8242 case $host in
8243 *-*-mingw*)
8244 # gcc leaves a trailing carriage return which upsets mingw
8245 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8246 *)
8247 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8248 esac
8249 case $ac_prog in
8250 # Accept absolute paths.
8251 [\\/]* | [A-Za-z]:[\\/]*)
8252 re_direlt='/[^/][^/]*/\.\./'
8253 # Canonicalize the path of ld
8254 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8255 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8256 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8257 done
8258 test -z "$LD" && LD="$ac_prog"
8259 ;;
8260 "")
8261 # If it fails, then pretend we aren't using GCC.
8262 ac_prog=ld
8263 ;;
8264 *)
8265 # If it is relative, then search for the first ld in PATH.
8266 with_gnu_ld=unknown
8267 ;;
8268 esac
8269elif test "$with_gnu_ld" = yes; then
8270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8271$as_echo_n "checking for GNU ld... " >&6; }
8272else
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8274$as_echo_n "checking for non-GNU ld... " >&6; }
8275fi
d0ac1c44 8276if ${acl_cv_path_LD+:} false; then :
016a3251
DD
8277 $as_echo_n "(cached) " >&6
8278else
8279 if test -z "$LD"; then
8280 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8281 for ac_dir in $PATH; do
8282 test -z "$ac_dir" && ac_dir=.
8283 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8284 acl_cv_path_LD="$ac_dir/$ac_prog"
8285 # Check to see if the program is GNU ld. I'd rather use --version,
8286 # but apparently some GNU ld's only accept -v.
8287 # Break only if it was the GNU/non-GNU ld that we prefer.
8288 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8289 test "$with_gnu_ld" != no && break
8290 else
8291 test "$with_gnu_ld" != yes && break
8292 fi
8293 fi
8294 done
8295 IFS="$ac_save_ifs"
8296else
8297 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8298fi
8299fi
8300
8301LD="$acl_cv_path_LD"
8302if test -n "$LD"; then
8303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8304$as_echo "$LD" >&6; }
8305else
8306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8307$as_echo "no" >&6; }
8308fi
d0ac1c44 8309test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
016a3251
DD
8310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8311$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
d0ac1c44 8312if ${acl_cv_prog_gnu_ld+:} false; then :
016a3251
DD
8313 $as_echo_n "(cached) " >&6
8314else
8315 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8316if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8317 acl_cv_prog_gnu_ld=yes
8318else
8319 acl_cv_prog_gnu_ld=no
8320fi
8321fi
8322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8323$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8324with_gnu_ld=$acl_cv_prog_gnu_ld
8325
8326
8327
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8329$as_echo_n "checking for shared library run path origin... " >&6; }
d0ac1c44 8330if ${acl_cv_rpath+:} false; then :
016a3251
DD
8331 $as_echo_n "(cached) " >&6
8332else
8333
8334 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8335 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8336 . ./conftest.sh
8337 rm -f ./conftest.sh
8338 acl_cv_rpath=done
8339
8340fi
8341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8342$as_echo "$acl_cv_rpath" >&6; }
8343 wl="$acl_cv_wl"
8344 libext="$acl_cv_libext"
8345 shlibext="$acl_cv_shlibext"
8346 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8347 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8348 hardcode_direct="$acl_cv_hardcode_direct"
8349 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8350 # Check whether --enable-rpath was given.
8351if test "${enable_rpath+set}" = set; then :
8352 enableval=$enable_rpath; :
8353else
8354 enable_rpath=yes
8355fi
8356
8357
8358
8359
8360
8361
8362
8363
8364 use_additional=yes
8365
8366 acl_save_prefix="$prefix"
8367 prefix="$acl_final_prefix"
8368 acl_save_exec_prefix="$exec_prefix"
8369 exec_prefix="$acl_final_exec_prefix"
8370
8371 eval additional_includedir=\"$includedir\"
8372 eval additional_libdir=\"$libdir\"
8373
8374 exec_prefix="$acl_save_exec_prefix"
8375 prefix="$acl_save_prefix"
77f120bf 8376
6c7a06a3 8377
81ecdfbb
RW
8378# Check whether --with-libiconv-prefix was given.
8379if test "${with_libiconv_prefix+set}" = set; then :
8380 withval=$with_libiconv_prefix;
016a3251
DD
8381 if test "X$withval" = "Xno"; then
8382 use_additional=no
8383 else
8384 if test "X$withval" = "X"; then
8385
8386 acl_save_prefix="$prefix"
8387 prefix="$acl_final_prefix"
8388 acl_save_exec_prefix="$exec_prefix"
8389 exec_prefix="$acl_final_exec_prefix"
8390
8391 eval additional_includedir=\"$includedir\"
8392 eval additional_libdir=\"$libdir\"
8393
8394 exec_prefix="$acl_save_exec_prefix"
8395 prefix="$acl_save_prefix"
8396
8397 else
8398 additional_includedir="$withval/include"
8399 additional_libdir="$withval/lib"
8400 fi
8401 fi
6c7a06a3 8402
81ecdfbb
RW
8403fi
8404
9f1528a1
AB
8405
8406# Check whether --with-libiconv-type was given.
8407if test "${with_libiconv_type+set}" = set; then :
8408 withval=$with_libiconv_type; with_libiconv_type=$withval
8409else
8410 with_libiconv_type=auto
8411fi
8412
8413 lib_type=`eval echo \$with_libiconv_type`
8414
016a3251
DD
8415 LIBICONV=
8416 LTLIBICONV=
8417 INCICONV=
8418 rpathdirs=
8419 ltrpathdirs=
8420 names_already_handled=
8421 names_next_round='iconv '
8422 while test -n "$names_next_round"; do
8423 names_this_round="$names_next_round"
8424 names_next_round=
8425 for name in $names_this_round; do
8426 already_handled=
8427 for n in $names_already_handled; do
8428 if test "$n" = "$name"; then
8429 already_handled=yes
8430 break
8431 fi
8432 done
8433 if test -z "$already_handled"; then
8434 names_already_handled="$names_already_handled $name"
8435 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8436 eval value=\"\$HAVE_LIB$uppername\"
8437 if test -n "$value"; then
8438 if test "$value" = yes; then
8439 eval value=\"\$LIB$uppername\"
8440 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8441 eval value=\"\$LTLIB$uppername\"
8442 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8443 else
8444 :
8445 fi
8446 else
8447 found_dir=
8448 found_la=
8449 found_so=
8450 found_a=
8451 if test $use_additional = yes; then
9f1528a1 8452 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8453 found_dir="$additional_libdir"
8454 found_so="$additional_libdir/lib$name.$shlibext"
8455 if test -f "$additional_libdir/lib$name.la"; then
8456 found_la="$additional_libdir/lib$name.la"
8457 fi
9f1528a1 8458 elif test x$lib_type != xshared; then
016a3251
DD
8459 if test -f "$additional_libdir/lib$name.$libext"; then
8460 found_dir="$additional_libdir"
8461 found_a="$additional_libdir/lib$name.$libext"
8462 if test -f "$additional_libdir/lib$name.la"; then
8463 found_la="$additional_libdir/lib$name.la"
8464 fi
8465 fi
8466 fi
8467 fi
8468 if test "X$found_dir" = "X"; then
8469 for x in $LDFLAGS $LTLIBICONV; do
8470
8471 acl_save_prefix="$prefix"
8472 prefix="$acl_final_prefix"
8473 acl_save_exec_prefix="$exec_prefix"
8474 exec_prefix="$acl_final_exec_prefix"
8475 eval x=\"$x\"
8476 exec_prefix="$acl_save_exec_prefix"
8477 prefix="$acl_save_prefix"
8478
8479 case "$x" in
8480 -L*)
8481 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 8482 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
016a3251
DD
8483 found_dir="$dir"
8484 found_so="$dir/lib$name.$shlibext"
8485 if test -f "$dir/lib$name.la"; then
8486 found_la="$dir/lib$name.la"
8487 fi
9f1528a1 8488 elif test x$lib_type != xshared; then
016a3251
DD
8489 if test -f "$dir/lib$name.$libext"; then
8490 found_dir="$dir"
8491 found_a="$dir/lib$name.$libext"
8492 if test -f "$dir/lib$name.la"; then
8493 found_la="$dir/lib$name.la"
8494 fi
8495 fi
8496 fi
8497 ;;
8498 esac
8499 if test "X$found_dir" != "X"; then
8500 break
8501 fi
8502 done
8503 fi
8504 if test "X$found_dir" != "X"; then
8505 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8506 if test "X$found_so" != "X"; then
8507 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8508 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8509 else
8510 haveit=
8511 for x in $ltrpathdirs; do
8512 if test "X$x" = "X$found_dir"; then
8513 haveit=yes
8514 break
8515 fi
8516 done
8517 if test -z "$haveit"; then
8518 ltrpathdirs="$ltrpathdirs $found_dir"
8519 fi
8520 if test "$hardcode_direct" = yes; then
8521 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8522 else
8523 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8524 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8525 haveit=
8526 for x in $rpathdirs; do
8527 if test "X$x" = "X$found_dir"; then
8528 haveit=yes
8529 break
8530 fi
8531 done
8532 if test -z "$haveit"; then
8533 rpathdirs="$rpathdirs $found_dir"
8534 fi
8535 else
8536 haveit=
8537 for x in $LDFLAGS $LIBICONV; do
8538
8539 acl_save_prefix="$prefix"
8540 prefix="$acl_final_prefix"
8541 acl_save_exec_prefix="$exec_prefix"
8542 exec_prefix="$acl_final_exec_prefix"
8543 eval x=\"$x\"
8544 exec_prefix="$acl_save_exec_prefix"
8545 prefix="$acl_save_prefix"
8546
8547 if test "X$x" = "X-L$found_dir"; then
8548 haveit=yes
8549 break
8550 fi
8551 done
8552 if test -z "$haveit"; then
8553 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8554 fi
8555 if test "$hardcode_minus_L" != no; then
8556 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8557 else
8558 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8559 fi
8560 fi
8561 fi
8562 fi
8563 else
8564 if test "X$found_a" != "X"; then
8565 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8566 else
8567 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8568 fi
8569 fi
8570 additional_includedir=
8571 case "$found_dir" in
8572 */lib | */lib/)
8573 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8574 additional_includedir="$basedir/include"
8575 ;;
8576 esac
8577 if test "X$additional_includedir" != "X"; then
8578 if test "X$additional_includedir" != "X/usr/include"; then
8579 haveit=
8580 if test "X$additional_includedir" = "X/usr/local/include"; then
8581 if test -n "$GCC"; then
8582 case $host_os in
8583 linux*) haveit=yes;;
8584 esac
8585 fi
8586 fi
8587 if test -z "$haveit"; then
8588 for x in $CPPFLAGS $INCICONV; do
8589
8590 acl_save_prefix="$prefix"
8591 prefix="$acl_final_prefix"
8592 acl_save_exec_prefix="$exec_prefix"
8593 exec_prefix="$acl_final_exec_prefix"
8594 eval x=\"$x\"
8595 exec_prefix="$acl_save_exec_prefix"
8596 prefix="$acl_save_prefix"
8597
8598 if test "X$x" = "X-I$additional_includedir"; then
8599 haveit=yes
8600 break
8601 fi
8602 done
8603 if test -z "$haveit"; then
8604 if test -d "$additional_includedir"; then
8605 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8606 fi
8607 fi
8608 fi
8609 fi
8610 fi
8611 if test -n "$found_la"; then
8612 save_libdir="$libdir"
8613 case "$found_la" in
8614 */* | *\\*) . "$found_la" ;;
8615 *) . "./$found_la" ;;
8616 esac
8617 libdir="$save_libdir"
8618 for dep in $dependency_libs; do
8619 case "$dep" in
8620 -L*)
8621 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8622 if test "X$additional_libdir" != "X/usr/lib"; then
8623 haveit=
8624 if test "X$additional_libdir" = "X/usr/local/lib"; then
8625 if test -n "$GCC"; then
8626 case $host_os in
8627 linux*) haveit=yes;;
8628 esac
8629 fi
8630 fi
8631 if test -z "$haveit"; then
8632 haveit=
8633 for x in $LDFLAGS $LIBICONV; do
8634
8635 acl_save_prefix="$prefix"
8636 prefix="$acl_final_prefix"
8637 acl_save_exec_prefix="$exec_prefix"
8638 exec_prefix="$acl_final_exec_prefix"
8639 eval x=\"$x\"
8640 exec_prefix="$acl_save_exec_prefix"
8641 prefix="$acl_save_prefix"
8642
8643 if test "X$x" = "X-L$additional_libdir"; then
8644 haveit=yes
8645 break
8646 fi
8647 done
8648 if test -z "$haveit"; then
8649 if test -d "$additional_libdir"; then
8650 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8651 fi
8652 fi
8653 haveit=
8654 for x in $LDFLAGS $LTLIBICONV; do
8655
8656 acl_save_prefix="$prefix"
8657 prefix="$acl_final_prefix"
8658 acl_save_exec_prefix="$exec_prefix"
8659 exec_prefix="$acl_final_exec_prefix"
8660 eval x=\"$x\"
8661 exec_prefix="$acl_save_exec_prefix"
8662 prefix="$acl_save_prefix"
8663
8664 if test "X$x" = "X-L$additional_libdir"; then
8665 haveit=yes
8666 break
8667 fi
8668 done
8669 if test -z "$haveit"; then
8670 if test -d "$additional_libdir"; then
8671 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8672 fi
8673 fi
8674 fi
8675 fi
8676 ;;
8677 -R*)
8678 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8679 if test "$enable_rpath" != no; then
8680 haveit=
8681 for x in $rpathdirs; do
8682 if test "X$x" = "X$dir"; then
8683 haveit=yes
8684 break
8685 fi
8686 done
8687 if test -z "$haveit"; then
8688 rpathdirs="$rpathdirs $dir"
8689 fi
8690 haveit=
8691 for x in $ltrpathdirs; do
8692 if test "X$x" = "X$dir"; then
8693 haveit=yes
8694 break
8695 fi
8696 done
8697 if test -z "$haveit"; then
8698 ltrpathdirs="$ltrpathdirs $dir"
8699 fi
8700 fi
8701 ;;
8702 -l*)
8703 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8704 ;;
8705 *.la)
8706 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8707 ;;
8708 *)
8709 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8710 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8711 ;;
8712 esac
8713 done
8714 fi
8715 else
9f1528a1
AB
8716 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8717 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8718 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8719 else
8720 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8721 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8722 fi
016a3251
DD
8723 fi
8724 fi
8725 fi
8726 done
8727 done
8728 if test "X$rpathdirs" != "X"; then
8729 if test -n "$hardcode_libdir_separator"; then
8730 alldirs=
8731 for found_dir in $rpathdirs; do
8732 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8733 done
8734 acl_save_libdir="$libdir"
8735 libdir="$alldirs"
8736 eval flag=\"$hardcode_libdir_flag_spec\"
8737 libdir="$acl_save_libdir"
8738 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8739 else
8740 for found_dir in $rpathdirs; do
8741 acl_save_libdir="$libdir"
8742 libdir="$found_dir"
8743 eval flag=\"$hardcode_libdir_flag_spec\"
8744 libdir="$acl_save_libdir"
8745 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8746 done
8747 fi
8748 fi
8749 if test "X$ltrpathdirs" != "X"; then
8750 for found_dir in $ltrpathdirs; do
8751 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8752 done
8753 fi
8754
8755
8756
8757
8758
6c7a06a3 8759
6c7a06a3 8760
81ecdfbb
RW
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8762$as_echo_n "checking for iconv... " >&6; }
d0ac1c44 8763if ${am_cv_func_iconv+:} false; then :
81ecdfbb 8764 $as_echo_n "(cached) " >&6
d542061a 8765else
6c7a06a3
TT
8766
8767 am_cv_func_iconv="no, consider installing GNU libiconv"
8768 am_cv_lib_iconv=no
016a3251
DD
8769 am_save_CPPFLAGS="$CPPFLAGS"
8770 CPPFLAGS="$CPPFLAGS $INCICONV"
8771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8772/* end confdefs.h. */
6c7a06a3
TT
8773#include <stdlib.h>
8774#include <iconv.h>
d542061a
UW
8775int
8776main ()
8777{
6c7a06a3 8778iconv_t cd = iconv_open("","");
016a3251
DD
8779 iconv(cd,NULL,NULL,NULL,NULL);
8780 iconv_close(cd);
d542061a
UW
8781 ;
8782 return 0;
8783}
8784_ACEOF
81ecdfbb 8785if ac_fn_c_try_link "$LINENO"; then :
016a3251 8786 am_cv_func_iconv=yes
d542061a 8787fi
81ecdfbb
RW
8788rm -f core conftest.err conftest.$ac_objext \
8789 conftest$ac_exeext conftest.$ac_ext
016a3251 8790 CPPFLAGS="$am_save_CPPFLAGS"
94ae1714 8791
016a3251
DD
8792 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8793 for _libs in .libs _libs; do
8794 am_save_CPPFLAGS="$CPPFLAGS"
8795 am_save_LIBS="$LIBS"
8796 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8797 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d542061a 8799/* end confdefs.h. */
6c7a06a3
TT
8800#include <stdlib.h>
8801#include <iconv.h>
d542061a
UW
8802int
8803main ()
8804{
6c7a06a3 8805iconv_t cd = iconv_open("","");
016a3251
DD
8806 iconv(cd,NULL,NULL,NULL,NULL);
8807 iconv_close(cd);
d542061a
UW
8808 ;
8809 return 0;
8810}
8811_ACEOF
81ecdfbb 8812if ac_fn_c_try_link "$LINENO"; then :
016a3251
DD
8813 INCICONV="-I../libiconv/include"
8814 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8815 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8816 am_cv_lib_iconv=yes
8817 am_cv_func_iconv=yes
d542061a 8818fi
81ecdfbb
RW
8819rm -f core conftest.err conftest.$ac_objext \
8820 conftest$ac_exeext conftest.$ac_ext
016a3251
DD
8821 CPPFLAGS="$am_save_CPPFLAGS"
8822 LIBS="$am_save_LIBS"
8823 if test "$am_cv_func_iconv" = "yes"; then
8824 break
8825 fi
8826 done
77f120bf 8827 fi
94ae1714 8828
4edb1e84 8829 if test "$am_cv_func_iconv" != yes; then
6c7a06a3 8830 am_save_CPPFLAGS="$CPPFLAGS"
4edb1e84 8831 am_save_LIBS="$LIBS"
5d762de0 8832 CPPFLAGS="$CPPFLAGS $INCICONV"
016a3251 8833 LIBS="$LIBS $LIBICONV"
81ecdfbb 8834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 8835/* end confdefs.h. */
6c7a06a3
TT
8836#include <stdlib.h>
8837#include <iconv.h>
bec39cab
AC
8838int
8839main ()
8840{
6c7a06a3
TT
8841iconv_t cd = iconv_open("","");
8842 iconv(cd,NULL,NULL,NULL,NULL);
8843 iconv_close(cd);
bec39cab
AC
8844 ;
8845 return 0;
8846}
8847_ACEOF
81ecdfbb 8848if ac_fn_c_try_link "$LINENO"; then :
4edb1e84 8849 am_cv_lib_iconv=yes
6c7a06a3 8850 am_cv_func_iconv=yes
627af7ea 8851fi
81ecdfbb
RW
8852rm -f core conftest.err conftest.$ac_objext \
8853 conftest$ac_exeext conftest.$ac_ext
fc3b640d 8854 CPPFLAGS="$am_save_CPPFLAGS"
016a3251 8855 LIBS="$am_save_LIBS"
6c7a06a3
TT
8856 fi
8857
8858fi
81ecdfbb
RW
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8860$as_echo "$am_cv_func_iconv" >&6; }
016a3251
DD
8861 if test "$am_cv_func_iconv" = yes; then
8862
8863$as_echo "#define HAVE_ICONV 1" >>confdefs.h
94ae1714 8864
016a3251 8865 fi
fc3b640d 8866 if test "$am_cv_lib_iconv" = yes; then
016a3251
DD
8867
8868 for element in $INCICONV; do
8869 haveit=
8870 for x in $CPPFLAGS; do
8871
8872 acl_save_prefix="$prefix"
8873 prefix="$acl_final_prefix"
8874 acl_save_exec_prefix="$exec_prefix"
8875 exec_prefix="$acl_final_exec_prefix"
8876 eval x=\"$x\"
8877 exec_prefix="$acl_save_exec_prefix"
8878 prefix="$acl_save_prefix"
8879
8880 if test "X$x" = "X$element"; then
8881 haveit=yes
8882 break
8883 fi
8884 done
8885 if test -z "$haveit"; then
8886 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8887 fi
8888 done
8889
8890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8891$as_echo_n "checking how to link with libiconv... " >&6; }
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8893$as_echo "$LIBICONV" >&6; }
94ae1714 8894 else
016a3251
DD
8895 LIBICONV=
8896 LTLIBICONV=
fc3b640d 8897 fi
94ae1714 8898
6c7a06a3 8899
6c7a06a3 8900
016a3251 8901 if test "$am_cv_func_iconv" = yes; then
81ecdfbb
RW
8902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8903$as_echo_n "checking for iconv declaration... " >&6; }
d0ac1c44 8904 if ${am_cv_proto_iconv+:} false; then :
81ecdfbb 8905 $as_echo_n "(cached) " >&6
6c7a06a3
TT
8906else
8907
81ecdfbb 8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b4e70030
JB
8909/* end confdefs.h. */
8910
6c7a06a3
TT
8911#include <stdlib.h>
8912#include <iconv.h>
8913extern
b4e70030 8914#ifdef __cplusplus
6c7a06a3 8915"C"
b4e70030 8916#endif
6c7a06a3
TT
8917#if defined(__STDC__) || defined(__cplusplus)
8918size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8919#else
8920size_t iconv();
8921#endif
8922
b4e70030
JB
8923int
8924main ()
8925{
6c7a06a3 8926
b4e70030
JB
8927 ;
8928 return 0;
8929}
8930_ACEOF
81ecdfbb 8931if ac_fn_c_try_compile "$LINENO"; then :
6c7a06a3 8932 am_cv_proto_iconv_arg1=""
4e8d927d 8933else
81ecdfbb 8934 am_cv_proto_iconv_arg1="const"
b4e70030 8935fi
81ecdfbb 8936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6c7a06a3
TT
8937 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);"
8938fi
8939
8940 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
81ecdfbb 8941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
6c7a06a3 8942 }$am_cv_proto_iconv" >&5
81ecdfbb
RW
8943$as_echo "${ac_t:-
8944 }$am_cv_proto_iconv" >&6; }
6c7a06a3
TT
8945
8946cat >>confdefs.h <<_ACEOF
8947#define ICONV_CONST $am_cv_proto_iconv_arg1
8948_ACEOF
8949
8950 fi
6c7a06a3
TT
8951
8952
478aac75
DE
8953# GDB may fork/exec the iconv program to get the list of supported character
8954# sets. Allow the user to specify where to find it.
8955# There are several factors affecting the choice of option name:
8956# - There is already --with-libiconv-prefix but we can't use it, it specifies
8957# the build-time location of libiconv files.
8958# - The program we need to find is iconv, which comes with glibc. The user
8959# doesn't necessarily have libiconv installed. Therefore naming this
8960# --with-libiconv-foo feels wrong.
8961# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8962# defined to work on directories not files (though it really doesn't know
8963# the difference).
8964# - Calling this --with-iconv-prefix is perceived to cause too much confusion
8965# with --with-libiconv-prefix.
8966# Putting these together is why the option name is --with-iconv-bin.
8967
8968
8969# Check whether --with-iconv-bin was given.
8970if test "${with_iconv_bin+set}" = set; then :
8971 withval=$with_iconv_bin; iconv_bin="${withval}"
8972
8973cat >>confdefs.h <<_ACEOF
8974#define ICONV_BIN "${iconv_bin}"
8975_ACEOF
8976
8977
8978 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8979 if test "x$prefix" = xNONE; then
8980 test_prefix=/usr/local
8981 else
8982 test_prefix=$prefix
8983 fi
8984 else
8985 test_prefix=$exec_prefix
8986 fi
8987 value=0
8988 case ${iconv_bin} in
8989 "${test_prefix}"|"${test_prefix}/"*|\
8990 '${exec_prefix}'|'${exec_prefix}/'*)
8991 value=1
8992 ;;
8993 esac
8994
8995cat >>confdefs.h <<_ACEOF
8996#define ICONV_BIN_RELOCATABLE $value
8997_ACEOF
8998
8999
9000
9001fi
9002
9003
cb01cfba 9004# For the TUI, we need enhanced curses functionality.
bd8a8e1b 9005if test x"$enable_tui" != xno; then
cb01cfba
JB
9006 prefer_curses=yes
9007fi
9008
9009curses_found=no
9010if test x"$prefer_curses" = xyes; then
9011 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9012 # curses library because the latter might not provide all the
9013 # functionality we need. However, this leads to problems on systems
9014 # where the linker searches /usr/local/lib, but the compiler doesn't
9015 # search /usr/local/include, if ncurses is installed in /usr/local. A
9016 # default installation of ncurses on alpha*-dec-osf* will lead to such
9017 # a situation.
81ecdfbb
RW
9018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9019$as_echo_n "checking for library containing waddstr... " >&6; }
d0ac1c44 9020if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9021 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9022else
9023 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9025/* end confdefs.h. */
9026
81ecdfbb
RW
9027/* Override any GCC internal prototype to avoid an error.
9028 Use char because int might match the return type of a GCC
9029 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9030#ifdef __cplusplus
9031extern "C"
9032#endif
6c7a06a3
TT
9033char waddstr ();
9034int
9035main ()
9036{
81ecdfbb 9037return waddstr ();
6c7a06a3
TT
9038 ;
9039 return 0;
9040}
9041_ACEOF
5007d765 9042for ac_lib in '' ncursesw ncurses cursesX curses; do
81ecdfbb
RW
9043 if test -z "$ac_lib"; then
9044 ac_res="none required"
9045 else
9046 ac_res=-l$ac_lib
9047 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9048 fi
9049 if ac_fn_c_try_link "$LINENO"; then :
9050 ac_cv_search_waddstr=$ac_res
9051fi
9052rm -f core conftest.err conftest.$ac_objext \
9053 conftest$ac_exeext
d0ac1c44 9054 if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb
RW
9055 break
9056fi
9057done
d0ac1c44 9058if ${ac_cv_search_waddstr+:} false; then :
81ecdfbb 9059
6c7a06a3 9060else
81ecdfbb
RW
9061 ac_cv_search_waddstr=no
9062fi
9063rm conftest.$ac_ext
9064LIBS=$ac_func_search_save_LIBS
9065fi
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9067$as_echo "$ac_cv_search_waddstr" >&6; }
9068ac_res=$ac_cv_search_waddstr
9069if test "$ac_res" != no; then :
9070 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3
TT
9071
9072fi
9073
9074
cb01cfba
JB
9075 if test "$ac_cv_search_waddstr" != no; then
9076 curses_found=yes
9077 fi
9078fi
9079
9080# Check whether we should enable the TUI, but only do so if we really
9081# can.
9082if test x"$enable_tui" != xno; then
0ad6b8ee 9083 if test -d "$srcdir/tui"; then
cb01cfba 9084 if test "$curses_found" != no; then
6c7a06a3
TT
9085 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9086 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9087 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9088 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
6c7a06a3
TT
9089 else
9090 if test x"$enable_tui" = xyes; then
d0ac1c44 9091 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
6c7a06a3 9092 else
81ecdfbb
RW
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9094$as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
6c7a06a3
TT
9095 fi
9096 fi
9097 fi
9098fi
9099
9100# Since GDB uses Readline, we need termcap functionality. In many
9101# cases this will be provided by the curses library, but some systems
96fe4562 9102# have a separate termcap library, or no curses library at all.
6c7a06a3
TT
9103
9104case $host_os in
9105 cygwin*)
0ad6b8ee 9106 if test -d "$srcdir/libtermcap"; then
6c7a06a3
TT
9107 LIBS="../libtermcap/libtermcap.a $LIBS"
9108 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9109 fi ;;
9110 go32* | *djgpp*)
9111 ac_cv_search_tgetent="none required"
9112 ;;
6c7a06a3
TT
9113esac
9114
9115# These are the libraries checked by Readline.
81ecdfbb
RW
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9117$as_echo_n "checking for library containing tgetent... " >&6; }
d0ac1c44 9118if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb 9119 $as_echo_n "(cached) " >&6
6c7a06a3
TT
9120else
9121 ac_func_search_save_LIBS=$LIBS
81ecdfbb 9122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3
TT
9123/* end confdefs.h. */
9124
81ecdfbb
RW
9125/* Override any GCC internal prototype to avoid an error.
9126 Use char because int might match the return type of a GCC
9127 builtin and then its argument prototype would still apply. */
6c7a06a3
TT
9128#ifdef __cplusplus
9129extern "C"
9130#endif
6c7a06a3
TT
9131char tgetent ();
9132int
9133main ()
9134{
81ecdfbb 9135return tgetent ();
6c7a06a3
TT
9136 ;
9137 return 0;
9138}
9139_ACEOF
2578ecb1 9140for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
81ecdfbb
RW
9141 if test -z "$ac_lib"; then
9142 ac_res="none required"
9143 else
9144 ac_res=-l$ac_lib
6c7a06a3 9145 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
81ecdfbb
RW
9146 fi
9147 if ac_fn_c_try_link "$LINENO"; then :
9148 ac_cv_search_tgetent=$ac_res
9149fi
9150rm -f core conftest.err conftest.$ac_objext \
9151 conftest$ac_exeext
d0ac1c44 9152 if ${ac_cv_search_tgetent+:} false; then :
81ecdfbb
RW
9153 break
9154fi
9155done
d0ac1c44 9156if ${ac_cv_search_tgetent+:} false; then :
6c7a06a3 9157
6c7a06a3 9158else
81ecdfbb 9159 ac_cv_search_tgetent=no
6c7a06a3 9160fi
81ecdfbb 9161rm conftest.$ac_ext
6c7a06a3
TT
9162LIBS=$ac_func_search_save_LIBS
9163fi
81ecdfbb
RW
9164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9165$as_echo "$ac_cv_search_tgetent" >&6; }
9166ac_res=$ac_cv_search_tgetent
9167if test "$ac_res" != no; then :
9168 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6c7a06a3 9169
06825bd1
MK
9170fi
9171
06825bd1 9172
bec39cab 9173if test "$ac_cv_search_tgetent" = no; then
7a85168d 9174 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8ee53726
MK
9175fi
9176
3841debe 9177
81ecdfbb
RW
9178# Check whether --with-system-readline was given.
9179if test "${with_system_readline+set}" = set; then :
9180 withval=$with_system_readline;
9181fi
6a30b0a5 9182
6a30b0a5
AS
9183
9184if test "$with_system_readline" = yes; then
86c6b807
TT
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9186$as_echo_n "checking whether system readline is new enough... " >&6; }
9187if ${gdb_cv_readline_ok+:} false; then :
9188 $as_echo_n "(cached) " >&6
9189else
9190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9191/* end confdefs.h. */
9192#include <stdio.h>
9193#include <readline/readline.h>
9194int
9195main ()
9196{
9197#if RL_VERSION_MAJOR < 7
9198# error "readline version 7 required"
9199#endif
9200 ;
9201 return 0;
9202}
9203_ACEOF
9204if ac_fn_c_try_compile "$LINENO"; then :
9205 gdb_cv_readline_ok=yes
9206else
9207 gdb_cv_readline_ok=no
9208fi
9209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9210fi
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9212$as_echo "$gdb_cv_readline_ok" >&6; }
9213 if test "$gdb_cv_readline_ok" != yes; then
9214 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9215 fi
9216
6a30b0a5
AS
9217 READLINE=-lreadline
9218 READLINE_DEPS=
9219 READLINE_CFLAGS=
39037522 9220 READLINE_TEXI_INCFLAG=
6a30b0a5
AS
9221else
9222 READLINE='$(READLINE_DIR)/libreadline.a'
9223 READLINE_DEPS='$(READLINE)'
9224 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
39037522 9225 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
6a30b0a5
AS
9226fi
9227
9228
9229
9230
9231
f997c383
SD
9232# Generate jit-reader.h
9233
9234# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9235TARGET_PTR=
9236
9237# The cast to long int works around a bug in the HP C Compiler
9238# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9239# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9240# This bug is HP SR number 8606223364.
9241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9242$as_echo_n "checking size of unsigned long long... " >&6; }
d0ac1c44 9243if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
f997c383
SD
9244 $as_echo_n "(cached) " >&6
9245else
9246 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9247
9248else
9249 if test "$ac_cv_type_unsigned_long_long" = yes; then
9250 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9251$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9252as_fn_error 77 "cannot compute sizeof (unsigned long long)
9253See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9254 else
9255 ac_cv_sizeof_unsigned_long_long=0
9256 fi
9257fi
9258
9259fi
9260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9261$as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9262
9263
9264
9265cat >>confdefs.h <<_ACEOF
9266#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9267_ACEOF
9268
9269
9270# The cast to long int works around a bug in the HP C Compiler
9271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9273# This bug is HP SR number 8606223364.
9274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9275$as_echo_n "checking size of unsigned long... " >&6; }
d0ac1c44 9276if ${ac_cv_sizeof_unsigned_long+:} false; then :
f997c383
SD
9277 $as_echo_n "(cached) " >&6
9278else
9279 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9280
9281else
9282 if test "$ac_cv_type_unsigned_long" = yes; then
9283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9285as_fn_error 77 "cannot compute sizeof (unsigned long)
9286See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9287 else
9288 ac_cv_sizeof_unsigned_long=0
9289 fi
9290fi
9291
9292fi
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9294$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9295
9296
9297
9298cat >>confdefs.h <<_ACEOF
9299#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9300_ACEOF
9301
9302
9303# The cast to long int works around a bug in the HP C Compiler
9304# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9305# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9306# This bug is HP SR number 8606223364.
9307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9308$as_echo_n "checking size of unsigned __int128... " >&6; }
d0ac1c44 9309if ${ac_cv_sizeof_unsigned___int128+:} false; then :
f997c383
SD
9310 $as_echo_n "(cached) " >&6
9311else
9312 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9313
9314else
9315 if test "$ac_cv_type_unsigned___int128" = yes; then
9316 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9317$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
9318as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9319See \`config.log' for more details" "$LINENO" 5; }
f997c383
SD
9320 else
9321 ac_cv_sizeof_unsigned___int128=0
9322 fi
9323fi
9324
9325fi
9326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9327$as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9328
9329
9330
9331cat >>confdefs.h <<_ACEOF
9332#define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9333_ACEOF
9334
9335
9336
9337if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9338 TARGET_PTR="unsigned long"
9339elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9340 TARGET_PTR="unsigned long long"
9341elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9342 TARGET_PTR="unsigned __int128"
9343else
9344 TARGET_PTR="unsigned long"
9345fi
9346
9347
9348ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9349
9350
a2d08b9e
SD
9351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9352$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 9353if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9354 $as_echo_n "(cached) " >&6
9355else
9356 ac_func_search_save_LIBS=$LIBS
9357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9358/* end confdefs.h. */
9359
9360/* Override any GCC internal prototype to avoid an error.
9361 Use char because int might match the return type of a GCC
9362 builtin and then its argument prototype would still apply. */
9363#ifdef __cplusplus
9364extern "C"
9365#endif
9366char dlopen ();
9367int
9368main ()
9369{
9370return dlopen ();
9371 ;
9372 return 0;
9373}
9374_ACEOF
9375for ac_lib in '' dl; do
9376 if test -z "$ac_lib"; then
9377 ac_res="none required"
9378 else
9379 ac_res=-l$ac_lib
9380 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9381 fi
9382 if ac_fn_c_try_link "$LINENO"; then :
9383 ac_cv_search_dlopen=$ac_res
9384fi
9385rm -f core conftest.err conftest.$ac_objext \
9386 conftest$ac_exeext
d0ac1c44 9387 if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9388 break
9389fi
9390done
d0ac1c44 9391if ${ac_cv_search_dlopen+:} false; then :
a2d08b9e
SD
9392
9393else
9394 ac_cv_search_dlopen=no
9395fi
9396rm conftest.$ac_ext
9397LIBS=$ac_func_search_save_LIBS
9398fi
9399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9400$as_echo "$ac_cv_search_dlopen" >&6; }
9401ac_res=$ac_cv_search_dlopen
9402if test "$ac_res" != no; then :
9403 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9404
9405fi
9406
9407
39037522 9408
b8e0a31c
SD
9409
9410# Check whether --with-jit-reader-dir was given.
9411if test "${with_jit_reader_dir+set}" = set; then :
9412 withval=$with_jit_reader_dir;
9413 JIT_READER_DIR=$withval
9414else
9415 JIT_READER_DIR=${libdir}/gdb
9416fi
9417
9418
9419 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9420 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9421 ac_define_dir=`eval echo $JIT_READER_DIR`
9422 ac_define_dir=`eval echo $ac_define_dir`
9423
9424cat >>confdefs.h <<_ACEOF
9425#define JIT_READER_DIR "$ac_define_dir"
9426_ACEOF
9427
9428
9429
9430
9431 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9432 if test "x$prefix" = xNONE; then
9433 test_prefix=/usr/local
9434 else
9435 test_prefix=$prefix
9436 fi
9437 else
9438 test_prefix=$exec_prefix
9439 fi
9440 value=0
9441 case ${ac_define_dir} in
9442 "${test_prefix}"|"${test_prefix}/"*|\
9443 '${exec_prefix}'|'${exec_prefix}/'*)
9444 value=1
9445 ;;
9446 esac
9447
9448cat >>confdefs.h <<_ACEOF
9449#define JIT_READER_DIR_RELOCATABLE $value
9450_ACEOF
9451
9452
9453
9454
9455
81ecdfbb
RW
9456# Check whether --with-expat was given.
9457if test "${with_expat+set}" = set; then :
9458 withval=$with_expat;
5c39566f
DJ
9459else
9460 with_expat=auto
81ecdfbb
RW
9461fi
9462
9463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9464$as_echo_n "checking whether to use expat... " >&6; }
9465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9466$as_echo "$with_expat" >&6; }
5c39566f
DJ
9467
9468if test "${with_expat}" = no; then
81ecdfbb
RW
9469 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9470$as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
5c39566f
DJ
9471 HAVE_LIBEXPAT=no
9472else
9473
3841debe
DJ
9474
9475
9476
9477
9478
9479
9480
9481 use_additional=yes
9482
9483 acl_save_prefix="$prefix"
9484 prefix="$acl_final_prefix"
9485 acl_save_exec_prefix="$exec_prefix"
9486 exec_prefix="$acl_final_exec_prefix"
9487
9488 eval additional_includedir=\"$includedir\"
9489 eval additional_libdir=\"$libdir\"
9490
9491 exec_prefix="$acl_save_exec_prefix"
9492 prefix="$acl_save_prefix"
9493
9494
81ecdfbb
RW
9495# Check whether --with-libexpat-prefix was given.
9496if test "${with_libexpat_prefix+set}" = set; then :
9497 withval=$with_libexpat_prefix;
3841debe
DJ
9498 if test "X$withval" = "Xno"; then
9499 use_additional=no
9500 else
9501 if test "X$withval" = "X"; then
9502
9503 acl_save_prefix="$prefix"
9504 prefix="$acl_final_prefix"
9505 acl_save_exec_prefix="$exec_prefix"
9506 exec_prefix="$acl_final_exec_prefix"
9507
9508 eval additional_includedir=\"$includedir\"
9509 eval additional_libdir=\"$libdir\"
9510
9511 exec_prefix="$acl_save_exec_prefix"
9512 prefix="$acl_save_prefix"
9513
9514 else
9515 additional_includedir="$withval/include"
9516 additional_libdir="$withval/lib"
9517 fi
9518 fi
9519
81ecdfbb
RW
9520fi
9521
9f1528a1
AB
9522
9523# Check whether --with-libexpat-type was given.
9524if test "${with_libexpat_type+set}" = set; then :
9525 withval=$with_libexpat_type; with_libexpat_type=$withval
9526else
9527 with_libexpat_type=auto
9528fi
9529
9530 lib_type=`eval echo \$with_libexpat_type`
9531
3841debe
DJ
9532 LIBEXPAT=
9533 LTLIBEXPAT=
9534 INCEXPAT=
9535 rpathdirs=
9536 ltrpathdirs=
9537 names_already_handled=
9538 names_next_round='expat '
9539 while test -n "$names_next_round"; do
9540 names_this_round="$names_next_round"
9541 names_next_round=
9542 for name in $names_this_round; do
9543 already_handled=
9544 for n in $names_already_handled; do
9545 if test "$n" = "$name"; then
9546 already_handled=yes
9547 break
9548 fi
9549 done
9550 if test -z "$already_handled"; then
9551 names_already_handled="$names_already_handled $name"
9552 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9553 eval value=\"\$HAVE_LIB$uppername\"
9554 if test -n "$value"; then
9555 if test "$value" = yes; then
9556 eval value=\"\$LIB$uppername\"
9557 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9558 eval value=\"\$LTLIB$uppername\"
9559 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9560 else
9561 :
9562 fi
9563 else
9564 found_dir=
9565 found_la=
9566 found_so=
9567 found_a=
9568 if test $use_additional = yes; then
9f1528a1 9569 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9570 found_dir="$additional_libdir"
9571 found_so="$additional_libdir/lib$name.$shlibext"
9572 if test -f "$additional_libdir/lib$name.la"; then
9573 found_la="$additional_libdir/lib$name.la"
9574 fi
9f1528a1 9575 elif test x$lib_type != xshared; then
3841debe
DJ
9576 if test -f "$additional_libdir/lib$name.$libext"; then
9577 found_dir="$additional_libdir"
9578 found_a="$additional_libdir/lib$name.$libext"
9579 if test -f "$additional_libdir/lib$name.la"; then
9580 found_la="$additional_libdir/lib$name.la"
9581 fi
9582 fi
9583 fi
9584 fi
9585 if test "X$found_dir" = "X"; then
9586 for x in $LDFLAGS $LTLIBEXPAT; do
9587
9588 acl_save_prefix="$prefix"
9589 prefix="$acl_final_prefix"
9590 acl_save_exec_prefix="$exec_prefix"
9591 exec_prefix="$acl_final_exec_prefix"
9592 eval x=\"$x\"
9593 exec_prefix="$acl_save_exec_prefix"
9594 prefix="$acl_save_prefix"
9595
9596 case "$x" in
9597 -L*)
9598 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 9599 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
3841debe
DJ
9600 found_dir="$dir"
9601 found_so="$dir/lib$name.$shlibext"
9602 if test -f "$dir/lib$name.la"; then
9603 found_la="$dir/lib$name.la"
9604 fi
9f1528a1 9605 elif test x$lib_type != xshared; then
3841debe
DJ
9606 if test -f "$dir/lib$name.$libext"; then
9607 found_dir="$dir"
9608 found_a="$dir/lib$name.$libext"
9609 if test -f "$dir/lib$name.la"; then
9610 found_la="$dir/lib$name.la"
9611 fi
9612 fi
9613 fi
9614 ;;
9615 esac
9616 if test "X$found_dir" != "X"; then
9617 break
9618 fi
9619 done
9620 fi
9621 if test "X$found_dir" != "X"; then
9622 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9623 if test "X$found_so" != "X"; then
9624 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9625 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9626 else
9627 haveit=
9628 for x in $ltrpathdirs; do
9629 if test "X$x" = "X$found_dir"; then
9630 haveit=yes
9631 break
9632 fi
9633 done
9634 if test -z "$haveit"; then
9635 ltrpathdirs="$ltrpathdirs $found_dir"
9636 fi
9637 if test "$hardcode_direct" = yes; then
9638 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9639 else
9640 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9641 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9642 haveit=
9643 for x in $rpathdirs; do
9644 if test "X$x" = "X$found_dir"; then
9645 haveit=yes
9646 break
9647 fi
9648 done
9649 if test -z "$haveit"; then
9650 rpathdirs="$rpathdirs $found_dir"
9651 fi
9652 else
9653 haveit=
9654 for x in $LDFLAGS $LIBEXPAT; do
9655
9656 acl_save_prefix="$prefix"
9657 prefix="$acl_final_prefix"
9658 acl_save_exec_prefix="$exec_prefix"
9659 exec_prefix="$acl_final_exec_prefix"
9660 eval x=\"$x\"
9661 exec_prefix="$acl_save_exec_prefix"
9662 prefix="$acl_save_prefix"
9663
9664 if test "X$x" = "X-L$found_dir"; then
9665 haveit=yes
9666 break
9667 fi
9668 done
9669 if test -z "$haveit"; then
9670 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9671 fi
9672 if test "$hardcode_minus_L" != no; then
9673 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9674 else
9675 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9676 fi
9677 fi
9678 fi
9679 fi
9680 else
9681 if test "X$found_a" != "X"; then
9682 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9683 else
9684 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9685 fi
9686 fi
9687 additional_includedir=
9688 case "$found_dir" in
9689 */lib | */lib/)
9690 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9691 additional_includedir="$basedir/include"
9692 ;;
9693 esac
9694 if test "X$additional_includedir" != "X"; then
9695 if test "X$additional_includedir" != "X/usr/include"; then
9696 haveit=
9697 if test "X$additional_includedir" = "X/usr/local/include"; then
9698 if test -n "$GCC"; then
9699 case $host_os in
9700 linux*) haveit=yes;;
9701 esac
9702 fi
9703 fi
9704 if test -z "$haveit"; then
9705 for x in $CPPFLAGS $INCEXPAT; do
9706
9707 acl_save_prefix="$prefix"
9708 prefix="$acl_final_prefix"
9709 acl_save_exec_prefix="$exec_prefix"
9710 exec_prefix="$acl_final_exec_prefix"
9711 eval x=\"$x\"
9712 exec_prefix="$acl_save_exec_prefix"
9713 prefix="$acl_save_prefix"
9714
9715 if test "X$x" = "X-I$additional_includedir"; then
9716 haveit=yes
9717 break
9718 fi
9719 done
9720 if test -z "$haveit"; then
9721 if test -d "$additional_includedir"; then
9722 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9723 fi
9724 fi
9725 fi
9726 fi
9727 fi
9728 if test -n "$found_la"; then
9729 save_libdir="$libdir"
9730 case "$found_la" in
9731 */* | *\\*) . "$found_la" ;;
9732 *) . "./$found_la" ;;
9733 esac
9734 libdir="$save_libdir"
9735 for dep in $dependency_libs; do
9736 case "$dep" in
9737 -L*)
9738 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9739 if test "X$additional_libdir" != "X/usr/lib"; then
9740 haveit=
9741 if test "X$additional_libdir" = "X/usr/local/lib"; then
9742 if test -n "$GCC"; then
9743 case $host_os in
9744 linux*) haveit=yes;;
9745 esac
9746 fi
9747 fi
9748 if test -z "$haveit"; then
9749 haveit=
9750 for x in $LDFLAGS $LIBEXPAT; do
9751
9752 acl_save_prefix="$prefix"
9753 prefix="$acl_final_prefix"
9754 acl_save_exec_prefix="$exec_prefix"
9755 exec_prefix="$acl_final_exec_prefix"
9756 eval x=\"$x\"
9757 exec_prefix="$acl_save_exec_prefix"
9758 prefix="$acl_save_prefix"
9759
9760 if test "X$x" = "X-L$additional_libdir"; then
9761 haveit=yes
9762 break
9763 fi
9764 done
9765 if test -z "$haveit"; then
9766 if test -d "$additional_libdir"; then
9767 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9768 fi
9769 fi
9770 haveit=
9771 for x in $LDFLAGS $LTLIBEXPAT; do
9772
9773 acl_save_prefix="$prefix"
9774 prefix="$acl_final_prefix"
9775 acl_save_exec_prefix="$exec_prefix"
9776 exec_prefix="$acl_final_exec_prefix"
9777 eval x=\"$x\"
9778 exec_prefix="$acl_save_exec_prefix"
9779 prefix="$acl_save_prefix"
9780
9781 if test "X$x" = "X-L$additional_libdir"; then
9782 haveit=yes
9783 break
9784 fi
9785 done
9786 if test -z "$haveit"; then
9787 if test -d "$additional_libdir"; then
9788 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9789 fi
9790 fi
9791 fi
9792 fi
9793 ;;
9794 -R*)
9795 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9796 if test "$enable_rpath" != no; then
9797 haveit=
9798 for x in $rpathdirs; do
9799 if test "X$x" = "X$dir"; then
9800 haveit=yes
9801 break
9802 fi
9803 done
9804 if test -z "$haveit"; then
9805 rpathdirs="$rpathdirs $dir"
9806 fi
9807 haveit=
9808 for x in $ltrpathdirs; 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 ltrpathdirs="$ltrpathdirs $dir"
9816 fi
9817 fi
9818 ;;
9819 -l*)
9820 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9821 ;;
9822 *.la)
9823 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9824 ;;
9825 *)
9826 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9827 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9828 ;;
81ecdfbb
RW
9829 esac
9830 done
9831 fi
9832 else
9f1528a1
AB
9833 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9834 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9835 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9836 else
9837 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9838 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9839 fi
81ecdfbb
RW
9840 fi
9841 fi
9842 fi
9843 done
9844 done
9845 if test "X$rpathdirs" != "X"; then
9846 if test -n "$hardcode_libdir_separator"; then
9847 alldirs=
9848 for found_dir in $rpathdirs; do
9849 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9850 done
9851 acl_save_libdir="$libdir"
9852 libdir="$alldirs"
9853 eval flag=\"$hardcode_libdir_flag_spec\"
9854 libdir="$acl_save_libdir"
9855 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9856 else
9857 for found_dir in $rpathdirs; do
9858 acl_save_libdir="$libdir"
9859 libdir="$found_dir"
9860 eval flag=\"$hardcode_libdir_flag_spec\"
9861 libdir="$acl_save_libdir"
9862 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9863 done
9864 fi
9865 fi
9866 if test "X$ltrpathdirs" != "X"; then
9867 for found_dir in $ltrpathdirs; do
9868 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9869 done
9870 fi
a9322a30
TT
9871
9872
81ecdfbb 9873 ac_save_CPPFLAGS="$CPPFLAGS"
a9322a30 9874
81ecdfbb
RW
9875 for element in $INCEXPAT; do
9876 haveit=
9877 for x in $CPPFLAGS; do
a9322a30 9878
81ecdfbb
RW
9879 acl_save_prefix="$prefix"
9880 prefix="$acl_final_prefix"
9881 acl_save_exec_prefix="$exec_prefix"
9882 exec_prefix="$acl_final_exec_prefix"
9883 eval x=\"$x\"
9884 exec_prefix="$acl_save_exec_prefix"
9885 prefix="$acl_save_prefix"
a8111142 9886
81ecdfbb
RW
9887 if test "X$x" = "X$element"; then
9888 haveit=yes
9889 break
9890 fi
9891 done
9892 if test -z "$haveit"; then
9893 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9894 fi
9895 done
a9322a30
TT
9896
9897
81ecdfbb
RW
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9899$as_echo_n "checking for libexpat... " >&6; }
d0ac1c44 9900if ${ac_cv_libexpat+:} false; then :
81ecdfbb 9901 $as_echo_n "(cached) " >&6
bec39cab 9902else
bec39cab 9903
81ecdfbb
RW
9904 ac_save_LIBS="$LIBS"
9905 LIBS="$LIBS $LIBEXPAT"
9906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 9907/* end confdefs.h. */
81ecdfbb
RW
9908#include "expat.h"
9909int
9910main ()
9911{
9912XML_Parser p = XML_ParserCreate (0);
9913 ;
9914 return 0;
9915}
bec39cab 9916_ACEOF
81ecdfbb
RW
9917if ac_fn_c_try_link "$LINENO"; then :
9918 ac_cv_libexpat=yes
c906108c 9919else
81ecdfbb 9920 ac_cv_libexpat=no
bec39cab 9921fi
81ecdfbb
RW
9922rm -f core conftest.err conftest.$ac_objext \
9923 conftest$ac_exeext conftest.$ac_ext
9924 LIBS="$ac_save_LIBS"
c906108c 9925
95ca63c4 9926fi
81ecdfbb
RW
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9928$as_echo "$ac_cv_libexpat" >&6; }
9929 if test "$ac_cv_libexpat" = yes; then
9930 HAVE_LIBEXPAT=yes
bec39cab 9931
81ecdfbb 9932$as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
bec39cab 9933
81ecdfbb
RW
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9935$as_echo_n "checking how to link with libexpat... " >&6; }
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9937$as_echo "$LIBEXPAT" >&6; }
9938 else
9939 HAVE_LIBEXPAT=no
9940 CPPFLAGS="$ac_save_CPPFLAGS"
9941 LIBEXPAT=
9942 LTLIBEXPAT=
9943 fi
95ca63c4
CF
9944
9945
9946
7cb9022a
MK
9947
9948
bec39cab 9949
81ecdfbb
RW
9950 if test "$HAVE_LIBEXPAT" != yes; then
9951 if test "$with_expat" = yes; then
d0ac1c44 9952 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
81ecdfbb
RW
9953 else
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9955$as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9956 fi
9957 else
9958 save_LIBS=$LIBS
9959 LIBS="$LIBS $LIBEXPAT"
9960 for ac_func in XML_StopParser
9961do :
9962 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
d0ac1c44 9963if test "x$ac_cv_func_XML_StopParser" = xyes; then :
bec39cab 9964 cat >>confdefs.h <<_ACEOF
81ecdfbb 9965#define HAVE_XML_STOPPARSER 1
bec39cab 9966_ACEOF
95ca63c4 9967
bec39cab 9968fi
bec39cab 9969done
95ca63c4 9970
81ecdfbb
RW
9971 LIBS=$save_LIBS
9972 fi
a9322a30
TT
9973fi
9974
2400729e
UW
9975
9976# Check whether --with-mpfr was given.
9977if test "${with_mpfr+set}" = set; then :
9978 withval=$with_mpfr;
9979else
9980 with_mpfr=auto
9981fi
9982
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9984$as_echo_n "checking whether to use MPFR... " >&6; }
9985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9986$as_echo "$with_mpfr" >&6; }
9987
9988if test "${with_mpfr}" = no; then
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9990$as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9991 HAVE_LIBMPFR=no
9992else
9993
9994
9995
9996
9997
9998
9999
10000
10001 use_additional=yes
10002
10003 acl_save_prefix="$prefix"
10004 prefix="$acl_final_prefix"
10005 acl_save_exec_prefix="$exec_prefix"
10006 exec_prefix="$acl_final_exec_prefix"
10007
10008 eval additional_includedir=\"$includedir\"
10009 eval additional_libdir=\"$libdir\"
10010
10011 exec_prefix="$acl_save_exec_prefix"
10012 prefix="$acl_save_prefix"
10013
10014
10015# Check whether --with-libmpfr-prefix was given.
10016if test "${with_libmpfr_prefix+set}" = set; then :
10017 withval=$with_libmpfr_prefix;
10018 if test "X$withval" = "Xno"; then
10019 use_additional=no
10020 else
10021 if test "X$withval" = "X"; then
10022
10023 acl_save_prefix="$prefix"
10024 prefix="$acl_final_prefix"
10025 acl_save_exec_prefix="$exec_prefix"
10026 exec_prefix="$acl_final_exec_prefix"
10027
10028 eval additional_includedir=\"$includedir\"
10029 eval additional_libdir=\"$libdir\"
10030
10031 exec_prefix="$acl_save_exec_prefix"
10032 prefix="$acl_save_prefix"
10033
10034 else
10035 additional_includedir="$withval/include"
10036 additional_libdir="$withval/lib"
10037 fi
10038 fi
10039
10040fi
10041
9f1528a1
AB
10042
10043# Check whether --with-libmpfr-type was given.
10044if test "${with_libmpfr_type+set}" = set; then :
10045 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10046else
10047 with_libmpfr_type=auto
10048fi
10049
10050 lib_type=`eval echo \$with_libmpfr_type`
10051
2400729e
UW
10052 LIBMPFR=
10053 LTLIBMPFR=
10054 INCMPFR=
10055 rpathdirs=
10056 ltrpathdirs=
10057 names_already_handled=
da658607 10058 names_next_round='mpfr gmp'
2400729e
UW
10059 while test -n "$names_next_round"; do
10060 names_this_round="$names_next_round"
10061 names_next_round=
10062 for name in $names_this_round; do
10063 already_handled=
10064 for n in $names_already_handled; do
10065 if test "$n" = "$name"; then
10066 already_handled=yes
10067 break
10068 fi
10069 done
10070 if test -z "$already_handled"; then
10071 names_already_handled="$names_already_handled $name"
10072 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10073 eval value=\"\$HAVE_LIB$uppername\"
10074 if test -n "$value"; then
10075 if test "$value" = yes; then
10076 eval value=\"\$LIB$uppername\"
10077 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10078 eval value=\"\$LTLIB$uppername\"
10079 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10080 else
10081 :
10082 fi
10083 else
10084 found_dir=
10085 found_la=
10086 found_so=
10087 found_a=
10088 if test $use_additional = yes; then
9f1528a1 10089 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10090 found_dir="$additional_libdir"
10091 found_so="$additional_libdir/lib$name.$shlibext"
10092 if test -f "$additional_libdir/lib$name.la"; then
10093 found_la="$additional_libdir/lib$name.la"
10094 fi
9f1528a1 10095 elif test x$lib_type != xshared; then
2400729e
UW
10096 if test -f "$additional_libdir/lib$name.$libext"; then
10097 found_dir="$additional_libdir"
10098 found_a="$additional_libdir/lib$name.$libext"
10099 if test -f "$additional_libdir/lib$name.la"; then
10100 found_la="$additional_libdir/lib$name.la"
10101 fi
10102 fi
10103 fi
10104 fi
10105 if test "X$found_dir" = "X"; then
10106 for x in $LDFLAGS $LTLIBMPFR; do
10107
10108 acl_save_prefix="$prefix"
10109 prefix="$acl_final_prefix"
10110 acl_save_exec_prefix="$exec_prefix"
10111 exec_prefix="$acl_final_exec_prefix"
10112 eval x=\"$x\"
10113 exec_prefix="$acl_save_exec_prefix"
10114 prefix="$acl_save_prefix"
10115
10116 case "$x" in
10117 -L*)
10118 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 10119 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
2400729e
UW
10120 found_dir="$dir"
10121 found_so="$dir/lib$name.$shlibext"
10122 if test -f "$dir/lib$name.la"; then
10123 found_la="$dir/lib$name.la"
10124 fi
9f1528a1 10125 elif test x$lib_type != xshared; then
2400729e
UW
10126 if test -f "$dir/lib$name.$libext"; then
10127 found_dir="$dir"
10128 found_a="$dir/lib$name.$libext"
10129 if test -f "$dir/lib$name.la"; then
10130 found_la="$dir/lib$name.la"
10131 fi
10132 fi
10133 fi
10134 ;;
10135 esac
10136 if test "X$found_dir" != "X"; then
10137 break
10138 fi
10139 done
10140 fi
10141 if test "X$found_dir" != "X"; then
10142 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10143 if test "X$found_so" != "X"; then
10144 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10145 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10146 else
10147 haveit=
10148 for x in $ltrpathdirs; do
10149 if test "X$x" = "X$found_dir"; then
10150 haveit=yes
10151 break
10152 fi
10153 done
10154 if test -z "$haveit"; then
10155 ltrpathdirs="$ltrpathdirs $found_dir"
10156 fi
10157 if test "$hardcode_direct" = yes; then
10158 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10159 else
10160 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10161 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10162 haveit=
10163 for x in $rpathdirs; do
10164 if test "X$x" = "X$found_dir"; then
10165 haveit=yes
10166 break
10167 fi
10168 done
10169 if test -z "$haveit"; then
10170 rpathdirs="$rpathdirs $found_dir"
10171 fi
10172 else
10173 haveit=
10174 for x in $LDFLAGS $LIBMPFR; do
10175
10176 acl_save_prefix="$prefix"
10177 prefix="$acl_final_prefix"
10178 acl_save_exec_prefix="$exec_prefix"
10179 exec_prefix="$acl_final_exec_prefix"
10180 eval x=\"$x\"
10181 exec_prefix="$acl_save_exec_prefix"
10182 prefix="$acl_save_prefix"
10183
10184 if test "X$x" = "X-L$found_dir"; then
10185 haveit=yes
10186 break
10187 fi
10188 done
10189 if test -z "$haveit"; then
10190 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10191 fi
10192 if test "$hardcode_minus_L" != no; then
10193 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10194 else
10195 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10196 fi
10197 fi
10198 fi
10199 fi
10200 else
10201 if test "X$found_a" != "X"; then
10202 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10203 else
10204 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10205 fi
10206 fi
10207 additional_includedir=
10208 case "$found_dir" in
10209 */lib | */lib/)
10210 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10211 additional_includedir="$basedir/include"
10212 ;;
10213 esac
10214 if test "X$additional_includedir" != "X"; then
10215 if test "X$additional_includedir" != "X/usr/include"; then
10216 haveit=
10217 if test "X$additional_includedir" = "X/usr/local/include"; then
10218 if test -n "$GCC"; then
10219 case $host_os in
10220 linux*) haveit=yes;;
10221 esac
10222 fi
10223 fi
10224 if test -z "$haveit"; then
10225 for x in $CPPFLAGS $INCMPFR; do
10226
10227 acl_save_prefix="$prefix"
10228 prefix="$acl_final_prefix"
10229 acl_save_exec_prefix="$exec_prefix"
10230 exec_prefix="$acl_final_exec_prefix"
10231 eval x=\"$x\"
10232 exec_prefix="$acl_save_exec_prefix"
10233 prefix="$acl_save_prefix"
10234
10235 if test "X$x" = "X-I$additional_includedir"; then
10236 haveit=yes
10237 break
10238 fi
10239 done
10240 if test -z "$haveit"; then
10241 if test -d "$additional_includedir"; then
10242 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10243 fi
10244 fi
10245 fi
10246 fi
10247 fi
10248 if test -n "$found_la"; then
10249 save_libdir="$libdir"
10250 case "$found_la" in
10251 */* | *\\*) . "$found_la" ;;
10252 *) . "./$found_la" ;;
10253 esac
10254 libdir="$save_libdir"
10255 for dep in $dependency_libs; do
10256 case "$dep" in
10257 -L*)
10258 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10259 if test "X$additional_libdir" != "X/usr/lib"; then
10260 haveit=
10261 if test "X$additional_libdir" = "X/usr/local/lib"; then
10262 if test -n "$GCC"; then
10263 case $host_os in
10264 linux*) haveit=yes;;
10265 esac
10266 fi
10267 fi
10268 if test -z "$haveit"; then
10269 haveit=
10270 for x in $LDFLAGS $LIBMPFR; do
10271
10272 acl_save_prefix="$prefix"
10273 prefix="$acl_final_prefix"
10274 acl_save_exec_prefix="$exec_prefix"
10275 exec_prefix="$acl_final_exec_prefix"
10276 eval x=\"$x\"
10277 exec_prefix="$acl_save_exec_prefix"
10278 prefix="$acl_save_prefix"
10279
10280 if test "X$x" = "X-L$additional_libdir"; then
10281 haveit=yes
10282 break
10283 fi
10284 done
10285 if test -z "$haveit"; then
10286 if test -d "$additional_libdir"; then
10287 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10288 fi
10289 fi
10290 haveit=
10291 for x in $LDFLAGS $LTLIBMPFR; do
10292
10293 acl_save_prefix="$prefix"
10294 prefix="$acl_final_prefix"
10295 acl_save_exec_prefix="$exec_prefix"
10296 exec_prefix="$acl_final_exec_prefix"
10297 eval x=\"$x\"
10298 exec_prefix="$acl_save_exec_prefix"
10299 prefix="$acl_save_prefix"
10300
10301 if test "X$x" = "X-L$additional_libdir"; then
10302 haveit=yes
10303 break
10304 fi
10305 done
10306 if test -z "$haveit"; then
10307 if test -d "$additional_libdir"; then
10308 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10309 fi
10310 fi
10311 fi
10312 fi
10313 ;;
10314 -R*)
10315 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10316 if test "$enable_rpath" != no; then
10317 haveit=
10318 for x in $rpathdirs; do
10319 if test "X$x" = "X$dir"; then
10320 haveit=yes
10321 break
10322 fi
10323 done
10324 if test -z "$haveit"; then
10325 rpathdirs="$rpathdirs $dir"
10326 fi
10327 haveit=
10328 for x in $ltrpathdirs; 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 ltrpathdirs="$ltrpathdirs $dir"
10336 fi
10337 fi
10338 ;;
10339 -l*)
10340 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10341 ;;
10342 *.la)
10343 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10344 ;;
10345 *)
10346 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10347 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10348 ;;
10349 esac
10350 done
10351 fi
10352 else
9f1528a1
AB
10353 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10354 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10355 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10356 else
10357 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10358 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10359 fi
2400729e
UW
10360 fi
10361 fi
10362 fi
10363 done
10364 done
10365 if test "X$rpathdirs" != "X"; then
10366 if test -n "$hardcode_libdir_separator"; then
10367 alldirs=
10368 for found_dir in $rpathdirs; do
10369 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10370 done
10371 acl_save_libdir="$libdir"
10372 libdir="$alldirs"
10373 eval flag=\"$hardcode_libdir_flag_spec\"
10374 libdir="$acl_save_libdir"
10375 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10376 else
10377 for found_dir in $rpathdirs; do
10378 acl_save_libdir="$libdir"
10379 libdir="$found_dir"
10380 eval flag=\"$hardcode_libdir_flag_spec\"
10381 libdir="$acl_save_libdir"
10382 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10383 done
10384 fi
10385 fi
10386 if test "X$ltrpathdirs" != "X"; then
10387 for found_dir in $ltrpathdirs; do
10388 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10389 done
10390 fi
10391
10392
10393 ac_save_CPPFLAGS="$CPPFLAGS"
10394
10395 for element in $INCMPFR; do
10396 haveit=
10397 for x in $CPPFLAGS; do
10398
10399 acl_save_prefix="$prefix"
10400 prefix="$acl_final_prefix"
10401 acl_save_exec_prefix="$exec_prefix"
10402 exec_prefix="$acl_final_exec_prefix"
10403 eval x=\"$x\"
10404 exec_prefix="$acl_save_exec_prefix"
10405 prefix="$acl_save_prefix"
10406
10407 if test "X$x" = "X$element"; then
10408 haveit=yes
10409 break
10410 fi
10411 done
10412 if test -z "$haveit"; then
10413 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10414 fi
10415 done
10416
10417
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10419$as_echo_n "checking for libmpfr... " >&6; }
d0ac1c44 10420if ${ac_cv_libmpfr+:} false; then :
2400729e
UW
10421 $as_echo_n "(cached) " >&6
10422else
10423
10424 ac_save_LIBS="$LIBS"
10425 LIBS="$LIBS $LIBMPFR"
10426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10427/* end confdefs.h. */
10428#include <mpfr.h>
10429int
10430main ()
10431{
10432mpfr_exp_t exp; mpfr_t x;
10433 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10434 ;
10435 return 0;
10436}
10437_ACEOF
10438if ac_fn_c_try_link "$LINENO"; then :
10439 ac_cv_libmpfr=yes
10440else
10441 ac_cv_libmpfr=no
10442fi
10443rm -f core conftest.err conftest.$ac_objext \
10444 conftest$ac_exeext conftest.$ac_ext
10445 LIBS="$ac_save_LIBS"
10446
10447fi
10448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10449$as_echo "$ac_cv_libmpfr" >&6; }
10450 if test "$ac_cv_libmpfr" = yes; then
10451 HAVE_LIBMPFR=yes
10452
10453$as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10454
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10456$as_echo_n "checking how to link with libmpfr... " >&6; }
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10458$as_echo "$LIBMPFR" >&6; }
10459 else
10460 HAVE_LIBMPFR=no
10461 CPPFLAGS="$ac_save_CPPFLAGS"
10462 LIBMPFR=
10463 LTLIBMPFR=
10464 fi
10465
10466
10467
10468
10469
10470
10471 if test "$HAVE_LIBMPFR" != yes; then
10472 if test "$with_mpfr" = yes; then
d0ac1c44 10473 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
2400729e
UW
10474 else
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10476$as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10477 fi
10478 fi
10479fi
10480
d344e670
DE
10481# --------------------- #
10482# Check for libpython. #
10483# --------------------- #
10484
a9322a30 10485
a9322a30
TT
10486
10487
ec685c5e 10488
0c4a4063 10489
81ecdfbb
RW
10490# Check whether --with-python was given.
10491if test "${with_python+set}" = set; then :
10492 withval=$with_python;
bec39cab 10493else
81ecdfbb 10494 with_python=auto
bec39cab 10495fi
bec39cab 10496
81ecdfbb
RW
10497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10498$as_echo_n "checking whether to use python... " >&6; }
10499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10500$as_echo "$with_python" >&6; }
9a156167 10501
81ecdfbb
RW
10502if test "${with_python}" = no; then
10503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10504$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10505 have_libpython=no
bec39cab 10506else
81ecdfbb 10507 case "${with_python}" in
8c85a4e2 10508 [\\/]* | ?:[\\/]*)
0ad6b8ee 10509 if test -d "${with_python}"; then
ec685c5e 10510 # Assume the python binary is ${with_python}/bin/python.
ec685c5e 10511 python_prog="${with_python}/bin/python"
0c4a4063 10512 python_prefix=
9c4ea6c5
JB
10513 # If python does not exit ${with_python}/bin, then try in
10514 # ${with_python}. On Windows/MinGW, this is where the Python
10515 # executable is.
10516 if test ! -x "${python_prog}"; then
10517 python_prog="${with_python}/python"
10518 python_prefix=
10519 fi
e7a30f46 10520 if test ! -x "${python_prog}"; then
ec685c5e
DE
10521 # Fall back to gdb 7.0/7.1 behaviour.
10522 python_prog=missing
0c4a4063 10523 python_prefix=${with_python}
ec685c5e 10524 fi
e7a30f46 10525 elif test -x "${with_python}"; then
ec685c5e
DE
10526 # While we can't run python compiled for $host (unless host == build),
10527 # the user could write a script that provides the needed information,
10528 # so we support that.
ec685c5e 10529 python_prog=${with_python}
0c4a4063 10530 python_prefix=
ec685c5e 10531 else
d0ac1c44 10532 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
ec685c5e 10533 fi
81ecdfbb 10534 ;;
ec685c5e
DE
10535 */*)
10536 # Disallow --with-python=foo/bar.
d0ac1c44 10537 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
81ecdfbb 10538 ;;
ec685c5e
DE
10539 *)
10540 # The user has either specified auto, yes, or the name of the python
10541 # program assumed to be in $PATH.
10542 python_prefix=
10543 case "${with_python}" in
10544 yes | auto)
0ad6b8ee 10545 if test "${build}" = "${host}"; then
ec685c5e
DE
10546 # Extract the first word of "python", so it can be a program name with args.
10547set dummy python; ac_word=$2
10548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10549$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10550if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10551 $as_echo_n "(cached) " >&6
10552else
10553 case $python_prog_path in
10554 [\\/]* | ?:[\\/]*)
10555 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10556 ;;
10557 *)
10558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10559for as_dir in $PATH
10560do
10561 IFS=$as_save_IFS
10562 test -z "$as_dir" && as_dir=.
10563 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10564 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10565 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10566 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10567 break 2
10568 fi
10569done
10570 done
10571IFS=$as_save_IFS
10572
10573 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10574 ;;
10575esac
10576fi
10577python_prog_path=$ac_cv_path_python_prog_path
10578if test -n "$python_prog_path"; then
10579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10580$as_echo "$python_prog_path" >&6; }
10581else
10582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10583$as_echo "no" >&6; }
10584fi
10585
10586
10587 if test "${python_prog_path}" = missing; then
10588 python_prog=missing
10589 else
10590 python_prog=${python_prog_path}
10591 fi
10592 else
10593 # Not much we can do except assume the cross-compiler will find the
10594 # right files.
10595 python_prog=missing
10596 fi
10597 ;;
10598 *)
10599 # While we can't run python compiled for $host (unless host == build),
10600 # the user could write a script that provides the needed information,
10601 # so we support that.
10602 python_prog="${with_python}"
10603 # Extract the first word of "${python_prog}", so it can be a program name with args.
10604set dummy ${python_prog}; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 10607if ${ac_cv_path_python_prog_path+:} false; then :
ec685c5e
DE
10608 $as_echo_n "(cached) " >&6
10609else
10610 case $python_prog_path in
10611 [\\/]* | ?:[\\/]*)
10612 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10613 ;;
10614 *)
10615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618 IFS=$as_save_IFS
10619 test -z "$as_dir" && as_dir=.
10620 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 10621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ec685c5e
DE
10622 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624 break 2
10625 fi
10626done
10627 done
10628IFS=$as_save_IFS
10629
10630 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10631 ;;
10632esac
10633fi
10634python_prog_path=$ac_cv_path_python_prog_path
10635if test -n "$python_prog_path"; then
10636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10637$as_echo "$python_prog_path" >&6; }
10638else
10639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10640$as_echo "no" >&6; }
10641fi
10642
10643
10644 if test "${python_prog_path}" = missing; then
d0ac1c44 10645 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
ec685c5e
DE
10646 fi
10647 ;;
10648 esac
81ecdfbb
RW
10649 esac
10650
ec685c5e 10651 if test "${python_prog}" != missing; then
e7a30f46
DE
10652 # We have a python program to use, but it may be too old.
10653 # Don't flag an error for --with-python=auto (the default).
10654 have_python_config=yes
ec685c5e
DE
10655 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10656 if test $? != 0; then
e7a30f46
DE
10657 have_python_config=failed
10658 if test "${with_python}" != auto; then
d0ac1c44 10659 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
e7a30f46 10660 fi
ec685c5e
DE
10661 fi
10662 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10663 if test $? != 0; then
e7a30f46
DE
10664 have_python_config=failed
10665 if test "${with_python}" != auto; then
d0ac1c44 10666 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
e7a30f46 10667 fi
ec685c5e 10668 fi
0c4a4063
DE
10669 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10670 if test $? != 0; then
e7a30f46
DE
10671 have_python_config=failed
10672 if test "${with_python}" != auto; then
d0ac1c44 10673 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
e7a30f46 10674 fi
0c4a4063 10675 fi
ec685c5e 10676 else
ac534cba
JB
10677 # We do not have a python executable we can use to determine where
10678 # to find the Python headers and libs. We cannot guess the include
10679 # path from the python_prefix either, because that include path
10680 # depends on the Python version. So, there is nothing much we can
10681 # do except assume that the compiler will be able to find those files.
10682 python_includes=
10683 python_libs=
0c4a4063 10684 have_python_config=no
ec685c5e 10685 fi
bec39cab 10686
ec685c5e
DE
10687 # If we have python-config, only try the configuration it provides.
10688 # Otherwise fallback on the old way of trying different versions of
10689 # python in turn.
81ecdfbb 10690
ec685c5e
DE
10691 have_libpython=no
10692 if test "${have_python_config}" = yes; then
71737c43 10693
ec685c5e
DE
10694
10695 new_CPPFLAGS=${python_includes}
10696 new_LIBS=${python_libs}
71737c43
CB
10697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10698$as_echo_n "checking for python... " >&6; }
ec685c5e 10699 save_CPPFLAGS=$CPPFLAGS
81ecdfbb 10700 save_LIBS=$LIBS
ec685c5e 10701 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10702 LIBS="$new_LIBS $LIBS"
ec685c5e 10703 found_usable_python=no
81ecdfbb 10704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10705/* end confdefs.h. */
ac534cba 10706#include "Python.h"
81ecdfbb
RW
10707int
10708main ()
10709{
10710Py_Initialize ();
10711 ;
10712 return 0;
10713}
bec39cab 10714_ACEOF
81ecdfbb 10715if ac_fn_c_try_link "$LINENO"; then :
71737c43 10716 have_libpython=yes
ec685c5e 10717 found_usable_python=yes
ac534cba
JB
10718 PYTHON_CPPFLAGS=$new_CPPFLAGS
10719 PYTHON_LIBS=$new_LIBS
9a156167 10720fi
81ecdfbb
RW
10721rm -f core conftest.err conftest.$ac_objext \
10722 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10723 CPPFLAGS=$save_CPPFLAGS
10724 LIBS=$save_LIBS
ec685c5e
DE
10725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10726$as_echo "${found_usable_python}" >&6; }
9a156167 10727
e7a30f46 10728 elif test "${have_python_config}" != failed; then
ec685c5e 10729 if test "${have_libpython}" = no; then
9a156167 10730
420697bb
TT
10731
10732 new_CPPFLAGS=${python_includes}
bf27f0e2 10733 new_LIBS="-lpython2.7 ${python_libs}"
71737c43
CB
10734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10735$as_echo_n "checking for python... " >&6; }
420697bb
TT
10736 save_CPPFLAGS=$CPPFLAGS
10737 save_LIBS=$LIBS
10738 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10739 LIBS="$new_LIBS $LIBS"
420697bb
TT
10740 found_usable_python=no
10741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10742/* end confdefs.h. */
ac534cba 10743#include "Python.h"
420697bb
TT
10744int
10745main ()
10746{
10747Py_Initialize ();
10748 ;
10749 return 0;
10750}
10751_ACEOF
10752if ac_fn_c_try_link "$LINENO"; then :
71737c43 10753 have_libpython=yes
420697bb 10754 found_usable_python=yes
ac534cba
JB
10755 PYTHON_CPPFLAGS=$new_CPPFLAGS
10756 PYTHON_LIBS=$new_LIBS
420697bb
TT
10757fi
10758rm -f core conftest.err conftest.$ac_objext \
10759 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10760 CPPFLAGS=$save_CPPFLAGS
10761 LIBS=$save_LIBS
420697bb
TT
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10763$as_echo "${found_usable_python}" >&6; }
10764
10765 fi
10766 if test "${have_libpython}" = no; then
10767
ec685c5e
DE
10768
10769 new_CPPFLAGS=${python_includes}
bf27f0e2 10770 new_LIBS="-lpython2.6 ${python_libs}"
71737c43
CB
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10772$as_echo_n "checking for python... " >&6; }
ec685c5e
DE
10773 save_CPPFLAGS=$CPPFLAGS
10774 save_LIBS=$LIBS
10775 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
bf27f0e2 10776 LIBS="$new_LIBS $LIBS"
ec685c5e
DE
10777 found_usable_python=no
10778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10779/* end confdefs.h. */
ac534cba 10780#include "Python.h"
ec685c5e
DE
10781int
10782main ()
10783{
10784Py_Initialize ();
10785 ;
10786 return 0;
10787}
10788_ACEOF
10789if ac_fn_c_try_link "$LINENO"; then :
71737c43 10790 have_libpython=yes
ec685c5e 10791 found_usable_python=yes
ac534cba
JB
10792 PYTHON_CPPFLAGS=$new_CPPFLAGS
10793 PYTHON_LIBS=$new_LIBS
ec685c5e 10794fi
81ecdfbb
RW
10795rm -f core conftest.err conftest.$ac_objext \
10796 conftest$ac_exeext conftest.$ac_ext
ac534cba
JB
10797 CPPFLAGS=$save_CPPFLAGS
10798 LIBS=$save_LIBS
ec685c5e
DE
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10800$as_echo "${found_usable_python}" >&6; }
81ecdfbb 10801
ec685c5e
DE
10802 fi
10803 fi
ec685c5e
DE
10804
10805 if test "${have_libpython}" = no; then
81ecdfbb
RW
10806 case "${with_python}" in
10807 yes)
d0ac1c44 10808 as_fn_error $? "python is missing or unusable" "$LINENO" 5
81ecdfbb
RW
10809 ;;
10810 auto)
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10812$as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10813 ;;
10814 *)
d0ac1c44 10815 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
81ecdfbb
RW
10816 ;;
10817 esac
0c4a4063
DE
10818 else
10819 if test -n "${python_prefix}"; then
10820
10821cat >>confdefs.h <<_ACEOF
10822#define WITH_PYTHON_PATH "${python_prefix}"
10823_ACEOF
10824
10825
10826 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10827 if test "x$prefix" = xNONE; then
10828 test_prefix=/usr/local
10829 else
10830 test_prefix=$prefix
10831 fi
10832 else
10833 test_prefix=$exec_prefix
10834 fi
10835 value=0
10836 case ${python_prefix} in
10837 "${test_prefix}"|"${test_prefix}/"*|\
10838 '${exec_prefix}'|'${exec_prefix}/'*)
10839 value=1
10840 ;;
10841 esac
10842
10843cat >>confdefs.h <<_ACEOF
10844#define PYTHON_PATH_RELOCATABLE $value
10845_ACEOF
10846
10847
10848 fi
81ecdfbb 10849 fi
436868fb 10850fi
436868fb 10851
d13c7322
AB
10852
10853# Check whether --with-python-libdir was given.
10854if test "${with_python_libdir+set}" = set; then :
10855 withval=$with_python_libdir;
10856else
10857
10858 # If no python libdir is specified then select one based on
10859 # python's prefix path.
10860 if test -n "${python_prefix}"; then
10861 with_python_libdir=${python_prefix}/lib
10862 fi
10863
10864fi
10865
10866
ec685c5e 10867if test "${have_libpython}" != no; then
436868fb 10868
81ecdfbb 10869$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
436868fb 10870
81ecdfbb
RW
10871 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10872 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10873 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
94f7449c 10874 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
81ecdfbb 10875 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
436868fb 10876
d13c7322
AB
10877 if test -n "${with_python_libdir}"; then
10878
10879cat >>confdefs.h <<_ACEOF
10880#define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10881_ACEOF
10882
10883
10884 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10885 if test "x$prefix" = xNONE; then
10886 test_prefix=/usr/local
10887 else
10888 test_prefix=$prefix
10889 fi
10890 else
10891 test_prefix=$exec_prefix
10892 fi
10893 value=0
10894 case ${with_python_libdir} in
10895 "${test_prefix}"|"${test_prefix}/"*|\
10896 '${exec_prefix}'|'${exec_prefix}/'*)
10897 value=1
10898 ;;
10899 esac
10900
10901cat >>confdefs.h <<_ACEOF
10902#define PYTHON_LIBDIR_RELOCATABLE $value
10903_ACEOF
10904
10905
10906 fi
10907
81ecdfbb
RW
10908 # Flags needed to compile Python code (taken from python-config --cflags).
10909 # We cannot call python-config directly because it will output whatever was
10910 # used when compiling the Python interpreter itself, including flags which
10911 # would make the python-related objects be compiled differently from the
10912 # rest of GDB (e.g., -O2 and -fPIC).
10913 if test "${GCC}" = yes; then
ae292b3a
TT
10914 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10915 # Python headers recommend -DNDEBUG, but it's unclear if that just
10916 # refers to building Python itself. In release mode, though, it
10917 # doesn't hurt for the Python code in gdb to follow.
10918 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
81ecdfbb 10919 fi
436868fb 10920
81ecdfbb
RW
10921 if test "x${tentative_python_cflags}" != x; then
10922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10923$as_echo_n "checking compiler flags for python code... " >&6; }
10924 for flag in ${tentative_python_cflags}; do
10925 # Check that the compiler accepts it
10926 saved_CFLAGS="$CFLAGS"
10927 CFLAGS="$CFLAGS $flag"
10928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 10929/* end confdefs.h. */
81ecdfbb 10930
a9322a30
TT
10931int
10932main ()
10933{
a9322a30
TT
10934
10935 ;
10936 return 0;
10937}
bec39cab 10938_ACEOF
81ecdfbb
RW
10939if ac_fn_c_try_compile "$LINENO"; then :
10940 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
bec39cab 10941fi
81ecdfbb
RW
10942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943 CFLAGS="$saved_CFLAGS"
10944 done
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10946$as_echo "${PYTHON_CFLAGS}" >&6; }
10947 fi
043b6510 10948
c83393b9
JB
10949 # On x64 Windows, Python's include headers, and pyconfig.h in
10950 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10951 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10952 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10953 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10954 # The issue was reported to the Python community, but still isn't
10955 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10956
043b6510 10957 case "$gdb_host" in
c83393b9
JB
10958 mingw64)
10959 if test "${GCC}" = yes; then
10960 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10961 fi
10962 ;;
043b6510 10963 esac
81ecdfbb 10964else
6dddc817
DE
10965 # Even if Python support is not compiled in, we need to have this file
10966 # included so that the "python" command, et.al., still exists.
8fd8d003 10967 CONFIG_OBS="$CONFIG_OBS python/python.o"
6dddc817 10968 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
a9322a30 10969fi
9a156167 10970
a4a1c157
PA
10971# Work around Python http://bugs.python.org/issue10112. See also
10972# http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10973# no effect. Note that the only test after this that uses Python is
10974# the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10975# run without -export-dynamic too.
10976PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10977
10978
ed3ef339
DE
10979
10980
4df42755
DE
10981 if test "${have_libpython}" != no; then
10982 HAVE_PYTHON_TRUE=
10983 HAVE_PYTHON_FALSE='#'
10984else
10985 HAVE_PYTHON_TRUE='#'
10986 HAVE_PYTHON_FALSE=
10987fi
10988
ed3ef339
DE
10989
10990# -------------------- #
10991# Check for libguile. #
10992# -------------------- #
10993
10994
e1402065
DE
10995
10996
10997
10998
10999# Check whether --with-guile was given.
11000if test "${with_guile+set}" = set; then :
11001 withval=$with_guile;
11002else
11003 with_guile=auto
11004fi
11005
11006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11007$as_echo_n "checking whether to use guile... " >&6; }
11008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11009$as_echo "$with_guile" >&6; }
11010
ed3ef339
DE
11011# Extract the first word of "pkg-config", so it can be a program name with args.
11012set dummy pkg-config; ac_word=$2
11013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11014$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 11015if ${ac_cv_path_pkg_config_prog_path+:} false; then :
ed3ef339
DE
11016 $as_echo_n "(cached) " >&6
11017else
11018 case $pkg_config_prog_path in
11019 [\\/]* | ?:[\\/]*)
11020 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11021 ;;
11022 *)
11023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11024for as_dir in $PATH
11025do
11026 IFS=$as_save_IFS
11027 test -z "$as_dir" && as_dir=.
11028 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 11029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ed3ef339
DE
11030 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11032 break 2
11033 fi
11034done
11035 done
11036IFS=$as_save_IFS
11037
11038 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11039 ;;
11040esac
11041fi
11042pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11043if test -n "$pkg_config_prog_path"; then
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11045$as_echo "$pkg_config_prog_path" >&6; }
11046else
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11048$as_echo "no" >&6; }
11049fi
11050
11051
11052
ae5369e7 11053try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
ed3ef339
DE
11054have_libguile=no
11055case "${with_guile}" in
11056no)
11057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11058$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11059 ;;
11060auto)
e1402065
DE
11061 if test "${pkg_config_prog_path}" = "missing"; then
11062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11063$as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11064 else
ed3ef339
DE
11065
11066 pkg_config=${pkg_config_prog_path}
11067 guile_version_list=${try_guile_versions}
11068 flag_errors=no
11069
ed3ef339
DE
11070 found_usable_guile=checking
11071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11072$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11073 for guile_version in ${guile_version_list}; do
11074 ${pkg_config} --exists ${guile_version} 2>/dev/null
11075 if test $? != 0; then
11076 continue
11077 fi
11078 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11079 if test $? != 0; then
d0ac1c44 11080 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11081 fi
11082 new_LIBS=`${pkg_config} --libs ${guile_version}`
11083 if test $? != 0; then
d0ac1c44 11084 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11085 fi
11086 found_usable_guile=${guile_version}
11087 break
11088 done
11089 if test "${found_usable_guile}" = "checking"; then
11090 if test "${flag_errors}" = "yes"; then
d0ac1c44 11091 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11092 else
11093 found_usable_guile=no
11094 fi
11095 fi
11096 if test "${found_usable_guile}" != no; then
11097 save_CPPFLAGS=$CPPFLAGS
11098 save_LIBS=$LIBS
11099 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11100 LIBS="$LIBS $new_LIBS"
11101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11102/* end confdefs.h. */
11103#include "libguile.h"
11104int
11105main ()
11106{
11107scm_init_guile ();
11108 ;
11109 return 0;
11110}
11111_ACEOF
11112if ac_fn_c_try_link "$LINENO"; then :
11113 have_libguile=yes
11114 GUILE_CPPFLAGS=$new_CPPFLAGS
11115 GUILE_LIBS=$new_LIBS
11116else
11117 found_usable_guile=no
11118fi
11119rm -f core conftest.err conftest.$ac_objext \
11120 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11121 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11122if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11123
11124$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11125
11126
11127fi
11128
ed3ef339
DE
11129 CPPFLAGS=$save_CPPFLAGS
11130 LIBS=$save_LIBS
11131 if test "${found_usable_guile}" = no; then
11132 if test "${flag_errors}" = yes; then
11133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11135as_fn_error $? "linking guile version ${guile_version} test program failed
11136See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11137 fi
11138 fi
11139 fi
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11141$as_echo "${found_usable_guile}" >&6; }
11142
e1402065 11143 fi
ed3ef339
DE
11144 ;;
11145yes)
e1402065 11146 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11147 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11148 fi
ed3ef339
DE
11149
11150 pkg_config=${pkg_config_prog_path}
11151 guile_version_list=${try_guile_versions}
11152 flag_errors=yes
11153
ed3ef339
DE
11154 found_usable_guile=checking
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11156$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11157 for guile_version in ${guile_version_list}; do
11158 ${pkg_config} --exists ${guile_version} 2>/dev/null
11159 if test $? != 0; then
11160 continue
11161 fi
11162 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11163 if test $? != 0; then
d0ac1c44 11164 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11165 fi
11166 new_LIBS=`${pkg_config} --libs ${guile_version}`
11167 if test $? != 0; then
d0ac1c44 11168 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11169 fi
11170 found_usable_guile=${guile_version}
11171 break
11172 done
11173 if test "${found_usable_guile}" = "checking"; then
11174 if test "${flag_errors}" = "yes"; then
d0ac1c44 11175 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11176 else
11177 found_usable_guile=no
11178 fi
11179 fi
11180 if test "${found_usable_guile}" != no; then
11181 save_CPPFLAGS=$CPPFLAGS
11182 save_LIBS=$LIBS
11183 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11184 LIBS="$LIBS $new_LIBS"
11185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11186/* end confdefs.h. */
11187#include "libguile.h"
11188int
11189main ()
11190{
11191scm_init_guile ();
11192 ;
11193 return 0;
11194}
11195_ACEOF
11196if ac_fn_c_try_link "$LINENO"; then :
11197 have_libguile=yes
11198 GUILE_CPPFLAGS=$new_CPPFLAGS
11199 GUILE_LIBS=$new_LIBS
11200else
11201 found_usable_guile=no
11202fi
11203rm -f core conftest.err conftest.$ac_objext \
11204 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11205 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11206if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11207
11208$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11209
11210
11211fi
11212
ed3ef339
DE
11213 CPPFLAGS=$save_CPPFLAGS
11214 LIBS=$save_LIBS
11215 if test "${found_usable_guile}" = no; then
11216 if test "${flag_errors}" = yes; then
11217 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11218$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11219as_fn_error $? "linking guile version ${guile_version} test program failed
11220See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11221 fi
11222 fi
11223 fi
11224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11225$as_echo "${found_usable_guile}" >&6; }
11226
11227 ;;
11228[\\/]* | ?:[\\/]*)
e1402065 11229 if test -x "${with_guile}"; then
ed3ef339
DE
11230
11231 pkg_config=${with_guile}
11232 guile_version_list=${try_guile_versions}
11233 flag_errors=yes
11234
ed3ef339
DE
11235 found_usable_guile=checking
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11237$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11238 for guile_version in ${guile_version_list}; do
11239 ${pkg_config} --exists ${guile_version} 2>/dev/null
11240 if test $? != 0; then
11241 continue
11242 fi
11243 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11244 if test $? != 0; then
d0ac1c44 11245 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11246 fi
11247 new_LIBS=`${pkg_config} --libs ${guile_version}`
11248 if test $? != 0; then
d0ac1c44 11249 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11250 fi
11251 found_usable_guile=${guile_version}
11252 break
11253 done
11254 if test "${found_usable_guile}" = "checking"; then
11255 if test "${flag_errors}" = "yes"; then
d0ac1c44 11256 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11257 else
11258 found_usable_guile=no
11259 fi
11260 fi
11261 if test "${found_usable_guile}" != no; then
11262 save_CPPFLAGS=$CPPFLAGS
11263 save_LIBS=$LIBS
11264 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11265 LIBS="$LIBS $new_LIBS"
11266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11267/* end confdefs.h. */
11268#include "libguile.h"
11269int
11270main ()
11271{
11272scm_init_guile ();
11273 ;
11274 return 0;
11275}
11276_ACEOF
11277if ac_fn_c_try_link "$LINENO"; then :
11278 have_libguile=yes
11279 GUILE_CPPFLAGS=$new_CPPFLAGS
11280 GUILE_LIBS=$new_LIBS
11281else
11282 found_usable_guile=no
11283fi
11284rm -f core conftest.err conftest.$ac_objext \
11285 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11286 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11287if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11288
11289$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11290
11291
11292fi
11293
ed3ef339
DE
11294 CPPFLAGS=$save_CPPFLAGS
11295 LIBS=$save_LIBS
11296 if test "${found_usable_guile}" = no; then
11297 if test "${flag_errors}" = yes; then
11298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11300as_fn_error $? "linking guile version ${guile_version} test program failed
11301See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11302 fi
11303 fi
11304 fi
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11306$as_echo "${found_usable_guile}" >&6; }
11307
e1402065 11308 else
d0ac1c44 11309 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
e1402065 11310 fi
ed3ef339
DE
11311 ;;
11312"" | */*)
11313 # Disallow --with=guile="" and --with-guile=foo/bar.
d0ac1c44 11314 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
ed3ef339
DE
11315 ;;
11316*)
11317 # A space separate list of guile versions to try, in order.
e1402065 11318 if test "${pkg_config_prog_path}" = "missing"; then
d0ac1c44 11319 as_fn_error $? "pkg-config not found" "$LINENO" 5
e1402065 11320 fi
ed3ef339
DE
11321
11322 pkg_config=${pkg_config_prog_path}
11323 guile_version_list=${with_guile}
11324 flag_errors=yes
11325
ed3ef339
DE
11326 found_usable_guile=checking
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11328$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11329 for guile_version in ${guile_version_list}; do
11330 ${pkg_config} --exists ${guile_version} 2>/dev/null
11331 if test $? != 0; then
11332 continue
11333 fi
11334 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11335 if test $? != 0; then
d0ac1c44 11336 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
ed3ef339
DE
11337 fi
11338 new_LIBS=`${pkg_config} --libs ${guile_version}`
11339 if test $? != 0; then
d0ac1c44 11340 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
ed3ef339
DE
11341 fi
11342 found_usable_guile=${guile_version}
11343 break
11344 done
11345 if test "${found_usable_guile}" = "checking"; then
11346 if test "${flag_errors}" = "yes"; then
d0ac1c44 11347 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
ed3ef339
DE
11348 else
11349 found_usable_guile=no
11350 fi
11351 fi
11352 if test "${found_usable_guile}" != no; then
11353 save_CPPFLAGS=$CPPFLAGS
11354 save_LIBS=$LIBS
11355 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11356 LIBS="$LIBS $new_LIBS"
11357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11358/* end confdefs.h. */
11359#include "libguile.h"
11360int
11361main ()
11362{
11363scm_init_guile ();
11364 ;
11365 return 0;
11366}
11367_ACEOF
11368if ac_fn_c_try_link "$LINENO"; then :
11369 have_libguile=yes
11370 GUILE_CPPFLAGS=$new_CPPFLAGS
11371 GUILE_LIBS=$new_LIBS
11372else
11373 found_usable_guile=no
11374fi
11375rm -f core conftest.err conftest.$ac_objext \
11376 conftest$ac_exeext conftest.$ac_ext
92fab5a6 11377 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
d0ac1c44 11378if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
92fab5a6
AW
11379
11380$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11381
11382
11383fi
11384
ed3ef339
DE
11385 CPPFLAGS=$save_CPPFLAGS
11386 LIBS=$save_LIBS
11387 if test "${found_usable_guile}" = no; then
11388 if test "${flag_errors}" = yes; then
11389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
11391as_fn_error $? "linking guile version ${guile_version} test program failed
11392See \`config.log' for more details" "$LINENO" 5; }
ed3ef339
DE
11393 fi
11394 fi
11395 fi
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11397$as_echo "${found_usable_guile}" >&6; }
11398
11399 ;;
11400esac
11401
e76c5d17 11402if test "${have_libguile}" != no; then
d342a0da
DE
11403 case "${with_guile}" in
11404 [\\/]* | ?:[\\/]*)
e76c5d17
DE
11405
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11407$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11408if ${ac_cv_guild_program_name+:} false; then :
e76c5d17
DE
11409 $as_echo_n "(cached) " >&6
11410else
d342a0da 11411 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
e76c5d17
DE
11412
11413 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11414 # the 'guild' and 'bindir' variables. In that case, try to guess
11415 # what the program name is, at the risk of getting it wrong if
11416 # Guile was configured with '--program-suffix' or similar.
11417 if test "x$ac_cv_guild_program_name" = "x"; then
d342a0da 11418 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
e76c5d17
DE
11419 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11420 fi
11421
11422fi
11423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11424$as_echo "$ac_cv_guild_program_name" >&6; }
11425
11426 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11427 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
e76c5d17
DE
11428 fi
11429
11430 GUILD="$ac_cv_guild_program_name"
11431
11432
d342a0da
DE
11433 ;;
11434 *)
11435
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11437$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
d0ac1c44 11438if ${ac_cv_guild_program_name+:} false; then :
d342a0da
DE
11439 $as_echo_n "(cached) " >&6
11440else
11441 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11442
11443 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11444 # the 'guild' and 'bindir' variables. In that case, try to guess
11445 # what the program name is, at the risk of getting it wrong if
11446 # Guile was configured with '--program-suffix' or similar.
11447 if test "x$ac_cv_guild_program_name" = "x"; then
11448 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11449 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11450 fi
11451
11452fi
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11454$as_echo "$ac_cv_guild_program_name" >&6; }
11455
11456 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
d0ac1c44 11457 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
d342a0da
DE
11458 fi
11459
11460 GUILD="$ac_cv_guild_program_name"
11461
11462
11463 ;;
11464 esac
e76c5d17
DE
11465
11466
11467 if test "$cross_compiling" = no; then
11468 GUILD_TARGET_FLAG=
11469 else
11470 GUILD_TARGET_FLAG="--target=$host"
11471 fi
11472
11473
11474
11475
11476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11477$as_echo_n "checking whether guild supports this host... " >&6; }
d0ac1c44 11478if ${ac_cv_guild_ok+:} false; then :
e76c5d17
DE
11479 $as_echo_n "(cached) " >&6
11480else
11481 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11482 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11483 ac_cv_guild_ok=yes
11484 else
11485 ac_cv_guild_ok=no
11486 fi
11487fi
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11489$as_echo "$ac_cv_guild_ok" >&6; }
11490
11491 if test "$ac_cv_guild_ok" = no; then
11492 have_libguile=no
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11494$as_echo "$as_me: WARNING: disabling guile support" >&2;}
11495 fi
11496fi
11497
ed3ef339
DE
11498if test "${have_libguile}" != no; then
11499
11500$as_echo "#define HAVE_GUILE 1" >>confdefs.h
11501
11502 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11503 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11504 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11505 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11506 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
16954d5d
LC
11507
11508 save_LIBS="$LIBS"
11509 save_CPPFLAGS="$CPPFLAGS"
11510 LIBS="$GUILE_LIBS"
11511 CPPFLAGS="$GUILE_CPPFLAGS"
11512 for ac_func in scm_new_smob
11513do :
11514 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
d0ac1c44 11515if test "x$ac_cv_func_scm_new_smob" = xyes; then :
16954d5d
LC
11516 cat >>confdefs.h <<_ACEOF
11517#define HAVE_SCM_NEW_SMOB 1
11518_ACEOF
11519
11520fi
11521done
11522
11523 LIBS="$save_LIBS"
11524 CPPFLAGS="$save_CPPFLAGS"
ed3ef339
DE
11525else
11526 # Even if Guile support is not compiled in, we need to have these files
11527 # included.
bd810fff 11528 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
ed3ef339
DE
11529 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11530fi
9a156167 11531
ac534cba 11532
4df42755
DE
11533 if test "${have_libguile}" != no; then
11534 HAVE_GUILE_TRUE=
11535 HAVE_GUILE_FALSE='#'
11536else
11537 HAVE_GUILE_TRUE='#'
11538 HAVE_GUILE_FALSE=
11539fi
11540
ac534cba 11541
62f29fda
TT
11542# ---------------------------- #
11543# Check for source highlight. #
11544# ---------------------------- #
11545
11546SRCHIGH_LIBS=
11547SRCHIGH_CFLAGS=
189b8c2e
ST
11548
11549# Check whether --enable-source-highlight was given.
11550if test "${enable_source_highlight+set}" = set; then :
11551 enableval=$enable_source_highlight; case "${enableval}" in
11552 yes) enable_source_highlight=yes ;;
11553 no) enable_source_highlight=no ;;
11554 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11555esac
11556else
11557 enable_source_highlight=auto
11558fi
11559
11560
11561if test "${enable_source_highlight}" != "no"; then
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
6c28e44a 11563$as_echo_n "checking for the source-highlight library... " >&6; }
189b8c2e
ST
11564 if test "${pkg_config_prog_path}" = "missing"; then
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
62f29fda 11566$as_echo "no - pkg-config not found" >&6; }
189b8c2e
ST
11567 if test "${enable_source_highlight}" = "yes"; then
11568 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11569 fi
11570 else
d806ea2d
TT
11571 case "$LDFLAGS" in
11572 *static-libstdc*)
11573 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11574 ;;
11575 esac
11576
189b8c2e 11577 if ${pkg_config_prog_path} --exists source-highlight; then
62f29fda
TT
11578 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11579 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11580
11581$as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11582
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11584$as_echo "yes" >&6; }
189b8c2e 11585 else
62f29fda
TT
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11587$as_echo "no" >&6; }
189b8c2e
ST
11588 if test "${enable_source_highlight}" = "yes"; then
11589 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11590 fi
11591 fi
11592 fi
62f29fda
TT
11593fi
11594
11595
11596
05ea2a05
TT
11597# ------------------------- #
11598# Checks for header files. #
11599# ------------------------- #
58bfce93 11600
05ea2a05
TT
11601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11602$as_echo_n "checking for ANSI C header files... " >&6; }
11603if ${ac_cv_header_stdc+:} false; then :
11604 $as_echo_n "(cached) " >&6
58bfce93 11605else
5599c404
MM
11606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11607/* end confdefs.h. */
05ea2a05
TT
11608#include <stdlib.h>
11609#include <stdarg.h>
11610#include <string.h>
11611#include <float.h>
5599c404 11612
05ea2a05
TT
11613int
11614main ()
11615{
5599c404 11616
05ea2a05
TT
11617 ;
11618 return 0;
11619}
5599c404 11620_ACEOF
05ea2a05
TT
11621if ac_fn_c_try_compile "$LINENO"; then :
11622 ac_cv_header_stdc=yes
5599c404 11623else
05ea2a05 11624 ac_cv_header_stdc=no
5599c404 11625fi
05ea2a05 11626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58bfce93 11627
05ea2a05
TT
11628if test $ac_cv_header_stdc = yes; then
11629 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11631/* end confdefs.h. */
11632#include <string.h>
58bfce93 11633
05ea2a05
TT
11634_ACEOF
11635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11636 $EGREP "memchr" >/dev/null 2>&1; then :
58bfce93 11637
05ea2a05
TT
11638else
11639 ac_cv_header_stdc=no
11640fi
11641rm -f conftest*
58bfce93 11642
05ea2a05 11643fi
58bfce93 11644
05ea2a05
TT
11645if test $ac_cv_header_stdc = yes; then
11646 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11648/* end confdefs.h. */
11649#include <stdlib.h>
58bfce93 11650
05ea2a05
TT
11651_ACEOF
11652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11653 $EGREP "free" >/dev/null 2>&1; then :
58bfce93 11654
05ea2a05
TT
11655else
11656 ac_cv_header_stdc=no
11657fi
11658rm -f conftest*
58bfce93 11659
05ea2a05 11660fi
58bfce93 11661
05ea2a05
TT
11662if test $ac_cv_header_stdc = yes; then
11663 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11664 if test "$cross_compiling" = yes; then :
11665 :
11666else
11667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11668/* end confdefs.h. */
11669#include <ctype.h>
11670#include <stdlib.h>
11671#if ((' ' & 0x0FF) == 0x020)
11672# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11673# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11674#else
11675# define ISLOWER(c) \
11676 (('a' <= (c) && (c) <= 'i') \
11677 || ('j' <= (c) && (c) <= 'r') \
11678 || ('s' <= (c) && (c) <= 'z'))
11679# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11680#endif
58bfce93 11681
05ea2a05
TT
11682#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11683int
11684main ()
11685{
11686 int i;
11687 for (i = 0; i < 256; i++)
11688 if (XOR (islower (i), ISLOWER (i))
11689 || toupper (i) != TOUPPER (i))
11690 return 2;
11691 return 0;
11692}
11693_ACEOF
11694if ac_fn_c_try_run "$LINENO"; then :
58bfce93 11695
05ea2a05
TT
11696else
11697 ac_cv_header_stdc=no
11698fi
11699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11700 conftest.$ac_objext conftest.beam conftest.$ac_ext
11701fi
58bfce93 11702
05ea2a05
TT
11703fi
11704fi
11705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11706$as_echo "$ac_cv_header_stdc" >&6; }
11707if test $ac_cv_header_stdc = yes; then
58bfce93 11708
05ea2a05 11709$as_echo "#define STDC_HEADERS 1" >>confdefs.h
58bfce93 11710
05ea2a05 11711fi
58bfce93 11712
05ea2a05 11713# elf_hp.h is for HP/UX 64-bit shared library support.
8ae8e197 11714for ac_header in nlist.h machine/reg.h \
05ea2a05
TT
11715 thread_db.h \
11716 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11717 sys/resource.h sys/ptrace.h ptrace.h \
8ae8e197 11718 sys/reg.h sys/debugreg.h \
05ea2a05
TT
11719 termios.h elf_hp.h
11720do :
11721 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11722ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11723if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11724 cat >>confdefs.h <<_ACEOF
11725#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11726_ACEOF
58bfce93
MM
11727
11728fi
11729
05ea2a05 11730done
58bfce93 11731
05ea2a05
TT
11732for ac_header in sys/user.h
11733do :
11734 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11735# include <sys/param.h>
11736#endif
58bfce93 11737
05ea2a05
TT
11738"
11739if test "x$ac_cv_header_sys_user_h" = xyes; then :
11740 cat >>confdefs.h <<_ACEOF
11741#define HAVE_SYS_USER_H 1
11742_ACEOF
58bfce93 11743
05ea2a05 11744fi
58bfce93 11745
05ea2a05 11746done
58bfce93 11747
58bfce93 11748
05ea2a05
TT
11749for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11750do :
11751 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11752ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11753if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11754 cat >>confdefs.h <<_ACEOF
11755#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11756_ACEOF
58bfce93 11757
05ea2a05 11758fi
58bfce93 11759
05ea2a05 11760done
58bfce93 11761
05ea2a05
TT
11762for ac_header in term.h
11763do :
11764 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11765# include <curses.h>
11766#endif
58bfce93 11767
05ea2a05
TT
11768"
11769if test "x$ac_cv_header_term_h" = xyes; then :
11770 cat >>confdefs.h <<_ACEOF
11771#define HAVE_TERM_H 1
11772_ACEOF
58bfce93 11773
05ea2a05 11774fi
58bfce93 11775
05ea2a05 11776done
58bfce93 11777
58bfce93 11778
95420d30 11779for ac_header in sys/socket.h
05a6b8c2 11780do :
95420d30
TV
11781 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
11782if test "x$ac_cv_header_sys_socket_h" = xyes; then :
05a6b8c2 11783 cat >>confdefs.h <<_ACEOF
95420d30 11784#define HAVE_SYS_SOCKET_H 1
05a6b8c2
EZ
11785_ACEOF
11786
11787fi
11788
11789done
11790
11791for ac_header in ws2tcpip.h
11792do :
11793 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
11794if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
11795 cat >>confdefs.h <<_ACEOF
11796#define HAVE_WS2TCPIP_H 1
11797_ACEOF
11798
11799fi
11800
11801done
11802
11803
05ea2a05
TT
11804# ------------------------- #
11805# Checks for declarations. #
11806# ------------------------- #
58bfce93 11807
58bfce93 11808
05ea2a05
TT
11809 # Check for presence and size of long long.
11810 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11811if test "x$ac_cv_type_long_long" = xyes; then :
58bfce93 11812
05ea2a05
TT
11813cat >>confdefs.h <<_ACEOF
11814#define HAVE_LONG_LONG 1
11815_ACEOF
11816
11817# The cast to long int works around a bug in the HP C Compiler
11818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11820# This bug is HP SR number 8606223364.
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11822$as_echo_n "checking size of long long... " >&6; }
11823if ${ac_cv_sizeof_long_long+:} false; then :
58bfce93
MM
11824 $as_echo_n "(cached) " >&6
11825else
05ea2a05 11826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
58bfce93 11827
58bfce93 11828else
05ea2a05
TT
11829 if test "$ac_cv_type_long_long" = yes; then
11830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11832as_fn_error 77 "cannot compute sizeof (long long)
11833See \`config.log' for more details" "$LINENO" 5; }
11834 else
11835 ac_cv_sizeof_long_long=0
11836 fi
58bfce93 11837fi
58bfce93
MM
11838
11839fi
05ea2a05
TT
11840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11841$as_echo "$ac_cv_sizeof_long_long" >&6; }
58bfce93 11842
58bfce93 11843
58bfce93 11844
05ea2a05
TT
11845cat >>confdefs.h <<_ACEOF
11846#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11847_ACEOF
58bfce93
MM
11848
11849
05ea2a05 11850fi
58bfce93
MM
11851
11852
05ea2a05
TT
11853 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11854ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11855if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11856 ac_have_decl=1
11857else
11858 ac_have_decl=0
11859fi
58bfce93 11860
05ea2a05
TT
11861cat >>confdefs.h <<_ACEOF
11862#define HAVE_DECL_BASENAME $ac_have_decl
c56ccc05 11863_ACEOF
05ea2a05
TT
11864ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11865if test "x$ac_cv_have_decl_ffs" = xyes; then :
11866 ac_have_decl=1
11867else
11868 ac_have_decl=0
c56ccc05 11869fi
c56ccc05
MM
11870
11871cat >>confdefs.h <<_ACEOF
05ea2a05 11872#define HAVE_DECL_FFS $ac_have_decl
c56ccc05 11873_ACEOF
05ea2a05
TT
11874ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11875if test "x$ac_cv_have_decl_asprintf" = 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_ASPRINTF $ac_have_decl
c56ccc05 11883_ACEOF
05ea2a05
TT
11884ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11885if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11886 ac_have_decl=1
11887else
11888 ac_have_decl=0
11889fi
c56ccc05 11890
05ea2a05
TT
11891cat >>confdefs.h <<_ACEOF
11892#define HAVE_DECL_VASPRINTF $ac_have_decl
11893_ACEOF
11894ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11895if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11896 ac_have_decl=1
11897else
11898 ac_have_decl=0
c56ccc05
MM
11899fi
11900
05ea2a05
TT
11901cat >>confdefs.h <<_ACEOF
11902#define HAVE_DECL_SNPRINTF $ac_have_decl
11903_ACEOF
11904ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11905if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11906 ac_have_decl=1
11907else
11908 ac_have_decl=0
58bfce93
MM
11909fi
11910
05ea2a05
TT
11911cat >>confdefs.h <<_ACEOF
11912#define HAVE_DECL_VSNPRINTF $ac_have_decl
11913_ACEOF
c890192f 11914
05ea2a05
TT
11915 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11916if test "x$ac_cv_have_decl_strtol" = xyes; then :
11917 ac_have_decl=1
bec39cab 11918else
05ea2a05
TT
11919 ac_have_decl=0
11920fi
81ecdfbb 11921
05ea2a05
TT
11922cat >>confdefs.h <<_ACEOF
11923#define HAVE_DECL_STRTOL $ac_have_decl
11924_ACEOF
11925ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11926if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11927 ac_have_decl=1
11928else
11929 ac_have_decl=0
11930fi
a9322a30 11931
05ea2a05
TT
11932cat >>confdefs.h <<_ACEOF
11933#define HAVE_DECL_STRTOUL $ac_have_decl
bec39cab 11934_ACEOF
05ea2a05
TT
11935ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11936if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11937 ac_have_decl=1
bec39cab 11938else
05ea2a05 11939 ac_have_decl=0
a9322a30 11940fi
bec39cab 11941
05ea2a05
TT
11942cat >>confdefs.h <<_ACEOF
11943#define HAVE_DECL_STRTOLL $ac_have_decl
11944_ACEOF
11945ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11946if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11947 ac_have_decl=1
11948else
11949 ac_have_decl=0
11950fi
bec39cab 11951
05ea2a05
TT
11952cat >>confdefs.h <<_ACEOF
11953#define HAVE_DECL_STRTOULL $ac_have_decl
81ecdfbb 11954_ACEOF
bec39cab 11955
05ea2a05
TT
11956 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11957if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11958 ac_have_decl=1
bec39cab 11959else
05ea2a05 11960 ac_have_decl=0
81ecdfbb 11961fi
81ecdfbb 11962
05ea2a05
TT
11963cat >>confdefs.h <<_ACEOF
11964#define HAVE_DECL_STRVERSCMP $ac_have_decl
11965_ACEOF
81ecdfbb 11966
81ecdfbb 11967
06825bd1 11968
05ea2a05
TT
11969ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11970if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11971 ac_have_decl=1
81ecdfbb 11972else
05ea2a05 11973 ac_have_decl=0
81ecdfbb 11974fi
bec39cab 11975
05ea2a05
TT
11976cat >>confdefs.h <<_ACEOF
11977#define HAVE_DECL_SNPRINTF $ac_have_decl
11978_ACEOF
81ecdfbb 11979
05ea2a05
TT
11980
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11982$as_echo_n "checking for LC_MESSAGES... " >&6; }
11983if ${am_cv_val_LC_MESSAGES+:} false; then :
11984 $as_echo_n "(cached) " >&6
bec39cab 11985else
81ecdfbb 11986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 11987/* end confdefs.h. */
05ea2a05 11988#include <locale.h>
a9322a30
TT
11989int
11990main ()
11991{
05ea2a05
TT
11992return LC_MESSAGES
11993 ;
a9322a30
TT
11994 return 0;
11995}
bec39cab 11996_ACEOF
05ea2a05
TT
11997if ac_fn_c_try_link "$LINENO"; then :
11998 am_cv_val_LC_MESSAGES=yes
bec39cab 11999else
05ea2a05 12000 am_cv_val_LC_MESSAGES=no
81ecdfbb 12001fi
05ea2a05
TT
12002rm -f core conftest.err conftest.$ac_objext \
12003 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12004fi
05ea2a05
TT
12005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12006$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12007 if test $am_cv_val_LC_MESSAGES = yes; then
bec39cab 12008
05ea2a05 12009$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
bec39cab 12010
05ea2a05 12011 fi
5ee754fc 12012
bec39cab 12013
05ea2a05
TT
12014# ------------------ #
12015# Checks for types. #
12016# ------------------ #
12017
12018ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
05a6b8c2
EZ
12019#if HAVE_SYS_SOCKET_H
12020# include <sys/socket.h>
12021#elif HAVE_WS2TCPIP_H
12022# include <ws2tcpip.h>
12023#endif
05ea2a05
TT
12024
12025"
12026if test "x$ac_cv_type_socklen_t" = xyes; then :
12027
12028cat >>confdefs.h <<_ACEOF
12029#define HAVE_SOCKLEN_T 1
bec39cab 12030_ACEOF
c906108c 12031
05ea2a05 12032
bec39cab 12033fi
81ecdfbb 12034
81ecdfbb 12035
05ea2a05
TT
12036# ------------------------------------- #
12037# Checks for compiler characteristics. #
12038# ------------------------------------- #
a9322a30 12039
05ea2a05
TT
12040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12041$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12042if ${ac_cv_c_const+:} false; then :
12043 $as_echo_n "(cached) " >&6
12044else
12045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046/* end confdefs.h. */
bec39cab 12047
05ea2a05
TT
12048int
12049main ()
12050{
bec39cab 12051
05ea2a05
TT
12052#ifndef __cplusplus
12053 /* Ultrix mips cc rejects this sort of thing. */
12054 typedef int charset[2];
12055 const charset cs = { 0, 0 };
12056 /* SunOS 4.1.1 cc rejects this. */
12057 char const *const *pcpcc;
12058 char **ppc;
12059 /* NEC SVR4.0.2 mips cc rejects this. */
12060 struct point {int x, y;};
12061 static struct point const zero = {0,0};
12062 /* AIX XL C 1.02.0.0 rejects this.
12063 It does not let you subtract one const X* pointer from another in
12064 an arm of an if-expression whose if-part is not a constant
12065 expression */
12066 const char *g = "string";
12067 pcpcc = &g + (g ? g-g : 0);
12068 /* HPUX 7.0 cc rejects these. */
12069 ++pcpcc;
12070 ppc = (char**) pcpcc;
12071 pcpcc = (char const *const *) ppc;
12072 { /* SCO 3.2v4 cc rejects this sort of thing. */
12073 char tx;
12074 char *t = &tx;
12075 char const *s = 0 ? (char *) 0 : (char const *) 0;
5ee754fc 12076
05ea2a05
TT
12077 *t++ = 0;
12078 if (s) return 0;
12079 }
12080 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12081 int x[] = {25, 17};
12082 const int *foo = &x[0];
12083 ++foo;
12084 }
12085 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12086 typedef const int *iptr;
12087 iptr p = 0;
12088 ++p;
12089 }
12090 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12091 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12092 struct s { int j; const int *ap[3]; } bx;
12093 struct s *b = &bx; b->j = 5;
12094 }
12095 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12096 const int foo = 10;
12097 if (!foo) return 0;
12098 }
12099 return !cs[0] && !zero.x;
12100#endif
5ee754fc 12101
05ea2a05
TT
12102 ;
12103 return 0;
12104}
bec39cab 12105_ACEOF
05ea2a05
TT
12106if ac_fn_c_try_compile "$LINENO"; then :
12107 ac_cv_c_const=yes
12108else
12109 ac_cv_c_const=no
12110fi
12111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 12112fi
05ea2a05
TT
12113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12114$as_echo "$ac_cv_c_const" >&6; }
12115if test $ac_cv_c_const = no; then
5ee754fc 12116
05ea2a05 12117$as_echo "#define const /**/" >>confdefs.h
bec39cab 12118
05ea2a05
TT
12119fi
12120
12121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12122$as_echo_n "checking for inline... " >&6; }
12123if ${ac_cv_c_inline+:} false; then :
12124 $as_echo_n "(cached) " >&6
12125else
12126 ac_cv_c_inline=no
12127for ac_kw in inline __inline__ __inline; do
12128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12129/* end confdefs.h. */
12130#ifndef __cplusplus
12131typedef int foo_t;
12132static $ac_kw foo_t static_foo () {return 0; }
12133$ac_kw foo_t foo () {return 0; }
81ecdfbb 12134#endif
bec39cab 12135
a8111142 12136_ACEOF
05ea2a05
TT
12137if ac_fn_c_try_compile "$LINENO"; then :
12138 ac_cv_c_inline=$ac_kw
a8111142 12139fi
05ea2a05
TT
12140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12141 test "$ac_cv_c_inline" != no && break
81ecdfbb 12142done
a8111142 12143
05ea2a05
TT
12144fi
12145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12146$as_echo "$ac_cv_c_inline" >&6; }
a8111142 12147
05ea2a05
TT
12148case $ac_cv_c_inline in
12149 inline | yes) ;;
12150 *)
12151 case $ac_cv_c_inline in
12152 no) ac_val=;;
12153 *) ac_val=$ac_cv_c_inline;;
12154 esac
12155 cat >>confdefs.h <<_ACEOF
12156#ifndef __cplusplus
12157#define inline $ac_val
12158#endif
07697489 12159_ACEOF
05ea2a05
TT
12160 ;;
12161esac
07697489 12162
05ea2a05
TT
12163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12164$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12165if ${ac_cv_c_bigendian+:} false; then :
07697489
PA
12166 $as_echo_n "(cached) " >&6
12167else
05ea2a05
TT
12168 ac_cv_c_bigendian=unknown
12169 # See if we're dealing with a universal compiler.
12170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12171/* end confdefs.h. */
12172#ifndef __APPLE_CC__
12173 not a universal capable compiler
12174 #endif
12175 typedef int dummy;
07697489 12176
05ea2a05
TT
12177_ACEOF
12178if ac_fn_c_try_compile "$LINENO"; then :
07697489 12179
05ea2a05
TT
12180 # Check for potential -arch flags. It is not universal unless
12181 # there are at least two -arch flags with different values.
12182 ac_arch=
12183 ac_prev=
12184 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12185 if test -n "$ac_prev"; then
12186 case $ac_word in
12187 i?86 | x86_64 | ppc | ppc64)
12188 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12189 ac_arch=$ac_word
12190 else
12191 ac_cv_c_bigendian=universal
12192 break
12193 fi
12194 ;;
12195 esac
12196 ac_prev=
12197 elif test "x$ac_word" = "x-arch"; then
12198 ac_prev=arch
12199 fi
12200 done
07697489 12201fi
05ea2a05
TT
12202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12203 if test $ac_cv_c_bigendian = unknown; then
12204 # See if sys/param.h defines the BYTE_ORDER macro.
12205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12206/* end confdefs.h. */
12207#include <sys/types.h>
12208 #include <sys/param.h>
07697489 12209
05ea2a05
TT
12210int
12211main ()
12212{
12213#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12214 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12215 && LITTLE_ENDIAN)
12216 bogus endian macros
12217 #endif
07697489 12218
05ea2a05
TT
12219 ;
12220 return 0;
12221}
07697489 12222_ACEOF
05ea2a05
TT
12223if ac_fn_c_try_compile "$LINENO"; then :
12224 # It does; now see whether it defined to BIG_ENDIAN or not.
12225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12226/* end confdefs.h. */
12227#include <sys/types.h>
12228 #include <sys/param.h>
07697489 12229
05ea2a05
TT
12230int
12231main ()
12232{
12233#if BYTE_ORDER != BIG_ENDIAN
12234 not big endian
12235 #endif
07697489 12236
05ea2a05
TT
12237 ;
12238 return 0;
12239}
07697489 12240_ACEOF
05ea2a05
TT
12241if ac_fn_c_try_compile "$LINENO"; then :
12242 ac_cv_c_bigendian=yes
07697489 12243else
05ea2a05 12244 ac_cv_c_bigendian=no
07697489 12245fi
05ea2a05 12246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12247fi
05ea2a05
TT
12248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12249 fi
12250 if test $ac_cv_c_bigendian = unknown; then
12251 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12253/* end confdefs.h. */
12254#include <limits.h>
07697489 12255
05ea2a05
TT
12256int
12257main ()
12258{
12259#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12260 bogus endian macros
12261 #endif
07697489 12262
05ea2a05
TT
12263 ;
12264 return 0;
12265}
07697489 12266_ACEOF
05ea2a05
TT
12267if ac_fn_c_try_compile "$LINENO"; then :
12268 # It does; now see whether it defined to _BIG_ENDIAN or not.
12269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12270/* end confdefs.h. */
12271#include <limits.h>
07697489 12272
05ea2a05
TT
12273int
12274main ()
12275{
12276#ifndef _BIG_ENDIAN
12277 not big endian
12278 #endif
07697489 12279
05ea2a05
TT
12280 ;
12281 return 0;
12282}
07697489 12283_ACEOF
05ea2a05
TT
12284if ac_fn_c_try_compile "$LINENO"; then :
12285 ac_cv_c_bigendian=yes
07697489 12286else
05ea2a05 12287 ac_cv_c_bigendian=no
07697489 12288fi
05ea2a05 12289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
07697489 12290fi
05ea2a05
TT
12291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12292 fi
12293 if test $ac_cv_c_bigendian = unknown; then
12294 # Compile a test program.
12295 if test "$cross_compiling" = yes; then :
12296 # Try to guess by grepping values from an object file.
12297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12298/* end confdefs.h. */
12299short int ascii_mm[] =
12300 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12301 short int ascii_ii[] =
12302 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12303 int use_ascii (int i) {
12304 return ascii_mm[i] + ascii_ii[i];
12305 }
12306 short int ebcdic_ii[] =
12307 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12308 short int ebcdic_mm[] =
12309 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12310 int use_ebcdic (int i) {
12311 return ebcdic_mm[i] + ebcdic_ii[i];
12312 }
12313 extern int foo;
07697489 12314
05ea2a05
TT
12315int
12316main ()
12317{
12318return use_ascii (foo) == use_ebcdic (foo);
12319 ;
12320 return 0;
12321}
07697489 12322_ACEOF
05ea2a05
TT
12323if ac_fn_c_try_compile "$LINENO"; then :
12324 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12325 ac_cv_c_bigendian=yes
12326 fi
12327 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12328 if test "$ac_cv_c_bigendian" = unknown; then
12329 ac_cv_c_bigendian=no
12330 else
12331 # finding both strings is unlikely to happen, but who knows?
12332 ac_cv_c_bigendian=unknown
12333 fi
12334 fi
07697489 12335fi
05ea2a05
TT
12336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12337else
12338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339/* end confdefs.h. */
12340$ac_includes_default
12341int
12342main ()
12343{
07697489 12344
05ea2a05
TT
12345 /* Are we little or big endian? From Harbison&Steele. */
12346 union
12347 {
12348 long int l;
12349 char c[sizeof (long int)];
12350 } u;
12351 u.l = 1;
12352 return u.c[sizeof (long int) - 1] == 1;
12353
12354 ;
12355 return 0;
12356}
07697489 12357_ACEOF
05ea2a05
TT
12358if ac_fn_c_try_run "$LINENO"; then :
12359 ac_cv_c_bigendian=no
07697489 12360else
05ea2a05
TT
12361 ac_cv_c_bigendian=yes
12362fi
12363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12364 conftest.$ac_objext conftest.beam conftest.$ac_ext
07697489
PA
12365fi
12366
05ea2a05 12367 fi
07697489 12368fi
05ea2a05
TT
12369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12370$as_echo "$ac_cv_c_bigendian" >&6; }
12371 case $ac_cv_c_bigendian in #(
12372 yes)
12373 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12374;; #(
12375 no)
12376 ;; #(
12377 universal)
07697489 12378
05ea2a05 12379$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
07697489 12380
05ea2a05
TT
12381 ;; #(
12382 *)
12383 as_fn_error $? "unknown endianness
12384 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12385 esac
07697489
PA
12386
12387
05ea2a05
TT
12388# ------------------------------ #
12389# Checks for library functions. #
12390# ------------------------------ #
81ecdfbb 12391
05ea2a05 12392for ac_func in getuid getgid \
8ae8e197 12393 pipe pread pread64 pwrite resize_term \
05ea2a05
TT
12394 getpgid setsid \
12395 sigaction sigsetmask socketpair \
12396 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12397 setrlimit getrlimit posix_madvise waitpid \
12398 use_default_colors
12399do :
12400 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12401ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12402if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12403 cat >>confdefs.h <<_ACEOF
12404#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
a9322a30 12405_ACEOF
5ee754fc 12406
05ea2a05
TT
12407fi
12408done
5ee754fc 12409
05ea2a05
TT
12410
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12412$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12413if ${am_cv_langinfo_codeset+:} false; then :
81ecdfbb 12414 $as_echo_n "(cached) " >&6
bec39cab 12415else
81ecdfbb 12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12417/* end confdefs.h. */
05ea2a05 12418#include <langinfo.h>
a9322a30
TT
12419int
12420main ()
12421{
05ea2a05 12422char* cs = nl_langinfo(CODESET);
a9322a30
TT
12423 ;
12424 return 0;
12425}
bec39cab 12426_ACEOF
81ecdfbb 12427if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 12428 am_cv_langinfo_codeset=yes
bec39cab 12429else
05ea2a05 12430 am_cv_langinfo_codeset=no
81ecdfbb
RW
12431fi
12432rm -f core conftest.err conftest.$ac_objext \
12433 conftest$ac_exeext conftest.$ac_ext
05ea2a05 12434
81ecdfbb 12435fi
05ea2a05
TT
12436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12437$as_echo "$am_cv_langinfo_codeset" >&6; }
12438 if test $am_cv_langinfo_codeset = yes; then
bec39cab 12439
05ea2a05 12440$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
81ecdfbb
RW
12441
12442 fi
12443
05ea2a05
TT
12444ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12445if test "x$ac_cv_type_size_t" = xyes; then :
81ecdfbb 12446
05ea2a05 12447else
81ecdfbb
RW
12448
12449cat >>confdefs.h <<_ACEOF
05ea2a05 12450#define size_t unsigned int
7eb368b3 12451_ACEOF
7eb368b3 12452
7eb368b3 12453fi
7eb368b3 12454
7eb368b3 12455
a9322a30 12456
7eb368b3 12457
05ea2a05
TT
12458 for ac_header in $ac_header_list
12459do :
12460 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12461ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12462"
12463if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12464 cat >>confdefs.h <<_ACEOF
12465#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12466_ACEOF
7eb368b3 12467
05ea2a05 12468fi
7eb368b3 12469
05ea2a05 12470done
a9322a30 12471
05ea2a05
TT
12472
12473
12474
12475
12476
12477
12478ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12479if test "x$ac_cv_type_pid_t" = xyes; then :
12480
12481else
bec39cab 12482
a9322a30 12483cat >>confdefs.h <<_ACEOF
05ea2a05 12484#define pid_t int
a9322a30
TT
12485_ACEOF
12486
05ea2a05
TT
12487fi
12488
12489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12490$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12491if ${ac_cv_path_SED+:} false; then :
12492 $as_echo_n "(cached) " >&6
12493else
12494 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12495 for ac_i in 1 2 3 4 5 6 7; do
12496 ac_script="$ac_script$as_nl$ac_script"
12497 done
12498 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12499 { ac_script=; unset ac_script;}
12500 if test -z "$SED"; then
12501 ac_path_SED_found=false
12502 # Loop through the user's path and test for each of PROGNAME-LIST
12503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12504for as_dir in $PATH
12505do
12506 IFS=$as_save_IFS
12507 test -z "$as_dir" && as_dir=.
12508 for ac_prog in sed gsed; do
12509 for ac_exec_ext in '' $ac_executable_extensions; do
12510 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12511 as_fn_executable_p "$ac_path_SED" || continue
12512# Check for GNU ac_path_SED and select it if it is found.
12513 # Check for GNU $ac_path_SED
12514case `"$ac_path_SED" --version 2>&1` in
12515*GNU*)
12516 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12517*)
12518 ac_count=0
12519 $as_echo_n 0123456789 >"conftest.in"
12520 while :
12521 do
12522 cat "conftest.in" "conftest.in" >"conftest.tmp"
12523 mv "conftest.tmp" "conftest.in"
12524 cp "conftest.in" "conftest.nl"
12525 $as_echo '' >> "conftest.nl"
12526 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12527 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12528 as_fn_arith $ac_count + 1 && ac_count=$as_val
12529 if test $ac_count -gt ${ac_path_SED_max-0}; then
12530 # Best one so far, save it but keep looking for a better one
12531 ac_cv_path_SED="$ac_path_SED"
12532 ac_path_SED_max=$ac_count
12533 fi
12534 # 10*(2^10) chars as input seems more than enough
12535 test $ac_count -gt 10 && break
12536 done
12537 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12538esac
a9322a30 12539
05ea2a05
TT
12540 $ac_path_SED_found && break 3
12541 done
12542 done
12543 done
12544IFS=$as_save_IFS
12545 if test -z "$ac_cv_path_SED"; then
12546 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12547 fi
12548else
12549 ac_cv_path_SED=$SED
a9322a30
TT
12550fi
12551
05ea2a05
TT
12552fi
12553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12554$as_echo "$ac_cv_path_SED" >&6; }
12555 SED="$ac_cv_path_SED"
12556 rm -f conftest.sed
a9322a30 12557
a9322a30 12558
db6878ac
SM
12559 # Set the 'development' global.
12560 . $srcdir/../bfd/development.sh
12561
05ea2a05
TT
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12563$as_echo_n "checking for ANSI C header files... " >&6; }
12564if ${ac_cv_header_stdc+:} false; then :
81ecdfbb 12565 $as_echo_n "(cached) " >&6
a9322a30 12566else
81ecdfbb 12567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12568/* end confdefs.h. */
05ea2a05
TT
12569#include <stdlib.h>
12570#include <stdarg.h>
12571#include <string.h>
12572#include <float.h>
a9322a30
TT
12573
12574int
12575main ()
12576{
d0ac1c44 12577
a9322a30
TT
12578 ;
12579 return 0;
12580}
bec39cab 12581_ACEOF
81ecdfbb 12582if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 12583 ac_cv_header_stdc=yes
5ee754fc 12584else
05ea2a05 12585 ac_cv_header_stdc=no
5ee754fc 12586fi
81ecdfbb 12587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12588
05ea2a05
TT
12589if test $ac_cv_header_stdc = yes; then
12590 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12592/* end confdefs.h. */
12593#include <string.h>
bec39cab 12594
05ea2a05
TT
12595_ACEOF
12596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12597 $EGREP "memchr" >/dev/null 2>&1; then :
bec39cab 12598
bec39cab 12599else
05ea2a05
TT
12600 ac_cv_header_stdc=no
12601fi
12602rm -f conftest*
12603
12604fi
12605
12606if test $ac_cv_header_stdc = yes; then
12607 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
81ecdfbb 12608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12609/* end confdefs.h. */
05ea2a05 12610#include <stdlib.h>
a9322a30 12611
bec39cab 12612_ACEOF
05ea2a05
TT
12613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12614 $EGREP "free" >/dev/null 2>&1; then :
bec39cab 12615
05ea2a05
TT
12616else
12617 ac_cv_header_stdc=no
5ee754fc 12618fi
05ea2a05 12619rm -f conftest*
5ee754fc 12620
05ea2a05 12621fi
bec39cab 12622
05ea2a05
TT
12623if test $ac_cv_header_stdc = yes; then
12624 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12625 if test "$cross_compiling" = yes; then :
12626 :
bec39cab 12627else
05ea2a05 12628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81ecdfbb 12629/* end confdefs.h. */
05ea2a05
TT
12630#include <ctype.h>
12631#include <stdlib.h>
12632#if ((' ' & 0x0FF) == 0x020)
12633# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12634# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12635#else
12636# define ISLOWER(c) \
12637 (('a' <= (c) && (c) <= 'i') \
12638 || ('j' <= (c) && (c) <= 'r') \
12639 || ('s' <= (c) && (c) <= 'z'))
12640# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12641#endif
a9322a30 12642
05ea2a05 12643#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a9322a30
TT
12644int
12645main ()
12646{
05ea2a05
TT
12647 int i;
12648 for (i = 0; i < 256; i++)
12649 if (XOR (islower (i), ISLOWER (i))
12650 || toupper (i) != TOUPPER (i))
12651 return 2;
a9322a30
TT
12652 return 0;
12653}
bec39cab 12654_ACEOF
05ea2a05 12655if ac_fn_c_try_run "$LINENO"; then :
a9322a30 12656
5ee754fc 12657else
05ea2a05 12658 ac_cv_header_stdc=no
5ee754fc 12659fi
05ea2a05
TT
12660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12661 conftest.$ac_objext conftest.beam conftest.$ac_ext
81ecdfbb 12662fi
bec39cab 12663
05ea2a05
TT
12664fi
12665fi
12666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12667$as_echo "$ac_cv_header_stdc" >&6; }
12668if test $ac_cv_header_stdc = yes; then
81ecdfbb 12669
05ea2a05
TT
12670$as_echo "#define STDC_HEADERS 1" >>confdefs.h
12671
12672fi
81ecdfbb 12673
05ea2a05
TT
12674 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12675# for constant arguments. Useless!
12676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12677$as_echo_n "checking for working alloca.h... " >&6; }
12678if ${ac_cv_working_alloca_h+:} false; then :
12679 $as_echo_n "(cached) " >&6
12680else
12681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12682/* end confdefs.h. */
12683#include <alloca.h>
7eb368b3
NR
12684int
12685main ()
12686{
05ea2a05
TT
12687char *p = (char *) alloca (2 * sizeof (int));
12688 if (p) return 0;
7eb368b3
NR
12689 ;
12690 return 0;
12691}
12692_ACEOF
05ea2a05
TT
12693if ac_fn_c_try_link "$LINENO"; then :
12694 ac_cv_working_alloca_h=yes
81ecdfbb 12695else
05ea2a05 12696 ac_cv_working_alloca_h=no
a9322a30 12697fi
05ea2a05
TT
12698rm -f core conftest.err conftest.$ac_objext \
12699 conftest$ac_exeext conftest.$ac_ext
a9322a30 12700fi
05ea2a05
TT
12701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12702$as_echo "$ac_cv_working_alloca_h" >&6; }
12703if test $ac_cv_working_alloca_h = yes; then
12704
12705$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7eb368b3 12706
7eb368b3 12707fi
05ea2a05
TT
12708
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12710$as_echo_n "checking for alloca... " >&6; }
12711if ${ac_cv_func_alloca_works+:} false; then :
12712 $as_echo_n "(cached) " >&6
bec39cab 12713else
81ecdfbb 12714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12715/* end confdefs.h. */
05ea2a05
TT
12716#ifdef __GNUC__
12717# define alloca __builtin_alloca
12718#else
12719# ifdef _MSC_VER
12720# include <malloc.h>
12721# define alloca _alloca
12722# else
12723# ifdef HAVE_ALLOCA_H
12724# include <alloca.h>
12725# else
12726# ifdef _AIX
12727 #pragma alloca
12728# else
12729# ifndef alloca /* predefined by HP cc +Olibcalls */
12730void *alloca (size_t);
12731# endif
12732# endif
12733# endif
12734# endif
12735#endif
12736
d3ea6809
MM
12737int
12738main ()
12739{
05ea2a05
TT
12740char *p = (char *) alloca (1);
12741 if (p) return 0;
81ecdfbb
RW
12742 ;
12743 return 0;
d3ea6809
MM
12744}
12745_ACEOF
05ea2a05
TT
12746if ac_fn_c_try_link "$LINENO"; then :
12747 ac_cv_func_alloca_works=yes
d3ea6809 12748else
05ea2a05 12749 ac_cv_func_alloca_works=no
a9322a30 12750fi
05ea2a05
TT
12751rm -f core conftest.err conftest.$ac_objext \
12752 conftest$ac_exeext conftest.$ac_ext
81ecdfbb 12753fi
05ea2a05
TT
12754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12755$as_echo "$ac_cv_func_alloca_works" >&6; }
81ecdfbb 12756
05ea2a05 12757if test $ac_cv_func_alloca_works = yes; then
d3ea6809 12758
05ea2a05 12759$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
d3ea6809 12760
05ea2a05
TT
12761else
12762 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12763# that cause trouble. Some versions do not even contain alloca or
12764# contain a buggy version. If you still want to use their alloca,
12765# use ar to extract alloca.o from them instead of compiling alloca.c.
d3ea6809 12766
05ea2a05 12767ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
d0ac1c44 12768
05ea2a05 12769$as_echo "#define C_ALLOCA 1" >>confdefs.h
d0ac1c44
SM
12770
12771
05ea2a05
TT
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12773$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12774if ${ac_cv_os_cray+:} false; then :
12775 $as_echo_n "(cached) " >&6
12776else
12777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12778/* end confdefs.h. */
12779#if defined CRAY && ! defined CRAY2
12780webecray
12781#else
12782wenotbecray
12783#endif
12784
12785_ACEOF
12786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12787 $EGREP "webecray" >/dev/null 2>&1; then :
12788 ac_cv_os_cray=yes
12789else
12790 ac_cv_os_cray=no
12791fi
12792rm -f conftest*
12793
12794fi
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12796$as_echo "$ac_cv_os_cray" >&6; }
12797if test $ac_cv_os_cray = yes; then
12798 for ac_func in _getb67 GETB67 getb67; do
12799 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12800ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12801if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12802
12803cat >>confdefs.h <<_ACEOF
12804#define CRAY_STACKSEG_END $ac_func
12805_ACEOF
12806
12807 break
12808fi
12809
12810 done
12811fi
12812
12813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12814$as_echo_n "checking stack direction for C alloca... " >&6; }
12815if ${ac_cv_c_stack_direction+:} false; then :
12816 $as_echo_n "(cached) " >&6
12817else
12818 if test "$cross_compiling" = yes; then :
12819 ac_cv_c_stack_direction=0
12820else
12821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12822/* end confdefs.h. */
12823$ac_includes_default
12824int
12825find_stack_direction (int *addr, int depth)
12826{
12827 int dir, dummy = 0;
12828 if (! addr)
12829 addr = &dummy;
12830 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12831 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12832 return dir + dummy;
12833}
12834
12835int
12836main (int argc, char **argv)
12837{
12838 return find_stack_direction (0, argc + !argv + 20) < 0;
12839}
12840_ACEOF
12841if ac_fn_c_try_run "$LINENO"; then :
12842 ac_cv_c_stack_direction=1
12843else
12844 ac_cv_c_stack_direction=-1
12845fi
12846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12847 conftest.$ac_objext conftest.beam conftest.$ac_ext
12848fi
12849
12850fi
12851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12852$as_echo "$ac_cv_c_stack_direction" >&6; }
12853cat >>confdefs.h <<_ACEOF
12854#define STACK_DIRECTION $ac_cv_c_stack_direction
12855_ACEOF
12856
12857
12858fi
12859
12860
12861 WIN32APILIBS=
12862 case ${host} in
12863 *mingw32*)
12864
12865$as_echo "#define USE_WIN32API 1" >>confdefs.h
12866
12867 WIN32APILIBS="-lws2_32"
12868 ;;
12869 esac
12870
12871
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12873$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12874if ${am_cv_langinfo_codeset+:} false; then :
12875 $as_echo_n "(cached) " >&6
12876else
12877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12878/* end confdefs.h. */
12879#include <langinfo.h>
12880int
12881main ()
12882{
12883char* cs = nl_langinfo(CODESET);
12884 ;
12885 return 0;
12886}
12887_ACEOF
12888if ac_fn_c_try_link "$LINENO"; then :
12889 am_cv_langinfo_codeset=yes
12890else
12891 am_cv_langinfo_codeset=no
12892fi
12893rm -f core conftest.err conftest.$ac_objext \
12894 conftest$ac_exeext conftest.$ac_ext
12895
12896fi
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12898$as_echo "$am_cv_langinfo_codeset" >&6; }
12899 if test $am_cv_langinfo_codeset = yes; then
12900
12901$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12902
12903 fi
12904
12905
c8693053 12906 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
12907do :
12908 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
05ea2a05 12909ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 12910if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bec39cab 12911 cat >>confdefs.h <<_ACEOF
81ecdfbb 12912#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 12913_ACEOF
b757528f 12914
b757528f 12915fi
bec39cab 12916
a9322a30 12917done
a3828db0 12918
d0ac1c44
SM
12919
12920
a9322a30 12921for ac_func in getpagesize
81ecdfbb
RW
12922do :
12923 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 12924if test "x$ac_cv_func_getpagesize" = xyes; then :
bec39cab 12925 cat >>confdefs.h <<_ACEOF
81ecdfbb 12926#define HAVE_GETPAGESIZE 1
bec39cab 12927_ACEOF
bcb3dc3d 12928
bcb3dc3d
MK
12929fi
12930done
12931
81ecdfbb
RW
12932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12933$as_echo_n "checking for working mmap... " >&6; }
d0ac1c44 12934if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
81ecdfbb 12935 $as_echo_n "(cached) " >&6
a9322a30 12936else
81ecdfbb 12937 if test "$cross_compiling" = yes; then :
a9322a30 12938 ac_cv_func_mmap_fixed_mapped=no
bec39cab 12939else
81ecdfbb 12940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 12941/* end confdefs.h. */
a9322a30
TT
12942$ac_includes_default
12943/* malloc might have been renamed as rpl_malloc. */
12944#undef malloc
bec39cab 12945
a9322a30
TT
12946/* Thanks to Mike Haertel and Jim Avera for this test.
12947 Here is a matrix of mmap possibilities:
12948 mmap private not fixed
12949 mmap private fixed at somewhere currently unmapped
12950 mmap private fixed at somewhere already mapped
12951 mmap shared not fixed
12952 mmap shared fixed at somewhere currently unmapped
12953 mmap shared fixed at somewhere already mapped
12954 For private mappings, we should verify that changes cannot be read()
12955 back from the file, nor mmap's back from the file at a different
12956 address. (There have been systems where private was not correctly
12957 implemented like the infamous i386 svr4.0, and systems where the
12958 VM page cache was not coherent with the file system buffer cache
12959 like early versions of FreeBSD and possibly contemporary NetBSD.)
12960 For shared mappings, we should conversely verify that changes get
12961 propagated back to all the places they're supposed to be.
bec39cab 12962
a9322a30
TT
12963 Grep wants private fixed already mapped.
12964 The main things grep needs to know about mmap are:
12965 * does it exist and is it safe to write into the mmap'd area
12966 * how to use it (BSD variants) */
8b9cf735 12967
a9322a30
TT
12968#include <fcntl.h>
12969#include <sys/mman.h>
8b9cf735 12970
81ecdfbb 12971#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
a9322a30 12972char *malloc ();
a3828db0
MK
12973#endif
12974
a9322a30 12975/* This mess was copied from the GNU getpagesize.h. */
81ecdfbb 12976#ifndef HAVE_GETPAGESIZE
a9322a30
TT
12977# ifdef _SC_PAGESIZE
12978# define getpagesize() sysconf(_SC_PAGESIZE)
12979# else /* no _SC_PAGESIZE */
81ecdfbb 12980# ifdef HAVE_SYS_PARAM_H
a9322a30
TT
12981# include <sys/param.h>
12982# ifdef EXEC_PAGESIZE
12983# define getpagesize() EXEC_PAGESIZE
12984# else /* no EXEC_PAGESIZE */
12985# ifdef NBPG
12986# define getpagesize() NBPG * CLSIZE
12987# ifndef CLSIZE
12988# define CLSIZE 1
12989# endif /* no CLSIZE */
12990# else /* no NBPG */
12991# ifdef NBPC
12992# define getpagesize() NBPC
12993# else /* no NBPC */
12994# ifdef PAGESIZE
12995# define getpagesize() PAGESIZE
12996# endif /* PAGESIZE */
12997# endif /* no NBPC */
12998# endif /* no NBPG */
12999# endif /* no EXEC_PAGESIZE */
13000# else /* no HAVE_SYS_PARAM_H */
13001# define getpagesize() 8192 /* punt totally */
13002# endif /* no HAVE_SYS_PARAM_H */
13003# endif /* no _SC_PAGESIZE */
13004
13005#endif /* no HAVE_GETPAGESIZE */
13006
bec39cab
AC
13007int
13008main ()
13009{
a9322a30 13010 char *data, *data2, *data3;
d0ac1c44 13011 const char *cdata2;
a9322a30 13012 int i, pagesize;
d0ac1c44 13013 int fd, fd2;
a9322a30
TT
13014
13015 pagesize = getpagesize ();
13016
13017 /* First, make a file with some known garbage in it. */
13018 data = (char *) malloc (pagesize);
13019 if (!data)
81ecdfbb 13020 return 1;
a9322a30
TT
13021 for (i = 0; i < pagesize; ++i)
13022 *(data + i) = rand ();
13023 umask (0);
13024 fd = creat ("conftest.mmap", 0600);
13025 if (fd < 0)
d0ac1c44 13026 return 2;
a9322a30 13027 if (write (fd, data, pagesize) != pagesize)
d0ac1c44 13028 return 3;
a9322a30
TT
13029 close (fd);
13030
d0ac1c44
SM
13031 /* Next, check that the tail of a page is zero-filled. File must have
13032 non-zero length, otherwise we risk SIGBUS for entire page. */
13033 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13034 if (fd2 < 0)
13035 return 4;
13036 cdata2 = "";
13037 if (write (fd2, cdata2, 1) != 1)
13038 return 5;
13039 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13040 if (data2 == MAP_FAILED)
13041 return 6;
13042 for (i = 0; i < pagesize; ++i)
13043 if (*(data2 + i))
13044 return 7;
13045 close (fd2);
13046 if (munmap (data2, pagesize))
13047 return 8;
13048
a9322a30
TT
13049 /* Next, try to mmap the file at a fixed address which already has
13050 something else allocated at it. If we can, also make sure that
13051 we see the same garbage. */
13052 fd = open ("conftest.mmap", O_RDWR);
13053 if (fd < 0)
d0ac1c44 13054 return 9;
a9322a30
TT
13055 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13056 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d0ac1c44 13057 return 10;
a9322a30
TT
13058 for (i = 0; i < pagesize; ++i)
13059 if (*(data + i) != *(data2 + i))
d0ac1c44 13060 return 11;
a9322a30
TT
13061
13062 /* Finally, make sure that changes to the mapped area do not
13063 percolate back to the file as seen by read(). (This is a bug on
13064 some variants of i386 svr4.0.) */
13065 for (i = 0; i < pagesize; ++i)
13066 *(data2 + i) = *(data2 + i) + 1;
13067 data3 = (char *) malloc (pagesize);
13068 if (!data3)
d0ac1c44 13069 return 12;
a9322a30 13070 if (read (fd, data3, pagesize) != pagesize)
d0ac1c44 13071 return 13;
a9322a30
TT
13072 for (i = 0; i < pagesize; ++i)
13073 if (*(data + i) != *(data3 + i))
d0ac1c44 13074 return 14;
a9322a30 13075 close (fd);
81ecdfbb 13076 return 0;
bec39cab
AC
13077}
13078_ACEOF
81ecdfbb 13079if ac_fn_c_try_run "$LINENO"; then :
a9322a30 13080 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 13081else
81ecdfbb 13082 ac_cv_func_mmap_fixed_mapped=no
a3828db0 13083fi
81ecdfbb
RW
13084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13085 conftest.$ac_objext conftest.beam conftest.$ac_ext
a3828db0 13086fi
81ecdfbb 13087
a9322a30 13088fi
81ecdfbb
RW
13089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13090$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9322a30
TT
13091if test $ac_cv_func_mmap_fixed_mapped = yes; then
13092
81ecdfbb 13093$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a3828db0 13094
086ec9eb 13095fi
d0ac1c44 13096rm -f conftest.mmap conftest.txt
a3828db0 13097
05ea2a05 13098 for ac_header in vfork.h
81ecdfbb
RW
13099do :
13100 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
d0ac1c44 13101if test "x$ac_cv_header_vfork_h" = xyes; then :
a3828db0 13102 cat >>confdefs.h <<_ACEOF
81ecdfbb 13103#define HAVE_VFORK_H 1
bec39cab 13104_ACEOF
c906108c
SS
13105
13106fi
a9322a30 13107
a3828db0 13108done
c906108c 13109
a9322a30 13110for ac_func in fork vfork
81ecdfbb
RW
13111do :
13112 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13113ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13114if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a3828db0 13115 cat >>confdefs.h <<_ACEOF
81ecdfbb 13116#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 13117_ACEOF
b83266a0 13118
97bf5e38 13119fi
a3828db0 13120done
b83266a0 13121
a9322a30 13122if test "x$ac_cv_func_fork" = xyes; then
81ecdfbb
RW
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13124$as_echo_n "checking for working fork... " >&6; }
d0ac1c44 13125if ${ac_cv_func_fork_works+:} false; then :
81ecdfbb 13126 $as_echo_n "(cached) " >&6
a9322a30 13127else
81ecdfbb 13128 if test "$cross_compiling" = yes; then :
a9322a30
TT
13129 ac_cv_func_fork_works=cross
13130else
81ecdfbb
RW
13131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13132/* end confdefs.h. */
13133$ac_includes_default
13134int
13135main ()
13136{
13137
13138 /* By Ruediger Kuhlmann. */
13139 return fork () < 0;
13140
13141 ;
13142 return 0;
13143}
a9322a30 13144_ACEOF
81ecdfbb 13145if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13146 ac_cv_func_fork_works=yes
13147else
81ecdfbb 13148 ac_cv_func_fork_works=no
a9322a30 13149fi
81ecdfbb
RW
13150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13151 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13152fi
81ecdfbb 13153
a9322a30 13154fi
81ecdfbb
RW
13155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13156$as_echo "$ac_cv_func_fork_works" >&6; }
a9322a30
TT
13157
13158else
13159 ac_cv_func_fork_works=$ac_cv_func_fork
13160fi
13161if test "x$ac_cv_func_fork_works" = xcross; then
13162 case $host in
13163 *-*-amigaos* | *-*-msdosdjgpp*)
13164 # Override, as these systems have only a dummy fork() stub
13165 ac_cv_func_fork_works=no
13166 ;;
13167 *)
13168 ac_cv_func_fork_works=yes
13169 ;;
13170 esac
81ecdfbb
RW
13171 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13172$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13173fi
13174ac_cv_func_vfork_works=$ac_cv_func_vfork
13175if test "x$ac_cv_func_vfork" = xyes; then
81ecdfbb
RW
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13177$as_echo_n "checking for working vfork... " >&6; }
d0ac1c44 13178if ${ac_cv_func_vfork_works+:} false; then :
81ecdfbb 13179 $as_echo_n "(cached) " >&6
a9322a30 13180else
81ecdfbb 13181 if test "$cross_compiling" = yes; then :
a9322a30
TT
13182 ac_cv_func_vfork_works=cross
13183else
81ecdfbb 13184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a9322a30
TT
13185/* end confdefs.h. */
13186/* Thanks to Paul Eggert for this test. */
81ecdfbb 13187$ac_includes_default
a9322a30 13188#include <sys/wait.h>
81ecdfbb 13189#ifdef HAVE_VFORK_H
a9322a30
TT
13190# include <vfork.h>
13191#endif
13192/* On some sparc systems, changes by the child to local and incoming
13193 argument registers are propagated back to the parent. The compiler
13194 is told about this with #include <vfork.h>, but some compilers
13195 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13196 static variable whose address is put into a register that is
13197 clobbered by the vfork. */
13198static void
13199#ifdef __cplusplus
13200sparc_address_test (int arg)
13201# else
13202sparc_address_test (arg) int arg;
13203#endif
13204{
13205 static pid_t child;
13206 if (!child) {
13207 child = vfork ();
13208 if (child < 0) {
13209 perror ("vfork");
13210 _exit(2);
13211 }
13212 if (!child) {
13213 arg = getpid();
13214 write(-1, "", 0);
13215 _exit (arg);
13216 }
13217 }
13218}
13219
13220int
13221main ()
13222{
13223 pid_t parent = getpid ();
13224 pid_t child;
13225
13226 sparc_address_test (0);
13227
13228 child = vfork ();
13229
13230 if (child == 0) {
13231 /* Here is another test for sparc vfork register problems. This
13232 test uses lots of local variables, at least as many local
13233 variables as main has allocated so far including compiler
13234 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13235 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13236 reuse the register of parent for one of the local variables,
13237 since it will think that parent can't possibly be used any more
13238 in this routine. Assigning to the local variable will thus
13239 munge parent in the parent process. */
13240 pid_t
13241 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13242 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13243 /* Convince the compiler that p..p7 are live; otherwise, it might
13244 use the same hardware register for all 8 local variables. */
13245 if (p != p1 || p != p2 || p != p3 || p != p4
13246 || p != p5 || p != p6 || p != p7)
13247 _exit(1);
13248
13249 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13250 from child file descriptors. If the child closes a descriptor
13251 before it execs or exits, this munges the parent's descriptor
13252 as well. Test for this by closing stdout in the child. */
13253 _exit(close(fileno(stdout)) != 0);
13254 } else {
13255 int status;
13256 struct stat st;
13257
13258 while (wait(&status) != child)
13259 ;
81ecdfbb 13260 return (
a9322a30
TT
13261 /* Was there some problem with vforking? */
13262 child < 0
13263
13264 /* Did the child fail? (This shouldn't happen.) */
13265 || status
13266
13267 /* Did the vfork/compiler bug occur? */
13268 || parent != getpid()
13269
13270 /* Did the file descriptor bug occur? */
13271 || fstat(fileno(stdout), &st) != 0
13272 );
13273 }
13274}
13275_ACEOF
81ecdfbb 13276if ac_fn_c_try_run "$LINENO"; then :
a9322a30
TT
13277 ac_cv_func_vfork_works=yes
13278else
81ecdfbb 13279 ac_cv_func_vfork_works=no
a9322a30 13280fi
81ecdfbb
RW
13281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13282 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9322a30 13283fi
81ecdfbb 13284
a9322a30 13285fi
81ecdfbb
RW
13286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13287$as_echo "$ac_cv_func_vfork_works" >&6; }
a9322a30
TT
13288
13289fi;
13290if test "x$ac_cv_func_fork_works" = xcross; then
13291 ac_cv_func_vfork_works=$ac_cv_func_vfork
81ecdfbb
RW
13292 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13293$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
a9322a30
TT
13294fi
13295
13296if test "x$ac_cv_func_vfork_works" = xyes; then
13297
81ecdfbb 13298$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
a9322a30
TT
13299
13300else
13301
81ecdfbb 13302$as_echo "#define vfork fork" >>confdefs.h
a9322a30
TT
13303
13304fi
13305if test "x$ac_cv_func_fork_works" = xyes; then
13306
81ecdfbb 13307$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
a9322a30
TT
13308
13309fi
13310
8ae8e197 13311 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
05ea2a05
TT
13312 ptrace64 sbrk setns sigaltstack sigprocmask \
13313 setpgid setpgrp getrusage getauxval
81ecdfbb
RW
13314do :
13315 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13316ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 13317if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6c7a06a3 13318 cat >>confdefs.h <<_ACEOF
81ecdfbb 13319#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6c7a06a3
TT
13320_ACEOF
13321
13322fi
13323done
13324
13325
05ea2a05
TT
13326 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13327"
13328if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13329 ac_have_decl=1
6c7a06a3 13330else
05ea2a05
TT
13331 ac_have_decl=0
13332fi
13333
13334cat >>confdefs.h <<_ACEOF
13335#define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13336_ACEOF
13337
13338
13339 if test "$cross_compiling" = yes; then :
81ecdfbb 13340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c7a06a3 13341/* end confdefs.h. */
05ea2a05 13342#include <sys/personality.h>
6c7a06a3
TT
13343int
13344main ()
13345{
05ea2a05
TT
13346
13347 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13348 # define ADDR_NO_RANDOMIZE 0x0040000
13349 # endif
13350 /* Test the flag could be set and stays set. */
13351 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13352 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13353 return 1
bec39cab
AC
13354 ;
13355 return 0;
13356}
13357_ACEOF
81ecdfbb 13358if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13359 have_personality=true
a4db0f07 13360else
05ea2a05 13361 have_personality=false
a4db0f07 13362fi
81ecdfbb
RW
13363rm -f core conftest.err conftest.$ac_objext \
13364 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13365else
13366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13367/* end confdefs.h. */
13368#include <sys/personality.h>
13369int
13370main ()
13371{
6c7a06a3 13372
05ea2a05
TT
13373 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13374 # define ADDR_NO_RANDOMIZE 0x0040000
13375 # endif
13376 /* Test the flag could be set and stays set. */
13377 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13378 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13379 return 1
13380 ;
13381 return 0;
13382}
13383_ACEOF
13384if ac_fn_c_try_run "$LINENO"; then :
13385 have_personality=true
13386else
13387 have_personality=false
13388fi
13389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13390 conftest.$ac_objext conftest.beam conftest.$ac_ext
a4db0f07 13391fi
6c7a06a3 13392
05ea2a05
TT
13393 if $have_personality
13394 then
a4db0f07 13395
05ea2a05 13396$as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
c906108c 13397
05ea2a05 13398 fi
d0ac1c44 13399
05ea2a05
TT
13400 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13401if test "x$ac_cv_have_decl_strstr" = xyes; then :
13402 ac_have_decl=1
d0ac1c44 13403else
05ea2a05
TT
13404 ac_have_decl=0
13405fi
d0ac1c44
SM
13406
13407cat >>confdefs.h <<_ACEOF
05ea2a05
TT
13408#define HAVE_DECL_STRSTR $ac_have_decl
13409_ACEOF
13410
13411
13412 # ----------------------- #
13413 # Checks for structures. #
13414 # ----------------------- #
13415
13416 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13417if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13418
13419cat >>confdefs.h <<_ACEOF
13420#define HAVE_STRUCT_STAT_ST_BLOCKS 1
d0ac1c44
SM
13421_ACEOF
13422
05ea2a05 13423
d0ac1c44 13424fi
05ea2a05
TT
13425ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13426if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
d0ac1c44 13427
05ea2a05
TT
13428cat >>confdefs.h <<_ACEOF
13429#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13430_ACEOF
13431
13432
13433fi
13434
13435
e911c666
JB
13436 # On FreeBSD we need libutil for the kinfo_get* functions. On
13437 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13438 # Figure out which one to use.
05ea2a05
TT
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13440$as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13441if ${ac_cv_search_kinfo_getfile+:} false; then :
5e030278
TT
13442 $as_echo_n "(cached) " >&6
13443else
05ea2a05
TT
13444 ac_func_search_save_LIBS=$LIBS
13445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13446/* end confdefs.h. */
3266f10b 13447
05ea2a05
TT
13448/* Override any GCC internal prototype to avoid an error.
13449 Use char because int might match the return type of a GCC
13450 builtin and then its argument prototype would still apply. */
13451#ifdef __cplusplus
13452extern "C"
13453#endif
13454char kinfo_getfile ();
3266f10b
TT
13455int
13456main ()
13457{
05ea2a05 13458return kinfo_getfile ();
3266f10b
TT
13459 ;
13460 return 0;
13461}
13462_ACEOF
05ea2a05
TT
13463for ac_lib in '' util util-freebsd; do
13464 if test -z "$ac_lib"; then
13465 ac_res="none required"
13466 else
13467 ac_res=-l$ac_lib
13468 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13469 fi
13470 if ac_fn_c_try_link "$LINENO"; then :
13471 ac_cv_search_kinfo_getfile=$ac_res
3266f10b 13472fi
05ea2a05
TT
13473rm -f core conftest.err conftest.$ac_objext \
13474 conftest$ac_exeext
13475 if ${ac_cv_search_kinfo_getfile+:} false; then :
13476 break
13477fi
13478done
13479if ${ac_cv_search_kinfo_getfile+:} false; then :
3266f10b
TT
13480
13481else
05ea2a05 13482 ac_cv_search_kinfo_getfile=no
3266f10b 13483fi
05ea2a05
TT
13484rm conftest.$ac_ext
13485LIBS=$ac_func_search_save_LIBS
13486fi
13487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13488$as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13489ac_res=$ac_cv_search_kinfo_getfile
13490if test "$ac_res" != no; then :
13491 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13492
e911c666
JB
13493fi
13494
13495
13496 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
13497 for ac_func in kinfo_getfile
13498do :
13499 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
13500if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
13501 cat >>confdefs.h <<_ACEOF
13502#define HAVE_KINFO_GETFILE 1
13503_ACEOF
3266f10b
TT
13504
13505fi
e911c666 13506done
3266f10b 13507
3266f10b 13508
05ea2a05
TT
13509 # Check for std::thread. This does not work on some platforms, like
13510 # mingw and DJGPP.
13511 ac_ext=cpp
13512ac_cpp='$CXXCPP $CPPFLAGS'
13513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3266f10b 13516
3266f10b 13517
3266f10b 13518
3266f10b 13519
3266f10b 13520
05ea2a05
TT
13521ac_ext=c
13522ac_cpp='$CPP $CPPFLAGS'
13523ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13524ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13525ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266f10b 13526
05ea2a05 13527ax_pthread_ok=no
3266f10b 13528
05ea2a05
TT
13529# We used to check for pthread.h first, but this fails if pthread.h
13530# requires special compiler flags (e.g. on Tru64 or Sequent).
13531# It gets checked for in the link test anyway.
3266f10b 13532
05ea2a05
TT
13533# First of all, check if the user has set any of the PTHREAD_LIBS,
13534# etcetera environment variables, and if threads linking works using
13535# them:
13536if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13537 ax_pthread_save_CC="$CC"
13538 ax_pthread_save_CFLAGS="$CFLAGS"
13539 ax_pthread_save_LIBS="$LIBS"
13540 if test "x$PTHREAD_CC" != "x"; then :
13541 CC="$PTHREAD_CC"
3266f10b 13542fi
05ea2a05
TT
13543 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13544 LIBS="$PTHREAD_LIBS $LIBS"
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13546$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13548/* end confdefs.h. */
05ea2a05
TT
13549
13550/* Override any GCC internal prototype to avoid an error.
13551 Use char because int might match the return type of a GCC
13552 builtin and then its argument prototype would still apply. */
13553#ifdef __cplusplus
13554extern "C"
13555#endif
13556char pthread_join ();
3266f10b
TT
13557int
13558main ()
13559{
05ea2a05 13560return pthread_join ();
3266f10b
TT
13561 ;
13562 return 0;
13563}
13564_ACEOF
13565if ac_fn_c_try_link "$LINENO"; then :
05ea2a05 13566 ax_pthread_ok=yes
3266f10b
TT
13567fi
13568rm -f core conftest.err conftest.$ac_objext \
13569 conftest$ac_exeext conftest.$ac_ext
05ea2a05
TT
13570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13571$as_echo "$ax_pthread_ok" >&6; }
13572 if test "x$ax_pthread_ok" = "xno"; then
13573 PTHREAD_LIBS=""
13574 PTHREAD_CFLAGS=""
13575 fi
13576 CC="$ax_pthread_save_CC"
13577 CFLAGS="$ax_pthread_save_CFLAGS"
13578 LIBS="$ax_pthread_save_LIBS"
3266f10b 13579fi
3266f10b 13580
05ea2a05
TT
13581# We must check for the threads library under a number of different
13582# names; the ordering is very important because some systems
13583# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13584# libraries is broken (non-POSIX).
3266f10b 13585
05ea2a05
TT
13586# Create a list of thread flags to try. Items starting with a "-" are
13587# C compiler flags, and other items are library names, except for "none"
13588# which indicates that we try without any flags at all, and "pthread-config"
13589# which is a program returning the flags for the Pth emulation library.
3266f10b 13590
05ea2a05 13591ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
3266f10b 13592
05ea2a05
TT
13593# The ordering *is* (sometimes) important. Some notes on the
13594# individual items follow:
3266f10b 13595
05ea2a05
TT
13596# pthreads: AIX (must check this before -lpthread)
13597# none: in case threads are in libc; should be tried before -Kthread and
13598# other compiler flags to prevent continual compiler warnings
13599# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13600# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13601# (Note: HP C rejects this with "bad form for `-t' option")
13602# -pthreads: Solaris/gcc (Note: HP C also rejects)
13603# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13604# doesn't hurt to check since this sometimes defines pthreads and
13605# -D_REENTRANT too), HP C (must be checked before -lpthread, which
13606# is present but should not be used directly; and before -mthreads,
13607# because the compiler interprets this as "-mt" + "-hreads")
13608# -mthreads: Mingw32/gcc, Lynx/gcc
13609# pthread: Linux, etcetera
13610# --thread-safe: KAI C++
13611# pthread-config: use pthread-config program (for GNU Pth library)
3266f10b 13612
05ea2a05 13613case $host_os in
3266f10b 13614
05ea2a05 13615 freebsd*)
3266f10b 13616
05ea2a05
TT
13617 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13618 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
3266f10b 13619
05ea2a05
TT
13620 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13621 ;;
3266f10b 13622
05ea2a05 13623 hpux*)
3266f10b 13624
05ea2a05
TT
13625 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13626 # multi-threading and also sets -lpthread."
13627
13628 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13629 ;;
13630
13631 openedition*)
13632
13633 # IBM z/OS requires a feature-test macro to be defined in order to
13634 # enable POSIX threads at all, so give the user a hint if this is
13635 # not set. (We don't define these ourselves, as they can affect
13636 # other portions of the system API in unpredictable ways.)
13637
13638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13639/* end confdefs.h. */
05ea2a05
TT
13640
13641# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13642 AX_PTHREAD_ZOS_MISSING
13643# endif
3266f10b
TT
13644
13645_ACEOF
13646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
05ea2a05
TT
13647 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13649$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
3266f10b
TT
13650fi
13651rm -f conftest*
13652
05ea2a05 13653 ;;
3266f10b 13654
05ea2a05 13655 solaris*)
3266f10b 13656
05ea2a05
TT
13657 # On Solaris (at least, for some versions), libc contains stubbed
13658 # (non-functional) versions of the pthreads routines, so link-based
13659 # tests will erroneously succeed. (N.B.: The stubs are missing
13660 # pthread_cleanup_push, or rather a function called by this macro,
13661 # so we could check for that, but who knows whether they'll stub
13662 # that too in a future libc.) So we'll check first for the
13663 # standard Solaris way of linking pthreads (-mt -lpthread).
13664
13665 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13666 ;;
13667esac
13668
13669# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13670
13671if test "x$GCC" = "xyes"; then :
13672 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
3266f10b
TT
13673fi
13674
05ea2a05
TT
13675# The presence of a feature test macro requesting re-entrant function
13676# definitions is, on some systems, a strong hint that pthreads support is
13677# correctly enabled
13678
13679case $host_os in
13680 darwin* | hpux* | linux* | osf* | solaris*)
13681 ax_pthread_check_macro="_REENTRANT"
13682 ;;
13683
13684 aix*)
13685 ax_pthread_check_macro="_THREAD_SAFE"
13686 ;;
13687
13688 *)
13689 ax_pthread_check_macro="--"
13690 ;;
13691esac
13692if test "x$ax_pthread_check_macro" = "x--"; then :
13693 ax_pthread_check_cond=0
13694else
13695 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
3266f10b
TT
13696fi
13697
05ea2a05
TT
13698# Are we compiling with Clang?
13699
13700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13701$as_echo_n "checking whether $CC is Clang... " >&6; }
13702if ${ax_cv_PTHREAD_CLANG+:} false; then :
3266f10b
TT
13703 $as_echo_n "(cached) " >&6
13704else
05ea2a05
TT
13705 ax_cv_PTHREAD_CLANG=no
13706 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13707 if test "x$GCC" = "xyes"; then
13708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3266f10b 13709/* end confdefs.h. */
05ea2a05
TT
13710/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13711# if defined(__clang__) && defined(__llvm__)
13712 AX_PTHREAD_CC_IS_CLANG
13713# endif
3266f10b 13714
3266f10b 13715_ACEOF
05ea2a05
TT
13716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13717 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13718 ax_cv_PTHREAD_CLANG=yes
3266f10b 13719fi
05ea2a05
TT
13720rm -f conftest*
13721
13722 fi
3266f10b
TT
13723
13724fi
05ea2a05
TT
13725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13726$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13727ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
3266f10b 13728
05ea2a05 13729ax_pthread_clang_warning=no
3266f10b 13730
05ea2a05
TT
13731# Clang needs special handling, because older versions handle the -pthread
13732# option in a rather... idiosyncratic way
3266f10b 13733
05ea2a05 13734if test "x$ax_pthread_clang" = "xyes"; then
3266f10b 13735
05ea2a05 13736 # Clang takes -pthread; it has never supported any other flag
b2ceabe8 13737
05ea2a05
TT
13738 # (Note 1: This will need to be revisited if a system that Clang
13739 # supports has POSIX threads in a separate library. This tends not
13740 # to be the way of modern systems, but it's conceivable.)
b2ceabe8 13741
05ea2a05
TT
13742 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13743 # to get POSIX threads support; the API is always present and
13744 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13745 # -pthread does define _REENTRANT, and while the Darwin headers
13746 # ignore this macro, third-party headers might not.)
b2ceabe8 13747
05ea2a05
TT
13748 PTHREAD_CFLAGS="-pthread"
13749 PTHREAD_LIBS=
3266f10b 13750
05ea2a05
TT
13751 ax_pthread_ok=yes
13752
13753 # However, older versions of Clang make a point of warning the user
13754 # that, in an invocation where only linking and no compilation is
13755 # taking place, the -pthread option has no effect ("argument unused
13756 # during compilation"). They expect -pthread to be passed in only
13757 # when source code is being compiled.
13758 #
13759 # Problem is, this is at odds with the way Automake and most other
13760 # C build frameworks function, which is that the same flags used in
13761 # compilation (CFLAGS) are also used in linking. Many systems
13762 # supported by AX_PTHREAD require exactly this for POSIX threads
13763 # support, and in fact it is often not straightforward to specify a
13764 # flag that is used only in the compilation phase and not in
13765 # linking. Such a scenario is extremely rare in practice.
13766 #
13767 # Even though use of the -pthread flag in linking would only print
13768 # a warning, this can be a nuisance for well-run software projects
13769 # that build with -Werror. So if the active version of Clang has
13770 # this misfeature, we search for an option to squash it.
13771
13772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13773$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13774if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13775 $as_echo_n "(cached) " >&6
13776else
13777 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13778 # Create an alternate version of $ac_link that compiles and
13779 # links in two steps (.c -> .o, .o -> exe) instead of one
13780 # (.c -> exe), because the warning occurs only in the second
13781 # step
13782 ax_pthread_save_ac_link="$ac_link"
13783 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13784 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13785 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13786 ax_pthread_save_CFLAGS="$CFLAGS"
13787 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13788 if test "x$ax_pthread_try" = "xunknown"; then :
13789 break
13790fi
13791 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13792 ac_link="$ax_pthread_save_ac_link"
13793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13794/* end confdefs.h. */
13795int main(void){return 0;}
3266f10b
TT
13796_ACEOF
13797if ac_fn_c_try_link "$LINENO"; then :
05ea2a05
TT
13798 ac_link="$ax_pthread_2step_ac_link"
13799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13800/* end confdefs.h. */
13801int main(void){return 0;}
13802_ACEOF
13803if ac_fn_c_try_link "$LINENO"; then :
13804 break
3266f10b
TT
13805fi
13806rm -f core conftest.err conftest.$ac_objext \
13807 conftest$ac_exeext conftest.$ac_ext
13808
13809fi
05ea2a05
TT
13810rm -f core conftest.err conftest.$ac_objext \
13811 conftest$ac_exeext conftest.$ac_ext
13812 done
13813 ac_link="$ax_pthread_save_ac_link"
13814 CFLAGS="$ax_pthread_save_CFLAGS"
13815 if test "x$ax_pthread_try" = "x"; then :
13816 ax_pthread_try=no
13817fi
13818 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
3266f10b 13819
05ea2a05
TT
13820fi
13821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13822$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
3266f10b 13823
05ea2a05
TT
13824 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13825 no | unknown) ;;
13826 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13827 esac
3266f10b 13828
05ea2a05 13829fi # $ax_pthread_clang = yes
3266f10b 13830
05ea2a05
TT
13831if test "x$ax_pthread_ok" = "xno"; then
13832for ax_pthread_try_flag in $ax_pthread_flags; do
3266f10b 13833
05ea2a05
TT
13834 case $ax_pthread_try_flag in
13835 none)
13836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13837$as_echo_n "checking whether pthreads work without any flags... " >&6; }
13838 ;;
3266f10b 13839
05ea2a05
TT
13840 -mt,pthread)
13841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13842$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13843 PTHREAD_CFLAGS="-mt"
13844 PTHREAD_LIBS="-lpthread"
13845 ;;
3266f10b 13846
05ea2a05
TT
13847 -*)
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13849$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13850 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13851 ;;
3266f10b 13852
05ea2a05
TT
13853 pthread-config)
13854 # Extract the first word of "pthread-config", so it can be a program name with args.
13855set dummy pthread-config; ac_word=$2
13856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13857$as_echo_n "checking for $ac_word... " >&6; }
13858if ${ac_cv_prog_ax_pthread_config+:} false; then :
13859 $as_echo_n "(cached) " >&6
13860else
13861 if test -n "$ax_pthread_config"; then
13862 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13863else
13864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13865for as_dir in $PATH
13866do
13867 IFS=$as_save_IFS
13868 test -z "$as_dir" && as_dir=.
13869 for ac_exec_ext in '' $ac_executable_extensions; do
13870 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13871 ac_cv_prog_ax_pthread_config="yes"
13872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13873 break 2
13874 fi
3266f10b 13875done
05ea2a05
TT
13876 done
13877IFS=$as_save_IFS
3266f10b 13878
05ea2a05
TT
13879 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13880fi
13881fi
13882ax_pthread_config=$ac_cv_prog_ax_pthread_config
13883if test -n "$ax_pthread_config"; then
13884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13885$as_echo "$ax_pthread_config" >&6; }
3266f10b 13886else
05ea2a05
TT
13887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13888$as_echo "no" >&6; }
3266f10b
TT
13889fi
13890
5e030278 13891
05ea2a05
TT
13892 if test "x$ax_pthread_config" = "xno"; then :
13893 continue
13894fi
13895 PTHREAD_CFLAGS="`pthread-config --cflags`"
13896 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13897 ;;
5e030278 13898
05ea2a05
TT
13899 *)
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13901$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13902 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13903 ;;
13904 esac
5e030278 13905
5e030278
TT
13906 ax_pthread_save_CFLAGS="$CFLAGS"
13907 ax_pthread_save_LIBS="$LIBS"
5e030278
TT
13908 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13909 LIBS="$PTHREAD_LIBS $LIBS"
05ea2a05
TT
13910
13911 # Check for various functions. We must include pthread.h,
13912 # since some functions may be macros. (On the Sequent, we
13913 # need a special flag -Kthread to make this header compile.)
13914 # We check for pthread_join because it is in -lpthread on IRIX
13915 # while pthread_create is in libc. We check for pthread_attr_init
13916 # due to DEC craziness with -lpthreads. We check for
13917 # pthread_cleanup_push because it is one of the few pthread
13918 # functions on Solaris that doesn't have a non-functional libc stub.
13919 # We try pthread_create on general principles.
13920
5e030278
TT
13921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13922/* end confdefs.h. */
05ea2a05
TT
13923#include <pthread.h>
13924# if $ax_pthread_check_cond
13925# error "$ax_pthread_check_macro must be defined"
13926# endif
13927 static void routine(void *a) { a = 0; }
13928 static void *start_routine(void *a) { return a; }
5e030278
TT
13929int
13930main ()
13931{
05ea2a05
TT
13932pthread_t th; pthread_attr_t attr;
13933 pthread_create(&th, 0, start_routine, 0);
13934 pthread_join(th, 0);
13935 pthread_attr_init(&attr);
13936 pthread_cleanup_push(routine, 0);
13937 pthread_cleanup_pop(0) /* ; */
5e030278
TT
13938 ;
13939 return 0;
13940}
13941_ACEOF
13942if ac_fn_c_try_link "$LINENO"; then :
13943 ax_pthread_ok=yes
13944fi
13945rm -f core conftest.err conftest.$ac_objext \
13946 conftest$ac_exeext conftest.$ac_ext
05ea2a05 13947
5e030278
TT
13948 CFLAGS="$ax_pthread_save_CFLAGS"
13949 LIBS="$ax_pthread_save_LIBS"
05ea2a05
TT
13950
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13952$as_echo "$ax_pthread_ok" >&6; }
13953 if test "x$ax_pthread_ok" = "xyes"; then :
13954 break
5e030278
TT
13955fi
13956
05ea2a05
TT
13957 PTHREAD_LIBS=""
13958 PTHREAD_CFLAGS=""
13959done
13960fi
5e030278 13961
05ea2a05
TT
13962# Various other checks:
13963if test "x$ax_pthread_ok" = "xyes"; then
13964 ax_pthread_save_CFLAGS="$CFLAGS"
13965 ax_pthread_save_LIBS="$LIBS"
13966 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13967 LIBS="$PTHREAD_LIBS $LIBS"
5e030278 13968
05ea2a05
TT
13969 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13971$as_echo_n "checking for joinable pthread attribute... " >&6; }
13972if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13973 $as_echo_n "(cached) " >&6
13974else
13975 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13976 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13978/* end confdefs.h. */
13979#include <pthread.h>
13980int
13981main ()
13982{
13983int attr = $ax_pthread_attr; return attr /* ; */
13984 ;
13985 return 0;
13986}
13987_ACEOF
13988if ac_fn_c_try_link "$LINENO"; then :
13989 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13990fi
13991rm -f core conftest.err conftest.$ac_objext \
13992 conftest$ac_exeext conftest.$ac_ext
13993 done
5e030278 13994
05ea2a05
TT
13995fi
13996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13997$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13998 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13999 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14000 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
5e030278 14001
05ea2a05
TT
14002cat >>confdefs.h <<_ACEOF
14003#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14004_ACEOF
5e030278 14005
05ea2a05 14006 ax_pthread_joinable_attr_defined=yes
5e030278 14007
05ea2a05 14008fi
5e030278 14009
05ea2a05
TT
14010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14011$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14012if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14013 $as_echo_n "(cached) " >&6
14014else
14015 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14016 case $host_os in
14017 solaris*)
14018 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14019 ;;
14020 esac
5e030278 14021
05ea2a05
TT
14022fi
14023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14024$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14025 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14026 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14027 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14028 ax_pthread_special_flags_added=yes
14029fi
5e030278 14030
05ea2a05
TT
14031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14032$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14033if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14034 $as_echo_n "(cached) " >&6
14035else
14036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14037/* end confdefs.h. */
14038#include <pthread.h>
14039int
14040main ()
14041{
14042int i = PTHREAD_PRIO_INHERIT;
14043 ;
14044 return 0;
14045}
14046_ACEOF
14047if ac_fn_c_try_link "$LINENO"; then :
14048 ax_cv_PTHREAD_PRIO_INHERIT=yes
14049else
14050 ax_cv_PTHREAD_PRIO_INHERIT=no
14051fi
14052rm -f core conftest.err conftest.$ac_objext \
14053 conftest$ac_exeext conftest.$ac_ext
5e030278 14054
05ea2a05
TT
14055fi
14056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14057$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14058 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14059 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
5e030278 14060
05ea2a05 14061$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
5e030278 14062
05ea2a05 14063 ax_pthread_prio_inherit_defined=yes
5e030278 14064
05ea2a05 14065fi
5e030278 14066
05ea2a05
TT
14067 CFLAGS="$ax_pthread_save_CFLAGS"
14068 LIBS="$ax_pthread_save_LIBS"
5e030278 14069
05ea2a05
TT
14070 # More AIX lossage: compile with *_r variant
14071 if test "x$GCC" != "xyes"; then
14072 case $host_os in
14073 aix*)
14074 case "x/$CC" in #(
14075 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14076 #handle absolute path differently from PATH based program lookup
14077 case "x$CC" in #(
14078 x/*) :
14079 if as_fn_executable_p ${CC}_r; then :
14080 PTHREAD_CC="${CC}_r"
14081fi ;; #(
14082 *) :
14083 for ac_prog in ${CC}_r
14084do
14085 # Extract the first word of "$ac_prog", so it can be a program name with args.
14086set dummy $ac_prog; ac_word=$2
14087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14088$as_echo_n "checking for $ac_word... " >&6; }
14089if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14090 $as_echo_n "(cached) " >&6
14091else
14092 if test -n "$PTHREAD_CC"; then
14093 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14094else
14095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14096for as_dir in $PATH
14097do
14098 IFS=$as_save_IFS
14099 test -z "$as_dir" && as_dir=.
14100 for ac_exec_ext in '' $ac_executable_extensions; do
14101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14102 ac_cv_prog_PTHREAD_CC="$ac_prog"
14103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14104 break 2
14105 fi
14106done
14107 done
14108IFS=$as_save_IFS
5e030278 14109
5e030278 14110fi
05ea2a05
TT
14111fi
14112PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14113if test -n "$PTHREAD_CC"; then
14114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14115$as_echo "$PTHREAD_CC" >&6; }
14116else
14117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14118$as_echo "no" >&6; }
14119fi
5e030278 14120
5e030278 14121
05ea2a05
TT
14122 test -n "$PTHREAD_CC" && break
14123done
14124test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14125 ;;
14126esac ;; #(
14127 *) :
14128 ;;
5e030278 14129esac
05ea2a05
TT
14130 ;;
14131 esac
14132 fi
14133fi
5e030278 14134
05ea2a05 14135test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
5e030278 14136
5e030278 14137
5e030278 14138
5e030278 14139
5e030278 14140
05ea2a05
TT
14141# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14142if test "x$ax_pthread_ok" = "xyes"; then
14143 threads=yes
14144 :
5e030278 14145else
05ea2a05
TT
14146 ax_pthread_ok=no
14147 threads=no
5e030278 14148fi
05ea2a05
TT
14149ac_ext=cpp
14150ac_cpp='$CXXCPP $CPPFLAGS'
14151ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14152ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14153ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5e030278 14154
5e030278 14155
05ea2a05
TT
14156 if test "$threads" = "yes"; then
14157 save_LIBS="$LIBS"
14158 LIBS="$PTHREAD_LIBS $LIBS"
14159 save_CXXFLAGS="$CXXFLAGS"
14160 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14162$as_echo_n "checking for std::thread... " >&6; }
14163if ${gdb_cv_cxx_std_thread+:} false; then :
14164 $as_echo_n "(cached) " >&6
14165else
14166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14167/* end confdefs.h. */
05ea2a05
TT
14168#include <thread>
14169 void callback() { }
14170int
14171main ()
14172{
14173std::thread t(callback);
14174 ;
14175 return 0;
14176}
5e030278 14177_ACEOF
05ea2a05
TT
14178if ac_fn_cxx_try_compile "$LINENO"; then :
14179 gdb_cv_cxx_std_thread=yes
14180else
14181 gdb_cv_cxx_std_thread=no
5e030278 14182fi
05ea2a05
TT
14183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14184fi
14185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14186$as_echo "$gdb_cv_cxx_std_thread" >&6; }
5e030278 14187
05ea2a05
TT
14188 # This check must be here, while LIBS includes any necessary
14189 # threading library.
14190 for ac_func in pthread_sigmask pthread_setname_np
14191do :
14192 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14193ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14194if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14195 cat >>confdefs.h <<_ACEOF
14196#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14197_ACEOF
5e030278
TT
14198
14199fi
05ea2a05 14200done
5e030278 14201
5e030278 14202
05ea2a05
TT
14203 LIBS="$save_LIBS"
14204 CXXFLAGS="$save_CXXFLAGS"
14205 fi
14206 if test "$gdb_cv_cxx_std_thread" = "yes"; then
5e030278 14207
05ea2a05 14208$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
5e030278 14209
05ea2a05
TT
14210 fi
14211 ac_ext=c
14212ac_cpp='$CPP $CPPFLAGS'
14213ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14214ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14215ac_compiler_gnu=$ac_cv_c_compiler_gnu
5e030278 14216
5e030278 14217
05ea2a05
TT
14218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14219$as_echo_n "checking for sigsetjmp... " >&6; }
14220if ${gdb_cv_func_sigsetjmp+:} false; then :
14221 $as_echo_n "(cached) " >&6
14222else
14223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14224/* end confdefs.h. */
5e030278 14225
05ea2a05 14226 #include <setjmp.h>
5e030278 14227
05ea2a05
TT
14228int
14229main ()
14230{
14231sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14232 ;
14233 return 0;
14234}
14235_ACEOF
14236if ac_fn_c_try_compile "$LINENO"; then :
14237 gdb_cv_func_sigsetjmp=yes
14238else
14239 gdb_cv_func_sigsetjmp=no
14240fi
14241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14242fi
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14244$as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14245 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
5e030278 14246
05ea2a05 14247$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
5e030278 14248
05ea2a05
TT
14249 fi
14250
14251
14252# Check whether --with-intel_pt was given.
14253if test "${with_intel_pt+set}" = set; then :
14254 withval=$with_intel_pt;
5e030278 14255else
05ea2a05 14256 with_intel_pt=auto
5e030278 14257fi
05ea2a05
TT
14258
14259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14260$as_echo_n "checking whether to use intel pt... " >&6; }
14261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14262$as_echo "$with_intel_pt" >&6; }
14263
14264 if test "${with_intel_pt}" = no; then
14265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14266$as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14267 HAVE_LIBIPT=no
14268 else
14269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14270/* end confdefs.h. */
5e030278 14271
05ea2a05
TT
14272 #include <linux/perf_event.h>
14273 #ifndef PERF_ATTR_SIZE_VER5
14274 # error
14275 #endif
5e030278 14276
05ea2a05
TT
14277_ACEOF
14278if ac_fn_c_try_cpp "$LINENO"; then :
14279 perf_event=yes
14280else
14281 perf_event=no
5e030278 14282fi
05ea2a05
TT
14283rm -f conftest.err conftest.i conftest.$ac_ext
14284 if test "$perf_event" != yes; then
14285 if test "$with_intel_pt" = yes; then
14286 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14287 else
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14289$as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14290 fi
14291 fi
5e030278 14292
5e030278 14293
5e030278 14294
5e030278 14295
5e030278 14296
5e030278 14297
5e030278 14298
5e030278 14299
5e030278 14300
05ea2a05 14301 use_additional=yes
5e030278 14302
05ea2a05
TT
14303 acl_save_prefix="$prefix"
14304 prefix="$acl_final_prefix"
14305 acl_save_exec_prefix="$exec_prefix"
14306 exec_prefix="$acl_final_exec_prefix"
5e030278 14307
05ea2a05
TT
14308 eval additional_includedir=\"$includedir\"
14309 eval additional_libdir=\"$libdir\"
5e030278 14310
05ea2a05
TT
14311 exec_prefix="$acl_save_exec_prefix"
14312 prefix="$acl_save_prefix"
5e030278 14313
5e030278 14314
05ea2a05
TT
14315# Check whether --with-libipt-prefix was given.
14316if test "${with_libipt_prefix+set}" = set; then :
14317 withval=$with_libipt_prefix;
14318 if test "X$withval" = "Xno"; then
14319 use_additional=no
14320 else
14321 if test "X$withval" = "X"; then
5e030278 14322
05ea2a05
TT
14323 acl_save_prefix="$prefix"
14324 prefix="$acl_final_prefix"
14325 acl_save_exec_prefix="$exec_prefix"
14326 exec_prefix="$acl_final_exec_prefix"
5e030278 14327
05ea2a05
TT
14328 eval additional_includedir=\"$includedir\"
14329 eval additional_libdir=\"$libdir\"
5e030278 14330
05ea2a05
TT
14331 exec_prefix="$acl_save_exec_prefix"
14332 prefix="$acl_save_prefix"
5e030278 14333
05ea2a05
TT
14334 else
14335 additional_includedir="$withval/include"
14336 additional_libdir="$withval/lib"
14337 fi
14338 fi
5e030278
TT
14339
14340fi
5e030278 14341
9f1528a1
AB
14342
14343# Check whether --with-libipt-type was given.
14344if test "${with_libipt_type+set}" = set; then :
14345 withval=$with_libipt_type; with_libipt_type=$withval
14346else
14347 with_libipt_type=auto
14348fi
14349
14350 lib_type=`eval echo \$with_libipt_type`
14351
05ea2a05
TT
14352 LIBIPT=
14353 LTLIBIPT=
14354 INCIPT=
14355 rpathdirs=
14356 ltrpathdirs=
14357 names_already_handled=
14358 names_next_round='ipt '
14359 while test -n "$names_next_round"; do
14360 names_this_round="$names_next_round"
14361 names_next_round=
14362 for name in $names_this_round; do
14363 already_handled=
14364 for n in $names_already_handled; do
14365 if test "$n" = "$name"; then
14366 already_handled=yes
14367 break
14368 fi
14369 done
14370 if test -z "$already_handled"; then
14371 names_already_handled="$names_already_handled $name"
14372 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14373 eval value=\"\$HAVE_LIB$uppername\"
14374 if test -n "$value"; then
14375 if test "$value" = yes; then
14376 eval value=\"\$LIB$uppername\"
14377 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14378 eval value=\"\$LTLIB$uppername\"
14379 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14380 else
14381 :
14382 fi
14383 else
14384 found_dir=
14385 found_la=
14386 found_so=
14387 found_a=
14388 if test $use_additional = yes; then
9f1528a1 14389 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14390 found_dir="$additional_libdir"
14391 found_so="$additional_libdir/lib$name.$shlibext"
14392 if test -f "$additional_libdir/lib$name.la"; then
14393 found_la="$additional_libdir/lib$name.la"
14394 fi
9f1528a1 14395 elif test x$lib_type != xshared; then
05ea2a05
TT
14396 if test -f "$additional_libdir/lib$name.$libext"; then
14397 found_dir="$additional_libdir"
14398 found_a="$additional_libdir/lib$name.$libext"
14399 if test -f "$additional_libdir/lib$name.la"; then
14400 found_la="$additional_libdir/lib$name.la"
14401 fi
14402 fi
14403 fi
14404 fi
14405 if test "X$found_dir" = "X"; then
14406 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14407
05ea2a05
TT
14408 acl_save_prefix="$prefix"
14409 prefix="$acl_final_prefix"
14410 acl_save_exec_prefix="$exec_prefix"
14411 exec_prefix="$acl_final_exec_prefix"
14412 eval x=\"$x\"
14413 exec_prefix="$acl_save_exec_prefix"
14414 prefix="$acl_save_prefix"
5e030278 14415
05ea2a05
TT
14416 case "$x" in
14417 -L*)
14418 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 14419 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
05ea2a05
TT
14420 found_dir="$dir"
14421 found_so="$dir/lib$name.$shlibext"
14422 if test -f "$dir/lib$name.la"; then
14423 found_la="$dir/lib$name.la"
14424 fi
9f1528a1 14425 elif test x$lib_type != xshared; then
05ea2a05
TT
14426 if test -f "$dir/lib$name.$libext"; then
14427 found_dir="$dir"
14428 found_a="$dir/lib$name.$libext"
14429 if test -f "$dir/lib$name.la"; then
14430 found_la="$dir/lib$name.la"
14431 fi
14432 fi
14433 fi
14434 ;;
14435 esac
14436 if test "X$found_dir" != "X"; then
14437 break
14438 fi
14439 done
14440 fi
14441 if test "X$found_dir" != "X"; then
14442 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14443 if test "X$found_so" != "X"; then
14444 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14445 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14446 else
14447 haveit=
14448 for x in $ltrpathdirs; do
14449 if test "X$x" = "X$found_dir"; then
14450 haveit=yes
14451 break
14452 fi
14453 done
14454 if test -z "$haveit"; then
14455 ltrpathdirs="$ltrpathdirs $found_dir"
14456 fi
14457 if test "$hardcode_direct" = yes; then
14458 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14459 else
14460 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14461 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14462 haveit=
14463 for x in $rpathdirs; do
14464 if test "X$x" = "X$found_dir"; then
14465 haveit=yes
14466 break
14467 fi
14468 done
14469 if test -z "$haveit"; then
14470 rpathdirs="$rpathdirs $found_dir"
14471 fi
14472 else
14473 haveit=
14474 for x in $LDFLAGS $LIBIPT; do
5e030278 14475
05ea2a05
TT
14476 acl_save_prefix="$prefix"
14477 prefix="$acl_final_prefix"
14478 acl_save_exec_prefix="$exec_prefix"
14479 exec_prefix="$acl_final_exec_prefix"
14480 eval x=\"$x\"
14481 exec_prefix="$acl_save_exec_prefix"
14482 prefix="$acl_save_prefix"
5e030278 14483
05ea2a05
TT
14484 if test "X$x" = "X-L$found_dir"; then
14485 haveit=yes
14486 break
14487 fi
14488 done
14489 if test -z "$haveit"; then
14490 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14491 fi
14492 if test "$hardcode_minus_L" != no; then
14493 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14494 else
14495 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14496 fi
14497 fi
14498 fi
14499 fi
14500 else
14501 if test "X$found_a" != "X"; then
14502 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14503 else
14504 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14505 fi
14506 fi
14507 additional_includedir=
14508 case "$found_dir" in
14509 */lib | */lib/)
14510 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14511 additional_includedir="$basedir/include"
14512 ;;
14513 esac
14514 if test "X$additional_includedir" != "X"; then
14515 if test "X$additional_includedir" != "X/usr/include"; then
14516 haveit=
14517 if test "X$additional_includedir" = "X/usr/local/include"; then
14518 if test -n "$GCC"; then
14519 case $host_os in
14520 linux*) haveit=yes;;
14521 esac
14522 fi
14523 fi
14524 if test -z "$haveit"; then
14525 for x in $CPPFLAGS $INCIPT; do
5e030278 14526
05ea2a05
TT
14527 acl_save_prefix="$prefix"
14528 prefix="$acl_final_prefix"
14529 acl_save_exec_prefix="$exec_prefix"
14530 exec_prefix="$acl_final_exec_prefix"
14531 eval x=\"$x\"
14532 exec_prefix="$acl_save_exec_prefix"
14533 prefix="$acl_save_prefix"
5e030278 14534
05ea2a05
TT
14535 if test "X$x" = "X-I$additional_includedir"; then
14536 haveit=yes
14537 break
14538 fi
14539 done
14540 if test -z "$haveit"; then
14541 if test -d "$additional_includedir"; then
14542 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14543 fi
14544 fi
14545 fi
14546 fi
14547 fi
14548 if test -n "$found_la"; then
14549 save_libdir="$libdir"
14550 case "$found_la" in
14551 */* | *\\*) . "$found_la" ;;
14552 *) . "./$found_la" ;;
14553 esac
14554 libdir="$save_libdir"
14555 for dep in $dependency_libs; do
14556 case "$dep" in
14557 -L*)
14558 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14559 if test "X$additional_libdir" != "X/usr/lib"; then
14560 haveit=
14561 if test "X$additional_libdir" = "X/usr/local/lib"; then
14562 if test -n "$GCC"; then
14563 case $host_os in
14564 linux*) haveit=yes;;
14565 esac
14566 fi
14567 fi
14568 if test -z "$haveit"; then
14569 haveit=
14570 for x in $LDFLAGS $LIBIPT; do
5e030278 14571
05ea2a05
TT
14572 acl_save_prefix="$prefix"
14573 prefix="$acl_final_prefix"
14574 acl_save_exec_prefix="$exec_prefix"
14575 exec_prefix="$acl_final_exec_prefix"
14576 eval x=\"$x\"
14577 exec_prefix="$acl_save_exec_prefix"
14578 prefix="$acl_save_prefix"
5e030278 14579
05ea2a05
TT
14580 if test "X$x" = "X-L$additional_libdir"; then
14581 haveit=yes
14582 break
14583 fi
14584 done
14585 if test -z "$haveit"; then
14586 if test -d "$additional_libdir"; then
14587 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14588 fi
14589 fi
14590 haveit=
14591 for x in $LDFLAGS $LTLIBIPT; do
5e030278 14592
05ea2a05
TT
14593 acl_save_prefix="$prefix"
14594 prefix="$acl_final_prefix"
14595 acl_save_exec_prefix="$exec_prefix"
14596 exec_prefix="$acl_final_exec_prefix"
14597 eval x=\"$x\"
14598 exec_prefix="$acl_save_exec_prefix"
14599 prefix="$acl_save_prefix"
5e030278 14600
05ea2a05
TT
14601 if test "X$x" = "X-L$additional_libdir"; then
14602 haveit=yes
14603 break
14604 fi
14605 done
14606 if test -z "$haveit"; then
14607 if test -d "$additional_libdir"; then
14608 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14609 fi
14610 fi
14611 fi
14612 fi
14613 ;;
14614 -R*)
14615 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14616 if test "$enable_rpath" != no; then
14617 haveit=
14618 for x in $rpathdirs; do
14619 if test "X$x" = "X$dir"; then
14620 haveit=yes
14621 break
14622 fi
14623 done
14624 if test -z "$haveit"; then
14625 rpathdirs="$rpathdirs $dir"
14626 fi
14627 haveit=
14628 for x in $ltrpathdirs; do
14629 if test "X$x" = "X$dir"; then
14630 haveit=yes
14631 break
14632 fi
14633 done
14634 if test -z "$haveit"; then
14635 ltrpathdirs="$ltrpathdirs $dir"
14636 fi
14637 fi
14638 ;;
14639 -l*)
14640 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14641 ;;
14642 *.la)
14643 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14644 ;;
14645 *)
14646 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14647 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14648 ;;
14649 esac
14650 done
14651 fi
14652 else
9f1528a1
AB
14653 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14654 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14655 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14656 else
14657 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14658 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14659 fi
05ea2a05 14660 fi
5e030278 14661 fi
05ea2a05
TT
14662 fi
14663 done
14664 done
14665 if test "X$rpathdirs" != "X"; then
14666 if test -n "$hardcode_libdir_separator"; then
14667 alldirs=
14668 for found_dir in $rpathdirs; do
14669 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14670 done
14671 acl_save_libdir="$libdir"
14672 libdir="$alldirs"
14673 eval flag=\"$hardcode_libdir_flag_spec\"
14674 libdir="$acl_save_libdir"
14675 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14676 else
14677 for found_dir in $rpathdirs; do
14678 acl_save_libdir="$libdir"
14679 libdir="$found_dir"
14680 eval flag=\"$hardcode_libdir_flag_spec\"
14681 libdir="$acl_save_libdir"
14682 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14683 done
14684 fi
14685 fi
14686 if test "X$ltrpathdirs" != "X"; then
14687 for found_dir in $ltrpathdirs; do
14688 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14689 done
14690 fi
5e030278
TT
14691
14692
05ea2a05 14693 ac_save_CPPFLAGS="$CPPFLAGS"
5e030278 14694
05ea2a05
TT
14695 for element in $INCIPT; do
14696 haveit=
14697 for x in $CPPFLAGS; do
5e030278 14698
05ea2a05
TT
14699 acl_save_prefix="$prefix"
14700 prefix="$acl_final_prefix"
14701 acl_save_exec_prefix="$exec_prefix"
14702 exec_prefix="$acl_final_exec_prefix"
14703 eval x=\"$x\"
14704 exec_prefix="$acl_save_exec_prefix"
14705 prefix="$acl_save_prefix"
5e030278 14706
05ea2a05
TT
14707 if test "X$x" = "X$element"; then
14708 haveit=yes
14709 break
14710 fi
14711 done
14712 if test -z "$haveit"; then
14713 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14714 fi
14715 done
5e030278
TT
14716
14717
05ea2a05
TT
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14719$as_echo_n "checking for libipt... " >&6; }
14720if ${ac_cv_libipt+:} false; then :
5e030278
TT
14721 $as_echo_n "(cached) " >&6
14722else
05ea2a05
TT
14723
14724 ac_save_LIBS="$LIBS"
14725 LIBS="$LIBS $LIBIPT"
14726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e030278 14727/* end confdefs.h. */
05ea2a05 14728#include "intel-pt.h"
5e030278
TT
14729int
14730main ()
14731{
05ea2a05 14732pt_insn_alloc_decoder (0);
5e030278
TT
14733 ;
14734 return 0;
14735}
14736_ACEOF
05ea2a05
TT
14737if ac_fn_c_try_link "$LINENO"; then :
14738 ac_cv_libipt=yes
5e030278 14739else
05ea2a05 14740 ac_cv_libipt=no
5e030278 14741fi
05ea2a05
TT
14742rm -f core conftest.err conftest.$ac_objext \
14743 conftest$ac_exeext conftest.$ac_ext
14744 LIBS="$ac_save_LIBS"
14745
5e030278 14746fi
05ea2a05
TT
14747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14748$as_echo "$ac_cv_libipt" >&6; }
14749 if test "$ac_cv_libipt" = yes; then
14750 HAVE_LIBIPT=yes
21987b9c 14751
05ea2a05
TT
14752$as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14753
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14755$as_echo_n "checking how to link with libipt... " >&6; }
14756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14757$as_echo "$LIBIPT" >&6; }
14758 else
14759 HAVE_LIBIPT=no
14760 CPPFLAGS="$ac_save_CPPFLAGS"
14761 LIBIPT=
14762 LTLIBIPT=
14763 fi
14764
14765
14766
14767
14768
14769
14770 if test "$HAVE_LIBIPT" != yes; then
14771 if test "$with_intel_pt" = yes; then
14772 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14773 else
14774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14775$as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14776 fi
14777 else
14778 save_LIBS=$LIBS
14779 LIBS="$LIBS $LIBIPT"
14780 for ac_func in pt_insn_event
21987b9c 14781do :
05ea2a05
TT
14782 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14783if test "x$ac_cv_func_pt_insn_event" = xyes; then :
21987b9c 14784 cat >>confdefs.h <<_ACEOF
05ea2a05 14785#define HAVE_PT_INSN_EVENT 1
21987b9c
TT
14786_ACEOF
14787
14788fi
14789done
14790
05ea2a05
TT
14791 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14792"
14793if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
21987b9c 14794
05ea2a05
TT
14795cat >>confdefs.h <<_ACEOF
14796#define HAVE_STRUCT_PT_INSN_ENABLED 1
14797_ACEOF
5e030278 14798
5e030278 14799
05ea2a05
TT
14800fi
14801ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14802"
14803if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14804
14805cat >>confdefs.h <<_ACEOF
14806#define HAVE_STRUCT_PT_INSN_RESYNCED 1
14807_ACEOF
5e030278
TT
14808
14809
05ea2a05
TT
14810fi
14811
14812 LIBS=$save_LIBS
14813 fi
14814 fi
14815
c8693053
RO
14816
14817$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
14818
14819 for ac_header in sys/procfs.h
14820do :
14821 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
14822if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
14823 cat >>confdefs.h <<_ACEOF
14824#define HAVE_SYS_PROCFS_H 1
14825_ACEOF
14826
14827fi
14828
14829done
14830
05ea2a05 14831 if test "$ac_cv_header_sys_procfs_h" = yes; then
c8693053
RO
14832
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
05ea2a05
TT
14834$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14835 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
e9bcb658
GB
14836 $as_echo_n "(cached) " >&6
14837else
14838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14839/* end confdefs.h. */
14840
05ea2a05 14841#define _SYSCALL32
05ea2a05 14842#include <sys/procfs.h>
e9bcb658
GB
14843int
14844main ()
14845{
05ea2a05 14846gregset_t avar
e9bcb658
GB
14847 ;
14848 return 0;
14849}
14850_ACEOF
14851if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14852 bfd_cv_have_sys_procfs_type_gregset_t=yes
e9bcb658 14853else
05ea2a05 14854 bfd_cv_have_sys_procfs_type_gregset_t=no
54019719
PA
14855
14856fi
05ea2a05 14857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 14858fi
06825bd1 14859
05ea2a05 14860 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
a3828db0 14861
05ea2a05 14862$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
06825bd1 14863
05ea2a05
TT
14864 fi
14865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14866$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14867
c8693053
RO
14868
14869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
14870$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14871 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
81ecdfbb 14872 $as_echo_n "(cached) " >&6
bec39cab 14873else
81ecdfbb 14874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14875/* end confdefs.h. */
05ea2a05
TT
14876
14877#define _SYSCALL32
05ea2a05 14878#include <sys/procfs.h>
bec39cab
AC
14879int
14880main ()
14881{
05ea2a05 14882fpregset_t avar
064ef605
DJ
14883 ;
14884 return 0;
14885}
14886_ACEOF
9b30624b 14887if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14888 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14889else
14890 bfd_cv_have_sys_procfs_type_fpregset_t=no
14891
14892fi
14893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14894fi
14895
14896 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14897
14898$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14899
14900 fi
14901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14902$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14903
c8693053
RO
14904
14905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
05ea2a05
TT
14906$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14907 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14908 $as_echo_n "(cached) " >&6
064ef605 14909else
81ecdfbb 14910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14911/* end confdefs.h. */
05ea2a05
TT
14912
14913#define _SYSCALL32
05ea2a05 14914#include <sys/procfs.h>
064ef605
DJ
14915int
14916main ()
14917{
05ea2a05 14918prgregset_t avar
bec39cab
AC
14919 ;
14920 return 0;
14921}
14922_ACEOF
9b30624b 14923if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14924 bfd_cv_have_sys_procfs_type_prgregset_t=yes
70f9f479 14925else
05ea2a05
TT
14926 bfd_cv_have_sys_procfs_type_prgregset_t=no
14927
70f9f479 14928fi
81ecdfbb 14929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
064ef605 14930fi
bec39cab 14931
05ea2a05 14932 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
70f9f479 14933
05ea2a05
TT
14934$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14935
14936 fi
14937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14938$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14939
c8693053
RO
14940
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
05ea2a05
TT
14942$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14943 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
81ecdfbb 14944 $as_echo_n "(cached) " >&6
bec39cab 14945else
81ecdfbb 14946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
064ef605 14947/* end confdefs.h. */
05ea2a05
TT
14948
14949#define _SYSCALL32
05ea2a05 14950#include <sys/procfs.h>
064ef605
DJ
14951int
14952main ()
14953{
05ea2a05 14954prfpregset_t avar
064ef605
DJ
14955 ;
14956 return 0;
14957}
14958_ACEOF
9b30624b 14959if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 14960 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
064ef605 14961else
05ea2a05 14962 bfd_cv_have_sys_procfs_type_prfpregset_t=no
064ef605 14963
5c7f2947 14964fi
81ecdfbb 14965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
05ea2a05
TT
14966fi
14967
14968 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14969
14970$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14971
14972 fi
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14974$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14975
c8693053
RO
14976
14977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
05ea2a05
TT
14978$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14979 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14980 $as_echo_n "(cached) " >&6
14981else
14982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 14983/* end confdefs.h. */
05ea2a05
TT
14984
14985#define _SYSCALL32
05ea2a05 14986#include <sys/procfs.h>
bec39cab
AC
14987int
14988main ()
14989{
05ea2a05 14990prgregset32_t avar
bec39cab
AC
14991 ;
14992 return 0;
14993}
14994_ACEOF
9b30624b 14995if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05
TT
14996 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14997else
14998 bfd_cv_have_sys_procfs_type_prgregset32_t=no
a3828db0 14999
064ef605 15000fi
81ecdfbb 15001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 15002fi
96d7229d 15003
05ea2a05 15004 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
78434e59 15005
05ea2a05 15006$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
78434e59 15007
05ea2a05
TT
15008 fi
15009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15010$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
54019719 15011
c8693053
RO
15012
15013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
05ea2a05
TT
15014$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15015 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
81ecdfbb 15016 $as_echo_n "(cached) " >&6
bec39cab 15017else
81ecdfbb 15018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15019/* end confdefs.h. */
05ea2a05
TT
15020
15021#define _SYSCALL32
05ea2a05 15022#include <sys/procfs.h>
bec39cab
AC
15023int
15024main ()
15025{
05ea2a05 15026lwpid_t avar
bec39cab
AC
15027 ;
15028 return 0;
15029}
15030_ACEOF
05ea2a05
TT
15031if ac_fn_c_try_compile "$LINENO"; then :
15032 bfd_cv_have_sys_procfs_type_lwpid_t=yes
c906108c 15033else
05ea2a05
TT
15034 bfd_cv_have_sys_procfs_type_lwpid_t=no
15035
c906108c 15036fi
05ea2a05 15037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15038fi
81ecdfbb 15039
05ea2a05 15040 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
a3828db0 15041
05ea2a05 15042$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
97bf5e38 15043
05ea2a05
TT
15044 fi
15045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15046$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
a3828db0 15047
c8693053
RO
15048
15049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
05ea2a05
TT
15050$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15051 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
81ecdfbb 15052 $as_echo_n "(cached) " >&6
97bf5e38 15053else
81ecdfbb 15054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15055/* end confdefs.h. */
a3828db0 15056
05ea2a05 15057#define _SYSCALL32
05ea2a05 15058#include <sys/procfs.h>
bec39cab
AC
15059int
15060main ()
15061{
05ea2a05 15062psaddr_t avar
bec39cab
AC
15063 ;
15064 return 0;
15065}
15066_ACEOF
81ecdfbb 15067if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15068 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 15069else
05ea2a05
TT
15070 bfd_cv_have_sys_procfs_type_psaddr_t=no
15071
c906108c 15072fi
81ecdfbb 15073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 15074fi
c3f6f71d 15075
05ea2a05 15076 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
c906108c 15077
05ea2a05 15078$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
db1ff28b 15079
05ea2a05
TT
15080 fi
15081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15082$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15083
c8693053
RO
15084
15085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
05ea2a05
TT
15086$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15087 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
db1ff28b
JK
15088 $as_echo_n "(cached) " >&6
15089else
15090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15091/* end confdefs.h. */
05ea2a05
TT
15092
15093#define _SYSCALL32
05ea2a05 15094#include <sys/procfs.h>
db1ff28b
JK
15095int
15096main ()
15097{
05ea2a05 15098elf_fpregset_t avar
db1ff28b
JK
15099 ;
15100 return 0;
15101}
15102_ACEOF
15103if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15104 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
db1ff28b 15105else
05ea2a05
TT
15106 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15107
db1ff28b
JK
15108fi
15109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15110fi
db1ff28b 15111
05ea2a05 15112 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
db1ff28b 15113
05ea2a05 15114$as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
db1ff28b 15115
05ea2a05
TT
15116 fi
15117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15118$as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
db1ff28b 15119
05ea2a05
TT
15120 fi
15121
15122
15123# Check the return and argument types of ptrace.
15124
15125
15126for ac_header in sys/ptrace.h ptrace.h
15127do :
15128 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15129ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15130if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15131 cat >>confdefs.h <<_ACEOF
15132#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15133_ACEOF
db1ff28b
JK
15134
15135fi
15136
05ea2a05
TT
15137done
15138
81ecdfbb 15139
05ea2a05
TT
15140gdb_ptrace_headers='
15141#include <sys/types.h>
15142#if HAVE_SYS_PTRACE_H
15143# include <sys/ptrace.h>
15144#endif
15145#if HAVE_UNISTD_H
15146# include <unistd.h>
15147#endif
15148'
5c45e068 15149
05ea2a05
TT
15150# Check return type. Varargs (used on GNU/Linux) conflict with the
15151# empty argument list, so check for that explicitly.
15152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15153$as_echo_n "checking return type of ptrace... " >&6; }
15154if ${gdb_cv_func_ptrace_ret+:} false; then :
81ecdfbb 15155 $as_echo_n "(cached) " >&6
bec39cab 15156else
81ecdfbb 15157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15158/* end confdefs.h. */
05ea2a05 15159$gdb_ptrace_headers
bec39cab
AC
15160int
15161main ()
15162{
05ea2a05 15163extern long ptrace (enum __ptrace_request, ...);
bec39cab
AC
15164 ;
15165 return 0;
15166}
15167_ACEOF
81ecdfbb 15168if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15169 gdb_cv_func_ptrace_ret='long'
bec39cab 15170else
81ecdfbb 15171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15172/* end confdefs.h. */
05ea2a05 15173$gdb_ptrace_headers
bec39cab
AC
15174int
15175main ()
15176{
05ea2a05 15177extern int ptrace ();
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='int'
27ca5dad 15184else
05ea2a05 15185 gdb_cv_func_ptrace_ret='long'
27ca5dad 15186fi
81ecdfbb 15187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 15188fi
05ea2a05 15189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 15190fi
05ea2a05
TT
15191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15192$as_echo "$gdb_cv_func_ptrace_ret" >&6; }
5c45e068
MK
15193
15194cat >>confdefs.h <<_ACEOF
05ea2a05 15195#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 15196_ACEOF
3862412b 15197
05ea2a05
TT
15198# Check argument types.
15199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15200$as_echo_n "checking types of arguments for ptrace... " >&6; }
15201if ${gdb_cv_func_ptrace_args+:} false; then :
15202 $as_echo_n "(cached) " >&6
15203else
5c45e068 15204
05ea2a05
TT
15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15206/* end confdefs.h. */
15207$gdb_ptrace_headers
15208int
15209main ()
15210{
15211extern long ptrace (enum __ptrace_request, ...);
15212 ;
15213 return 0;
15214}
bec39cab 15215_ACEOF
05ea2a05
TT
15216if ac_fn_c_try_compile "$LINENO"; then :
15217 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15218else
15219
15220for gdb_arg1 in 'int' 'long'; do
15221 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15222 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15223 for gdb_arg4 in 'int' 'long' 'void *'; do
15224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15225/* end confdefs.h. */
15226$gdb_ptrace_headers
15227int
15228main ()
15229{
3862412b 15230
05ea2a05
TT
15231extern $gdb_cv_func_ptrace_ret
15232 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
5c45e068 15233
05ea2a05
TT
15234 ;
15235 return 0;
15236}
15237_ACEOF
15238if ac_fn_c_try_compile "$LINENO"; then :
15239 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15240 break 4;
97bf5e38 15241fi
05ea2a05
TT
15242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15243 for gdb_arg5 in 'int *' 'int' 'long'; do
15244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15245/* end confdefs.h. */
15246$gdb_ptrace_headers
15247int
15248main ()
15249{
3862412b 15250
05ea2a05
TT
15251extern $gdb_cv_func_ptrace_ret
15252 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
5c45e068 15253
05ea2a05
TT
15254 ;
15255 return 0;
15256}
6fea9e18 15257_ACEOF
05ea2a05 15258if ac_fn_c_try_compile "$LINENO"; then :
6fea9e18 15259
05ea2a05
TT
15260gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15261 break 5;
15262fi
15263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15264 done
15265 done
15266 done
15267 done
15268done
15269# Provide a safe default value.
15270: ${gdb_cv_func_ptrace_args='int,int,long,long'}
6fea9e18
L
15271
15272fi
05ea2a05
TT
15273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15274fi
15275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15276$as_echo "$gdb_cv_func_ptrace_args" >&6; }
15277ac_save_IFS=$IFS; IFS=','
15278set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15279IFS=$ac_save_IFS
15280shift
6fea9e18
L
15281
15282cat >>confdefs.h <<_ACEOF
05ea2a05 15283#define PTRACE_TYPE_ARG1 $1
6fea9e18
L
15284_ACEOF
15285
15286
05ea2a05
TT
15287cat >>confdefs.h <<_ACEOF
15288#define PTRACE_TYPE_ARG3 $3
bec39cab 15289_ACEOF
451928c5 15290
60ca704f 15291
05ea2a05
TT
15292cat >>confdefs.h <<_ACEOF
15293#define PTRACE_TYPE_ARG4 $4
15294_ACEOF
15295
15296if test -n "$5"; then
15297
15298cat >>confdefs.h <<_ACEOF
15299#define PTRACE_TYPE_ARG5 $5
15300_ACEOF
451928c5 15301
97bf5e38 15302fi
451928c5 15303
05ea2a05
TT
15304
15305if test "$cross_compiling" = no; then
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15307$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15308if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15309 $as_echo_n "(cached) " >&6
05ea2a05
TT
15310else
15311 if test "$cross_compiling" = yes; then :
15312 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
451928c5 15313else
81ecdfbb 15314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15315/* end confdefs.h. */
05ea2a05 15316$ac_includes_default
bec39cab
AC
15317int
15318main ()
15319{
05ea2a05
TT
15320/* If this system has a BSD-style setpgrp which takes arguments,
15321 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15322 exit successfully. */
15323 return setpgrp (1,1) != -1;
bec39cab
AC
15324 ;
15325 return 0;
15326}
15327_ACEOF
05ea2a05
TT
15328if ac_fn_c_try_run "$LINENO"; then :
15329 ac_cv_func_setpgrp_void=no
451928c5 15330else
05ea2a05 15331 ac_cv_func_setpgrp_void=yes
451928c5 15332fi
05ea2a05
TT
15333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15334 conftest.$ac_objext conftest.beam conftest.$ac_ext
451928c5
AC
15335fi
15336
05ea2a05
TT
15337fi
15338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15339$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15340if test $ac_cv_func_setpgrp_void = yes; then
60ca704f 15341
05ea2a05 15342$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
451928c5 15343
97bf5e38 15344fi
451928c5 15345
05ea2a05
TT
15346else
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15348$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15349if ${ac_cv_func_setpgrp_void+:} false; then :
81ecdfbb 15350 $as_echo_n "(cached) " >&6
3862412b 15351else
81ecdfbb 15352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15353/* end confdefs.h. */
05ea2a05
TT
15354
15355#include <unistd.h>
15356
bec39cab
AC
15357int
15358main ()
15359{
05ea2a05
TT
15360
15361 if (setpgrp(1,1) == -1)
15362 exit (0);
15363 else
15364 exit (1);
15365
bec39cab
AC
15366 ;
15367 return 0;
15368}
15369_ACEOF
81ecdfbb 15370if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15371 ac_cv_func_setpgrp_void=no
3862412b 15372else
05ea2a05 15373 ac_cv_func_setpgrp_void=yes
3862412b 15374fi
81ecdfbb 15375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15376fi
05ea2a05
TT
15377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15378$as_echo "$ac_cv_func_setpgrp_void" >&6; }
15379if test "$ac_cv_func_setpgrp_void" = yes; then
15380 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
3862412b 15381
05ea2a05 15382fi
97bf5e38 15383fi
3862412b 15384
05ea2a05
TT
15385# Assume we'll default to using the included libiberty regex.
15386gdb_use_included_regex=yes
15387
15388# However, if the system regex is GNU regex, then default to *not*
15389# using the included regex.
15390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15391$as_echo_n "checking for GNU regex... " >&6; }
15392if ${gdb_cv_have_gnu_regex+:} false; then :
81ecdfbb 15393 $as_echo_n "(cached) " >&6
3862412b 15394else
81ecdfbb 15395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15396/* end confdefs.h. */
05ea2a05 15397#include <gnu-versions.h>
bec39cab
AC
15398int
15399main ()
15400{
05ea2a05
TT
15401#define REGEX_INTERFACE_VERSION 1
15402#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15403# error "Version mismatch"
15404#endif
bec39cab
AC
15405 ;
15406 return 0;
15407}
15408_ACEOF
81ecdfbb 15409if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15410 gdb_cv_have_gnu_regex=yes
3862412b 15411else
05ea2a05 15412 gdb_cv_have_gnu_regex=no
3862412b 15413fi
81ecdfbb 15414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 15415fi
05ea2a05
TT
15416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15417$as_echo "$gdb_cv_have_gnu_regex" >&6; }
15418if test "$gdb_cv_have_gnu_regex" = yes; then
15419 gdb_use_included_regex=no
15420fi
3862412b 15421
3862412b 15422
05ea2a05
TT
15423# Check whether --with-included-regex was given.
15424if test "${with_included_regex+set}" = set; then :
15425 withval=$with_included_regex; gdb_with_regex=$withval
15426else
15427 gdb_with_regex=$gdb_use_included_regex
97bf5e38 15428fi
3862412b 15429
05ea2a05 15430if test "$gdb_with_regex" = yes; then
6e9567fe 15431
05ea2a05 15432$as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
6e9567fe
JB
15433
15434fi
15435
05ea2a05
TT
15436# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15437ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15438#include <sys/proc.h>
6e9567fe 15439
e6cdd38e 15440"
05ea2a05 15441if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
e6cdd38e
JB
15442
15443cat >>confdefs.h <<_ACEOF
05ea2a05 15444#define HAVE_STRUCT_THREAD_TD_PCB 1
e6cdd38e
JB
15445_ACEOF
15446
15447
15448fi
15449
6e9567fe 15450
05ea2a05
TT
15451# See if <sys/lwp.h> defines `struct lwp`.
15452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15453$as_echo_n "checking for struct lwp... " >&6; }
15454if ${gdb_cv_struct_lwp+:} false; then :
81ecdfbb 15455 $as_echo_n "(cached) " >&6
596c9d4b 15456else
81ecdfbb 15457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15458/* end confdefs.h. */
05ea2a05
TT
15459#include <sys/param.h>
15460#define _KMEMUSER
15461#include <sys/lwp.h>
bec39cab
AC
15462int
15463main ()
15464{
05ea2a05 15465struct lwp l;
bec39cab
AC
15466 ;
15467 return 0;
15468}
15469_ACEOF
81ecdfbb 15470if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15471 gdb_cv_struct_lwp=yes
596c9d4b 15472else
05ea2a05 15473 gdb_cv_struct_lwp=no
596c9d4b 15474fi
81ecdfbb 15475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b 15476fi
05ea2a05
TT
15477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15478$as_echo "$gdb_cv_struct_lwp" >&6; }
15479if test "$gdb_cv_struct_lwp" = yes; then
596c9d4b 15480
05ea2a05 15481$as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
596c9d4b 15482
05ea2a05 15483fi
451928c5 15484
05ea2a05
TT
15485# See if <machine/reg.h> degines `struct reg'.
15486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15487$as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15488if ${gdb_cv_struct_reg+:} false; then :
81ecdfbb 15489 $as_echo_n "(cached) " >&6
d84dd0c5 15490else
81ecdfbb 15491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15492/* end confdefs.h. */
05ea2a05
TT
15493#include <sys/types.h>
15494#include <machine/reg.h>
bec39cab
AC
15495int
15496main ()
15497{
05ea2a05 15498struct reg r;
bec39cab
AC
15499 ;
15500 return 0;
15501}
15502_ACEOF
81ecdfbb 15503if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15504 gdb_cv_struct_reg=yes
d84dd0c5 15505else
05ea2a05 15506 gdb_cv_struct_reg=no
d84dd0c5 15507fi
81ecdfbb 15508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5 15509fi
05ea2a05
TT
15510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15511$as_echo "$gdb_cv_struct_reg" >&6; }
15512if test "$gdb_cv_struct_reg" = yes; then
d84dd0c5 15513
05ea2a05 15514$as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
bec39cab 15515
05ea2a05 15516fi
d84dd0c5 15517
05ea2a05
TT
15518# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15519# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15520ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15521#include <machine/reg.h>
15522"
15523if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
d84dd0c5 15524
05ea2a05
TT
15525cat >>confdefs.h <<_ACEOF
15526#define HAVE_STRUCT_REG_R_FS 1
15527_ACEOF
15528
15529
15530fi
15531ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15532#include <machine/reg.h>
15533"
15534if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15535
15536cat >>confdefs.h <<_ACEOF
15537#define HAVE_STRUCT_REG_R_GS 1
15538_ACEOF
15539
15540
15541fi
15542
15543
05ea2a05
TT
15544# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15546$as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15547if ${gdb_cv_have_ptrace_getregs+:} false; then :
81ecdfbb 15548 $as_echo_n "(cached) " >&6
d45fe813 15549else
81ecdfbb 15550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15551/* end confdefs.h. */
05ea2a05 15552#include <sys/ptrace.h>
bec39cab
AC
15553int
15554main ()
15555{
05ea2a05 15556PTRACE_GETREGS;
bec39cab
AC
15557 ;
15558 return 0;
15559}
15560_ACEOF
81ecdfbb 15561if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15562 gdb_cv_have_ptrace_getregs=yes
d45fe813 15563else
05ea2a05 15564 gdb_cv_have_ptrace_getregs=no
d45fe813 15565fi
81ecdfbb 15566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15567fi
15568
05ea2a05
TT
15569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15570$as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15571if test "$gdb_cv_have_ptrace_getregs" = yes; then
bec39cab 15572
05ea2a05 15573$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
d45fe813 15574
05ea2a05 15575fi
d45fe813 15576
05ea2a05
TT
15577# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15579$as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15580if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
81ecdfbb 15581 $as_echo_n "(cached) " >&6
d45fe813 15582else
81ecdfbb 15583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15584/* end confdefs.h. */
05ea2a05 15585#include <sys/ptrace.h>
bec39cab
AC
15586int
15587main ()
15588{
05ea2a05 15589PTRACE_GETFPXREGS;
bec39cab
AC
15590 ;
15591 return 0;
15592}
15593_ACEOF
81ecdfbb 15594if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15595 gdb_cv_have_ptrace_getfpxregs=yes
d45fe813 15596else
05ea2a05 15597 gdb_cv_have_ptrace_getfpxregs=no
d45fe813 15598fi
81ecdfbb 15599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15600fi
15601
05ea2a05
TT
15602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15603$as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15604if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
bec39cab 15605
05ea2a05 15606$as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
d45fe813 15607
05ea2a05 15608fi
d45fe813 15609
05ea2a05
TT
15610# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15612$as_echo_n "checking for PT_GETDBREGS... " >&6; }
15613if ${gdb_cv_have_pt_getdbregs+:} false; then :
81ecdfbb 15614 $as_echo_n "(cached) " >&6
d45fe813 15615else
81ecdfbb 15616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15617/* end confdefs.h. */
05ea2a05
TT
15618#include <sys/types.h>
15619#include <sys/ptrace.h>
bec39cab
AC
15620int
15621main ()
15622{
05ea2a05 15623PT_GETDBREGS;
bec39cab
AC
15624 ;
15625 return 0;
15626}
15627_ACEOF
81ecdfbb 15628if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15629 gdb_cv_have_pt_getdbregs=yes
d45fe813 15630else
05ea2a05 15631 gdb_cv_have_pt_getdbregs=no
d45fe813 15632fi
81ecdfbb 15633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
15634fi
15635
05ea2a05
TT
15636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15637$as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15638if test "$gdb_cv_have_pt_getdbregs" = yes; then
bec39cab 15639
05ea2a05 15640$as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
d45fe813 15641
05ea2a05 15642fi
c906108c 15643
05ea2a05
TT
15644# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15646$as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15647if ${gdb_cv_have_pt_getxmmregs+:} false; then :
81ecdfbb 15648 $as_echo_n "(cached) " >&6
c906108c 15649else
81ecdfbb 15650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15651/* end confdefs.h. */
05ea2a05
TT
15652#include <sys/types.h>
15653#include <sys/ptrace.h>
bec39cab
AC
15654int
15655main ()
15656{
05ea2a05 15657PT_GETXMMREGS;
bec39cab
AC
15658 ;
15659 return 0;
15660}
15661_ACEOF
81ecdfbb 15662if ac_fn_c_try_compile "$LINENO"; then :
05ea2a05 15663 gdb_cv_have_pt_getxmmregs=yes
c906108c 15664else
05ea2a05 15665 gdb_cv_have_pt_getxmmregs=no
c906108c 15666fi
81ecdfbb 15667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
15668fi
15669
05ea2a05
TT
15670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15671$as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15672if test "$gdb_cv_have_pt_getxmmregs" = yes; then
bec39cab 15673
05ea2a05 15674$as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
c906108c 15675
05ea2a05 15676fi
c906108c 15677
05ea2a05
TT
15678# See if <sys/ptrace.h> supports LWP names on FreeBSD
15679# Older FreeBSD versions don't have the pl_tdname member of
15680# `struct ptrace_lwpinfo'.
15681ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15682"
15683if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
43b7e92b 15684
05ea2a05
TT
15685cat >>confdefs.h <<_ACEOF
15686#define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
43b7e92b 15687_ACEOF
43b7e92b 15688
05ea2a05 15689
43b7e92b
GB
15690fi
15691
43b7e92b 15692
05ea2a05
TT
15693# See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15694# pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15695# FreeBSD 10.3.
15696ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15697"
15698if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15699
15700cat >>confdefs.h <<_ACEOF
15701#define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15702_ACEOF
43b7e92b 15703
43b7e92b 15704
c906108c 15705fi
c906108c 15706
05ea2a05 15707
bc8bcb4b 15708# Check if the compiler supports the `long long' type.
c906108c 15709
81ecdfbb
RW
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15711$as_echo_n "checking for long long support in compiler... " >&6; }
d0ac1c44 15712if ${gdb_cv_c_long_long+:} false; then :
81ecdfbb 15713 $as_echo_n "(cached) " >&6
97bf5e38 15714else
81ecdfbb 15715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15716/* end confdefs.h. */
bc8bcb4b 15717extern long long foo;
bec39cab
AC
15718int
15719main ()
15720{
bc8bcb4b 15721switch (foo & 2) { case 0: return 1; }
bec39cab
AC
15722 ;
15723 return 0;
15724}
15725_ACEOF
81ecdfbb 15726if ac_fn_c_try_compile "$LINENO"; then :
97bf5e38
MK
15727 gdb_cv_c_long_long=yes
15728else
81ecdfbb 15729 gdb_cv_c_long_long=no
97bf5e38 15730fi
81ecdfbb 15731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15732fi
81ecdfbb
RW
15733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15734$as_echo "$gdb_cv_c_long_long" >&6; }
0ad6b8ee 15735if test "$gdb_cv_c_long_long" != yes; then
74a0d9f6 15736 # libdecnumber requires long long.
d0ac1c44 15737 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
97bf5e38
MK
15738fi
15739
bc8bcb4b 15740# Check if the compiler and runtime support printing long longs.
97bf5e38 15741
81ecdfbb
RW
15742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15743$as_echo_n "checking for long long support in printf... " >&6; }
d0ac1c44 15744if ${gdb_cv_printf_has_long_long+:} false; then :
81ecdfbb 15745 $as_echo_n "(cached) " >&6
97bf5e38 15746else
81ecdfbb 15747 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15748 gdb_cv_printf_has_long_long=no
15749else
81ecdfbb 15750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15751/* end confdefs.h. */
bc8bcb4b
MK
15752$ac_includes_default
15753int
15754main ()
15755{
15756char buf[32];
97bf5e38
MK
15757 long long l = 0;
15758 l = (l << 16) + 0x0123;
15759 l = (l << 16) + 0x4567;
15760 l = (l << 16) + 0x89ab;
15761 l = (l << 16) + 0xcdef;
15762 sprintf (buf, "0x%016llx", l);
15763 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
15764 ;
15765 return 0;
c906108c 15766}
bec39cab 15767_ACEOF
81ecdfbb 15768if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15769 gdb_cv_printf_has_long_long=yes
15770else
81ecdfbb 15771 gdb_cv_printf_has_long_long=no
97bf5e38 15772fi
81ecdfbb
RW
15773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15774 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15775fi
81ecdfbb 15776
97bf5e38 15777fi
81ecdfbb
RW
15778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15779$as_echo "$gdb_cv_printf_has_long_long" >&6; }
0ad6b8ee 15780if test "$gdb_cv_printf_has_long_long" = yes; then
bc8bcb4b 15781
81ecdfbb 15782$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
97bf5e38
MK
15783
15784fi
97bf5e38 15785
1a619819
LM
15786# Check if the compiler and runtime support printing decfloats.
15787
81ecdfbb
RW
15788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15789$as_echo_n "checking for decfloat support in printf... " >&6; }
d0ac1c44 15790if ${gdb_cv_printf_has_decfloat+:} false; then :
81ecdfbb 15791 $as_echo_n "(cached) " >&6
1a619819 15792else
81ecdfbb 15793 if test "$cross_compiling" = yes; then :
1a619819
LM
15794 gdb_cv_printf_has_decfloat=no
15795else
81ecdfbb 15796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1a619819
LM
15797/* end confdefs.h. */
15798$ac_includes_default
15799int
15800main ()
15801{
15802char buf[64];
15803 _Decimal32 d32 = 1.2345df;
15804 _Decimal64 d64 = 1.2345dd;
15805 _Decimal128 d128 = 1.2345dl;
15806 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15807 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15808 ;
15809 return 0;
15810}
15811_ACEOF
81ecdfbb 15812if ac_fn_c_try_run "$LINENO"; then :
1a619819
LM
15813 gdb_cv_printf_has_decfloat=yes
15814else
81ecdfbb 15815 gdb_cv_printf_has_decfloat=no
1a619819 15816fi
81ecdfbb
RW
15817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15818 conftest.$ac_objext conftest.beam conftest.$ac_ext
1a619819 15819fi
81ecdfbb 15820
1a619819 15821fi
81ecdfbb
RW
15822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15823$as_echo "$gdb_cv_printf_has_decfloat" >&6; }
0ad6b8ee 15824if test "$gdb_cv_printf_has_decfloat" = yes; then
1a619819 15825
81ecdfbb 15826$as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
1a619819
LM
15827
15828fi
15829
bc8bcb4b
MK
15830# Check if the compiler supports the `long double' type. We can't use
15831# AC_C_LONG_DOUBLE because that one does additional checks on the
15832# constants defined in <float.h> that fail on some systems,
15833# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 15834
81ecdfbb
RW
15835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15836$as_echo_n "checking for long double support in compiler... " >&6; }
d0ac1c44 15837if ${gdb_cv_c_long_double+:} false; then :
81ecdfbb 15838 $as_echo_n "(cached) " >&6
97bf5e38 15839else
81ecdfbb 15840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15841/* end confdefs.h. */
97bf5e38 15842long double foo;
bec39cab 15843_ACEOF
81ecdfbb 15844if ac_fn_c_try_compile "$LINENO"; then :
bc8bcb4b 15845 gdb_cv_c_long_double=yes
97bf5e38 15846else
81ecdfbb 15847 gdb_cv_c_long_double=no
97bf5e38 15848fi
81ecdfbb 15849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 15850fi
81ecdfbb
RW
15851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15852$as_echo "$gdb_cv_c_long_double" >&6; }
0ad6b8ee 15853if test "$gdb_cv_c_long_double" = yes; then
c906108c 15854
81ecdfbb 15855$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15856
15857fi
15858
bc8bcb4b 15859# Check if the compiler and runtime support printing long doubles.
97bf5e38 15860
81ecdfbb
RW
15861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15862$as_echo_n "checking for long double support in printf... " >&6; }
d0ac1c44 15863if ${gdb_cv_printf_has_long_double+:} false; then :
81ecdfbb 15864 $as_echo_n "(cached) " >&6
97bf5e38 15865else
81ecdfbb 15866 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15867 gdb_cv_printf_has_long_double=no
15868else
81ecdfbb 15869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15870/* end confdefs.h. */
bc8bcb4b
MK
15871$ac_includes_default
15872int
15873main ()
15874{
15875char buf[16];
97bf5e38
MK
15876 long double f = 3.141592653;
15877 sprintf (buf, "%Lg", f);
15878 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
15879 ;
15880 return 0;
97bf5e38 15881}
bec39cab 15882_ACEOF
81ecdfbb 15883if ac_fn_c_try_run "$LINENO"; then :
97bf5e38 15884 gdb_cv_printf_has_long_double=yes
c906108c 15885else
81ecdfbb 15886 gdb_cv_printf_has_long_double=no
c906108c 15887fi
81ecdfbb
RW
15888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15889 conftest.$ac_objext conftest.beam conftest.$ac_ext
c906108c 15890fi
81ecdfbb 15891
c906108c 15892fi
81ecdfbb
RW
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15894$as_echo "$gdb_cv_printf_has_long_double" >&6; }
0ad6b8ee 15895if test "$gdb_cv_printf_has_long_double" = yes; then
bc8bcb4b 15896
81ecdfbb 15897$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15898
15899fi
97bf5e38 15900
bc8bcb4b 15901# Check if the compiler and runtime support scanning long doubles.
97bf5e38 15902
81ecdfbb
RW
15903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15904$as_echo_n "checking for long double support in scanf... " >&6; }
d0ac1c44 15905if ${gdb_cv_scanf_has_long_double+:} false; then :
81ecdfbb 15906 $as_echo_n "(cached) " >&6
97bf5e38 15907else
81ecdfbb 15908 if test "$cross_compiling" = yes; then :
97bf5e38
MK
15909 gdb_cv_scanf_has_long_double=no
15910else
81ecdfbb 15911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15912/* end confdefs.h. */
bc8bcb4b
MK
15913#include <stdio.h>
15914int
15915main ()
15916{
15917char *buf = "3.141592653";
97bf5e38
MK
15918 long double f = 0;
15919 sscanf (buf, "%Lg", &f);
15920 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
15921 ;
15922 return 0;
97bf5e38 15923}
bec39cab 15924_ACEOF
81ecdfbb 15925if ac_fn_c_try_run "$LINENO"; then :
97bf5e38
MK
15926 gdb_cv_scanf_has_long_double=yes
15927else
81ecdfbb 15928 gdb_cv_scanf_has_long_double=no
97bf5e38 15929fi
81ecdfbb
RW
15930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15931 conftest.$ac_objext conftest.beam conftest.$ac_ext
97bf5e38 15932fi
81ecdfbb 15933
c906108c 15934fi
81ecdfbb
RW
15935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15936$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
0ad6b8ee 15937if test "$gdb_cv_scanf_has_long_double" = yes; then
bc8bcb4b 15938
81ecdfbb 15939$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
97bf5e38
MK
15940
15941fi
c906108c 15942
438013df
AO
15943case ${host_os} in
15944aix*)
81ecdfbb
RW
15945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15946$as_echo_n "checking for -bbigtoc option... " >&6; }
d0ac1c44 15947if ${gdb_cv_bigtoc+:} false; then :
81ecdfbb 15948 $as_echo_n "(cached) " >&6
438013df 15949else
bec39cab 15950
438013df
AO
15951 SAVE_LDFLAGS=$LDFLAGS
15952
15953 case $GCC in
15954 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15955 *) gdb_cv_bigtoc=-bbigtoc ;;
15956 esac
15957
15958 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
81ecdfbb 15959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 15960/* end confdefs.h. */
438013df 15961
bec39cab
AC
15962int
15963main ()
15964{
438013df 15965int i;
bec39cab
AC
15966 ;
15967 return 0;
15968}
15969_ACEOF
81ecdfbb 15970if ac_fn_c_try_link "$LINENO"; then :
bec39cab 15971
81ecdfbb
RW
15972else
15973 gdb_cv_bigtoc=
438013df 15974fi
81ecdfbb
RW
15975rm -f core conftest.err conftest.$ac_objext \
15976 conftest$ac_exeext conftest.$ac_ext
ec76baa5 15977 LDFLAGS="${SAVE_LDFLAGS}"
438013df 15978
bec39cab 15979fi
81ecdfbb
RW
15980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15981$as_echo "$gdb_cv_bigtoc" >&6; }
438013df
AO
15982 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15983 ;;
15984esac
15985
38f6b338 15986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
f6528abd 15987$as_echo_n "checking for the dynamic export flag... " >&6; }
38f6b338
JK
15988dynamic_list=false
15989if test "${gdb_native}" = yes; then
15990 # The dynamically loaded libthread_db needs access to symbols in the gdb
15991 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15992 # may not be supported there.
15993 old_LDFLAGS="$LDFLAGS"
15994 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15995 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15996 LDFLAGS="$LDFLAGS $RDYNAMIC"
15997 if test "${have_libpython}" = no; then
15998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f6528abd
JK
15999/* end confdefs.h. */
16000
16001int
16002main ()
16003{
16004
16005 ;
16006 return 0;
16007}
16008_ACEOF
16009if ac_fn_c_try_link "$LINENO"; then :
3bebe2f2
JK
16010 dynamic_list=true
16011fi
16012rm -f core conftest.err conftest.$ac_objext \
16013 conftest$ac_exeext conftest.$ac_ext
38f6b338
JK
16014 else
16015 # Workaround http://bugs.python.org/issue4434 where static
16016 # libpythonX.Y.a would get its symbols required for
16017 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16018 # Problem does not happen for the recommended libpythonX.Y.so linkage.
a4a1c157
PA
16019
16020 # Note the workaround for Python
16021 # http://bugs.python.org/issue10112 earlier has removed
16022 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16023 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16024 # always pass.
38f6b338
JK
16025 old_CFLAGS="$CFLAGS"
16026 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
8c1fb155
JK
16027 old_LIBS="$LIBS"
16028 LIBS="$LIBS $PYTHON_LIBS"
1b4f615e
PA
16029 old_CPPFLAGS="$CPPFLAGS"
16030 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
38f6b338 16031 if test "$cross_compiling" = yes; then :
3bebe2f2 16032 true
f6528abd 16033else
3bebe2f2
JK
16034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16035/* end confdefs.h. */
1b4f615e 16036#include "Python.h"
3bebe2f2
JK
16037int
16038main ()
16039{
16040int err;
38f6b338
JK
16041 Py_Initialize ();
16042 err = PyRun_SimpleString ("import itertools\n");
16043 Py_Finalize ();
16044 return err == 0 ? 0 : 1;
3bebe2f2
JK
16045 ;
16046 return 0;
16047}
16048_ACEOF
16049if ac_fn_c_try_run "$LINENO"; then :
16050 dynamic_list=true
16051fi
16052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16053 conftest.$ac_objext conftest.beam conftest.$ac_ext
16054fi
16055
8c1fb155 16056 LIBS="$old_LIBS"
38f6b338 16057 CFLAGS="$old_CFLAGS"
1b4f615e 16058 CPPFLAGS="$old_CPPFLAGS"
38f6b338
JK
16059 fi
16060 LDFLAGS="$old_LDFLAGS"
16061fi
16062if $dynamic_list; then
16063 found="-Wl,--dynamic-list"
16064 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
f6528abd 16065else
38f6b338
JK
16066 found="-rdynamic"
16067 RDYNAMIC="-rdynamic"
f6528abd 16068fi
f6528abd 16069
38f6b338 16070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
f6528abd 16071$as_echo "$found" >&6; }
0407b3f1 16072
f6528abd 16073
0ad6b8ee 16074if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
c906108c 16075 case ${host_os} in
d92419e5 16076 aix*)
81ecdfbb
RW
16077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16078$as_echo_n "checking for AiX thread debugging library... " >&6; }
d0ac1c44 16079 if ${gdb_cv_have_aix_thread_debug+:} false; then :
81ecdfbb 16080 $as_echo_n "(cached) " >&6
bec39cab 16081else
81ecdfbb 16082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16083/* end confdefs.h. */
d92419e5 16084#include <sys/pthdebug.h>
bec39cab
AC
16085int
16086main ()
16087{
d92419e5
JB
16088#ifndef PTHDB_VERSION_3
16089 #error
16090 #endif
bec39cab
AC
16091 ;
16092 return 0;
16093}
16094_ACEOF
81ecdfbb 16095if ac_fn_c_try_compile "$LINENO"; then :
d92419e5
JB
16096 gdb_cv_have_aix_thread_debug=yes
16097else
81ecdfbb 16098 gdb_cv_have_aix_thread_debug=no
d92419e5 16099fi
81ecdfbb 16100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
16101fi
16102
81ecdfbb
RW
16103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16104$as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
0ad6b8ee 16105 if test "$gdb_cv_have_aix_thread_debug" = yes; then
d92419e5 16106 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 16107 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
7f533142 16108 LIBS="$LIBS -lpthdebug"
d645e32e
JB
16109
16110 # Older versions of AIX do not provide the declaration for
16111 # the getthrds function (it appears that it was introduced
16112 # with AIX 6.x).
16113 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16114"
d0ac1c44 16115if test "x$ac_cv_have_decl_getthrds" = xyes; then :
d645e32e
JB
16116 ac_have_decl=1
16117else
16118 ac_have_decl=0
16119fi
16120
16121cat >>confdefs.h <<_ACEOF
16122#define HAVE_DECL_GETTHRDS $ac_have_decl
16123_ACEOF
16124
d92419e5
JB
16125 fi
16126 ;;
c906108c 16127 esac
bec39cab 16128
c906108c
SS
16129fi
16130
3f47be5c 16131if test "x$ac_cv_header_thread_db_h" = "xyes"; then
81ecdfbb
RW
16132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16133$as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
d0ac1c44 16134if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
81ecdfbb 16135 $as_echo_n "(cached) " >&6
bec39cab 16136else
81ecdfbb 16137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16138/* end confdefs.h. */
3f47be5c 16139#include <thread_db.h>
bec39cab
AC
16140int
16141main ()
16142{
3f47be5c 16143int i = TD_NOTALLOC;
bec39cab
AC
16144 ;
16145 return 0;
16146}
16147_ACEOF
81ecdfbb 16148if ac_fn_c_try_compile "$LINENO"; then :
3f47be5c
EZ
16149 gdb_cv_thread_db_h_has_td_notalloc=yes
16150else
81ecdfbb 16151 gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 16152
3f47be5c 16153fi
81ecdfbb 16154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 16155
bec39cab 16156fi
81ecdfbb
RW
16157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16158$as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16160$as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
d0ac1c44 16161if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
81ecdfbb 16162 $as_echo_n "(cached) " >&6
59f80f10 16163else
81ecdfbb 16164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16165/* end confdefs.h. */
16166#include <thread_db.h>
16167int
16168main ()
16169{
16170int i = TD_VERSION;
16171 ;
16172 return 0;
16173}
16174_ACEOF
81ecdfbb 16175if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16176 gdb_cv_thread_db_h_has_td_version=yes
16177else
81ecdfbb 16178 gdb_cv_thread_db_h_has_td_version=no
59f80f10
DJ
16179
16180fi
81ecdfbb 16181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16182
16183fi
81ecdfbb
RW
16184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16185$as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16187$as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
d0ac1c44 16188if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
81ecdfbb 16189 $as_echo_n "(cached) " >&6
59f80f10 16190else
81ecdfbb 16191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59f80f10
DJ
16192/* end confdefs.h. */
16193#include <thread_db.h>
16194int
16195main ()
16196{
16197int i = TD_NOTLS;
16198 ;
16199 return 0;
16200}
16201_ACEOF
81ecdfbb 16202if ac_fn_c_try_compile "$LINENO"; then :
59f80f10
DJ
16203 gdb_cv_thread_db_h_has_td_notls=yes
16204else
81ecdfbb 16205 gdb_cv_thread_db_h_has_td_notls=no
59f80f10
DJ
16206
16207fi
81ecdfbb 16208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59f80f10
DJ
16209
16210fi
81ecdfbb
RW
16211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16212$as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
3f47be5c
EZ
16213fi
16214if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab 16215
81ecdfbb 16216$as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
3f47be5c 16217
59f80f10
DJ
16218fi
16219if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16220
81ecdfbb 16221$as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
59f80f10
DJ
16222
16223fi
16224if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16225
81ecdfbb 16226$as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
59f80f10 16227
3f47be5c
EZ
16228fi
16229
e655c1a2
PA
16230case $host_os in
16231 go32* | *djgpp*)
16232 gdbinit=gdb.ini
16233 ;;
16234 *)
16235 gdbinit=.gdbinit
16236 ;;
16237esac
16238
16239cat >>confdefs.h <<_ACEOF
16240#define GDBINIT "$gdbinit"
16241_ACEOF
16242
16243
fb40c209 16244
f83d8a90
DE
16245# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16246# except that the argument to --with-sysroot is optional.
16247# --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16248if test "x$with_sysroot" = xyes; then
16249 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16250fi
bec39cab 16251
81ecdfbb
RW
16252# Check whether --with-sysroot was given.
16253if test "${with_sysroot+set}" = set; then :
f83d8a90
DE
16254 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16255else
16256 TARGET_SYSTEM_ROOT=
16257fi
030292b7 16258
030292b7 16259
f83d8a90
DE
16260 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16261 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16262 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16263 ac_define_dir=`eval echo $ac_define_dir`
030292b7 16264
f83d8a90
DE
16265cat >>confdefs.h <<_ACEOF
16266#define TARGET_SYSTEM_ROOT "$ac_define_dir"
16267_ACEOF
bec39cab 16268
030292b7 16269
b14b1491 16270
f83d8a90
DE
16271
16272 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16273 if test "x$prefix" = xNONE; then
16274 test_prefix=/usr/local
16275 else
16276 test_prefix=$prefix
16277 fi
16278 else
16279 test_prefix=$exec_prefix
16280 fi
16281 value=0
16282 case ${ac_define_dir} in
16283 "${test_prefix}"|"${test_prefix}/"*|\
16284 '${exec_prefix}'|'${exec_prefix}/'*)
16285 value=1
16286 ;;
16287 esac
16288
16289cat >>confdefs.h <<_ACEOF
16290#define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16291_ACEOF
030292b7
DJ
16292
16293
16294
16e7150e 16295
16e7150e 16296
81ecdfbb
RW
16297# Check whether --with-system-gdbinit was given.
16298if test "${with_system_gdbinit+set}" = set; then :
16299 withval=$with_system_gdbinit;
b14b1491
TT
16300 SYSTEM_GDBINIT=$withval
16301else
16302 SYSTEM_GDBINIT=
81ecdfbb
RW
16303fi
16304
16e7150e
JG
16305
16306 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16307 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
b14b1491 16308 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16e7150e
JG
16309 ac_define_dir=`eval echo $ac_define_dir`
16310
16311cat >>confdefs.h <<_ACEOF
16312#define SYSTEM_GDBINIT "$ac_define_dir"
16313_ACEOF
16314
16315
16316
0c4a4063 16317
b14b1491
TT
16318 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16319 if test "x$prefix" = xNONE; then
16320 test_prefix=/usr/local
16321 else
16322 test_prefix=$prefix
16323 fi
16324 else
16325 test_prefix=$exec_prefix
16326 fi
16327 value=0
16328 case ${ac_define_dir} in
16329 "${test_prefix}"|"${test_prefix}/"*|\
16330 '${exec_prefix}'|'${exec_prefix}/'*)
16331 value=1
16332 ;;
16333 esac
16e7150e 16334
b14b1491
TT
16335cat >>confdefs.h <<_ACEOF
16336#define SYSTEM_GDBINIT_RELOCATABLE $value
16e7150e
JG
16337_ACEOF
16338
b14b1491 16339
16e7150e 16340
0c4a4063 16341
b835bb52 16342
ed2a2229
CB
16343# Check whether --with-system-gdbinit-dir was given.
16344if test "${with_system_gdbinit_dir+set}" = set; then :
16345 withval=$with_system_gdbinit_dir;
16346 SYSTEM_GDBINIT_DIR=$withval
16347else
16348 SYSTEM_GDBINIT_DIR=
16349fi
16350
16351
16352 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16353 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16354 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16355 ac_define_dir=`eval echo $ac_define_dir`
16356
16357cat >>confdefs.h <<_ACEOF
16358#define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16359_ACEOF
16360
16361
16362
16363
16364 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16365 if test "x$prefix" = xNONE; then
16366 test_prefix=/usr/local
16367 else
16368 test_prefix=$prefix
16369 fi
16370 else
16371 test_prefix=$exec_prefix
16372 fi
16373 value=0
16374 case ${ac_define_dir} in
16375 "${test_prefix}"|"${test_prefix}/"*|\
16376 '${exec_prefix}'|'${exec_prefix}/'*)
16377 value=1
16378 ;;
16379 esac
16380
16381cat >>confdefs.h <<_ACEOF
16382#define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16383_ACEOF
16384
16385
16386
16387
16388
81ecdfbb
RW
16389# Check whether --enable-werror was given.
16390if test "${enable_werror+set}" = set; then :
16391 enableval=$enable_werror; case "${enableval}" in
094a342e
MK
16392 yes | y) ERROR_ON_WARNING="yes" ;;
16393 no | n) ERROR_ON_WARNING="no" ;;
d0ac1c44 16394 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
094a342e 16395 esac
81ecdfbb
RW
16396fi
16397
094a342e 16398
9a084706
PA
16399# Enable -Werror by default when using gcc. Turn it off for releases.
16400if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
094a342e
MK
16401 ERROR_ON_WARNING=yes
16402fi
16403
16404WERROR_CFLAGS=""
16405if test "${ERROR_ON_WARNING}" = yes ; then
16406 WERROR_CFLAGS="-Werror"
16407fi
16408
cf6de44d 16409# The options we'll try to enable.
aac331e4 16410build_warnings="-Wall -Wpointer-arith \
a0de763e 16411-Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
aac331e4 16412-Wno-switch -Wno-char-subscripts \
cf6de44d 16413-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
d3d8724a 16414-Wno-sign-compare -Wno-error=maybe-uninitialized \
7f8a5d38 16415-Wno-mismatched-tags \
632e107b 16416-Wno-error=deprecated-register \
85e26832 16417-Wsuggest-override \
1a34f210 16418-Wimplicit-fallthrough=3 \
96643e35 16419-Wduplicated-cond \
33a6bc35
TT
16420-Wshadow=local \
16421-Wdeprecated-copy \
16422-Wdeprecated-copy-dtor \
bb564c58 16423-Wredundant-move \
8ddd8e0e 16424-Wmissing-declarations \
a0761e34 16425-Wmissing-prototypes \
898e7f60
SM
16426-Wstrict-null-sentinel \
16427"
3bc3d82a 16428
3526781e 16429case "${host}" in
4fa7574e
RO
16430 *-*-mingw32*)
16431 # Enable -Wno-format by default when using gcc on mingw since many
16432 # GCC versions complain about %I64.
16433 build_warnings="$build_warnings -Wno-format" ;;
16434 *-*-solaris*)
16435 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16436 # doesn't understand.
16437 build_warnings="$build_warnings -Wno-unknown-pragmas"
16438 # Solaris 11 <unistd.h> marks vfork deprecated.
16439 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
f1628857
TT
16440 *)
16441 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16442 # but there's a special case for this below.
16443 build_warnings="$build_warnings -Wformat-nonliteral" ;;
3526781e
DJ
16444esac
16445
81ecdfbb
RW
16446# Check whether --enable-build-warnings was given.
16447if test "${enable_build_warnings+set}" = set; then :
16448 enableval=$enable_build_warnings; case "${enableval}" in
c906108c
SS
16449 yes) ;;
16450 no) build_warnings="-w";;
16451 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16452 build_warnings="${build_warnings} ${t}";;
16453 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16454 build_warnings="${t} ${build_warnings}";;
16455 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16456esac
d4f3574e 16457if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 16458 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 16459fi
81ecdfbb
RW
16460fi
16461# Check whether --enable-gdb-build-warnings was given.
16462if test "${enable_gdb_build_warnings+set}" = set; then :
16463 enableval=$enable_gdb_build_warnings; case "${enableval}" in
3b851bce
AC
16464 yes) ;;
16465 no) build_warnings="-w";;
16466 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16467 build_warnings="${build_warnings} ${t}";;
16468 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16469 build_warnings="${t} ${build_warnings}";;
16470 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16471esac
16472if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16473 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16474fi
81ecdfbb 16475fi
3bc3d82a
PA
16476
16477# The set of warnings supported by a C++ compiler is not the same as
16478# of the C compiler.
cf6de44d 16479ac_ext=cpp
3bc3d82a
PA
16480ac_cpp='$CXXCPP $CPPFLAGS'
16481ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16482ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16483ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16484
3bc3d82a 16485
81ecdfbb 16486WARN_CFLAGS=""
c906108c
SS
16487if test "x${build_warnings}" != x -a "x$GCC" = xyes
16488then
81ecdfbb
RW
16489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16490$as_echo_n "checking compiler warning flags... " >&6; }
746a987d
AC
16491 # Separate out the -Werror flag as some files just cannot be
16492 # compiled with it enabled.
16493 for w in ${build_warnings}; do
7544db95
PA
16494 # GCC does not complain about -Wno-unknown-warning. Invert
16495 # and test -Wunknown-warning instead.
16496 case $w in
16497 -Wno-*)
16498 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
f1628857
TT
16499 -Wformat-nonliteral)
16500 # gcc requires -Wformat before -Wformat-nonliteral
16501 # will work, so stick them together.
16502 w="-Wformat $w"
16503 wtest="$w"
16504 ;;
7544db95
PA
16505 *)
16506 wtest=$w ;;
16507 esac
16508
746a987d
AC
16509 case $w in
16510 -Werr*) WERROR_CFLAGS=-Werror ;;
3bc3d82a
PA
16511 *)
16512 # Check whether GCC accepts it.
4536bbc6 16513 saved_CFLAGS="$CFLAGS"
3e019bdc 16514 CFLAGS="$CFLAGS -Werror $wtest"
3bc3d82a 16515 saved_CXXFLAGS="$CXXFLAGS"
3e019bdc 16516 CXXFLAGS="$CXXFLAGS -Werror $wtest"
a0de763e
TT
16517 if test "x$w" = "x-Wunused-variable"; then
16518 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16519 # fixed in GCC 4.9. This test is derived from the gdb
16520 # source code that triggered this bug in GCC.
16521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16522/* end confdefs.h. */
16523struct scoped_restore_base {};
16524 struct scoped_restore_tmpl : public scoped_restore_base {
16525 ~scoped_restore_tmpl() {}
16526 };
16527int
16528main ()
16529{
16530const scoped_restore_base &b = scoped_restore_tmpl();
16531 ;
16532 return 0;
16533}
16534_ACEOF
16535if ac_fn_cxx_try_compile "$LINENO"; then :
16536 WARN_CFLAGS="${WARN_CFLAGS} $w"
16537fi
16538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16539 else
16540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16541/* end confdefs.h. */
4536bbc6 16542
bec39cab
AC
16543int
16544main ()
16545{
4536bbc6 16546
bec39cab
AC
16547 ;
16548 return 0;
16549}
16550_ACEOF
3bc3d82a 16551if ac_fn_cxx_try_compile "$LINENO"; then :
4536bbc6 16552 WARN_CFLAGS="${WARN_CFLAGS} $w"
4536bbc6 16553fi
81ecdfbb 16554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a0de763e 16555 fi
4536bbc6 16556 CFLAGS="$saved_CFLAGS"
3bc3d82a 16557 CXXFLAGS="$saved_CXXFLAGS"
746a987d
AC
16558 esac
16559 done
81ecdfbb
RW
16560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16561$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
c906108c
SS
16562fi
16563
16564
104c1213 16565
cf6de44d 16566ac_ext=c
3bc3d82a
PA
16567ac_cpp='$CPP $CPPFLAGS'
16568ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16569ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16570ac_compiler_gnu=$ac_cv_c_compiler_gnu
16571
3bc3d82a 16572
b835bb52 16573
f35d5ade
TT
16574# Check whether --enable-ubsan was given.
16575if test "${enable_ubsan+set}" = set; then :
16576 enableval=$enable_ubsan;
16577else
eff98030 16578 enable_ubsan=no
f35d5ade
TT
16579fi
16580
16581if test "x$enable_ubsan" = xauto; then
16582 if $development; then
16583 enable_ubsan=yes
16584 fi
16585fi
16586ac_ext=cpp
16587ac_cpp='$CXXCPP $CPPFLAGS'
16588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16591
16592if test "x$enable_ubsan" = xyes; then
16593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16594$as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16595 saved_CXXFLAGS="$CXXFLAGS"
16596 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16598/* end confdefs.h. */
16599
16600int
16601main ()
16602{
16603
16604 ;
16605 return 0;
16606}
16607_ACEOF
16608if ac_fn_cxx_try_link "$LINENO"; then :
16609 enable_ubsan=yes
16610else
16611 enable_ubsan=no
16612fi
16613rm -f core conftest.err conftest.$ac_objext \
16614 conftest$ac_exeext conftest.$ac_ext
16615 CXXFLAGS="$saved_CXXFLAGS"
16616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16617$as_echo "$enable_ubsan" >&6; }
16618 if test "x$enable_ubsan" = xyes; then
16619 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16620 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16621 fi
16622fi
16623ac_ext=c
16624ac_cpp='$CPP $CPPFLAGS'
16625ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16626ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16627ac_compiler_gnu=$ac_cv_c_compiler_gnu
16628
16629
16630
7a292a7a 16631# In the Cygwin environment, we need some additional flags.
81ecdfbb
RW
16632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16633$as_echo_n "checking for cygwin... " >&6; }
d0ac1c44 16634if ${gdb_cv_os_cygwin+:} false; then :
81ecdfbb 16635 $as_echo_n "(cached) " >&6
bec39cab 16636else
81ecdfbb 16637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 16638/* end confdefs.h. */
7a292a7a
SS
16639
16640#if defined (__CYGWIN__) || defined (__CYGWIN32__)
16641lose
16642#endif
bec39cab 16643_ACEOF
7a292a7a 16644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
92a021de 16645 $EGREP "^lose$" >/dev/null 2>&1; then :
7a292a7a
SS
16646 gdb_cv_os_cygwin=yes
16647else
7a292a7a
SS
16648 gdb_cv_os_cygwin=no
16649fi
16650rm -f conftest*
16651
16652fi
81ecdfbb
RW
16653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16654$as_echo "$gdb_cv_os_cygwin" >&6; }
7a292a7a 16655
aff38e61 16656
3eb25fda 16657SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 16658case ${host} in
95cbc983
AC
16659 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16660 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 16661 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
c1168a2f 16662 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
aff38e61
AC
16663esac
16664
16665
cd0fc7c3
SS
16666# libreadline needs libuser32.a in a cygwin environment
16667WIN32LIBS=
0ad6b8ee 16668if test x"$gdb_cv_os_cygwin" = xyes; then
c5394b80
JM
16669 WIN32LIBS="-luser32"
16670 case "${target}" in
16671 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16672 ;;
16673 esac
cd0fc7c3 16674fi
c906108c 16675
b4505029 16676# The ser-tcp.c module requires sockets.
b2ceabe8
TT
16677# Note that WIN32APILIBS is set by GDB_AC_COMMON.
16678WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
7a292a7a 16679
31d99776 16680# Add ELF support to GDB, but only if BFD includes ELF support.
def63ff0
TT
16681
16682 OLD_CFLAGS=$CFLAGS
16683 OLD_LDFLAGS=$LDFLAGS
16684 OLD_LIBS=$LIBS
16685 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16686 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16687 # always want our bfd.
16688 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16689 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16690 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
def63ff0 16691 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16692 LIBS="-lbfd -liberty -lz $intl $LIBS"
def63ff0 16693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
81ecdfbb 16694$as_echo_n "checking for ELF support in BFD... " >&6; }
d0ac1c44 16695if ${gdb_cv_var_elf+:} false; then :
81ecdfbb 16696 $as_echo_n "(cached) " >&6
31d99776 16697else
81ecdfbb 16698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31d99776
DJ
16699/* end confdefs.h. */
16700#include <stdlib.h>
def63ff0
TT
16701 #include "bfd.h"
16702 #include "elf-bfd.h"
31d99776
DJ
16703
16704int
16705main ()
16706{
def63ff0 16707return bfd_get_elf_phdr_upper_bound (NULL);
31d99776
DJ
16708 ;
16709 return 0;
16710}
16711_ACEOF
81ecdfbb 16712if ac_fn_c_try_link "$LINENO"; then :
31d99776
DJ
16713 gdb_cv_var_elf=yes
16714else
81ecdfbb 16715 gdb_cv_var_elf=no
31d99776 16716fi
81ecdfbb
RW
16717rm -f core conftest.err conftest.$ac_objext \
16718 conftest$ac_exeext conftest.$ac_ext
31d99776 16719fi
81ecdfbb
RW
16720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16721$as_echo "$gdb_cv_var_elf" >&6; }
def63ff0
TT
16722 CFLAGS=$OLD_CFLAGS
16723 LDFLAGS=$OLD_LDFLAGS
16724 LIBS=$OLD_LIBS
0ad6b8ee 16725if test "$gdb_cv_var_elf" = yes; then
d4777acb 16726 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
31d99776 16727
81ecdfbb 16728$as_echo "#define HAVE_ELF 1" >>confdefs.h
31d99776 16729
075ff26d
JK
16730 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16731 if test "$plugins" = "yes"; then
a48b32c0
L
16732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16733$as_echo_n "checking for library containing dlopen... " >&6; }
d0ac1c44 16734if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16735 $as_echo_n "(cached) " >&6
16736else
16737 ac_func_search_save_LIBS=$LIBS
16738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16739/* end confdefs.h. */
16740
16741/* Override any GCC internal prototype to avoid an error.
16742 Use char because int might match the return type of a GCC
16743 builtin and then its argument prototype would still apply. */
16744#ifdef __cplusplus
16745extern "C"
16746#endif
16747char dlopen ();
16748int
16749main ()
16750{
16751return dlopen ();
16752 ;
16753 return 0;
16754}
16755_ACEOF
16756for ac_lib in '' dl; do
16757 if test -z "$ac_lib"; then
16758 ac_res="none required"
16759 else
16760 ac_res=-l$ac_lib
16761 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16762 fi
16763 if ac_fn_c_try_link "$LINENO"; then :
16764 ac_cv_search_dlopen=$ac_res
16765fi
16766rm -f core conftest.err conftest.$ac_objext \
16767 conftest$ac_exeext
d0ac1c44 16768 if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16769 break
16770fi
16771done
d0ac1c44 16772if ${ac_cv_search_dlopen+:} false; then :
a48b32c0
L
16773
16774else
16775 ac_cv_search_dlopen=no
16776fi
16777rm conftest.$ac_ext
16778LIBS=$ac_func_search_save_LIBS
16779fi
16780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16781$as_echo "$ac_cv_search_dlopen" >&6; }
16782ac_res=$ac_cv_search_dlopen
16783if test "$ac_res" != no; then :
16784 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16785
16786fi
16787
075ff26d 16788 fi
31d99776 16789fi
31d99776 16790
4f05add4
TT
16791# Add macho support to GDB, but only if BFD includes it.
16792
16793 OLD_CFLAGS=$CFLAGS
16794 OLD_LDFLAGS=$LDFLAGS
16795 OLD_LIBS=$LIBS
16796 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16797 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16798 # always want our bfd.
16799 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
5a2d4533
L
16800 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16801 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
4f05add4 16802 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
711a72d3 16803 LIBS="-lbfd -liberty -lz $intl $LIBS"
4f05add4
TT
16804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16805$as_echo_n "checking for Mach-O support in BFD... " >&6; }
d0ac1c44 16806if ${gdb_cv_var_macho+:} false; then :
4f05add4
TT
16807 $as_echo_n "(cached) " >&6
16808else
16809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16810/* end confdefs.h. */
16811#include <stdlib.h>
16812 #include "bfd.h"
16813 #include "mach-o.h"
16814
16815int
16816main ()
16817{
16818return bfd_mach_o_lookup_command (NULL, 0, NULL);
16819 ;
16820 return 0;
16821}
16822_ACEOF
16823if ac_fn_c_try_link "$LINENO"; then :
16824 gdb_cv_var_macho=yes
16825else
16826 gdb_cv_var_macho=no
16827fi
16828rm -f core conftest.err conftest.$ac_objext \
16829 conftest$ac_exeext conftest.$ac_ext
16830fi
16831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16832$as_echo "$gdb_cv_var_macho" >&6; }
16833 CFLAGS=$OLD_CFLAGS
16834 LDFLAGS=$OLD_LDFLAGS
16835 LIBS=$OLD_LIBS
0ad6b8ee 16836if test "$gdb_cv_var_macho" = yes; then
4f05add4
TT
16837 CONFIG_OBS="$CONFIG_OBS machoread.o"
16838fi
16839
121ce6e5
DJ
16840# Add any host-specific objects to GDB.
16841CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16842
608e2dbb 16843# If building on ELF, look for lzma support for embedded compressed debug info.
0ad6b8ee 16844if test "$gdb_cv_var_elf" = yes; then
608e2dbb
TT
16845
16846# Check whether --with-lzma was given.
16847if test "${with_lzma+set}" = set; then :
16848 withval=$with_lzma;
16849else
16850 with_lzma=auto
16851fi
16852
16853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16854$as_echo_n "checking whether to use lzma... " >&6; }
16855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16856$as_echo "$with_lzma" >&6; }
16857
16858 if test "${with_lzma}" != no; then
16859
16860
16861
16862
16863
16864
16865
16866
16867 use_additional=yes
16868
16869 acl_save_prefix="$prefix"
16870 prefix="$acl_final_prefix"
16871 acl_save_exec_prefix="$exec_prefix"
16872 exec_prefix="$acl_final_exec_prefix"
16873
16874 eval additional_includedir=\"$includedir\"
16875 eval additional_libdir=\"$libdir\"
16876
16877 exec_prefix="$acl_save_exec_prefix"
16878 prefix="$acl_save_prefix"
16879
16880
16881# Check whether --with-liblzma-prefix was given.
16882if test "${with_liblzma_prefix+set}" = set; then :
16883 withval=$with_liblzma_prefix;
16884 if test "X$withval" = "Xno"; then
16885 use_additional=no
16886 else
16887 if test "X$withval" = "X"; then
16888
16889 acl_save_prefix="$prefix"
16890 prefix="$acl_final_prefix"
16891 acl_save_exec_prefix="$exec_prefix"
16892 exec_prefix="$acl_final_exec_prefix"
16893
16894 eval additional_includedir=\"$includedir\"
16895 eval additional_libdir=\"$libdir\"
16896
16897 exec_prefix="$acl_save_exec_prefix"
16898 prefix="$acl_save_prefix"
16899
16900 else
16901 additional_includedir="$withval/include"
16902 additional_libdir="$withval/lib"
16903 fi
16904 fi
16905
16906fi
16907
9f1528a1
AB
16908
16909# Check whether --with-liblzma-type was given.
16910if test "${with_liblzma_type+set}" = set; then :
16911 withval=$with_liblzma_type; with_liblzma_type=$withval
16912else
16913 with_liblzma_type=auto
16914fi
16915
16916 lib_type=`eval echo \$with_liblzma_type`
16917
608e2dbb
TT
16918 LIBLZMA=
16919 LTLIBLZMA=
16920 INCLZMA=
16921 rpathdirs=
16922 ltrpathdirs=
16923 names_already_handled=
16924 names_next_round='lzma '
16925 while test -n "$names_next_round"; do
16926 names_this_round="$names_next_round"
16927 names_next_round=
16928 for name in $names_this_round; do
16929 already_handled=
16930 for n in $names_already_handled; do
16931 if test "$n" = "$name"; then
16932 already_handled=yes
16933 break
16934 fi
16935 done
16936 if test -z "$already_handled"; then
16937 names_already_handled="$names_already_handled $name"
16938 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16939 eval value=\"\$HAVE_LIB$uppername\"
16940 if test -n "$value"; then
16941 if test "$value" = yes; then
16942 eval value=\"\$LIB$uppername\"
16943 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16944 eval value=\"\$LTLIB$uppername\"
16945 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16946 else
16947 :
16948 fi
16949 else
16950 found_dir=
16951 found_la=
16952 found_so=
16953 found_a=
16954 if test $use_additional = yes; then
9f1528a1 16955 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
16956 found_dir="$additional_libdir"
16957 found_so="$additional_libdir/lib$name.$shlibext"
16958 if test -f "$additional_libdir/lib$name.la"; then
16959 found_la="$additional_libdir/lib$name.la"
16960 fi
9f1528a1 16961 elif test x$lib_type != xshared; then
608e2dbb
TT
16962 if test -f "$additional_libdir/lib$name.$libext"; then
16963 found_dir="$additional_libdir"
16964 found_a="$additional_libdir/lib$name.$libext"
16965 if test -f "$additional_libdir/lib$name.la"; then
16966 found_la="$additional_libdir/lib$name.la"
16967 fi
16968 fi
16969 fi
16970 fi
16971 if test "X$found_dir" = "X"; then
16972 for x in $LDFLAGS $LTLIBLZMA; do
16973
16974 acl_save_prefix="$prefix"
16975 prefix="$acl_final_prefix"
16976 acl_save_exec_prefix="$exec_prefix"
16977 exec_prefix="$acl_final_exec_prefix"
16978 eval x=\"$x\"
16979 exec_prefix="$acl_save_exec_prefix"
16980 prefix="$acl_save_prefix"
16981
16982 case "$x" in
16983 -L*)
16984 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 16985 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
608e2dbb
TT
16986 found_dir="$dir"
16987 found_so="$dir/lib$name.$shlibext"
16988 if test -f "$dir/lib$name.la"; then
16989 found_la="$dir/lib$name.la"
16990 fi
9f1528a1 16991 elif test x$lib_type != xshared; then
608e2dbb
TT
16992 if test -f "$dir/lib$name.$libext"; then
16993 found_dir="$dir"
16994 found_a="$dir/lib$name.$libext"
16995 if test -f "$dir/lib$name.la"; then
16996 found_la="$dir/lib$name.la"
16997 fi
16998 fi
16999 fi
17000 ;;
17001 esac
17002 if test "X$found_dir" != "X"; then
17003 break
17004 fi
17005 done
17006 fi
17007 if test "X$found_dir" != "X"; then
17008 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17009 if test "X$found_so" != "X"; then
17010 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17011 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17012 else
17013 haveit=
17014 for x in $ltrpathdirs; do
17015 if test "X$x" = "X$found_dir"; then
17016 haveit=yes
17017 break
17018 fi
17019 done
17020 if test -z "$haveit"; then
17021 ltrpathdirs="$ltrpathdirs $found_dir"
17022 fi
17023 if test "$hardcode_direct" = yes; then
17024 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17025 else
17026 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17027 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17028 haveit=
17029 for x in $rpathdirs; do
17030 if test "X$x" = "X$found_dir"; then
17031 haveit=yes
17032 break
17033 fi
17034 done
17035 if test -z "$haveit"; then
17036 rpathdirs="$rpathdirs $found_dir"
17037 fi
17038 else
17039 haveit=
17040 for x in $LDFLAGS $LIBLZMA; do
17041
17042 acl_save_prefix="$prefix"
17043 prefix="$acl_final_prefix"
17044 acl_save_exec_prefix="$exec_prefix"
17045 exec_prefix="$acl_final_exec_prefix"
17046 eval x=\"$x\"
17047 exec_prefix="$acl_save_exec_prefix"
17048 prefix="$acl_save_prefix"
17049
17050 if test "X$x" = "X-L$found_dir"; then
17051 haveit=yes
17052 break
17053 fi
17054 done
17055 if test -z "$haveit"; then
17056 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17057 fi
17058 if test "$hardcode_minus_L" != no; then
17059 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17060 else
17061 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17062 fi
17063 fi
17064 fi
17065 fi
17066 else
17067 if test "X$found_a" != "X"; then
17068 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17069 else
17070 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17071 fi
17072 fi
17073 additional_includedir=
17074 case "$found_dir" in
17075 */lib | */lib/)
17076 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17077 additional_includedir="$basedir/include"
17078 ;;
17079 esac
17080 if test "X$additional_includedir" != "X"; then
17081 if test "X$additional_includedir" != "X/usr/include"; then
17082 haveit=
17083 if test "X$additional_includedir" = "X/usr/local/include"; then
17084 if test -n "$GCC"; then
17085 case $host_os in
17086 linux*) haveit=yes;;
17087 esac
17088 fi
17089 fi
17090 if test -z "$haveit"; then
17091 for x in $CPPFLAGS $INCLZMA; do
17092
17093 acl_save_prefix="$prefix"
17094 prefix="$acl_final_prefix"
17095 acl_save_exec_prefix="$exec_prefix"
17096 exec_prefix="$acl_final_exec_prefix"
17097 eval x=\"$x\"
17098 exec_prefix="$acl_save_exec_prefix"
17099 prefix="$acl_save_prefix"
17100
17101 if test "X$x" = "X-I$additional_includedir"; then
17102 haveit=yes
17103 break
17104 fi
17105 done
17106 if test -z "$haveit"; then
17107 if test -d "$additional_includedir"; then
17108 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17109 fi
17110 fi
17111 fi
17112 fi
17113 fi
17114 if test -n "$found_la"; then
17115 save_libdir="$libdir"
17116 case "$found_la" in
17117 */* | *\\*) . "$found_la" ;;
17118 *) . "./$found_la" ;;
17119 esac
17120 libdir="$save_libdir"
17121 for dep in $dependency_libs; do
17122 case "$dep" in
17123 -L*)
17124 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17125 if test "X$additional_libdir" != "X/usr/lib"; then
17126 haveit=
17127 if test "X$additional_libdir" = "X/usr/local/lib"; then
17128 if test -n "$GCC"; then
17129 case $host_os in
17130 linux*) haveit=yes;;
17131 esac
17132 fi
17133 fi
17134 if test -z "$haveit"; then
17135 haveit=
17136 for x in $LDFLAGS $LIBLZMA; do
17137
17138 acl_save_prefix="$prefix"
17139 prefix="$acl_final_prefix"
17140 acl_save_exec_prefix="$exec_prefix"
17141 exec_prefix="$acl_final_exec_prefix"
17142 eval x=\"$x\"
17143 exec_prefix="$acl_save_exec_prefix"
17144 prefix="$acl_save_prefix"
17145
17146 if test "X$x" = "X-L$additional_libdir"; then
17147 haveit=yes
17148 break
17149 fi
17150 done
17151 if test -z "$haveit"; then
17152 if test -d "$additional_libdir"; then
17153 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17154 fi
17155 fi
17156 haveit=
17157 for x in $LDFLAGS $LTLIBLZMA; do
17158
17159 acl_save_prefix="$prefix"
17160 prefix="$acl_final_prefix"
17161 acl_save_exec_prefix="$exec_prefix"
17162 exec_prefix="$acl_final_exec_prefix"
17163 eval x=\"$x\"
17164 exec_prefix="$acl_save_exec_prefix"
17165 prefix="$acl_save_prefix"
17166
17167 if test "X$x" = "X-L$additional_libdir"; then
17168 haveit=yes
17169 break
17170 fi
17171 done
17172 if test -z "$haveit"; then
17173 if test -d "$additional_libdir"; then
17174 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17175 fi
17176 fi
17177 fi
17178 fi
17179 ;;
17180 -R*)
17181 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17182 if test "$enable_rpath" != no; then
17183 haveit=
17184 for x in $rpathdirs; do
17185 if test "X$x" = "X$dir"; then
17186 haveit=yes
17187 break
17188 fi
17189 done
17190 if test -z "$haveit"; then
17191 rpathdirs="$rpathdirs $dir"
17192 fi
17193 haveit=
17194 for x in $ltrpathdirs; do
17195 if test "X$x" = "X$dir"; then
17196 haveit=yes
17197 break
17198 fi
17199 done
17200 if test -z "$haveit"; then
17201 ltrpathdirs="$ltrpathdirs $dir"
17202 fi
17203 fi
17204 ;;
17205 -l*)
17206 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17207 ;;
17208 *.la)
17209 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17210 ;;
17211 *)
17212 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17213 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17214 ;;
17215 esac
17216 done
17217 fi
17218 else
9f1528a1
AB
17219 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17220 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17221 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17222 else
17223 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17224 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17225 fi
608e2dbb
TT
17226 fi
17227 fi
17228 fi
17229 done
17230 done
17231 if test "X$rpathdirs" != "X"; then
17232 if test -n "$hardcode_libdir_separator"; then
17233 alldirs=
17234 for found_dir in $rpathdirs; do
17235 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17236 done
17237 acl_save_libdir="$libdir"
17238 libdir="$alldirs"
17239 eval flag=\"$hardcode_libdir_flag_spec\"
17240 libdir="$acl_save_libdir"
17241 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17242 else
17243 for found_dir in $rpathdirs; do
17244 acl_save_libdir="$libdir"
17245 libdir="$found_dir"
17246 eval flag=\"$hardcode_libdir_flag_spec\"
17247 libdir="$acl_save_libdir"
17248 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17249 done
17250 fi
17251 fi
17252 if test "X$ltrpathdirs" != "X"; then
17253 for found_dir in $ltrpathdirs; do
17254 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17255 done
17256 fi
17257
17258
17259 ac_save_CPPFLAGS="$CPPFLAGS"
17260
17261 for element in $INCLZMA; do
17262 haveit=
17263 for x in $CPPFLAGS; do
17264
17265 acl_save_prefix="$prefix"
17266 prefix="$acl_final_prefix"
17267 acl_save_exec_prefix="$exec_prefix"
17268 exec_prefix="$acl_final_exec_prefix"
17269 eval x=\"$x\"
17270 exec_prefix="$acl_save_exec_prefix"
17271 prefix="$acl_save_prefix"
17272
17273 if test "X$x" = "X$element"; then
17274 haveit=yes
17275 break
17276 fi
17277 done
17278 if test -z "$haveit"; then
17279 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17280 fi
17281 done
17282
17283
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17285$as_echo_n "checking for liblzma... " >&6; }
d0ac1c44 17286if ${ac_cv_liblzma+:} false; then :
608e2dbb
TT
17287 $as_echo_n "(cached) " >&6
17288else
17289
17290 ac_save_LIBS="$LIBS"
17291 LIBS="$LIBS $LIBLZMA"
17292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17293/* end confdefs.h. */
17294#include "lzma.h"
17295int
17296main ()
17297{
17298lzma_index_iter iter;
17299 lzma_index_iter_init (&iter, 0);
17300 lzma_mf_is_supported (LZMA_MF_HC3);
17301 ;
17302 return 0;
17303}
17304_ACEOF
17305if ac_fn_c_try_link "$LINENO"; then :
17306 ac_cv_liblzma=yes
17307else
17308 ac_cv_liblzma=no
17309fi
17310rm -f core conftest.err conftest.$ac_objext \
17311 conftest$ac_exeext conftest.$ac_ext
17312 LIBS="$ac_save_LIBS"
17313
17314fi
17315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17316$as_echo "$ac_cv_liblzma" >&6; }
17317 if test "$ac_cv_liblzma" = yes; then
17318 HAVE_LIBLZMA=yes
17319
17320$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17321
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17323$as_echo_n "checking how to link with liblzma... " >&6; }
17324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17325$as_echo "$LIBLZMA" >&6; }
17326 else
17327 HAVE_LIBLZMA=no
17328 CPPFLAGS="$ac_save_CPPFLAGS"
17329 LIBLZMA=
17330 LTLIBLZMA=
17331 fi
17332
17333
17334
17335
17336
17337
17338 if test "$HAVE_LIBLZMA" != yes; then
17339 if test "$with_lzma" = yes; then
d0ac1c44 17340 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
608e2dbb
TT
17341 fi
17342 fi
17343 fi
17344fi
17345
3fc11d3e
JM
17346LIBGUI="../libgui/src/libgui.a"
17347GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17348
17349
7a292a7a 17350
3fc11d3e
JM
17351WIN32LDAPP=
17352
17353
17354
d91670b9 17355case "${host}" in
686a5eed 17356*-*-cygwin* | *-*-mingw* )
d91670b9
CV
17357 configdir="win"
17358 ;;
17359*)
17360 configdir="unix"
17361 ;;
17362esac
3fc11d3e
JM
17363
17364GDBTKLIBS=
17365if test "${enable_gdbtk}" = "yes"; then
17366
d1c3b63a
KS
17367 # Gdbtk must have an absolute path to srcdir in order to run
17368 # properly when not installed.
17369 here=`pwd`
17370 cd ${srcdir}
17371 GDBTK_SRC_DIR=`pwd`
17372 cd $here
17373
bec39cab 17374
5062cc19
KS
17375 #
17376 # Ok, lets find the tcl configuration
17377 # First, look for one uninstalled.
17378 # the alternative search directory is invoked by --with-tcl
17379 #
3fc11d3e 17380
5062cc19
KS
17381 if test x"${no_tcl}" = x ; then
17382 # we reset no_tcl in case something fails here
17383 no_tcl=true
bec39cab 17384
81ecdfbb
RW
17385# Check whether --with-tcl was given.
17386if test "${with_tcl+set}" = set; then :
17387 withval=$with_tcl; with_tclconfig=${withval}
17388fi
17389
17390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17391$as_echo_n "checking for Tcl configuration... " >&6; }
d0ac1c44 17392 if ${ac_cv_c_tclconfig+:} false; then :
81ecdfbb 17393 $as_echo_n "(cached) " >&6
3fc11d3e 17394else
bec39cab 17395
3fc11d3e 17396
5062cc19
KS
17397 # First check to see if --with-tcl was specified.
17398 case "${host}" in
17399 *-*-cygwin*) platDir="win" ;;
17400 *) platDir="unix" ;;
17401 esac
17402 if test x"${with_tclconfig}" != x ; then
17403 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17404 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17405 else
d0ac1c44 17406 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
5062cc19
KS
17407 fi
17408 fi
17409
17410 # then check for a private Tcl installation
17411 if test x"${ac_cv_c_tclconfig}" = x ; then
17412 for i in \
17413 ../tcl \
17414 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17415 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17416 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17417 ../../tcl \
17418 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17419 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17420 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17421 ../../../tcl \
17422 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17423 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17424 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17425 if test -f "$i/$platDir/tclConfig.sh" ; then
17426 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17427 break
17428 fi
17429 done
17430 fi
17431
17432 # on Darwin, check in Framework installation locations
17433 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17434 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17435 `ls -d /Library/Frameworks 2>/dev/null` \
17436 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17437 `ls -d /System/Library/Frameworks 2>/dev/null` \
17438 ; do
17439 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17440 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17441 break
17442 fi
17443 done
17444 fi
17445
17446 # check in a few common install locations
17447 if test x"${ac_cv_c_tclconfig}" = x ; then
17448 for i in `ls -d ${libdir} 2>/dev/null` \
17449 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17450 `ls -d ${prefix}/lib 2>/dev/null` \
17451 `ls -d /usr/local/lib 2>/dev/null` \
17452 `ls -d /usr/contrib/lib 2>/dev/null` \
17453 `ls -d /usr/lib 2>/dev/null` \
17454 ; do
17455 if test -f "$i/tclConfig.sh" ; then
17456 ac_cv_c_tclconfig=`(cd $i; pwd)`
17457 break
17458 fi
17459 done
17460 fi
3fc11d3e 17461
5062cc19
KS
17462 # check in a few other private locations
17463 if test x"${ac_cv_c_tclconfig}" = x ; then
17464 for i in \
17465 ${srcdir}/../tcl \
17466 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17467 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17468 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17469 if test -f "$i/$platDir/tclConfig.sh" ; then
17470 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17471 break
17472 fi
17473 done
17474 fi
bec39cab 17475
3fc11d3e
JM
17476fi
17477
5062cc19
KS
17478
17479 if test x"${ac_cv_c_tclconfig}" = x ; then
17480 TCL_BIN_DIR="# no Tcl configs found"
81ecdfbb
RW
17481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17482$as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
17483 else
17484 no_tcl=
17485 TCL_BIN_DIR=${ac_cv_c_tclconfig}
81ecdfbb
RW
17486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17487$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
5062cc19
KS
17488 fi
17489 fi
3fc11d3e 17490
bec39cab 17491
85541719
DE
17492 # If $no_tk is nonempty, then we can't do Tk, and there is no
17493 # point to doing Tcl.
bec39cab 17494
5062cc19
KS
17495 #
17496 # Ok, lets find the tk configuration
17497 # First, look for one uninstalled.
17498 # the alternative search directory is invoked by --with-tk
17499 #
3fc11d3e 17500
5062cc19
KS
17501 if test x"${no_tk}" = x ; then
17502 # we reset no_tk in case something fails here
17503 no_tk=true
bec39cab 17504
81ecdfbb
RW
17505# Check whether --with-tk was given.
17506if test "${with_tk+set}" = set; then :
17507 withval=$with_tk; with_tkconfig=${withval}
17508fi
17509
17510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17511$as_echo_n "checking for Tk configuration... " >&6; }
d0ac1c44 17512 if ${ac_cv_c_tkconfig+:} false; then :
81ecdfbb 17513 $as_echo_n "(cached) " >&6
bec39cab 17514else
3fc11d3e
JM
17515
17516
5062cc19
KS
17517 # First check to see if --with-tkconfig was specified.
17518 if test x"${with_tkconfig}" != x ; then
17519 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17520 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17521 else
d0ac1c44 17522 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
5062cc19
KS
17523 fi
17524 fi
3fc11d3e 17525
5062cc19
KS
17526 # then check for a private Tk library
17527 case "${host}" in
17528 *-*-cygwin*) platDir="win" ;;
17529 *) platDir="unix" ;;
17530 esac
17531 if test x"${ac_cv_c_tkconfig}" = x ; then
17532 for i in \
17533 ../tk \
17534 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17535 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17536 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17537 ../../tk \
17538 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17539 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17540 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17541 ../../../tk \
17542 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17543 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17544 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17545 if test -f "$i/$platDir/tkConfig.sh" ; then
17546 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17547 break
17548 fi
17549 done
17550 fi
17551
17552 # on Darwin, check in Framework installation locations
17553 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17554 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17555 `ls -d /Library/Frameworks 2>/dev/null` \
17556 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17557 `ls -d /System/Library/Frameworks 2>/dev/null` \
17558 ; do
17559 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17560 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17561 break
17562 fi
17563 done
17564 fi
17565
17566 # check in a few common install locations
17567 if test x"${ac_cv_c_tkconfig}" = x ; then
17568 for i in `ls -d ${libdir} 2>/dev/null` \
17569 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17570 `ls -d ${prefix}/lib 2>/dev/null` \
17571 `ls -d /usr/local/lib 2>/dev/null` \
17572 `ls -d /usr/contrib/lib 2>/dev/null` \
17573 `ls -d /usr/lib 2>/dev/null` \
17574 ; do
17575 if test -f "$i/tkConfig.sh" ; then
17576 ac_cv_c_tkconfig=`(cd $i; pwd)`
17577 break
17578 fi
17579 done
17580 fi
17581 # check in a few other private locations
17582 if test x"${ac_cv_c_tkconfig}" = x ; then
17583 for i in \
17584 ${srcdir}/../tk \
17585 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17586 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17587 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17588 if test -f "$i/$platDir/tkConfig.sh" ; then
17589 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17590 break
17591 fi
17592 done
17593 fi
3fc11d3e 17594
3fc11d3e
JM
17595fi
17596
17597
5062cc19
KS
17598 if test x"${ac_cv_c_tkconfig}" = x ; then
17599 TK_BIN_DIR="# no Tk configs found"
81ecdfbb
RW
17600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17601$as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
17602 else
17603 no_tk=
17604 TK_BIN_DIR=${ac_cv_c_tkconfig}
81ecdfbb
RW
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17606$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
5062cc19 17607 fi
3fc11d3e 17608 fi
dd2504ab 17609
dd2504ab 17610
85541719
DE
17611 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17612
81ecdfbb
RW
17613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17614$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
85541719
DE
17615
17616 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
81ecdfbb
RW
17617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17618$as_echo "loading" >&6; }
85541719
DE
17619 . ${TCL_BIN_DIR}/tclConfig.sh
17620 else
81ecdfbb
RW
17621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17622$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
85541719
DE
17623 fi
17624
17625 # eval is required to do the TCL_DBGX substitution
17626 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17627 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17628
17629 # If the TCL_BIN_DIR is the build directory (not the install directory),
17630 # then set the common variable name to the value of the build variables.
17631 # For example, the variable TCL_LIB_SPEC will be set to the value
17632 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17633 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17634 # installed and uninstalled version of Tcl.
17635 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17636 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17637 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17638 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17639 elif test "`uname -s`" = "Darwin"; then
17640 # If Tcl was built as a framework, attempt to use the libraries
17641 # from the framework at the given location so that linking works
a68ffae9 17642 # against Tcl.framework installed in an arbitrary location.
85541719
DE
17643 case ${TCL_DEFS} in
17644 *TCL_FRAMEWORK*)
17645 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17646 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17647 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17648 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17649 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17650 break
17651 fi
17652 done
17653 fi
17654 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17655 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17656 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17657 fi
17658 ;;
17659 esac
17660 fi
17661
17662 # eval is required to do the TCL_DBGX substitution
17663 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17664 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17665 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17666 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682 # Check for in-tree tcl
17683 here=`pwd`
17684 cd ${srcdir}/..
17685 topdir=`pwd`
17686 cd ${here}
17687
17688 intree="no"
17689 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17690 intree="yes"
17691 fi
17692
17693 # Find Tcl private headers
17694 if test x"${intree}" = xno; then
17695
81ecdfbb
RW
17696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17697$as_echo_n "checking for Tcl private headers... " >&6; }
85541719
DE
17698 private_dir=""
17699 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17700 if test -f ${dir}/tclInt.h ; then
17701 private_dir=${dir}
17702 fi
17703
17704 if test x"${private_dir}" = x; then
d0ac1c44 17705 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
85541719
DE
17706 else
17707 TCL_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17709$as_echo "${private_dir}" >&6; }
85541719
DE
17710 fi
17711
17712 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17713 TCL_LIBRARY="${TCL_LIB_SPEC}"
17714 TCL_DEPS=""
17715 else
17716 # If building tcl in the same src tree, private headers
17717 # are not needed, but we need to be sure to use the right
17718 # headers library
17719 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17720 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17721 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17722 fi
17723
17724
17725
17726
17727
81ecdfbb
RW
17728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17729$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
dd2504ab 17730
5062cc19 17731 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
81ecdfbb
RW
17732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17733$as_echo "loading" >&6; }
5062cc19 17734 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 17735 else
81ecdfbb
RW
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17737$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3fc11d3e 17738 fi
bec39cab 17739
5062cc19
KS
17740 # eval is required to do the TK_DBGX substitution
17741 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17742 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17743
17744 # If the TK_BIN_DIR is the build directory (not the install directory),
17745 # then set the common variable name to the value of the build variables.
17746 # For example, the variable TK_LIB_SPEC will be set to the value
17747 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17748 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17749 # installed and uninstalled version of Tcl.
85541719 17750 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
17751 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17752 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17753 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17754 elif test "`uname -s`" = "Darwin"; then
17755 # If Tk was built as a framework, attempt to use the libraries
17756 # from the framework at the given location so that linking works
a68ffae9 17757 # against Tk.framework installed in an arbitrary location.
5062cc19
KS
17758 case ${TK_DEFS} in
17759 *TK_FRAMEWORK*)
85541719 17760 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
17761 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17762 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17763 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17764 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17765 break
17766 fi
17767 done
17768 fi
85541719 17769 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
17770 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17771 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17772 fi
17773 ;;
17774 esac
3fc11d3e
JM
17775 fi
17776
5062cc19
KS
17777 # eval is required to do the TK_DBGX substitution
17778 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17779 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17780 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17781 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 17782
3fc11d3e
JM
17783
17784
bec39cab
AC
17785
17786
17787
17788
17789
17790
17791
3fc11d3e 17792
3fc11d3e 17793
bec39cab 17794
bec39cab 17795
85541719
DE
17796 # Check for in-tree Tk
17797 intree="no"
17798 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17799 intree="yes"
17800 fi
3fc11d3e 17801
85541719
DE
17802 # Find Tk private headers
17803 if test x"${intree}" = xno; then
3fc11d3e 17804
81ecdfbb
RW
17805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17806$as_echo_n "checking for Tk private headers... " >&6; }
5062cc19
KS
17807 private_dir=""
17808 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17809 if test -f ${dir}/tkInt.h; then
17810 private_dir=${dir}
3fc11d3e 17811 fi
bec39cab 17812
5062cc19 17813 if test x"${private_dir}" = x; then
d0ac1c44 17814 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
3fc11d3e 17815 else
5062cc19 17816 TK_PRIVATE_INCLUDE="-I${private_dir}"
81ecdfbb
RW
17817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17818$as_echo "${private_dir}" >&6; }
3fc11d3e 17819 fi
3fc11d3e 17820
85541719
DE
17821 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17822 TK_LIBRARY=${TK_LIB_SPEC}
17823 TK_DEPS=""
17824 else
17825 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17826 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17827 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17828 fi
3fc11d3e
JM
17829
17830
3fc11d3e
JM
17831
17832
3fc11d3e 17833
85541719 17834 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 17835
85541719
DE
17836 # Include some libraries that Tcl and Tk want.
17837 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17838 # Yes, the ordering seems wrong here. But it isn't.
17839 # TK_LIBS is the list of libraries that need to be linked
17840 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17841 # were in LIBS then any link tests after this point would
17842 # try to include things like `$(LIBGUI)', which wouldn't work.
17843 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 17844
85541719
DE
17845 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17846 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17847 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17848 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17849 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17850 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17851 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 17852
0ad6b8ee 17853 if test x"$gdb_cv_os_cygwin" = xyes; then
85541719
DE
17854 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17855 WIN32LDAPP="-Wl,--subsystem,console"
17856 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 17857 fi
ffc6a242 17858
81ecdfbb 17859 subdirs="$subdirs gdbtk"
3ace7edb 17860
85541719 17861 fi
3fc11d3e
JM
17862fi
17863
17864
17865
17866
17867
17868
17869
17870
81ecdfbb
RW
17871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17872$as_echo_n "checking for X... " >&6; }
bec39cab 17873
c906108c 17874
81ecdfbb
RW
17875# Check whether --with-x was given.
17876if test "${with_x+set}" = set; then :
17877 withval=$with_x;
17878fi
c906108c
SS
17879
17880# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17881if test "x$with_x" = xno; then
17882 # The user explicitly disabled X.
17883 have_x=disabled
17884else
81ecdfbb 17885 case $x_includes,$x_libraries in #(
d0ac1c44
SM
17886 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17887 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
81ecdfbb 17888 $as_echo_n "(cached) " >&6
c906108c
SS
17889else
17890 # One or both of the vars are not set, and there is no cached value.
bec39cab 17891ac_x_includes=no ac_x_libraries=no
81ecdfbb 17892rm -f -r conftest.dir
bec39cab
AC
17893if mkdir conftest.dir; then
17894 cd conftest.dir
bec39cab 17895 cat >Imakefile <<'_ACEOF'
81ecdfbb
RW
17896incroot:
17897 @echo incroot='${INCROOT}'
17898usrlibdir:
17899 @echo usrlibdir='${USRLIBDIR}'
17900libdir:
17901 @echo libdir='${LIBDIR}'
17902_ACEOF
17903 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
d0ac1c44 17904 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
81ecdfbb
RW
17905 for ac_var in incroot usrlibdir libdir; do
17906 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17907 done
c906108c 17908 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
81ecdfbb
RW
17909 for ac_extension in a so sl dylib la dll; do
17910 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17911 test -f "$ac_im_libdir/libX11.$ac_extension"; then
bec39cab 17912 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
17913 fi
17914 done
17915 # Screen out bogus values from the imake configuration. They are
17916 # bogus both because they are the default anyway, and because
17917 # using them would break gcc on systems where it needs fixed includes.
bec39cab 17918 case $ac_im_incroot in
81ecdfbb 17919 /usr/include) ac_x_includes= ;;
bec39cab 17920 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 17921 esac
bec39cab 17922 case $ac_im_usrlibdir in
81ecdfbb 17923 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
bec39cab 17924 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
17925 esac
17926 fi
17927 cd ..
81ecdfbb 17928 rm -f -r conftest.dir
c906108c
SS
17929fi
17930
bec39cab
AC
17931# Standard set of common directories for X headers.
17932# Check X11 before X11Rn because it is often a symlink to the current release.
17933ac_x_header_dirs='
17934/usr/X11/include
81ecdfbb 17935/usr/X11R7/include
bec39cab
AC
17936/usr/X11R6/include
17937/usr/X11R5/include
17938/usr/X11R4/include
17939
17940/usr/include/X11
81ecdfbb 17941/usr/include/X11R7
bec39cab
AC
17942/usr/include/X11R6
17943/usr/include/X11R5
17944/usr/include/X11R4
17945
17946/usr/local/X11/include
81ecdfbb 17947/usr/local/X11R7/include
bec39cab
AC
17948/usr/local/X11R6/include
17949/usr/local/X11R5/include
17950/usr/local/X11R4/include
17951
17952/usr/local/include/X11
81ecdfbb 17953/usr/local/include/X11R7
bec39cab
AC
17954/usr/local/include/X11R6
17955/usr/local/include/X11R5
17956/usr/local/include/X11R4
17957
17958/usr/X386/include
17959/usr/x386/include
17960/usr/XFree86/include/X11
17961
17962/usr/include
17963/usr/local/include
17964/usr/unsupported/include
17965/usr/athena/include
17966/usr/local/x11r5/include
17967/usr/lpp/Xamples/include
17968
17969/usr/openwin/include
17970/usr/openwin/share/include'
17971
17972if test "$ac_x_includes" = no; then
81ecdfbb 17973 # Guess where to find include files, by looking for Xlib.h.
c906108c 17974 # First, try using that file with no special directory specified.
81ecdfbb 17975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 17976/* end confdefs.h. */
81ecdfbb 17977#include <X11/Xlib.h>
bec39cab 17978_ACEOF
81ecdfbb 17979if ac_fn_c_try_cpp "$LINENO"; then :
c906108c
SS
17980 # We can compile using X headers with no special include directory.
17981ac_x_includes=
17982else
bec39cab 17983 for ac_dir in $ac_x_header_dirs; do
81ecdfbb 17984 if test -r "$ac_dir/X11/Xlib.h"; then
bec39cab
AC
17985 ac_x_includes=$ac_dir
17986 break
17987 fi
17988done
c906108c 17989fi
d0ac1c44 17990rm -f conftest.err conftest.i conftest.$ac_ext
bec39cab 17991fi # $ac_x_includes = no
c906108c 17992
bec39cab 17993if test "$ac_x_libraries" = no; then
c906108c 17994 # Check for the libraries.
c906108c
SS
17995 # See if we find them without any special options.
17996 # Don't add to $LIBS permanently.
bec39cab 17997 ac_save_LIBS=$LIBS
81ecdfbb
RW
17998 LIBS="-lX11 $LIBS"
17999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bec39cab 18000/* end confdefs.h. */
81ecdfbb 18001#include <X11/Xlib.h>
bec39cab
AC
18002int
18003main ()
18004{
81ecdfbb 18005XrmInitialize ()
bec39cab
AC
18006 ;
18007 return 0;
18008}
18009_ACEOF
81ecdfbb 18010if ac_fn_c_try_link "$LINENO"; then :
bec39cab 18011 LIBS=$ac_save_LIBS
c906108c
SS
18012# We can link X programs with no special library path.
18013ac_x_libraries=
18014else
81ecdfbb
RW
18015 LIBS=$ac_save_LIBS
18016for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 18017do
bec39cab 18018 # Don't even attempt the hair of trying to link an X program!
81ecdfbb
RW
18019 for ac_extension in a so sl dylib la dll; do
18020 if test -r "$ac_dir/libX11.$ac_extension"; then
c906108c
SS
18021 ac_x_libraries=$ac_dir
18022 break 2
18023 fi
18024 done
18025done
18026fi
81ecdfbb
RW
18027rm -f core conftest.err conftest.$ac_objext \
18028 conftest$ac_exeext conftest.$ac_ext
bec39cab 18029fi # $ac_x_libraries = no
c906108c 18030
81ecdfbb
RW
18031case $ac_x_includes,$ac_x_libraries in #(
18032 no,* | *,no | *\'*)
18033 # Didn't find X, or a directory has "'" in its name.
18034 ac_cv_have_x="have_x=no";; #(
18035 *)
18036 # Record where we found X for the cache.
18037 ac_cv_have_x="have_x=yes\
18038 ac_x_includes='$ac_x_includes'\
18039 ac_x_libraries='$ac_x_libraries'"
18040esac
c906108c 18041fi
81ecdfbb
RW
18042;; #(
18043 *) have_x=yes;;
18044 esac
c906108c
SS
18045 eval "$ac_cv_have_x"
18046fi # $with_x != no
18047
18048if test "$have_x" != yes; then
81ecdfbb
RW
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18050$as_echo "$have_x" >&6; }
c906108c
SS
18051 no_x=yes
18052else
18053 # If each of the values was on the command line, it overrides each guess.
18054 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18055 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18056 # Update the cache value to reflect the command line values.
81ecdfbb
RW
18057 ac_cv_have_x="have_x=yes\
18058 ac_x_includes='$x_includes'\
18059 ac_x_libraries='$x_libraries'"
18060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18061$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
c906108c
SS
18062fi
18063
18064
bec39cab 18065# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 18066# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
18067# This code just checks for a few cases where we'd like to ignore those
18068# definitions, even when they're present in the '.mt' file. These cases
18069# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 18070# not part of the source tree.
7a292a7a 18071#
81ecdfbb
RW
18072# Check whether --enable-sim was given.
18073if test "${enable_sim+set}" = set; then :
18074 enableval=$enable_sim; echo "enable_sim = $enable_sim";
7a292a7a
SS
18075 echo "enableval = ${enableval}";
18076 case "${enableval}" in
18077 yes) ignore_sim=false ;;
18078 no) ignore_sim=true ;;
18079 *) ignore_sim=false ;;
18080 esac
18081else
18082 ignore_sim=false
81ecdfbb
RW
18083fi
18084
7a292a7a
SS
18085
18086if test ! -d "${srcdir}/../sim"; then
18087 ignore_sim=true
18088fi
18089
9b624dbe
UW
18090SIM=
18091SIM_OBS=
18092if test "${ignore_sim}" = "false"; then
18093 if test x"${gdb_sim}" != x ; then
18094 SIM="${gdb_sim}"
18095 SIM_OBS="remote-sim.o"
60ca704f 18096
81ecdfbb 18097$as_echo "#define WITH_SIM 1" >>confdefs.h
7a292a7a 18098
976102cd
PA
18099
18100 # Some tdep code should only be compiled in when the ppc sim is
18101 # built. PR sim/13418.
18102 case $target in
18103 powerpc*-*-*)
18104
18105$as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18106
18107 ;;
18108 esac
9b624dbe 18109 fi
7a292a7a
SS
18110fi
18111
18112
18113
c906108c
SS
18114
18115
18116
18117
18118
18119
dfcd3bfb 18120
e56ac5c3
AC
18121
18122
b3a90332
AC
18123
18124
c35f4ffc 18125# List of host floatformats.
bec39cab
AC
18126
18127cat >>confdefs.h <<_ACEOF
c35f4ffc 18128#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 18129_ACEOF
c35f4ffc 18130
bec39cab
AC
18131
18132cat >>confdefs.h <<_ACEOF
c35f4ffc 18133#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
18134_ACEOF
18135
c35f4ffc 18136
bec39cab 18137cat >>confdefs.h <<_ACEOF
c35f4ffc 18138#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 18139_ACEOF
c35f4ffc
AC
18140
18141
c906108c
SS
18142# target_subdir is used by the testsuite to find the target libraries.
18143target_subdir=
18144if test "${host}" != "${target}"; then
18145 target_subdir="${target_alias}/"
18146fi
18147
18148
21ea5acd 18149# Import nat definitions.
2b351b19 18150nat_makefile_frag=/dev/null
771b4502 18151if test "${gdb_native}" = "yes"; then
21ea5acd
SDJ
18152 . ${srcdir}/configure.nat
18153 nativefile=$NAT_FILE
c906108c 18154fi
c906108c 18155
c906108c
SS
18156
18157
18158
21ea5acd
SDJ
18159
18160
18161
18162
18163
c906108c
SS
18164
18165
b00a8037 18166if test x"${gdb_osabi}" != x ; then
bec39cab
AC
18167
18168cat >>confdefs.h <<_ACEOF
b00a8037 18169#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 18170_ACEOF
b00a8037
DJ
18171
18172fi
18173
393fd4c3
YQ
18174# Check for babeltrace and babeltrace-ctf
18175
18176# Check whether --with-babeltrace was given.
18177if test "${with_babeltrace+set}" = set; then :
18178 withval=$with_babeltrace;
18179else
18180 with_babeltrace=auto
18181fi
18182
18183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18184$as_echo_n "checking whether to use babeltrace... " >&6; }
18185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18186$as_echo "$with_babeltrace" >&6; }
18187
18188if test "x$with_babeltrace" = "xno"; then
18189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18190$as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18191else
18192 # Append -Werror to CFLAGS so that configure can catch the warning
18193 # "assignment from incompatible pointer type", which is related to
18194 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18195 # in GDB, while babeltrace 1.0.3 is broken.
18196 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18197 # safe to save and restore CFLAGS here.
18198 saved_CFLAGS=$CFLAGS
18199 CFLAGS="$CFLAGS -Werror"
18200
18201
18202
18203
18204
18205
18206
18207
18208 use_additional=yes
18209
18210 acl_save_prefix="$prefix"
18211 prefix="$acl_final_prefix"
18212 acl_save_exec_prefix="$exec_prefix"
18213 exec_prefix="$acl_final_exec_prefix"
18214
18215 eval additional_includedir=\"$includedir\"
18216 eval additional_libdir=\"$libdir\"
18217
18218 exec_prefix="$acl_save_exec_prefix"
18219 prefix="$acl_save_prefix"
18220
18221
18222# Check whether --with-libbabeltrace-prefix was given.
18223if test "${with_libbabeltrace_prefix+set}" = set; then :
18224 withval=$with_libbabeltrace_prefix;
18225 if test "X$withval" = "Xno"; then
18226 use_additional=no
18227 else
18228 if test "X$withval" = "X"; then
18229
18230 acl_save_prefix="$prefix"
18231 prefix="$acl_final_prefix"
18232 acl_save_exec_prefix="$exec_prefix"
18233 exec_prefix="$acl_final_exec_prefix"
18234
18235 eval additional_includedir=\"$includedir\"
18236 eval additional_libdir=\"$libdir\"
18237
18238 exec_prefix="$acl_save_exec_prefix"
18239 prefix="$acl_save_prefix"
18240
18241 else
18242 additional_includedir="$withval/include"
18243 additional_libdir="$withval/lib"
18244 fi
18245 fi
18246
18247fi
18248
9f1528a1
AB
18249
18250# Check whether --with-libbabeltrace-type was given.
18251if test "${with_libbabeltrace_type+set}" = set; then :
18252 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18253else
18254 with_libbabeltrace_type=auto
18255fi
18256
18257 lib_type=`eval echo \$with_libbabeltrace_type`
18258
393fd4c3
YQ
18259 LIBBABELTRACE=
18260 LTLIBBABELTRACE=
18261 INCBABELTRACE=
18262 rpathdirs=
18263 ltrpathdirs=
18264 names_already_handled=
18265 names_next_round='babeltrace babeltrace-ctf'
18266 while test -n "$names_next_round"; do
18267 names_this_round="$names_next_round"
18268 names_next_round=
18269 for name in $names_this_round; do
18270 already_handled=
18271 for n in $names_already_handled; do
18272 if test "$n" = "$name"; then
18273 already_handled=yes
18274 break
18275 fi
18276 done
18277 if test -z "$already_handled"; then
18278 names_already_handled="$names_already_handled $name"
18279 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18280 eval value=\"\$HAVE_LIB$uppername\"
18281 if test -n "$value"; then
18282 if test "$value" = yes; then
18283 eval value=\"\$LIB$uppername\"
18284 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18285 eval value=\"\$LTLIB$uppername\"
18286 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18287 else
18288 :
18289 fi
18290 else
18291 found_dir=
18292 found_la=
18293 found_so=
18294 found_a=
18295 if test $use_additional = yes; then
9f1528a1 18296 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18297 found_dir="$additional_libdir"
18298 found_so="$additional_libdir/lib$name.$shlibext"
18299 if test -f "$additional_libdir/lib$name.la"; then
18300 found_la="$additional_libdir/lib$name.la"
18301 fi
9f1528a1 18302 elif test x$lib_type != xshared; then
393fd4c3
YQ
18303 if test -f "$additional_libdir/lib$name.$libext"; then
18304 found_dir="$additional_libdir"
18305 found_a="$additional_libdir/lib$name.$libext"
18306 if test -f "$additional_libdir/lib$name.la"; then
18307 found_la="$additional_libdir/lib$name.la"
18308 fi
18309 fi
18310 fi
18311 fi
18312 if test "X$found_dir" = "X"; then
18313 for x in $LDFLAGS $LTLIBBABELTRACE; do
18314
18315 acl_save_prefix="$prefix"
18316 prefix="$acl_final_prefix"
18317 acl_save_exec_prefix="$exec_prefix"
18318 exec_prefix="$acl_final_exec_prefix"
18319 eval x=\"$x\"
18320 exec_prefix="$acl_save_exec_prefix"
18321 prefix="$acl_save_prefix"
18322
18323 case "$x" in
18324 -L*)
18325 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18326 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
393fd4c3
YQ
18327 found_dir="$dir"
18328 found_so="$dir/lib$name.$shlibext"
18329 if test -f "$dir/lib$name.la"; then
18330 found_la="$dir/lib$name.la"
18331 fi
9f1528a1 18332 elif test x$lib_type != xshared; then
393fd4c3
YQ
18333 if test -f "$dir/lib$name.$libext"; then
18334 found_dir="$dir"
18335 found_a="$dir/lib$name.$libext"
18336 if test -f "$dir/lib$name.la"; then
18337 found_la="$dir/lib$name.la"
18338 fi
18339 fi
18340 fi
18341 ;;
18342 esac
18343 if test "X$found_dir" != "X"; then
18344 break
18345 fi
18346 done
18347 fi
18348 if test "X$found_dir" != "X"; then
18349 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18350 if test "X$found_so" != "X"; then
18351 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18352 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18353 else
18354 haveit=
18355 for x in $ltrpathdirs; do
18356 if test "X$x" = "X$found_dir"; then
18357 haveit=yes
18358 break
18359 fi
18360 done
18361 if test -z "$haveit"; then
18362 ltrpathdirs="$ltrpathdirs $found_dir"
18363 fi
18364 if test "$hardcode_direct" = yes; then
18365 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18366 else
18367 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18368 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18369 haveit=
18370 for x in $rpathdirs; do
18371 if test "X$x" = "X$found_dir"; then
18372 haveit=yes
18373 break
18374 fi
18375 done
18376 if test -z "$haveit"; then
18377 rpathdirs="$rpathdirs $found_dir"
18378 fi
18379 else
18380 haveit=
18381 for x in $LDFLAGS $LIBBABELTRACE; do
18382
18383 acl_save_prefix="$prefix"
18384 prefix="$acl_final_prefix"
18385 acl_save_exec_prefix="$exec_prefix"
18386 exec_prefix="$acl_final_exec_prefix"
18387 eval x=\"$x\"
18388 exec_prefix="$acl_save_exec_prefix"
18389 prefix="$acl_save_prefix"
18390
18391 if test "X$x" = "X-L$found_dir"; then
18392 haveit=yes
18393 break
18394 fi
18395 done
18396 if test -z "$haveit"; then
18397 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18398 fi
18399 if test "$hardcode_minus_L" != no; then
18400 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18401 else
18402 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18403 fi
18404 fi
18405 fi
18406 fi
18407 else
18408 if test "X$found_a" != "X"; then
18409 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18410 else
18411 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18412 fi
18413 fi
18414 additional_includedir=
18415 case "$found_dir" in
18416 */lib | */lib/)
18417 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18418 additional_includedir="$basedir/include"
18419 ;;
18420 esac
18421 if test "X$additional_includedir" != "X"; then
18422 if test "X$additional_includedir" != "X/usr/include"; then
18423 haveit=
18424 if test "X$additional_includedir" = "X/usr/local/include"; then
18425 if test -n "$GCC"; then
18426 case $host_os in
18427 linux*) haveit=yes;;
18428 esac
18429 fi
18430 fi
18431 if test -z "$haveit"; then
18432 for x in $CPPFLAGS $INCBABELTRACE; do
18433
18434 acl_save_prefix="$prefix"
18435 prefix="$acl_final_prefix"
18436 acl_save_exec_prefix="$exec_prefix"
18437 exec_prefix="$acl_final_exec_prefix"
18438 eval x=\"$x\"
18439 exec_prefix="$acl_save_exec_prefix"
18440 prefix="$acl_save_prefix"
18441
18442 if test "X$x" = "X-I$additional_includedir"; then
18443 haveit=yes
18444 break
18445 fi
18446 done
18447 if test -z "$haveit"; then
18448 if test -d "$additional_includedir"; then
18449 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18450 fi
18451 fi
18452 fi
18453 fi
18454 fi
18455 if test -n "$found_la"; then
18456 save_libdir="$libdir"
18457 case "$found_la" in
18458 */* | *\\*) . "$found_la" ;;
18459 *) . "./$found_la" ;;
18460 esac
18461 libdir="$save_libdir"
18462 for dep in $dependency_libs; do
18463 case "$dep" in
18464 -L*)
18465 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18466 if test "X$additional_libdir" != "X/usr/lib"; then
18467 haveit=
18468 if test "X$additional_libdir" = "X/usr/local/lib"; then
18469 if test -n "$GCC"; then
18470 case $host_os in
18471 linux*) haveit=yes;;
18472 esac
18473 fi
18474 fi
18475 if test -z "$haveit"; then
18476 haveit=
18477 for x in $LDFLAGS $LIBBABELTRACE; do
18478
18479 acl_save_prefix="$prefix"
18480 prefix="$acl_final_prefix"
18481 acl_save_exec_prefix="$exec_prefix"
18482 exec_prefix="$acl_final_exec_prefix"
18483 eval x=\"$x\"
18484 exec_prefix="$acl_save_exec_prefix"
18485 prefix="$acl_save_prefix"
18486
18487 if test "X$x" = "X-L$additional_libdir"; then
18488 haveit=yes
18489 break
18490 fi
18491 done
18492 if test -z "$haveit"; then
18493 if test -d "$additional_libdir"; then
18494 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18495 fi
18496 fi
18497 haveit=
18498 for x in $LDFLAGS $LTLIBBABELTRACE; do
18499
18500 acl_save_prefix="$prefix"
18501 prefix="$acl_final_prefix"
18502 acl_save_exec_prefix="$exec_prefix"
18503 exec_prefix="$acl_final_exec_prefix"
18504 eval x=\"$x\"
18505 exec_prefix="$acl_save_exec_prefix"
18506 prefix="$acl_save_prefix"
18507
18508 if test "X$x" = "X-L$additional_libdir"; then
18509 haveit=yes
18510 break
18511 fi
18512 done
18513 if test -z "$haveit"; then
18514 if test -d "$additional_libdir"; then
18515 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18516 fi
18517 fi
18518 fi
18519 fi
18520 ;;
18521 -R*)
18522 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18523 if test "$enable_rpath" != no; then
18524 haveit=
18525 for x in $rpathdirs; do
18526 if test "X$x" = "X$dir"; then
18527 haveit=yes
18528 break
18529 fi
18530 done
18531 if test -z "$haveit"; then
18532 rpathdirs="$rpathdirs $dir"
18533 fi
18534 haveit=
18535 for x in $ltrpathdirs; do
18536 if test "X$x" = "X$dir"; then
18537 haveit=yes
18538 break
18539 fi
18540 done
18541 if test -z "$haveit"; then
18542 ltrpathdirs="$ltrpathdirs $dir"
18543 fi
18544 fi
18545 ;;
18546 -l*)
18547 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18548 ;;
18549 *.la)
18550 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18551 ;;
18552 *)
18553 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18554 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18555 ;;
18556 esac
18557 done
18558 fi
18559 else
9f1528a1
AB
18560 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18561 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18562 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18563 else
18564 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18565 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18566 fi
393fd4c3
YQ
18567 fi
18568 fi
18569 fi
18570 done
18571 done
18572 if test "X$rpathdirs" != "X"; then
18573 if test -n "$hardcode_libdir_separator"; then
18574 alldirs=
18575 for found_dir in $rpathdirs; do
18576 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18577 done
18578 acl_save_libdir="$libdir"
18579 libdir="$alldirs"
18580 eval flag=\"$hardcode_libdir_flag_spec\"
18581 libdir="$acl_save_libdir"
18582 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18583 else
18584 for found_dir in $rpathdirs; do
18585 acl_save_libdir="$libdir"
18586 libdir="$found_dir"
18587 eval flag=\"$hardcode_libdir_flag_spec\"
18588 libdir="$acl_save_libdir"
18589 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18590 done
18591 fi
18592 fi
18593 if test "X$ltrpathdirs" != "X"; then
18594 for found_dir in $ltrpathdirs; do
18595 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18596 done
18597 fi
18598
18599
18600 ac_save_CPPFLAGS="$CPPFLAGS"
18601
18602 for element in $INCBABELTRACE; do
18603 haveit=
18604 for x in $CPPFLAGS; do
18605
18606 acl_save_prefix="$prefix"
18607 prefix="$acl_final_prefix"
18608 acl_save_exec_prefix="$exec_prefix"
18609 exec_prefix="$acl_final_exec_prefix"
18610 eval x=\"$x\"
18611 exec_prefix="$acl_save_exec_prefix"
18612 prefix="$acl_save_prefix"
18613
18614 if test "X$x" = "X$element"; then
18615 haveit=yes
18616 break
18617 fi
18618 done
18619 if test -z "$haveit"; then
18620 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18621 fi
18622 done
18623
18624
18625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18626$as_echo_n "checking for libbabeltrace... " >&6; }
d0ac1c44 18627if ${ac_cv_libbabeltrace+:} false; then :
393fd4c3
YQ
18628 $as_echo_n "(cached) " >&6
18629else
18630
18631 ac_save_LIBS="$LIBS"
18632 LIBS="$LIBS $LIBBABELTRACE"
18633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18634/* end confdefs.h. */
18635#include <babeltrace/babeltrace.h>
18636 #include <babeltrace/ctf/events.h>
18637 #include <babeltrace/ctf/iterator.h>
18638int
18639main ()
18640{
18641struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18642 struct bt_ctf_event *event = NULL;
18643 const struct bt_definition *scope;
18644
13cdc2af 18645 pos->type = BT_SEEK_BEGIN;
65c749e7 18646 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
393fd4c3
YQ
18647 scope = bt_ctf_get_top_level_scope (event,
18648 BT_STREAM_EVENT_HEADER);
18649 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18650
18651 ;
18652 return 0;
18653}
18654_ACEOF
18655if ac_fn_c_try_link "$LINENO"; then :
18656 ac_cv_libbabeltrace=yes
18657else
18658 ac_cv_libbabeltrace=no
18659fi
18660rm -f core conftest.err conftest.$ac_objext \
18661 conftest$ac_exeext conftest.$ac_ext
18662 LIBS="$ac_save_LIBS"
18663
18664fi
18665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18666$as_echo "$ac_cv_libbabeltrace" >&6; }
18667 if test "$ac_cv_libbabeltrace" = yes; then
18668 HAVE_LIBBABELTRACE=yes
18669
18670$as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18671
18672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18673$as_echo_n "checking how to link with libbabeltrace... " >&6; }
18674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18675$as_echo "$LIBBABELTRACE" >&6; }
18676 else
18677 HAVE_LIBBABELTRACE=no
18678 CPPFLAGS="$ac_save_CPPFLAGS"
18679 LIBBABELTRACE=
18680 LTLIBBABELTRACE=
18681 fi
18682
18683
18684
18685
18686
18687
18688 CFLAGS=$saved_CFLAGS
18689
18690 if test "$HAVE_LIBBABELTRACE" != yes; then
18691 if test "$with_babeltrace" = yes; then
d0ac1c44 18692 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
393fd4c3
YQ
18693 else
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18695$as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18696 fi
18697 fi
18698fi
18699
ccb1ba62
CB
18700# Check for xxhash
18701
18702# Check whether --with-xxhash was given.
18703if test "${with_xxhash+set}" = set; then :
18704 withval=$with_xxhash;
18705else
18706 with_xxhash=auto
18707fi
18708
18709
1776e3e5
NA
18710 # Check whether --enable-libctf was given.
18711if test "${enable_libctf+set}" = set; then :
18712 enableval=$enable_libctf;
18713 case "$enableval" in
18714 yes|no) ;;
18715 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18716 esac
18717
18718else
18719 enable_libctf=yes
18720fi
18721
18722
18723if test x${enable_static} = xno; then
18724 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18725 CTF_DEPS="../libctf/.libs/libctf.so"
18726else
18727 LIBCTF="../libctf/.libs/libctf.a"
18728 CTF_DEPS="$LIBCTF"
18729fi
18730if test "${enable_libctf}" = yes; then
18731
18732$as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18733
18734else
18735 LIBCTF=
18736 CTF_DEPS=
18737fi
18738
18739
18740
18741
18742# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18743# empty version.
18744
ccb1ba62
CB
18745if test "x$with_xxhash" != "xno"; then
18746
18747
18748
18749
18750
18751
18752
18753
18754 use_additional=yes
18755
18756 acl_save_prefix="$prefix"
18757 prefix="$acl_final_prefix"
18758 acl_save_exec_prefix="$exec_prefix"
18759 exec_prefix="$acl_final_exec_prefix"
18760
18761 eval additional_includedir=\"$includedir\"
18762 eval additional_libdir=\"$libdir\"
18763
18764 exec_prefix="$acl_save_exec_prefix"
18765 prefix="$acl_save_prefix"
18766
18767
18768# Check whether --with-libxxhash-prefix was given.
18769if test "${with_libxxhash_prefix+set}" = set; then :
18770 withval=$with_libxxhash_prefix;
18771 if test "X$withval" = "Xno"; then
18772 use_additional=no
18773 else
18774 if test "X$withval" = "X"; then
18775
18776 acl_save_prefix="$prefix"
18777 prefix="$acl_final_prefix"
18778 acl_save_exec_prefix="$exec_prefix"
18779 exec_prefix="$acl_final_exec_prefix"
18780
18781 eval additional_includedir=\"$includedir\"
18782 eval additional_libdir=\"$libdir\"
18783
18784 exec_prefix="$acl_save_exec_prefix"
18785 prefix="$acl_save_prefix"
18786
18787 else
18788 additional_includedir="$withval/include"
18789 additional_libdir="$withval/lib"
18790 fi
18791 fi
18792
18793fi
18794
9f1528a1
AB
18795
18796# Check whether --with-libxxhash-type was given.
18797if test "${with_libxxhash_type+set}" = set; then :
18798 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18799else
18800 with_libxxhash_type=auto
18801fi
18802
18803 lib_type=`eval echo \$with_libxxhash_type`
18804
ccb1ba62
CB
18805 LIBXXHASH=
18806 LTLIBXXHASH=
18807 INCXXHASH=
18808 rpathdirs=
18809 ltrpathdirs=
18810 names_already_handled=
18811 names_next_round='xxhash '
18812 while test -n "$names_next_round"; do
18813 names_this_round="$names_next_round"
18814 names_next_round=
18815 for name in $names_this_round; do
18816 already_handled=
18817 for n in $names_already_handled; do
18818 if test "$n" = "$name"; then
18819 already_handled=yes
18820 break
18821 fi
18822 done
18823 if test -z "$already_handled"; then
18824 names_already_handled="$names_already_handled $name"
18825 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18826 eval value=\"\$HAVE_LIB$uppername\"
18827 if test -n "$value"; then
18828 if test "$value" = yes; then
18829 eval value=\"\$LIB$uppername\"
18830 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18831 eval value=\"\$LTLIB$uppername\"
18832 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18833 else
18834 :
18835 fi
18836 else
18837 found_dir=
18838 found_la=
18839 found_so=
18840 found_a=
18841 if test $use_additional = yes; then
9f1528a1 18842 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18843 found_dir="$additional_libdir"
18844 found_so="$additional_libdir/lib$name.$shlibext"
18845 if test -f "$additional_libdir/lib$name.la"; then
18846 found_la="$additional_libdir/lib$name.la"
18847 fi
9f1528a1 18848 elif test x$lib_type != xshared; then
ccb1ba62
CB
18849 if test -f "$additional_libdir/lib$name.$libext"; then
18850 found_dir="$additional_libdir"
18851 found_a="$additional_libdir/lib$name.$libext"
18852 if test -f "$additional_libdir/lib$name.la"; then
18853 found_la="$additional_libdir/lib$name.la"
18854 fi
18855 fi
18856 fi
18857 fi
18858 if test "X$found_dir" = "X"; then
18859 for x in $LDFLAGS $LTLIBXXHASH; do
18860
18861 acl_save_prefix="$prefix"
18862 prefix="$acl_final_prefix"
18863 acl_save_exec_prefix="$exec_prefix"
18864 exec_prefix="$acl_final_exec_prefix"
18865 eval x=\"$x\"
18866 exec_prefix="$acl_save_exec_prefix"
18867 prefix="$acl_save_prefix"
18868
18869 case "$x" in
18870 -L*)
18871 dir=`echo "X$x" | sed -e 's/^X-L//'`
9f1528a1 18872 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
ccb1ba62
CB
18873 found_dir="$dir"
18874 found_so="$dir/lib$name.$shlibext"
18875 if test -f "$dir/lib$name.la"; then
18876 found_la="$dir/lib$name.la"
18877 fi
9f1528a1 18878 elif test x$lib_type != xshared; then
ccb1ba62
CB
18879 if test -f "$dir/lib$name.$libext"; then
18880 found_dir="$dir"
18881 found_a="$dir/lib$name.$libext"
18882 if test -f "$dir/lib$name.la"; then
18883 found_la="$dir/lib$name.la"
18884 fi
18885 fi
18886 fi
18887 ;;
18888 esac
18889 if test "X$found_dir" != "X"; then
18890 break
18891 fi
18892 done
18893 fi
18894 if test "X$found_dir" != "X"; then
18895 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18896 if test "X$found_so" != "X"; then
18897 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18898 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18899 else
18900 haveit=
18901 for x in $ltrpathdirs; do
18902 if test "X$x" = "X$found_dir"; then
18903 haveit=yes
18904 break
18905 fi
18906 done
18907 if test -z "$haveit"; then
18908 ltrpathdirs="$ltrpathdirs $found_dir"
18909 fi
18910 if test "$hardcode_direct" = yes; then
18911 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18912 else
18913 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18914 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18915 haveit=
18916 for x in $rpathdirs; do
18917 if test "X$x" = "X$found_dir"; then
18918 haveit=yes
18919 break
18920 fi
18921 done
18922 if test -z "$haveit"; then
18923 rpathdirs="$rpathdirs $found_dir"
18924 fi
18925 else
18926 haveit=
18927 for x in $LDFLAGS $LIBXXHASH; do
18928
18929 acl_save_prefix="$prefix"
18930 prefix="$acl_final_prefix"
18931 acl_save_exec_prefix="$exec_prefix"
18932 exec_prefix="$acl_final_exec_prefix"
18933 eval x=\"$x\"
18934 exec_prefix="$acl_save_exec_prefix"
18935 prefix="$acl_save_prefix"
18936
18937 if test "X$x" = "X-L$found_dir"; then
18938 haveit=yes
18939 break
18940 fi
18941 done
18942 if test -z "$haveit"; then
18943 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18944 fi
18945 if test "$hardcode_minus_L" != no; then
18946 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18947 else
18948 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18949 fi
18950 fi
18951 fi
18952 fi
18953 else
18954 if test "X$found_a" != "X"; then
18955 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18956 else
18957 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18958 fi
18959 fi
18960 additional_includedir=
18961 case "$found_dir" in
18962 */lib | */lib/)
18963 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18964 additional_includedir="$basedir/include"
18965 ;;
18966 esac
18967 if test "X$additional_includedir" != "X"; then
18968 if test "X$additional_includedir" != "X/usr/include"; then
18969 haveit=
18970 if test "X$additional_includedir" = "X/usr/local/include"; then
18971 if test -n "$GCC"; then
18972 case $host_os in
18973 linux*) haveit=yes;;
18974 esac
18975 fi
18976 fi
18977 if test -z "$haveit"; then
18978 for x in $CPPFLAGS $INCXXHASH; do
18979
18980 acl_save_prefix="$prefix"
18981 prefix="$acl_final_prefix"
18982 acl_save_exec_prefix="$exec_prefix"
18983 exec_prefix="$acl_final_exec_prefix"
18984 eval x=\"$x\"
18985 exec_prefix="$acl_save_exec_prefix"
18986 prefix="$acl_save_prefix"
18987
18988 if test "X$x" = "X-I$additional_includedir"; then
18989 haveit=yes
18990 break
18991 fi
18992 done
18993 if test -z "$haveit"; then
18994 if test -d "$additional_includedir"; then
18995 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18996 fi
18997 fi
18998 fi
18999 fi
19000 fi
19001 if test -n "$found_la"; then
19002 save_libdir="$libdir"
19003 case "$found_la" in
19004 */* | *\\*) . "$found_la" ;;
19005 *) . "./$found_la" ;;
19006 esac
19007 libdir="$save_libdir"
19008 for dep in $dependency_libs; do
19009 case "$dep" in
19010 -L*)
19011 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19012 if test "X$additional_libdir" != "X/usr/lib"; then
19013 haveit=
19014 if test "X$additional_libdir" = "X/usr/local/lib"; then
19015 if test -n "$GCC"; then
19016 case $host_os in
19017 linux*) haveit=yes;;
19018 esac
19019 fi
19020 fi
19021 if test -z "$haveit"; then
19022 haveit=
19023 for x in $LDFLAGS $LIBXXHASH; do
19024
19025 acl_save_prefix="$prefix"
19026 prefix="$acl_final_prefix"
19027 acl_save_exec_prefix="$exec_prefix"
19028 exec_prefix="$acl_final_exec_prefix"
19029 eval x=\"$x\"
19030 exec_prefix="$acl_save_exec_prefix"
19031 prefix="$acl_save_prefix"
19032
19033 if test "X$x" = "X-L$additional_libdir"; then
19034 haveit=yes
19035 break
19036 fi
19037 done
19038 if test -z "$haveit"; then
19039 if test -d "$additional_libdir"; then
19040 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19041 fi
19042 fi
19043 haveit=
19044 for x in $LDFLAGS $LTLIBXXHASH; do
19045
19046 acl_save_prefix="$prefix"
19047 prefix="$acl_final_prefix"
19048 acl_save_exec_prefix="$exec_prefix"
19049 exec_prefix="$acl_final_exec_prefix"
19050 eval x=\"$x\"
19051 exec_prefix="$acl_save_exec_prefix"
19052 prefix="$acl_save_prefix"
19053
19054 if test "X$x" = "X-L$additional_libdir"; then
19055 haveit=yes
19056 break
19057 fi
19058 done
19059 if test -z "$haveit"; then
19060 if test -d "$additional_libdir"; then
19061 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19062 fi
19063 fi
19064 fi
19065 fi
19066 ;;
19067 -R*)
19068 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19069 if test "$enable_rpath" != no; then
19070 haveit=
19071 for x in $rpathdirs; do
19072 if test "X$x" = "X$dir"; then
19073 haveit=yes
19074 break
19075 fi
19076 done
19077 if test -z "$haveit"; then
19078 rpathdirs="$rpathdirs $dir"
19079 fi
19080 haveit=
19081 for x in $ltrpathdirs; do
19082 if test "X$x" = "X$dir"; then
19083 haveit=yes
19084 break
19085 fi
19086 done
19087 if test -z "$haveit"; then
19088 ltrpathdirs="$ltrpathdirs $dir"
19089 fi
19090 fi
19091 ;;
19092 -l*)
19093 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19094 ;;
19095 *.la)
19096 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19097 ;;
19098 *)
19099 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19100 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19101 ;;
19102 esac
19103 done
19104 fi
19105 else
9f1528a1
AB
19106 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19107 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19108 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19109 else
19110 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19111 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19112 fi
ccb1ba62
CB
19113 fi
19114 fi
19115 fi
19116 done
19117 done
19118 if test "X$rpathdirs" != "X"; then
19119 if test -n "$hardcode_libdir_separator"; then
19120 alldirs=
19121 for found_dir in $rpathdirs; do
19122 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19123 done
19124 acl_save_libdir="$libdir"
19125 libdir="$alldirs"
19126 eval flag=\"$hardcode_libdir_flag_spec\"
19127 libdir="$acl_save_libdir"
19128 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19129 else
19130 for found_dir in $rpathdirs; do
19131 acl_save_libdir="$libdir"
19132 libdir="$found_dir"
19133 eval flag=\"$hardcode_libdir_flag_spec\"
19134 libdir="$acl_save_libdir"
19135 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19136 done
19137 fi
19138 fi
19139 if test "X$ltrpathdirs" != "X"; then
19140 for found_dir in $ltrpathdirs; do
19141 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19142 done
19143 fi
19144
19145
19146 ac_save_CPPFLAGS="$CPPFLAGS"
19147
19148 for element in $INCXXHASH; do
19149 haveit=
19150 for x in $CPPFLAGS; do
19151
19152 acl_save_prefix="$prefix"
19153 prefix="$acl_final_prefix"
19154 acl_save_exec_prefix="$exec_prefix"
19155 exec_prefix="$acl_final_exec_prefix"
19156 eval x=\"$x\"
19157 exec_prefix="$acl_save_exec_prefix"
19158 prefix="$acl_save_prefix"
19159
19160 if test "X$x" = "X$element"; then
19161 haveit=yes
19162 break
19163 fi
19164 done
19165 if test -z "$haveit"; then
19166 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19167 fi
19168 done
19169
19170
19171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19172$as_echo_n "checking for libxxhash... " >&6; }
19173if ${ac_cv_libxxhash+:} false; then :
19174 $as_echo_n "(cached) " >&6
19175else
19176
19177 ac_save_LIBS="$LIBS"
19178 LIBS="$LIBS $LIBXXHASH"
19179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19180/* end confdefs.h. */
19181#include <xxhash.h>
19182int
19183main ()
19184{
19185XXH32("foo", 3, 0);
19186
19187 ;
19188 return 0;
19189}
19190_ACEOF
19191if ac_fn_c_try_link "$LINENO"; then :
19192 ac_cv_libxxhash=yes
19193else
19194 ac_cv_libxxhash=no
19195fi
19196rm -f core conftest.err conftest.$ac_objext \
19197 conftest$ac_exeext conftest.$ac_ext
19198 LIBS="$ac_save_LIBS"
19199
19200fi
19201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19202$as_echo "$ac_cv_libxxhash" >&6; }
19203 if test "$ac_cv_libxxhash" = yes; then
19204 HAVE_LIBXXHASH=yes
19205
19206$as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19207
19208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19209$as_echo_n "checking how to link with libxxhash... " >&6; }
19210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19211$as_echo "$LIBXXHASH" >&6; }
19212 else
19213 HAVE_LIBXXHASH=no
19214 CPPFLAGS="$ac_save_CPPFLAGS"
19215 LIBXXHASH=
19216 LTLIBXXHASH=
19217 fi
19218
19219
19220
19221
19222
19223
19224 if test "$HAVE_LIBXXHASH" != yes; then
19225 if test "$with_xxhash" = yes; then
19226 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19227 fi
19228 fi
19229 if test "x$with_xxhash" = "xauto"; then
19230 with_xxhash="$HAVE_LIBXXHASH"
19231 fi
19232fi
19233
19234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19235$as_echo_n "checking whether to use xxhash... " >&6; }
19236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19237$as_echo "$with_xxhash" >&6; }
19238
a0a461e5 19239NM_H=
c906108c
SS
19240rm -f nm.h
19241if test "${nativefile}" != ""; then
0f475e27
AC
19242 case "${nativefile}" in
19243 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19244 * ) GDB_NM_FILE="${nativefile}"
19245 esac
a0a461e5
TT
19246 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19247
60ca704f
SE
19248
19249cat >>confdefs.h <<_ACEOF
b78960be 19250#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 19251_ACEOF
5a2402b8 19252
a0a461e5 19253 NM_H=nm.h
c906108c 19254fi
5a2402b8
AC
19255
19256
a0a461e5 19257
e3487908
GKB
19258for ac_prog in xsltproc
19259do
19260 # Extract the first word of "$ac_prog", so it can be a program name with args.
19261set dummy $ac_prog; ac_word=$2
19262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19263$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 19264if ${ac_cv_path_XSLTPROC+:} false; then :
e3487908
GKB
19265 $as_echo_n "(cached) " >&6
19266else
19267 case $XSLTPROC in
19268 [\\/]* | ?:[\\/]*)
19269 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19270 ;;
19271 *)
19272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19273for as_dir in $PATH
19274do
19275 IFS=$as_save_IFS
19276 test -z "$as_dir" && as_dir=.
19277 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 19278 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
e3487908
GKB
19279 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19281 break 2
19282 fi
19283done
19284 done
19285IFS=$as_save_IFS
19286
19287 ;;
19288esac
19289fi
19290XSLTPROC=$ac_cv_path_XSLTPROC
19291if test -n "$XSLTPROC"; then
19292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19293$as_echo "$XSLTPROC" >&6; }
19294else
19295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19296$as_echo "no" >&6; }
19297fi
19298
19299
19300 test -n "$XSLTPROC" && break
19301done
19302test -n "$XSLTPROC" || XSLTPROC="missing"
19303
19304if test "x$USE_MAINTAINER_MODE" = xyes; then
19305 if test "${XSLTPROC}" = missing; then
d0ac1c44 19306 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
e3487908
GKB
19307 fi
19308fi
19309
19310
c906108c
SS
19311
19312
c906108c 19313
81ecdfbb 19314$as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
bec39cab 19315
bec39cab 19316
8ecfd7bd
SDJ
19317
19318# Check whether we will enable the inclusion of unit tests when
19319# compiling GDB.
19320#
19321# The default value of this option changes depending whether we're on
19322# development mode (in which case it's "true") or not (in which case
db6878ac
SM
19323# it's "false"). The $development variable is set by the GDB_AC_COMMON
19324# macro, which must therefore be used before GDB_AC_SELFTEST.
4d696a5c
SM
19325
19326if test "x$development" != xtrue && test "x$development" != xfalse; then :
19327 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19328fi
19329
8ecfd7bd
SDJ
19330# Check whether --enable-unit-tests was given.
19331if test "${enable_unit_tests+set}" = set; then :
19332 enableval=$enable_unit_tests; case "${enableval}" in
19333 yes) enable_unittests=true ;;
19334 no) enable_unittests=false ;;
19335 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19336esac
19337else
19338 enable_unittests=$development
19339fi
19340
19341
19342if $enable_unittests; then
dcd1f979
TT
19343
19344$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19345
8ecfd7bd 19346
74cd3f9d
SM
19347 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19348 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
8ecfd7bd 19349
dcd1f979
TT
19350fi
19351
b292c783 19352
8ecfd7bd 19353
f6a88844
JM
19354 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19355 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19356 if test "x$GDB_TRANSFORM_NAME" = x; then
19357 GDB_TRANSFORM_NAME=gdb
19358 fi
19359
19360
19361
19362 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19363 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19364 if test "x$GCORE_TRANSFORM_NAME" = x; then
19365 GCORE_TRANSFORM_NAME=gcore
19366 fi
19367
b292c783
JK
19368
19369ac_config_files="$ac_config_files gcore"
19370
141ec9f6 19371ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
81ecdfbb 19372
89a34d1b 19373
bec39cab
AC
19374cat >confcache <<\_ACEOF
19375# This file is a shell script that caches the results of configure
19376# tests run on this system so they can be shared between configure
19377# scripts and configure runs, see configure's option --config-cache.
19378# It is not useful on other systems. If it contains results you don't
19379# want to keep, you may remove or edit it.
19380#
19381# config.status only pays attention to the cache file if you give it
19382# the --recheck option to rerun configure.
19383#
19384# `ac_cv_env_foo' variables (set or unset) will be overridden when
19385# loading this file, other *unset* `ac_cv_foo' will be assigned the
19386# following values.
19387
19388_ACEOF
19389
19390# The following way of writing the cache mishandles newlines in values,
19391# but we know of no workaround that is simple, portable, and efficient.
81ecdfbb 19392# So, we kill variables containing newlines.
bec39cab
AC
19393# Ultrix sh set writes to stderr and can't be redirected directly,
19394# and sets the high bit in the cache file unless we assign to the vars.
81ecdfbb
RW
19395(
19396 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19397 eval ac_val=\$$ac_var
19398 case $ac_val in #(
19399 *${as_nl}*)
19400 case $ac_var in #(
19401 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19402$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19403 esac
19404 case $ac_var in #(
19405 _ | IFS | as_nl) ;; #(
19406 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19407 *) { eval $ac_var=; unset $ac_var;} ;;
19408 esac ;;
19409 esac
19410 done
19411
bec39cab 19412 (set) 2>&1 |
81ecdfbb
RW
19413 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19414 *${as_nl}ac_space=\ *)
19415 # `set' does not quote correctly, so add quotes: double-quote
19416 # substitution turns \\\\ into \\, and sed turns \\ into \.
bec39cab
AC
19417 sed -n \
19418 "s/'/'\\\\''/g;
19419 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
81ecdfbb 19420 ;; #(
bec39cab
AC
19421 *)
19422 # `set' quotes correctly as required by POSIX, so do not add quotes.
81ecdfbb 19423 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
bec39cab 19424 ;;
81ecdfbb
RW
19425 esac |
19426 sort
19427) |
bec39cab 19428 sed '
81ecdfbb 19429 /^ac_cv_env_/b end
bec39cab 19430 t clear
81ecdfbb 19431 :clear
bec39cab
AC
19432 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19433 t end
81ecdfbb
RW
19434 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19435 :end' >>confcache
19436if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19437 if test -w "$cache_file"; then
d0ac1c44 19438 if test "x$cache_file" != "x/dev/null"; then
81ecdfbb
RW
19439 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19440$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
19441 if test ! -f "$cache_file" || test -h "$cache_file"; then
19442 cat confcache >"$cache_file"
19443 else
19444 case $cache_file in #(
19445 */* | ?:*)
19446 mv -f confcache "$cache_file"$$ &&
19447 mv -f "$cache_file"$$ "$cache_file" ;; #(
19448 *)
19449 mv -f confcache "$cache_file" ;;
19450 esac
19451 fi
19452 fi
bec39cab 19453 else
81ecdfbb
RW
19454 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19455$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
bec39cab
AC
19456 fi
19457fi
19458rm -f confcache
19459
19460test "x$prefix" = xNONE && prefix=$ac_default_prefix
19461# Let make expand exec_prefix.
19462test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19463
bec39cab
AC
19464DEFS=-DHAVE_CONFIG_H
19465
19466ac_libobjs=
19467ac_ltlibobjs=
d0ac1c44 19468U=
bec39cab
AC
19469for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19470 # 1. Remove the extension, and $U if already installed.
81ecdfbb
RW
19471 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19472 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19473 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19474 # will be set to the directory where LIBOBJS objects are built.
19475 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19476 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
bec39cab
AC
19477done
19478LIBOBJS=$ac_libobjs
19479
19480LTLIBOBJS=$ac_ltlibobjs
19481
19482
85981d60 19483if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 19484 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
81ecdfbb 19485Usually this means the macro was only invoked conditionally." "$LINENO" 5
85981d60 19486fi
4df42755 19487if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
d0ac1c44 19488 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
4df42755
DE
19489Usually this means the macro was only invoked conditionally." "$LINENO" 5
19490fi
19491if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
d0ac1c44 19492 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
4df42755
DE
19493Usually this means the macro was only invoked conditionally." "$LINENO" 5
19494fi
81ecdfbb
RW
19495
19496
d0ac1c44 19497: "${CONFIG_STATUS=./config.status}"
81ecdfbb 19498ac_write_fail=0
bec39cab
AC
19499ac_clean_files_save=$ac_clean_files
19500ac_clean_files="$ac_clean_files $CONFIG_STATUS"
81ecdfbb
RW
19501{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19502$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19503as_write_fail=0
19504cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
bec39cab
AC
19505#! $SHELL
19506# Generated by $as_me.
19507# Run this file to recreate the current configuration.
19508# Compiler output produced by configure, useful for debugging
19509# configure, is in config.log if it exists.
19510
19511debug=false
19512ac_cs_recheck=false
19513ac_cs_silent=false
bec39cab 19514
81ecdfbb
RW
19515SHELL=\${CONFIG_SHELL-$SHELL}
19516export SHELL
19517_ASEOF
19518cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19519## -------------------- ##
19520## M4sh Initialization. ##
19521## -------------------- ##
19522
19523# Be more Bourne compatible
19524DUALCASE=1; export DUALCASE # for MKS sh
19525if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
bec39cab
AC
19526 emulate sh
19527 NULLCMD=:
81ecdfbb 19528 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
bec39cab
AC
19529 # is contrary to our usage. Disable this feature.
19530 alias -g '${1+"$@"}'='"$@"'
81ecdfbb
RW
19531 setopt NO_GLOB_SUBST
19532else
19533 case `(set -o) 2>/dev/null` in #(
19534 *posix*) :
19535 set -o posix ;; #(
19536 *) :
19537 ;;
19538esac
bec39cab 19539fi
bec39cab 19540
81ecdfbb
RW
19541
19542as_nl='
19543'
19544export as_nl
19545# Printing a long string crashes Solaris 7 /usr/bin/printf.
19546as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19547as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19548as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19549# Prefer a ksh shell builtin over an external printf program on Solaris,
19550# but without wasting forks for bash or zsh.
19551if test -z "$BASH_VERSION$ZSH_VERSION" \
19552 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19553 as_echo='print -r --'
19554 as_echo_n='print -rn --'
19555elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19556 as_echo='printf %s\n'
19557 as_echo_n='printf %s'
19558else
19559 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19560 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19561 as_echo_n='/usr/ucb/echo -n'
19562 else
19563 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19564 as_echo_n_body='eval
19565 arg=$1;
19566 case $arg in #(
19567 *"$as_nl"*)
19568 expr "X$arg" : "X\\(.*\\)$as_nl";
19569 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19570 esac;
19571 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19572 '
19573 export as_echo_n_body
19574 as_echo_n='sh -c $as_echo_n_body as_echo'
19575 fi
19576 export as_echo_body
19577 as_echo='sh -c $as_echo_body as_echo'
19578fi
19579
19580# The user is always right.
19581if test "${PATH_SEPARATOR+set}" != set; then
19582 PATH_SEPARATOR=:
19583 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19584 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19585 PATH_SEPARATOR=';'
19586 }
bec39cab
AC
19587fi
19588
19589
81ecdfbb
RW
19590# IFS
19591# We need space, tab and new line, in precisely that order. Quoting is
19592# there to prevent editors from complaining about space-tab.
19593# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19594# splitting by setting IFS to empty value.)
19595IFS=" "" $as_nl"
19596
19597# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 19598as_myself=
81ecdfbb
RW
19599case $0 in #((
19600 *[\\/]* ) as_myself=$0 ;;
19601 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19602for as_dir in $PATH
19603do
19604 IFS=$as_save_IFS
19605 test -z "$as_dir" && as_dir=.
19606 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19607 done
19608IFS=$as_save_IFS
19609
19610 ;;
19611esac
19612# We did not find ourselves, most probably we were run as `sh COMMAND'
19613# in which case we are not to be found in the path.
19614if test "x$as_myself" = x; then
19615 as_myself=$0
19616fi
19617if test ! -f "$as_myself"; then
19618 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19619 exit 1
19620fi
19621
19622# Unset variables that we do not need and which cause bugs (e.g. in
19623# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19624# suppresses any "Segmentation fault" message there. '((' could
19625# trigger a bug in pdksh 5.2.14.
19626for as_var in BASH_ENV ENV MAIL MAILPATH
19627do eval test x\${$as_var+set} = xset \
19628 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19629done
bec39cab
AC
19630PS1='$ '
19631PS2='> '
19632PS4='+ '
19633
19634# NLS nuisances.
81ecdfbb
RW
19635LC_ALL=C
19636export LC_ALL
19637LANGUAGE=C
19638export LANGUAGE
19639
19640# CDPATH.
19641(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19642
19643
d0ac1c44
SM
19644# as_fn_error STATUS ERROR [LINENO LOG_FD]
19645# ----------------------------------------
81ecdfbb
RW
19646# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19647# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 19648# script with STATUS, using 1 if that was 0.
81ecdfbb
RW
19649as_fn_error ()
19650{
d0ac1c44
SM
19651 as_status=$1; test $as_status -eq 0 && as_status=1
19652 if test "$4"; then
19653 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19654 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
81ecdfbb 19655 fi
d0ac1c44 19656 $as_echo "$as_me: error: $2" >&2
81ecdfbb
RW
19657 as_fn_exit $as_status
19658} # as_fn_error
19659
19660
19661# as_fn_set_status STATUS
19662# -----------------------
19663# Set $? to STATUS, without forking.
19664as_fn_set_status ()
19665{
19666 return $1
19667} # as_fn_set_status
19668
19669# as_fn_exit STATUS
19670# -----------------
19671# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19672as_fn_exit ()
19673{
19674 set +e
19675 as_fn_set_status $1
19676 exit $1
19677} # as_fn_exit
19678
19679# as_fn_unset VAR
19680# ---------------
19681# Portably unset VAR.
19682as_fn_unset ()
19683{
19684 { eval $1=; unset $1;}
19685}
19686as_unset=as_fn_unset
19687# as_fn_append VAR VALUE
19688# ----------------------
19689# Append the text in VALUE to the end of the definition contained in VAR. Take
19690# advantage of any shell optimizations that allow amortized linear growth over
19691# repeated appends, instead of the typical quadratic growth present in naive
19692# implementations.
19693if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19694 eval 'as_fn_append ()
19695 {
19696 eval $1+=\$2
19697 }'
19698else
19699 as_fn_append ()
19700 {
19701 eval $1=\$$1\$2
19702 }
19703fi # as_fn_append
19704
19705# as_fn_arith ARG...
19706# ------------------
19707# Perform arithmetic evaluation on the ARGs, and store the result in the
19708# global $as_val. Take advantage of shells that can avoid forks. The arguments
19709# must be portable across $(()) and expr.
19710if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19711 eval 'as_fn_arith ()
19712 {
19713 as_val=$(( $* ))
19714 }'
19715else
19716 as_fn_arith ()
19717 {
19718 as_val=`expr "$@" || test $? -eq 1`
19719 }
19720fi # as_fn_arith
bec39cab 19721
81ecdfbb
RW
19722
19723if expr a : '\(a\)' >/dev/null 2>&1 &&
19724 test "X`expr 00001 : '.*\(...\)'`" = X001; then
bec39cab
AC
19725 as_expr=expr
19726else
19727 as_expr=false
19728fi
19729
81ecdfbb 19730if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
bec39cab
AC
19731 as_basename=basename
19732else
19733 as_basename=false
19734fi
19735
81ecdfbb
RW
19736if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19737 as_dirname=dirname
19738else
19739 as_dirname=false
19740fi
bec39cab 19741
81ecdfbb 19742as_me=`$as_basename -- "$0" ||
bec39cab
AC
19743$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19744 X"$0" : 'X\(//\)$' \| \
81ecdfbb
RW
19745 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19746$as_echo X/"$0" |
19747 sed '/^.*\/\([^/][^/]*\)\/*$/{
19748 s//\1/
19749 q
19750 }
19751 /^X\/\(\/\/\)$/{
19752 s//\1/
19753 q
19754 }
19755 /^X\/\(\/\).*/{
19756 s//\1/
19757 q
19758 }
19759 s/.*/./; q'`
b4e70030 19760
b4e70030
JB
19761# Avoid depending upon Character Ranges.
19762as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19763as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19764as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19765as_cr_digits='0123456789'
19766as_cr_alnum=$as_cr_Letters$as_cr_digits
19767
81ecdfbb
RW
19768ECHO_C= ECHO_N= ECHO_T=
19769case `echo -n x` in #(((((
19770-n*)
19771 case `echo 'xy\c'` in
19772 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19773 xy) ECHO_C='\c';;
19774 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19775 ECHO_T=' ';;
19776 esac;;
19777*)
19778 ECHO_N='-n';;
bec39cab
AC
19779esac
19780
81ecdfbb
RW
19781rm -f conf$$ conf$$.exe conf$$.file
19782if test -d conf$$.dir; then
19783 rm -f conf$$.dir/conf$$.file
bec39cab 19784else
81ecdfbb
RW
19785 rm -f conf$$.dir
19786 mkdir conf$$.dir 2>/dev/null
bec39cab 19787fi
81ecdfbb
RW
19788if (echo >conf$$.file) 2>/dev/null; then
19789 if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030 19790 as_ln_s='ln -s'
81ecdfbb
RW
19791 # ... but there are two gotchas:
19792 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19793 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 19794 # In both cases, we have to default to `cp -pR'.
81ecdfbb 19795 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 19796 as_ln_s='cp -pR'
81ecdfbb
RW
19797 elif ln conf$$.file conf$$ 2>/dev/null; then
19798 as_ln_s=ln
19799 else
d0ac1c44 19800 as_ln_s='cp -pR'
b4e70030 19801 fi
bec39cab 19802else
d0ac1c44 19803 as_ln_s='cp -pR'
bec39cab 19804fi
81ecdfbb
RW
19805rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19806rmdir conf$$.dir 2>/dev/null
19807
19808
19809# as_fn_mkdir_p
19810# -------------
19811# Create "$as_dir" as a directory, including parents if necessary.
19812as_fn_mkdir_p ()
19813{
19814
19815 case $as_dir in #(
19816 -*) as_dir=./$as_dir;;
19817 esac
19818 test -d "$as_dir" || eval $as_mkdir_p || {
19819 as_dirs=
19820 while :; do
19821 case $as_dir in #(
19822 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19823 *) as_qdir=$as_dir;;
19824 esac
19825 as_dirs="'$as_qdir' $as_dirs"
19826 as_dir=`$as_dirname -- "$as_dir" ||
19827$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19828 X"$as_dir" : 'X\(//\)[^/]' \| \
19829 X"$as_dir" : 'X\(//\)$' \| \
19830 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19831$as_echo X"$as_dir" |
19832 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19833 s//\1/
19834 q
19835 }
19836 /^X\(\/\/\)[^/].*/{
19837 s//\1/
19838 q
19839 }
19840 /^X\(\/\/\)$/{
19841 s//\1/
19842 q
19843 }
19844 /^X\(\/\).*/{
19845 s//\1/
19846 q
19847 }
19848 s/.*/./; q'`
19849 test -d "$as_dir" && break
19850 done
19851 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 19852 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
81ecdfbb 19853
bec39cab 19854
81ecdfbb 19855} # as_fn_mkdir_p
bec39cab 19856if mkdir -p . 2>/dev/null; then
81ecdfbb 19857 as_mkdir_p='mkdir -p "$as_dir"'
bec39cab
AC
19858else
19859 test -d ./-p && rmdir ./-p
19860 as_mkdir_p=false
19861fi
19862
d0ac1c44
SM
19863
19864# as_fn_executable_p FILE
19865# -----------------------
19866# Test if FILE is an executable regular file.
19867as_fn_executable_p ()
19868{
19869 test -f "$1" && test -x "$1"
19870} # as_fn_executable_p
19871as_test_x='test -x'
19872as_executable_p=as_fn_executable_p
bec39cab
AC
19873
19874# Sed expression to map a string onto a valid CPP name.
19875as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19876
19877# Sed expression to map a string onto a valid variable name.
19878as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19879
19880
bec39cab 19881exec 6>&1
81ecdfbb
RW
19882## ----------------------------------- ##
19883## Main body of $CONFIG_STATUS script. ##
19884## ----------------------------------- ##
19885_ASEOF
19886test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19887
19888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19889# Save the log message, to keep $0 and so on meaningful, and to
bec39cab 19890# report actual input values of CONFIG_FILES etc. instead of their
81ecdfbb
RW
19891# values after options handling.
19892ac_log="
bec39cab 19893This file was extended by $as_me, which was
d0ac1c44 19894generated by GNU Autoconf 2.69. Invocation command line was
bec39cab
AC
19895
19896 CONFIG_FILES = $CONFIG_FILES
19897 CONFIG_HEADERS = $CONFIG_HEADERS
19898 CONFIG_LINKS = $CONFIG_LINKS
19899 CONFIG_COMMANDS = $CONFIG_COMMANDS
19900 $ $0 $@
19901
81ecdfbb
RW
19902on `(hostname || uname -n) 2>/dev/null | sed 1q`
19903"
19904
bec39cab
AC
19905_ACEOF
19906
81ecdfbb
RW
19907case $ac_config_files in *"
19908"*) set x $ac_config_files; shift; ac_config_files=$*;;
19909esac
234b45d4 19910
81ecdfbb
RW
19911case $ac_config_headers in *"
19912"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19913esac
b4e70030 19914
b4e70030 19915
81ecdfbb
RW
19916cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19917# Files that config.status was made for.
19918config_files="$ac_config_files"
19919config_headers="$ac_config_headers"
19920config_links="$ac_config_links"
19921config_commands="$ac_config_commands"
234b45d4 19922
81ecdfbb 19923_ACEOF
b4e70030 19924
81ecdfbb 19925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab 19926ac_cs_usage="\
81ecdfbb
RW
19927\`$as_me' instantiates files and other configuration actions
19928from templates according to the current configuration. Unless the files
19929and actions are specified as TAGs, all are instantiated by default.
234b45d4 19930
81ecdfbb 19931Usage: $0 [OPTION]... [TAG]...
234b45d4 19932
bec39cab 19933 -h, --help print this help, then exit
81ecdfbb 19934 -V, --version print version number and configuration settings, then exit
d0ac1c44 19935 --config print configuration, then exit
81ecdfbb
RW
19936 -q, --quiet, --silent
19937 do not print progress messages
bec39cab
AC
19938 -d, --debug don't remove temporary files
19939 --recheck update $as_me by reconfiguring in the same conditions
81ecdfbb
RW
19940 --file=FILE[:TEMPLATE]
19941 instantiate the configuration file FILE
19942 --header=FILE[:TEMPLATE]
19943 instantiate the configuration header FILE
234b45d4 19944
bec39cab
AC
19945Configuration files:
19946$config_files
234b45d4 19947
bec39cab
AC
19948Configuration headers:
19949$config_headers
234b45d4 19950
bec39cab
AC
19951Configuration links:
19952$config_links
234b45d4 19953
bec39cab
AC
19954Configuration commands:
19955$config_commands
19956
81ecdfbb 19957Report bugs to the package provider."
b4e70030 19958
81ecdfbb
RW
19959_ACEOF
19960cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 19961ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
bec39cab
AC
19962ac_cs_version="\\
19963config.status
d0ac1c44
SM
19964configured by $0, generated by GNU Autoconf 2.69,
19965 with options \\"\$ac_cs_config\\"
bec39cab 19966
d0ac1c44 19967Copyright (C) 2012 Free Software Foundation, Inc.
bec39cab
AC
19968This config.status script is free software; the Free Software Foundation
19969gives unlimited permission to copy, distribute and modify it."
81ecdfbb
RW
19970
19971ac_pwd='$ac_pwd'
19972srcdir='$srcdir'
19973INSTALL='$INSTALL'
81ecdfbb
RW
19974AWK='$AWK'
19975test -n "\$AWK" || AWK=awk
bec39cab
AC
19976_ACEOF
19977
81ecdfbb
RW
19978cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19979# The default lists apply if the user does not specify any file.
bec39cab
AC
19980ac_need_defaults=:
19981while test $# != 0
19982do
19983 case $1 in
d0ac1c44 19984 --*=?*)
81ecdfbb
RW
19985 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19986 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
bec39cab 19987 ac_shift=:
c906108c 19988 ;;
d0ac1c44
SM
19989 --*=)
19990 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19991 ac_optarg=
19992 ac_shift=:
19993 ;;
81ecdfbb 19994 *)
bec39cab
AC
19995 ac_option=$1
19996 ac_optarg=$2
19997 ac_shift=shift
c906108c 19998 ;;
bec39cab 19999 esac
c906108c 20000
bec39cab
AC
20001 case $ac_option in
20002 # Handling of the options.
bec39cab
AC
20003 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20004 ac_cs_recheck=: ;;
81ecdfbb
RW
20005 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20006 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
20007 --config | --confi | --conf | --con | --co | --c )
20008 $as_echo "$ac_cs_config"; exit ;;
81ecdfbb 20009 --debug | --debu | --deb | --de | --d | -d )
bec39cab
AC
20010 debug=: ;;
20011 --file | --fil | --fi | --f )
20012 $ac_shift
81ecdfbb
RW
20013 case $ac_optarg in
20014 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 20015 '') as_fn_error $? "missing file argument" ;;
81ecdfbb
RW
20016 esac
20017 as_fn_append CONFIG_FILES " '$ac_optarg'"
bec39cab
AC
20018 ac_need_defaults=false;;
20019 --header | --heade | --head | --hea )
20020 $ac_shift
81ecdfbb
RW
20021 case $ac_optarg in
20022 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20023 esac
20024 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
bec39cab 20025 ac_need_defaults=false;;
81ecdfbb
RW
20026 --he | --h)
20027 # Conflict between --help and --header
d0ac1c44 20028 as_fn_error $? "ambiguous option: \`$1'
81ecdfbb
RW
20029Try \`$0 --help' for more information.";;
20030 --help | --hel | -h )
20031 $as_echo "$ac_cs_usage"; exit ;;
bec39cab
AC
20032 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20033 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20034 ac_cs_silent=: ;;
c906108c 20035
bec39cab 20036 # This is an error.
d0ac1c44 20037 -*) as_fn_error $? "unrecognized option: \`$1'
81ecdfbb 20038Try \`$0 --help' for more information." ;;
c906108c 20039
81ecdfbb
RW
20040 *) as_fn_append ac_config_targets " $1"
20041 ac_need_defaults=false ;;
c906108c 20042
bec39cab
AC
20043 esac
20044 shift
20045done
c906108c 20046
bec39cab 20047ac_configure_extra_args=
c906108c 20048
bec39cab
AC
20049if $ac_cs_silent; then
20050 exec 6>/dev/null
20051 ac_configure_extra_args="$ac_configure_extra_args --silent"
20052fi
c906108c 20053
bec39cab 20054_ACEOF
81ecdfbb 20055cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
bec39cab 20056if \$ac_cs_recheck; then
d0ac1c44 20057 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
81ecdfbb
RW
20058 shift
20059 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20060 CONFIG_SHELL='$SHELL'
20061 export CONFIG_SHELL
20062 exec "\$@"
bec39cab
AC
20063fi
20064
20065_ACEOF
81ecdfbb
RW
20066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20067exec 5>>config.log
20068{
20069 echo
20070 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20071## Running $as_me. ##
20072_ASBOX
20073 $as_echo "$ac_log"
20074} >&5
bec39cab 20075
81ecdfbb
RW
20076_ACEOF
20077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
c906108c 20078#
81ecdfbb 20079# INIT-COMMANDS
c906108c 20080#
a417dc56 20081ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
a0a461e5 20082GDB_NM_FILE=$GDB_NM_FILE
b4e70030 20083
bec39cab
AC
20084_ACEOF
20085
81ecdfbb 20086cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4e8d927d 20087
81ecdfbb 20088# Handling of arguments.
bec39cab 20089for ac_config_target in $ac_config_targets
c906108c 20090do
81ecdfbb
RW
20091 case $ac_config_target in
20092 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20093 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
f997c383 20094 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
a0a461e5 20095 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
b292c783 20096 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
81ecdfbb 20097 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
e2207b9a 20098 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
141ec9f6 20099 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
5ae98d25 20100 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
aa2e2d8d 20101 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
81ecdfbb 20102
d0ac1c44 20103 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c906108c
SS
20104 esac
20105done
20106
81ecdfbb 20107
bec39cab
AC
20108# If the user did not use the arguments to specify the items to instantiate,
20109# then the envvar interface is used. Set only those that are not.
20110# We use the long form for the default assignment because of an extremely
20111# bizarre bug on SunOS 4.1.3.
20112if $ac_need_defaults; then
20113 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20114 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20115 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20116 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20117fi
20118
b4e70030 20119# Have a temporary directory for convenience. Make it in the build tree
81ecdfbb 20120# simply because there is no reason against having it here, and in addition,
b4e70030 20121# creating and moving files from /tmp can sometimes cause problems.
81ecdfbb
RW
20122# Hook for its removal unless debugging.
20123# Note that there is a small window in which the directory will not be cleaned:
20124# after its creation but before its name has been assigned to `$tmp'.
b4e70030
JB
20125$debug ||
20126{
d0ac1c44 20127 tmp= ac_tmp=
81ecdfbb 20128 trap 'exit_status=$?
d0ac1c44
SM
20129 : "${ac_tmp:=$tmp}"
20130 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
81ecdfbb
RW
20131' 0
20132 trap 'as_fn_exit 1' 1 2 13 15
20133}
20134# Create a (secure) tmp directory for tmp files.
20135
20136{
20137 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 20138 test -d "$tmp"
81ecdfbb
RW
20139} ||
20140{
20141 tmp=./conf$$-$RANDOM
20142 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
20143} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20144ac_tmp=$tmp
81ecdfbb
RW
20145
20146# Set up the scripts for CONFIG_FILES section.
20147# No need to generate them if there are no CONFIG_FILES.
20148# This happens for instance with `./config.status config.h'.
20149if test -n "$CONFIG_FILES"; then
20150
20151if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20152 ac_cs_awk_getline=:
20153 ac_cs_awk_pipe_init=
20154 ac_cs_awk_read_file='
20155 while ((getline aline < (F[key])) > 0)
20156 print(aline)
20157 close(F[key])'
20158 ac_cs_awk_pipe_fini=
20159else
20160 ac_cs_awk_getline=false
20161 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20162 ac_cs_awk_read_file='
20163 print "|#_!!_#|"
20164 print "cat " F[key] " &&"
20165 '$ac_cs_awk_pipe_init
20166 # The final `:' finishes the AND list.
20167 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20168fi
20169ac_cr=`echo X | tr X '\015'`
20170# On cygwin, bash can eat \r inside `` if the user requested igncr.
20171# But we know of no other shell where ac_cr would be empty at this
20172# point, so we can use a bashism as a fallback.
20173if test "x$ac_cr" = x; then
20174 eval ac_cr=\$\'\\r\'
20175fi
20176ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20177if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 20178 ac_cs_awk_cr='\\r'
81ecdfbb
RW
20179else
20180 ac_cs_awk_cr=$ac_cr
20181fi
20182
d0ac1c44 20183echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
81ecdfbb
RW
20184_ACEOF
20185
20186# Create commands to substitute file output variables.
20187{
20188 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
d0ac1c44 20189 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
81ecdfbb
RW
20190 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20191 echo "_ACAWK" &&
20192 echo "_ACEOF"
20193} >conf$$files.sh &&
20194. ./conf$$files.sh ||
d0ac1c44 20195 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20196rm -f conf$$files.sh
20197
20198{
20199 echo "cat >conf$$subs.awk <<_ACEOF" &&
20200 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20201 echo "_ACEOF"
20202} >conf$$subs.sh ||
d0ac1c44
SM
20203 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20204ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
81ecdfbb
RW
20205ac_delim='%!_!# '
20206for ac_last_try in false false false false false :; do
20207 . ./conf$$subs.sh ||
d0ac1c44 20208 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20209
20210 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20211 if test $ac_delim_n = $ac_delim_num; then
20212 break
20213 elif $ac_last_try; then
d0ac1c44 20214 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
81ecdfbb
RW
20215 else
20216 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20217 fi
20218done
20219rm -f conf$$subs.sh
20220
20221cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 20222cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
81ecdfbb
RW
20223_ACEOF
20224sed -n '
20225h
20226s/^/S["/; s/!.*/"]=/
20227p
20228g
20229s/^[^!]*!//
20230:repl
20231t repl
20232s/'"$ac_delim"'$//
20233t delim
20234:nl
20235h
d0ac1c44 20236s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20237t more1
20238s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20239p
20240n
20241b repl
20242:more1
20243s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20244p
20245g
20246s/.\{148\}//
20247t nl
20248:delim
20249h
d0ac1c44 20250s/\(.\{148\}\)..*/\1/
81ecdfbb
RW
20251t more2
20252s/["\\]/\\&/g; s/^/"/; s/$/"/
20253p
20254b
20255:more2
20256s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20257p
20258g
20259s/.\{148\}//
20260t delim
20261' <conf$$subs.awk | sed '
20262/^[^""]/{
20263 N
20264 s/\n//
20265}
20266' >>$CONFIG_STATUS || ac_write_fail=1
20267rm -f conf$$subs.awk
20268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20269_ACAWK
d0ac1c44 20270cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
81ecdfbb
RW
20271 for (key in S) S_is_set[key] = 1
20272 FS = "\a"
20273 \$ac_cs_awk_pipe_init
20274}
20275{
20276 line = $ 0
20277 nfields = split(line, field, "@")
20278 substed = 0
20279 len = length(field[1])
20280 for (i = 2; i < nfields; i++) {
20281 key = field[i]
20282 keylen = length(key)
20283 if (S_is_set[key]) {
20284 value = S[key]
20285 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20286 len += length(value) + length(field[++i])
20287 substed = 1
20288 } else
20289 len += 1 + keylen
20290 }
20291 if (nfields == 3 && !substed) {
20292 key = field[2]
20293 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20294 \$ac_cs_awk_read_file
20295 next
20296 }
20297 }
20298 print line
b4e70030 20299}
81ecdfbb
RW
20300\$ac_cs_awk_pipe_fini
20301_ACAWK
20302_ACEOF
20303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20304if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20305 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20306else
20307 cat
d0ac1c44
SM
20308fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20309 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
81ecdfbb
RW
20310_ACEOF
20311
d0ac1c44
SM
20312# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20313# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
81ecdfbb
RW
20314# trailing colons and then remove the whole line if VPATH becomes empty
20315# (actually we leave an empty line to preserve line numbers).
20316if test "x$srcdir" = x.; then
d0ac1c44
SM
20317 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20318h
20319s///
20320s/^/:/
20321s/[ ]*$/:/
20322s/:\$(srcdir):/:/g
20323s/:\${srcdir}:/:/g
20324s/:@srcdir@:/:/g
20325s/^:*//
81ecdfbb 20326s/:*$//
d0ac1c44
SM
20327x
20328s/\(=[ ]*\).*/\1/
20329G
20330s/\n//
81ecdfbb
RW
20331s/^[^=]*=[ ]*$//
20332}'
20333fi
20334
20335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20336fi # test -n "$CONFIG_FILES"
20337
20338# Set up the scripts for CONFIG_HEADERS section.
20339# No need to generate them if there are no CONFIG_HEADERS.
20340# This happens for instance with `./config.status Makefile'.
20341if test -n "$CONFIG_HEADERS"; then
d0ac1c44 20342cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
81ecdfbb
RW
20343BEGIN {
20344_ACEOF
20345
20346# Transform confdefs.h into an awk script `defines.awk', embedded as
20347# here-document in config.status, that substitutes the proper values into
20348# config.h.in to produce config.h.
4e8d927d 20349
81ecdfbb
RW
20350# Create a delimiter string that does not exist in confdefs.h, to ease
20351# handling of long lines.
20352ac_delim='%!_!# '
20353for ac_last_try in false false :; do
d0ac1c44
SM
20354 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20355 if test -z "$ac_tt"; then
81ecdfbb
RW
20356 break
20357 elif $ac_last_try; then
d0ac1c44 20358 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
81ecdfbb
RW
20359 else
20360 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20361 fi
20362done
4e8d927d 20363
81ecdfbb
RW
20364# For the awk script, D is an array of macro values keyed by name,
20365# likewise P contains macro parameters if any. Preserve backslash
20366# newline sequences.
20367
20368ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20369sed -n '
20370s/.\{148\}/&'"$ac_delim"'/g
20371t rset
20372:rset
20373s/^[ ]*#[ ]*define[ ][ ]*/ /
20374t def
20375d
20376:def
20377s/\\$//
20378t bsnl
20379s/["\\]/\\&/g
20380s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20381D["\1"]=" \3"/p
20382s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20383d
20384:bsnl
20385s/["\\]/\\&/g
20386s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20387D["\1"]=" \3\\\\\\n"\\/p
20388t cont
20389s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20390t cont
20391d
20392:cont
20393n
20394s/.\{148\}/&'"$ac_delim"'/g
20395t clear
20396:clear
20397s/\\$//
20398t bsnlc
20399s/["\\]/\\&/g; s/^/"/; s/$/"/p
20400d
20401:bsnlc
20402s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20403b cont
20404' <confdefs.h | sed '
20405s/'"$ac_delim"'/"\\\
20406"/g' >>$CONFIG_STATUS || ac_write_fail=1
20407
20408cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20409 for (key in D) D_is_set[key] = 1
20410 FS = "\a"
20411}
20412/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20413 line = \$ 0
20414 split(line, arg, " ")
20415 if (arg[1] == "#") {
20416 defundef = arg[2]
20417 mac1 = arg[3]
20418 } else {
20419 defundef = substr(arg[1], 2)
20420 mac1 = arg[2]
20421 }
20422 split(mac1, mac2, "(") #)
20423 macro = mac2[1]
20424 prefix = substr(line, 1, index(line, defundef) - 1)
20425 if (D_is_set[macro]) {
20426 # Preserve the white space surrounding the "#".
20427 print prefix "define", macro P[macro] D[macro]
20428 next
20429 } else {
20430 # Replace #undef with comments. This is necessary, for example,
20431 # in the case of _POSIX_SOURCE, which is predefined and required
20432 # on some systems where configure will not decide to define it.
20433 if (defundef == "undef") {
20434 print "/*", prefix defundef, macro, "*/"
20435 next
20436 }
20437 }
b4e70030 20438}
81ecdfbb
RW
20439{ print }
20440_ACAWK
b4e70030 20441_ACEOF
81ecdfbb 20442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 20443 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
81ecdfbb 20444fi # test -n "$CONFIG_HEADERS"
4e8d927d 20445
4e8d927d 20446
81ecdfbb
RW
20447eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20448shift
20449for ac_tag
20450do
20451 case $ac_tag in
20452 :[FHLC]) ac_mode=$ac_tag; continue;;
20453 esac
20454 case $ac_mode$ac_tag in
20455 :[FHL]*:*);;
d0ac1c44 20456 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
81ecdfbb
RW
20457 :[FH]-) ac_tag=-:-;;
20458 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20459 esac
20460 ac_save_IFS=$IFS
20461 IFS=:
20462 set x $ac_tag
20463 IFS=$ac_save_IFS
20464 shift
20465 ac_file=$1
20466 shift
4e8d927d 20467
81ecdfbb
RW
20468 case $ac_mode in
20469 :L) ac_source=$1;;
20470 :[FH])
20471 ac_file_inputs=
20472 for ac_f
20473 do
20474 case $ac_f in
d0ac1c44 20475 -) ac_f="$ac_tmp/stdin";;
81ecdfbb
RW
20476 *) # Look for the file first in the build tree, then in the source tree
20477 # (if the path is not absolute). The absolute path cannot be DOS-style,
20478 # because $ac_f cannot contain `:'.
20479 test -f "$ac_f" ||
20480 case $ac_f in
20481 [\\/$]*) false;;
20482 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20483 esac ||
d0ac1c44 20484 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
81ecdfbb
RW
20485 esac
20486 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20487 as_fn_append ac_file_inputs " '$ac_f'"
20488 done
20489
20490 # Let's still pretend it is `configure' which instantiates (i.e., don't
20491 # use $as_me), people would be surprised to read:
20492 # /* config.h. Generated by config.status. */
20493 configure_input='Generated from '`
20494 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20495 `' by configure.'
20496 if test x"$ac_file" != x-; then
20497 configure_input="$ac_file. $configure_input"
20498 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20499$as_echo "$as_me: creating $ac_file" >&6;}
b4e70030 20500 fi
81ecdfbb
RW
20501 # Neutralize special characters interpreted by sed in replacement strings.
20502 case $configure_input in #(
20503 *\&* | *\|* | *\\* )
20504 ac_sed_conf_input=`$as_echo "$configure_input" |
20505 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20506 *) ac_sed_conf_input=$configure_input;;
20507 esac
4e8d927d 20508
81ecdfbb 20509 case $ac_tag in
d0ac1c44
SM
20510 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20511 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
81ecdfbb
RW
20512 esac
20513 ;;
c906108c
SS
20514 esac
20515
81ecdfbb 20516 ac_dir=`$as_dirname -- "$ac_file" ||
bec39cab
AC
20517$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20518 X"$ac_file" : 'X\(//\)[^/]' \| \
20519 X"$ac_file" : 'X\(//\)$' \| \
81ecdfbb
RW
20520 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20521$as_echo X"$ac_file" |
20522 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20523 s//\1/
20524 q
20525 }
20526 /^X\(\/\/\)[^/].*/{
20527 s//\1/
20528 q
20529 }
20530 /^X\(\/\/\)$/{
20531 s//\1/
20532 q
20533 }
20534 /^X\(\/\).*/{
20535 s//\1/
20536 q
20537 }
20538 s/.*/./; q'`
20539 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20540 ac_builddir=.
20541
81ecdfbb
RW
20542case "$ac_dir" in
20543.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20544*)
20545 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20546 # A ".." for each directory in $ac_dir_suffix.
20547 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20548 case $ac_top_builddir_sub in
20549 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20550 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20551 esac ;;
20552esac
20553ac_abs_top_builddir=$ac_pwd
20554ac_abs_builddir=$ac_pwd$ac_dir_suffix
20555# for backward compatibility:
20556ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20557
20558case $srcdir in
81ecdfbb 20559 .) # We are building in place.
bec39cab 20560 ac_srcdir=.
81ecdfbb
RW
20561 ac_top_srcdir=$ac_top_builddir_sub
20562 ac_abs_top_srcdir=$ac_pwd ;;
20563 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20564 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20565 ac_top_srcdir=$srcdir
20566 ac_abs_top_srcdir=$srcdir ;;
20567 *) # Relative name.
20568 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20569 ac_top_srcdir=$ac_top_build_prefix$srcdir
20570 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20571esac
81ecdfbb 20572ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
bec39cab 20573
c906108c 20574
81ecdfbb
RW
20575 case $ac_mode in
20576 :F)
20577 #
20578 # CONFIG_FILE
20579 #
c906108c 20580
bec39cab
AC
20581 case $INSTALL in
20582 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
81ecdfbb 20583 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
c906108c 20584 esac
81ecdfbb 20585_ACEOF
121ce6e5 20586
81ecdfbb
RW
20587cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20588# If the template does not know about datarootdir, expand it.
20589# FIXME: This hack should be removed a few years after 2.60.
20590ac_datarootdir_hack=; ac_datarootdir_seen=
20591ac_sed_dataroot='
20592/datarootdir/ {
20593 p
20594 q
20595}
20596/@datadir@/p
20597/@docdir@/p
20598/@infodir@/p
20599/@localedir@/p
20600/@mandir@/p'
20601case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20602*datarootdir*) ac_datarootdir_seen=yes;;
20603*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20605$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20606_ACEOF
20607cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20608 ac_datarootdir_hack='
20609 s&@datadir@&$datadir&g
20610 s&@docdir@&$docdir&g
20611 s&@infodir@&$infodir&g
20612 s&@localedir@&$localedir&g
20613 s&@mandir@&$mandir&g
20614 s&\\\${datarootdir}&$datarootdir&g' ;;
20615esac
4e8d927d 20616_ACEOF
81ecdfbb
RW
20617
20618# Neutralize VPATH when `$srcdir' = `.'.
20619# Shell code in configure.ac might set extrasub.
20620# FIXME: do we really want to maintain this feature?
20621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20622ac_sed_extra="$ac_vpsub
bec39cab
AC
20623$extrasub
20624_ACEOF
81ecdfbb 20625cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
bec39cab
AC
20626:t
20627/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
81ecdfbb
RW
20628s|@configure_input@|$ac_sed_conf_input|;t t
20629s&@top_builddir@&$ac_top_builddir_sub&;t t
20630s&@top_build_prefix@&$ac_top_build_prefix&;t t
20631s&@srcdir@&$ac_srcdir&;t t
20632s&@abs_srcdir@&$ac_abs_srcdir&;t t
20633s&@top_srcdir@&$ac_top_srcdir&;t t
20634s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20635s&@builddir@&$ac_builddir&;t t
20636s&@abs_builddir@&$ac_abs_builddir&;t t
20637s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20638s&@INSTALL@&$ac_INSTALL&;t t
81ecdfbb
RW
20639$ac_datarootdir_hack
20640"
20641eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20642if $ac_cs_awk_getline; then
d0ac1c44 20643 $AWK -f "$ac_tmp/subs.awk"
81ecdfbb 20644else
d0ac1c44
SM
20645 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20646fi \
20647 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20648
20649test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
20650 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20651 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20652 "$ac_tmp/out"`; test -z "$ac_out"; } &&
81ecdfbb 20653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20654which seems to be undefined. Please make sure it is defined" >&5
81ecdfbb 20655$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 20656which seems to be undefined. Please make sure it is defined" >&2;}
81ecdfbb 20657
d0ac1c44 20658 rm -f "$ac_tmp/stdin"
bec39cab 20659 case $ac_file in
d0ac1c44
SM
20660 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20661 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
81ecdfbb 20662 esac \
d0ac1c44 20663 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
81ecdfbb
RW
20664 ;;
20665 :H)
20666 #
20667 # CONFIG_HEADER
20668 #
bec39cab 20669 if test x"$ac_file" != x-; then
81ecdfbb
RW
20670 {
20671 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20672 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20673 } >"$ac_tmp/config.h" \
20674 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20675 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
81ecdfbb
RW
20676 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20677$as_echo "$as_me: $ac_file is unchanged" >&6;}
bec39cab 20678 else
81ecdfbb 20679 rm -f "$ac_file"
d0ac1c44
SM
20680 mv "$ac_tmp/config.h" "$ac_file" \
20681 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
bec39cab
AC
20682 fi
20683 else
81ecdfbb 20684 $as_echo "/* $configure_input */" \
d0ac1c44
SM
20685 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20686 || as_fn_error $? "could not create -" "$LINENO" 5
bec39cab 20687 fi
81ecdfbb
RW
20688 ;;
20689 :L)
20690 #
20691 # CONFIG_LINK
20692 #
c906108c 20693
81ecdfbb
RW
20694 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20695 :
b4e70030 20696 else
81ecdfbb
RW
20697 # Prefer the file from the source tree if names are identical.
20698 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20699 ac_source=$srcdir/$ac_source
20700 fi
b4e70030 20701
81ecdfbb
RW
20702 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20703$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
b4e70030 20704
81ecdfbb 20705 if test ! -r "$ac_source"; then
d0ac1c44 20706 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
81ecdfbb
RW
20707 fi
20708 rm -f "$ac_file"
bec39cab 20709
81ecdfbb 20710 # Try a relative symlink, then a hard link, then a copy.
d0ac1c44 20711 case $ac_source in
81ecdfbb
RW
20712 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20713 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20714 esac
20715 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20716 ln "$ac_source" "$ac_file" 2>/dev/null ||
20717 cp -p "$ac_source" "$ac_file" ||
d0ac1c44 20718 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
81ecdfbb
RW
20719 fi
20720 ;;
20721 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20722$as_echo "$as_me: executing $ac_file commands" >&6;}
20723 ;;
c906108c 20724 esac
b4e70030 20725
bec39cab 20726
81ecdfbb 20727 case $ac_file$ac_mode in
c5adaa19 20728 "config.h":H) echo > stamp-h ;;
81ecdfbb 20729 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
a0a461e5 20730 "nm.h":L) echo > stamp-nmh ;;
b292c783 20731 "gcore":F) chmod +x gcore ;;
81ecdfbb 20732
bec39cab 20733 esac
81ecdfbb 20734done # for ac_tag
c906108c 20735
bec39cab 20736
81ecdfbb 20737as_fn_exit 0
bec39cab 20738_ACEOF
bec39cab
AC
20739ac_clean_files=$ac_clean_files_save
20740
81ecdfbb 20741test $ac_write_fail = 0 ||
d0ac1c44 20742 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
81ecdfbb 20743
bec39cab
AC
20744
20745# configure is writing to config.log, and then calls config.status.
20746# config.status does its own redirection, appending to config.log.
20747# Unfortunately, on DOS this fails, as config.log is still kept open
20748# by configure, so config.status won't be able to write to it; its
20749# output is simply discarded. So we exec the FD to /dev/null,
20750# effectively closing config.log, so it can be properly (re)opened and
20751# appended to by config.status. When coming back to configure, we
20752# need to make the FD available again.
20753if test "$no_create" != yes; then
20754 ac_cs_success=:
20755 ac_config_status_args=
20756 test "$silent" = yes &&
20757 ac_config_status_args="$ac_config_status_args --quiet"
20758 exec 5>/dev/null
20759 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20760 exec 5>>config.log
20761 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20762 # would make configure fail if this is the last instruction.
d0ac1c44 20763 $ac_cs_success || as_fn_exit 1
bec39cab 20764fi
c906108c 20765
bec39cab 20766#
81ecdfbb 20767# CONFIG_SUBDIRS section.
bec39cab 20768#
c906108c
SS
20769if test "$no_recursion" != yes; then
20770
81ecdfbb
RW
20771 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20772 # so they do not pile up.
c906108c
SS
20773 ac_sub_configure_args=
20774 ac_prev=
fdc59709
PB
20775 eval "set x $ac_configure_args"
20776 shift
20777 for ac_arg
20778 do
c906108c
SS
20779 if test -n "$ac_prev"; then
20780 ac_prev=
20781 continue
20782 fi
bec39cab 20783 case $ac_arg in
c906108c
SS
20784 -cache-file | --cache-file | --cache-fil | --cache-fi \
20785 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20786 ac_prev=cache_file ;;
20787 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
20788 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20789 | --c=*)
20790 ;;
20791 --config-cache | -C)
c906108c
SS
20792 ;;
20793 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20794 ac_prev=srcdir ;;
20795 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20796 ;;
bec39cab
AC
20797 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20798 ac_prev=prefix ;;
20799 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20800 ;;
81ecdfbb
RW
20801 --disable-option-checking)
20802 ;;
fdc59709
PB
20803 *)
20804 case $ac_arg in
81ecdfbb 20805 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20806 esac
81ecdfbb 20807 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
c906108c
SS
20808 esac
20809 done
20810
bec39cab
AC
20811 # Always prepend --prefix to ensure using the same prefix
20812 # in subdir configurations.
fdc59709
PB
20813 ac_arg="--prefix=$prefix"
20814 case $ac_arg in
81ecdfbb 20815 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
fdc59709 20816 esac
81ecdfbb
RW
20817 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20818
20819 # Pass --silent
20820 if test "$silent" = yes; then
20821 ac_sub_configure_args="--silent $ac_sub_configure_args"
20822 fi
20823
20824 # Always prepend --disable-option-checking to silence warnings, since
20825 # different subdirs can have different --enable and --with options.
20826 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
bec39cab 20827
b4e70030 20828 ac_popdir=`pwd`
bec39cab 20829 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
20830
20831 # Do not complain, so a configure script can configure whichever
20832 # parts of a large source tree are present.
fdc59709 20833 test -d "$srcdir/$ac_dir" || continue
c906108c 20834
81ecdfbb
RW
20835 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20836 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20837 $as_echo "$ac_msg" >&6
20838 as_dir="$ac_dir"; as_fn_mkdir_p
bec39cab
AC
20839 ac_builddir=.
20840
81ecdfbb
RW
20841case "$ac_dir" in
20842.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20843*)
20844 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20845 # A ".." for each directory in $ac_dir_suffix.
20846 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20847 case $ac_top_builddir_sub in
20848 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20849 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20850 esac ;;
20851esac
20852ac_abs_top_builddir=$ac_pwd
20853ac_abs_builddir=$ac_pwd$ac_dir_suffix
20854# for backward compatibility:
20855ac_top_builddir=$ac_top_build_prefix
bec39cab
AC
20856
20857case $srcdir in
81ecdfbb 20858 .) # We are building in place.
bec39cab 20859 ac_srcdir=.
81ecdfbb
RW
20860 ac_top_srcdir=$ac_top_builddir_sub
20861 ac_abs_top_srcdir=$ac_pwd ;;
20862 [\\/]* | ?:[\\/]* ) # Absolute name.
bec39cab 20863 ac_srcdir=$srcdir$ac_dir_suffix;
81ecdfbb
RW
20864 ac_top_srcdir=$srcdir
20865 ac_abs_top_srcdir=$srcdir ;;
20866 *) # Relative name.
20867 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20868 ac_top_srcdir=$ac_top_build_prefix$srcdir
20869 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
bec39cab 20870esac
81ecdfbb 20871ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
c906108c 20872
c906108c 20873
fdc59709 20874 cd "$ac_dir"
c906108c
SS
20875
20876 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
20877 if test -f "$ac_srcdir/configure.gnu"; then
20878 ac_sub_configure=$ac_srcdir/configure.gnu
20879 elif test -f "$ac_srcdir/configure"; then
20880 ac_sub_configure=$ac_srcdir/configure
20881 elif test -f "$ac_srcdir/configure.in"; then
20882 # This should be Cygnus configure.
20883 ac_sub_configure=$ac_aux_dir/configure
c906108c 20884 else
81ecdfbb
RW
20885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20886$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
20887 ac_sub_configure=
20888 fi
20889
20890 # The recursion is here.
20891 if test -n "$ac_sub_configure"; then
c906108c 20892 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
20893 case $cache_file in
20894 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
81ecdfbb
RW
20895 *) # Relative name.
20896 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
c906108c 20897 esac
c906108c 20898
81ecdfbb
RW
20899 { $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
20900$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 20901 # The eval makes quoting arguments work.
fdc59709
PB
20902 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20903 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
d0ac1c44 20904 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
c906108c
SS
20905 fi
20906
fdc59709 20907 cd "$ac_popdir"
c906108c
SS
20908 done
20909fi
81ecdfbb
RW
20910if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20912$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20913fi
c906108c 20914
This page took 3.384073 seconds and 4 git commands to generate.