]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/configure
binutils, gdb: support zstd compressed debug sections
[thirdparty/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_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.
43 if 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 --'
47 elif (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'
50 else
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'
70 fi
71
72 # The user is always right.
73 if 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 }
79 fi
80
81
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.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
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
100 IFS=$as_save_IFS
101
102 ;;
103 esac
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.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
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.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
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.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $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
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if 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
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
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
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
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
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
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
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
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.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $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
257 exit 255
258 fi
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."
266 else
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."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_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.
315 as_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"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
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.
373 if (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 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # 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.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
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
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
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
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
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'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
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 |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
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; }
487
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
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
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `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';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
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.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_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.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="main.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 enable_option_checking=no
623 ac_header_list=
624 ac_subst_vars='LTLIBOBJS
625 LIBOBJS
626 GCORE_TRANSFORM_NAME
627 GDB_TRANSFORM_NAME
628 XSLTPROC
629 NM_H
630 GDB_NM_FILE
631 LTLIBXXHASH
632 LIBXXHASH
633 HAVE_LIBXXHASH
634 CTF_DEPS
635 LIBCTF
636 LTLIBBABELTRACE
637 LIBBABELTRACE
638 HAVE_LIBBABELTRACE
639 LIBBACKTRACE_LIB
640 LIBBACKTRACE_INC
641 HAVE_NATIVE_GCORE_HOST
642 NAT_GENERATED_FILES
643 XM_CLIBS
644 MH_CFLAGS
645 LOADLIBES
646 NAT_CDEPS
647 NATDEPFILES
648 NAT_FILE
649 target_subdir
650 CONFIG_UNINSTALL
651 CONFIG_INSTALL
652 CONFIG_CLEAN
653 CONFIG_ALL
654 CONFIG_SRCS
655 CONFIG_DEPS
656 CONFIG_OBS
657 PROFILE_CFLAGS
658 ENABLE_CFLAGS
659 SIM_OBS
660 SIM
661 XMKMF
662 GDBTK_SRC_DIR
663 GDBTK_CFLAGS
664 GDBTKLIBS
665 X_LIBS
666 X_LDFLAGS
667 X_CFLAGS
668 TK_XINCLUDES
669 TK_DEPS
670 TK_LIBRARY
671 TK_INCLUDE
672 TK_STUB_LIB_SPEC
673 TK_STUB_LIB_FLAG
674 TK_STUB_LIB_FILE
675 TK_LIB_SPEC
676 TK_LIB_FLAG
677 TK_LIB_FILE
678 TK_SRC_DIR
679 TK_BIN_DIR
680 TK_VERSION
681 TCL_DEPS
682 TCL_LIBRARY
683 TCL_INCLUDE
684 TCL_STUB_LIB_SPEC
685 TCL_STUB_LIB_FLAG
686 TCL_STUB_LIB_FILE
687 TCL_LIB_SPEC
688 TCL_LIB_FLAG
689 TCL_LIB_FILE
690 TCL_SRC_DIR
691 TCL_BIN_DIR
692 TCL_PATCH_LEVEL
693 TCL_VERSION
694 WIN32LDAPP
695 WIN32LIBS
696 GUI_CFLAGS_X
697 LIBGUI
698 LTLIBLZMA
699 LIBLZMA
700 HAVE_LIBLZMA
701 SER_HARDWIRE
702 WERROR_CFLAGS
703 WARN_CFLAGS
704 SYSTEM_GDBINIT_DIR
705 SYSTEM_GDBINIT
706 TARGET_SYSTEM_ROOT
707 CONFIG_LDFLAGS
708 RDYNAMIC
709 LTLIBIPT
710 LIBIPT
711 HAVE_LIBIPT
712 PTHREAD_CFLAGS
713 PTHREAD_LIBS
714 PTHREAD_CC
715 ax_pthread_config
716 SED
717 ALLOCA
718 SRCHIGH_CFLAGS
719 SRCHIGH_LIBS
720 HAVE_GUILE_FALSE
721 HAVE_GUILE_TRUE
722 GUILE_LIBS
723 GUILE_CPPFLAGS
724 GUILD_TARGET_FLAG
725 GUILD
726 pkg_config_prog_path
727 HAVE_PYTHON_FALSE
728 HAVE_PYTHON_TRUE
729 PYTHON_LIBS
730 PYTHON_CPPFLAGS
731 PYTHON_CFLAGS
732 python_prog_path
733 LTLIBMPFR
734 LIBMPFR
735 HAVE_LIBMPFR
736 LTLIBGMP
737 LIBGMP
738 HAVE_LIBGMP
739 LTLIBEXPAT
740 LIBEXPAT
741 HAVE_LIBEXPAT
742 JIT_READER_DIR
743 TARGET_PTR
744 READLINE_TEXI_INCFLAG
745 READLINE_CFLAGS
746 READLINE_DEPS
747 READLINE
748 LTLIBICONV
749 LIBICONV
750 ZSTD_LIBS
751 ZSTD_CFLAGS
752 zlibinc
753 zlibdir
754 MIG
755 WINDRES
756 DLLTOOL
757 AR
758 YFLAGS
759 YACC
760 RANLIB
761 LN_S
762 INSTALL_DATA
763 INSTALL_SCRIPT
764 INSTALL_PROGRAM
765 AWK
766 REPORT_BUGS_TEXI
767 REPORT_BUGS_TO
768 PKGVERSION
769 CODESIGN_CERT
770 DEBUGINFOD_LIBS
771 DEBUGINFOD_CFLAGS
772 PKG_CONFIG_LIBDIR
773 PKG_CONFIG_PATH
774 PKG_CONFIG
775 HAVE_NATIVE_GCORE_TARGET
776 TARGET_OBS
777 ENABLE_BFD_64_BIT_FALSE
778 ENABLE_BFD_64_BIT_TRUE
779 subdirs
780 GDB_DATADIR
781 DEBUGDIR
782 MAKEINFO_EXTRA_FLAGS
783 MAKEINFOFLAGS
784 MAKEINFO
785 PACKAGE
786 CATOBJEXT
787 GENCAT
788 INSTOBJEXT
789 DATADIRNAME
790 CATALOGS
791 POSUB
792 GMSGFMT
793 XGETTEXT
794 INCINTL
795 LIBINTL_DEP
796 LIBINTL
797 USE_NLS
798 CCDEPMODE
799 DEPDIR
800 am__leading_dot
801 CXX_DIALECT
802 HAVE_CXX11
803 target_noncanonical
804 INSTALL_STRIP_PROGRAM
805 STRIP
806 install_sh
807 LARGEFILE_CPPFLAGS
808 target_os
809 target_vendor
810 target_cpu
811 target
812 host_os
813 host_vendor
814 host_cpu
815 host
816 build_os
817 build_vendor
818 build_cpu
819 build
820 EGREP
821 GREP
822 CPP
823 ac_ct_CXX
824 CXXFLAGS
825 CXX
826 OBJEXT
827 EXEEXT
828 ac_ct_CC
829 CPPFLAGS
830 LDFLAGS
831 CFLAGS
832 CC
833 MAINT
834 MAINTAINER_MODE_FALSE
835 MAINTAINER_MODE_TRUE
836 target_alias
837 host_alias
838 build_alias
839 LIBS
840 ECHO_T
841 ECHO_N
842 ECHO_C
843 DEFS
844 mandir
845 localedir
846 libdir
847 psdir
848 pdfdir
849 dvidir
850 htmldir
851 infodir
852 docdir
853 oldincludedir
854 includedir
855 localstatedir
856 sharedstatedir
857 sysconfdir
858 datadir
859 datarootdir
860 libexecdir
861 sbindir
862 bindir
863 program_transform_name
864 prefix
865 exec_prefix
866 PACKAGE_URL
867 PACKAGE_BUGREPORT
868 PACKAGE_STRING
869 PACKAGE_VERSION
870 PACKAGE_TARNAME
871 PACKAGE_NAME
872 PATH_SEPARATOR
873 SHELL'
874 ac_subst_files='nat_makefile_frag'
875 ac_user_opts='
876 enable_option_checking
877 enable_maintainer_mode
878 enable_plugins
879 enable_largefile
880 with_separate_debug_dir
881 with_gdb_datadir
882 with_relocated_sources
883 with_auto_load_dir
884 with_auto_load_safe_path
885 enable_targets
886 enable_64_bit_bfd
887 enable_gdbmi
888 enable_tui
889 enable_gdbtk
890 with_debuginfod
891 with_libunwind_ia64
892 with_curses
893 enable_profiling
894 enable_codesign
895 with_pkgversion
896 with_bugurl
897 with_system_zlib
898 with_zstd
899 with_gnu_ld
900 enable_rpath
901 with_libiconv_prefix
902 with_libiconv_type
903 with_iconv_bin
904 with_system_readline
905 with_jit_reader_dir
906 with_expat
907 with_libexpat_prefix
908 with_libexpat_type
909 with_libgmp_prefix
910 with_libgmp_type
911 with_mpfr
912 with_libmpfr_prefix
913 with_libmpfr_type
914 with_python
915 with_python_libdir
916 with_guile
917 enable_source_highlight
918 enable_threading
919 with_intel_pt
920 with_libipt_prefix
921 with_libipt_type
922 with_sysroot
923 with_system_gdbinit
924 with_system_gdbinit_dir
925 enable_werror
926 enable_build_warnings
927 enable_gdb_build_warnings
928 enable_ubsan
929 with_lzma
930 with_liblzma_prefix
931 with_liblzma_type
932 with_tcl
933 with_tk
934 with_x
935 enable_sim
936 enable_libbacktrace
937 with_babeltrace
938 with_libbabeltrace_prefix
939 with_libbabeltrace_type
940 with_xxhash
941 enable_libctf
942 with_libxxhash_prefix
943 with_libxxhash_type
944 enable_unit_tests
945 '
946 ac_precious_vars='build_alias
947 host_alias
948 target_alias
949 CC
950 CFLAGS
951 LDFLAGS
952 LIBS
953 CPPFLAGS
954 CXX
955 CXXFLAGS
956 CCC
957 CPP
958 MAKEINFO
959 MAKEINFOFLAGS
960 PKG_CONFIG
961 PKG_CONFIG_PATH
962 PKG_CONFIG_LIBDIR
963 DEBUGINFOD_CFLAGS
964 DEBUGINFOD_LIBS
965 YACC
966 YFLAGS
967 ZSTD_CFLAGS
968 ZSTD_LIBS
969 XMKMF'
970 ac_subdirs_all='testsuite
971 gdbtk'
972
973 # Initialize some variables set by options.
974 ac_init_help=
975 ac_init_version=false
976 ac_unrecognized_opts=
977 ac_unrecognized_sep=
978 # The variables have the same names as the options, with
979 # dashes changed to underlines.
980 cache_file=/dev/null
981 exec_prefix=NONE
982 no_create=
983 no_recursion=
984 prefix=NONE
985 program_prefix=NONE
986 program_suffix=NONE
987 program_transform_name=s,x,x,
988 silent=
989 site=
990 srcdir=
991 verbose=
992 x_includes=NONE
993 x_libraries=NONE
994
995 # Installation directory options.
996 # These are left unexpanded so users can "make install exec_prefix=/foo"
997 # and all the variables that are supposed to be based on exec_prefix
998 # by default will actually change.
999 # Use braces instead of parens because sh, perl, etc. also accept them.
1000 # (The list follows the same order as the GNU Coding Standards.)
1001 bindir='${exec_prefix}/bin'
1002 sbindir='${exec_prefix}/sbin'
1003 libexecdir='${exec_prefix}/libexec'
1004 datarootdir='${prefix}/share'
1005 datadir='${datarootdir}'
1006 sysconfdir='${prefix}/etc'
1007 sharedstatedir='${prefix}/com'
1008 localstatedir='${prefix}/var'
1009 includedir='${prefix}/include'
1010 oldincludedir='/usr/include'
1011 docdir='${datarootdir}/doc/${PACKAGE}'
1012 infodir='${datarootdir}/info'
1013 htmldir='${docdir}'
1014 dvidir='${docdir}'
1015 pdfdir='${docdir}'
1016 psdir='${docdir}'
1017 libdir='${exec_prefix}/lib'
1018 localedir='${datarootdir}/locale'
1019 mandir='${datarootdir}/man'
1020
1021 ac_prev=
1022 ac_dashdash=
1023 for ac_option
1024 do
1025 # If the previous option needs an argument, assign it.
1026 if test -n "$ac_prev"; then
1027 eval $ac_prev=\$ac_option
1028 ac_prev=
1029 continue
1030 fi
1031
1032 case $ac_option in
1033 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1034 *=) ac_optarg= ;;
1035 *) ac_optarg=yes ;;
1036 esac
1037
1038 # Accept the important Cygnus configure options, so we can diagnose typos.
1039
1040 case $ac_dashdash$ac_option in
1041 --)
1042 ac_dashdash=yes ;;
1043
1044 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1045 ac_prev=bindir ;;
1046 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1047 bindir=$ac_optarg ;;
1048
1049 -build | --build | --buil | --bui | --bu)
1050 ac_prev=build_alias ;;
1051 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1052 build_alias=$ac_optarg ;;
1053
1054 -cache-file | --cache-file | --cache-fil | --cache-fi \
1055 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1056 ac_prev=cache_file ;;
1057 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1058 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1059 cache_file=$ac_optarg ;;
1060
1061 --config-cache | -C)
1062 cache_file=config.cache ;;
1063
1064 -datadir | --datadir | --datadi | --datad)
1065 ac_prev=datadir ;;
1066 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1067 datadir=$ac_optarg ;;
1068
1069 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1070 | --dataroo | --dataro | --datar)
1071 ac_prev=datarootdir ;;
1072 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1073 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1074 datarootdir=$ac_optarg ;;
1075
1076 -disable-* | --disable-*)
1077 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1078 # Reject names that are not valid shell variable names.
1079 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1080 as_fn_error $? "invalid feature name: $ac_useropt"
1081 ac_useropt_orig=$ac_useropt
1082 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1083 case $ac_user_opts in
1084 *"
1085 "enable_$ac_useropt"
1086 "*) ;;
1087 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1088 ac_unrecognized_sep=', ';;
1089 esac
1090 eval enable_$ac_useropt=no ;;
1091
1092 -docdir | --docdir | --docdi | --doc | --do)
1093 ac_prev=docdir ;;
1094 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1095 docdir=$ac_optarg ;;
1096
1097 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1098 ac_prev=dvidir ;;
1099 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1100 dvidir=$ac_optarg ;;
1101
1102 -enable-* | --enable-*)
1103 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1104 # Reject names that are not valid shell variable names.
1105 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1106 as_fn_error $? "invalid feature name: $ac_useropt"
1107 ac_useropt_orig=$ac_useropt
1108 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1109 case $ac_user_opts in
1110 *"
1111 "enable_$ac_useropt"
1112 "*) ;;
1113 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1114 ac_unrecognized_sep=', ';;
1115 esac
1116 eval enable_$ac_useropt=\$ac_optarg ;;
1117
1118 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1119 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1120 | --exec | --exe | --ex)
1121 ac_prev=exec_prefix ;;
1122 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1123 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1124 | --exec=* | --exe=* | --ex=*)
1125 exec_prefix=$ac_optarg ;;
1126
1127 -gas | --gas | --ga | --g)
1128 # Obsolete; use --with-gas.
1129 with_gas=yes ;;
1130
1131 -help | --help | --hel | --he | -h)
1132 ac_init_help=long ;;
1133 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1134 ac_init_help=recursive ;;
1135 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1136 ac_init_help=short ;;
1137
1138 -host | --host | --hos | --ho)
1139 ac_prev=host_alias ;;
1140 -host=* | --host=* | --hos=* | --ho=*)
1141 host_alias=$ac_optarg ;;
1142
1143 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1144 ac_prev=htmldir ;;
1145 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1146 | --ht=*)
1147 htmldir=$ac_optarg ;;
1148
1149 -includedir | --includedir | --includedi | --included | --include \
1150 | --includ | --inclu | --incl | --inc)
1151 ac_prev=includedir ;;
1152 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1153 | --includ=* | --inclu=* | --incl=* | --inc=*)
1154 includedir=$ac_optarg ;;
1155
1156 -infodir | --infodir | --infodi | --infod | --info | --inf)
1157 ac_prev=infodir ;;
1158 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1159 infodir=$ac_optarg ;;
1160
1161 -libdir | --libdir | --libdi | --libd)
1162 ac_prev=libdir ;;
1163 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1164 libdir=$ac_optarg ;;
1165
1166 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1167 | --libexe | --libex | --libe)
1168 ac_prev=libexecdir ;;
1169 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1170 | --libexe=* | --libex=* | --libe=*)
1171 libexecdir=$ac_optarg ;;
1172
1173 -localedir | --localedir | --localedi | --localed | --locale)
1174 ac_prev=localedir ;;
1175 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1176 localedir=$ac_optarg ;;
1177
1178 -localstatedir | --localstatedir | --localstatedi | --localstated \
1179 | --localstate | --localstat | --localsta | --localst | --locals)
1180 ac_prev=localstatedir ;;
1181 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1182 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1183 localstatedir=$ac_optarg ;;
1184
1185 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1186 ac_prev=mandir ;;
1187 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1188 mandir=$ac_optarg ;;
1189
1190 -nfp | --nfp | --nf)
1191 # Obsolete; use --without-fp.
1192 with_fp=no ;;
1193
1194 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1195 | --no-cr | --no-c | -n)
1196 no_create=yes ;;
1197
1198 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1199 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1200 no_recursion=yes ;;
1201
1202 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1203 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1204 | --oldin | --oldi | --old | --ol | --o)
1205 ac_prev=oldincludedir ;;
1206 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1207 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1208 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1209 oldincludedir=$ac_optarg ;;
1210
1211 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1212 ac_prev=prefix ;;
1213 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1214 prefix=$ac_optarg ;;
1215
1216 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1217 | --program-pre | --program-pr | --program-p)
1218 ac_prev=program_prefix ;;
1219 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1220 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1221 program_prefix=$ac_optarg ;;
1222
1223 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1224 | --program-suf | --program-su | --program-s)
1225 ac_prev=program_suffix ;;
1226 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1227 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1228 program_suffix=$ac_optarg ;;
1229
1230 -program-transform-name | --program-transform-name \
1231 | --program-transform-nam | --program-transform-na \
1232 | --program-transform-n | --program-transform- \
1233 | --program-transform | --program-transfor \
1234 | --program-transfo | --program-transf \
1235 | --program-trans | --program-tran \
1236 | --progr-tra | --program-tr | --program-t)
1237 ac_prev=program_transform_name ;;
1238 -program-transform-name=* | --program-transform-name=* \
1239 | --program-transform-nam=* | --program-transform-na=* \
1240 | --program-transform-n=* | --program-transform-=* \
1241 | --program-transform=* | --program-transfor=* \
1242 | --program-transfo=* | --program-transf=* \
1243 | --program-trans=* | --program-tran=* \
1244 | --progr-tra=* | --program-tr=* | --program-t=*)
1245 program_transform_name=$ac_optarg ;;
1246
1247 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1248 ac_prev=pdfdir ;;
1249 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1250 pdfdir=$ac_optarg ;;
1251
1252 -psdir | --psdir | --psdi | --psd | --ps)
1253 ac_prev=psdir ;;
1254 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1255 psdir=$ac_optarg ;;
1256
1257 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1258 | -silent | --silent | --silen | --sile | --sil)
1259 silent=yes ;;
1260
1261 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1262 ac_prev=sbindir ;;
1263 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1264 | --sbi=* | --sb=*)
1265 sbindir=$ac_optarg ;;
1266
1267 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1268 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1269 | --sharedst | --shareds | --shared | --share | --shar \
1270 | --sha | --sh)
1271 ac_prev=sharedstatedir ;;
1272 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1273 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1274 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1275 | --sha=* | --sh=*)
1276 sharedstatedir=$ac_optarg ;;
1277
1278 -site | --site | --sit)
1279 ac_prev=site ;;
1280 -site=* | --site=* | --sit=*)
1281 site=$ac_optarg ;;
1282
1283 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1284 ac_prev=srcdir ;;
1285 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1286 srcdir=$ac_optarg ;;
1287
1288 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1289 | --syscon | --sysco | --sysc | --sys | --sy)
1290 ac_prev=sysconfdir ;;
1291 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1292 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1293 sysconfdir=$ac_optarg ;;
1294
1295 -target | --target | --targe | --targ | --tar | --ta | --t)
1296 ac_prev=target_alias ;;
1297 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1298 target_alias=$ac_optarg ;;
1299
1300 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1301 verbose=yes ;;
1302
1303 -version | --version | --versio | --versi | --vers | -V)
1304 ac_init_version=: ;;
1305
1306 -with-* | --with-*)
1307 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1308 # Reject names that are not valid shell variable names.
1309 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1310 as_fn_error $? "invalid package name: $ac_useropt"
1311 ac_useropt_orig=$ac_useropt
1312 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1313 case $ac_user_opts in
1314 *"
1315 "with_$ac_useropt"
1316 "*) ;;
1317 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1318 ac_unrecognized_sep=', ';;
1319 esac
1320 eval with_$ac_useropt=\$ac_optarg ;;
1321
1322 -without-* | --without-*)
1323 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1324 # Reject names that are not valid shell variable names.
1325 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1326 as_fn_error $? "invalid package name: $ac_useropt"
1327 ac_useropt_orig=$ac_useropt
1328 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1329 case $ac_user_opts in
1330 *"
1331 "with_$ac_useropt"
1332 "*) ;;
1333 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1334 ac_unrecognized_sep=', ';;
1335 esac
1336 eval with_$ac_useropt=no ;;
1337
1338 --x)
1339 # Obsolete; use --with-x.
1340 with_x=yes ;;
1341
1342 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1343 | --x-incl | --x-inc | --x-in | --x-i)
1344 ac_prev=x_includes ;;
1345 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1346 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1347 x_includes=$ac_optarg ;;
1348
1349 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1350 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1351 ac_prev=x_libraries ;;
1352 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1353 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1354 x_libraries=$ac_optarg ;;
1355
1356 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1357 Try \`$0 --help' for more information"
1358 ;;
1359
1360 *=*)
1361 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1362 # Reject names that are not valid shell variable names.
1363 case $ac_envvar in #(
1364 '' | [0-9]* | *[!_$as_cr_alnum]* )
1365 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1366 esac
1367 eval $ac_envvar=\$ac_optarg
1368 export $ac_envvar ;;
1369
1370 *)
1371 # FIXME: should be removed in autoconf 3.0.
1372 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1373 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1374 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1375 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1376 ;;
1377
1378 esac
1379 done
1380
1381 if test -n "$ac_prev"; then
1382 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1383 as_fn_error $? "missing argument to $ac_option"
1384 fi
1385
1386 if test -n "$ac_unrecognized_opts"; then
1387 case $enable_option_checking in
1388 no) ;;
1389 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1390 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1391 esac
1392 fi
1393
1394 # Check all directory arguments for consistency.
1395 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1396 datadir sysconfdir sharedstatedir localstatedir includedir \
1397 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1398 libdir localedir mandir
1399 do
1400 eval ac_val=\$$ac_var
1401 # Remove trailing slashes.
1402 case $ac_val in
1403 */ )
1404 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1405 eval $ac_var=\$ac_val;;
1406 esac
1407 # Be sure to have absolute directory names.
1408 case $ac_val in
1409 [\\/$]* | ?:[\\/]* ) continue;;
1410 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1411 esac
1412 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1413 done
1414
1415 # There might be people who depend on the old broken behavior: `$host'
1416 # used to hold the argument of --host etc.
1417 # FIXME: To remove some day.
1418 build=$build_alias
1419 host=$host_alias
1420 target=$target_alias
1421
1422 # FIXME: To remove some day.
1423 if test "x$host_alias" != x; then
1424 if test "x$build_alias" = x; then
1425 cross_compiling=maybe
1426 elif test "x$build_alias" != "x$host_alias"; then
1427 cross_compiling=yes
1428 fi
1429 fi
1430
1431 ac_tool_prefix=
1432 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1433
1434 test "$silent" = yes && exec 6>/dev/null
1435
1436
1437 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1438 ac_ls_di=`ls -di .` &&
1439 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1440 as_fn_error $? "working directory cannot be determined"
1441 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1442 as_fn_error $? "pwd does not report name of working directory"
1443
1444
1445 # Find the source files, if location was not specified.
1446 if test -z "$srcdir"; then
1447 ac_srcdir_defaulted=yes
1448 # Try the directory containing this script, then the parent directory.
1449 ac_confdir=`$as_dirname -- "$as_myself" ||
1450 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1451 X"$as_myself" : 'X\(//\)[^/]' \| \
1452 X"$as_myself" : 'X\(//\)$' \| \
1453 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1454 $as_echo X"$as_myself" |
1455 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1456 s//\1/
1457 q
1458 }
1459 /^X\(\/\/\)[^/].*/{
1460 s//\1/
1461 q
1462 }
1463 /^X\(\/\/\)$/{
1464 s//\1/
1465 q
1466 }
1467 /^X\(\/\).*/{
1468 s//\1/
1469 q
1470 }
1471 s/.*/./; q'`
1472 srcdir=$ac_confdir
1473 if test ! -r "$srcdir/$ac_unique_file"; then
1474 srcdir=..
1475 fi
1476 else
1477 ac_srcdir_defaulted=no
1478 fi
1479 if test ! -r "$srcdir/$ac_unique_file"; then
1480 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1481 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1482 fi
1483 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1484 ac_abs_confdir=`(
1485 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1486 pwd)`
1487 # When building in place, set srcdir=.
1488 if test "$ac_abs_confdir" = "$ac_pwd"; then
1489 srcdir=.
1490 fi
1491 # Remove unnecessary trailing slashes from srcdir.
1492 # Double slashes in file names in object file debugging info
1493 # mess up M-x gdb in Emacs.
1494 case $srcdir in
1495 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1496 esac
1497 for ac_var in $ac_precious_vars; do
1498 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1499 eval ac_env_${ac_var}_value=\$${ac_var}
1500 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1501 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1502 done
1503
1504 #
1505 # Report the --help message.
1506 #
1507 if test "$ac_init_help" = "long"; then
1508 # Omit some internal or obsolete options to make the list less imposing.
1509 # This message is too long to be a string in the A/UX 3.1 sh.
1510 cat <<_ACEOF
1511 \`configure' configures this package to adapt to many kinds of systems.
1512
1513 Usage: $0 [OPTION]... [VAR=VALUE]...
1514
1515 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1516 VAR=VALUE. See below for descriptions of some of the useful variables.
1517
1518 Defaults for the options are specified in brackets.
1519
1520 Configuration:
1521 -h, --help display this help and exit
1522 --help=short display options specific to this package
1523 --help=recursive display the short help of all the included packages
1524 -V, --version display version information and exit
1525 -q, --quiet, --silent do not print \`checking ...' messages
1526 --cache-file=FILE cache test results in FILE [disabled]
1527 -C, --config-cache alias for \`--cache-file=config.cache'
1528 -n, --no-create do not create output files
1529 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1530
1531 Installation directories:
1532 --prefix=PREFIX install architecture-independent files in PREFIX
1533 [$ac_default_prefix]
1534 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1535 [PREFIX]
1536
1537 By default, \`make install' will install all the files in
1538 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1539 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1540 for instance \`--prefix=\$HOME'.
1541
1542 For better control, use the options below.
1543
1544 Fine tuning of the installation directories:
1545 --bindir=DIR user executables [EPREFIX/bin]
1546 --sbindir=DIR system admin executables [EPREFIX/sbin]
1547 --libexecdir=DIR program executables [EPREFIX/libexec]
1548 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1549 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1550 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1551 --libdir=DIR object code libraries [EPREFIX/lib]
1552 --includedir=DIR C header files [PREFIX/include]
1553 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1554 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1555 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1556 --infodir=DIR info documentation [DATAROOTDIR/info]
1557 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1558 --mandir=DIR man documentation [DATAROOTDIR/man]
1559 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1560 --htmldir=DIR html documentation [DOCDIR]
1561 --dvidir=DIR dvi documentation [DOCDIR]
1562 --pdfdir=DIR pdf documentation [DOCDIR]
1563 --psdir=DIR ps documentation [DOCDIR]
1564 _ACEOF
1565
1566 cat <<\_ACEOF
1567
1568 Program names:
1569 --program-prefix=PREFIX prepend PREFIX to installed program names
1570 --program-suffix=SUFFIX append SUFFIX to installed program names
1571 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1572
1573 X features:
1574 --x-includes=DIR X include files are in DIR
1575 --x-libraries=DIR X library files are in DIR
1576
1577 System types:
1578 --build=BUILD configure for building on BUILD [guessed]
1579 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1580 --target=TARGET configure for building compilers for TARGET [HOST]
1581 _ACEOF
1582 fi
1583
1584 if test -n "$ac_init_help"; then
1585
1586 cat <<\_ACEOF
1587
1588 Optional Features:
1589 --disable-option-checking ignore unrecognized --enable/--with options
1590 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1591 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1592 --enable-maintainer-mode
1593 enable make rules and dependencies not useful (and
1594 sometimes confusing) to the casual installer
1595 --enable-plugins Enable support for plugins
1596 --disable-largefile omit support for large files
1597 --enable-targets=TARGETS
1598 alternative target configurations
1599 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1600 --disable-gdbmi disable machine-interface (MI)
1601 --enable-tui enable full-screen terminal user interface (TUI)
1602 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1603 --enable-profiling enable profiling of GDB
1604 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1605 --disable-rpath do not hardcode runtime library paths
1606 --enable-source-highlight
1607 enable source-highlight for source listings
1608 --enable-threading include support for parallel processing of data
1609 (yes/no)
1610 --enable-werror treat compile warnings as errors
1611 --enable-build-warnings enable build-time compiler warnings if gcc is used
1612 --enable-gdb-build-warnings
1613 enable GDB specific build-time compiler warnings if
1614 gcc is used
1615 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1616 --enable-sim link gdb with simulator
1617 --enable-libbacktrace use libbacktrace to write a backtrace after a fatal
1618 signal.
1619 --enable-libctf Handle .ctf type-info sections [default=yes]
1620 --enable-unit-tests Enable the inclusion of unit tests when compiling
1621 GDB
1622
1623 Optional Packages:
1624 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1625 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1626 --with-separate-debug-dir=PATH
1627 look for global separate debug info in this path
1628 [LIBDIR/debug]
1629 --with-gdb-datadir=PATH look for global separate data files in this path
1630 [DATADIR/gdb]
1631 --with-relocated-sources=PATH
1632 automatically relocate this path for source files
1633 --with-auto-load-dir=PATH
1634 directories from which to load auto-loaded scripts
1635 [$debugdir:$datadir/auto-load]
1636 --with-auto-load-safe-path=PATH
1637 directories safe to hold auto-loaded files
1638 [--with-auto-load-dir]
1639 --without-auto-load-safe-path
1640 do not restrict auto-loaded files locations
1641 --with-debuginfod Enable debuginfo lookups with debuginfod
1642 (auto/yes/no)
1643 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1644 --with-curses use the curses library instead of the termcap
1645 library
1646 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1647 --with-bugurl=URL Direct users to URL to report a bug
1648 --with-system-zlib use installed libz
1649 --with-zstd support zstd compressed debug sections
1650 (default=auto)
1651 --with-gnu-ld assume the C compiler uses GNU ld default=no
1652 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1653 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1654 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1655 --with-iconv-bin=PATH specify where to find the iconv program
1656 --with-system-readline use installed readline library
1657 --with-jit-reader-dir=PATH
1658 directory to load the JIT readers from
1659 --with-expat include expat support (auto/yes/no)
1660 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1661 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1662 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1663 --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib
1664 --without-libgmp-prefix don't search for libgmp in includedir and libdir
1665 --with-libgmp-type=TYPE type of library to search for (auto/static/shared)
1666 --with-mpfr include MPFR support (auto/yes/no)
1667 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1668 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1669 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1670 --with-python[=PYTHON] include python support
1671 (auto/yes/no/<python-program>)
1672 --with-python-libdir[=DIR]
1673 search for python's libraries in DIR
1674 --with-guile[=GUILE] include guile support
1675 (auto/yes/no/<guile-version>/<pkg-config-program>)
1676 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1677 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1678 --without-libipt-prefix don't search for libipt in includedir and libdir
1679 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1680 --with-sysroot[=DIR] search for usr/lib et al within DIR
1681 --with-system-gdbinit=PATH
1682 automatically load a system-wide gdbinit file
1683 --with-system-gdbinit-dir=PATH
1684 automatically load system-wide gdbinit files from
1685 this directory
1686 --with-lzma support lzma compression (auto/yes/no)
1687 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1688 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1689 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1690 --with-tcl directory containing tcl configuration (tclConfig.sh)
1691 --with-tk directory containing tk configuration (tkConfig.sh)
1692 --with-x use the X Window System
1693 --with-babeltrace include babeltrace support (auto/yes/no)
1694 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1695 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1696 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1697 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1698 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1699 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1700 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1701
1702 Some influential environment variables:
1703 CC C compiler command
1704 CFLAGS C compiler flags
1705 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1706 nonstandard directory <lib dir>
1707 LIBS libraries to pass to the linker, e.g. -l<library>
1708 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1709 you have headers in a nonstandard directory <include dir>
1710 CXX C++ compiler command
1711 CXXFLAGS C++ compiler flags
1712 CPP C preprocessor
1713 MAKEINFO Parent configure detects if it is of sufficient version.
1714 MAKEINFOFLAGS
1715 Parameters for MAKEINFO.
1716 PKG_CONFIG path to pkg-config utility
1717 PKG_CONFIG_PATH
1718 directories to add to pkg-config's search path
1719 PKG_CONFIG_LIBDIR
1720 path overriding pkg-config's built-in search path
1721 DEBUGINFOD_CFLAGS
1722 C compiler flags for DEBUGINFOD, overriding pkg-config
1723 DEBUGINFOD_LIBS
1724 linker flags for DEBUGINFOD, overriding pkg-config
1725 YACC The `Yet Another Compiler Compiler' implementation to use.
1726 Defaults to the first program found out of: `bison -y', `byacc',
1727 `yacc'.
1728 YFLAGS The list of arguments that will be passed by default to $YACC.
1729 This script will default YFLAGS to the empty string to avoid a
1730 default value of `-d' given by some make applications.
1731 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1732 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1733 XMKMF Path to xmkmf, Makefile generator for X Window System
1734
1735 Use these variables to override the choices made by `configure' or to help
1736 it to find libraries and programs with nonstandard names/locations.
1737
1738 Report bugs to the package provider.
1739 _ACEOF
1740 ac_status=$?
1741 fi
1742
1743 if test "$ac_init_help" = "recursive"; then
1744 # If there are subdirs, report their specific --help.
1745 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1746 test -d "$ac_dir" ||
1747 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1748 continue
1749 ac_builddir=.
1750
1751 case "$ac_dir" in
1752 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1753 *)
1754 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1755 # A ".." for each directory in $ac_dir_suffix.
1756 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1757 case $ac_top_builddir_sub in
1758 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1759 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1760 esac ;;
1761 esac
1762 ac_abs_top_builddir=$ac_pwd
1763 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1764 # for backward compatibility:
1765 ac_top_builddir=$ac_top_build_prefix
1766
1767 case $srcdir in
1768 .) # We are building in place.
1769 ac_srcdir=.
1770 ac_top_srcdir=$ac_top_builddir_sub
1771 ac_abs_top_srcdir=$ac_pwd ;;
1772 [\\/]* | ?:[\\/]* ) # Absolute name.
1773 ac_srcdir=$srcdir$ac_dir_suffix;
1774 ac_top_srcdir=$srcdir
1775 ac_abs_top_srcdir=$srcdir ;;
1776 *) # Relative name.
1777 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1778 ac_top_srcdir=$ac_top_build_prefix$srcdir
1779 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1780 esac
1781 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1782
1783 cd "$ac_dir" || { ac_status=$?; continue; }
1784 # Check for guested configure.
1785 if test -f "$ac_srcdir/configure.gnu"; then
1786 echo &&
1787 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1788 elif test -f "$ac_srcdir/configure"; then
1789 echo &&
1790 $SHELL "$ac_srcdir/configure" --help=recursive
1791 else
1792 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1793 fi || ac_status=$?
1794 cd "$ac_pwd" || { ac_status=$?; break; }
1795 done
1796 fi
1797
1798 test -n "$ac_init_help" && exit $ac_status
1799 if $ac_init_version; then
1800 cat <<\_ACEOF
1801 configure
1802 generated by GNU Autoconf 2.69
1803
1804 Copyright (C) 2012 Free Software Foundation, Inc.
1805 This configure script is free software; the Free Software Foundation
1806 gives unlimited permission to copy, distribute and modify it.
1807 _ACEOF
1808 exit
1809 fi
1810
1811 ## ------------------------ ##
1812 ## Autoconf initialization. ##
1813 ## ------------------------ ##
1814
1815 # ac_fn_c_try_compile LINENO
1816 # --------------------------
1817 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1818 ac_fn_c_try_compile ()
1819 {
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 rm -f conftest.$ac_objext
1822 if { { ac_try="$ac_compile"
1823 case "(($ac_try" in
1824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1825 *) ac_try_echo=$ac_try;;
1826 esac
1827 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1828 $as_echo "$ac_try_echo"; } >&5
1829 (eval "$ac_compile") 2>conftest.err
1830 ac_status=$?
1831 if test -s conftest.err; then
1832 grep -v '^ *+' conftest.err >conftest.er1
1833 cat conftest.er1 >&5
1834 mv -f conftest.er1 conftest.err
1835 fi
1836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837 test $ac_status = 0; } && {
1838 test -z "$ac_c_werror_flag" ||
1839 test ! -s conftest.err
1840 } && test -s conftest.$ac_objext; then :
1841 ac_retval=0
1842 else
1843 $as_echo "$as_me: failed program was:" >&5
1844 sed 's/^/| /' conftest.$ac_ext >&5
1845
1846 ac_retval=1
1847 fi
1848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1849 as_fn_set_status $ac_retval
1850
1851 } # ac_fn_c_try_compile
1852
1853 # ac_fn_cxx_try_compile LINENO
1854 # ----------------------------
1855 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1856 ac_fn_cxx_try_compile ()
1857 {
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 rm -f conftest.$ac_objext
1860 if { { ac_try="$ac_compile"
1861 case "(($ac_try" in
1862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1863 *) ac_try_echo=$ac_try;;
1864 esac
1865 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1866 $as_echo "$ac_try_echo"; } >&5
1867 (eval "$ac_compile") 2>conftest.err
1868 ac_status=$?
1869 if test -s conftest.err; then
1870 grep -v '^ *+' conftest.err >conftest.er1
1871 cat conftest.er1 >&5
1872 mv -f conftest.er1 conftest.err
1873 fi
1874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1875 test $ac_status = 0; } && {
1876 test -z "$ac_cxx_werror_flag" ||
1877 test ! -s conftest.err
1878 } && test -s conftest.$ac_objext; then :
1879 ac_retval=0
1880 else
1881 $as_echo "$as_me: failed program was:" >&5
1882 sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=1
1885 fi
1886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1887 as_fn_set_status $ac_retval
1888
1889 } # ac_fn_cxx_try_compile
1890
1891 # ac_fn_c_try_cpp LINENO
1892 # ----------------------
1893 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1894 ac_fn_c_try_cpp ()
1895 {
1896 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1897 if { { ac_try="$ac_cpp conftest.$ac_ext"
1898 case "(($ac_try" in
1899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900 *) ac_try_echo=$ac_try;;
1901 esac
1902 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903 $as_echo "$ac_try_echo"; } >&5
1904 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1905 ac_status=$?
1906 if test -s conftest.err; then
1907 grep -v '^ *+' conftest.err >conftest.er1
1908 cat conftest.er1 >&5
1909 mv -f conftest.er1 conftest.err
1910 fi
1911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912 test $ac_status = 0; } > conftest.i && {
1913 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1914 test ! -s conftest.err
1915 }; then :
1916 ac_retval=0
1917 else
1918 $as_echo "$as_me: failed program was:" >&5
1919 sed 's/^/| /' conftest.$ac_ext >&5
1920
1921 ac_retval=1
1922 fi
1923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1924 as_fn_set_status $ac_retval
1925
1926 } # ac_fn_c_try_cpp
1927
1928 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1929 # -------------------------------------------------------
1930 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1931 # the include files in INCLUDES and setting the cache variable VAR
1932 # accordingly.
1933 ac_fn_c_check_header_mongrel ()
1934 {
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 if eval \${$3+:} false; then :
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938 $as_echo_n "checking for $2... " >&6; }
1939 if eval \${$3+:} false; then :
1940 $as_echo_n "(cached) " >&6
1941 fi
1942 eval ac_res=\$$3
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1944 $as_echo "$ac_res" >&6; }
1945 else
1946 # Is the header compilable?
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1948 $as_echo_n "checking $2 usability... " >&6; }
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950 /* end confdefs.h. */
1951 $4
1952 #include <$2>
1953 _ACEOF
1954 if ac_fn_c_try_compile "$LINENO"; then :
1955 ac_header_compiler=yes
1956 else
1957 ac_header_compiler=no
1958 fi
1959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1961 $as_echo "$ac_header_compiler" >&6; }
1962
1963 # Is the header present?
1964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1965 $as_echo_n "checking $2 presence... " >&6; }
1966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967 /* end confdefs.h. */
1968 #include <$2>
1969 _ACEOF
1970 if ac_fn_c_try_cpp "$LINENO"; then :
1971 ac_header_preproc=yes
1972 else
1973 ac_header_preproc=no
1974 fi
1975 rm -f conftest.err conftest.i conftest.$ac_ext
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1977 $as_echo "$ac_header_preproc" >&6; }
1978
1979 # So? What about this header?
1980 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1981 yes:no: )
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1983 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1985 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1986 ;;
1987 no:yes:* )
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1989 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1991 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1993 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1995 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1997 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1998 ;;
1999 esac
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2001 $as_echo_n "checking for $2... " >&6; }
2002 if eval \${$3+:} false; then :
2003 $as_echo_n "(cached) " >&6
2004 else
2005 eval "$3=\$ac_header_compiler"
2006 fi
2007 eval ac_res=\$$3
2008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2009 $as_echo "$ac_res" >&6; }
2010 fi
2011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012
2013 } # ac_fn_c_check_header_mongrel
2014
2015 # ac_fn_c_try_run LINENO
2016 # ----------------------
2017 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2018 # that executables *can* be run.
2019 ac_fn_c_try_run ()
2020 {
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 if { { ac_try="$ac_link"
2023 case "(($ac_try" in
2024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2025 *) ac_try_echo=$ac_try;;
2026 esac
2027 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2028 $as_echo "$ac_try_echo"; } >&5
2029 (eval "$ac_link") 2>&5
2030 ac_status=$?
2031 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2032 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2033 { { case "(($ac_try" in
2034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035 *) ac_try_echo=$ac_try;;
2036 esac
2037 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038 $as_echo "$ac_try_echo"; } >&5
2039 (eval "$ac_try") 2>&5
2040 ac_status=$?
2041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2042 test $ac_status = 0; }; }; then :
2043 ac_retval=0
2044 else
2045 $as_echo "$as_me: program exited with status $ac_status" >&5
2046 $as_echo "$as_me: failed program was:" >&5
2047 sed 's/^/| /' conftest.$ac_ext >&5
2048
2049 ac_retval=$ac_status
2050 fi
2051 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2052 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2053 as_fn_set_status $ac_retval
2054
2055 } # ac_fn_c_try_run
2056
2057 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2058 # -------------------------------------------------------
2059 # Tests whether HEADER exists and can be compiled using the include files in
2060 # INCLUDES, setting the cache variable VAR accordingly.
2061 ac_fn_c_check_header_compile ()
2062 {
2063 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2065 $as_echo_n "checking for $2... " >&6; }
2066 if eval \${$3+:} false; then :
2067 $as_echo_n "(cached) " >&6
2068 else
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070 /* end confdefs.h. */
2071 $4
2072 #include <$2>
2073 _ACEOF
2074 if ac_fn_c_try_compile "$LINENO"; then :
2075 eval "$3=yes"
2076 else
2077 eval "$3=no"
2078 fi
2079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 fi
2081 eval ac_res=\$$3
2082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083 $as_echo "$ac_res" >&6; }
2084 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2085
2086 } # ac_fn_c_check_header_compile
2087
2088 # ac_fn_c_try_link LINENO
2089 # -----------------------
2090 # Try to link conftest.$ac_ext, and return whether this succeeded.
2091 ac_fn_c_try_link ()
2092 {
2093 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2094 rm -f conftest.$ac_objext conftest$ac_exeext
2095 if { { ac_try="$ac_link"
2096 case "(($ac_try" in
2097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2098 *) ac_try_echo=$ac_try;;
2099 esac
2100 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2101 $as_echo "$ac_try_echo"; } >&5
2102 (eval "$ac_link") 2>conftest.err
2103 ac_status=$?
2104 if test -s conftest.err; then
2105 grep -v '^ *+' conftest.err >conftest.er1
2106 cat conftest.er1 >&5
2107 mv -f conftest.er1 conftest.err
2108 fi
2109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2110 test $ac_status = 0; } && {
2111 test -z "$ac_c_werror_flag" ||
2112 test ! -s conftest.err
2113 } && test -s conftest$ac_exeext && {
2114 test "$cross_compiling" = yes ||
2115 test -x conftest$ac_exeext
2116 }; then :
2117 ac_retval=0
2118 else
2119 $as_echo "$as_me: failed program was:" >&5
2120 sed 's/^/| /' conftest.$ac_ext >&5
2121
2122 ac_retval=1
2123 fi
2124 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2125 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2126 # interfere with the next link command; also delete a directory that is
2127 # left behind by Apple's compiler. We do this before executing the actions.
2128 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2129 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2130 as_fn_set_status $ac_retval
2131
2132 } # ac_fn_c_try_link
2133
2134 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2135 # --------------------------------------------
2136 # Tries to find the compile-time value of EXPR in a program that includes
2137 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2138 # computed
2139 ac_fn_c_compute_int ()
2140 {
2141 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2142 if test "$cross_compiling" = yes; then
2143 # Depending upon the size, compute the lo and hi bounds.
2144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145 /* end confdefs.h. */
2146 $4
2147 int
2148 main ()
2149 {
2150 static int test_array [1 - 2 * !(($2) >= 0)];
2151 test_array [0] = 0;
2152 return test_array [0];
2153
2154 ;
2155 return 0;
2156 }
2157 _ACEOF
2158 if ac_fn_c_try_compile "$LINENO"; then :
2159 ac_lo=0 ac_mid=0
2160 while :; do
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162 /* end confdefs.h. */
2163 $4
2164 int
2165 main ()
2166 {
2167 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2168 test_array [0] = 0;
2169 return test_array [0];
2170
2171 ;
2172 return 0;
2173 }
2174 _ACEOF
2175 if ac_fn_c_try_compile "$LINENO"; then :
2176 ac_hi=$ac_mid; break
2177 else
2178 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2179 if test $ac_lo -le $ac_mid; then
2180 ac_lo= ac_hi=
2181 break
2182 fi
2183 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2184 fi
2185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186 done
2187 else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189 /* end confdefs.h. */
2190 $4
2191 int
2192 main ()
2193 {
2194 static int test_array [1 - 2 * !(($2) < 0)];
2195 test_array [0] = 0;
2196 return test_array [0];
2197
2198 ;
2199 return 0;
2200 }
2201 _ACEOF
2202 if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_hi=-1 ac_mid=-1
2204 while :; do
2205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206 /* end confdefs.h. */
2207 $4
2208 int
2209 main ()
2210 {
2211 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2212 test_array [0] = 0;
2213 return test_array [0];
2214
2215 ;
2216 return 0;
2217 }
2218 _ACEOF
2219 if ac_fn_c_try_compile "$LINENO"; then :
2220 ac_lo=$ac_mid; break
2221 else
2222 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2223 if test $ac_mid -le $ac_hi; then
2224 ac_lo= ac_hi=
2225 break
2226 fi
2227 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2228 fi
2229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2230 done
2231 else
2232 ac_lo= ac_hi=
2233 fi
2234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2235 fi
2236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2237 # Binary search between lo and hi bounds.
2238 while test "x$ac_lo" != "x$ac_hi"; do
2239 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241 /* end confdefs.h. */
2242 $4
2243 int
2244 main ()
2245 {
2246 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2247 test_array [0] = 0;
2248 return test_array [0];
2249
2250 ;
2251 return 0;
2252 }
2253 _ACEOF
2254 if ac_fn_c_try_compile "$LINENO"; then :
2255 ac_hi=$ac_mid
2256 else
2257 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2258 fi
2259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260 done
2261 case $ac_lo in #((
2262 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2263 '') ac_retval=1 ;;
2264 esac
2265 else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267 /* end confdefs.h. */
2268 $4
2269 static long int longval () { return $2; }
2270 static unsigned long int ulongval () { return $2; }
2271 #include <stdio.h>
2272 #include <stdlib.h>
2273 int
2274 main ()
2275 {
2276
2277 FILE *f = fopen ("conftest.val", "w");
2278 if (! f)
2279 return 1;
2280 if (($2) < 0)
2281 {
2282 long int i = longval ();
2283 if (i != ($2))
2284 return 1;
2285 fprintf (f, "%ld", i);
2286 }
2287 else
2288 {
2289 unsigned long int i = ulongval ();
2290 if (i != ($2))
2291 return 1;
2292 fprintf (f, "%lu", i);
2293 }
2294 /* Do not output a trailing newline, as this causes \r\n confusion
2295 on some platforms. */
2296 return ferror (f) || fclose (f) != 0;
2297
2298 ;
2299 return 0;
2300 }
2301 _ACEOF
2302 if ac_fn_c_try_run "$LINENO"; then :
2303 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2304 else
2305 ac_retval=1
2306 fi
2307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2308 conftest.$ac_objext conftest.beam conftest.$ac_ext
2309 rm -f conftest.val
2310
2311 fi
2312 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2313 as_fn_set_status $ac_retval
2314
2315 } # ac_fn_c_compute_int
2316
2317 # ac_fn_c_check_func LINENO FUNC VAR
2318 # ----------------------------------
2319 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2320 ac_fn_c_check_func ()
2321 {
2322 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2324 $as_echo_n "checking for $2... " >&6; }
2325 if eval \${$3+:} false; then :
2326 $as_echo_n "(cached) " >&6
2327 else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h. */
2330 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2331 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2332 #define $2 innocuous_$2
2333
2334 /* System header to define __stub macros and hopefully few prototypes,
2335 which can conflict with char $2 (); below.
2336 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2337 <limits.h> exists even on freestanding compilers. */
2338
2339 #ifdef __STDC__
2340 # include <limits.h>
2341 #else
2342 # include <assert.h>
2343 #endif
2344
2345 #undef $2
2346
2347 /* Override any GCC internal prototype to avoid an error.
2348 Use char because int might match the return type of a GCC
2349 builtin and then its argument prototype would still apply. */
2350 #ifdef __cplusplus
2351 extern "C"
2352 #endif
2353 char $2 ();
2354 /* The GNU C library defines this for functions which it implements
2355 to always fail with ENOSYS. Some functions are actually named
2356 something starting with __ and the normal name is an alias. */
2357 #if defined __stub_$2 || defined __stub___$2
2358 choke me
2359 #endif
2360
2361 int
2362 main ()
2363 {
2364 return $2 ();
2365 ;
2366 return 0;
2367 }
2368 _ACEOF
2369 if ac_fn_c_try_link "$LINENO"; then :
2370 eval "$3=yes"
2371 else
2372 eval "$3=no"
2373 fi
2374 rm -f core conftest.err conftest.$ac_objext \
2375 conftest$ac_exeext conftest.$ac_ext
2376 fi
2377 eval ac_res=\$$3
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2379 $as_echo "$ac_res" >&6; }
2380 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381
2382 } # ac_fn_c_check_func
2383
2384 # ac_fn_cxx_try_link LINENO
2385 # -------------------------
2386 # Try to link conftest.$ac_ext, and return whether this succeeded.
2387 ac_fn_cxx_try_link ()
2388 {
2389 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2390 rm -f conftest.$ac_objext conftest$ac_exeext
2391 if { { ac_try="$ac_link"
2392 case "(($ac_try" in
2393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394 *) ac_try_echo=$ac_try;;
2395 esac
2396 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397 $as_echo "$ac_try_echo"; } >&5
2398 (eval "$ac_link") 2>conftest.err
2399 ac_status=$?
2400 if test -s conftest.err; then
2401 grep -v '^ *+' conftest.err >conftest.er1
2402 cat conftest.er1 >&5
2403 mv -f conftest.er1 conftest.err
2404 fi
2405 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406 test $ac_status = 0; } && {
2407 test -z "$ac_cxx_werror_flag" ||
2408 test ! -s conftest.err
2409 } && test -s conftest$ac_exeext && {
2410 test "$cross_compiling" = yes ||
2411 test -x conftest$ac_exeext
2412 }; then :
2413 ac_retval=0
2414 else
2415 $as_echo "$as_me: failed program was:" >&5
2416 sed 's/^/| /' conftest.$ac_ext >&5
2417
2418 ac_retval=1
2419 fi
2420 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2421 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2422 # interfere with the next link command; also delete a directory that is
2423 # left behind by Apple's compiler. We do this before executing the actions.
2424 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2425 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2426 as_fn_set_status $ac_retval
2427
2428 } # ac_fn_cxx_try_link
2429
2430 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2431 # -------------------------------------------
2432 # Tests whether TYPE exists after having included INCLUDES, setting cache
2433 # variable VAR accordingly.
2434 ac_fn_c_check_type ()
2435 {
2436 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2438 $as_echo_n "checking for $2... " >&6; }
2439 if eval \${$3+:} false; then :
2440 $as_echo_n "(cached) " >&6
2441 else
2442 eval "$3=no"
2443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2444 /* end confdefs.h. */
2445 $4
2446 int
2447 main ()
2448 {
2449 if (sizeof ($2))
2450 return 0;
2451 ;
2452 return 0;
2453 }
2454 _ACEOF
2455 if ac_fn_c_try_compile "$LINENO"; then :
2456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2457 /* end confdefs.h. */
2458 $4
2459 int
2460 main ()
2461 {
2462 if (sizeof (($2)))
2463 return 0;
2464 ;
2465 return 0;
2466 }
2467 _ACEOF
2468 if ac_fn_c_try_compile "$LINENO"; then :
2469
2470 else
2471 eval "$3=yes"
2472 fi
2473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2474 fi
2475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2476 fi
2477 eval ac_res=\$$3
2478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2479 $as_echo "$ac_res" >&6; }
2480 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481
2482 } # ac_fn_c_check_type
2483
2484 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2485 # ---------------------------------------------
2486 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2487 # accordingly.
2488 ac_fn_c_check_decl ()
2489 {
2490 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491 as_decl_name=`echo $2|sed 's/ *(.*//'`
2492 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2494 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2495 if eval \${$3+:} false; then :
2496 $as_echo_n "(cached) " >&6
2497 else
2498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2499 /* end confdefs.h. */
2500 $4
2501 int
2502 main ()
2503 {
2504 #ifndef $as_decl_name
2505 #ifdef __cplusplus
2506 (void) $as_decl_use;
2507 #else
2508 (void) $as_decl_name;
2509 #endif
2510 #endif
2511
2512 ;
2513 return 0;
2514 }
2515 _ACEOF
2516 if ac_fn_c_try_compile "$LINENO"; then :
2517 eval "$3=yes"
2518 else
2519 eval "$3=no"
2520 fi
2521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2522 fi
2523 eval ac_res=\$$3
2524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2525 $as_echo "$ac_res" >&6; }
2526 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2527
2528 } # ac_fn_c_check_decl
2529
2530 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2531 # ----------------------------------------------------
2532 # Tries to find if the field MEMBER exists in type AGGR, after including
2533 # INCLUDES, setting cache variable VAR accordingly.
2534 ac_fn_c_check_member ()
2535 {
2536 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2538 $as_echo_n "checking for $2.$3... " >&6; }
2539 if eval \${$4+:} false; then :
2540 $as_echo_n "(cached) " >&6
2541 else
2542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2543 /* end confdefs.h. */
2544 $5
2545 int
2546 main ()
2547 {
2548 static $2 ac_aggr;
2549 if (ac_aggr.$3)
2550 return 0;
2551 ;
2552 return 0;
2553 }
2554 _ACEOF
2555 if ac_fn_c_try_compile "$LINENO"; then :
2556 eval "$4=yes"
2557 else
2558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2559 /* end confdefs.h. */
2560 $5
2561 int
2562 main ()
2563 {
2564 static $2 ac_aggr;
2565 if (sizeof ac_aggr.$3)
2566 return 0;
2567 ;
2568 return 0;
2569 }
2570 _ACEOF
2571 if ac_fn_c_try_compile "$LINENO"; then :
2572 eval "$4=yes"
2573 else
2574 eval "$4=no"
2575 fi
2576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2577 fi
2578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2579 fi
2580 eval ac_res=\$$4
2581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2582 $as_echo "$ac_res" >&6; }
2583 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2584
2585 } # ac_fn_c_check_member
2586
2587 # ac_fn_cxx_check_func LINENO FUNC VAR
2588 # ------------------------------------
2589 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2590 ac_fn_cxx_check_func ()
2591 {
2592 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2594 $as_echo_n "checking for $2... " >&6; }
2595 if eval \${$3+:} false; then :
2596 $as_echo_n "(cached) " >&6
2597 else
2598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599 /* end confdefs.h. */
2600 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2601 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2602 #define $2 innocuous_$2
2603
2604 /* System header to define __stub macros and hopefully few prototypes,
2605 which can conflict with char $2 (); below.
2606 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2607 <limits.h> exists even on freestanding compilers. */
2608
2609 #ifdef __STDC__
2610 # include <limits.h>
2611 #else
2612 # include <assert.h>
2613 #endif
2614
2615 #undef $2
2616
2617 /* Override any GCC internal prototype to avoid an error.
2618 Use char because int might match the return type of a GCC
2619 builtin and then its argument prototype would still apply. */
2620 #ifdef __cplusplus
2621 extern "C"
2622 #endif
2623 char $2 ();
2624 /* The GNU C library defines this for functions which it implements
2625 to always fail with ENOSYS. Some functions are actually named
2626 something starting with __ and the normal name is an alias. */
2627 #if defined __stub_$2 || defined __stub___$2
2628 choke me
2629 #endif
2630
2631 int
2632 main ()
2633 {
2634 return $2 ();
2635 ;
2636 return 0;
2637 }
2638 _ACEOF
2639 if ac_fn_cxx_try_link "$LINENO"; then :
2640 eval "$3=yes"
2641 else
2642 eval "$3=no"
2643 fi
2644 rm -f core conftest.err conftest.$ac_objext \
2645 conftest$ac_exeext conftest.$ac_ext
2646 fi
2647 eval ac_res=\$$3
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2649 $as_echo "$ac_res" >&6; }
2650 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2651
2652 } # ac_fn_cxx_check_func
2653 cat >config.log <<_ACEOF
2654 This file contains any messages produced by compilers while
2655 running configure, to aid debugging if configure makes a mistake.
2656
2657 It was created by $as_me, which was
2658 generated by GNU Autoconf 2.69. Invocation command line was
2659
2660 $ $0 $@
2661
2662 _ACEOF
2663 exec 5>>config.log
2664 {
2665 cat <<_ASUNAME
2666 ## --------- ##
2667 ## Platform. ##
2668 ## --------- ##
2669
2670 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2671 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2672 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2673 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2674 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2675
2676 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2677 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2678
2679 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2680 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2681 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2682 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2683 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2684 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2685 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2686
2687 _ASUNAME
2688
2689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2690 for as_dir in $PATH
2691 do
2692 IFS=$as_save_IFS
2693 test -z "$as_dir" && as_dir=.
2694 $as_echo "PATH: $as_dir"
2695 done
2696 IFS=$as_save_IFS
2697
2698 } >&5
2699
2700 cat >&5 <<_ACEOF
2701
2702
2703 ## ----------- ##
2704 ## Core tests. ##
2705 ## ----------- ##
2706
2707 _ACEOF
2708
2709
2710 # Keep a trace of the command line.
2711 # Strip out --no-create and --no-recursion so they do not pile up.
2712 # Strip out --silent because we don't want to record it for future runs.
2713 # Also quote any args containing shell meta-characters.
2714 # Make two passes to allow for proper duplicate-argument suppression.
2715 ac_configure_args=
2716 ac_configure_args0=
2717 ac_configure_args1=
2718 ac_must_keep_next=false
2719 for ac_pass in 1 2
2720 do
2721 for ac_arg
2722 do
2723 case $ac_arg in
2724 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2725 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2726 | -silent | --silent | --silen | --sile | --sil)
2727 continue ;;
2728 *\'*)
2729 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2730 esac
2731 case $ac_pass in
2732 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2733 2)
2734 as_fn_append ac_configure_args1 " '$ac_arg'"
2735 if test $ac_must_keep_next = true; then
2736 ac_must_keep_next=false # Got value, back to normal.
2737 else
2738 case $ac_arg in
2739 *=* | --config-cache | -C | -disable-* | --disable-* \
2740 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2741 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2742 | -with-* | --with-* | -without-* | --without-* | --x)
2743 case "$ac_configure_args0 " in
2744 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2745 esac
2746 ;;
2747 -* ) ac_must_keep_next=true ;;
2748 esac
2749 fi
2750 as_fn_append ac_configure_args " '$ac_arg'"
2751 ;;
2752 esac
2753 done
2754 done
2755 { ac_configure_args0=; unset ac_configure_args0;}
2756 { ac_configure_args1=; unset ac_configure_args1;}
2757
2758 # When interrupted or exit'd, cleanup temporary files, and complete
2759 # config.log. We remove comments because anyway the quotes in there
2760 # would cause problems or look ugly.
2761 # WARNING: Use '\'' to represent an apostrophe within the trap.
2762 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2763 trap 'exit_status=$?
2764 # Save into config.log some information that might help in debugging.
2765 {
2766 echo
2767
2768 $as_echo "## ---------------- ##
2769 ## Cache variables. ##
2770 ## ---------------- ##"
2771 echo
2772 # The following way of writing the cache mishandles newlines in values,
2773 (
2774 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2775 eval ac_val=\$$ac_var
2776 case $ac_val in #(
2777 *${as_nl}*)
2778 case $ac_var in #(
2779 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2780 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2781 esac
2782 case $ac_var in #(
2783 _ | IFS | as_nl) ;; #(
2784 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2785 *) { eval $ac_var=; unset $ac_var;} ;;
2786 esac ;;
2787 esac
2788 done
2789 (set) 2>&1 |
2790 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2791 *${as_nl}ac_space=\ *)
2792 sed -n \
2793 "s/'\''/'\''\\\\'\'''\''/g;
2794 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2795 ;; #(
2796 *)
2797 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2798 ;;
2799 esac |
2800 sort
2801 )
2802 echo
2803
2804 $as_echo "## ----------------- ##
2805 ## Output variables. ##
2806 ## ----------------- ##"
2807 echo
2808 for ac_var in $ac_subst_vars
2809 do
2810 eval ac_val=\$$ac_var
2811 case $ac_val in
2812 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2813 esac
2814 $as_echo "$ac_var='\''$ac_val'\''"
2815 done | sort
2816 echo
2817
2818 if test -n "$ac_subst_files"; then
2819 $as_echo "## ------------------- ##
2820 ## File substitutions. ##
2821 ## ------------------- ##"
2822 echo
2823 for ac_var in $ac_subst_files
2824 do
2825 eval ac_val=\$$ac_var
2826 case $ac_val in
2827 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2828 esac
2829 $as_echo "$ac_var='\''$ac_val'\''"
2830 done | sort
2831 echo
2832 fi
2833
2834 if test -s confdefs.h; then
2835 $as_echo "## ----------- ##
2836 ## confdefs.h. ##
2837 ## ----------- ##"
2838 echo
2839 cat confdefs.h
2840 echo
2841 fi
2842 test "$ac_signal" != 0 &&
2843 $as_echo "$as_me: caught signal $ac_signal"
2844 $as_echo "$as_me: exit $exit_status"
2845 } >&5
2846 rm -f core *.core core.conftest.* &&
2847 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2848 exit $exit_status
2849 ' 0
2850 for ac_signal in 1 2 13 15; do
2851 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2852 done
2853 ac_signal=0
2854
2855 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2856 rm -f -r conftest* confdefs.h
2857
2858 $as_echo "/* confdefs.h */" > confdefs.h
2859
2860 # Predefined preprocessor variables.
2861
2862 cat >>confdefs.h <<_ACEOF
2863 #define PACKAGE_NAME "$PACKAGE_NAME"
2864 _ACEOF
2865
2866 cat >>confdefs.h <<_ACEOF
2867 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2868 _ACEOF
2869
2870 cat >>confdefs.h <<_ACEOF
2871 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2872 _ACEOF
2873
2874 cat >>confdefs.h <<_ACEOF
2875 #define PACKAGE_STRING "$PACKAGE_STRING"
2876 _ACEOF
2877
2878 cat >>confdefs.h <<_ACEOF
2879 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2880 _ACEOF
2881
2882 cat >>confdefs.h <<_ACEOF
2883 #define PACKAGE_URL "$PACKAGE_URL"
2884 _ACEOF
2885
2886
2887 # Let the site file select an alternate cache file if it wants to.
2888 # Prefer an explicitly selected file to automatically selected ones.
2889 ac_site_file1=NONE
2890 ac_site_file2=NONE
2891 if test -n "$CONFIG_SITE"; then
2892 # We do not want a PATH search for config.site.
2893 case $CONFIG_SITE in #((
2894 -*) ac_site_file1=./$CONFIG_SITE;;
2895 */*) ac_site_file1=$CONFIG_SITE;;
2896 *) ac_site_file1=./$CONFIG_SITE;;
2897 esac
2898 elif test "x$prefix" != xNONE; then
2899 ac_site_file1=$prefix/share/config.site
2900 ac_site_file2=$prefix/etc/config.site
2901 else
2902 ac_site_file1=$ac_default_prefix/share/config.site
2903 ac_site_file2=$ac_default_prefix/etc/config.site
2904 fi
2905 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2906 do
2907 test "x$ac_site_file" = xNONE && continue
2908 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2910 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2911 sed 's/^/| /' "$ac_site_file" >&5
2912 . "$ac_site_file" \
2913 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2914 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2915 as_fn_error $? "failed to load site script $ac_site_file
2916 See \`config.log' for more details" "$LINENO" 5; }
2917 fi
2918 done
2919
2920 if test -r "$cache_file"; then
2921 # Some versions of bash will fail to source /dev/null (special files
2922 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2923 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2925 $as_echo "$as_me: loading cache $cache_file" >&6;}
2926 case $cache_file in
2927 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2928 *) . "./$cache_file";;
2929 esac
2930 fi
2931 else
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2933 $as_echo "$as_me: creating cache $cache_file" >&6;}
2934 >$cache_file
2935 fi
2936
2937 as_fn_append ac_header_list " stdlib.h"
2938 as_fn_append ac_header_list " unistd.h"
2939 as_fn_append ac_header_list " sys/param.h"
2940 # Check that the precious variables saved in the cache have kept the same
2941 # value.
2942 ac_cache_corrupted=false
2943 for ac_var in $ac_precious_vars; do
2944 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2945 eval ac_new_set=\$ac_env_${ac_var}_set
2946 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2947 eval ac_new_val=\$ac_env_${ac_var}_value
2948 case $ac_old_set,$ac_new_set in
2949 set,)
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2951 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2952 ac_cache_corrupted=: ;;
2953 ,set)
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2955 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2956 ac_cache_corrupted=: ;;
2957 ,);;
2958 *)
2959 if test "x$ac_old_val" != "x$ac_new_val"; then
2960 # differences in whitespace do not lead to failure.
2961 ac_old_val_w=`echo x $ac_old_val`
2962 ac_new_val_w=`echo x $ac_new_val`
2963 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2965 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2966 ac_cache_corrupted=:
2967 else
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2969 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2970 eval $ac_var=\$ac_old_val
2971 fi
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2973 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2975 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2976 fi;;
2977 esac
2978 # Pass precious variables to config.status.
2979 if test "$ac_new_set" = set; then
2980 case $ac_new_val in
2981 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2982 *) ac_arg=$ac_var=$ac_new_val ;;
2983 esac
2984 case " $ac_configure_args " in
2985 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2986 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2987 esac
2988 fi
2989 done
2990 if $ac_cache_corrupted; then
2991 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2992 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2994 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2995 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2996 fi
2997 ## -------------------- ##
2998 ## Main body of script. ##
2999 ## -------------------- ##
3000
3001 ac_ext=c
3002 ac_cpp='$CPP $CPPFLAGS'
3003 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3004 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3005 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3006
3007
3008
3009
3010
3011
3012
3013 ac_config_headers="$ac_config_headers config.h:config.in"
3014
3015
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3017 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3018 # Check whether --enable-maintainer-mode was given.
3019 if test "${enable_maintainer_mode+set}" = set; then :
3020 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3021 else
3022 USE_MAINTAINER_MODE=no
3023 fi
3024
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3026 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3027 if test $USE_MAINTAINER_MODE = yes; then
3028 MAINTAINER_MODE_TRUE=
3029 MAINTAINER_MODE_FALSE='#'
3030 else
3031 MAINTAINER_MODE_TRUE='#'
3032 MAINTAINER_MODE_FALSE=
3033 fi
3034
3035 MAINT=$MAINTAINER_MODE_TRUE
3036
3037
3038
3039 ac_ext=c
3040 ac_cpp='$CPP $CPPFLAGS'
3041 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3042 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3043 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3044 if test -n "$ac_tool_prefix"; then
3045 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3046 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3048 $as_echo_n "checking for $ac_word... " >&6; }
3049 if ${ac_cv_prog_CC+:} false; then :
3050 $as_echo_n "(cached) " >&6
3051 else
3052 if test -n "$CC"; then
3053 ac_cv_prog_CC="$CC" # Let the user override the test.
3054 else
3055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3056 for as_dir in $PATH
3057 do
3058 IFS=$as_save_IFS
3059 test -z "$as_dir" && as_dir=.
3060 for ac_exec_ext in '' $ac_executable_extensions; do
3061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3062 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3064 break 2
3065 fi
3066 done
3067 done
3068 IFS=$as_save_IFS
3069
3070 fi
3071 fi
3072 CC=$ac_cv_prog_CC
3073 if test -n "$CC"; then
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3075 $as_echo "$CC" >&6; }
3076 else
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078 $as_echo "no" >&6; }
3079 fi
3080
3081
3082 fi
3083 if test -z "$ac_cv_prog_CC"; then
3084 ac_ct_CC=$CC
3085 # Extract the first word of "gcc", so it can be a program name with args.
3086 set dummy gcc; ac_word=$2
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3088 $as_echo_n "checking for $ac_word... " >&6; }
3089 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3090 $as_echo_n "(cached) " >&6
3091 else
3092 if test -n "$ac_ct_CC"; then
3093 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3094 else
3095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3096 for as_dir in $PATH
3097 do
3098 IFS=$as_save_IFS
3099 test -z "$as_dir" && as_dir=.
3100 for ac_exec_ext in '' $ac_executable_extensions; do
3101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3102 ac_cv_prog_ac_ct_CC="gcc"
3103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3104 break 2
3105 fi
3106 done
3107 done
3108 IFS=$as_save_IFS
3109
3110 fi
3111 fi
3112 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3113 if test -n "$ac_ct_CC"; then
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3115 $as_echo "$ac_ct_CC" >&6; }
3116 else
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3118 $as_echo "no" >&6; }
3119 fi
3120
3121 if test "x$ac_ct_CC" = x; then
3122 CC=""
3123 else
3124 case $cross_compiling:$ac_tool_warned in
3125 yes:)
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3127 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3128 ac_tool_warned=yes ;;
3129 esac
3130 CC=$ac_ct_CC
3131 fi
3132 else
3133 CC="$ac_cv_prog_CC"
3134 fi
3135
3136 if test -z "$CC"; then
3137 if test -n "$ac_tool_prefix"; then
3138 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3139 set dummy ${ac_tool_prefix}cc; ac_word=$2
3140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3141 $as_echo_n "checking for $ac_word... " >&6; }
3142 if ${ac_cv_prog_CC+:} false; then :
3143 $as_echo_n "(cached) " >&6
3144 else
3145 if test -n "$CC"; then
3146 ac_cv_prog_CC="$CC" # Let the user override the test.
3147 else
3148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3149 for as_dir in $PATH
3150 do
3151 IFS=$as_save_IFS
3152 test -z "$as_dir" && as_dir=.
3153 for ac_exec_ext in '' $ac_executable_extensions; do
3154 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3155 ac_cv_prog_CC="${ac_tool_prefix}cc"
3156 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3157 break 2
3158 fi
3159 done
3160 done
3161 IFS=$as_save_IFS
3162
3163 fi
3164 fi
3165 CC=$ac_cv_prog_CC
3166 if test -n "$CC"; then
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3168 $as_echo "$CC" >&6; }
3169 else
3170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3171 $as_echo "no" >&6; }
3172 fi
3173
3174
3175 fi
3176 fi
3177 if test -z "$CC"; then
3178 # Extract the first word of "cc", so it can be a program name with args.
3179 set dummy cc; ac_word=$2
3180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3181 $as_echo_n "checking for $ac_word... " >&6; }
3182 if ${ac_cv_prog_CC+:} false; then :
3183 $as_echo_n "(cached) " >&6
3184 else
3185 if test -n "$CC"; then
3186 ac_cv_prog_CC="$CC" # Let the user override the test.
3187 else
3188 ac_prog_rejected=no
3189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3190 for as_dir in $PATH
3191 do
3192 IFS=$as_save_IFS
3193 test -z "$as_dir" && as_dir=.
3194 for ac_exec_ext in '' $ac_executable_extensions; do
3195 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3196 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3197 ac_prog_rejected=yes
3198 continue
3199 fi
3200 ac_cv_prog_CC="cc"
3201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3202 break 2
3203 fi
3204 done
3205 done
3206 IFS=$as_save_IFS
3207
3208 if test $ac_prog_rejected = yes; then
3209 # We found a bogon in the path, so make sure we never use it.
3210 set dummy $ac_cv_prog_CC
3211 shift
3212 if test $# != 0; then
3213 # We chose a different compiler from the bogus one.
3214 # However, it has the same basename, so the bogon will be chosen
3215 # first if we set CC to just the basename; use the full file name.
3216 shift
3217 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3218 fi
3219 fi
3220 fi
3221 fi
3222 CC=$ac_cv_prog_CC
3223 if test -n "$CC"; then
3224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3225 $as_echo "$CC" >&6; }
3226 else
3227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3228 $as_echo "no" >&6; }
3229 fi
3230
3231
3232 fi
3233 if test -z "$CC"; then
3234 if test -n "$ac_tool_prefix"; then
3235 for ac_prog in cl.exe
3236 do
3237 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3238 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3240 $as_echo_n "checking for $ac_word... " >&6; }
3241 if ${ac_cv_prog_CC+:} false; then :
3242 $as_echo_n "(cached) " >&6
3243 else
3244 if test -n "$CC"; then
3245 ac_cv_prog_CC="$CC" # Let the user override the test.
3246 else
3247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3248 for as_dir in $PATH
3249 do
3250 IFS=$as_save_IFS
3251 test -z "$as_dir" && as_dir=.
3252 for ac_exec_ext in '' $ac_executable_extensions; do
3253 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3254 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3255 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3256 break 2
3257 fi
3258 done
3259 done
3260 IFS=$as_save_IFS
3261
3262 fi
3263 fi
3264 CC=$ac_cv_prog_CC
3265 if test -n "$CC"; then
3266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3267 $as_echo "$CC" >&6; }
3268 else
3269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3270 $as_echo "no" >&6; }
3271 fi
3272
3273
3274 test -n "$CC" && break
3275 done
3276 fi
3277 if test -z "$CC"; then
3278 ac_ct_CC=$CC
3279 for ac_prog in cl.exe
3280 do
3281 # Extract the first word of "$ac_prog", so it can be a program name with args.
3282 set dummy $ac_prog; ac_word=$2
3283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3284 $as_echo_n "checking for $ac_word... " >&6; }
3285 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3286 $as_echo_n "(cached) " >&6
3287 else
3288 if test -n "$ac_ct_CC"; then
3289 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3290 else
3291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3292 for as_dir in $PATH
3293 do
3294 IFS=$as_save_IFS
3295 test -z "$as_dir" && as_dir=.
3296 for ac_exec_ext in '' $ac_executable_extensions; do
3297 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3298 ac_cv_prog_ac_ct_CC="$ac_prog"
3299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3300 break 2
3301 fi
3302 done
3303 done
3304 IFS=$as_save_IFS
3305
3306 fi
3307 fi
3308 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3309 if test -n "$ac_ct_CC"; then
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3311 $as_echo "$ac_ct_CC" >&6; }
3312 else
3313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3314 $as_echo "no" >&6; }
3315 fi
3316
3317
3318 test -n "$ac_ct_CC" && break
3319 done
3320
3321 if test "x$ac_ct_CC" = x; then
3322 CC=""
3323 else
3324 case $cross_compiling:$ac_tool_warned in
3325 yes:)
3326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3327 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3328 ac_tool_warned=yes ;;
3329 esac
3330 CC=$ac_ct_CC
3331 fi
3332 fi
3333
3334 fi
3335
3336
3337 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3338 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3339 as_fn_error $? "no acceptable C compiler found in \$PATH
3340 See \`config.log' for more details" "$LINENO" 5; }
3341
3342 # Provide some information about the compiler.
3343 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3344 set X $ac_compile
3345 ac_compiler=$2
3346 for ac_option in --version -v -V -qversion; do
3347 { { ac_try="$ac_compiler $ac_option >&5"
3348 case "(($ac_try" in
3349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3350 *) ac_try_echo=$ac_try;;
3351 esac
3352 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3353 $as_echo "$ac_try_echo"; } >&5
3354 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3355 ac_status=$?
3356 if test -s conftest.err; then
3357 sed '10a\
3358 ... rest of stderr output deleted ...
3359 10q' conftest.err >conftest.er1
3360 cat conftest.er1 >&5
3361 fi
3362 rm -f conftest.er1 conftest.err
3363 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3364 test $ac_status = 0; }
3365 done
3366
3367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3368 /* end confdefs.h. */
3369
3370 int
3371 main ()
3372 {
3373
3374 ;
3375 return 0;
3376 }
3377 _ACEOF
3378 ac_clean_files_save=$ac_clean_files
3379 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3380 # Try to create an executable without -o first, disregard a.out.
3381 # It will help us diagnose broken compilers, and finding out an intuition
3382 # of exeext.
3383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3384 $as_echo_n "checking whether the C compiler works... " >&6; }
3385 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3386
3387 # The possible output files:
3388 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3389
3390 ac_rmfiles=
3391 for ac_file in $ac_files
3392 do
3393 case $ac_file in
3394 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3395 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3396 esac
3397 done
3398 rm -f $ac_rmfiles
3399
3400 if { { ac_try="$ac_link_default"
3401 case "(($ac_try" in
3402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3403 *) ac_try_echo=$ac_try;;
3404 esac
3405 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3406 $as_echo "$ac_try_echo"; } >&5
3407 (eval "$ac_link_default") 2>&5
3408 ac_status=$?
3409 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3410 test $ac_status = 0; }; then :
3411 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3412 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3413 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3414 # so that the user can short-circuit this test for compilers unknown to
3415 # Autoconf.
3416 for ac_file in $ac_files ''
3417 do
3418 test -f "$ac_file" || continue
3419 case $ac_file in
3420 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3421 ;;
3422 [ab].out )
3423 # We found the default executable, but exeext='' is most
3424 # certainly right.
3425 break;;
3426 *.* )
3427 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3428 then :; else
3429 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3430 fi
3431 # We set ac_cv_exeext here because the later test for it is not
3432 # safe: cross compilers may not add the suffix if given an `-o'
3433 # argument, so we may need to know it at that point already.
3434 # Even if this section looks crufty: it has the advantage of
3435 # actually working.
3436 break;;
3437 * )
3438 break;;
3439 esac
3440 done
3441 test "$ac_cv_exeext" = no && ac_cv_exeext=
3442
3443 else
3444 ac_file=''
3445 fi
3446 if test -z "$ac_file"; then :
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3448 $as_echo "no" >&6; }
3449 $as_echo "$as_me: failed program was:" >&5
3450 sed 's/^/| /' conftest.$ac_ext >&5
3451
3452 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3453 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3454 as_fn_error 77 "C compiler cannot create executables
3455 See \`config.log' for more details" "$LINENO" 5; }
3456 else
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3458 $as_echo "yes" >&6; }
3459 fi
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3461 $as_echo_n "checking for C compiler default output file name... " >&6; }
3462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3463 $as_echo "$ac_file" >&6; }
3464 ac_exeext=$ac_cv_exeext
3465
3466 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3467 ac_clean_files=$ac_clean_files_save
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3469 $as_echo_n "checking for suffix of executables... " >&6; }
3470 if { { ac_try="$ac_link"
3471 case "(($ac_try" in
3472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3473 *) ac_try_echo=$ac_try;;
3474 esac
3475 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3476 $as_echo "$ac_try_echo"; } >&5
3477 (eval "$ac_link") 2>&5
3478 ac_status=$?
3479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3480 test $ac_status = 0; }; then :
3481 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3482 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3483 # work properly (i.e., refer to `conftest.exe'), while it won't with
3484 # `rm'.
3485 for ac_file in conftest.exe conftest conftest.*; do
3486 test -f "$ac_file" || continue
3487 case $ac_file in
3488 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3489 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3490 break;;
3491 * ) break;;
3492 esac
3493 done
3494 else
3495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3496 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3497 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3498 See \`config.log' for more details" "$LINENO" 5; }
3499 fi
3500 rm -f conftest conftest$ac_cv_exeext
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3502 $as_echo "$ac_cv_exeext" >&6; }
3503
3504 rm -f conftest.$ac_ext
3505 EXEEXT=$ac_cv_exeext
3506 ac_exeext=$EXEEXT
3507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3508 /* end confdefs.h. */
3509 #include <stdio.h>
3510 int
3511 main ()
3512 {
3513 FILE *f = fopen ("conftest.out", "w");
3514 return ferror (f) || fclose (f) != 0;
3515
3516 ;
3517 return 0;
3518 }
3519 _ACEOF
3520 ac_clean_files="$ac_clean_files conftest.out"
3521 # Check that the compiler produces executables we can run. If not, either
3522 # the compiler is broken, or we cross compile.
3523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3524 $as_echo_n "checking whether we are cross compiling... " >&6; }
3525 if test "$cross_compiling" != yes; then
3526 { { ac_try="$ac_link"
3527 case "(($ac_try" in
3528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3529 *) ac_try_echo=$ac_try;;
3530 esac
3531 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3532 $as_echo "$ac_try_echo"; } >&5
3533 (eval "$ac_link") 2>&5
3534 ac_status=$?
3535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3536 test $ac_status = 0; }
3537 if { ac_try='./conftest$ac_cv_exeext'
3538 { { case "(($ac_try" in
3539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3540 *) ac_try_echo=$ac_try;;
3541 esac
3542 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3543 $as_echo "$ac_try_echo"; } >&5
3544 (eval "$ac_try") 2>&5
3545 ac_status=$?
3546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3547 test $ac_status = 0; }; }; then
3548 cross_compiling=no
3549 else
3550 if test "$cross_compiling" = maybe; then
3551 cross_compiling=yes
3552 else
3553 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3554 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3555 as_fn_error $? "cannot run C compiled programs.
3556 If you meant to cross compile, use \`--host'.
3557 See \`config.log' for more details" "$LINENO" 5; }
3558 fi
3559 fi
3560 fi
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3562 $as_echo "$cross_compiling" >&6; }
3563
3564 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3565 ac_clean_files=$ac_clean_files_save
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3567 $as_echo_n "checking for suffix of object files... " >&6; }
3568 if ${ac_cv_objext+:} false; then :
3569 $as_echo_n "(cached) " >&6
3570 else
3571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3572 /* end confdefs.h. */
3573
3574 int
3575 main ()
3576 {
3577
3578 ;
3579 return 0;
3580 }
3581 _ACEOF
3582 rm -f conftest.o conftest.obj
3583 if { { ac_try="$ac_compile"
3584 case "(($ac_try" in
3585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3586 *) ac_try_echo=$ac_try;;
3587 esac
3588 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3589 $as_echo "$ac_try_echo"; } >&5
3590 (eval "$ac_compile") 2>&5
3591 ac_status=$?
3592 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3593 test $ac_status = 0; }; then :
3594 for ac_file in conftest.o conftest.obj conftest.*; do
3595 test -f "$ac_file" || continue;
3596 case $ac_file in
3597 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3598 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3599 break;;
3600 esac
3601 done
3602 else
3603 $as_echo "$as_me: failed program was:" >&5
3604 sed 's/^/| /' conftest.$ac_ext >&5
3605
3606 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3607 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3608 as_fn_error $? "cannot compute suffix of object files: cannot compile
3609 See \`config.log' for more details" "$LINENO" 5; }
3610 fi
3611 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3612 fi
3613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3614 $as_echo "$ac_cv_objext" >&6; }
3615 OBJEXT=$ac_cv_objext
3616 ac_objext=$OBJEXT
3617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3618 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3619 if ${ac_cv_c_compiler_gnu+:} false; then :
3620 $as_echo_n "(cached) " >&6
3621 else
3622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3623 /* end confdefs.h. */
3624
3625 int
3626 main ()
3627 {
3628 #ifndef __GNUC__
3629 choke me
3630 #endif
3631
3632 ;
3633 return 0;
3634 }
3635 _ACEOF
3636 if ac_fn_c_try_compile "$LINENO"; then :
3637 ac_compiler_gnu=yes
3638 else
3639 ac_compiler_gnu=no
3640 fi
3641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3642 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3643
3644 fi
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3646 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3647 if test $ac_compiler_gnu = yes; then
3648 GCC=yes
3649 else
3650 GCC=
3651 fi
3652 ac_test_CFLAGS=${CFLAGS+set}
3653 ac_save_CFLAGS=$CFLAGS
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3655 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3656 if ${ac_cv_prog_cc_g+:} false; then :
3657 $as_echo_n "(cached) " >&6
3658 else
3659 ac_save_c_werror_flag=$ac_c_werror_flag
3660 ac_c_werror_flag=yes
3661 ac_cv_prog_cc_g=no
3662 CFLAGS="-g"
3663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3664 /* end confdefs.h. */
3665
3666 int
3667 main ()
3668 {
3669
3670 ;
3671 return 0;
3672 }
3673 _ACEOF
3674 if ac_fn_c_try_compile "$LINENO"; then :
3675 ac_cv_prog_cc_g=yes
3676 else
3677 CFLAGS=""
3678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3679 /* end confdefs.h. */
3680
3681 int
3682 main ()
3683 {
3684
3685 ;
3686 return 0;
3687 }
3688 _ACEOF
3689 if ac_fn_c_try_compile "$LINENO"; then :
3690
3691 else
3692 ac_c_werror_flag=$ac_save_c_werror_flag
3693 CFLAGS="-g"
3694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3695 /* end confdefs.h. */
3696
3697 int
3698 main ()
3699 {
3700
3701 ;
3702 return 0;
3703 }
3704 _ACEOF
3705 if ac_fn_c_try_compile "$LINENO"; then :
3706 ac_cv_prog_cc_g=yes
3707 fi
3708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3709 fi
3710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3711 fi
3712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3713 ac_c_werror_flag=$ac_save_c_werror_flag
3714 fi
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3716 $as_echo "$ac_cv_prog_cc_g" >&6; }
3717 if test "$ac_test_CFLAGS" = set; then
3718 CFLAGS=$ac_save_CFLAGS
3719 elif test $ac_cv_prog_cc_g = yes; then
3720 if test "$GCC" = yes; then
3721 CFLAGS="-g -O2"
3722 else
3723 CFLAGS="-g"
3724 fi
3725 else
3726 if test "$GCC" = yes; then
3727 CFLAGS="-O2"
3728 else
3729 CFLAGS=
3730 fi
3731 fi
3732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3733 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3734 if ${ac_cv_prog_cc_c89+:} false; then :
3735 $as_echo_n "(cached) " >&6
3736 else
3737 ac_cv_prog_cc_c89=no
3738 ac_save_CC=$CC
3739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3740 /* end confdefs.h. */
3741 #include <stdarg.h>
3742 #include <stdio.h>
3743 struct stat;
3744 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3745 struct buf { int x; };
3746 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3747 static char *e (p, i)
3748 char **p;
3749 int i;
3750 {
3751 return p[i];
3752 }
3753 static char *f (char * (*g) (char **, int), char **p, ...)
3754 {
3755 char *s;
3756 va_list v;
3757 va_start (v,p);
3758 s = g (p, va_arg (v,int));
3759 va_end (v);
3760 return s;
3761 }
3762
3763 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3764 function prototypes and stuff, but not '\xHH' hex character constants.
3765 These don't provoke an error unfortunately, instead are silently treated
3766 as 'x'. The following induces an error, until -std is added to get
3767 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3768 array size at least. It's necessary to write '\x00'==0 to get something
3769 that's true only with -std. */
3770 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3771
3772 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3773 inside strings and character constants. */
3774 #define FOO(x) 'x'
3775 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3776
3777 int test (int i, double x);
3778 struct s1 {int (*f) (int a);};
3779 struct s2 {int (*f) (double a);};
3780 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3781 int argc;
3782 char **argv;
3783 int
3784 main ()
3785 {
3786 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3787 ;
3788 return 0;
3789 }
3790 _ACEOF
3791 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3792 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3793 do
3794 CC="$ac_save_CC $ac_arg"
3795 if ac_fn_c_try_compile "$LINENO"; then :
3796 ac_cv_prog_cc_c89=$ac_arg
3797 fi
3798 rm -f core conftest.err conftest.$ac_objext
3799 test "x$ac_cv_prog_cc_c89" != "xno" && break
3800 done
3801 rm -f conftest.$ac_ext
3802 CC=$ac_save_CC
3803
3804 fi
3805 # AC_CACHE_VAL
3806 case "x$ac_cv_prog_cc_c89" in
3807 x)
3808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3809 $as_echo "none needed" >&6; } ;;
3810 xno)
3811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3812 $as_echo "unsupported" >&6; } ;;
3813 *)
3814 CC="$CC $ac_cv_prog_cc_c89"
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3816 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3817 esac
3818 if test "x$ac_cv_prog_cc_c89" != xno; then :
3819
3820 fi
3821
3822 ac_ext=c
3823 ac_cpp='$CPP $CPPFLAGS'
3824 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3825 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3827
3828 ac_ext=cpp
3829 ac_cpp='$CXXCPP $CPPFLAGS'
3830 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3831 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3832 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3833 if test -z "$CXX"; then
3834 if test -n "$CCC"; then
3835 CXX=$CCC
3836 else
3837 if test -n "$ac_tool_prefix"; then
3838 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3839 do
3840 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3841 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3843 $as_echo_n "checking for $ac_word... " >&6; }
3844 if ${ac_cv_prog_CXX+:} false; then :
3845 $as_echo_n "(cached) " >&6
3846 else
3847 if test -n "$CXX"; then
3848 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3849 else
3850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3851 for as_dir in $PATH
3852 do
3853 IFS=$as_save_IFS
3854 test -z "$as_dir" && as_dir=.
3855 for ac_exec_ext in '' $ac_executable_extensions; do
3856 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3857 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3859 break 2
3860 fi
3861 done
3862 done
3863 IFS=$as_save_IFS
3864
3865 fi
3866 fi
3867 CXX=$ac_cv_prog_CXX
3868 if test -n "$CXX"; then
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3870 $as_echo "$CXX" >&6; }
3871 else
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3873 $as_echo "no" >&6; }
3874 fi
3875
3876
3877 test -n "$CXX" && break
3878 done
3879 fi
3880 if test -z "$CXX"; then
3881 ac_ct_CXX=$CXX
3882 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3883 do
3884 # Extract the first word of "$ac_prog", so it can be a program name with args.
3885 set dummy $ac_prog; ac_word=$2
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3887 $as_echo_n "checking for $ac_word... " >&6; }
3888 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3889 $as_echo_n "(cached) " >&6
3890 else
3891 if test -n "$ac_ct_CXX"; then
3892 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3893 else
3894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3895 for as_dir in $PATH
3896 do
3897 IFS=$as_save_IFS
3898 test -z "$as_dir" && as_dir=.
3899 for ac_exec_ext in '' $ac_executable_extensions; do
3900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3901 ac_cv_prog_ac_ct_CXX="$ac_prog"
3902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3903 break 2
3904 fi
3905 done
3906 done
3907 IFS=$as_save_IFS
3908
3909 fi
3910 fi
3911 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3912 if test -n "$ac_ct_CXX"; then
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3914 $as_echo "$ac_ct_CXX" >&6; }
3915 else
3916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3917 $as_echo "no" >&6; }
3918 fi
3919
3920
3921 test -n "$ac_ct_CXX" && break
3922 done
3923
3924 if test "x$ac_ct_CXX" = x; then
3925 CXX="g++"
3926 else
3927 case $cross_compiling:$ac_tool_warned in
3928 yes:)
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3930 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3931 ac_tool_warned=yes ;;
3932 esac
3933 CXX=$ac_ct_CXX
3934 fi
3935 fi
3936
3937 fi
3938 fi
3939 # Provide some information about the compiler.
3940 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3941 set X $ac_compile
3942 ac_compiler=$2
3943 for ac_option in --version -v -V -qversion; do
3944 { { ac_try="$ac_compiler $ac_option >&5"
3945 case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948 esac
3949 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950 $as_echo "$ac_try_echo"; } >&5
3951 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3952 ac_status=$?
3953 if test -s conftest.err; then
3954 sed '10a\
3955 ... rest of stderr output deleted ...
3956 10q' conftest.err >conftest.er1
3957 cat conftest.er1 >&5
3958 fi
3959 rm -f conftest.er1 conftest.err
3960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }
3962 done
3963
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3965 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3966 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3967 $as_echo_n "(cached) " >&6
3968 else
3969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3970 /* end confdefs.h. */
3971
3972 int
3973 main ()
3974 {
3975 #ifndef __GNUC__
3976 choke me
3977 #endif
3978
3979 ;
3980 return 0;
3981 }
3982 _ACEOF
3983 if ac_fn_cxx_try_compile "$LINENO"; then :
3984 ac_compiler_gnu=yes
3985 else
3986 ac_compiler_gnu=no
3987 fi
3988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3989 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3990
3991 fi
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3993 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3994 if test $ac_compiler_gnu = yes; then
3995 GXX=yes
3996 else
3997 GXX=
3998 fi
3999 ac_test_CXXFLAGS=${CXXFLAGS+set}
4000 ac_save_CXXFLAGS=$CXXFLAGS
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4002 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4003 if ${ac_cv_prog_cxx_g+:} false; then :
4004 $as_echo_n "(cached) " >&6
4005 else
4006 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4007 ac_cxx_werror_flag=yes
4008 ac_cv_prog_cxx_g=no
4009 CXXFLAGS="-g"
4010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4011 /* end confdefs.h. */
4012
4013 int
4014 main ()
4015 {
4016
4017 ;
4018 return 0;
4019 }
4020 _ACEOF
4021 if ac_fn_cxx_try_compile "$LINENO"; then :
4022 ac_cv_prog_cxx_g=yes
4023 else
4024 CXXFLAGS=""
4025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4026 /* end confdefs.h. */
4027
4028 int
4029 main ()
4030 {
4031
4032 ;
4033 return 0;
4034 }
4035 _ACEOF
4036 if ac_fn_cxx_try_compile "$LINENO"; then :
4037
4038 else
4039 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4040 CXXFLAGS="-g"
4041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4042 /* end confdefs.h. */
4043
4044 int
4045 main ()
4046 {
4047
4048 ;
4049 return 0;
4050 }
4051 _ACEOF
4052 if ac_fn_cxx_try_compile "$LINENO"; then :
4053 ac_cv_prog_cxx_g=yes
4054 fi
4055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4056 fi
4057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4058 fi
4059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4060 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4061 fi
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4063 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4064 if test "$ac_test_CXXFLAGS" = set; then
4065 CXXFLAGS=$ac_save_CXXFLAGS
4066 elif test $ac_cv_prog_cxx_g = yes; then
4067 if test "$GXX" = yes; then
4068 CXXFLAGS="-g -O2"
4069 else
4070 CXXFLAGS="-g"
4071 fi
4072 else
4073 if test "$GXX" = yes; then
4074 CXXFLAGS="-O2"
4075 else
4076 CXXFLAGS=
4077 fi
4078 fi
4079 ac_ext=c
4080 ac_cpp='$CPP $CPPFLAGS'
4081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4084
4085
4086
4087 ac_ext=c
4088 ac_cpp='$CPP $CPPFLAGS'
4089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4093 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4094 # On Suns, sometimes $CPP names a directory.
4095 if test -n "$CPP" && test -d "$CPP"; then
4096 CPP=
4097 fi
4098 if test -z "$CPP"; then
4099 if ${ac_cv_prog_CPP+:} false; then :
4100 $as_echo_n "(cached) " >&6
4101 else
4102 # Double quotes because CPP needs to be expanded
4103 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4104 do
4105 ac_preproc_ok=false
4106 for ac_c_preproc_warn_flag in '' yes
4107 do
4108 # Use a header file that comes with gcc, so configuring glibc
4109 # with a fresh cross-compiler works.
4110 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4111 # <limits.h> exists even on freestanding compilers.
4112 # On the NeXT, cc -E runs the code through the compiler's parser,
4113 # not just through cpp. "Syntax error" is here to catch this case.
4114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4115 /* end confdefs.h. */
4116 #ifdef __STDC__
4117 # include <limits.h>
4118 #else
4119 # include <assert.h>
4120 #endif
4121 Syntax error
4122 _ACEOF
4123 if ac_fn_c_try_cpp "$LINENO"; then :
4124
4125 else
4126 # Broken: fails on valid input.
4127 continue
4128 fi
4129 rm -f conftest.err conftest.i conftest.$ac_ext
4130
4131 # OK, works on sane cases. Now check whether nonexistent headers
4132 # can be detected and how.
4133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4134 /* end confdefs.h. */
4135 #include <ac_nonexistent.h>
4136 _ACEOF
4137 if ac_fn_c_try_cpp "$LINENO"; then :
4138 # Broken: success on invalid input.
4139 continue
4140 else
4141 # Passes both tests.
4142 ac_preproc_ok=:
4143 break
4144 fi
4145 rm -f conftest.err conftest.i conftest.$ac_ext
4146
4147 done
4148 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4149 rm -f conftest.i conftest.err conftest.$ac_ext
4150 if $ac_preproc_ok; then :
4151 break
4152 fi
4153
4154 done
4155 ac_cv_prog_CPP=$CPP
4156
4157 fi
4158 CPP=$ac_cv_prog_CPP
4159 else
4160 ac_cv_prog_CPP=$CPP
4161 fi
4162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4163 $as_echo "$CPP" >&6; }
4164 ac_preproc_ok=false
4165 for ac_c_preproc_warn_flag in '' yes
4166 do
4167 # Use a header file that comes with gcc, so configuring glibc
4168 # with a fresh cross-compiler works.
4169 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4170 # <limits.h> exists even on freestanding compilers.
4171 # On the NeXT, cc -E runs the code through the compiler's parser,
4172 # not just through cpp. "Syntax error" is here to catch this case.
4173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4174 /* end confdefs.h. */
4175 #ifdef __STDC__
4176 # include <limits.h>
4177 #else
4178 # include <assert.h>
4179 #endif
4180 Syntax error
4181 _ACEOF
4182 if ac_fn_c_try_cpp "$LINENO"; then :
4183
4184 else
4185 # Broken: fails on valid input.
4186 continue
4187 fi
4188 rm -f conftest.err conftest.i conftest.$ac_ext
4189
4190 # OK, works on sane cases. Now check whether nonexistent headers
4191 # can be detected and how.
4192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4193 /* end confdefs.h. */
4194 #include <ac_nonexistent.h>
4195 _ACEOF
4196 if ac_fn_c_try_cpp "$LINENO"; then :
4197 # Broken: success on invalid input.
4198 continue
4199 else
4200 # Passes both tests.
4201 ac_preproc_ok=:
4202 break
4203 fi
4204 rm -f conftest.err conftest.i conftest.$ac_ext
4205
4206 done
4207 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4208 rm -f conftest.i conftest.err conftest.$ac_ext
4209 if $ac_preproc_ok; then :
4210
4211 else
4212 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4213 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4214 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4215 See \`config.log' for more details" "$LINENO" 5; }
4216 fi
4217
4218 ac_ext=c
4219 ac_cpp='$CPP $CPPFLAGS'
4220 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4221 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4222 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4223
4224
4225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4226 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4227 if ${ac_cv_path_GREP+:} false; then :
4228 $as_echo_n "(cached) " >&6
4229 else
4230 if test -z "$GREP"; then
4231 ac_path_GREP_found=false
4232 # Loop through the user's path and test for each of PROGNAME-LIST
4233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4234 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4235 do
4236 IFS=$as_save_IFS
4237 test -z "$as_dir" && as_dir=.
4238 for ac_prog in grep ggrep; do
4239 for ac_exec_ext in '' $ac_executable_extensions; do
4240 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4241 as_fn_executable_p "$ac_path_GREP" || continue
4242 # Check for GNU ac_path_GREP and select it if it is found.
4243 # Check for GNU $ac_path_GREP
4244 case `"$ac_path_GREP" --version 2>&1` in
4245 *GNU*)
4246 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4247 *)
4248 ac_count=0
4249 $as_echo_n 0123456789 >"conftest.in"
4250 while :
4251 do
4252 cat "conftest.in" "conftest.in" >"conftest.tmp"
4253 mv "conftest.tmp" "conftest.in"
4254 cp "conftest.in" "conftest.nl"
4255 $as_echo 'GREP' >> "conftest.nl"
4256 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4257 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4258 as_fn_arith $ac_count + 1 && ac_count=$as_val
4259 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4260 # Best one so far, save it but keep looking for a better one
4261 ac_cv_path_GREP="$ac_path_GREP"
4262 ac_path_GREP_max=$ac_count
4263 fi
4264 # 10*(2^10) chars as input seems more than enough
4265 test $ac_count -gt 10 && break
4266 done
4267 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4268 esac
4269
4270 $ac_path_GREP_found && break 3
4271 done
4272 done
4273 done
4274 IFS=$as_save_IFS
4275 if test -z "$ac_cv_path_GREP"; then
4276 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4277 fi
4278 else
4279 ac_cv_path_GREP=$GREP
4280 fi
4281
4282 fi
4283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4284 $as_echo "$ac_cv_path_GREP" >&6; }
4285 GREP="$ac_cv_path_GREP"
4286
4287
4288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4289 $as_echo_n "checking for egrep... " >&6; }
4290 if ${ac_cv_path_EGREP+:} false; then :
4291 $as_echo_n "(cached) " >&6
4292 else
4293 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4294 then ac_cv_path_EGREP="$GREP -E"
4295 else
4296 if test -z "$EGREP"; then
4297 ac_path_EGREP_found=false
4298 # Loop through the user's path and test for each of PROGNAME-LIST
4299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4300 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4301 do
4302 IFS=$as_save_IFS
4303 test -z "$as_dir" && as_dir=.
4304 for ac_prog in egrep; do
4305 for ac_exec_ext in '' $ac_executable_extensions; do
4306 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4307 as_fn_executable_p "$ac_path_EGREP" || continue
4308 # Check for GNU ac_path_EGREP and select it if it is found.
4309 # Check for GNU $ac_path_EGREP
4310 case `"$ac_path_EGREP" --version 2>&1` in
4311 *GNU*)
4312 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4313 *)
4314 ac_count=0
4315 $as_echo_n 0123456789 >"conftest.in"
4316 while :
4317 do
4318 cat "conftest.in" "conftest.in" >"conftest.tmp"
4319 mv "conftest.tmp" "conftest.in"
4320 cp "conftest.in" "conftest.nl"
4321 $as_echo 'EGREP' >> "conftest.nl"
4322 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4323 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4324 as_fn_arith $ac_count + 1 && ac_count=$as_val
4325 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4326 # Best one so far, save it but keep looking for a better one
4327 ac_cv_path_EGREP="$ac_path_EGREP"
4328 ac_path_EGREP_max=$ac_count
4329 fi
4330 # 10*(2^10) chars as input seems more than enough
4331 test $ac_count -gt 10 && break
4332 done
4333 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4334 esac
4335
4336 $ac_path_EGREP_found && break 3
4337 done
4338 done
4339 done
4340 IFS=$as_save_IFS
4341 if test -z "$ac_cv_path_EGREP"; then
4342 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4343 fi
4344 else
4345 ac_cv_path_EGREP=$EGREP
4346 fi
4347
4348 fi
4349 fi
4350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4351 $as_echo "$ac_cv_path_EGREP" >&6; }
4352 EGREP="$ac_cv_path_EGREP"
4353
4354
4355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4356 $as_echo_n "checking for ANSI C header files... " >&6; }
4357 if ${ac_cv_header_stdc+:} false; then :
4358 $as_echo_n "(cached) " >&6
4359 else
4360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4361 /* end confdefs.h. */
4362 #include <stdlib.h>
4363 #include <stdarg.h>
4364 #include <string.h>
4365 #include <float.h>
4366
4367 int
4368 main ()
4369 {
4370
4371 ;
4372 return 0;
4373 }
4374 _ACEOF
4375 if ac_fn_c_try_compile "$LINENO"; then :
4376 ac_cv_header_stdc=yes
4377 else
4378 ac_cv_header_stdc=no
4379 fi
4380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4381
4382 if test $ac_cv_header_stdc = yes; then
4383 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4385 /* end confdefs.h. */
4386 #include <string.h>
4387
4388 _ACEOF
4389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4390 $EGREP "memchr" >/dev/null 2>&1; then :
4391
4392 else
4393 ac_cv_header_stdc=no
4394 fi
4395 rm -f conftest*
4396
4397 fi
4398
4399 if test $ac_cv_header_stdc = yes; then
4400 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4402 /* end confdefs.h. */
4403 #include <stdlib.h>
4404
4405 _ACEOF
4406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4407 $EGREP "free" >/dev/null 2>&1; then :
4408
4409 else
4410 ac_cv_header_stdc=no
4411 fi
4412 rm -f conftest*
4413
4414 fi
4415
4416 if test $ac_cv_header_stdc = yes; then
4417 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4418 if test "$cross_compiling" = yes; then :
4419 :
4420 else
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422 /* end confdefs.h. */
4423 #include <ctype.h>
4424 #include <stdlib.h>
4425 #if ((' ' & 0x0FF) == 0x020)
4426 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4427 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4428 #else
4429 # define ISLOWER(c) \
4430 (('a' <= (c) && (c) <= 'i') \
4431 || ('j' <= (c) && (c) <= 'r') \
4432 || ('s' <= (c) && (c) <= 'z'))
4433 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4434 #endif
4435
4436 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4437 int
4438 main ()
4439 {
4440 int i;
4441 for (i = 0; i < 256; i++)
4442 if (XOR (islower (i), ISLOWER (i))
4443 || toupper (i) != TOUPPER (i))
4444 return 2;
4445 return 0;
4446 }
4447 _ACEOF
4448 if ac_fn_c_try_run "$LINENO"; then :
4449
4450 else
4451 ac_cv_header_stdc=no
4452 fi
4453 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4454 conftest.$ac_objext conftest.beam conftest.$ac_ext
4455 fi
4456
4457 fi
4458 fi
4459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4460 $as_echo "$ac_cv_header_stdc" >&6; }
4461 if test $ac_cv_header_stdc = yes; then
4462
4463 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4464
4465 fi
4466
4467 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4468 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4469 inttypes.h stdint.h unistd.h
4470 do :
4471 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4472 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4473 "
4474 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4475 cat >>confdefs.h <<_ACEOF
4476 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4477 _ACEOF
4478
4479 fi
4480
4481 done
4482
4483
4484
4485 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4486 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4487 MINIX=yes
4488 else
4489 MINIX=
4490 fi
4491
4492
4493 if test "$MINIX" = yes; then
4494
4495 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4496
4497
4498 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4499
4500
4501 $as_echo "#define _MINIX 1" >>confdefs.h
4502
4503 fi
4504
4505
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4507 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4508 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4509 $as_echo_n "(cached) " >&6
4510 else
4511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4512 /* end confdefs.h. */
4513
4514 # define __EXTENSIONS__ 1
4515 $ac_includes_default
4516 int
4517 main ()
4518 {
4519
4520 ;
4521 return 0;
4522 }
4523 _ACEOF
4524 if ac_fn_c_try_compile "$LINENO"; then :
4525 ac_cv_safe_to_define___extensions__=yes
4526 else
4527 ac_cv_safe_to_define___extensions__=no
4528 fi
4529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4530 fi
4531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4532 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4533 test $ac_cv_safe_to_define___extensions__ = yes &&
4534 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4535
4536 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4537
4538 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4539
4540 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4541
4542 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4543
4544
4545 ac_aux_dir=
4546 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4547 if test -f "$ac_dir/install-sh"; then
4548 ac_aux_dir=$ac_dir
4549 ac_install_sh="$ac_aux_dir/install-sh -c"
4550 break
4551 elif test -f "$ac_dir/install.sh"; then
4552 ac_aux_dir=$ac_dir
4553 ac_install_sh="$ac_aux_dir/install.sh -c"
4554 break
4555 elif test -f "$ac_dir/shtool"; then
4556 ac_aux_dir=$ac_dir
4557 ac_install_sh="$ac_aux_dir/shtool install -c"
4558 break
4559 fi
4560 done
4561 if test -z "$ac_aux_dir"; then
4562 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4563 fi
4564
4565 # These three variables are undocumented and unsupported,
4566 # and are intended to be withdrawn in a future Autoconf release.
4567 # They can cause serious problems if a builder's source tree is in a directory
4568 # whose full name contains unusual characters.
4569 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4570 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4571 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4572
4573
4574 # Make sure we can run config.sub.
4575 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4576 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4577
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4579 $as_echo_n "checking build system type... " >&6; }
4580 if ${ac_cv_build+:} false; then :
4581 $as_echo_n "(cached) " >&6
4582 else
4583 ac_build_alias=$build_alias
4584 test "x$ac_build_alias" = x &&
4585 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4586 test "x$ac_build_alias" = x &&
4587 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4588 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4589 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4590
4591 fi
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4593 $as_echo "$ac_cv_build" >&6; }
4594 case $ac_cv_build in
4595 *-*-*) ;;
4596 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4597 esac
4598 build=$ac_cv_build
4599 ac_save_IFS=$IFS; IFS='-'
4600 set x $ac_cv_build
4601 shift
4602 build_cpu=$1
4603 build_vendor=$2
4604 shift; shift
4605 # Remember, the first character of IFS is used to create $*,
4606 # except with old shells:
4607 build_os=$*
4608 IFS=$ac_save_IFS
4609 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4610
4611
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4613 $as_echo_n "checking host system type... " >&6; }
4614 if ${ac_cv_host+:} false; then :
4615 $as_echo_n "(cached) " >&6
4616 else
4617 if test "x$host_alias" = x; then
4618 ac_cv_host=$ac_cv_build
4619 else
4620 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4621 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4622 fi
4623
4624 fi
4625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4626 $as_echo "$ac_cv_host" >&6; }
4627 case $ac_cv_host in
4628 *-*-*) ;;
4629 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4630 esac
4631 host=$ac_cv_host
4632 ac_save_IFS=$IFS; IFS='-'
4633 set x $ac_cv_host
4634 shift
4635 host_cpu=$1
4636 host_vendor=$2
4637 shift; shift
4638 # Remember, the first character of IFS is used to create $*,
4639 # except with old shells:
4640 host_os=$*
4641 IFS=$ac_save_IFS
4642 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4643
4644
4645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4646 $as_echo_n "checking target system type... " >&6; }
4647 if ${ac_cv_target+:} false; then :
4648 $as_echo_n "(cached) " >&6
4649 else
4650 if test "x$target_alias" = x; then
4651 ac_cv_target=$ac_cv_host
4652 else
4653 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4654 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4655 fi
4656
4657 fi
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4659 $as_echo "$ac_cv_target" >&6; }
4660 case $ac_cv_target in
4661 *-*-*) ;;
4662 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4663 esac
4664 target=$ac_cv_target
4665 ac_save_IFS=$IFS; IFS='-'
4666 set x $ac_cv_target
4667 shift
4668 target_cpu=$1
4669 target_vendor=$2
4670 shift; shift
4671 # Remember, the first character of IFS is used to create $*,
4672 # except with old shells:
4673 target_os=$*
4674 IFS=$ac_save_IFS
4675 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4676
4677
4678 # The aliases save the names the user supplied, while $host etc.
4679 # will get canonicalized.
4680 test -n "$target_alias" &&
4681 test "$program_prefix$program_suffix$program_transform_name" = \
4682 NONENONEs,x,x, &&
4683 program_prefix=${target_alias}-
4684
4685 # The tests for host and target for $enable_largefile require
4686 # canonical names.
4687
4688
4689
4690 # As the $enable_largefile decision depends on --enable-plugins we must set it
4691 # even in directories otherwise not depending on the $plugins option.
4692
4693
4694 maybe_plugins=no
4695 for ac_header in dlfcn.h
4696 do :
4697 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4698 "
4699 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4700 cat >>confdefs.h <<_ACEOF
4701 #define HAVE_DLFCN_H 1
4702 _ACEOF
4703 maybe_plugins=yes
4704 fi
4705
4706 done
4707
4708 for ac_header in windows.h
4709 do :
4710 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4711 "
4712 if test "x$ac_cv_header_windows_h" = xyes; then :
4713 cat >>confdefs.h <<_ACEOF
4714 #define HAVE_WINDOWS_H 1
4715 _ACEOF
4716 maybe_plugins=yes
4717 fi
4718
4719 done
4720
4721
4722 # Check whether --enable-plugins was given.
4723 if test "${enable_plugins+set}" = set; then :
4724 enableval=$enable_plugins; case "${enableval}" in
4725 no) plugins=no ;;
4726 *) plugins=yes
4727 if test "$maybe_plugins" != "yes" ; then
4728 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4729 fi ;;
4730 esac
4731 else
4732 plugins=$maybe_plugins
4733
4734 fi
4735
4736 if test "$plugins" = "yes"; then
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4738 $as_echo_n "checking for library containing dlsym... " >&6; }
4739 if ${ac_cv_search_dlsym+:} false; then :
4740 $as_echo_n "(cached) " >&6
4741 else
4742 ac_func_search_save_LIBS=$LIBS
4743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744 /* end confdefs.h. */
4745
4746 /* Override any GCC internal prototype to avoid an error.
4747 Use char because int might match the return type of a GCC
4748 builtin and then its argument prototype would still apply. */
4749 #ifdef __cplusplus
4750 extern "C"
4751 #endif
4752 char dlsym ();
4753 int
4754 main ()
4755 {
4756 return dlsym ();
4757 ;
4758 return 0;
4759 }
4760 _ACEOF
4761 for ac_lib in '' dl; do
4762 if test -z "$ac_lib"; then
4763 ac_res="none required"
4764 else
4765 ac_res=-l$ac_lib
4766 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4767 fi
4768 if ac_fn_c_try_link "$LINENO"; then :
4769 ac_cv_search_dlsym=$ac_res
4770 fi
4771 rm -f core conftest.err conftest.$ac_objext \
4772 conftest$ac_exeext
4773 if ${ac_cv_search_dlsym+:} false; then :
4774 break
4775 fi
4776 done
4777 if ${ac_cv_search_dlsym+:} false; then :
4778
4779 else
4780 ac_cv_search_dlsym=no
4781 fi
4782 rm conftest.$ac_ext
4783 LIBS=$ac_func_search_save_LIBS
4784 fi
4785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4786 $as_echo "$ac_cv_search_dlsym" >&6; }
4787 ac_res=$ac_cv_search_dlsym
4788 if test "$ac_res" != no; then :
4789 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4790
4791 fi
4792
4793 fi
4794
4795
4796 case "${host}" in
4797 sparc-*-solaris*|i?86-*-solaris*)
4798 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4799 # were mutually exclusive until Solaris 11.3. Without procfs support,
4800 # the bfd/ elf module cannot provide certain routines such as
4801 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4802 # explicitly requested large-file support through the
4803 # --enable-largefile switch, disable large-file support in favor of
4804 # procfs support.
4805 #
4806 # Check if <sys/procfs.h> is incompatible with large-file support.
4807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4808 /* end confdefs.h. */
4809 #define _FILE_OFFSET_BITS 64
4810 #define _STRUCTURED_PROC 1
4811 #include <sys/procfs.h>
4812 int
4813 main ()
4814 {
4815
4816 ;
4817 return 0;
4818 }
4819 _ACEOF
4820 if ac_fn_c_try_compile "$LINENO"; then :
4821 acx_cv_procfs_lfs=yes
4822 else
4823 acx_cv_procfs_lfs=no
4824 fi
4825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4826 #
4827 # Forcefully disable large-file support only if necessary, gdb is in
4828 # tree and enabled.
4829 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4830 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4831 : ${enable_largefile="no"}
4832 if test "$plugins" = yes; then
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4834 plugin support disabled; require large-file support which is incompatible with GDB." >&5
4835 $as_echo "$as_me: WARNING:
4836 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4837 plugins=no
4838 fi
4839 fi
4840 #
4841 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4842 # benefit of g++ 9+ which predefines it on Solaris.
4843 if test "$enable_largefile" = no; then
4844 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4845
4846 fi
4847 ;;
4848 esac
4849
4850 # Check whether --enable-largefile was given.
4851 if test "${enable_largefile+set}" = set; then :
4852 enableval=$enable_largefile;
4853 fi
4854
4855 if test "$enable_largefile" != no; then
4856
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4858 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4859 if ${ac_cv_sys_largefile_CC+:} false; then :
4860 $as_echo_n "(cached) " >&6
4861 else
4862 ac_cv_sys_largefile_CC=no
4863 if test "$GCC" != yes; then
4864 ac_save_CC=$CC
4865 while :; do
4866 # IRIX 6.2 and later do not support large files by default,
4867 # so use the C compiler's -n32 option if that helps.
4868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4869 /* end confdefs.h. */
4870 #include <sys/types.h>
4871 /* Check that off_t can represent 2**63 - 1 correctly.
4872 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4873 since some C++ compilers masquerading as C compilers
4874 incorrectly reject 9223372036854775807. */
4875 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4876 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4877 && LARGE_OFF_T % 2147483647 == 1)
4878 ? 1 : -1];
4879 int
4880 main ()
4881 {
4882
4883 ;
4884 return 0;
4885 }
4886 _ACEOF
4887 if ac_fn_c_try_compile "$LINENO"; then :
4888 break
4889 fi
4890 rm -f core conftest.err conftest.$ac_objext
4891 CC="$CC -n32"
4892 if ac_fn_c_try_compile "$LINENO"; then :
4893 ac_cv_sys_largefile_CC=' -n32'; break
4894 fi
4895 rm -f core conftest.err conftest.$ac_objext
4896 break
4897 done
4898 CC=$ac_save_CC
4899 rm -f conftest.$ac_ext
4900 fi
4901 fi
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4903 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4904 if test "$ac_cv_sys_largefile_CC" != no; then
4905 CC=$CC$ac_cv_sys_largefile_CC
4906 fi
4907
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4909 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4910 if ${ac_cv_sys_file_offset_bits+:} false; then :
4911 $as_echo_n "(cached) " >&6
4912 else
4913 while :; do
4914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4915 /* end confdefs.h. */
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];
4925 int
4926 main ()
4927 {
4928
4929 ;
4930 return 0;
4931 }
4932 _ACEOF
4933 if ac_fn_c_try_compile "$LINENO"; then :
4934 ac_cv_sys_file_offset_bits=no; break
4935 fi
4936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4938 /* end confdefs.h. */
4939 #define _FILE_OFFSET_BITS 64
4940 #include <sys/types.h>
4941 /* Check that off_t can represent 2**63 - 1 correctly.
4942 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4943 since some C++ compilers masquerading as C compilers
4944 incorrectly reject 9223372036854775807. */
4945 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4946 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4947 && LARGE_OFF_T % 2147483647 == 1)
4948 ? 1 : -1];
4949 int
4950 main ()
4951 {
4952
4953 ;
4954 return 0;
4955 }
4956 _ACEOF
4957 if ac_fn_c_try_compile "$LINENO"; then :
4958 ac_cv_sys_file_offset_bits=64; break
4959 fi
4960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4961 ac_cv_sys_file_offset_bits=unknown
4962 break
4963 done
4964 fi
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4966 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4967 case $ac_cv_sys_file_offset_bits in #(
4968 no | unknown) ;;
4969 *)
4970 cat >>confdefs.h <<_ACEOF
4971 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4972 _ACEOF
4973 ;;
4974 esac
4975 rm -rf conftest*
4976 if test $ac_cv_sys_file_offset_bits = unknown; then
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4978 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4979 if ${ac_cv_sys_large_files+:} false; then :
4980 $as_echo_n "(cached) " >&6
4981 else
4982 while :; do
4983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4984 /* end confdefs.h. */
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];
4994 int
4995 main ()
4996 {
4997
4998 ;
4999 return 0;
5000 }
5001 _ACEOF
5002 if ac_fn_c_try_compile "$LINENO"; then :
5003 ac_cv_sys_large_files=no; break
5004 fi
5005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5007 /* end confdefs.h. */
5008 #define _LARGE_FILES 1
5009 #include <sys/types.h>
5010 /* Check that off_t can represent 2**63 - 1 correctly.
5011 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5012 since some C++ compilers masquerading as C compilers
5013 incorrectly reject 9223372036854775807. */
5014 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5015 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5016 && LARGE_OFF_T % 2147483647 == 1)
5017 ? 1 : -1];
5018 int
5019 main ()
5020 {
5021
5022 ;
5023 return 0;
5024 }
5025 _ACEOF
5026 if ac_fn_c_try_compile "$LINENO"; then :
5027 ac_cv_sys_large_files=1; break
5028 fi
5029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5030 ac_cv_sys_large_files=unknown
5031 break
5032 done
5033 fi
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5035 $as_echo "$ac_cv_sys_large_files" >&6; }
5036 case $ac_cv_sys_large_files in #(
5037 no | unknown) ;;
5038 *)
5039 cat >>confdefs.h <<_ACEOF
5040 #define _LARGE_FILES $ac_cv_sys_large_files
5041 _ACEOF
5042 ;;
5043 esac
5044 rm -rf conftest*
5045 fi
5046
5047
5048 fi
5049
5050
5051 # Expand $ac_aux_dir to an absolute path.
5052 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5053
5054 if test x"${install_sh+set}" != xset; then
5055 case $am_aux_dir in
5056 *\ * | *\ *)
5057 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5058 *)
5059 install_sh="\${SHELL} $am_aux_dir/install-sh"
5060 esac
5061 fi
5062
5063 # Installed binaries are usually stripped using 'strip' when the user
5064 # run "make install-strip". However 'strip' might not be the right
5065 # tool to use in cross-compilation environments, therefore Automake
5066 # will honor the 'STRIP' environment variable to overrule this program.
5067 if test "$cross_compiling" != no; then
5068 if test -n "$ac_tool_prefix"; then
5069 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5070 set dummy ${ac_tool_prefix}strip; ac_word=$2
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5072 $as_echo_n "checking for $ac_word... " >&6; }
5073 if ${ac_cv_prog_STRIP+:} false; then :
5074 $as_echo_n "(cached) " >&6
5075 else
5076 if test -n "$STRIP"; then
5077 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5078 else
5079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080 for as_dir in $PATH
5081 do
5082 IFS=$as_save_IFS
5083 test -z "$as_dir" && as_dir=.
5084 for ac_exec_ext in '' $ac_executable_extensions; do
5085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088 break 2
5089 fi
5090 done
5091 done
5092 IFS=$as_save_IFS
5093
5094 fi
5095 fi
5096 STRIP=$ac_cv_prog_STRIP
5097 if test -n "$STRIP"; then
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5099 $as_echo "$STRIP" >&6; }
5100 else
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102 $as_echo "no" >&6; }
5103 fi
5104
5105
5106 fi
5107 if test -z "$ac_cv_prog_STRIP"; then
5108 ac_ct_STRIP=$STRIP
5109 # Extract the first word of "strip", so it can be a program name with args.
5110 set dummy strip; ac_word=$2
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5112 $as_echo_n "checking for $ac_word... " >&6; }
5113 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5114 $as_echo_n "(cached) " >&6
5115 else
5116 if test -n "$ac_ct_STRIP"; then
5117 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5118 else
5119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5120 for as_dir in $PATH
5121 do
5122 IFS=$as_save_IFS
5123 test -z "$as_dir" && as_dir=.
5124 for ac_exec_ext in '' $ac_executable_extensions; do
5125 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5126 ac_cv_prog_ac_ct_STRIP="strip"
5127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5128 break 2
5129 fi
5130 done
5131 done
5132 IFS=$as_save_IFS
5133
5134 fi
5135 fi
5136 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5137 if test -n "$ac_ct_STRIP"; then
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5139 $as_echo "$ac_ct_STRIP" >&6; }
5140 else
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5142 $as_echo "no" >&6; }
5143 fi
5144
5145 if test "x$ac_ct_STRIP" = x; then
5146 STRIP=":"
5147 else
5148 case $cross_compiling:$ac_tool_warned in
5149 yes:)
5150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5151 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5152 ac_tool_warned=yes ;;
5153 esac
5154 STRIP=$ac_ct_STRIP
5155 fi
5156 else
5157 STRIP="$ac_cv_prog_STRIP"
5158 fi
5159
5160 fi
5161 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5162
5163
5164 ac_aux_dir=
5165 for ac_dir in .. "$srcdir"/..; do
5166 if test -f "$ac_dir/install-sh"; then
5167 ac_aux_dir=$ac_dir
5168 ac_install_sh="$ac_aux_dir/install-sh -c"
5169 break
5170 elif test -f "$ac_dir/install.sh"; then
5171 ac_aux_dir=$ac_dir
5172 ac_install_sh="$ac_aux_dir/install.sh -c"
5173 break
5174 elif test -f "$ac_dir/shtool"; then
5175 ac_aux_dir=$ac_dir
5176 ac_install_sh="$ac_aux_dir/shtool install -c"
5177 break
5178 fi
5179 done
5180 if test -z "$ac_aux_dir"; then
5181 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5182 fi
5183
5184 # These three variables are undocumented and unsupported,
5185 # and are intended to be withdrawn in a future Autoconf release.
5186 # They can cause serious problems if a builder's source tree is in a directory
5187 # whose full name contains unusual characters.
5188 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5189 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5190 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5191
5192
5193
5194 # Set build, build_cpu, build_vendor and build_os.
5195
5196
5197 # Set host, host_cpu, host_vendor, and host_os.
5198
5199
5200 # Set target, target_cpu, target_vendor, and target_os.
5201
5202
5203 case ${build_alias} in
5204 "") build_noncanonical=${build} ;;
5205 *) build_noncanonical=${build_alias} ;;
5206 esac
5207
5208 case ${host_alias} in
5209 "") host_noncanonical=${build_noncanonical} ;;
5210 *) host_noncanonical=${host_alias} ;;
5211 esac
5212
5213 case ${target_alias} in
5214 "") target_noncanonical=${host_noncanonical} ;;
5215 *) target_noncanonical=${target_alias} ;;
5216 esac
5217
5218
5219
5220
5221 test "$program_prefix" != NONE &&
5222 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5223 # Use a double $ so make ignores it.
5224 test "$program_suffix" != NONE &&
5225 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5226 # Double any \ or $.
5227 # By default was `s,x,x', remove it if useless.
5228 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5229 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5230
5231
5232 # We require a C++11 compiler. Check if one is available, and if
5233 # necessary, set CXX_DIALECT to some -std=xxx switch.
5234
5235 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5236 ac_ext=cpp
5237 ac_cpp='$CXXCPP $CPPFLAGS'
5238 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5239 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5240 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5241 CXX_DIALECT=""
5242 ac_success=no
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5244 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5245 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5246 $as_echo_n "(cached) " >&6
5247 else
5248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5249 /* end confdefs.h. */
5250
5251
5252 // If the compiler admits that it is not ready for C++11, why torture it?
5253 // Hopefully, this will speed up the test.
5254
5255 #ifndef __cplusplus
5256
5257 #error "This is not a C++ compiler"
5258
5259 #elif __cplusplus < 201103L
5260
5261 #error "This is not a C++11 compiler"
5262
5263 #else
5264
5265 namespace cxx11
5266 {
5267
5268 namespace test_static_assert
5269 {
5270
5271 template <typename T>
5272 struct check
5273 {
5274 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5275 };
5276
5277 }
5278
5279 namespace test_final_override
5280 {
5281
5282 struct Base
5283 {
5284 virtual void f() {}
5285 };
5286
5287 struct Derived : public Base
5288 {
5289 virtual void f() override {}
5290 };
5291
5292 }
5293
5294 namespace test_double_right_angle_brackets
5295 {
5296
5297 template < typename T >
5298 struct check {};
5299
5300 typedef check<void> single_type;
5301 typedef check<check<void>> double_type;
5302 typedef check<check<check<void>>> triple_type;
5303 typedef check<check<check<check<void>>>> quadruple_type;
5304
5305 }
5306
5307 namespace test_decltype
5308 {
5309
5310 int
5311 f()
5312 {
5313 int a = 1;
5314 decltype(a) b = 2;
5315 return a + b;
5316 }
5317
5318 }
5319
5320 namespace test_type_deduction
5321 {
5322
5323 template < typename T1, typename T2 >
5324 struct is_same
5325 {
5326 static const bool value = false;
5327 };
5328
5329 template < typename T >
5330 struct is_same<T, T>
5331 {
5332 static const bool value = true;
5333 };
5334
5335 template < typename T1, typename T2 >
5336 auto
5337 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5338 {
5339 return a1 + a2;
5340 }
5341
5342 int
5343 test(const int c, volatile int v)
5344 {
5345 static_assert(is_same<int, decltype(0)>::value == true, "");
5346 static_assert(is_same<int, decltype(c)>::value == false, "");
5347 static_assert(is_same<int, decltype(v)>::value == false, "");
5348 auto ac = c;
5349 auto av = v;
5350 auto sumi = ac + av + 'x';
5351 auto sumf = ac + av + 1.0;
5352 static_assert(is_same<int, decltype(ac)>::value == true, "");
5353 static_assert(is_same<int, decltype(av)>::value == true, "");
5354 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5355 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5356 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5357 return (sumf > 0.0) ? sumi : add(c, v);
5358 }
5359
5360 }
5361
5362 namespace test_noexcept
5363 {
5364
5365 int f() { return 0; }
5366 int g() noexcept { return 0; }
5367
5368 static_assert(noexcept(f()) == false, "");
5369 static_assert(noexcept(g()) == true, "");
5370
5371 }
5372
5373 namespace test_constexpr
5374 {
5375
5376 template < typename CharT >
5377 unsigned long constexpr
5378 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5379 {
5380 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5381 }
5382
5383 template < typename CharT >
5384 unsigned long constexpr
5385 strlen_c(const CharT *const s) noexcept
5386 {
5387 return strlen_c_r(s, 0UL);
5388 }
5389
5390 static_assert(strlen_c("") == 0UL, "");
5391 static_assert(strlen_c("1") == 1UL, "");
5392 static_assert(strlen_c("example") == 7UL, "");
5393 static_assert(strlen_c("another\0example") == 7UL, "");
5394
5395 }
5396
5397 namespace test_rvalue_references
5398 {
5399
5400 template < int N >
5401 struct answer
5402 {
5403 static constexpr int value = N;
5404 };
5405
5406 answer<1> f(int&) { return answer<1>(); }
5407 answer<2> f(const int&) { return answer<2>(); }
5408 answer<3> f(int&&) { return answer<3>(); }
5409
5410 void
5411 test()
5412 {
5413 int i = 0;
5414 const int c = 0;
5415 static_assert(decltype(f(i))::value == 1, "");
5416 static_assert(decltype(f(c))::value == 2, "");
5417 static_assert(decltype(f(0))::value == 3, "");
5418 }
5419
5420 }
5421
5422 namespace test_uniform_initialization
5423 {
5424
5425 struct test
5426 {
5427 static const int zero {};
5428 static const int one {1};
5429 };
5430
5431 static_assert(test::zero == 0, "");
5432 static_assert(test::one == 1, "");
5433
5434 }
5435
5436 namespace test_lambdas
5437 {
5438
5439 void
5440 test1()
5441 {
5442 auto lambda1 = [](){};
5443 auto lambda2 = lambda1;
5444 lambda1();
5445 lambda2();
5446 }
5447
5448 int
5449 test2()
5450 {
5451 auto a = [](int i, int j){ return i + j; }(1, 2);
5452 auto b = []() -> int { return '0'; }();
5453 auto c = [=](){ return a + b; }();
5454 auto d = [&](){ return c; }();
5455 auto e = [a, &b](int x) mutable {
5456 const auto identity = [](int y){ return y; };
5457 for (auto i = 0; i < a; ++i)
5458 a += b--;
5459 return x + identity(a + b);
5460 }(0);
5461 return a + b + c + d + e;
5462 }
5463
5464 int
5465 test3()
5466 {
5467 const auto nullary = [](){ return 0; };
5468 const auto unary = [](int x){ return x; };
5469 using nullary_t = decltype(nullary);
5470 using unary_t = decltype(unary);
5471 const auto higher1st = [](nullary_t f){ return f(); };
5472 const auto higher2nd = [unary](nullary_t f1){
5473 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5474 };
5475 return higher1st(nullary) + higher2nd(nullary)(unary);
5476 }
5477
5478 }
5479
5480 namespace test_variadic_templates
5481 {
5482
5483 template <int...>
5484 struct sum;
5485
5486 template <int N0, int... N1toN>
5487 struct sum<N0, N1toN...>
5488 {
5489 static constexpr auto value = N0 + sum<N1toN...>::value;
5490 };
5491
5492 template <>
5493 struct sum<>
5494 {
5495 static constexpr auto value = 0;
5496 };
5497
5498 static_assert(sum<>::value == 0, "");
5499 static_assert(sum<1>::value == 1, "");
5500 static_assert(sum<23>::value == 23, "");
5501 static_assert(sum<1, 2>::value == 3, "");
5502 static_assert(sum<5, 5, 11>::value == 21, "");
5503 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5504
5505 }
5506
5507 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5508 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5509 // because of this.
5510 namespace test_template_alias_sfinae
5511 {
5512
5513 struct foo {};
5514
5515 template<typename T>
5516 using member = typename T::member_type;
5517
5518 template<typename T>
5519 void func(...) {}
5520
5521 template<typename T>
5522 void func(member<T>*) {}
5523
5524 void test();
5525
5526 void test() { func<foo>(0); }
5527
5528 }
5529
5530 } // namespace cxx11
5531
5532 #endif // __cplusplus >= 201103L
5533
5534
5535
5536 _ACEOF
5537 if ac_fn_cxx_try_compile "$LINENO"; then :
5538 ax_cv_cxx_compile_cxx11=yes
5539 else
5540 ax_cv_cxx_compile_cxx11=no
5541 fi
5542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5543 fi
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5545 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5546 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5547 ac_success=yes
5548 fi
5549
5550 if test x$ac_success = xno; then
5551 for alternative in ${ax_cxx_compile_alternatives}; do
5552 switch="-std=gnu++${alternative}"
5553 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5555 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5556 if eval \${$cachevar+:} false; then :
5557 $as_echo_n "(cached) " >&6
5558 else
5559 ac_save_CXX="$CXX"
5560 CXX="$CXX $switch"
5561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5562 /* end confdefs.h. */
5563
5564
5565 // If the compiler admits that it is not ready for C++11, why torture it?
5566 // Hopefully, this will speed up the test.
5567
5568 #ifndef __cplusplus
5569
5570 #error "This is not a C++ compiler"
5571
5572 #elif __cplusplus < 201103L
5573
5574 #error "This is not a C++11 compiler"
5575
5576 #else
5577
5578 namespace cxx11
5579 {
5580
5581 namespace test_static_assert
5582 {
5583
5584 template <typename T>
5585 struct check
5586 {
5587 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5588 };
5589
5590 }
5591
5592 namespace test_final_override
5593 {
5594
5595 struct Base
5596 {
5597 virtual void f() {}
5598 };
5599
5600 struct Derived : public Base
5601 {
5602 virtual void f() override {}
5603 };
5604
5605 }
5606
5607 namespace test_double_right_angle_brackets
5608 {
5609
5610 template < typename T >
5611 struct check {};
5612
5613 typedef check<void> single_type;
5614 typedef check<check<void>> double_type;
5615 typedef check<check<check<void>>> triple_type;
5616 typedef check<check<check<check<void>>>> quadruple_type;
5617
5618 }
5619
5620 namespace test_decltype
5621 {
5622
5623 int
5624 f()
5625 {
5626 int a = 1;
5627 decltype(a) b = 2;
5628 return a + b;
5629 }
5630
5631 }
5632
5633 namespace test_type_deduction
5634 {
5635
5636 template < typename T1, typename T2 >
5637 struct is_same
5638 {
5639 static const bool value = false;
5640 };
5641
5642 template < typename T >
5643 struct is_same<T, T>
5644 {
5645 static const bool value = true;
5646 };
5647
5648 template < typename T1, typename T2 >
5649 auto
5650 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5651 {
5652 return a1 + a2;
5653 }
5654
5655 int
5656 test(const int c, volatile int v)
5657 {
5658 static_assert(is_same<int, decltype(0)>::value == true, "");
5659 static_assert(is_same<int, decltype(c)>::value == false, "");
5660 static_assert(is_same<int, decltype(v)>::value == false, "");
5661 auto ac = c;
5662 auto av = v;
5663 auto sumi = ac + av + 'x';
5664 auto sumf = ac + av + 1.0;
5665 static_assert(is_same<int, decltype(ac)>::value == true, "");
5666 static_assert(is_same<int, decltype(av)>::value == true, "");
5667 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5668 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5669 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5670 return (sumf > 0.0) ? sumi : add(c, v);
5671 }
5672
5673 }
5674
5675 namespace test_noexcept
5676 {
5677
5678 int f() { return 0; }
5679 int g() noexcept { return 0; }
5680
5681 static_assert(noexcept(f()) == false, "");
5682 static_assert(noexcept(g()) == true, "");
5683
5684 }
5685
5686 namespace test_constexpr
5687 {
5688
5689 template < typename CharT >
5690 unsigned long constexpr
5691 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5692 {
5693 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5694 }
5695
5696 template < typename CharT >
5697 unsigned long constexpr
5698 strlen_c(const CharT *const s) noexcept
5699 {
5700 return strlen_c_r(s, 0UL);
5701 }
5702
5703 static_assert(strlen_c("") == 0UL, "");
5704 static_assert(strlen_c("1") == 1UL, "");
5705 static_assert(strlen_c("example") == 7UL, "");
5706 static_assert(strlen_c("another\0example") == 7UL, "");
5707
5708 }
5709
5710 namespace test_rvalue_references
5711 {
5712
5713 template < int N >
5714 struct answer
5715 {
5716 static constexpr int value = N;
5717 };
5718
5719 answer<1> f(int&) { return answer<1>(); }
5720 answer<2> f(const int&) { return answer<2>(); }
5721 answer<3> f(int&&) { return answer<3>(); }
5722
5723 void
5724 test()
5725 {
5726 int i = 0;
5727 const int c = 0;
5728 static_assert(decltype(f(i))::value == 1, "");
5729 static_assert(decltype(f(c))::value == 2, "");
5730 static_assert(decltype(f(0))::value == 3, "");
5731 }
5732
5733 }
5734
5735 namespace test_uniform_initialization
5736 {
5737
5738 struct test
5739 {
5740 static const int zero {};
5741 static const int one {1};
5742 };
5743
5744 static_assert(test::zero == 0, "");
5745 static_assert(test::one == 1, "");
5746
5747 }
5748
5749 namespace test_lambdas
5750 {
5751
5752 void
5753 test1()
5754 {
5755 auto lambda1 = [](){};
5756 auto lambda2 = lambda1;
5757 lambda1();
5758 lambda2();
5759 }
5760
5761 int
5762 test2()
5763 {
5764 auto a = [](int i, int j){ return i + j; }(1, 2);
5765 auto b = []() -> int { return '0'; }();
5766 auto c = [=](){ return a + b; }();
5767 auto d = [&](){ return c; }();
5768 auto e = [a, &b](int x) mutable {
5769 const auto identity = [](int y){ return y; };
5770 for (auto i = 0; i < a; ++i)
5771 a += b--;
5772 return x + identity(a + b);
5773 }(0);
5774 return a + b + c + d + e;
5775 }
5776
5777 int
5778 test3()
5779 {
5780 const auto nullary = [](){ return 0; };
5781 const auto unary = [](int x){ return x; };
5782 using nullary_t = decltype(nullary);
5783 using unary_t = decltype(unary);
5784 const auto higher1st = [](nullary_t f){ return f(); };
5785 const auto higher2nd = [unary](nullary_t f1){
5786 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5787 };
5788 return higher1st(nullary) + higher2nd(nullary)(unary);
5789 }
5790
5791 }
5792
5793 namespace test_variadic_templates
5794 {
5795
5796 template <int...>
5797 struct sum;
5798
5799 template <int N0, int... N1toN>
5800 struct sum<N0, N1toN...>
5801 {
5802 static constexpr auto value = N0 + sum<N1toN...>::value;
5803 };
5804
5805 template <>
5806 struct sum<>
5807 {
5808 static constexpr auto value = 0;
5809 };
5810
5811 static_assert(sum<>::value == 0, "");
5812 static_assert(sum<1>::value == 1, "");
5813 static_assert(sum<23>::value == 23, "");
5814 static_assert(sum<1, 2>::value == 3, "");
5815 static_assert(sum<5, 5, 11>::value == 21, "");
5816 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5817
5818 }
5819
5820 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5821 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5822 // because of this.
5823 namespace test_template_alias_sfinae
5824 {
5825
5826 struct foo {};
5827
5828 template<typename T>
5829 using member = typename T::member_type;
5830
5831 template<typename T>
5832 void func(...) {}
5833
5834 template<typename T>
5835 void func(member<T>*) {}
5836
5837 void test();
5838
5839 void test() { func<foo>(0); }
5840
5841 }
5842
5843 } // namespace cxx11
5844
5845 #endif // __cplusplus >= 201103L
5846
5847
5848
5849 _ACEOF
5850 if ac_fn_cxx_try_compile "$LINENO"; then :
5851 eval $cachevar=yes
5852 else
5853 eval $cachevar=no
5854 fi
5855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5856 CXX="$ac_save_CXX"
5857 fi
5858 eval ac_res=\$$cachevar
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5860 $as_echo "$ac_res" >&6; }
5861 if eval test x\$$cachevar = xyes; then
5862 CXX_DIALECT="$switch"
5863 CXX="$CXX $switch"
5864 if test -n "$CXXCPP" ; then
5865 CXXCPP="$CXXCPP $switch"
5866 fi
5867 ac_success=yes
5868 break
5869 fi
5870 done
5871 fi
5872
5873 if test x$ac_success = xno; then
5874 for alternative in ${ax_cxx_compile_alternatives}; do
5875 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5876 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5878 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5879 if eval \${$cachevar+:} false; then :
5880 $as_echo_n "(cached) " >&6
5881 else
5882 ac_save_CXX="$CXX"
5883 CXX="$CXX $switch"
5884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5885 /* end confdefs.h. */
5886
5887
5888 // If the compiler admits that it is not ready for C++11, why torture it?
5889 // Hopefully, this will speed up the test.
5890
5891 #ifndef __cplusplus
5892
5893 #error "This is not a C++ compiler"
5894
5895 #elif __cplusplus < 201103L
5896
5897 #error "This is not a C++11 compiler"
5898
5899 #else
5900
5901 namespace cxx11
5902 {
5903
5904 namespace test_static_assert
5905 {
5906
5907 template <typename T>
5908 struct check
5909 {
5910 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5911 };
5912
5913 }
5914
5915 namespace test_final_override
5916 {
5917
5918 struct Base
5919 {
5920 virtual void f() {}
5921 };
5922
5923 struct Derived : public Base
5924 {
5925 virtual void f() override {}
5926 };
5927
5928 }
5929
5930 namespace test_double_right_angle_brackets
5931 {
5932
5933 template < typename T >
5934 struct check {};
5935
5936 typedef check<void> single_type;
5937 typedef check<check<void>> double_type;
5938 typedef check<check<check<void>>> triple_type;
5939 typedef check<check<check<check<void>>>> quadruple_type;
5940
5941 }
5942
5943 namespace test_decltype
5944 {
5945
5946 int
5947 f()
5948 {
5949 int a = 1;
5950 decltype(a) b = 2;
5951 return a + b;
5952 }
5953
5954 }
5955
5956 namespace test_type_deduction
5957 {
5958
5959 template < typename T1, typename T2 >
5960 struct is_same
5961 {
5962 static const bool value = false;
5963 };
5964
5965 template < typename T >
5966 struct is_same<T, T>
5967 {
5968 static const bool value = true;
5969 };
5970
5971 template < typename T1, typename T2 >
5972 auto
5973 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5974 {
5975 return a1 + a2;
5976 }
5977
5978 int
5979 test(const int c, volatile int v)
5980 {
5981 static_assert(is_same<int, decltype(0)>::value == true, "");
5982 static_assert(is_same<int, decltype(c)>::value == false, "");
5983 static_assert(is_same<int, decltype(v)>::value == false, "");
5984 auto ac = c;
5985 auto av = v;
5986 auto sumi = ac + av + 'x';
5987 auto sumf = ac + av + 1.0;
5988 static_assert(is_same<int, decltype(ac)>::value == true, "");
5989 static_assert(is_same<int, decltype(av)>::value == true, "");
5990 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5991 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5992 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5993 return (sumf > 0.0) ? sumi : add(c, v);
5994 }
5995
5996 }
5997
5998 namespace test_noexcept
5999 {
6000
6001 int f() { return 0; }
6002 int g() noexcept { return 0; }
6003
6004 static_assert(noexcept(f()) == false, "");
6005 static_assert(noexcept(g()) == true, "");
6006
6007 }
6008
6009 namespace test_constexpr
6010 {
6011
6012 template < typename CharT >
6013 unsigned long constexpr
6014 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6015 {
6016 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6017 }
6018
6019 template < typename CharT >
6020 unsigned long constexpr
6021 strlen_c(const CharT *const s) noexcept
6022 {
6023 return strlen_c_r(s, 0UL);
6024 }
6025
6026 static_assert(strlen_c("") == 0UL, "");
6027 static_assert(strlen_c("1") == 1UL, "");
6028 static_assert(strlen_c("example") == 7UL, "");
6029 static_assert(strlen_c("another\0example") == 7UL, "");
6030
6031 }
6032
6033 namespace test_rvalue_references
6034 {
6035
6036 template < int N >
6037 struct answer
6038 {
6039 static constexpr int value = N;
6040 };
6041
6042 answer<1> f(int&) { return answer<1>(); }
6043 answer<2> f(const int&) { return answer<2>(); }
6044 answer<3> f(int&&) { return answer<3>(); }
6045
6046 void
6047 test()
6048 {
6049 int i = 0;
6050 const int c = 0;
6051 static_assert(decltype(f(i))::value == 1, "");
6052 static_assert(decltype(f(c))::value == 2, "");
6053 static_assert(decltype(f(0))::value == 3, "");
6054 }
6055
6056 }
6057
6058 namespace test_uniform_initialization
6059 {
6060
6061 struct test
6062 {
6063 static const int zero {};
6064 static const int one {1};
6065 };
6066
6067 static_assert(test::zero == 0, "");
6068 static_assert(test::one == 1, "");
6069
6070 }
6071
6072 namespace test_lambdas
6073 {
6074
6075 void
6076 test1()
6077 {
6078 auto lambda1 = [](){};
6079 auto lambda2 = lambda1;
6080 lambda1();
6081 lambda2();
6082 }
6083
6084 int
6085 test2()
6086 {
6087 auto a = [](int i, int j){ return i + j; }(1, 2);
6088 auto b = []() -> int { return '0'; }();
6089 auto c = [=](){ return a + b; }();
6090 auto d = [&](){ return c; }();
6091 auto e = [a, &b](int x) mutable {
6092 const auto identity = [](int y){ return y; };
6093 for (auto i = 0; i < a; ++i)
6094 a += b--;
6095 return x + identity(a + b);
6096 }(0);
6097 return a + b + c + d + e;
6098 }
6099
6100 int
6101 test3()
6102 {
6103 const auto nullary = [](){ return 0; };
6104 const auto unary = [](int x){ return x; };
6105 using nullary_t = decltype(nullary);
6106 using unary_t = decltype(unary);
6107 const auto higher1st = [](nullary_t f){ return f(); };
6108 const auto higher2nd = [unary](nullary_t f1){
6109 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6110 };
6111 return higher1st(nullary) + higher2nd(nullary)(unary);
6112 }
6113
6114 }
6115
6116 namespace test_variadic_templates
6117 {
6118
6119 template <int...>
6120 struct sum;
6121
6122 template <int N0, int... N1toN>
6123 struct sum<N0, N1toN...>
6124 {
6125 static constexpr auto value = N0 + sum<N1toN...>::value;
6126 };
6127
6128 template <>
6129 struct sum<>
6130 {
6131 static constexpr auto value = 0;
6132 };
6133
6134 static_assert(sum<>::value == 0, "");
6135 static_assert(sum<1>::value == 1, "");
6136 static_assert(sum<23>::value == 23, "");
6137 static_assert(sum<1, 2>::value == 3, "");
6138 static_assert(sum<5, 5, 11>::value == 21, "");
6139 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6140
6141 }
6142
6143 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6144 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6145 // because of this.
6146 namespace test_template_alias_sfinae
6147 {
6148
6149 struct foo {};
6150
6151 template<typename T>
6152 using member = typename T::member_type;
6153
6154 template<typename T>
6155 void func(...) {}
6156
6157 template<typename T>
6158 void func(member<T>*) {}
6159
6160 void test();
6161
6162 void test() { func<foo>(0); }
6163
6164 }
6165
6166 } // namespace cxx11
6167
6168 #endif // __cplusplus >= 201103L
6169
6170
6171
6172 _ACEOF
6173 if ac_fn_cxx_try_compile "$LINENO"; then :
6174 eval $cachevar=yes
6175 else
6176 eval $cachevar=no
6177 fi
6178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6179 CXX="$ac_save_CXX"
6180 fi
6181 eval ac_res=\$$cachevar
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6183 $as_echo "$ac_res" >&6; }
6184 if eval test x\$$cachevar = xyes; then
6185 CXX_DIALECT="$switch"
6186 CXX="$CXX $switch"
6187 if test -n "$CXXCPP" ; then
6188 CXXCPP="$CXXCPP $switch"
6189 fi
6190 ac_success=yes
6191 break
6192 fi
6193 done
6194 if test x$ac_success = xyes; then
6195 break
6196 fi
6197 done
6198 fi
6199 ac_ext=c
6200 ac_cpp='$CPP $CPPFLAGS'
6201 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6202 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6203 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6204
6205 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6206 if test x$ac_success = xno; then
6207 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6208 fi
6209 fi
6210 if test x$ac_success = xno; then
6211 HAVE_CXX11=0
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6213 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6214 else
6215 HAVE_CXX11=1
6216
6217 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6218
6219 fi
6220
6221
6222
6223
6224 # Dependency checking.
6225 rm -rf .tst 2>/dev/null
6226 mkdir .tst 2>/dev/null
6227 if test -d .tst; then
6228 am__leading_dot=.
6229 else
6230 am__leading_dot=_
6231 fi
6232 rmdir .tst 2>/dev/null
6233
6234 DEPDIR="${am__leading_dot}deps"
6235
6236 ac_config_commands="$ac_config_commands depdir"
6237
6238
6239 depcc="$CC" am_compiler_list=
6240
6241 am_depcomp=$ac_aux_dir/depcomp
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6243 $as_echo_n "checking dependency style of $depcc... " >&6; }
6244 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6245 $as_echo_n "(cached) " >&6
6246 else
6247 if test -f "$am_depcomp"; then
6248 # We make a subdir and do the tests there. Otherwise we can end up
6249 # making bogus files that we don't know about and never remove. For
6250 # instance it was reported that on HP-UX the gcc test will end up
6251 # making a dummy file named `D' -- because `-MD' means `put the output
6252 # in D'.
6253 mkdir conftest.dir
6254 # Copy depcomp to subdir because otherwise we won't find it if we're
6255 # using a relative directory.
6256 cp "$am_depcomp" conftest.dir
6257 cd conftest.dir
6258 # We will build objects and dependencies in a subdirectory because
6259 # it helps to detect inapplicable dependency modes. For instance
6260 # both Tru64's cc and ICC support -MD to output dependencies as a
6261 # side effect of compilation, but ICC will put the dependencies in
6262 # the current directory while Tru64 will put them in the object
6263 # directory.
6264 mkdir sub
6265
6266 am_cv_CC_dependencies_compiler_type=none
6267 if test "$am_compiler_list" = ""; then
6268 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6269 fi
6270 for depmode in $am_compiler_list; do
6271 if test $depmode = none; then break; fi
6272
6273 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6274 # Setup a source with many dependencies, because some compilers
6275 # like to wrap large dependency lists on column 80 (with \), and
6276 # we should not choose a depcomp mode which is confused by this.
6277 #
6278 # We need to recreate these files for each test, as the compiler may
6279 # overwrite some of them when testing with obscure command lines.
6280 # This happens at least with the AIX C compiler.
6281 : > sub/conftest.c
6282 for i in 1 2 3 4 5 6; do
6283 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6284 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6285 # Solaris 8's {/usr,}/bin/sh.
6286 touch sub/conftst$i.h
6287 done
6288 echo "include sub/conftest.Po" > confmf
6289
6290 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6291 # mode. It turns out that the SunPro C++ compiler does not properly
6292 # handle `-M -o', and we need to detect this.
6293 depcmd="depmode=$depmode \
6294 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6295 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6296 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6297 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6298 if env $depcmd > conftest.err 2>&1 &&
6299 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6300 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6301 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6302 # icc doesn't choke on unknown options, it will just issue warnings
6303 # or remarks (even with -Werror). So we grep stderr for any message
6304 # that says an option was ignored or not supported.
6305 # When given -MP, icc 7.0 and 7.1 complain thusly:
6306 # icc: Command line warning: ignoring option '-M'; no argument required
6307 # The diagnosis changed in icc 8.0:
6308 # icc: Command line remark: option '-MP' not supported
6309 if (grep 'ignoring option' conftest.err ||
6310 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6311 am_cv_CC_dependencies_compiler_type=$depmode
6312 $as_echo "$as_me:$LINENO: success" >&5
6313 break
6314 fi
6315 fi
6316 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6317 sed -e 's/^/| /' < conftest.err >&5
6318 done
6319
6320 cd ..
6321 rm -rf conftest.dir
6322 else
6323 am_cv_CC_dependencies_compiler_type=none
6324 fi
6325
6326 fi
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6328 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6329 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6330 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6331 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6332
6333 fi
6334
6335
6336
6337 CONFIG_OBS=
6338 CONFIG_DEPS=
6339 CONFIG_SRCS=
6340 ENABLE_CFLAGS=
6341
6342 CONFIG_ALL=
6343 CONFIG_CLEAN=
6344 CONFIG_INSTALL=
6345 CONFIG_UNINSTALL=
6346
6347 # If we haven't got the data from the intl directory,
6348 # assume NLS is disabled.
6349 USE_NLS=no
6350 LIBINTL=
6351 LIBINTL_DEP=
6352 INCINTL=
6353 XGETTEXT=
6354 GMSGFMT=
6355 POSUB=
6356
6357 if test -f ../intl/config.intl; then
6358 . ../intl/config.intl
6359 fi
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6361 $as_echo_n "checking whether NLS is requested... " >&6; }
6362 if test x"$USE_NLS" != xyes; then
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6364 $as_echo "no" >&6; }
6365 else
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6367 $as_echo "yes" >&6; }
6368
6369 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6370
6371
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6373 $as_echo_n "checking for catalogs to be installed... " >&6; }
6374 # Look for .po and .gmo files in the source directory.
6375 CATALOGS=
6376 XLINGUAS=
6377 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6378 # If there aren't any .gmo files the shell will give us the
6379 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6380 # weeded out.
6381 case "$cat" in *\**)
6382 continue;;
6383 esac
6384 # The quadruple backslash is collapsed to a double backslash
6385 # by the backticks, then collapsed again by the double quotes,
6386 # leaving us with one backslash in the sed expression (right
6387 # before the dot that mustn't act as a wildcard).
6388 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6389 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6390 # The user is allowed to set LINGUAS to a list of languages to
6391 # install catalogs for. If it's empty that means "all of them."
6392 if test "x$LINGUAS" = x; then
6393 CATALOGS="$CATALOGS $cat"
6394 XLINGUAS="$XLINGUAS $lang"
6395 else
6396 case "$LINGUAS" in *$lang*)
6397 CATALOGS="$CATALOGS $cat"
6398 XLINGUAS="$XLINGUAS $lang"
6399 ;;
6400 esac
6401 fi
6402 done
6403 LINGUAS="$XLINGUAS"
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6405 $as_echo "$LINGUAS" >&6; }
6406
6407
6408 DATADIRNAME=share
6409
6410 INSTOBJEXT=.mo
6411
6412 GENCAT=gencat
6413
6414 CATOBJEXT=.gmo
6415
6416 fi
6417
6418 localedir='${datadir}/locale'
6419
6420
6421 if test x"$USE_NLS" = xyes; then
6422 CONFIG_ALL="$CONFIG_ALL all-po"
6423 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6424 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6425 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6426 fi
6427
6428 PACKAGE=gdb
6429
6430 cat >>confdefs.h <<_ACEOF
6431 #define PACKAGE "$PACKAGE"
6432 _ACEOF
6433
6434
6435
6436 # We never need to detect it in this sub-configure.
6437 # But preserve it for config.status --recheck.
6438
6439
6440
6441 MAKEINFO_EXTRA_FLAGS=""
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6443 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6444 if ${gdb_cv_have_makeinfo_click+:} false; then :
6445 $as_echo_n "(cached) " >&6
6446 else
6447 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6448 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6449 gdb_cv_have_makeinfo_click=yes
6450 else
6451 gdb_cv_have_makeinfo_click=no
6452 fi
6453 fi
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6455 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6456 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6457 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6458 fi
6459
6460
6461
6462
6463 # Check whether --with-separate-debug-dir was given.
6464 if test "${with_separate_debug_dir+set}" = set; then :
6465 withval=$with_separate_debug_dir;
6466 DEBUGDIR=$withval
6467 else
6468 DEBUGDIR=${libdir}/debug
6469 fi
6470
6471
6472 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6473 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6474 ac_define_dir=`eval echo $DEBUGDIR`
6475 ac_define_dir=`eval echo $ac_define_dir`
6476
6477 cat >>confdefs.h <<_ACEOF
6478 #define DEBUGDIR "$ac_define_dir"
6479 _ACEOF
6480
6481
6482
6483
6484 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6485 if test "x$prefix" = xNONE; then
6486 test_prefix=/usr/local
6487 else
6488 test_prefix=$prefix
6489 fi
6490 else
6491 test_prefix=$exec_prefix
6492 fi
6493 value=0
6494 case ${ac_define_dir} in
6495 "${test_prefix}"|"${test_prefix}/"*|\
6496 '${exec_prefix}'|'${exec_prefix}/'*)
6497 value=1
6498 ;;
6499 esac
6500
6501 cat >>confdefs.h <<_ACEOF
6502 #define DEBUGDIR_RELOCATABLE $value
6503 _ACEOF
6504
6505
6506
6507
6508 # We can't pass paths as command line arguments.
6509 # Mingw32 tries to be clever and will convert the paths for us.
6510 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6511 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6512 # This breaks GDB's relocatable path conversions since paths passed in
6513 # config.h would not get so translated, the path prefixes no longer match.
6514
6515 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6516 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6517 ac_define_dir=`eval echo $bindir`
6518 ac_define_dir=`eval echo $ac_define_dir`
6519
6520 cat >>confdefs.h <<_ACEOF
6521 #define BINDIR "$ac_define_dir"
6522 _ACEOF
6523
6524
6525
6526 # GDB's datadir relocation
6527
6528
6529
6530 # Check whether --with-gdb-datadir was given.
6531 if test "${with_gdb_datadir+set}" = set; then :
6532 withval=$with_gdb_datadir;
6533 GDB_DATADIR=$withval
6534 else
6535 GDB_DATADIR=${datadir}/gdb
6536 fi
6537
6538
6539 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6540 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6541 ac_define_dir=`eval echo $GDB_DATADIR`
6542 ac_define_dir=`eval echo $ac_define_dir`
6543
6544 cat >>confdefs.h <<_ACEOF
6545 #define GDB_DATADIR "$ac_define_dir"
6546 _ACEOF
6547
6548
6549
6550
6551 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6552 if test "x$prefix" = xNONE; then
6553 test_prefix=/usr/local
6554 else
6555 test_prefix=$prefix
6556 fi
6557 else
6558 test_prefix=$exec_prefix
6559 fi
6560 value=0
6561 case ${ac_define_dir} in
6562 "${test_prefix}"|"${test_prefix}/"*|\
6563 '${exec_prefix}'|'${exec_prefix}/'*)
6564 value=1
6565 ;;
6566 esac
6567
6568 cat >>confdefs.h <<_ACEOF
6569 #define GDB_DATADIR_RELOCATABLE $value
6570 _ACEOF
6571
6572
6573
6574
6575
6576 # Check whether --with-relocated-sources was given.
6577 if test "${with_relocated_sources+set}" = set; then :
6578 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6579
6580 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6581 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6582 ac_define_dir=`eval echo $reloc_srcdir`
6583 ac_define_dir=`eval echo $ac_define_dir`
6584
6585 cat >>confdefs.h <<_ACEOF
6586 #define RELOC_SRCDIR "$ac_define_dir"
6587 _ACEOF
6588
6589
6590
6591 fi
6592
6593
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6595 $as_echo_n "checking for default auto-load directory... " >&6; }
6596
6597 # Check whether --with-auto-load-dir was given.
6598 if test "${with_auto_load_dir+set}" = set; then :
6599 withval=$with_auto_load_dir;
6600 else
6601 with_auto_load_dir='$debugdir:$datadir/auto-load'
6602 fi
6603
6604 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6605
6606 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6607 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6608 ac_define_dir=`eval echo $escape_dir`
6609 ac_define_dir=`eval echo $ac_define_dir`
6610
6611 cat >>confdefs.h <<_ACEOF
6612 #define AUTO_LOAD_DIR "$ac_define_dir"
6613 _ACEOF
6614
6615
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6617 $as_echo "$with_auto_load_dir" >&6; }
6618
6619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6620 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6621
6622 # Check whether --with-auto-load-safe-path was given.
6623 if test "${with_auto_load_safe_path+set}" = set; then :
6624 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6625 with_auto_load_safe_path="/"
6626 fi
6627 else
6628 with_auto_load_safe_path="$with_auto_load_dir"
6629 fi
6630
6631 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6632
6633 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6634 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6635 ac_define_dir=`eval echo $escape_dir`
6636 ac_define_dir=`eval echo $ac_define_dir`
6637
6638 cat >>confdefs.h <<_ACEOF
6639 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6640 _ACEOF
6641
6642
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6644 $as_echo "$with_auto_load_safe_path" >&6; }
6645
6646
6647
6648 subdirs="$subdirs testsuite"
6649
6650
6651 # Check whether to support alternative target configurations
6652 # Check whether --enable-targets was given.
6653 if test "${enable_targets+set}" = set; then :
6654 enableval=$enable_targets; case "${enableval}" in
6655 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6656 ;;
6657 no) enable_targets= ;;
6658 *) enable_targets=$enableval ;;
6659 esac
6660 fi
6661
6662
6663 # Check whether --enable-64-bit-bfd was given.
6664 if test "${enable_64_bit_bfd+set}" = set; then :
6665 enableval=$enable_64_bit_bfd; case $enableval in #(
6666 yes|no) :
6667 ;; #(
6668 *) :
6669 as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; #(
6670 *) :
6671 ;;
6672 esac
6673 else
6674 enable_64_bit_bfd=no
6675 fi
6676
6677
6678 if test "x$enable_64_bit_bfd" = "xno"; then :
6679 # The cast to long int works around a bug in the HP C Compiler
6680 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6681 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6682 # This bug is HP SR number 8606223364.
6683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6684 $as_echo_n "checking size of void *... " >&6; }
6685 if ${ac_cv_sizeof_void_p+:} false; then :
6686 $as_echo_n "(cached) " >&6
6687 else
6688 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
6689
6690 else
6691 if test "$ac_cv_type_void_p" = yes; then
6692 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6693 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6694 as_fn_error 77 "cannot compute sizeof (void *)
6695 See \`config.log' for more details" "$LINENO" 5; }
6696 else
6697 ac_cv_sizeof_void_p=0
6698 fi
6699 fi
6700
6701 fi
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6703 $as_echo "$ac_cv_sizeof_void_p" >&6; }
6704
6705
6706
6707 cat >>confdefs.h <<_ACEOF
6708 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
6709 _ACEOF
6710
6711
6712 if test "x$ac_cv_sizeof_void_p" = "x8"; then :
6713 enable_64_bit_bfd=yes
6714 fi
6715
6716 fi
6717
6718 if test "x$enable_64_bit_bfd" = "xyes"; then
6719 ENABLE_BFD_64_BIT_TRUE=
6720 ENABLE_BFD_64_BIT_FALSE='#'
6721 else
6722 ENABLE_BFD_64_BIT_TRUE='#'
6723 ENABLE_BFD_64_BIT_FALSE=
6724 fi
6725
6726
6727
6728 # Provide defaults for some variables set by the per-host and per-target
6729 # configuration.
6730 gdb_host_obs=posix-hdep.o
6731
6732 if test "${target}" = "${host}"; then
6733 gdb_native=yes
6734 else
6735 gdb_native=no
6736 fi
6737
6738 . $srcdir/configure.host
6739
6740 # Accumulate some settings from configure.tgt over all enabled targets
6741
6742 TARGET_OBS=
6743 all_targets=
6744 HAVE_NATIVE_GCORE_TARGET=
6745
6746 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6747 do
6748 if test "$targ_alias" = "all"; then
6749 all_targets=true
6750 else
6751 # Canonicalize the secondary target names.
6752 result=`$ac_config_sub $targ_alias 2>/dev/null`
6753 if test -n "$result"; then
6754 targ=$result
6755 else
6756 targ=$targ_alias
6757 fi
6758
6759 . ${srcdir}/configure.tgt
6760
6761 if test -z "${gdb_target_obs}"; then :
6762 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6763 fi
6764
6765 # Target-specific object files
6766 for i in ${gdb_target_obs}; do
6767 case " $TARGET_OBS " in
6768 *" ${i} "*) ;;
6769 *)
6770 TARGET_OBS="$TARGET_OBS ${i}"
6771 ;;
6772 esac
6773 done
6774
6775 # Check whether this target needs 64-bit CORE_ADDR
6776 if test x${enable_64_bit_bfd} = xno; then
6777 . ${srcdir}/../bfd/config.bfd
6778 fi
6779
6780 # Check whether this target is native and supports gcore.
6781 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6782 && $gdb_have_gcore; then
6783 HAVE_NATIVE_GCORE_TARGET=1
6784 fi
6785 fi
6786 done
6787
6788 if test x${all_targets} = xtrue; then
6789 if test x${enable_64_bit_bfd} = xyes; then
6790 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6791 else
6792 TARGET_OBS='$(ALL_TARGET_OBS)'
6793 fi
6794 fi
6795
6796
6797
6798
6799 # For other settings, only the main target counts.
6800 gdb_sim=
6801 gdb_osabi=
6802 targ=$target; . ${srcdir}/configure.tgt
6803
6804 # Fetch the default architecture and default target vector from BFD.
6805 targ=$target; . $srcdir/../bfd/config.bfd
6806
6807 # We only want the first architecture, so strip off the others if
6808 # there is more than one.
6809 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6810
6811 if test "x$targ_archs" != x; then
6812
6813 cat >>confdefs.h <<_ACEOF
6814 #define DEFAULT_BFD_ARCH $targ_archs
6815 _ACEOF
6816
6817 fi
6818 if test "x$targ_defvec" != x; then
6819
6820 cat >>confdefs.h <<_ACEOF
6821 #define DEFAULT_BFD_VEC $targ_defvec
6822 _ACEOF
6823
6824 fi
6825
6826 # Enable MI.
6827 # Check whether --enable-gdbmi was given.
6828 if test "${enable_gdbmi+set}" = set; then :
6829 enableval=$enable_gdbmi;
6830 case $enableval in
6831 yes | no)
6832 ;;
6833 *)
6834 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5
6835 ;;
6836 esac
6837
6838 else
6839 enable_gdbmi=yes
6840 fi
6841
6842 if test x"$enable_gdbmi" = xyes; then
6843 if test -d "$srcdir/mi"; then
6844 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6845 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6846 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6847 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6848 fi
6849 fi
6850
6851 # Enable TUI.
6852 # Check whether --enable-tui was given.
6853 if test "${enable_tui+set}" = set; then :
6854 enableval=$enable_tui;
6855 case $enableval in
6856 yes | no | auto)
6857 ;;
6858 *)
6859 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5
6860 ;;
6861 esac
6862
6863 else
6864 enable_tui=auto
6865 fi
6866
6867
6868 # Enable gdbtk.
6869 # Check whether --enable-gdbtk was given.
6870 if test "${enable_gdbtk+set}" = set; then :
6871 enableval=$enable_gdbtk;
6872 case $enableval in
6873 yes | no)
6874 ;;
6875 *)
6876 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5
6877 ;;
6878 esac
6879
6880 else
6881 if test -d "$srcdir/gdbtk"; then
6882 enable_gdbtk=yes
6883 else
6884 enable_gdbtk=no
6885 fi
6886 fi
6887
6888 # We unconditionally disable gdbtk tests on selected platforms.
6889 case $host_os in
6890 go32* | windows*)
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6892 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6893 enable_gdbtk=no ;;
6894 esac
6895
6896 # Handle optional debuginfod support
6897
6898
6899
6900
6901
6902
6903
6904 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6905 if test -n "$ac_tool_prefix"; then
6906 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6907 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6909 $as_echo_n "checking for $ac_word... " >&6; }
6910 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6911 $as_echo_n "(cached) " >&6
6912 else
6913 case $PKG_CONFIG in
6914 [\\/]* | ?:[\\/]*)
6915 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6916 ;;
6917 *)
6918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6919 for as_dir in $PATH
6920 do
6921 IFS=$as_save_IFS
6922 test -z "$as_dir" && as_dir=.
6923 for ac_exec_ext in '' $ac_executable_extensions; do
6924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6925 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6927 break 2
6928 fi
6929 done
6930 done
6931 IFS=$as_save_IFS
6932
6933 ;;
6934 esac
6935 fi
6936 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6937 if test -n "$PKG_CONFIG"; then
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6939 $as_echo "$PKG_CONFIG" >&6; }
6940 else
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6942 $as_echo "no" >&6; }
6943 fi
6944
6945
6946 fi
6947 if test -z "$ac_cv_path_PKG_CONFIG"; then
6948 ac_pt_PKG_CONFIG=$PKG_CONFIG
6949 # Extract the first word of "pkg-config", so it can be a program name with args.
6950 set dummy pkg-config; ac_word=$2
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6952 $as_echo_n "checking for $ac_word... " >&6; }
6953 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6954 $as_echo_n "(cached) " >&6
6955 else
6956 case $ac_pt_PKG_CONFIG in
6957 [\\/]* | ?:[\\/]*)
6958 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6959 ;;
6960 *)
6961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6962 for as_dir in $PATH
6963 do
6964 IFS=$as_save_IFS
6965 test -z "$as_dir" && as_dir=.
6966 for ac_exec_ext in '' $ac_executable_extensions; do
6967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6968 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6970 break 2
6971 fi
6972 done
6973 done
6974 IFS=$as_save_IFS
6975
6976 ;;
6977 esac
6978 fi
6979 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6980 if test -n "$ac_pt_PKG_CONFIG"; then
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6982 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
6983 else
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6985 $as_echo "no" >&6; }
6986 fi
6987
6988 if test "x$ac_pt_PKG_CONFIG" = x; then
6989 PKG_CONFIG=""
6990 else
6991 case $cross_compiling:$ac_tool_warned in
6992 yes:)
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6994 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6995 ac_tool_warned=yes ;;
6996 esac
6997 PKG_CONFIG=$ac_pt_PKG_CONFIG
6998 fi
6999 else
7000 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7001 fi
7002
7003 fi
7004 if test -n "$PKG_CONFIG"; then
7005 _pkg_min_version=0.9.0
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7007 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7008 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7010 $as_echo "yes" >&6; }
7011 else
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7013 $as_echo "no" >&6; }
7014 PKG_CONFIG=""
7015 fi
7016 fi
7017
7018 # Handle optional debuginfod support
7019
7020 # Check whether --with-debuginfod was given.
7021 if test "${with_debuginfod+set}" = set; then :
7022 withval=$with_debuginfod;
7023 else
7024 with_debuginfod=auto
7025 fi
7026
7027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
7028 $as_echo_n "checking whether to use debuginfod... " >&6; }
7029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
7030 $as_echo "$with_debuginfod" >&6; }
7031
7032 if test "x$with_debuginfod" != xno; then
7033
7034 pkg_failed=no
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7036 $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7037
7038 if test -n "$DEBUGINFOD_CFLAGS"; then
7039 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7040 elif test -n "$PKG_CONFIG"; then
7041 if test -n "$PKG_CONFIG" && \
7042 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7043 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7044 ac_status=$?
7045 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7046 test $ac_status = 0; }; then
7047 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7048 test "x$?" != "x0" && pkg_failed=yes
7049 else
7050 pkg_failed=yes
7051 fi
7052 else
7053 pkg_failed=untried
7054 fi
7055 if test -n "$DEBUGINFOD_LIBS"; then
7056 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7057 elif test -n "$PKG_CONFIG"; then
7058 if test -n "$PKG_CONFIG" && \
7059 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7060 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7061 ac_status=$?
7062 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7063 test $ac_status = 0; }; then
7064 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7065 test "x$?" != "x0" && pkg_failed=yes
7066 else
7067 pkg_failed=yes
7068 fi
7069 else
7070 pkg_failed=untried
7071 fi
7072
7073 if test $pkg_failed = no; then
7074 pkg_save_LDFLAGS="$LDFLAGS"
7075 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 /* end confdefs.h. */
7078
7079 int
7080 main ()
7081 {
7082
7083 ;
7084 return 0;
7085 }
7086 _ACEOF
7087 if ac_fn_c_try_link "$LINENO"; then :
7088
7089 else
7090 pkg_failed=yes
7091 fi
7092 rm -f core conftest.err conftest.$ac_objext \
7093 conftest$ac_exeext conftest.$ac_ext
7094 LDFLAGS=$pkg_save_LDFLAGS
7095 fi
7096
7097
7098
7099 if test $pkg_failed = yes; then
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7101 $as_echo "no" >&6; }
7102
7103 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7104 _pkg_short_errors_supported=yes
7105 else
7106 _pkg_short_errors_supported=no
7107 fi
7108 if test $_pkg_short_errors_supported = yes; then
7109 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7110 else
7111 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7112 fi
7113 # Put the nasty error message in config.log where it belongs
7114 echo "$DEBUGINFOD_PKG_ERRORS" >&5
7115
7116 if test "x$with_debuginfod" = xyes; then
7117 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7118 else
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7120 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7121 fi
7122 elif test $pkg_failed = untried; then
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124 $as_echo "no" >&6; }
7125 if test "x$with_debuginfod" = xyes; then
7126 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7127 else
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7129 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7130 fi
7131 else
7132 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7133 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7135 $as_echo "yes" >&6; }
7136
7137 $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7138
7139 fi
7140 else
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7142 $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7143 fi
7144
7145
7146 # Libunwind support for ia64.
7147
7148 # Check whether --with-libunwind-ia64 was given.
7149 if test "${with_libunwind_ia64+set}" = set; then :
7150 withval=$with_libunwind_ia64;
7151 else
7152 with_libunwind_ia64=auto
7153 fi
7154
7155
7156 # Backward compatibility option.
7157 if test "${with_libunwind+set}" = set; then
7158 if test x"$with_libunwind_ia64" != xauto; then
7159 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7160 fi
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7162 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7163 with_libunwind_ia64="$with_libunwind"
7164 fi
7165
7166 case "$with_libunwind_ia64" in
7167 yes | no)
7168 ;;
7169 auto)
7170 for ac_header in libunwind-ia64.h
7171 do :
7172 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7173 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7174 cat >>confdefs.h <<_ACEOF
7175 #define HAVE_LIBUNWIND_IA64_H 1
7176 _ACEOF
7177
7178 fi
7179
7180 done
7181
7182 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7183 ;;
7184 *)
7185 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7186 ;;
7187 esac
7188
7189 if test x"$with_libunwind_ia64" = xyes; then
7190 for ac_header in libunwind-ia64.h
7191 do :
7192 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7193 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7194 cat >>confdefs.h <<_ACEOF
7195 #define HAVE_LIBUNWIND_IA64_H 1
7196 _ACEOF
7197
7198 fi
7199
7200 done
7201
7202 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7203 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7204 fi
7205 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7206 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7207 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7208 fi
7209
7210 opt_curses=no
7211
7212 # Check whether --with-curses was given.
7213 if test "${with_curses+set}" = set; then :
7214 withval=$with_curses; opt_curses=$withval
7215 fi
7216
7217
7218 prefer_curses=no
7219 if test "$opt_curses" = "yes"; then
7220 prefer_curses=yes
7221 fi
7222
7223 # Profiling support.
7224 # Check whether --enable-profiling was given.
7225 if test "${enable_profiling+set}" = set; then :
7226 enableval=$enable_profiling;
7227 case $enableval in
7228 yes | no)
7229 ;;
7230 *)
7231 as_fn_error $? "bad value $enableval for --enable-profiling" "$LINENO" 5
7232 ;;
7233 esac
7234
7235 else
7236 enable_profiling=no
7237 fi
7238
7239
7240 for ac_func in monstartup _mcleanup
7241 do :
7242 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7243 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7244 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7245 cat >>confdefs.h <<_ACEOF
7246 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7247 _ACEOF
7248
7249 fi
7250 done
7251
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7253 $as_echo_n "checking for _etext... " >&6; }
7254 if ${ac_cv_var__etext+:} false; then :
7255 $as_echo_n "(cached) " >&6
7256 else
7257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7258 /* end confdefs.h. */
7259 #include <stdlib.h>
7260 extern char _etext;
7261 int
7262 main ()
7263 {
7264 free (&_etext);
7265
7266 ;
7267 return 0;
7268 }
7269 _ACEOF
7270 if ac_fn_c_try_link "$LINENO"; then :
7271 ac_cv_var__etext=yes
7272 else
7273 ac_cv_var__etext=no
7274
7275 fi
7276 rm -f core conftest.err conftest.$ac_objext \
7277 conftest$ac_exeext conftest.$ac_ext
7278
7279 fi
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7281 $as_echo "$ac_cv_var__etext" >&6; }
7282 if test "$ac_cv_var__etext" = yes; then
7283
7284 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7285
7286 fi
7287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7288 $as_echo_n "checking for etext... " >&6; }
7289 if ${ac_cv_var_etext+:} false; then :
7290 $as_echo_n "(cached) " >&6
7291 else
7292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7293 /* end confdefs.h. */
7294 #include <stdlib.h>
7295 extern char etext;
7296 int
7297 main ()
7298 {
7299 free (&etext);
7300
7301 ;
7302 return 0;
7303 }
7304 _ACEOF
7305 if ac_fn_c_try_link "$LINENO"; then :
7306 ac_cv_var_etext=yes
7307 else
7308 ac_cv_var_etext=no
7309
7310 fi
7311 rm -f core conftest.err conftest.$ac_objext \
7312 conftest$ac_exeext conftest.$ac_ext
7313
7314 fi
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7316 $as_echo "$ac_cv_var_etext" >&6; }
7317 if test "$ac_cv_var_etext" = yes; then
7318
7319 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7320
7321 fi
7322 if test "$enable_profiling" = yes ; then
7323 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7324 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7325 fi
7326 PROFILE_CFLAGS=-pg
7327 OLD_CFLAGS="$CFLAGS"
7328 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7329
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7331 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7332 if ${ac_cv_cc_supports_pg+:} false; then :
7333 $as_echo_n "(cached) " >&6
7334 else
7335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7336 /* end confdefs.h. */
7337
7338 int
7339 main ()
7340 {
7341 int x;
7342 ;
7343 return 0;
7344 }
7345 _ACEOF
7346 if ac_fn_c_try_compile "$LINENO"; then :
7347 ac_cv_cc_supports_pg=yes
7348 else
7349 ac_cv_cc_supports_pg=no
7350
7351 fi
7352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7353
7354 fi
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7356 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7357
7358 if test "$ac_cv_cc_supports_pg" = no; then
7359 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7360 fi
7361
7362 CFLAGS="$OLD_CFLAGS"
7363 fi
7364
7365 CODESIGN_CERT=
7366 # Check whether --enable-codesign was given.
7367 if test "${enable_codesign+set}" = set; then :
7368 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7369 fi
7370
7371
7372
7373
7374
7375 # Check whether --with-pkgversion was given.
7376 if test "${with_pkgversion+set}" = set; then :
7377 withval=$with_pkgversion; case "$withval" in
7378 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7379 no) PKGVERSION= ;;
7380 *) PKGVERSION="($withval) " ;;
7381 esac
7382 else
7383 PKGVERSION="(GDB) "
7384
7385 fi
7386
7387
7388
7389
7390
7391 # Check whether --with-bugurl was given.
7392 if test "${with_bugurl+set}" = set; then :
7393 withval=$with_bugurl; case "$withval" in
7394 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7395 no) BUGURL=
7396 ;;
7397 *) BUGURL="$withval"
7398 ;;
7399 esac
7400 else
7401 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7402
7403 fi
7404
7405 case ${BUGURL} in
7406 "")
7407 REPORT_BUGS_TO=
7408 REPORT_BUGS_TEXI=
7409 ;;
7410 *)
7411 REPORT_BUGS_TO="<$BUGURL>"
7412 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7413 ;;
7414 esac;
7415
7416
7417
7418
7419 cat >>confdefs.h <<_ACEOF
7420 #define PKGVERSION "$PKGVERSION"
7421 _ACEOF
7422
7423
7424 cat >>confdefs.h <<_ACEOF
7425 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7426 _ACEOF
7427
7428
7429 # --------------------- #
7430 # Checks for programs. #
7431 # --------------------- #
7432
7433 for ac_prog in gawk mawk nawk awk
7434 do
7435 # Extract the first word of "$ac_prog", so it can be a program name with args.
7436 set dummy $ac_prog; ac_word=$2
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7438 $as_echo_n "checking for $ac_word... " >&6; }
7439 if ${ac_cv_prog_AWK+:} false; then :
7440 $as_echo_n "(cached) " >&6
7441 else
7442 if test -n "$AWK"; then
7443 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7444 else
7445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7446 for as_dir in $PATH
7447 do
7448 IFS=$as_save_IFS
7449 test -z "$as_dir" && as_dir=.
7450 for ac_exec_ext in '' $ac_executable_extensions; do
7451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7452 ac_cv_prog_AWK="$ac_prog"
7453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7454 break 2
7455 fi
7456 done
7457 done
7458 IFS=$as_save_IFS
7459
7460 fi
7461 fi
7462 AWK=$ac_cv_prog_AWK
7463 if test -n "$AWK"; then
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7465 $as_echo "$AWK" >&6; }
7466 else
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7469 fi
7470
7471
7472 test -n "$AWK" && break
7473 done
7474
7475 # Find a good install program. We prefer a C program (faster),
7476 # so one script is as good as another. But avoid the broken or
7477 # incompatible versions:
7478 # SysV /etc/install, /usr/sbin/install
7479 # SunOS /usr/etc/install
7480 # IRIX /sbin/install
7481 # AIX /bin/install
7482 # AmigaOS /C/install, which installs bootblocks on floppy discs
7483 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7484 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7485 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7486 # OS/2's system install, which has a completely different semantic
7487 # ./install, which can be erroneously created by make from ./install.sh.
7488 # Reject install programs that cannot install multiple files.
7489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7490 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7491 if test -z "$INSTALL"; then
7492 if ${ac_cv_path_install+:} false; then :
7493 $as_echo_n "(cached) " >&6
7494 else
7495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7496 for as_dir in $PATH
7497 do
7498 IFS=$as_save_IFS
7499 test -z "$as_dir" && as_dir=.
7500 # Account for people who put trailing slashes in PATH elements.
7501 case $as_dir/ in #((
7502 ./ | .// | /[cC]/* | \
7503 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7504 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7505 /usr/ucb/* ) ;;
7506 *)
7507 # OSF1 and SCO ODT 3.0 have their own names for install.
7508 # Don't use installbsd from OSF since it installs stuff as root
7509 # by default.
7510 for ac_prog in ginstall scoinst install; do
7511 for ac_exec_ext in '' $ac_executable_extensions; do
7512 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7513 if test $ac_prog = install &&
7514 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7515 # AIX install. It has an incompatible calling convention.
7516 :
7517 elif test $ac_prog = install &&
7518 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7519 # program-specific install script used by HP pwplus--don't use.
7520 :
7521 else
7522 rm -rf conftest.one conftest.two conftest.dir
7523 echo one > conftest.one
7524 echo two > conftest.two
7525 mkdir conftest.dir
7526 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7527 test -s conftest.one && test -s conftest.two &&
7528 test -s conftest.dir/conftest.one &&
7529 test -s conftest.dir/conftest.two
7530 then
7531 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7532 break 3
7533 fi
7534 fi
7535 fi
7536 done
7537 done
7538 ;;
7539 esac
7540
7541 done
7542 IFS=$as_save_IFS
7543
7544 rm -rf conftest.one conftest.two conftest.dir
7545
7546 fi
7547 if test "${ac_cv_path_install+set}" = set; then
7548 INSTALL=$ac_cv_path_install
7549 else
7550 # As a last resort, use the slow shell script. Don't cache a
7551 # value for INSTALL within a source directory, because that will
7552 # break other packages using the cache if that directory is
7553 # removed, or if the value is a relative name.
7554 INSTALL=$ac_install_sh
7555 fi
7556 fi
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7558 $as_echo "$INSTALL" >&6; }
7559
7560 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7561 # It thinks the first close brace ends the variable substitution.
7562 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7563
7564 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7565
7566 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7567
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7569 $as_echo_n "checking whether ln -s works... " >&6; }
7570 LN_S=$as_ln_s
7571 if test "$LN_S" = "ln -s"; then
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7573 $as_echo "yes" >&6; }
7574 else
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7576 $as_echo "no, using $LN_S" >&6; }
7577 fi
7578
7579 if test -n "$ac_tool_prefix"; then
7580 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7581 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7583 $as_echo_n "checking for $ac_word... " >&6; }
7584 if ${ac_cv_prog_RANLIB+:} false; then :
7585 $as_echo_n "(cached) " >&6
7586 else
7587 if test -n "$RANLIB"; then
7588 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7589 else
7590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591 for as_dir in $PATH
7592 do
7593 IFS=$as_save_IFS
7594 test -z "$as_dir" && as_dir=.
7595 for ac_exec_ext in '' $ac_executable_extensions; do
7596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7597 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7599 break 2
7600 fi
7601 done
7602 done
7603 IFS=$as_save_IFS
7604
7605 fi
7606 fi
7607 RANLIB=$ac_cv_prog_RANLIB
7608 if test -n "$RANLIB"; then
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7610 $as_echo "$RANLIB" >&6; }
7611 else
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7613 $as_echo "no" >&6; }
7614 fi
7615
7616
7617 fi
7618 if test -z "$ac_cv_prog_RANLIB"; then
7619 ac_ct_RANLIB=$RANLIB
7620 # Extract the first word of "ranlib", so it can be a program name with args.
7621 set dummy ranlib; ac_word=$2
7622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623 $as_echo_n "checking for $ac_word... " >&6; }
7624 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7625 $as_echo_n "(cached) " >&6
7626 else
7627 if test -n "$ac_ct_RANLIB"; then
7628 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7629 else
7630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7631 for as_dir in $PATH
7632 do
7633 IFS=$as_save_IFS
7634 test -z "$as_dir" && as_dir=.
7635 for ac_exec_ext in '' $ac_executable_extensions; do
7636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7637 ac_cv_prog_ac_ct_RANLIB="ranlib"
7638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7639 break 2
7640 fi
7641 done
7642 done
7643 IFS=$as_save_IFS
7644
7645 fi
7646 fi
7647 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7648 if test -n "$ac_ct_RANLIB"; then
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7650 $as_echo "$ac_ct_RANLIB" >&6; }
7651 else
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653 $as_echo "no" >&6; }
7654 fi
7655
7656 if test "x$ac_ct_RANLIB" = x; then
7657 RANLIB=":"
7658 else
7659 case $cross_compiling:$ac_tool_warned in
7660 yes:)
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7663 ac_tool_warned=yes ;;
7664 esac
7665 RANLIB=$ac_ct_RANLIB
7666 fi
7667 else
7668 RANLIB="$ac_cv_prog_RANLIB"
7669 fi
7670
7671 for ac_prog in 'bison -y' byacc
7672 do
7673 # Extract the first word of "$ac_prog", so it can be a program name with args.
7674 set dummy $ac_prog; ac_word=$2
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7676 $as_echo_n "checking for $ac_word... " >&6; }
7677 if ${ac_cv_prog_YACC+:} false; then :
7678 $as_echo_n "(cached) " >&6
7679 else
7680 if test -n "$YACC"; then
7681 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7682 else
7683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684 for as_dir in $PATH
7685 do
7686 IFS=$as_save_IFS
7687 test -z "$as_dir" && as_dir=.
7688 for ac_exec_ext in '' $ac_executable_extensions; do
7689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690 ac_cv_prog_YACC="$ac_prog"
7691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692 break 2
7693 fi
7694 done
7695 done
7696 IFS=$as_save_IFS
7697
7698 fi
7699 fi
7700 YACC=$ac_cv_prog_YACC
7701 if test -n "$YACC"; then
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7703 $as_echo "$YACC" >&6; }
7704 else
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706 $as_echo "no" >&6; }
7707 fi
7708
7709
7710 test -n "$YACC" && break
7711 done
7712 test -n "$YACC" || YACC="yacc"
7713
7714
7715 if test -n "$ac_tool_prefix"; then
7716 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7717 set dummy ${ac_tool_prefix}ar; ac_word=$2
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7719 $as_echo_n "checking for $ac_word... " >&6; }
7720 if ${ac_cv_prog_AR+:} false; then :
7721 $as_echo_n "(cached) " >&6
7722 else
7723 if test -n "$AR"; then
7724 ac_cv_prog_AR="$AR" # Let the user override the test.
7725 else
7726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727 for as_dir in $PATH
7728 do
7729 IFS=$as_save_IFS
7730 test -z "$as_dir" && as_dir=.
7731 for ac_exec_ext in '' $ac_executable_extensions; do
7732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7733 ac_cv_prog_AR="${ac_tool_prefix}ar"
7734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7735 break 2
7736 fi
7737 done
7738 done
7739 IFS=$as_save_IFS
7740
7741 fi
7742 fi
7743 AR=$ac_cv_prog_AR
7744 if test -n "$AR"; then
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7746 $as_echo "$AR" >&6; }
7747 else
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749 $as_echo "no" >&6; }
7750 fi
7751
7752
7753 fi
7754 if test -z "$ac_cv_prog_AR"; then
7755 ac_ct_AR=$AR
7756 # Extract the first word of "ar", so it can be a program name with args.
7757 set dummy ar; ac_word=$2
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7759 $as_echo_n "checking for $ac_word... " >&6; }
7760 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7761 $as_echo_n "(cached) " >&6
7762 else
7763 if test -n "$ac_ct_AR"; then
7764 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7765 else
7766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7767 for as_dir in $PATH
7768 do
7769 IFS=$as_save_IFS
7770 test -z "$as_dir" && as_dir=.
7771 for ac_exec_ext in '' $ac_executable_extensions; do
7772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7773 ac_cv_prog_ac_ct_AR="ar"
7774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7775 break 2
7776 fi
7777 done
7778 done
7779 IFS=$as_save_IFS
7780
7781 fi
7782 fi
7783 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7784 if test -n "$ac_ct_AR"; then
7785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7786 $as_echo "$ac_ct_AR" >&6; }
7787 else
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7789 $as_echo "no" >&6; }
7790 fi
7791
7792 if test "x$ac_ct_AR" = x; then
7793 AR=""
7794 else
7795 case $cross_compiling:$ac_tool_warned in
7796 yes:)
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7798 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7799 ac_tool_warned=yes ;;
7800 esac
7801 AR=$ac_ct_AR
7802 fi
7803 else
7804 AR="$ac_cv_prog_AR"
7805 fi
7806
7807 if test -n "$ac_tool_prefix"; then
7808 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7809 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7811 $as_echo_n "checking for $ac_word... " >&6; }
7812 if ${ac_cv_prog_DLLTOOL+:} false; then :
7813 $as_echo_n "(cached) " >&6
7814 else
7815 if test -n "$DLLTOOL"; then
7816 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7817 else
7818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7819 for as_dir in $PATH
7820 do
7821 IFS=$as_save_IFS
7822 test -z "$as_dir" && as_dir=.
7823 for ac_exec_ext in '' $ac_executable_extensions; do
7824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7825 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7827 break 2
7828 fi
7829 done
7830 done
7831 IFS=$as_save_IFS
7832
7833 fi
7834 fi
7835 DLLTOOL=$ac_cv_prog_DLLTOOL
7836 if test -n "$DLLTOOL"; then
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7838 $as_echo "$DLLTOOL" >&6; }
7839 else
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841 $as_echo "no" >&6; }
7842 fi
7843
7844
7845 fi
7846 if test -z "$ac_cv_prog_DLLTOOL"; then
7847 ac_ct_DLLTOOL=$DLLTOOL
7848 # Extract the first word of "dlltool", so it can be a program name with args.
7849 set dummy dlltool; ac_word=$2
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7851 $as_echo_n "checking for $ac_word... " >&6; }
7852 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7853 $as_echo_n "(cached) " >&6
7854 else
7855 if test -n "$ac_ct_DLLTOOL"; then
7856 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7857 else
7858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859 for as_dir in $PATH
7860 do
7861 IFS=$as_save_IFS
7862 test -z "$as_dir" && as_dir=.
7863 for ac_exec_ext in '' $ac_executable_extensions; do
7864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7865 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7867 break 2
7868 fi
7869 done
7870 done
7871 IFS=$as_save_IFS
7872
7873 fi
7874 fi
7875 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7876 if test -n "$ac_ct_DLLTOOL"; then
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7878 $as_echo "$ac_ct_DLLTOOL" >&6; }
7879 else
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7881 $as_echo "no" >&6; }
7882 fi
7883
7884 if test "x$ac_ct_DLLTOOL" = x; then
7885 DLLTOOL=""
7886 else
7887 case $cross_compiling:$ac_tool_warned in
7888 yes:)
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7890 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7891 ac_tool_warned=yes ;;
7892 esac
7893 DLLTOOL=$ac_ct_DLLTOOL
7894 fi
7895 else
7896 DLLTOOL="$ac_cv_prog_DLLTOOL"
7897 fi
7898
7899 if test -n "$ac_tool_prefix"; then
7900 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7901 set dummy ${ac_tool_prefix}windres; ac_word=$2
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7903 $as_echo_n "checking for $ac_word... " >&6; }
7904 if ${ac_cv_prog_WINDRES+:} false; then :
7905 $as_echo_n "(cached) " >&6
7906 else
7907 if test -n "$WINDRES"; then
7908 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7909 else
7910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911 for as_dir in $PATH
7912 do
7913 IFS=$as_save_IFS
7914 test -z "$as_dir" && as_dir=.
7915 for ac_exec_ext in '' $ac_executable_extensions; do
7916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919 break 2
7920 fi
7921 done
7922 done
7923 IFS=$as_save_IFS
7924
7925 fi
7926 fi
7927 WINDRES=$ac_cv_prog_WINDRES
7928 if test -n "$WINDRES"; then
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7930 $as_echo "$WINDRES" >&6; }
7931 else
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933 $as_echo "no" >&6; }
7934 fi
7935
7936
7937 fi
7938 if test -z "$ac_cv_prog_WINDRES"; then
7939 ac_ct_WINDRES=$WINDRES
7940 # Extract the first word of "windres", so it can be a program name with args.
7941 set dummy windres; ac_word=$2
7942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7943 $as_echo_n "checking for $ac_word... " >&6; }
7944 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7945 $as_echo_n "(cached) " >&6
7946 else
7947 if test -n "$ac_ct_WINDRES"; then
7948 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7949 else
7950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7951 for as_dir in $PATH
7952 do
7953 IFS=$as_save_IFS
7954 test -z "$as_dir" && as_dir=.
7955 for ac_exec_ext in '' $ac_executable_extensions; do
7956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7957 ac_cv_prog_ac_ct_WINDRES="windres"
7958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7959 break 2
7960 fi
7961 done
7962 done
7963 IFS=$as_save_IFS
7964
7965 fi
7966 fi
7967 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7968 if test -n "$ac_ct_WINDRES"; then
7969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7970 $as_echo "$ac_ct_WINDRES" >&6; }
7971 else
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7973 $as_echo "no" >&6; }
7974 fi
7975
7976 if test "x$ac_ct_WINDRES" = x; then
7977 WINDRES=""
7978 else
7979 case $cross_compiling:$ac_tool_warned in
7980 yes:)
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7982 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7983 ac_tool_warned=yes ;;
7984 esac
7985 WINDRES=$ac_ct_WINDRES
7986 fi
7987 else
7988 WINDRES="$ac_cv_prog_WINDRES"
7989 fi
7990
7991
7992 case $host_os in
7993 gnu*)
7994 # Needed for GNU Hurd hosts.
7995 if test -n "$ac_tool_prefix"; then
7996 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7997 set dummy ${ac_tool_prefix}mig; ac_word=$2
7998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999 $as_echo_n "checking for $ac_word... " >&6; }
8000 if ${ac_cv_prog_MIG+:} false; then :
8001 $as_echo_n "(cached) " >&6
8002 else
8003 if test -n "$MIG"; then
8004 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8005 else
8006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8007 for as_dir in $PATH
8008 do
8009 IFS=$as_save_IFS
8010 test -z "$as_dir" && as_dir=.
8011 for ac_exec_ext in '' $ac_executable_extensions; do
8012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8013 ac_cv_prog_MIG="${ac_tool_prefix}mig"
8014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8015 break 2
8016 fi
8017 done
8018 done
8019 IFS=$as_save_IFS
8020
8021 fi
8022 fi
8023 MIG=$ac_cv_prog_MIG
8024 if test -n "$MIG"; then
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8026 $as_echo "$MIG" >&6; }
8027 else
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8029 $as_echo "no" >&6; }
8030 fi
8031
8032
8033 fi
8034 if test -z "$ac_cv_prog_MIG"; then
8035 ac_ct_MIG=$MIG
8036 # Extract the first word of "mig", so it can be a program name with args.
8037 set dummy mig; ac_word=$2
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8039 $as_echo_n "checking for $ac_word... " >&6; }
8040 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
8041 $as_echo_n "(cached) " >&6
8042 else
8043 if test -n "$ac_ct_MIG"; then
8044 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8045 else
8046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047 for as_dir in $PATH
8048 do
8049 IFS=$as_save_IFS
8050 test -z "$as_dir" && as_dir=.
8051 for ac_exec_ext in '' $ac_executable_extensions; do
8052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053 ac_cv_prog_ac_ct_MIG="mig"
8054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055 break 2
8056 fi
8057 done
8058 done
8059 IFS=$as_save_IFS
8060
8061 fi
8062 fi
8063 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8064 if test -n "$ac_ct_MIG"; then
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8066 $as_echo "$ac_ct_MIG" >&6; }
8067 else
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8069 $as_echo "no" >&6; }
8070 fi
8071
8072 if test "x$ac_ct_MIG" = x; then
8073 MIG=""
8074 else
8075 case $cross_compiling:$ac_tool_warned in
8076 yes:)
8077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8078 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8079 ac_tool_warned=yes ;;
8080 esac
8081 MIG=$ac_ct_MIG
8082 fi
8083 else
8084 MIG="$ac_cv_prog_MIG"
8085 fi
8086
8087 if test x"$MIG" = x; then
8088 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8089 fi
8090 ;;
8091 esac
8092
8093 # ---------------------- #
8094 # Checks for libraries. #
8095 # ---------------------- #
8096
8097 # We might need to link with -lm; most simulators need it.
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8099 $as_echo_n "checking for main in -lm... " >&6; }
8100 if ${ac_cv_lib_m_main+:} false; then :
8101 $as_echo_n "(cached) " >&6
8102 else
8103 ac_check_lib_save_LIBS=$LIBS
8104 LIBS="-lm $LIBS"
8105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8106 /* end confdefs.h. */
8107
8108
8109 int
8110 main ()
8111 {
8112 return main ();
8113 ;
8114 return 0;
8115 }
8116 _ACEOF
8117 if ac_fn_c_try_link "$LINENO"; then :
8118 ac_cv_lib_m_main=yes
8119 else
8120 ac_cv_lib_m_main=no
8121 fi
8122 rm -f core conftest.err conftest.$ac_objext \
8123 conftest$ac_exeext conftest.$ac_ext
8124 LIBS=$ac_check_lib_save_LIBS
8125 fi
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8127 $as_echo "$ac_cv_lib_m_main" >&6; }
8128 if test "x$ac_cv_lib_m_main" = xyes; then :
8129 cat >>confdefs.h <<_ACEOF
8130 #define HAVE_LIBM 1
8131 _ACEOF
8132
8133 LIBS="-lm $LIBS"
8134
8135 fi
8136
8137
8138 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8140 $as_echo_n "checking for library containing gethostbyname... " >&6; }
8141 if ${ac_cv_search_gethostbyname+:} false; then :
8142 $as_echo_n "(cached) " >&6
8143 else
8144 ac_func_search_save_LIBS=$LIBS
8145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8146 /* end confdefs.h. */
8147
8148 /* Override any GCC internal prototype to avoid an error.
8149 Use char because int might match the return type of a GCC
8150 builtin and then its argument prototype would still apply. */
8151 #ifdef __cplusplus
8152 extern "C"
8153 #endif
8154 char gethostbyname ();
8155 int
8156 main ()
8157 {
8158 return gethostbyname ();
8159 ;
8160 return 0;
8161 }
8162 _ACEOF
8163 for ac_lib in '' nsl; do
8164 if test -z "$ac_lib"; then
8165 ac_res="none required"
8166 else
8167 ac_res=-l$ac_lib
8168 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8169 fi
8170 if ac_fn_c_try_link "$LINENO"; then :
8171 ac_cv_search_gethostbyname=$ac_res
8172 fi
8173 rm -f core conftest.err conftest.$ac_objext \
8174 conftest$ac_exeext
8175 if ${ac_cv_search_gethostbyname+:} false; then :
8176 break
8177 fi
8178 done
8179 if ${ac_cv_search_gethostbyname+:} false; then :
8180
8181 else
8182 ac_cv_search_gethostbyname=no
8183 fi
8184 rm conftest.$ac_ext
8185 LIBS=$ac_func_search_save_LIBS
8186 fi
8187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8188 $as_echo "$ac_cv_search_gethostbyname" >&6; }
8189 ac_res=$ac_cv_search_gethostbyname
8190 if test "$ac_res" != no; then :
8191 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8192
8193 fi
8194
8195
8196 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8198 $as_echo_n "checking for library containing socketpair... " >&6; }
8199 if ${ac_cv_search_socketpair+:} false; then :
8200 $as_echo_n "(cached) " >&6
8201 else
8202 ac_func_search_save_LIBS=$LIBS
8203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8204 /* end confdefs.h. */
8205
8206 /* Override any GCC internal prototype to avoid an error.
8207 Use char because int might match the return type of a GCC
8208 builtin and then its argument prototype would still apply. */
8209 #ifdef __cplusplus
8210 extern "C"
8211 #endif
8212 char socketpair ();
8213 int
8214 main ()
8215 {
8216 return socketpair ();
8217 ;
8218 return 0;
8219 }
8220 _ACEOF
8221 for ac_lib in '' socket; do
8222 if test -z "$ac_lib"; then
8223 ac_res="none required"
8224 else
8225 ac_res=-l$ac_lib
8226 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8227 fi
8228 if ac_fn_c_try_link "$LINENO"; then :
8229 ac_cv_search_socketpair=$ac_res
8230 fi
8231 rm -f core conftest.err conftest.$ac_objext \
8232 conftest$ac_exeext
8233 if ${ac_cv_search_socketpair+:} false; then :
8234 break
8235 fi
8236 done
8237 if ${ac_cv_search_socketpair+:} false; then :
8238
8239 else
8240 ac_cv_search_socketpair=no
8241 fi
8242 rm conftest.$ac_ext
8243 LIBS=$ac_func_search_save_LIBS
8244 fi
8245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8246 $as_echo "$ac_cv_search_socketpair" >&6; }
8247 ac_res=$ac_cv_search_socketpair
8248 if test "$ac_res" != no; then :
8249 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8250
8251 fi
8252
8253
8254 # Link in zlib/zstd if we can. This allows us to read compressed debug
8255 # sections.
8256
8257 # Use the system's zlib library.
8258 zlibdir="-L\$(top_builddir)/../zlib"
8259 zlibinc="-I\$(top_srcdir)/../zlib"
8260
8261 # Check whether --with-system-zlib was given.
8262 if test "${with_system_zlib+set}" = set; then :
8263 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8264 zlibdir=
8265 zlibinc=
8266 fi
8267
8268 fi
8269
8270
8271
8272
8273
8274
8275 # Check whether --with-zstd was given.
8276 if test "${with_zstd+set}" = set; then :
8277 withval=$with_zstd;
8278 else
8279 with_zstd=auto
8280 fi
8281
8282
8283 if test "$with_zstd" != no; then :
8284
8285 pkg_failed=no
8286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd" >&5
8287 $as_echo_n "checking for libzstd... " >&6; }
8288
8289 if test -n "$ZSTD_CFLAGS"; then
8290 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
8291 elif test -n "$PKG_CONFIG"; then
8292 if test -n "$PKG_CONFIG" && \
8293 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5
8294 ($PKG_CONFIG --exists --print-errors "libzstd") 2>&5
8295 ac_status=$?
8296 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8297 test $ac_status = 0; }; then
8298 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd" 2>/dev/null`
8299 test "x$?" != "x0" && pkg_failed=yes
8300 else
8301 pkg_failed=yes
8302 fi
8303 else
8304 pkg_failed=untried
8305 fi
8306 if test -n "$ZSTD_LIBS"; then
8307 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
8308 elif test -n "$PKG_CONFIG"; then
8309 if test -n "$PKG_CONFIG" && \
8310 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5
8311 ($PKG_CONFIG --exists --print-errors "libzstd") 2>&5
8312 ac_status=$?
8313 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8314 test $ac_status = 0; }; then
8315 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd" 2>/dev/null`
8316 test "x$?" != "x0" && pkg_failed=yes
8317 else
8318 pkg_failed=yes
8319 fi
8320 else
8321 pkg_failed=untried
8322 fi
8323
8324 if test $pkg_failed = no; then
8325 pkg_save_LDFLAGS="$LDFLAGS"
8326 LDFLAGS="$LDFLAGS $pkg_cv_ZSTD_LIBS"
8327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8328 /* end confdefs.h. */
8329
8330 int
8331 main ()
8332 {
8333
8334 ;
8335 return 0;
8336 }
8337 _ACEOF
8338 if ac_fn_c_try_link "$LINENO"; then :
8339
8340 else
8341 pkg_failed=yes
8342 fi
8343 rm -f core conftest.err conftest.$ac_objext \
8344 conftest$ac_exeext conftest.$ac_ext
8345 LDFLAGS=$pkg_save_LDFLAGS
8346 fi
8347
8348
8349
8350 if test $pkg_failed = yes; then
8351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8352 $as_echo "no" >&6; }
8353
8354 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8355 _pkg_short_errors_supported=yes
8356 else
8357 _pkg_short_errors_supported=no
8358 fi
8359 if test $_pkg_short_errors_supported = yes; then
8360 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd" 2>&1`
8361 else
8362 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd" 2>&1`
8363 fi
8364 # Put the nasty error message in config.log where it belongs
8365 echo "$ZSTD_PKG_ERRORS" >&5
8366
8367
8368 if test "$with_zstd" = yes; then
8369 as_fn_error $? "--with-zstd was given, but pkgconfig/libzstd.pc is not found" "$LINENO" 5
8370 fi
8371
8372 elif test $pkg_failed = untried; then
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8374 $as_echo "no" >&6; }
8375
8376 if test "$with_zstd" = yes; then
8377 as_fn_error $? "--with-zstd was given, but pkgconfig/libzstd.pc is not found" "$LINENO" 5
8378 fi
8379
8380 else
8381 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
8382 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8384 $as_echo "yes" >&6; }
8385
8386
8387 $as_echo "#define HAVE_ZSTD 1" >>confdefs.h
8388
8389
8390 fi
8391
8392 fi
8393
8394
8395
8396 if test "X$prefix" = "XNONE"; then
8397 acl_final_prefix="$ac_default_prefix"
8398 else
8399 acl_final_prefix="$prefix"
8400 fi
8401 if test "X$exec_prefix" = "XNONE"; then
8402 acl_final_exec_prefix='${prefix}'
8403 else
8404 acl_final_exec_prefix="$exec_prefix"
8405 fi
8406 acl_save_prefix="$prefix"
8407 prefix="$acl_final_prefix"
8408 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8409 prefix="$acl_save_prefix"
8410
8411
8412 # Check whether --with-gnu-ld was given.
8413 if test "${with_gnu_ld+set}" = set; then :
8414 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8415 else
8416 with_gnu_ld=no
8417 fi
8418
8419 # Prepare PATH_SEPARATOR.
8420 # The user is always right.
8421 if test "${PATH_SEPARATOR+set}" != set; then
8422 echo "#! /bin/sh" >conf$$.sh
8423 echo "exit 0" >>conf$$.sh
8424 chmod +x conf$$.sh
8425 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8426 PATH_SEPARATOR=';'
8427 else
8428 PATH_SEPARATOR=:
8429 fi
8430 rm -f conf$$.sh
8431 fi
8432 ac_prog=ld
8433 if test "$GCC" = yes; then
8434 # Check if gcc -print-prog-name=ld gives a path.
8435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8436 $as_echo_n "checking for ld used by GCC... " >&6; }
8437 case $host in
8438 *-*-mingw*)
8439 # gcc leaves a trailing carriage return which upsets mingw
8440 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8441 *)
8442 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8443 esac
8444 case $ac_prog in
8445 # Accept absolute paths.
8446 [\\/]* | [A-Za-z]:[\\/]*)
8447 re_direlt='/[^/][^/]*/\.\./'
8448 # Canonicalize the path of ld
8449 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8450 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8451 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8452 done
8453 test -z "$LD" && LD="$ac_prog"
8454 ;;
8455 "")
8456 # If it fails, then pretend we aren't using GCC.
8457 ac_prog=ld
8458 ;;
8459 *)
8460 # If it is relative, then search for the first ld in PATH.
8461 with_gnu_ld=unknown
8462 ;;
8463 esac
8464 elif test "$with_gnu_ld" = yes; then
8465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8466 $as_echo_n "checking for GNU ld... " >&6; }
8467 else
8468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8469 $as_echo_n "checking for non-GNU ld... " >&6; }
8470 fi
8471 if ${acl_cv_path_LD+:} false; then :
8472 $as_echo_n "(cached) " >&6
8473 else
8474 if test -z "$LD"; then
8475 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8476 for ac_dir in $PATH; do
8477 test -z "$ac_dir" && ac_dir=.
8478 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8479 acl_cv_path_LD="$ac_dir/$ac_prog"
8480 # Check to see if the program is GNU ld. I'd rather use --version,
8481 # but apparently some GNU ld's only accept -v.
8482 # Break only if it was the GNU/non-GNU ld that we prefer.
8483 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8484 test "$with_gnu_ld" != no && break
8485 else
8486 test "$with_gnu_ld" != yes && break
8487 fi
8488 fi
8489 done
8490 IFS="$ac_save_ifs"
8491 else
8492 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8493 fi
8494 fi
8495
8496 LD="$acl_cv_path_LD"
8497 if test -n "$LD"; then
8498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8499 $as_echo "$LD" >&6; }
8500 else
8501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8502 $as_echo "no" >&6; }
8503 fi
8504 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8506 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8507 if ${acl_cv_prog_gnu_ld+:} false; then :
8508 $as_echo_n "(cached) " >&6
8509 else
8510 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8511 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8512 acl_cv_prog_gnu_ld=yes
8513 else
8514 acl_cv_prog_gnu_ld=no
8515 fi
8516 fi
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8518 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8519 with_gnu_ld=$acl_cv_prog_gnu_ld
8520
8521
8522
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8524 $as_echo_n "checking for shared library run path origin... " >&6; }
8525 if ${acl_cv_rpath+:} false; then :
8526 $as_echo_n "(cached) " >&6
8527 else
8528
8529 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8530 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8531 . ./conftest.sh
8532 rm -f ./conftest.sh
8533 acl_cv_rpath=done
8534
8535 fi
8536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8537 $as_echo "$acl_cv_rpath" >&6; }
8538 wl="$acl_cv_wl"
8539 libext="$acl_cv_libext"
8540 shlibext="$acl_cv_shlibext"
8541 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8542 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8543 hardcode_direct="$acl_cv_hardcode_direct"
8544 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8545 # Check whether --enable-rpath was given.
8546 if test "${enable_rpath+set}" = set; then :
8547 enableval=$enable_rpath; :
8548 else
8549 enable_rpath=yes
8550 fi
8551
8552
8553
8554
8555
8556
8557
8558
8559 use_additional=yes
8560
8561 acl_save_prefix="$prefix"
8562 prefix="$acl_final_prefix"
8563 acl_save_exec_prefix="$exec_prefix"
8564 exec_prefix="$acl_final_exec_prefix"
8565
8566 eval additional_includedir=\"$includedir\"
8567 eval additional_libdir=\"$libdir\"
8568
8569 exec_prefix="$acl_save_exec_prefix"
8570 prefix="$acl_save_prefix"
8571
8572
8573 # Check whether --with-libiconv-prefix was given.
8574 if test "${with_libiconv_prefix+set}" = set; then :
8575 withval=$with_libiconv_prefix;
8576 if test "X$withval" = "Xno"; then
8577 use_additional=no
8578 else
8579 if test "X$withval" = "X"; then
8580
8581 acl_save_prefix="$prefix"
8582 prefix="$acl_final_prefix"
8583 acl_save_exec_prefix="$exec_prefix"
8584 exec_prefix="$acl_final_exec_prefix"
8585
8586 eval additional_includedir=\"$includedir\"
8587 eval additional_libdir=\"$libdir\"
8588
8589 exec_prefix="$acl_save_exec_prefix"
8590 prefix="$acl_save_prefix"
8591
8592 else
8593 additional_includedir="$withval/include"
8594 additional_libdir="$withval/lib"
8595 fi
8596 fi
8597
8598 fi
8599
8600
8601 # Check whether --with-libiconv-type was given.
8602 if test "${with_libiconv_type+set}" = set; then :
8603 withval=$with_libiconv_type; with_libiconv_type=$withval
8604 else
8605 with_libiconv_type=auto
8606 fi
8607
8608 lib_type=`eval echo \$with_libiconv_type`
8609
8610 LIBICONV=
8611 LTLIBICONV=
8612 INCICONV=
8613 rpathdirs=
8614 ltrpathdirs=
8615 names_already_handled=
8616 names_next_round='iconv '
8617 while test -n "$names_next_round"; do
8618 names_this_round="$names_next_round"
8619 names_next_round=
8620 for name in $names_this_round; do
8621 already_handled=
8622 for n in $names_already_handled; do
8623 if test "$n" = "$name"; then
8624 already_handled=yes
8625 break
8626 fi
8627 done
8628 if test -z "$already_handled"; then
8629 names_already_handled="$names_already_handled $name"
8630 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8631 eval value=\"\$HAVE_LIB$uppername\"
8632 if test -n "$value"; then
8633 if test "$value" = yes; then
8634 eval value=\"\$LIB$uppername\"
8635 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8636 eval value=\"\$LTLIB$uppername\"
8637 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8638 else
8639 :
8640 fi
8641 else
8642 found_dir=
8643 found_la=
8644 found_so=
8645 found_a=
8646 if test $use_additional = yes; then
8647 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8648 found_dir="$additional_libdir"
8649 found_so="$additional_libdir/lib$name.$shlibext"
8650 if test -f "$additional_libdir/lib$name.la"; then
8651 found_la="$additional_libdir/lib$name.la"
8652 fi
8653 elif test x$lib_type != xshared; then
8654 if test -f "$additional_libdir/lib$name.$libext"; then
8655 found_dir="$additional_libdir"
8656 found_a="$additional_libdir/lib$name.$libext"
8657 if test -f "$additional_libdir/lib$name.la"; then
8658 found_la="$additional_libdir/lib$name.la"
8659 fi
8660 fi
8661 fi
8662 fi
8663 if test "X$found_dir" = "X"; then
8664 for x in $LDFLAGS $LTLIBICONV; do
8665
8666 acl_save_prefix="$prefix"
8667 prefix="$acl_final_prefix"
8668 acl_save_exec_prefix="$exec_prefix"
8669 exec_prefix="$acl_final_exec_prefix"
8670 eval x=\"$x\"
8671 exec_prefix="$acl_save_exec_prefix"
8672 prefix="$acl_save_prefix"
8673
8674 case "$x" in
8675 -L*)
8676 dir=`echo "X$x" | sed -e 's/^X-L//'`
8677 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8678 found_dir="$dir"
8679 found_so="$dir/lib$name.$shlibext"
8680 if test -f "$dir/lib$name.la"; then
8681 found_la="$dir/lib$name.la"
8682 fi
8683 elif test x$lib_type != xshared; then
8684 if test -f "$dir/lib$name.$libext"; then
8685 found_dir="$dir"
8686 found_a="$dir/lib$name.$libext"
8687 if test -f "$dir/lib$name.la"; then
8688 found_la="$dir/lib$name.la"
8689 fi
8690 fi
8691 fi
8692 ;;
8693 esac
8694 if test "X$found_dir" != "X"; then
8695 break
8696 fi
8697 done
8698 fi
8699 if test "X$found_dir" != "X"; then
8700 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8701 if test "X$found_so" != "X"; then
8702 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8703 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8704 else
8705 haveit=
8706 for x in $ltrpathdirs; do
8707 if test "X$x" = "X$found_dir"; then
8708 haveit=yes
8709 break
8710 fi
8711 done
8712 if test -z "$haveit"; then
8713 ltrpathdirs="$ltrpathdirs $found_dir"
8714 fi
8715 if test "$hardcode_direct" = yes; then
8716 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8717 else
8718 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8719 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8720 haveit=
8721 for x in $rpathdirs; do
8722 if test "X$x" = "X$found_dir"; then
8723 haveit=yes
8724 break
8725 fi
8726 done
8727 if test -z "$haveit"; then
8728 rpathdirs="$rpathdirs $found_dir"
8729 fi
8730 else
8731 haveit=
8732 for x in $LDFLAGS $LIBICONV; do
8733
8734 acl_save_prefix="$prefix"
8735 prefix="$acl_final_prefix"
8736 acl_save_exec_prefix="$exec_prefix"
8737 exec_prefix="$acl_final_exec_prefix"
8738 eval x=\"$x\"
8739 exec_prefix="$acl_save_exec_prefix"
8740 prefix="$acl_save_prefix"
8741
8742 if test "X$x" = "X-L$found_dir"; then
8743 haveit=yes
8744 break
8745 fi
8746 done
8747 if test -z "$haveit"; then
8748 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8749 fi
8750 if test "$hardcode_minus_L" != no; then
8751 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8752 else
8753 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8754 fi
8755 fi
8756 fi
8757 fi
8758 else
8759 if test "X$found_a" != "X"; then
8760 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8761 else
8762 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8763 fi
8764 fi
8765 additional_includedir=
8766 case "$found_dir" in
8767 */lib | */lib/)
8768 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8769 additional_includedir="$basedir/include"
8770 ;;
8771 esac
8772 if test "X$additional_includedir" != "X"; then
8773 if test "X$additional_includedir" != "X/usr/include"; then
8774 haveit=
8775 if test "X$additional_includedir" = "X/usr/local/include"; then
8776 if test -n "$GCC"; then
8777 case $host_os in
8778 linux*) haveit=yes;;
8779 esac
8780 fi
8781 fi
8782 if test -z "$haveit"; then
8783 for x in $CPPFLAGS $INCICONV; do
8784
8785 acl_save_prefix="$prefix"
8786 prefix="$acl_final_prefix"
8787 acl_save_exec_prefix="$exec_prefix"
8788 exec_prefix="$acl_final_exec_prefix"
8789 eval x=\"$x\"
8790 exec_prefix="$acl_save_exec_prefix"
8791 prefix="$acl_save_prefix"
8792
8793 if test "X$x" = "X-I$additional_includedir"; then
8794 haveit=yes
8795 break
8796 fi
8797 done
8798 if test -z "$haveit"; then
8799 if test -d "$additional_includedir"; then
8800 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8801 fi
8802 fi
8803 fi
8804 fi
8805 fi
8806 if test -n "$found_la"; then
8807 save_libdir="$libdir"
8808 case "$found_la" in
8809 */* | *\\*) . "$found_la" ;;
8810 *) . "./$found_la" ;;
8811 esac
8812 libdir="$save_libdir"
8813 for dep in $dependency_libs; do
8814 case "$dep" in
8815 -L*)
8816 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8817 if test "X$additional_libdir" != "X/usr/lib"; then
8818 haveit=
8819 if test "X$additional_libdir" = "X/usr/local/lib"; then
8820 if test -n "$GCC"; then
8821 case $host_os in
8822 linux*) haveit=yes;;
8823 esac
8824 fi
8825 fi
8826 if test -z "$haveit"; then
8827 haveit=
8828 for x in $LDFLAGS $LIBICONV; do
8829
8830 acl_save_prefix="$prefix"
8831 prefix="$acl_final_prefix"
8832 acl_save_exec_prefix="$exec_prefix"
8833 exec_prefix="$acl_final_exec_prefix"
8834 eval x=\"$x\"
8835 exec_prefix="$acl_save_exec_prefix"
8836 prefix="$acl_save_prefix"
8837
8838 if test "X$x" = "X-L$additional_libdir"; then
8839 haveit=yes
8840 break
8841 fi
8842 done
8843 if test -z "$haveit"; then
8844 if test -d "$additional_libdir"; then
8845 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8846 fi
8847 fi
8848 haveit=
8849 for x in $LDFLAGS $LTLIBICONV; do
8850
8851 acl_save_prefix="$prefix"
8852 prefix="$acl_final_prefix"
8853 acl_save_exec_prefix="$exec_prefix"
8854 exec_prefix="$acl_final_exec_prefix"
8855 eval x=\"$x\"
8856 exec_prefix="$acl_save_exec_prefix"
8857 prefix="$acl_save_prefix"
8858
8859 if test "X$x" = "X-L$additional_libdir"; then
8860 haveit=yes
8861 break
8862 fi
8863 done
8864 if test -z "$haveit"; then
8865 if test -d "$additional_libdir"; then
8866 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8867 fi
8868 fi
8869 fi
8870 fi
8871 ;;
8872 -R*)
8873 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8874 if test "$enable_rpath" != no; then
8875 haveit=
8876 for x in $rpathdirs; do
8877 if test "X$x" = "X$dir"; then
8878 haveit=yes
8879 break
8880 fi
8881 done
8882 if test -z "$haveit"; then
8883 rpathdirs="$rpathdirs $dir"
8884 fi
8885 haveit=
8886 for x in $ltrpathdirs; do
8887 if test "X$x" = "X$dir"; then
8888 haveit=yes
8889 break
8890 fi
8891 done
8892 if test -z "$haveit"; then
8893 ltrpathdirs="$ltrpathdirs $dir"
8894 fi
8895 fi
8896 ;;
8897 -l*)
8898 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8899 ;;
8900 *.la)
8901 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8902 ;;
8903 *)
8904 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8905 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8906 ;;
8907 esac
8908 done
8909 fi
8910 else
8911 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8912 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8913 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8914 else
8915 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8916 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8917 fi
8918 fi
8919 fi
8920 fi
8921 done
8922 done
8923 if test "X$rpathdirs" != "X"; then
8924 if test -n "$hardcode_libdir_separator"; then
8925 alldirs=
8926 for found_dir in $rpathdirs; do
8927 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8928 done
8929 acl_save_libdir="$libdir"
8930 libdir="$alldirs"
8931 eval flag=\"$hardcode_libdir_flag_spec\"
8932 libdir="$acl_save_libdir"
8933 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8934 else
8935 for found_dir in $rpathdirs; do
8936 acl_save_libdir="$libdir"
8937 libdir="$found_dir"
8938 eval flag=\"$hardcode_libdir_flag_spec\"
8939 libdir="$acl_save_libdir"
8940 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8941 done
8942 fi
8943 fi
8944 if test "X$ltrpathdirs" != "X"; then
8945 for found_dir in $ltrpathdirs; do
8946 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8947 done
8948 fi
8949
8950
8951
8952
8953
8954
8955
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8957 $as_echo_n "checking for iconv... " >&6; }
8958 if ${am_cv_func_iconv+:} false; then :
8959 $as_echo_n "(cached) " >&6
8960 else
8961
8962 am_cv_func_iconv="no, consider installing GNU libiconv"
8963 am_cv_lib_iconv=no
8964 am_save_CPPFLAGS="$CPPFLAGS"
8965 CPPFLAGS="$CPPFLAGS $INCICONV"
8966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8967 /* end confdefs.h. */
8968 #include <stdlib.h>
8969 #include <iconv.h>
8970 int
8971 main ()
8972 {
8973 iconv_t cd = iconv_open("","");
8974 iconv(cd,NULL,NULL,NULL,NULL);
8975 iconv_close(cd);
8976 ;
8977 return 0;
8978 }
8979 _ACEOF
8980 if ac_fn_c_try_link "$LINENO"; then :
8981 am_cv_func_iconv=yes
8982 fi
8983 rm -f core conftest.err conftest.$ac_objext \
8984 conftest$ac_exeext conftest.$ac_ext
8985 CPPFLAGS="$am_save_CPPFLAGS"
8986
8987 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8988 for _libs in .libs _libs; do
8989 am_save_CPPFLAGS="$CPPFLAGS"
8990 am_save_LIBS="$LIBS"
8991 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8992 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8994 /* end confdefs.h. */
8995 #include <stdlib.h>
8996 #include <iconv.h>
8997 int
8998 main ()
8999 {
9000 iconv_t cd = iconv_open("","");
9001 iconv(cd,NULL,NULL,NULL,NULL);
9002 iconv_close(cd);
9003 ;
9004 return 0;
9005 }
9006 _ACEOF
9007 if ac_fn_c_try_link "$LINENO"; then :
9008 INCICONV="-I../libiconv/include"
9009 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
9010 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
9011 am_cv_lib_iconv=yes
9012 am_cv_func_iconv=yes
9013 fi
9014 rm -f core conftest.err conftest.$ac_objext \
9015 conftest$ac_exeext conftest.$ac_ext
9016 CPPFLAGS="$am_save_CPPFLAGS"
9017 LIBS="$am_save_LIBS"
9018 if test "$am_cv_func_iconv" = "yes"; then
9019 break
9020 fi
9021 done
9022 fi
9023
9024 if test "$am_cv_func_iconv" != yes; then
9025 am_save_CPPFLAGS="$CPPFLAGS"
9026 am_save_LIBS="$LIBS"
9027 CPPFLAGS="$CPPFLAGS $INCICONV"
9028 LIBS="$LIBS $LIBICONV"
9029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9030 /* end confdefs.h. */
9031 #include <stdlib.h>
9032 #include <iconv.h>
9033 int
9034 main ()
9035 {
9036 iconv_t cd = iconv_open("","");
9037 iconv(cd,NULL,NULL,NULL,NULL);
9038 iconv_close(cd);
9039 ;
9040 return 0;
9041 }
9042 _ACEOF
9043 if ac_fn_c_try_link "$LINENO"; then :
9044 am_cv_lib_iconv=yes
9045 am_cv_func_iconv=yes
9046 fi
9047 rm -f core conftest.err conftest.$ac_objext \
9048 conftest$ac_exeext conftest.$ac_ext
9049 CPPFLAGS="$am_save_CPPFLAGS"
9050 LIBS="$am_save_LIBS"
9051 fi
9052
9053 fi
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
9055 $as_echo "$am_cv_func_iconv" >&6; }
9056 if test "$am_cv_func_iconv" = yes; then
9057
9058 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
9059
9060 fi
9061 if test "$am_cv_lib_iconv" = yes; then
9062
9063 for element in $INCICONV; do
9064 haveit=
9065 for x in $CPPFLAGS; do
9066
9067 acl_save_prefix="$prefix"
9068 prefix="$acl_final_prefix"
9069 acl_save_exec_prefix="$exec_prefix"
9070 exec_prefix="$acl_final_exec_prefix"
9071 eval x=\"$x\"
9072 exec_prefix="$acl_save_exec_prefix"
9073 prefix="$acl_save_prefix"
9074
9075 if test "X$x" = "X$element"; then
9076 haveit=yes
9077 break
9078 fi
9079 done
9080 if test -z "$haveit"; then
9081 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9082 fi
9083 done
9084
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
9086 $as_echo_n "checking how to link with libiconv... " >&6; }
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
9088 $as_echo "$LIBICONV" >&6; }
9089 else
9090 LIBICONV=
9091 LTLIBICONV=
9092 fi
9093
9094
9095
9096 if test "$am_cv_func_iconv" = yes; then
9097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
9098 $as_echo_n "checking for iconv declaration... " >&6; }
9099 if ${am_cv_proto_iconv+:} false; then :
9100 $as_echo_n "(cached) " >&6
9101 else
9102
9103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9104 /* end confdefs.h. */
9105
9106 #include <stdlib.h>
9107 #include <iconv.h>
9108 extern
9109 #ifdef __cplusplus
9110 "C"
9111 #endif
9112 #if defined(__STDC__) || defined(__cplusplus)
9113 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9114 #else
9115 size_t iconv();
9116 #endif
9117
9118 int
9119 main ()
9120 {
9121
9122 ;
9123 return 0;
9124 }
9125 _ACEOF
9126 if ac_fn_c_try_compile "$LINENO"; then :
9127 am_cv_proto_iconv_arg1=""
9128 else
9129 am_cv_proto_iconv_arg1="const"
9130 fi
9131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9132 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);"
9133 fi
9134
9135 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
9137 }$am_cv_proto_iconv" >&5
9138 $as_echo "${ac_t:-
9139 }$am_cv_proto_iconv" >&6; }
9140
9141 cat >>confdefs.h <<_ACEOF
9142 #define ICONV_CONST $am_cv_proto_iconv_arg1
9143 _ACEOF
9144
9145 fi
9146
9147
9148 # GDB may fork/exec the iconv program to get the list of supported character
9149 # sets. Allow the user to specify where to find it.
9150 # There are several factors affecting the choice of option name:
9151 # - There is already --with-libiconv-prefix but we can't use it, it specifies
9152 # the build-time location of libiconv files.
9153 # - The program we need to find is iconv, which comes with glibc. The user
9154 # doesn't necessarily have libiconv installed. Therefore naming this
9155 # --with-libiconv-foo feels wrong.
9156 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9157 # defined to work on directories not files (though it really doesn't know
9158 # the difference).
9159 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
9160 # with --with-libiconv-prefix.
9161 # Putting these together is why the option name is --with-iconv-bin.
9162
9163
9164 # Check whether --with-iconv-bin was given.
9165 if test "${with_iconv_bin+set}" = set; then :
9166 withval=$with_iconv_bin; iconv_bin="${withval}"
9167
9168 cat >>confdefs.h <<_ACEOF
9169 #define ICONV_BIN "${iconv_bin}"
9170 _ACEOF
9171
9172
9173 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9174 if test "x$prefix" = xNONE; then
9175 test_prefix=/usr/local
9176 else
9177 test_prefix=$prefix
9178 fi
9179 else
9180 test_prefix=$exec_prefix
9181 fi
9182 value=0
9183 case ${iconv_bin} in
9184 "${test_prefix}"|"${test_prefix}/"*|\
9185 '${exec_prefix}'|'${exec_prefix}/'*)
9186 value=1
9187 ;;
9188 esac
9189
9190 cat >>confdefs.h <<_ACEOF
9191 #define ICONV_BIN_RELOCATABLE $value
9192 _ACEOF
9193
9194
9195
9196 fi
9197
9198
9199 # For the TUI, we need enhanced curses functionality.
9200 if test x"$enable_tui" != xno; then
9201 prefer_curses=yes
9202 fi
9203
9204 curses_found=no
9205 if test x"$prefer_curses" = xyes; then
9206 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9207 # curses library because the latter might not provide all the
9208 # functionality we need. However, this leads to problems on systems
9209 # where the linker searches /usr/local/lib, but the compiler doesn't
9210 # search /usr/local/include, if ncurses is installed in /usr/local. A
9211 # default installation of ncurses on alpha*-dec-osf* will lead to such
9212 # a situation.
9213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9214 $as_echo_n "checking for library containing waddstr... " >&6; }
9215 if ${ac_cv_search_waddstr+:} false; then :
9216 $as_echo_n "(cached) " >&6
9217 else
9218 ac_func_search_save_LIBS=$LIBS
9219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9220 /* end confdefs.h. */
9221
9222 /* Override any GCC internal prototype to avoid an error.
9223 Use char because int might match the return type of a GCC
9224 builtin and then its argument prototype would still apply. */
9225 #ifdef __cplusplus
9226 extern "C"
9227 #endif
9228 char waddstr ();
9229 int
9230 main ()
9231 {
9232 return waddstr ();
9233 ;
9234 return 0;
9235 }
9236 _ACEOF
9237 for ac_lib in '' ncursesw ncurses cursesX curses; do
9238 if test -z "$ac_lib"; then
9239 ac_res="none required"
9240 else
9241 ac_res=-l$ac_lib
9242 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9243 fi
9244 if ac_fn_c_try_link "$LINENO"; then :
9245 ac_cv_search_waddstr=$ac_res
9246 fi
9247 rm -f core conftest.err conftest.$ac_objext \
9248 conftest$ac_exeext
9249 if ${ac_cv_search_waddstr+:} false; then :
9250 break
9251 fi
9252 done
9253 if ${ac_cv_search_waddstr+:} false; then :
9254
9255 else
9256 ac_cv_search_waddstr=no
9257 fi
9258 rm conftest.$ac_ext
9259 LIBS=$ac_func_search_save_LIBS
9260 fi
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9262 $as_echo "$ac_cv_search_waddstr" >&6; }
9263 ac_res=$ac_cv_search_waddstr
9264 if test "$ac_res" != no; then :
9265 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9266
9267 fi
9268
9269
9270 if test "$ac_cv_search_waddstr" != no; then
9271 curses_found=yes
9272 fi
9273 fi
9274
9275 # Check whether we should enable the TUI, but only do so if we really
9276 # can.
9277 if test x"$enable_tui" != xno; then
9278 if test -d "$srcdir/tui"; then
9279 if test "$curses_found" != no; then
9280 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9281 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9282 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9283 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9284 else
9285 if test x"$enable_tui" = xyes; then
9286 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9287 else
9288 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9289 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9290 fi
9291 fi
9292 fi
9293 fi
9294
9295 # Since GDB uses Readline, we need termcap functionality. In many
9296 # cases this will be provided by the curses library, but some systems
9297 # have a separate termcap library, or no curses library at all.
9298
9299 case $host_os in
9300 cygwin*)
9301 if test -d "$srcdir/libtermcap"; then
9302 LIBS="../libtermcap/libtermcap.a $LIBS"
9303 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9304 fi ;;
9305 go32* | *djgpp*)
9306 ac_cv_search_tgetent="none required"
9307 ;;
9308 esac
9309
9310 # These are the libraries checked by Readline.
9311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9312 $as_echo_n "checking for library containing tgetent... " >&6; }
9313 if ${ac_cv_search_tgetent+:} false; then :
9314 $as_echo_n "(cached) " >&6
9315 else
9316 ac_func_search_save_LIBS=$LIBS
9317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9318 /* end confdefs.h. */
9319
9320 /* Override any GCC internal prototype to avoid an error.
9321 Use char because int might match the return type of a GCC
9322 builtin and then its argument prototype would still apply. */
9323 #ifdef __cplusplus
9324 extern "C"
9325 #endif
9326 char tgetent ();
9327 int
9328 main ()
9329 {
9330 return tgetent ();
9331 ;
9332 return 0;
9333 }
9334 _ACEOF
9335 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9336 if test -z "$ac_lib"; then
9337 ac_res="none required"
9338 else
9339 ac_res=-l$ac_lib
9340 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9341 fi
9342 if ac_fn_c_try_link "$LINENO"; then :
9343 ac_cv_search_tgetent=$ac_res
9344 fi
9345 rm -f core conftest.err conftest.$ac_objext \
9346 conftest$ac_exeext
9347 if ${ac_cv_search_tgetent+:} false; then :
9348 break
9349 fi
9350 done
9351 if ${ac_cv_search_tgetent+:} false; then :
9352
9353 else
9354 ac_cv_search_tgetent=no
9355 fi
9356 rm conftest.$ac_ext
9357 LIBS=$ac_func_search_save_LIBS
9358 fi
9359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9360 $as_echo "$ac_cv_search_tgetent" >&6; }
9361 ac_res=$ac_cv_search_tgetent
9362 if test "$ac_res" != no; then :
9363 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9364
9365 fi
9366
9367
9368 if test "$ac_cv_search_tgetent" = no; then
9369 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9370 fi
9371
9372
9373 # Check whether --with-system-readline was given.
9374 if test "${with_system_readline+set}" = set; then :
9375 withval=$with_system_readline;
9376 fi
9377
9378
9379 if test "$with_system_readline" = yes; then
9380 for ac_header in readline/readline.h
9381 do :
9382 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9383 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9384 cat >>confdefs.h <<_ACEOF
9385 #define HAVE_READLINE_READLINE_H 1
9386 _ACEOF
9387 readline_h=yes
9388 else
9389 readline_h=no
9390 fi
9391
9392 done
9393
9394 if test "$readline_h" = "no"; then
9395 as_fn_error $? "readline development packages are probably missing" "$LINENO" 5
9396 fi
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9398 $as_echo_n "checking whether system readline is new enough... " >&6; }
9399 if ${gdb_cv_readline_ok+:} false; then :
9400 $as_echo_n "(cached) " >&6
9401 else
9402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9403 /* end confdefs.h. */
9404 #include <stdio.h>
9405 #include <readline/readline.h>
9406 int
9407 main ()
9408 {
9409 #if RL_VERSION_MAJOR < 7
9410 # error "readline version 7 required"
9411 #endif
9412
9413 ;
9414 return 0;
9415 }
9416 _ACEOF
9417 if ac_fn_c_try_compile "$LINENO"; then :
9418 gdb_cv_readline_ok=yes
9419 else
9420 gdb_cv_readline_ok=no
9421
9422 fi
9423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9424
9425 fi
9426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9427 $as_echo "$gdb_cv_readline_ok" >&6; }
9428 if test "$gdb_cv_readline_ok" != yes; then
9429 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9430 fi
9431
9432 READLINE=-lreadline
9433 READLINE_DEPS=
9434 READLINE_CFLAGS=
9435 READLINE_TEXI_INCFLAG=
9436 else
9437 READLINE='$(READLINE_DIR)/libreadline.a'
9438 READLINE_DEPS='$(READLINE)'
9439 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9440 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9441 fi
9442
9443
9444
9445
9446
9447 # Generate jit-reader.h
9448
9449 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9450 TARGET_PTR=
9451
9452 # The cast to long int works around a bug in the HP C Compiler
9453 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9454 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9455 # This bug is HP SR number 8606223364.
9456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9457 $as_echo_n "checking size of unsigned long long... " >&6; }
9458 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9459 $as_echo_n "(cached) " >&6
9460 else
9461 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9462
9463 else
9464 if test "$ac_cv_type_unsigned_long_long" = yes; then
9465 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9466 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9467 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9468 See \`config.log' for more details" "$LINENO" 5; }
9469 else
9470 ac_cv_sizeof_unsigned_long_long=0
9471 fi
9472 fi
9473
9474 fi
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9476 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9477
9478
9479
9480 cat >>confdefs.h <<_ACEOF
9481 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9482 _ACEOF
9483
9484
9485 # The cast to long int works around a bug in the HP C Compiler
9486 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9487 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9488 # This bug is HP SR number 8606223364.
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9490 $as_echo_n "checking size of unsigned long... " >&6; }
9491 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9492 $as_echo_n "(cached) " >&6
9493 else
9494 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9495
9496 else
9497 if test "$ac_cv_type_unsigned_long" = yes; then
9498 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9499 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9500 as_fn_error 77 "cannot compute sizeof (unsigned long)
9501 See \`config.log' for more details" "$LINENO" 5; }
9502 else
9503 ac_cv_sizeof_unsigned_long=0
9504 fi
9505 fi
9506
9507 fi
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9509 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9510
9511
9512
9513 cat >>confdefs.h <<_ACEOF
9514 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9515 _ACEOF
9516
9517
9518 # The cast to long int works around a bug in the HP C Compiler
9519 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9520 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9521 # This bug is HP SR number 8606223364.
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9523 $as_echo_n "checking size of unsigned __int128... " >&6; }
9524 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9525 $as_echo_n "(cached) " >&6
9526 else
9527 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9528
9529 else
9530 if test "$ac_cv_type_unsigned___int128" = yes; then
9531 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9532 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9533 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9534 See \`config.log' for more details" "$LINENO" 5; }
9535 else
9536 ac_cv_sizeof_unsigned___int128=0
9537 fi
9538 fi
9539
9540 fi
9541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9542 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9543
9544
9545
9546 cat >>confdefs.h <<_ACEOF
9547 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9548 _ACEOF
9549
9550
9551
9552 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9553 TARGET_PTR="unsigned long"
9554 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9555 TARGET_PTR="unsigned long long"
9556 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9557 TARGET_PTR="unsigned __int128"
9558 else
9559 TARGET_PTR="unsigned long"
9560 fi
9561
9562
9563 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9564
9565
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9567 $as_echo_n "checking for library containing dlopen... " >&6; }
9568 if ${ac_cv_search_dlopen+:} false; then :
9569 $as_echo_n "(cached) " >&6
9570 else
9571 ac_func_search_save_LIBS=$LIBS
9572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9573 /* end confdefs.h. */
9574
9575 /* Override any GCC internal prototype to avoid an error.
9576 Use char because int might match the return type of a GCC
9577 builtin and then its argument prototype would still apply. */
9578 #ifdef __cplusplus
9579 extern "C"
9580 #endif
9581 char dlopen ();
9582 int
9583 main ()
9584 {
9585 return dlopen ();
9586 ;
9587 return 0;
9588 }
9589 _ACEOF
9590 for ac_lib in '' dl; do
9591 if test -z "$ac_lib"; then
9592 ac_res="none required"
9593 else
9594 ac_res=-l$ac_lib
9595 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9596 fi
9597 if ac_fn_c_try_link "$LINENO"; then :
9598 ac_cv_search_dlopen=$ac_res
9599 fi
9600 rm -f core conftest.err conftest.$ac_objext \
9601 conftest$ac_exeext
9602 if ${ac_cv_search_dlopen+:} false; then :
9603 break
9604 fi
9605 done
9606 if ${ac_cv_search_dlopen+:} false; then :
9607
9608 else
9609 ac_cv_search_dlopen=no
9610 fi
9611 rm conftest.$ac_ext
9612 LIBS=$ac_func_search_save_LIBS
9613 fi
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9615 $as_echo "$ac_cv_search_dlopen" >&6; }
9616 ac_res=$ac_cv_search_dlopen
9617 if test "$ac_res" != no; then :
9618 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9619
9620 fi
9621
9622
9623
9624
9625 # Check whether --with-jit-reader-dir was given.
9626 if test "${with_jit_reader_dir+set}" = set; then :
9627 withval=$with_jit_reader_dir;
9628 JIT_READER_DIR=$withval
9629 else
9630 JIT_READER_DIR=${libdir}/gdb
9631 fi
9632
9633
9634 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9635 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9636 ac_define_dir=`eval echo $JIT_READER_DIR`
9637 ac_define_dir=`eval echo $ac_define_dir`
9638
9639 cat >>confdefs.h <<_ACEOF
9640 #define JIT_READER_DIR "$ac_define_dir"
9641 _ACEOF
9642
9643
9644
9645
9646 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9647 if test "x$prefix" = xNONE; then
9648 test_prefix=/usr/local
9649 else
9650 test_prefix=$prefix
9651 fi
9652 else
9653 test_prefix=$exec_prefix
9654 fi
9655 value=0
9656 case ${ac_define_dir} in
9657 "${test_prefix}"|"${test_prefix}/"*|\
9658 '${exec_prefix}'|'${exec_prefix}/'*)
9659 value=1
9660 ;;
9661 esac
9662
9663 cat >>confdefs.h <<_ACEOF
9664 #define JIT_READER_DIR_RELOCATABLE $value
9665 _ACEOF
9666
9667
9668
9669
9670
9671 # Check whether --with-expat was given.
9672 if test "${with_expat+set}" = set; then :
9673 withval=$with_expat;
9674 else
9675 with_expat=auto
9676 fi
9677
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9679 $as_echo_n "checking whether to use expat... " >&6; }
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9681 $as_echo "$with_expat" >&6; }
9682
9683 if test "${with_expat}" = no; then
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9685 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9686 HAVE_LIBEXPAT=no
9687 else
9688
9689
9690
9691
9692
9693
9694
9695
9696 use_additional=yes
9697
9698 acl_save_prefix="$prefix"
9699 prefix="$acl_final_prefix"
9700 acl_save_exec_prefix="$exec_prefix"
9701 exec_prefix="$acl_final_exec_prefix"
9702
9703 eval additional_includedir=\"$includedir\"
9704 eval additional_libdir=\"$libdir\"
9705
9706 exec_prefix="$acl_save_exec_prefix"
9707 prefix="$acl_save_prefix"
9708
9709
9710 # Check whether --with-libexpat-prefix was given.
9711 if test "${with_libexpat_prefix+set}" = set; then :
9712 withval=$with_libexpat_prefix;
9713 if test "X$withval" = "Xno"; then
9714 use_additional=no
9715 else
9716 if test "X$withval" = "X"; then
9717
9718 acl_save_prefix="$prefix"
9719 prefix="$acl_final_prefix"
9720 acl_save_exec_prefix="$exec_prefix"
9721 exec_prefix="$acl_final_exec_prefix"
9722
9723 eval additional_includedir=\"$includedir\"
9724 eval additional_libdir=\"$libdir\"
9725
9726 exec_prefix="$acl_save_exec_prefix"
9727 prefix="$acl_save_prefix"
9728
9729 else
9730 additional_includedir="$withval/include"
9731 additional_libdir="$withval/lib"
9732 fi
9733 fi
9734
9735 fi
9736
9737
9738 # Check whether --with-libexpat-type was given.
9739 if test "${with_libexpat_type+set}" = set; then :
9740 withval=$with_libexpat_type; with_libexpat_type=$withval
9741 else
9742 with_libexpat_type=auto
9743 fi
9744
9745 lib_type=`eval echo \$with_libexpat_type`
9746
9747 LIBEXPAT=
9748 LTLIBEXPAT=
9749 INCEXPAT=
9750 rpathdirs=
9751 ltrpathdirs=
9752 names_already_handled=
9753 names_next_round='expat '
9754 while test -n "$names_next_round"; do
9755 names_this_round="$names_next_round"
9756 names_next_round=
9757 for name in $names_this_round; do
9758 already_handled=
9759 for n in $names_already_handled; do
9760 if test "$n" = "$name"; then
9761 already_handled=yes
9762 break
9763 fi
9764 done
9765 if test -z "$already_handled"; then
9766 names_already_handled="$names_already_handled $name"
9767 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9768 eval value=\"\$HAVE_LIB$uppername\"
9769 if test -n "$value"; then
9770 if test "$value" = yes; then
9771 eval value=\"\$LIB$uppername\"
9772 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9773 eval value=\"\$LTLIB$uppername\"
9774 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9775 else
9776 :
9777 fi
9778 else
9779 found_dir=
9780 found_la=
9781 found_so=
9782 found_a=
9783 if test $use_additional = yes; then
9784 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9785 found_dir="$additional_libdir"
9786 found_so="$additional_libdir/lib$name.$shlibext"
9787 if test -f "$additional_libdir/lib$name.la"; then
9788 found_la="$additional_libdir/lib$name.la"
9789 fi
9790 elif test x$lib_type != xshared; then
9791 if test -f "$additional_libdir/lib$name.$libext"; then
9792 found_dir="$additional_libdir"
9793 found_a="$additional_libdir/lib$name.$libext"
9794 if test -f "$additional_libdir/lib$name.la"; then
9795 found_la="$additional_libdir/lib$name.la"
9796 fi
9797 fi
9798 fi
9799 fi
9800 if test "X$found_dir" = "X"; then
9801 for x in $LDFLAGS $LTLIBEXPAT; do
9802
9803 acl_save_prefix="$prefix"
9804 prefix="$acl_final_prefix"
9805 acl_save_exec_prefix="$exec_prefix"
9806 exec_prefix="$acl_final_exec_prefix"
9807 eval x=\"$x\"
9808 exec_prefix="$acl_save_exec_prefix"
9809 prefix="$acl_save_prefix"
9810
9811 case "$x" in
9812 -L*)
9813 dir=`echo "X$x" | sed -e 's/^X-L//'`
9814 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9815 found_dir="$dir"
9816 found_so="$dir/lib$name.$shlibext"
9817 if test -f "$dir/lib$name.la"; then
9818 found_la="$dir/lib$name.la"
9819 fi
9820 elif test x$lib_type != xshared; then
9821 if test -f "$dir/lib$name.$libext"; then
9822 found_dir="$dir"
9823 found_a="$dir/lib$name.$libext"
9824 if test -f "$dir/lib$name.la"; then
9825 found_la="$dir/lib$name.la"
9826 fi
9827 fi
9828 fi
9829 ;;
9830 esac
9831 if test "X$found_dir" != "X"; then
9832 break
9833 fi
9834 done
9835 fi
9836 if test "X$found_dir" != "X"; then
9837 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9838 if test "X$found_so" != "X"; then
9839 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9840 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9841 else
9842 haveit=
9843 for x in $ltrpathdirs; do
9844 if test "X$x" = "X$found_dir"; then
9845 haveit=yes
9846 break
9847 fi
9848 done
9849 if test -z "$haveit"; then
9850 ltrpathdirs="$ltrpathdirs $found_dir"
9851 fi
9852 if test "$hardcode_direct" = yes; then
9853 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9854 else
9855 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9856 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9857 haveit=
9858 for x in $rpathdirs; do
9859 if test "X$x" = "X$found_dir"; then
9860 haveit=yes
9861 break
9862 fi
9863 done
9864 if test -z "$haveit"; then
9865 rpathdirs="$rpathdirs $found_dir"
9866 fi
9867 else
9868 haveit=
9869 for x in $LDFLAGS $LIBEXPAT; do
9870
9871 acl_save_prefix="$prefix"
9872 prefix="$acl_final_prefix"
9873 acl_save_exec_prefix="$exec_prefix"
9874 exec_prefix="$acl_final_exec_prefix"
9875 eval x=\"$x\"
9876 exec_prefix="$acl_save_exec_prefix"
9877 prefix="$acl_save_prefix"
9878
9879 if test "X$x" = "X-L$found_dir"; then
9880 haveit=yes
9881 break
9882 fi
9883 done
9884 if test -z "$haveit"; then
9885 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9886 fi
9887 if test "$hardcode_minus_L" != no; then
9888 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9889 else
9890 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9891 fi
9892 fi
9893 fi
9894 fi
9895 else
9896 if test "X$found_a" != "X"; then
9897 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9898 else
9899 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9900 fi
9901 fi
9902 additional_includedir=
9903 case "$found_dir" in
9904 */lib | */lib/)
9905 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9906 additional_includedir="$basedir/include"
9907 ;;
9908 esac
9909 if test "X$additional_includedir" != "X"; then
9910 if test "X$additional_includedir" != "X/usr/include"; then
9911 haveit=
9912 if test "X$additional_includedir" = "X/usr/local/include"; then
9913 if test -n "$GCC"; then
9914 case $host_os in
9915 linux*) haveit=yes;;
9916 esac
9917 fi
9918 fi
9919 if test -z "$haveit"; then
9920 for x in $CPPFLAGS $INCEXPAT; do
9921
9922 acl_save_prefix="$prefix"
9923 prefix="$acl_final_prefix"
9924 acl_save_exec_prefix="$exec_prefix"
9925 exec_prefix="$acl_final_exec_prefix"
9926 eval x=\"$x\"
9927 exec_prefix="$acl_save_exec_prefix"
9928 prefix="$acl_save_prefix"
9929
9930 if test "X$x" = "X-I$additional_includedir"; then
9931 haveit=yes
9932 break
9933 fi
9934 done
9935 if test -z "$haveit"; then
9936 if test -d "$additional_includedir"; then
9937 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9938 fi
9939 fi
9940 fi
9941 fi
9942 fi
9943 if test -n "$found_la"; then
9944 save_libdir="$libdir"
9945 case "$found_la" in
9946 */* | *\\*) . "$found_la" ;;
9947 *) . "./$found_la" ;;
9948 esac
9949 libdir="$save_libdir"
9950 for dep in $dependency_libs; do
9951 case "$dep" in
9952 -L*)
9953 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9954 if test "X$additional_libdir" != "X/usr/lib"; then
9955 haveit=
9956 if test "X$additional_libdir" = "X/usr/local/lib"; then
9957 if test -n "$GCC"; then
9958 case $host_os in
9959 linux*) haveit=yes;;
9960 esac
9961 fi
9962 fi
9963 if test -z "$haveit"; then
9964 haveit=
9965 for x in $LDFLAGS $LIBEXPAT; do
9966
9967 acl_save_prefix="$prefix"
9968 prefix="$acl_final_prefix"
9969 acl_save_exec_prefix="$exec_prefix"
9970 exec_prefix="$acl_final_exec_prefix"
9971 eval x=\"$x\"
9972 exec_prefix="$acl_save_exec_prefix"
9973 prefix="$acl_save_prefix"
9974
9975 if test "X$x" = "X-L$additional_libdir"; then
9976 haveit=yes
9977 break
9978 fi
9979 done
9980 if test -z "$haveit"; then
9981 if test -d "$additional_libdir"; then
9982 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9983 fi
9984 fi
9985 haveit=
9986 for x in $LDFLAGS $LTLIBEXPAT; do
9987
9988 acl_save_prefix="$prefix"
9989 prefix="$acl_final_prefix"
9990 acl_save_exec_prefix="$exec_prefix"
9991 exec_prefix="$acl_final_exec_prefix"
9992 eval x=\"$x\"
9993 exec_prefix="$acl_save_exec_prefix"
9994 prefix="$acl_save_prefix"
9995
9996 if test "X$x" = "X-L$additional_libdir"; then
9997 haveit=yes
9998 break
9999 fi
10000 done
10001 if test -z "$haveit"; then
10002 if test -d "$additional_libdir"; then
10003 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
10004 fi
10005 fi
10006 fi
10007 fi
10008 ;;
10009 -R*)
10010 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10011 if test "$enable_rpath" != no; then
10012 haveit=
10013 for x in $rpathdirs; do
10014 if test "X$x" = "X$dir"; then
10015 haveit=yes
10016 break
10017 fi
10018 done
10019 if test -z "$haveit"; then
10020 rpathdirs="$rpathdirs $dir"
10021 fi
10022 haveit=
10023 for x in $ltrpathdirs; do
10024 if test "X$x" = "X$dir"; then
10025 haveit=yes
10026 break
10027 fi
10028 done
10029 if test -z "$haveit"; then
10030 ltrpathdirs="$ltrpathdirs $dir"
10031 fi
10032 fi
10033 ;;
10034 -l*)
10035 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10036 ;;
10037 *.la)
10038 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10039 ;;
10040 *)
10041 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
10042 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
10043 ;;
10044 esac
10045 done
10046 fi
10047 else
10048 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10049 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
10050 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
10051 else
10052 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
10053 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
10054 fi
10055 fi
10056 fi
10057 fi
10058 done
10059 done
10060 if test "X$rpathdirs" != "X"; then
10061 if test -n "$hardcode_libdir_separator"; then
10062 alldirs=
10063 for found_dir in $rpathdirs; do
10064 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10065 done
10066 acl_save_libdir="$libdir"
10067 libdir="$alldirs"
10068 eval flag=\"$hardcode_libdir_flag_spec\"
10069 libdir="$acl_save_libdir"
10070 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10071 else
10072 for found_dir in $rpathdirs; do
10073 acl_save_libdir="$libdir"
10074 libdir="$found_dir"
10075 eval flag=\"$hardcode_libdir_flag_spec\"
10076 libdir="$acl_save_libdir"
10077 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
10078 done
10079 fi
10080 fi
10081 if test "X$ltrpathdirs" != "X"; then
10082 for found_dir in $ltrpathdirs; do
10083 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
10084 done
10085 fi
10086
10087
10088 ac_save_CPPFLAGS="$CPPFLAGS"
10089
10090 for element in $INCEXPAT; do
10091 haveit=
10092 for x in $CPPFLAGS; do
10093
10094 acl_save_prefix="$prefix"
10095 prefix="$acl_final_prefix"
10096 acl_save_exec_prefix="$exec_prefix"
10097 exec_prefix="$acl_final_exec_prefix"
10098 eval x=\"$x\"
10099 exec_prefix="$acl_save_exec_prefix"
10100 prefix="$acl_save_prefix"
10101
10102 if test "X$x" = "X$element"; then
10103 haveit=yes
10104 break
10105 fi
10106 done
10107 if test -z "$haveit"; then
10108 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10109 fi
10110 done
10111
10112
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
10114 $as_echo_n "checking for libexpat... " >&6; }
10115 if ${ac_cv_libexpat+:} false; then :
10116 $as_echo_n "(cached) " >&6
10117 else
10118
10119 ac_save_LIBS="$LIBS"
10120 LIBS="$LIBS $LIBEXPAT"
10121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10122 /* end confdefs.h. */
10123 #include "expat.h"
10124 int
10125 main ()
10126 {
10127 XML_Parser p = XML_ParserCreate (0);
10128 ;
10129 return 0;
10130 }
10131 _ACEOF
10132 if ac_fn_c_try_link "$LINENO"; then :
10133 ac_cv_libexpat=yes
10134 else
10135 ac_cv_libexpat=no
10136 fi
10137 rm -f core conftest.err conftest.$ac_objext \
10138 conftest$ac_exeext conftest.$ac_ext
10139 LIBS="$ac_save_LIBS"
10140
10141 fi
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10143 $as_echo "$ac_cv_libexpat" >&6; }
10144 if test "$ac_cv_libexpat" = yes; then
10145 HAVE_LIBEXPAT=yes
10146
10147 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
10148
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10150 $as_echo_n "checking how to link with libexpat... " >&6; }
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10152 $as_echo "$LIBEXPAT" >&6; }
10153 else
10154 HAVE_LIBEXPAT=no
10155 CPPFLAGS="$ac_save_CPPFLAGS"
10156 LIBEXPAT=
10157 LTLIBEXPAT=
10158 fi
10159
10160
10161
10162
10163
10164
10165 if test "$HAVE_LIBEXPAT" != yes; then
10166 if test "$with_expat" = yes; then
10167 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
10168 else
10169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10170 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10171 fi
10172 else
10173 save_LIBS=$LIBS
10174 LIBS="$LIBS $LIBEXPAT"
10175 for ac_func in XML_StopParser
10176 do :
10177 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10178 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
10179 cat >>confdefs.h <<_ACEOF
10180 #define HAVE_XML_STOPPARSER 1
10181 _ACEOF
10182
10183 fi
10184 done
10185
10186 LIBS=$save_LIBS
10187 fi
10188 fi
10189
10190 # Verify that we have a usable GMP library.
10191
10192
10193
10194
10195
10196
10197
10198
10199 use_additional=yes
10200
10201 acl_save_prefix="$prefix"
10202 prefix="$acl_final_prefix"
10203 acl_save_exec_prefix="$exec_prefix"
10204 exec_prefix="$acl_final_exec_prefix"
10205
10206 eval additional_includedir=\"$includedir\"
10207 eval additional_libdir=\"$libdir\"
10208
10209 exec_prefix="$acl_save_exec_prefix"
10210 prefix="$acl_save_prefix"
10211
10212
10213 # Check whether --with-libgmp-prefix was given.
10214 if test "${with_libgmp_prefix+set}" = set; then :
10215 withval=$with_libgmp_prefix;
10216 if test "X$withval" = "Xno"; then
10217 use_additional=no
10218 else
10219 if test "X$withval" = "X"; then
10220
10221 acl_save_prefix="$prefix"
10222 prefix="$acl_final_prefix"
10223 acl_save_exec_prefix="$exec_prefix"
10224 exec_prefix="$acl_final_exec_prefix"
10225
10226 eval additional_includedir=\"$includedir\"
10227 eval additional_libdir=\"$libdir\"
10228
10229 exec_prefix="$acl_save_exec_prefix"
10230 prefix="$acl_save_prefix"
10231
10232 else
10233 additional_includedir="$withval/include"
10234 additional_libdir="$withval/lib"
10235 fi
10236 fi
10237
10238 fi
10239
10240
10241 # Check whether --with-libgmp-type was given.
10242 if test "${with_libgmp_type+set}" = set; then :
10243 withval=$with_libgmp_type; with_libgmp_type=$withval
10244 else
10245 with_libgmp_type=auto
10246 fi
10247
10248 lib_type=`eval echo \$with_libgmp_type`
10249
10250 LIBGMP=
10251 LTLIBGMP=
10252 INCGMP=
10253 rpathdirs=
10254 ltrpathdirs=
10255 names_already_handled=
10256 names_next_round='gmp '
10257 while test -n "$names_next_round"; do
10258 names_this_round="$names_next_round"
10259 names_next_round=
10260 for name in $names_this_round; do
10261 already_handled=
10262 for n in $names_already_handled; do
10263 if test "$n" = "$name"; then
10264 already_handled=yes
10265 break
10266 fi
10267 done
10268 if test -z "$already_handled"; then
10269 names_already_handled="$names_already_handled $name"
10270 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10271 eval value=\"\$HAVE_LIB$uppername\"
10272 if test -n "$value"; then
10273 if test "$value" = yes; then
10274 eval value=\"\$LIB$uppername\"
10275 test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value"
10276 eval value=\"\$LTLIB$uppername\"
10277 test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value"
10278 else
10279 :
10280 fi
10281 else
10282 found_dir=
10283 found_la=
10284 found_so=
10285 found_a=
10286 if test $use_additional = yes; then
10287 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10288 found_dir="$additional_libdir"
10289 found_so="$additional_libdir/lib$name.$shlibext"
10290 if test -f "$additional_libdir/lib$name.la"; then
10291 found_la="$additional_libdir/lib$name.la"
10292 fi
10293 elif test x$lib_type != xshared; then
10294 if test -f "$additional_libdir/lib$name.$libext"; then
10295 found_dir="$additional_libdir"
10296 found_a="$additional_libdir/lib$name.$libext"
10297 if test -f "$additional_libdir/lib$name.la"; then
10298 found_la="$additional_libdir/lib$name.la"
10299 fi
10300 fi
10301 fi
10302 fi
10303 if test "X$found_dir" = "X"; then
10304 for x in $LDFLAGS $LTLIBGMP; do
10305
10306 acl_save_prefix="$prefix"
10307 prefix="$acl_final_prefix"
10308 acl_save_exec_prefix="$exec_prefix"
10309 exec_prefix="$acl_final_exec_prefix"
10310 eval x=\"$x\"
10311 exec_prefix="$acl_save_exec_prefix"
10312 prefix="$acl_save_prefix"
10313
10314 case "$x" in
10315 -L*)
10316 dir=`echo "X$x" | sed -e 's/^X-L//'`
10317 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10318 found_dir="$dir"
10319 found_so="$dir/lib$name.$shlibext"
10320 if test -f "$dir/lib$name.la"; then
10321 found_la="$dir/lib$name.la"
10322 fi
10323 elif test x$lib_type != xshared; then
10324 if test -f "$dir/lib$name.$libext"; then
10325 found_dir="$dir"
10326 found_a="$dir/lib$name.$libext"
10327 if test -f "$dir/lib$name.la"; then
10328 found_la="$dir/lib$name.la"
10329 fi
10330 fi
10331 fi
10332 ;;
10333 esac
10334 if test "X$found_dir" != "X"; then
10335 break
10336 fi
10337 done
10338 fi
10339 if test "X$found_dir" != "X"; then
10340 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name"
10341 if test "X$found_so" != "X"; then
10342 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10343 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10344 else
10345 haveit=
10346 for x in $ltrpathdirs; do
10347 if test "X$x" = "X$found_dir"; then
10348 haveit=yes
10349 break
10350 fi
10351 done
10352 if test -z "$haveit"; then
10353 ltrpathdirs="$ltrpathdirs $found_dir"
10354 fi
10355 if test "$hardcode_direct" = yes; then
10356 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10357 else
10358 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10359 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10360 haveit=
10361 for x in $rpathdirs; do
10362 if test "X$x" = "X$found_dir"; then
10363 haveit=yes
10364 break
10365 fi
10366 done
10367 if test -z "$haveit"; then
10368 rpathdirs="$rpathdirs $found_dir"
10369 fi
10370 else
10371 haveit=
10372 for x in $LDFLAGS $LIBGMP; do
10373
10374 acl_save_prefix="$prefix"
10375 prefix="$acl_final_prefix"
10376 acl_save_exec_prefix="$exec_prefix"
10377 exec_prefix="$acl_final_exec_prefix"
10378 eval x=\"$x\"
10379 exec_prefix="$acl_save_exec_prefix"
10380 prefix="$acl_save_prefix"
10381
10382 if test "X$x" = "X-L$found_dir"; then
10383 haveit=yes
10384 break
10385 fi
10386 done
10387 if test -z "$haveit"; then
10388 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir"
10389 fi
10390 if test "$hardcode_minus_L" != no; then
10391 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10392 else
10393 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10394 fi
10395 fi
10396 fi
10397 fi
10398 else
10399 if test "X$found_a" != "X"; then
10400 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a"
10401 else
10402 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name"
10403 fi
10404 fi
10405 additional_includedir=
10406 case "$found_dir" in
10407 */lib | */lib/)
10408 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10409 additional_includedir="$basedir/include"
10410 ;;
10411 esac
10412 if test "X$additional_includedir" != "X"; then
10413 if test "X$additional_includedir" != "X/usr/include"; then
10414 haveit=
10415 if test "X$additional_includedir" = "X/usr/local/include"; then
10416 if test -n "$GCC"; then
10417 case $host_os in
10418 linux*) haveit=yes;;
10419 esac
10420 fi
10421 fi
10422 if test -z "$haveit"; then
10423 for x in $CPPFLAGS $INCGMP; do
10424
10425 acl_save_prefix="$prefix"
10426 prefix="$acl_final_prefix"
10427 acl_save_exec_prefix="$exec_prefix"
10428 exec_prefix="$acl_final_exec_prefix"
10429 eval x=\"$x\"
10430 exec_prefix="$acl_save_exec_prefix"
10431 prefix="$acl_save_prefix"
10432
10433 if test "X$x" = "X-I$additional_includedir"; then
10434 haveit=yes
10435 break
10436 fi
10437 done
10438 if test -z "$haveit"; then
10439 if test -d "$additional_includedir"; then
10440 INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir"
10441 fi
10442 fi
10443 fi
10444 fi
10445 fi
10446 if test -n "$found_la"; then
10447 save_libdir="$libdir"
10448 case "$found_la" in
10449 */* | *\\*) . "$found_la" ;;
10450 *) . "./$found_la" ;;
10451 esac
10452 libdir="$save_libdir"
10453 for dep in $dependency_libs; do
10454 case "$dep" in
10455 -L*)
10456 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10457 if test "X$additional_libdir" != "X/usr/lib"; then
10458 haveit=
10459 if test "X$additional_libdir" = "X/usr/local/lib"; then
10460 if test -n "$GCC"; then
10461 case $host_os in
10462 linux*) haveit=yes;;
10463 esac
10464 fi
10465 fi
10466 if test -z "$haveit"; then
10467 haveit=
10468 for x in $LDFLAGS $LIBGMP; do
10469
10470 acl_save_prefix="$prefix"
10471 prefix="$acl_final_prefix"
10472 acl_save_exec_prefix="$exec_prefix"
10473 exec_prefix="$acl_final_exec_prefix"
10474 eval x=\"$x\"
10475 exec_prefix="$acl_save_exec_prefix"
10476 prefix="$acl_save_prefix"
10477
10478 if test "X$x" = "X-L$additional_libdir"; then
10479 haveit=yes
10480 break
10481 fi
10482 done
10483 if test -z "$haveit"; then
10484 if test -d "$additional_libdir"; then
10485 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir"
10486 fi
10487 fi
10488 haveit=
10489 for x in $LDFLAGS $LTLIBGMP; do
10490
10491 acl_save_prefix="$prefix"
10492 prefix="$acl_final_prefix"
10493 acl_save_exec_prefix="$exec_prefix"
10494 exec_prefix="$acl_final_exec_prefix"
10495 eval x=\"$x\"
10496 exec_prefix="$acl_save_exec_prefix"
10497 prefix="$acl_save_prefix"
10498
10499 if test "X$x" = "X-L$additional_libdir"; then
10500 haveit=yes
10501 break
10502 fi
10503 done
10504 if test -z "$haveit"; then
10505 if test -d "$additional_libdir"; then
10506 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir"
10507 fi
10508 fi
10509 fi
10510 fi
10511 ;;
10512 -R*)
10513 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10514 if test "$enable_rpath" != no; then
10515 haveit=
10516 for x in $rpathdirs; do
10517 if test "X$x" = "X$dir"; then
10518 haveit=yes
10519 break
10520 fi
10521 done
10522 if test -z "$haveit"; then
10523 rpathdirs="$rpathdirs $dir"
10524 fi
10525 haveit=
10526 for x in $ltrpathdirs; do
10527 if test "X$x" = "X$dir"; then
10528 haveit=yes
10529 break
10530 fi
10531 done
10532 if test -z "$haveit"; then
10533 ltrpathdirs="$ltrpathdirs $dir"
10534 fi
10535 fi
10536 ;;
10537 -l*)
10538 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10539 ;;
10540 *.la)
10541 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10542 ;;
10543 *)
10544 LIBGMP="${LIBGMP}${LIBGMP:+ }$dep"
10545 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep"
10546 ;;
10547 esac
10548 done
10549 fi
10550 else
10551 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10552 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10553 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name"
10554 else
10555 LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext"
10556 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext"
10557 fi
10558 fi
10559 fi
10560 fi
10561 done
10562 done
10563 if test "X$rpathdirs" != "X"; then
10564 if test -n "$hardcode_libdir_separator"; then
10565 alldirs=
10566 for found_dir in $rpathdirs; do
10567 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10568 done
10569 acl_save_libdir="$libdir"
10570 libdir="$alldirs"
10571 eval flag=\"$hardcode_libdir_flag_spec\"
10572 libdir="$acl_save_libdir"
10573 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10574 else
10575 for found_dir in $rpathdirs; do
10576 acl_save_libdir="$libdir"
10577 libdir="$found_dir"
10578 eval flag=\"$hardcode_libdir_flag_spec\"
10579 libdir="$acl_save_libdir"
10580 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10581 done
10582 fi
10583 fi
10584 if test "X$ltrpathdirs" != "X"; then
10585 for found_dir in $ltrpathdirs; do
10586 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir"
10587 done
10588 fi
10589
10590
10591 ac_save_CPPFLAGS="$CPPFLAGS"
10592
10593 for element in $INCGMP; do
10594 haveit=
10595 for x in $CPPFLAGS; do
10596
10597 acl_save_prefix="$prefix"
10598 prefix="$acl_final_prefix"
10599 acl_save_exec_prefix="$exec_prefix"
10600 exec_prefix="$acl_final_exec_prefix"
10601 eval x=\"$x\"
10602 exec_prefix="$acl_save_exec_prefix"
10603 prefix="$acl_save_prefix"
10604
10605 if test "X$x" = "X$element"; then
10606 haveit=yes
10607 break
10608 fi
10609 done
10610 if test -z "$haveit"; then
10611 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10612 fi
10613 done
10614
10615
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5
10617 $as_echo_n "checking for libgmp... " >&6; }
10618 if ${ac_cv_libgmp+:} false; then :
10619 $as_echo_n "(cached) " >&6
10620 else
10621
10622 ac_save_LIBS="$LIBS"
10623 LIBS="$LIBS $LIBGMP"
10624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10625 /* end confdefs.h. */
10626 #include <gmp.h>
10627 int
10628 main ()
10629 {
10630 mpz_t n;
10631 mpz_init (n);
10632 ;
10633 return 0;
10634 }
10635 _ACEOF
10636 if ac_fn_c_try_link "$LINENO"; then :
10637 ac_cv_libgmp=yes
10638 else
10639 ac_cv_libgmp=no
10640 fi
10641 rm -f core conftest.err conftest.$ac_objext \
10642 conftest$ac_exeext conftest.$ac_ext
10643 LIBS="$ac_save_LIBS"
10644
10645 fi
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5
10647 $as_echo "$ac_cv_libgmp" >&6; }
10648 if test "$ac_cv_libgmp" = yes; then
10649 HAVE_LIBGMP=yes
10650
10651 $as_echo "#define HAVE_LIBGMP 1" >>confdefs.h
10652
10653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5
10654 $as_echo_n "checking how to link with libgmp... " >&6; }
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5
10656 $as_echo "$LIBGMP" >&6; }
10657 else
10658 HAVE_LIBGMP=no
10659 CPPFLAGS="$ac_save_CPPFLAGS"
10660 LIBGMP=
10661 LTLIBGMP=
10662 fi
10663
10664
10665
10666
10667
10668
10669 if test "$HAVE_LIBGMP" != yes; then
10670 as_fn_error $? "GMP is missing or unusable" "$LINENO" 5
10671 fi
10672
10673
10674 # Check whether --with-mpfr was given.
10675 if test "${with_mpfr+set}" = set; then :
10676 withval=$with_mpfr;
10677 else
10678 with_mpfr=auto
10679 fi
10680
10681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10682 $as_echo_n "checking whether to use MPFR... " >&6; }
10683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10684 $as_echo "$with_mpfr" >&6; }
10685
10686 if test "${with_mpfr}" = no; then
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10688 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10689 HAVE_LIBMPFR=no
10690 else
10691
10692
10693
10694
10695
10696
10697
10698
10699 use_additional=yes
10700
10701 acl_save_prefix="$prefix"
10702 prefix="$acl_final_prefix"
10703 acl_save_exec_prefix="$exec_prefix"
10704 exec_prefix="$acl_final_exec_prefix"
10705
10706 eval additional_includedir=\"$includedir\"
10707 eval additional_libdir=\"$libdir\"
10708
10709 exec_prefix="$acl_save_exec_prefix"
10710 prefix="$acl_save_prefix"
10711
10712
10713 # Check whether --with-libmpfr-prefix was given.
10714 if test "${with_libmpfr_prefix+set}" = set; then :
10715 withval=$with_libmpfr_prefix;
10716 if test "X$withval" = "Xno"; then
10717 use_additional=no
10718 else
10719 if test "X$withval" = "X"; then
10720
10721 acl_save_prefix="$prefix"
10722 prefix="$acl_final_prefix"
10723 acl_save_exec_prefix="$exec_prefix"
10724 exec_prefix="$acl_final_exec_prefix"
10725
10726 eval additional_includedir=\"$includedir\"
10727 eval additional_libdir=\"$libdir\"
10728
10729 exec_prefix="$acl_save_exec_prefix"
10730 prefix="$acl_save_prefix"
10731
10732 else
10733 additional_includedir="$withval/include"
10734 additional_libdir="$withval/lib"
10735 fi
10736 fi
10737
10738 fi
10739
10740
10741 # Check whether --with-libmpfr-type was given.
10742 if test "${with_libmpfr_type+set}" = set; then :
10743 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10744 else
10745 with_libmpfr_type=auto
10746 fi
10747
10748 lib_type=`eval echo \$with_libmpfr_type`
10749
10750 LIBMPFR=
10751 LTLIBMPFR=
10752 INCMPFR=
10753 rpathdirs=
10754 ltrpathdirs=
10755 names_already_handled=
10756 names_next_round='mpfr gmp'
10757 while test -n "$names_next_round"; do
10758 names_this_round="$names_next_round"
10759 names_next_round=
10760 for name in $names_this_round; do
10761 already_handled=
10762 for n in $names_already_handled; do
10763 if test "$n" = "$name"; then
10764 already_handled=yes
10765 break
10766 fi
10767 done
10768 if test -z "$already_handled"; then
10769 names_already_handled="$names_already_handled $name"
10770 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10771 eval value=\"\$HAVE_LIB$uppername\"
10772 if test -n "$value"; then
10773 if test "$value" = yes; then
10774 eval value=\"\$LIB$uppername\"
10775 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10776 eval value=\"\$LTLIB$uppername\"
10777 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10778 else
10779 :
10780 fi
10781 else
10782 found_dir=
10783 found_la=
10784 found_so=
10785 found_a=
10786 if test $use_additional = yes; then
10787 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10788 found_dir="$additional_libdir"
10789 found_so="$additional_libdir/lib$name.$shlibext"
10790 if test -f "$additional_libdir/lib$name.la"; then
10791 found_la="$additional_libdir/lib$name.la"
10792 fi
10793 elif test x$lib_type != xshared; then
10794 if test -f "$additional_libdir/lib$name.$libext"; then
10795 found_dir="$additional_libdir"
10796 found_a="$additional_libdir/lib$name.$libext"
10797 if test -f "$additional_libdir/lib$name.la"; then
10798 found_la="$additional_libdir/lib$name.la"
10799 fi
10800 fi
10801 fi
10802 fi
10803 if test "X$found_dir" = "X"; then
10804 for x in $LDFLAGS $LTLIBMPFR; do
10805
10806 acl_save_prefix="$prefix"
10807 prefix="$acl_final_prefix"
10808 acl_save_exec_prefix="$exec_prefix"
10809 exec_prefix="$acl_final_exec_prefix"
10810 eval x=\"$x\"
10811 exec_prefix="$acl_save_exec_prefix"
10812 prefix="$acl_save_prefix"
10813
10814 case "$x" in
10815 -L*)
10816 dir=`echo "X$x" | sed -e 's/^X-L//'`
10817 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10818 found_dir="$dir"
10819 found_so="$dir/lib$name.$shlibext"
10820 if test -f "$dir/lib$name.la"; then
10821 found_la="$dir/lib$name.la"
10822 fi
10823 elif test x$lib_type != xshared; then
10824 if test -f "$dir/lib$name.$libext"; then
10825 found_dir="$dir"
10826 found_a="$dir/lib$name.$libext"
10827 if test -f "$dir/lib$name.la"; then
10828 found_la="$dir/lib$name.la"
10829 fi
10830 fi
10831 fi
10832 ;;
10833 esac
10834 if test "X$found_dir" != "X"; then
10835 break
10836 fi
10837 done
10838 fi
10839 if test "X$found_dir" != "X"; then
10840 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10841 if test "X$found_so" != "X"; then
10842 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10843 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10844 else
10845 haveit=
10846 for x in $ltrpathdirs; do
10847 if test "X$x" = "X$found_dir"; then
10848 haveit=yes
10849 break
10850 fi
10851 done
10852 if test -z "$haveit"; then
10853 ltrpathdirs="$ltrpathdirs $found_dir"
10854 fi
10855 if test "$hardcode_direct" = yes; then
10856 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10857 else
10858 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10859 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10860 haveit=
10861 for x in $rpathdirs; do
10862 if test "X$x" = "X$found_dir"; then
10863 haveit=yes
10864 break
10865 fi
10866 done
10867 if test -z "$haveit"; then
10868 rpathdirs="$rpathdirs $found_dir"
10869 fi
10870 else
10871 haveit=
10872 for x in $LDFLAGS $LIBMPFR; do
10873
10874 acl_save_prefix="$prefix"
10875 prefix="$acl_final_prefix"
10876 acl_save_exec_prefix="$exec_prefix"
10877 exec_prefix="$acl_final_exec_prefix"
10878 eval x=\"$x\"
10879 exec_prefix="$acl_save_exec_prefix"
10880 prefix="$acl_save_prefix"
10881
10882 if test "X$x" = "X-L$found_dir"; then
10883 haveit=yes
10884 break
10885 fi
10886 done
10887 if test -z "$haveit"; then
10888 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10889 fi
10890 if test "$hardcode_minus_L" != no; then
10891 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10892 else
10893 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10894 fi
10895 fi
10896 fi
10897 fi
10898 else
10899 if test "X$found_a" != "X"; then
10900 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10901 else
10902 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10903 fi
10904 fi
10905 additional_includedir=
10906 case "$found_dir" in
10907 */lib | */lib/)
10908 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10909 additional_includedir="$basedir/include"
10910 ;;
10911 esac
10912 if test "X$additional_includedir" != "X"; then
10913 if test "X$additional_includedir" != "X/usr/include"; then
10914 haveit=
10915 if test "X$additional_includedir" = "X/usr/local/include"; then
10916 if test -n "$GCC"; then
10917 case $host_os in
10918 linux*) haveit=yes;;
10919 esac
10920 fi
10921 fi
10922 if test -z "$haveit"; then
10923 for x in $CPPFLAGS $INCMPFR; do
10924
10925 acl_save_prefix="$prefix"
10926 prefix="$acl_final_prefix"
10927 acl_save_exec_prefix="$exec_prefix"
10928 exec_prefix="$acl_final_exec_prefix"
10929 eval x=\"$x\"
10930 exec_prefix="$acl_save_exec_prefix"
10931 prefix="$acl_save_prefix"
10932
10933 if test "X$x" = "X-I$additional_includedir"; then
10934 haveit=yes
10935 break
10936 fi
10937 done
10938 if test -z "$haveit"; then
10939 if test -d "$additional_includedir"; then
10940 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10941 fi
10942 fi
10943 fi
10944 fi
10945 fi
10946 if test -n "$found_la"; then
10947 save_libdir="$libdir"
10948 case "$found_la" in
10949 */* | *\\*) . "$found_la" ;;
10950 *) . "./$found_la" ;;
10951 esac
10952 libdir="$save_libdir"
10953 for dep in $dependency_libs; do
10954 case "$dep" in
10955 -L*)
10956 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10957 if test "X$additional_libdir" != "X/usr/lib"; then
10958 haveit=
10959 if test "X$additional_libdir" = "X/usr/local/lib"; then
10960 if test -n "$GCC"; then
10961 case $host_os in
10962 linux*) haveit=yes;;
10963 esac
10964 fi
10965 fi
10966 if test -z "$haveit"; then
10967 haveit=
10968 for x in $LDFLAGS $LIBMPFR; do
10969
10970 acl_save_prefix="$prefix"
10971 prefix="$acl_final_prefix"
10972 acl_save_exec_prefix="$exec_prefix"
10973 exec_prefix="$acl_final_exec_prefix"
10974 eval x=\"$x\"
10975 exec_prefix="$acl_save_exec_prefix"
10976 prefix="$acl_save_prefix"
10977
10978 if test "X$x" = "X-L$additional_libdir"; then
10979 haveit=yes
10980 break
10981 fi
10982 done
10983 if test -z "$haveit"; then
10984 if test -d "$additional_libdir"; then
10985 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10986 fi
10987 fi
10988 haveit=
10989 for x in $LDFLAGS $LTLIBMPFR; do
10990
10991 acl_save_prefix="$prefix"
10992 prefix="$acl_final_prefix"
10993 acl_save_exec_prefix="$exec_prefix"
10994 exec_prefix="$acl_final_exec_prefix"
10995 eval x=\"$x\"
10996 exec_prefix="$acl_save_exec_prefix"
10997 prefix="$acl_save_prefix"
10998
10999 if test "X$x" = "X-L$additional_libdir"; then
11000 haveit=yes
11001 break
11002 fi
11003 done
11004 if test -z "$haveit"; then
11005 if test -d "$additional_libdir"; then
11006 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
11007 fi
11008 fi
11009 fi
11010 fi
11011 ;;
11012 -R*)
11013 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11014 if test "$enable_rpath" != no; then
11015 haveit=
11016 for x in $rpathdirs; do
11017 if test "X$x" = "X$dir"; then
11018 haveit=yes
11019 break
11020 fi
11021 done
11022 if test -z "$haveit"; then
11023 rpathdirs="$rpathdirs $dir"
11024 fi
11025 haveit=
11026 for x in $ltrpathdirs; do
11027 if test "X$x" = "X$dir"; then
11028 haveit=yes
11029 break
11030 fi
11031 done
11032 if test -z "$haveit"; then
11033 ltrpathdirs="$ltrpathdirs $dir"
11034 fi
11035 fi
11036 ;;
11037 -l*)
11038 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11039 ;;
11040 *.la)
11041 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11042 ;;
11043 *)
11044 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
11045 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
11046 ;;
11047 esac
11048 done
11049 fi
11050 else
11051 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
11052 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
11053 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
11054 else
11055 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
11056 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
11057 fi
11058 fi
11059 fi
11060 fi
11061 done
11062 done
11063 if test "X$rpathdirs" != "X"; then
11064 if test -n "$hardcode_libdir_separator"; then
11065 alldirs=
11066 for found_dir in $rpathdirs; do
11067 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11068 done
11069 acl_save_libdir="$libdir"
11070 libdir="$alldirs"
11071 eval flag=\"$hardcode_libdir_flag_spec\"
11072 libdir="$acl_save_libdir"
11073 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
11074 else
11075 for found_dir in $rpathdirs; do
11076 acl_save_libdir="$libdir"
11077 libdir="$found_dir"
11078 eval flag=\"$hardcode_libdir_flag_spec\"
11079 libdir="$acl_save_libdir"
11080 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
11081 done
11082 fi
11083 fi
11084 if test "X$ltrpathdirs" != "X"; then
11085 for found_dir in $ltrpathdirs; do
11086 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
11087 done
11088 fi
11089
11090
11091 ac_save_CPPFLAGS="$CPPFLAGS"
11092
11093 for element in $INCMPFR; do
11094 haveit=
11095 for x in $CPPFLAGS; do
11096
11097 acl_save_prefix="$prefix"
11098 prefix="$acl_final_prefix"
11099 acl_save_exec_prefix="$exec_prefix"
11100 exec_prefix="$acl_final_exec_prefix"
11101 eval x=\"$x\"
11102 exec_prefix="$acl_save_exec_prefix"
11103 prefix="$acl_save_prefix"
11104
11105 if test "X$x" = "X$element"; then
11106 haveit=yes
11107 break
11108 fi
11109 done
11110 if test -z "$haveit"; then
11111 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11112 fi
11113 done
11114
11115
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
11117 $as_echo_n "checking for libmpfr... " >&6; }
11118 if ${ac_cv_libmpfr+:} false; then :
11119 $as_echo_n "(cached) " >&6
11120 else
11121
11122 ac_save_LIBS="$LIBS"
11123 LIBS="$LIBS $LIBMPFR"
11124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11125 /* end confdefs.h. */
11126 #include <mpfr.h>
11127 int
11128 main ()
11129 {
11130 mpfr_exp_t exp; mpfr_t x;
11131 mpfr_frexp (&exp, x, x, MPFR_RNDN);
11132 ;
11133 return 0;
11134 }
11135 _ACEOF
11136 if ac_fn_c_try_link "$LINENO"; then :
11137 ac_cv_libmpfr=yes
11138 else
11139 ac_cv_libmpfr=no
11140 fi
11141 rm -f core conftest.err conftest.$ac_objext \
11142 conftest$ac_exeext conftest.$ac_ext
11143 LIBS="$ac_save_LIBS"
11144
11145 fi
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
11147 $as_echo "$ac_cv_libmpfr" >&6; }
11148 if test "$ac_cv_libmpfr" = yes; then
11149 HAVE_LIBMPFR=yes
11150
11151 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
11152
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
11154 $as_echo_n "checking how to link with libmpfr... " >&6; }
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
11156 $as_echo "$LIBMPFR" >&6; }
11157 else
11158 HAVE_LIBMPFR=no
11159 CPPFLAGS="$ac_save_CPPFLAGS"
11160 LIBMPFR=
11161 LTLIBMPFR=
11162 fi
11163
11164
11165
11166
11167
11168
11169 if test "$HAVE_LIBMPFR" != yes; then
11170 if test "$with_mpfr" = yes; then
11171 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
11172 else
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
11174 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
11175 fi
11176 fi
11177 fi
11178
11179 # --------------------- #
11180 # Check for libpython. #
11181 # --------------------- #
11182
11183
11184
11185
11186
11187
11188 # Check whether --with-python was given.
11189 if test "${with_python+set}" = set; then :
11190 withval=$with_python;
11191 else
11192 with_python=auto
11193 fi
11194
11195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
11196 $as_echo_n "checking whether to use python... " >&6; }
11197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
11198 $as_echo "$with_python" >&6; }
11199
11200 if test "${with_python}" = no; then
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11202 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11203 have_libpython=no
11204 else
11205 case "${with_python}" in
11206 [\\/]* | ?:[\\/]*)
11207 if test -d "${with_python}"; then
11208 # Assume the python binary is ${with_python}/bin/python.
11209 python_prog="${with_python}/bin/python"
11210 python_prefix=
11211 # If python does not exit ${with_python}/bin, then try in
11212 # ${with_python}. On Windows/MinGW, this is where the Python
11213 # executable is.
11214 if test ! -x "${python_prog}"; then
11215 python_prog="${with_python}/python"
11216 python_prefix=
11217 fi
11218 if test ! -x "${python_prog}"; then
11219 # Fall back to gdb 7.0/7.1 behaviour.
11220 python_prog=missing
11221 python_prefix=${with_python}
11222 fi
11223 elif test -x "${with_python}"; then
11224 # While we can't run python compiled for $host (unless host == build),
11225 # the user could write a script that provides the needed information,
11226 # so we support that.
11227 python_prog=${with_python}
11228 python_prefix=
11229 else
11230 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11231 fi
11232 ;;
11233 */*)
11234 # Disallow --with-python=foo/bar.
11235 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11236 ;;
11237 *)
11238 # The user has either specified auto, yes, or the name of the python
11239 # program assumed to be in $PATH.
11240 python_prefix=
11241 case "${with_python}" in
11242 yes | auto)
11243 if test "${build}" = "${host}"; then
11244 # Look first for 'python', then 'python3'.
11245 for ac_prog in python python3
11246 do
11247 # Extract the first word of "$ac_prog", so it can be a program name with args.
11248 set dummy $ac_prog; ac_word=$2
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11250 $as_echo_n "checking for $ac_word... " >&6; }
11251 if ${ac_cv_path_python_prog_path+:} false; then :
11252 $as_echo_n "(cached) " >&6
11253 else
11254 case $python_prog_path in
11255 [\\/]* | ?:[\\/]*)
11256 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11257 ;;
11258 *)
11259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11260 for as_dir in $PATH
11261 do
11262 IFS=$as_save_IFS
11263 test -z "$as_dir" && as_dir=.
11264 for ac_exec_ext in '' $ac_executable_extensions; do
11265 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11266 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11268 break 2
11269 fi
11270 done
11271 done
11272 IFS=$as_save_IFS
11273
11274 ;;
11275 esac
11276 fi
11277 python_prog_path=$ac_cv_path_python_prog_path
11278 if test -n "$python_prog_path"; then
11279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11280 $as_echo "$python_prog_path" >&6; }
11281 else
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283 $as_echo "no" >&6; }
11284 fi
11285
11286
11287 test -n "$python_prog_path" && break
11288 done
11289 test -n "$python_prog_path" || python_prog_path="missing"
11290
11291 if test "${python_prog_path}" = missing; then
11292 python_prog=missing
11293 else
11294 python_prog=${python_prog_path}
11295 fi
11296 else
11297 # Not much we can do except assume the cross-compiler will find the
11298 # right files.
11299 python_prog=missing
11300 fi
11301 ;;
11302 *)
11303 # While we can't run python compiled for $host (unless host == build),
11304 # the user could write a script that provides the needed information,
11305 # so we support that.
11306 python_prog="${with_python}"
11307 # Extract the first word of "${python_prog}", so it can be a program name with args.
11308 set dummy ${python_prog}; ac_word=$2
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11310 $as_echo_n "checking for $ac_word... " >&6; }
11311 if ${ac_cv_path_python_prog_path+:} false; then :
11312 $as_echo_n "(cached) " >&6
11313 else
11314 case $python_prog_path in
11315 [\\/]* | ?:[\\/]*)
11316 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11317 ;;
11318 *)
11319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11320 for as_dir in $PATH
11321 do
11322 IFS=$as_save_IFS
11323 test -z "$as_dir" && as_dir=.
11324 for ac_exec_ext in '' $ac_executable_extensions; do
11325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11326 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11328 break 2
11329 fi
11330 done
11331 done
11332 IFS=$as_save_IFS
11333
11334 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11335 ;;
11336 esac
11337 fi
11338 python_prog_path=$ac_cv_path_python_prog_path
11339 if test -n "$python_prog_path"; then
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11341 $as_echo "$python_prog_path" >&6; }
11342 else
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344 $as_echo "no" >&6; }
11345 fi
11346
11347
11348 if test "${python_prog_path}" = missing; then
11349 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
11350 fi
11351 ;;
11352 esac
11353 esac
11354
11355 if test "${python_prog}" != missing; then
11356 # We have a python program to use, but it may be too old.
11357 # Don't flag an error for --with-python=auto (the default).
11358 have_python_config=yes
11359 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11360 if test $? != 0; then
11361 have_python_config=failed
11362 if test "${with_python}" != auto; then
11363 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
11364 fi
11365 fi
11366 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11367 if test $? != 0; then
11368 have_python_config=failed
11369 if test "${with_python}" != auto; then
11370 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
11371 fi
11372 fi
11373 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11374 if test $? != 0; then
11375 have_python_config=failed
11376 if test "${with_python}" != auto; then
11377 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
11378 fi
11379 fi
11380 else
11381 # We do not have a python executable we can use to determine where
11382 # to find the Python headers and libs. We cannot guess the include
11383 # path from the python_prefix either, because that include path
11384 # depends on the Python version. So, there is nothing much we can
11385 # do except assume that the compiler will be able to find those files.
11386 python_includes=
11387 python_libs=
11388 have_python_config=no
11389 fi
11390
11391 # If we have python-config, only try the configuration it provides.
11392 # Otherwise fallback on the old way of trying different versions of
11393 # python in turn.
11394
11395 have_libpython=no
11396 if test "${have_python_config}" = yes; then
11397
11398
11399 new_CPPFLAGS=${python_includes}
11400 new_LIBS=${python_libs}
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11402 $as_echo_n "checking for python... " >&6; }
11403 save_CPPFLAGS=$CPPFLAGS
11404 save_LIBS=$LIBS
11405 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11406 LIBS="$new_LIBS $LIBS"
11407 found_usable_python=no
11408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11409 /* end confdefs.h. */
11410 #include "Python.h"
11411 int
11412 main ()
11413 {
11414
11415 #if PY_MAJOR_VERSION != 3
11416 # error "We only support Python 3"
11417 #endif
11418 Py_Initialize ();
11419
11420 ;
11421 return 0;
11422 }
11423 _ACEOF
11424 if ac_fn_c_try_link "$LINENO"; then :
11425 have_libpython=yes
11426 found_usable_python=yes
11427 PYTHON_CPPFLAGS=$new_CPPFLAGS
11428 PYTHON_LIBS=$new_LIBS
11429 fi
11430 rm -f core conftest.err conftest.$ac_objext \
11431 conftest$ac_exeext conftest.$ac_ext
11432 CPPFLAGS=$save_CPPFLAGS
11433 LIBS=$save_LIBS
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11435 $as_echo "${found_usable_python}" >&6; }
11436
11437 fi
11438
11439 if test "${have_libpython}" = no; then
11440 case "${with_python}" in
11441 yes)
11442 as_fn_error $? "python is missing or unusable" "$LINENO" 5
11443 ;;
11444 auto)
11445 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11446 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11447 ;;
11448 *)
11449 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
11450 ;;
11451 esac
11452 else
11453 if test -n "${python_prefix}"; then
11454
11455 cat >>confdefs.h <<_ACEOF
11456 #define WITH_PYTHON_PATH "${python_prefix}"
11457 _ACEOF
11458
11459
11460 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11461 if test "x$prefix" = xNONE; then
11462 test_prefix=/usr/local
11463 else
11464 test_prefix=$prefix
11465 fi
11466 else
11467 test_prefix=$exec_prefix
11468 fi
11469 value=0
11470 case ${python_prefix} in
11471 "${test_prefix}"|"${test_prefix}/"*|\
11472 '${exec_prefix}'|'${exec_prefix}/'*)
11473 value=1
11474 ;;
11475 esac
11476
11477 cat >>confdefs.h <<_ACEOF
11478 #define PYTHON_PATH_RELOCATABLE $value
11479 _ACEOF
11480
11481
11482 fi
11483 fi
11484 fi
11485
11486
11487 # Check whether --with-python-libdir was given.
11488 if test "${with_python_libdir+set}" = set; then :
11489 withval=$with_python_libdir;
11490 else
11491
11492 # If no python libdir is specified then select one based on
11493 # python's prefix path.
11494 if test -n "${python_prefix}"; then
11495 with_python_libdir=${python_prefix}/lib
11496 fi
11497
11498 fi
11499
11500
11501 if test "${have_libpython}" != no; then
11502
11503 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
11504
11505 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11506 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11507 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11508 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
11509 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11510
11511 if test -n "${with_python_libdir}"; then
11512
11513 cat >>confdefs.h <<_ACEOF
11514 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
11515 _ACEOF
11516
11517
11518 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11519 if test "x$prefix" = xNONE; then
11520 test_prefix=/usr/local
11521 else
11522 test_prefix=$prefix
11523 fi
11524 else
11525 test_prefix=$exec_prefix
11526 fi
11527 value=0
11528 case ${with_python_libdir} in
11529 "${test_prefix}"|"${test_prefix}/"*|\
11530 '${exec_prefix}'|'${exec_prefix}/'*)
11531 value=1
11532 ;;
11533 esac
11534
11535 cat >>confdefs.h <<_ACEOF
11536 #define PYTHON_LIBDIR_RELOCATABLE $value
11537 _ACEOF
11538
11539
11540 fi
11541
11542 # Flags needed to compile Python code (taken from python-config --cflags).
11543 # We cannot call python-config directly because it will output whatever was
11544 # used when compiling the Python interpreter itself, including flags which
11545 # would make the python-related objects be compiled differently from the
11546 # rest of GDB (e.g., -O2 and -fPIC).
11547 if test "${GCC}" = yes; then
11548 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11549 # Python headers recommend -DNDEBUG, but it's unclear if that just
11550 # refers to building Python itself. In release mode, though, it
11551 # doesn't hurt for the Python code in gdb to follow.
11552 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
11553 fi
11554
11555 if test "x${tentative_python_cflags}" != x; then
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11557 $as_echo_n "checking compiler flags for python code... " >&6; }
11558 for flag in ${tentative_python_cflags}; do
11559 # Check that the compiler accepts it
11560 saved_CFLAGS="$CFLAGS"
11561 CFLAGS="$CFLAGS $flag"
11562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11563 /* end confdefs.h. */
11564
11565 int
11566 main ()
11567 {
11568
11569 ;
11570 return 0;
11571 }
11572 _ACEOF
11573 if ac_fn_c_try_compile "$LINENO"; then :
11574 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11575 fi
11576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11577 CFLAGS="$saved_CFLAGS"
11578 done
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11580 $as_echo "${PYTHON_CFLAGS}" >&6; }
11581 fi
11582
11583 # On x64 Windows, Python's include headers, and pyconfig.h in
11584 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11585 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11586 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11587 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11588 # The issue was reported to the Python community, but still isn't
11589 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11590
11591 case "$gdb_host" in
11592 mingw64)
11593 if test "${GCC}" = yes; then
11594 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11595 fi
11596 ;;
11597 esac
11598 else
11599 # Even if Python support is not compiled in, we need to have this file
11600 # included so that the "python" command, et.al., still exists.
11601 CONFIG_OBS="$CONFIG_OBS python/python.o"
11602 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11603 fi
11604
11605 # Work around Python http://bugs.python.org/issue10112. See also
11606 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11607 # no effect. Note that the only test after this that uses Python is
11608 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11609 # run without -export-dynamic too.
11610 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11611
11612
11613
11614
11615 if test "${have_libpython}" != no; then
11616 HAVE_PYTHON_TRUE=
11617 HAVE_PYTHON_FALSE='#'
11618 else
11619 HAVE_PYTHON_TRUE='#'
11620 HAVE_PYTHON_FALSE=
11621 fi
11622
11623
11624 # -------------------- #
11625 # Check for libguile. #
11626 # -------------------- #
11627
11628
11629
11630
11631
11632
11633 # Check whether --with-guile was given.
11634 if test "${with_guile+set}" = set; then :
11635 withval=$with_guile;
11636 else
11637 with_guile=auto
11638 fi
11639
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11641 $as_echo_n "checking whether to use guile... " >&6; }
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11643 $as_echo "$with_guile" >&6; }
11644
11645 # Extract the first word of "pkg-config", so it can be a program name with args.
11646 set dummy pkg-config; ac_word=$2
11647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11648 $as_echo_n "checking for $ac_word... " >&6; }
11649 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11650 $as_echo_n "(cached) " >&6
11651 else
11652 case $pkg_config_prog_path in
11653 [\\/]* | ?:[\\/]*)
11654 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11655 ;;
11656 *)
11657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11658 for as_dir in $PATH
11659 do
11660 IFS=$as_save_IFS
11661 test -z "$as_dir" && as_dir=.
11662 for ac_exec_ext in '' $ac_executable_extensions; do
11663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11664 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11666 break 2
11667 fi
11668 done
11669 done
11670 IFS=$as_save_IFS
11671
11672 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11673 ;;
11674 esac
11675 fi
11676 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11677 if test -n "$pkg_config_prog_path"; then
11678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11679 $as_echo "$pkg_config_prog_path" >&6; }
11680 else
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682 $as_echo "no" >&6; }
11683 fi
11684
11685
11686
11687 try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11688 have_libguile=no
11689 case "${with_guile}" in
11690 no)
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11692 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11693 ;;
11694 auto)
11695 if test "${pkg_config_prog_path}" = "missing"; then
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11697 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11698 else
11699
11700 pkg_config=${pkg_config_prog_path}
11701 guile_version_list=${try_guile_versions}
11702 flag_errors=no
11703
11704 found_usable_guile=checking
11705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11706 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11707 for guile_version in ${guile_version_list}; do
11708 ${pkg_config} --exists ${guile_version} 2>/dev/null
11709 if test $? != 0; then
11710 continue
11711 fi
11712 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11713 if test $? != 0; then
11714 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11715 fi
11716 new_LIBS=`${pkg_config} --libs ${guile_version}`
11717 if test $? != 0; then
11718 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11719 fi
11720 found_usable_guile=${guile_version}
11721 break
11722 done
11723 if test "${found_usable_guile}" = "checking"; then
11724 if test "${flag_errors}" = "yes"; then
11725 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11726 else
11727 found_usable_guile=no
11728 fi
11729 fi
11730 if test "${found_usable_guile}" != no; then
11731 save_CPPFLAGS=$CPPFLAGS
11732 save_LIBS=$LIBS
11733 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11734 LIBS="$LIBS $new_LIBS"
11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11736 /* end confdefs.h. */
11737 #include "libguile.h"
11738 int
11739 main ()
11740 {
11741 scm_init_guile ();
11742 ;
11743 return 0;
11744 }
11745 _ACEOF
11746 if ac_fn_c_try_link "$LINENO"; then :
11747 have_libguile=yes
11748 GUILE_CPPFLAGS=$new_CPPFLAGS
11749 GUILE_LIBS=$new_LIBS
11750 else
11751 found_usable_guile=no
11752 fi
11753 rm -f core conftest.err conftest.$ac_objext \
11754 conftest$ac_exeext conftest.$ac_ext
11755 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11756 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11757
11758 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11759
11760
11761 fi
11762
11763 CPPFLAGS=$save_CPPFLAGS
11764 LIBS=$save_LIBS
11765 if test "${found_usable_guile}" = no; then
11766 if test "${flag_errors}" = yes; then
11767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11768 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11769 as_fn_error $? "linking guile version ${guile_version} test program failed
11770 See \`config.log' for more details" "$LINENO" 5; }
11771 fi
11772 fi
11773 fi
11774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11775 $as_echo "${found_usable_guile}" >&6; }
11776
11777 fi
11778 ;;
11779 yes)
11780 if test "${pkg_config_prog_path}" = "missing"; then
11781 as_fn_error $? "pkg-config not found" "$LINENO" 5
11782 fi
11783
11784 pkg_config=${pkg_config_prog_path}
11785 guile_version_list=${try_guile_versions}
11786 flag_errors=yes
11787
11788 found_usable_guile=checking
11789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11790 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11791 for guile_version in ${guile_version_list}; do
11792 ${pkg_config} --exists ${guile_version} 2>/dev/null
11793 if test $? != 0; then
11794 continue
11795 fi
11796 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11797 if test $? != 0; then
11798 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11799 fi
11800 new_LIBS=`${pkg_config} --libs ${guile_version}`
11801 if test $? != 0; then
11802 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11803 fi
11804 found_usable_guile=${guile_version}
11805 break
11806 done
11807 if test "${found_usable_guile}" = "checking"; then
11808 if test "${flag_errors}" = "yes"; then
11809 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11810 else
11811 found_usable_guile=no
11812 fi
11813 fi
11814 if test "${found_usable_guile}" != no; then
11815 save_CPPFLAGS=$CPPFLAGS
11816 save_LIBS=$LIBS
11817 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11818 LIBS="$LIBS $new_LIBS"
11819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11820 /* end confdefs.h. */
11821 #include "libguile.h"
11822 int
11823 main ()
11824 {
11825 scm_init_guile ();
11826 ;
11827 return 0;
11828 }
11829 _ACEOF
11830 if ac_fn_c_try_link "$LINENO"; then :
11831 have_libguile=yes
11832 GUILE_CPPFLAGS=$new_CPPFLAGS
11833 GUILE_LIBS=$new_LIBS
11834 else
11835 found_usable_guile=no
11836 fi
11837 rm -f core conftest.err conftest.$ac_objext \
11838 conftest$ac_exeext conftest.$ac_ext
11839 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11840 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11841
11842 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11843
11844
11845 fi
11846
11847 CPPFLAGS=$save_CPPFLAGS
11848 LIBS=$save_LIBS
11849 if test "${found_usable_guile}" = no; then
11850 if test "${flag_errors}" = yes; then
11851 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11852 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11853 as_fn_error $? "linking guile version ${guile_version} test program failed
11854 See \`config.log' for more details" "$LINENO" 5; }
11855 fi
11856 fi
11857 fi
11858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11859 $as_echo "${found_usable_guile}" >&6; }
11860
11861 ;;
11862 [\\/]* | ?:[\\/]*)
11863 if test -x "${with_guile}"; then
11864
11865 pkg_config=${with_guile}
11866 guile_version_list=${try_guile_versions}
11867 flag_errors=yes
11868
11869 found_usable_guile=checking
11870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11871 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11872 for guile_version in ${guile_version_list}; do
11873 ${pkg_config} --exists ${guile_version} 2>/dev/null
11874 if test $? != 0; then
11875 continue
11876 fi
11877 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11878 if test $? != 0; then
11879 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11880 fi
11881 new_LIBS=`${pkg_config} --libs ${guile_version}`
11882 if test $? != 0; then
11883 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11884 fi
11885 found_usable_guile=${guile_version}
11886 break
11887 done
11888 if test "${found_usable_guile}" = "checking"; then
11889 if test "${flag_errors}" = "yes"; then
11890 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11891 else
11892 found_usable_guile=no
11893 fi
11894 fi
11895 if test "${found_usable_guile}" != no; then
11896 save_CPPFLAGS=$CPPFLAGS
11897 save_LIBS=$LIBS
11898 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11899 LIBS="$LIBS $new_LIBS"
11900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11901 /* end confdefs.h. */
11902 #include "libguile.h"
11903 int
11904 main ()
11905 {
11906 scm_init_guile ();
11907 ;
11908 return 0;
11909 }
11910 _ACEOF
11911 if ac_fn_c_try_link "$LINENO"; then :
11912 have_libguile=yes
11913 GUILE_CPPFLAGS=$new_CPPFLAGS
11914 GUILE_LIBS=$new_LIBS
11915 else
11916 found_usable_guile=no
11917 fi
11918 rm -f core conftest.err conftest.$ac_objext \
11919 conftest$ac_exeext conftest.$ac_ext
11920 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11921 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11922
11923 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11924
11925
11926 fi
11927
11928 CPPFLAGS=$save_CPPFLAGS
11929 LIBS=$save_LIBS
11930 if test "${found_usable_guile}" = no; then
11931 if test "${flag_errors}" = yes; then
11932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11933 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11934 as_fn_error $? "linking guile version ${guile_version} test program failed
11935 See \`config.log' for more details" "$LINENO" 5; }
11936 fi
11937 fi
11938 fi
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11940 $as_echo "${found_usable_guile}" >&6; }
11941
11942 else
11943 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11944 fi
11945 ;;
11946 "" | */*)
11947 # Disallow --with=guile="" and --with-guile=foo/bar.
11948 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11949 ;;
11950 *)
11951 # A space separate list of guile versions to try, in order.
11952 if test "${pkg_config_prog_path}" = "missing"; then
11953 as_fn_error $? "pkg-config not found" "$LINENO" 5
11954 fi
11955
11956 pkg_config=${pkg_config_prog_path}
11957 guile_version_list=${with_guile}
11958 flag_errors=yes
11959
11960 found_usable_guile=checking
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11962 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11963 for guile_version in ${guile_version_list}; do
11964 ${pkg_config} --exists ${guile_version} 2>/dev/null
11965 if test $? != 0; then
11966 continue
11967 fi
11968 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11969 if test $? != 0; then
11970 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11971 fi
11972 new_LIBS=`${pkg_config} --libs ${guile_version}`
11973 if test $? != 0; then
11974 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11975 fi
11976 found_usable_guile=${guile_version}
11977 break
11978 done
11979 if test "${found_usable_guile}" = "checking"; then
11980 if test "${flag_errors}" = "yes"; then
11981 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11982 else
11983 found_usable_guile=no
11984 fi
11985 fi
11986 if test "${found_usable_guile}" != no; then
11987 save_CPPFLAGS=$CPPFLAGS
11988 save_LIBS=$LIBS
11989 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11990 LIBS="$LIBS $new_LIBS"
11991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11992 /* end confdefs.h. */
11993 #include "libguile.h"
11994 int
11995 main ()
11996 {
11997 scm_init_guile ();
11998 ;
11999 return 0;
12000 }
12001 _ACEOF
12002 if ac_fn_c_try_link "$LINENO"; then :
12003 have_libguile=yes
12004 GUILE_CPPFLAGS=$new_CPPFLAGS
12005 GUILE_LIBS=$new_LIBS
12006 else
12007 found_usable_guile=no
12008 fi
12009 rm -f core conftest.err conftest.$ac_objext \
12010 conftest$ac_exeext conftest.$ac_ext
12011 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
12012 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
12013
12014 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
12015
12016
12017 fi
12018
12019 CPPFLAGS=$save_CPPFLAGS
12020 LIBS=$save_LIBS
12021 if test "${found_usable_guile}" = no; then
12022 if test "${flag_errors}" = yes; then
12023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12024 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12025 as_fn_error $? "linking guile version ${guile_version} test program failed
12026 See \`config.log' for more details" "$LINENO" 5; }
12027 fi
12028 fi
12029 fi
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
12031 $as_echo "${found_usable_guile}" >&6; }
12032
12033 ;;
12034 esac
12035
12036 if test "${have_libguile}" != no; then
12037 case "${with_guile}" in
12038 [\\/]* | ?:[\\/]*)
12039
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
12041 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
12042 if ${ac_cv_guild_program_name+:} false; then :
12043 $as_echo_n "(cached) " >&6
12044 else
12045 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
12046
12047 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
12048 # the 'guild' and 'bindir' variables. In that case, try to guess
12049 # what the program name is, at the risk of getting it wrong if
12050 # Guile was configured with '--program-suffix' or similar.
12051 if test "x$ac_cv_guild_program_name" = "x"; then
12052 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
12053 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
12054 fi
12055
12056 fi
12057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
12058 $as_echo "$ac_cv_guild_program_name" >&6; }
12059
12060 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
12061 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
12062 fi
12063
12064 GUILD="$ac_cv_guild_program_name"
12065
12066
12067 ;;
12068 *)
12069
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
12071 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
12072 if ${ac_cv_guild_program_name+:} false; then :
12073 $as_echo_n "(cached) " >&6
12074 else
12075 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
12076
12077 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
12078 # the 'guild' and 'bindir' variables. In that case, try to guess
12079 # what the program name is, at the risk of getting it wrong if
12080 # Guile was configured with '--program-suffix' or similar.
12081 if test "x$ac_cv_guild_program_name" = "x"; then
12082 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
12083 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
12084 fi
12085
12086 fi
12087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
12088 $as_echo "$ac_cv_guild_program_name" >&6; }
12089
12090 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
12091 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
12092 fi
12093
12094 GUILD="$ac_cv_guild_program_name"
12095
12096
12097 ;;
12098 esac
12099
12100
12101 if test "$cross_compiling" = no; then
12102 GUILD_TARGET_FLAG=
12103 else
12104 GUILD_TARGET_FLAG="--target=$host"
12105 fi
12106
12107
12108
12109
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
12111 $as_echo_n "checking whether guild supports this host... " >&6; }
12112 if ${ac_cv_guild_ok+:} false; then :
12113 $as_echo_n "(cached) " >&6
12114 else
12115 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
12116 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
12117 ac_cv_guild_ok=yes
12118 else
12119 ac_cv_guild_ok=no
12120 fi
12121 fi
12122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
12123 $as_echo "$ac_cv_guild_ok" >&6; }
12124
12125 if test "$ac_cv_guild_ok" = no; then
12126 have_libguile=no
12127 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
12128 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
12129 fi
12130 fi
12131
12132 if test "${have_libguile}" != no; then
12133
12134 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
12135
12136 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
12137 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
12138 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
12139 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
12140 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
12141
12142 save_LIBS="$LIBS"
12143 save_CPPFLAGS="$CPPFLAGS"
12144 LIBS="$GUILE_LIBS"
12145 CPPFLAGS="$GUILE_CPPFLAGS"
12146 for ac_func in scm_new_smob
12147 do :
12148 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
12149 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
12150 cat >>confdefs.h <<_ACEOF
12151 #define HAVE_SCM_NEW_SMOB 1
12152 _ACEOF
12153
12154 fi
12155 done
12156
12157 LIBS="$save_LIBS"
12158 CPPFLAGS="$save_CPPFLAGS"
12159 else
12160 # Even if Guile support is not compiled in, we need to have these files
12161 # included.
12162 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
12163 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
12164 fi
12165
12166
12167 if test "${have_libguile}" != no; then
12168 HAVE_GUILE_TRUE=
12169 HAVE_GUILE_FALSE='#'
12170 else
12171 HAVE_GUILE_TRUE='#'
12172 HAVE_GUILE_FALSE=
12173 fi
12174
12175
12176 # ---------------------------- #
12177 # Check for source highlight. #
12178 # ---------------------------- #
12179
12180 SRCHIGH_LIBS=
12181 SRCHIGH_CFLAGS=
12182
12183 # Check whether --enable-source-highlight was given.
12184 if test "${enable_source_highlight+set}" = set; then :
12185 enableval=$enable_source_highlight;
12186 case $enableval in
12187 yes | no | auto)
12188 ;;
12189 *)
12190 as_fn_error $? "bad value $enableval for --enable-source-highlight" "$LINENO" 5
12191 ;;
12192 esac
12193
12194 else
12195 enable_source_highlight=auto
12196 fi
12197
12198
12199 if test "${enable_source_highlight}" != "no"; then
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
12201 $as_echo_n "checking for the source-highlight library... " >&6; }
12202 if test "${pkg_config_prog_path}" = "missing"; then
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
12204 $as_echo "no - pkg-config not found" >&6; }
12205 if test "${enable_source_highlight}" = "yes"; then
12206 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
12207 fi
12208 else
12209 if ${pkg_config_prog_path} --exists source-highlight; then
12210 case "$LDFLAGS" in
12211 *static-libstdc*)
12212 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
12213 ;;
12214 esac
12215
12216 srchigh_pkg_cflags=`${pkg_config_prog_path} --cflags source-highlight`
12217 srchigh_pkg_libs=`${pkg_config_prog_path} --libs source-highlight`
12218
12219 # Now that we have found a source-highlight library, check if we can use
12220 # it. In particular, we're trying to detect the situation that the
12221 # library is using the new libstdc++ library abi ( see
12222 # https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html )
12223 # while the compiler being used to compile gdb is using the old abi.
12224 # Such a situation will result in an undefined reference to
12225 # srchilite::SourceHighlight::SourceHighlight(std::string const&).
12226 # This situation can occur for instance when using a source highlight
12227 # library compiled with g++ 7.5.0 while building gdb with g++ 4.8.5.
12228 ac_ext=cpp
12229 ac_cpp='$CXXCPP $CPPFLAGS'
12230 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12231 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12232 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12233
12234 save_CXXFLAGS="$CXXFLAGS"
12235 save_LIBS="$LIBS"
12236 CXXFLAGS="$CXXFLAGS $srchigh_pkg_cflags"
12237 LIBS="$LIBS $srchigh_pkg_libs"
12238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12239 /* end confdefs.h. */
12240 #include <srchilite/sourcehighlight.h>
12241 int
12242 main ()
12243 {
12244 std::string outlang = "esc.outlang";
12245 new srchilite::SourceHighlight (outlang);
12246
12247 ;
12248 return 0;
12249 }
12250 _ACEOF
12251 if ac_fn_cxx_try_link "$LINENO"; then :
12252 have_usable_source_highlight=yes
12253 else
12254 have_usable_source_highlight=no
12255
12256 fi
12257 rm -f core conftest.err conftest.$ac_objext \
12258 conftest$ac_exeext conftest.$ac_ext
12259 CXXFLAGS="$save_CXXFLAGS"
12260 LIBS="$save_LIBS"
12261 ac_ext=c
12262 ac_cpp='$CPP $CPPFLAGS'
12263 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12264 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12265 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12266
12267
12268 if test "${have_usable_source_highlight}" = "yes"; then
12269
12270 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
12271
12272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12273 $as_echo "yes" >&6; }
12274 SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
12275 SRCHIGH_LIBS="$srchigh_pkg_libs"
12276 else
12277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12278 $as_echo "no" >&6; }
12279 if test "${enable_source_highlight}" = "yes"; then
12280 as_fn_error $? "source-highlight in your system could not be used" "$LINENO" 5
12281 fi
12282 fi
12283 else
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12285 $as_echo "no" >&6; }
12286 if test "${enable_source_highlight}" = "yes"; then
12287 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
12288 fi
12289 fi
12290 fi
12291 fi
12292
12293
12294
12295 # ------------------------- #
12296 # Checks for header files. #
12297 # ------------------------- #
12298
12299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12300 $as_echo_n "checking for ANSI C header files... " >&6; }
12301 if ${ac_cv_header_stdc+:} false; then :
12302 $as_echo_n "(cached) " >&6
12303 else
12304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12305 /* end confdefs.h. */
12306 #include <stdlib.h>
12307 #include <stdarg.h>
12308 #include <string.h>
12309 #include <float.h>
12310
12311 int
12312 main ()
12313 {
12314
12315 ;
12316 return 0;
12317 }
12318 _ACEOF
12319 if ac_fn_c_try_compile "$LINENO"; then :
12320 ac_cv_header_stdc=yes
12321 else
12322 ac_cv_header_stdc=no
12323 fi
12324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12325
12326 if test $ac_cv_header_stdc = yes; then
12327 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12329 /* end confdefs.h. */
12330 #include <string.h>
12331
12332 _ACEOF
12333 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12334 $EGREP "memchr" >/dev/null 2>&1; then :
12335
12336 else
12337 ac_cv_header_stdc=no
12338 fi
12339 rm -f conftest*
12340
12341 fi
12342
12343 if test $ac_cv_header_stdc = yes; then
12344 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12346 /* end confdefs.h. */
12347 #include <stdlib.h>
12348
12349 _ACEOF
12350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12351 $EGREP "free" >/dev/null 2>&1; then :
12352
12353 else
12354 ac_cv_header_stdc=no
12355 fi
12356 rm -f conftest*
12357
12358 fi
12359
12360 if test $ac_cv_header_stdc = yes; then
12361 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12362 if test "$cross_compiling" = yes; then :
12363 :
12364 else
12365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12366 /* end confdefs.h. */
12367 #include <ctype.h>
12368 #include <stdlib.h>
12369 #if ((' ' & 0x0FF) == 0x020)
12370 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12371 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12372 #else
12373 # define ISLOWER(c) \
12374 (('a' <= (c) && (c) <= 'i') \
12375 || ('j' <= (c) && (c) <= 'r') \
12376 || ('s' <= (c) && (c) <= 'z'))
12377 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12378 #endif
12379
12380 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12381 int
12382 main ()
12383 {
12384 int i;
12385 for (i = 0; i < 256; i++)
12386 if (XOR (islower (i), ISLOWER (i))
12387 || toupper (i) != TOUPPER (i))
12388 return 2;
12389 return 0;
12390 }
12391 _ACEOF
12392 if ac_fn_c_try_run "$LINENO"; then :
12393
12394 else
12395 ac_cv_header_stdc=no
12396 fi
12397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12398 conftest.$ac_objext conftest.beam conftest.$ac_ext
12399 fi
12400
12401 fi
12402 fi
12403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12404 $as_echo "$ac_cv_header_stdc" >&6; }
12405 if test $ac_cv_header_stdc = yes; then
12406
12407 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12408
12409 fi
12410
12411 # elf_hp.h is for HP/UX 64-bit shared library support.
12412 for ac_header in nlist.h machine/reg.h \
12413 thread_db.h \
12414 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12415 sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \
12416 sys/reg.h sys/debugreg.h \
12417 termios.h elf_hp.h
12418 do :
12419 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12420 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12421 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12422 cat >>confdefs.h <<_ACEOF
12423 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12424 _ACEOF
12425
12426 fi
12427
12428 done
12429
12430 for ac_header in sys/user.h
12431 do :
12432 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12433 # include <sys/param.h>
12434 #endif
12435
12436 "
12437 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12438 cat >>confdefs.h <<_ACEOF
12439 #define HAVE_SYS_USER_H 1
12440 _ACEOF
12441
12442 fi
12443
12444 done
12445
12446
12447 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12448 do :
12449 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12450 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12451 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12452 cat >>confdefs.h <<_ACEOF
12453 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12454 _ACEOF
12455
12456 fi
12457
12458 done
12459
12460 for ac_header in term.h
12461 do :
12462 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12463 # include <curses.h>
12464 #endif
12465
12466 "
12467 if test "x$ac_cv_header_term_h" = xyes; then :
12468 cat >>confdefs.h <<_ACEOF
12469 #define HAVE_TERM_H 1
12470 _ACEOF
12471
12472 fi
12473
12474 done
12475
12476
12477 for ac_header in sys/socket.h
12478 do :
12479 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12480 if test "x$ac_cv_header_sys_socket_h" = xyes; then :
12481 cat >>confdefs.h <<_ACEOF
12482 #define HAVE_SYS_SOCKET_H 1
12483 _ACEOF
12484
12485 fi
12486
12487 done
12488
12489 for ac_header in ws2tcpip.h
12490 do :
12491 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
12492 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
12493 cat >>confdefs.h <<_ACEOF
12494 #define HAVE_WS2TCPIP_H 1
12495 _ACEOF
12496
12497 fi
12498
12499 done
12500
12501 for ac_header in execinfo.h
12502 do :
12503 ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
12504 if test "x$ac_cv_header_execinfo_h" = xyes; then :
12505 cat >>confdefs.h <<_ACEOF
12506 #define HAVE_EXECINFO_H 1
12507 _ACEOF
12508
12509 fi
12510
12511 done
12512
12513
12514 # ------------------------- #
12515 # Checks for declarations. #
12516 # ------------------------- #
12517
12518
12519 # Check for presence and size of long long.
12520 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12521 if test "x$ac_cv_type_long_long" = xyes; then :
12522
12523 cat >>confdefs.h <<_ACEOF
12524 #define HAVE_LONG_LONG 1
12525 _ACEOF
12526
12527 # The cast to long int works around a bug in the HP C Compiler
12528 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12529 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12530 # This bug is HP SR number 8606223364.
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12532 $as_echo_n "checking size of long long... " >&6; }
12533 if ${ac_cv_sizeof_long_long+:} false; then :
12534 $as_echo_n "(cached) " >&6
12535 else
12536 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12537
12538 else
12539 if test "$ac_cv_type_long_long" = yes; then
12540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12541 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12542 as_fn_error 77 "cannot compute sizeof (long long)
12543 See \`config.log' for more details" "$LINENO" 5; }
12544 else
12545 ac_cv_sizeof_long_long=0
12546 fi
12547 fi
12548
12549 fi
12550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12551 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12552
12553
12554
12555 cat >>confdefs.h <<_ACEOF
12556 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12557 _ACEOF
12558
12559
12560 fi
12561
12562
12563 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12564 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12565 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12566 ac_have_decl=1
12567 else
12568 ac_have_decl=0
12569 fi
12570
12571 cat >>confdefs.h <<_ACEOF
12572 #define HAVE_DECL_BASENAME $ac_have_decl
12573 _ACEOF
12574 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12575 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12576 ac_have_decl=1
12577 else
12578 ac_have_decl=0
12579 fi
12580
12581 cat >>confdefs.h <<_ACEOF
12582 #define HAVE_DECL_FFS $ac_have_decl
12583 _ACEOF
12584 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12585 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12586 ac_have_decl=1
12587 else
12588 ac_have_decl=0
12589 fi
12590
12591 cat >>confdefs.h <<_ACEOF
12592 #define HAVE_DECL_ASPRINTF $ac_have_decl
12593 _ACEOF
12594 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12595 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12596 ac_have_decl=1
12597 else
12598 ac_have_decl=0
12599 fi
12600
12601 cat >>confdefs.h <<_ACEOF
12602 #define HAVE_DECL_VASPRINTF $ac_have_decl
12603 _ACEOF
12604 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12605 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12606 ac_have_decl=1
12607 else
12608 ac_have_decl=0
12609 fi
12610
12611 cat >>confdefs.h <<_ACEOF
12612 #define HAVE_DECL_SNPRINTF $ac_have_decl
12613 _ACEOF
12614 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12615 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12616 ac_have_decl=1
12617 else
12618 ac_have_decl=0
12619 fi
12620
12621 cat >>confdefs.h <<_ACEOF
12622 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12623 _ACEOF
12624
12625 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12626 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12627 ac_have_decl=1
12628 else
12629 ac_have_decl=0
12630 fi
12631
12632 cat >>confdefs.h <<_ACEOF
12633 #define HAVE_DECL_STRTOL $ac_have_decl
12634 _ACEOF
12635 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12636 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12637 ac_have_decl=1
12638 else
12639 ac_have_decl=0
12640 fi
12641
12642 cat >>confdefs.h <<_ACEOF
12643 #define HAVE_DECL_STRTOUL $ac_have_decl
12644 _ACEOF
12645 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12646 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12647 ac_have_decl=1
12648 else
12649 ac_have_decl=0
12650 fi
12651
12652 cat >>confdefs.h <<_ACEOF
12653 #define HAVE_DECL_STRTOLL $ac_have_decl
12654 _ACEOF
12655 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12656 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12657 ac_have_decl=1
12658 else
12659 ac_have_decl=0
12660 fi
12661
12662 cat >>confdefs.h <<_ACEOF
12663 #define HAVE_DECL_STRTOULL $ac_have_decl
12664 _ACEOF
12665
12666 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12667 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12668 ac_have_decl=1
12669 else
12670 ac_have_decl=0
12671 fi
12672
12673 cat >>confdefs.h <<_ACEOF
12674 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12675 _ACEOF
12676
12677
12678
12679 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12680 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12681 ac_have_decl=1
12682 else
12683 ac_have_decl=0
12684 fi
12685
12686 cat >>confdefs.h <<_ACEOF
12687 #define HAVE_DECL_SNPRINTF $ac_have_decl
12688 _ACEOF
12689
12690
12691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12692 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12693 if ${am_cv_val_LC_MESSAGES+:} false; then :
12694 $as_echo_n "(cached) " >&6
12695 else
12696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12697 /* end confdefs.h. */
12698 #include <locale.h>
12699 int
12700 main ()
12701 {
12702 return LC_MESSAGES
12703 ;
12704 return 0;
12705 }
12706 _ACEOF
12707 if ac_fn_c_try_link "$LINENO"; then :
12708 am_cv_val_LC_MESSAGES=yes
12709 else
12710 am_cv_val_LC_MESSAGES=no
12711 fi
12712 rm -f core conftest.err conftest.$ac_objext \
12713 conftest$ac_exeext conftest.$ac_ext
12714 fi
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12716 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12717 if test $am_cv_val_LC_MESSAGES = yes; then
12718
12719 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12720
12721 fi
12722
12723
12724 # ------------------ #
12725 # Checks for types. #
12726 # ------------------ #
12727
12728 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12729 #if HAVE_SYS_SOCKET_H
12730 # include <sys/socket.h>
12731 #elif HAVE_WS2TCPIP_H
12732 # include <ws2tcpip.h>
12733 #endif
12734
12735 "
12736 if test "x$ac_cv_type_socklen_t" = xyes; then :
12737
12738 cat >>confdefs.h <<_ACEOF
12739 #define HAVE_SOCKLEN_T 1
12740 _ACEOF
12741
12742
12743 fi
12744
12745
12746 # ------------------------------------- #
12747 # Checks for compiler characteristics. #
12748 # ------------------------------------- #
12749
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12751 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12752 if ${ac_cv_c_const+:} false; then :
12753 $as_echo_n "(cached) " >&6
12754 else
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756 /* end confdefs.h. */
12757
12758 int
12759 main ()
12760 {
12761
12762 #ifndef __cplusplus
12763 /* Ultrix mips cc rejects this sort of thing. */
12764 typedef int charset[2];
12765 const charset cs = { 0, 0 };
12766 /* SunOS 4.1.1 cc rejects this. */
12767 char const *const *pcpcc;
12768 char **ppc;
12769 /* NEC SVR4.0.2 mips cc rejects this. */
12770 struct point {int x, y;};
12771 static struct point const zero = {0,0};
12772 /* AIX XL C 1.02.0.0 rejects this.
12773 It does not let you subtract one const X* pointer from another in
12774 an arm of an if-expression whose if-part is not a constant
12775 expression */
12776 const char *g = "string";
12777 pcpcc = &g + (g ? g-g : 0);
12778 /* HPUX 7.0 cc rejects these. */
12779 ++pcpcc;
12780 ppc = (char**) pcpcc;
12781 pcpcc = (char const *const *) ppc;
12782 { /* SCO 3.2v4 cc rejects this sort of thing. */
12783 char tx;
12784 char *t = &tx;
12785 char const *s = 0 ? (char *) 0 : (char const *) 0;
12786
12787 *t++ = 0;
12788 if (s) return 0;
12789 }
12790 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12791 int x[] = {25, 17};
12792 const int *foo = &x[0];
12793 ++foo;
12794 }
12795 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12796 typedef const int *iptr;
12797 iptr p = 0;
12798 ++p;
12799 }
12800 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12801 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12802 struct s { int j; const int *ap[3]; } bx;
12803 struct s *b = &bx; b->j = 5;
12804 }
12805 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12806 const int foo = 10;
12807 if (!foo) return 0;
12808 }
12809 return !cs[0] && !zero.x;
12810 #endif
12811
12812 ;
12813 return 0;
12814 }
12815 _ACEOF
12816 if ac_fn_c_try_compile "$LINENO"; then :
12817 ac_cv_c_const=yes
12818 else
12819 ac_cv_c_const=no
12820 fi
12821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12822 fi
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12824 $as_echo "$ac_cv_c_const" >&6; }
12825 if test $ac_cv_c_const = no; then
12826
12827 $as_echo "#define const /**/" >>confdefs.h
12828
12829 fi
12830
12831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12832 $as_echo_n "checking for inline... " >&6; }
12833 if ${ac_cv_c_inline+:} false; then :
12834 $as_echo_n "(cached) " >&6
12835 else
12836 ac_cv_c_inline=no
12837 for ac_kw in inline __inline__ __inline; do
12838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12839 /* end confdefs.h. */
12840 #ifndef __cplusplus
12841 typedef int foo_t;
12842 static $ac_kw foo_t static_foo () {return 0; }
12843 $ac_kw foo_t foo () {return 0; }
12844 #endif
12845
12846 _ACEOF
12847 if ac_fn_c_try_compile "$LINENO"; then :
12848 ac_cv_c_inline=$ac_kw
12849 fi
12850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12851 test "$ac_cv_c_inline" != no && break
12852 done
12853
12854 fi
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12856 $as_echo "$ac_cv_c_inline" >&6; }
12857
12858 case $ac_cv_c_inline in
12859 inline | yes) ;;
12860 *)
12861 case $ac_cv_c_inline in
12862 no) ac_val=;;
12863 *) ac_val=$ac_cv_c_inline;;
12864 esac
12865 cat >>confdefs.h <<_ACEOF
12866 #ifndef __cplusplus
12867 #define inline $ac_val
12868 #endif
12869 _ACEOF
12870 ;;
12871 esac
12872
12873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12874 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12875 if ${ac_cv_c_bigendian+:} false; then :
12876 $as_echo_n "(cached) " >&6
12877 else
12878 ac_cv_c_bigendian=unknown
12879 # See if we're dealing with a universal compiler.
12880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881 /* end confdefs.h. */
12882 #ifndef __APPLE_CC__
12883 not a universal capable compiler
12884 #endif
12885 typedef int dummy;
12886
12887 _ACEOF
12888 if ac_fn_c_try_compile "$LINENO"; then :
12889
12890 # Check for potential -arch flags. It is not universal unless
12891 # there are at least two -arch flags with different values.
12892 ac_arch=
12893 ac_prev=
12894 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12895 if test -n "$ac_prev"; then
12896 case $ac_word in
12897 i?86 | x86_64 | ppc | ppc64)
12898 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12899 ac_arch=$ac_word
12900 else
12901 ac_cv_c_bigendian=universal
12902 break
12903 fi
12904 ;;
12905 esac
12906 ac_prev=
12907 elif test "x$ac_word" = "x-arch"; then
12908 ac_prev=arch
12909 fi
12910 done
12911 fi
12912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12913 if test $ac_cv_c_bigendian = unknown; then
12914 # See if sys/param.h defines the BYTE_ORDER macro.
12915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12916 /* end confdefs.h. */
12917 #include <sys/types.h>
12918 #include <sys/param.h>
12919
12920 int
12921 main ()
12922 {
12923 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12924 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12925 && LITTLE_ENDIAN)
12926 bogus endian macros
12927 #endif
12928
12929 ;
12930 return 0;
12931 }
12932 _ACEOF
12933 if ac_fn_c_try_compile "$LINENO"; then :
12934 # It does; now see whether it defined to BIG_ENDIAN or not.
12935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936 /* end confdefs.h. */
12937 #include <sys/types.h>
12938 #include <sys/param.h>
12939
12940 int
12941 main ()
12942 {
12943 #if BYTE_ORDER != BIG_ENDIAN
12944 not big endian
12945 #endif
12946
12947 ;
12948 return 0;
12949 }
12950 _ACEOF
12951 if ac_fn_c_try_compile "$LINENO"; then :
12952 ac_cv_c_bigendian=yes
12953 else
12954 ac_cv_c_bigendian=no
12955 fi
12956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12957 fi
12958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12959 fi
12960 if test $ac_cv_c_bigendian = unknown; then
12961 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12963 /* end confdefs.h. */
12964 #include <limits.h>
12965
12966 int
12967 main ()
12968 {
12969 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12970 bogus endian macros
12971 #endif
12972
12973 ;
12974 return 0;
12975 }
12976 _ACEOF
12977 if ac_fn_c_try_compile "$LINENO"; then :
12978 # It does; now see whether it defined to _BIG_ENDIAN or not.
12979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12980 /* end confdefs.h. */
12981 #include <limits.h>
12982
12983 int
12984 main ()
12985 {
12986 #ifndef _BIG_ENDIAN
12987 not big endian
12988 #endif
12989
12990 ;
12991 return 0;
12992 }
12993 _ACEOF
12994 if ac_fn_c_try_compile "$LINENO"; then :
12995 ac_cv_c_bigendian=yes
12996 else
12997 ac_cv_c_bigendian=no
12998 fi
12999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13000 fi
13001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13002 fi
13003 if test $ac_cv_c_bigendian = unknown; then
13004 # Compile a test program.
13005 if test "$cross_compiling" = yes; then :
13006 # Try to guess by grepping values from an object file.
13007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13008 /* end confdefs.h. */
13009 short int ascii_mm[] =
13010 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13011 short int ascii_ii[] =
13012 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13013 int use_ascii (int i) {
13014 return ascii_mm[i] + ascii_ii[i];
13015 }
13016 short int ebcdic_ii[] =
13017 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13018 short int ebcdic_mm[] =
13019 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13020 int use_ebcdic (int i) {
13021 return ebcdic_mm[i] + ebcdic_ii[i];
13022 }
13023 extern int foo;
13024
13025 int
13026 main ()
13027 {
13028 return use_ascii (foo) == use_ebcdic (foo);
13029 ;
13030 return 0;
13031 }
13032 _ACEOF
13033 if ac_fn_c_try_compile "$LINENO"; then :
13034 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13035 ac_cv_c_bigendian=yes
13036 fi
13037 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13038 if test "$ac_cv_c_bigendian" = unknown; then
13039 ac_cv_c_bigendian=no
13040 else
13041 # finding both strings is unlikely to happen, but who knows?
13042 ac_cv_c_bigendian=unknown
13043 fi
13044 fi
13045 fi
13046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13047 else
13048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13049 /* end confdefs.h. */
13050 $ac_includes_default
13051 int
13052 main ()
13053 {
13054
13055 /* Are we little or big endian? From Harbison&Steele. */
13056 union
13057 {
13058 long int l;
13059 char c[sizeof (long int)];
13060 } u;
13061 u.l = 1;
13062 return u.c[sizeof (long int) - 1] == 1;
13063
13064 ;
13065 return 0;
13066 }
13067 _ACEOF
13068 if ac_fn_c_try_run "$LINENO"; then :
13069 ac_cv_c_bigendian=no
13070 else
13071 ac_cv_c_bigendian=yes
13072 fi
13073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13074 conftest.$ac_objext conftest.beam conftest.$ac_ext
13075 fi
13076
13077 fi
13078 fi
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13080 $as_echo "$ac_cv_c_bigendian" >&6; }
13081 case $ac_cv_c_bigendian in #(
13082 yes)
13083 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13084 ;; #(
13085 no)
13086 ;; #(
13087 universal)
13088
13089 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13090
13091 ;; #(
13092 *)
13093 as_fn_error $? "unknown endianness
13094 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13095 esac
13096
13097
13098 # ------------------------------ #
13099 # Checks for library functions. #
13100 # ------------------------------ #
13101
13102 for ac_func in getuid getgid \
13103 pipe pread pread64 pwrite resize_term \
13104 getpgid setsid \
13105 sigaction sigsetmask socketpair \
13106 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
13107 setrlimit getrlimit posix_madvise waitpid \
13108 use_default_colors
13109 do :
13110 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13111 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13112 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13113 cat >>confdefs.h <<_ACEOF
13114 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13115 _ACEOF
13116
13117 fi
13118 done
13119
13120
13121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13122 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13123 if ${am_cv_langinfo_codeset+:} false; then :
13124 $as_echo_n "(cached) " >&6
13125 else
13126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13127 /* end confdefs.h. */
13128 #include <langinfo.h>
13129 int
13130 main ()
13131 {
13132 char* cs = nl_langinfo(CODESET);
13133 ;
13134 return 0;
13135 }
13136 _ACEOF
13137 if ac_fn_c_try_link "$LINENO"; then :
13138 am_cv_langinfo_codeset=yes
13139 else
13140 am_cv_langinfo_codeset=no
13141 fi
13142 rm -f core conftest.err conftest.$ac_objext \
13143 conftest$ac_exeext conftest.$ac_ext
13144
13145 fi
13146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13147 $as_echo "$am_cv_langinfo_codeset" >&6; }
13148 if test $am_cv_langinfo_codeset = yes; then
13149
13150 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13151
13152 fi
13153
13154 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13155 if test "x$ac_cv_type_size_t" = xyes; then :
13156
13157 else
13158
13159 cat >>confdefs.h <<_ACEOF
13160 #define size_t unsigned int
13161 _ACEOF
13162
13163 fi
13164
13165
13166
13167
13168 for ac_header in $ac_header_list
13169 do :
13170 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13171 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13172 "
13173 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13174 cat >>confdefs.h <<_ACEOF
13175 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13176 _ACEOF
13177
13178 fi
13179
13180 done
13181
13182
13183
13184
13185
13186
13187
13188 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13189 if test "x$ac_cv_type_pid_t" = xyes; then :
13190
13191 else
13192
13193 cat >>confdefs.h <<_ACEOF
13194 #define pid_t int
13195 _ACEOF
13196
13197 fi
13198
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13200 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13201 if ${ac_cv_path_SED+:} false; then :
13202 $as_echo_n "(cached) " >&6
13203 else
13204 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13205 for ac_i in 1 2 3 4 5 6 7; do
13206 ac_script="$ac_script$as_nl$ac_script"
13207 done
13208 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13209 { ac_script=; unset ac_script;}
13210 if test -z "$SED"; then
13211 ac_path_SED_found=false
13212 # Loop through the user's path and test for each of PROGNAME-LIST
13213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13214 for as_dir in $PATH
13215 do
13216 IFS=$as_save_IFS
13217 test -z "$as_dir" && as_dir=.
13218 for ac_prog in sed gsed; do
13219 for ac_exec_ext in '' $ac_executable_extensions; do
13220 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13221 as_fn_executable_p "$ac_path_SED" || continue
13222 # Check for GNU ac_path_SED and select it if it is found.
13223 # Check for GNU $ac_path_SED
13224 case `"$ac_path_SED" --version 2>&1` in
13225 *GNU*)
13226 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13227 *)
13228 ac_count=0
13229 $as_echo_n 0123456789 >"conftest.in"
13230 while :
13231 do
13232 cat "conftest.in" "conftest.in" >"conftest.tmp"
13233 mv "conftest.tmp" "conftest.in"
13234 cp "conftest.in" "conftest.nl"
13235 $as_echo '' >> "conftest.nl"
13236 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13237 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13238 as_fn_arith $ac_count + 1 && ac_count=$as_val
13239 if test $ac_count -gt ${ac_path_SED_max-0}; then
13240 # Best one so far, save it but keep looking for a better one
13241 ac_cv_path_SED="$ac_path_SED"
13242 ac_path_SED_max=$ac_count
13243 fi
13244 # 10*(2^10) chars as input seems more than enough
13245 test $ac_count -gt 10 && break
13246 done
13247 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13248 esac
13249
13250 $ac_path_SED_found && break 3
13251 done
13252 done
13253 done
13254 IFS=$as_save_IFS
13255 if test -z "$ac_cv_path_SED"; then
13256 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13257 fi
13258 else
13259 ac_cv_path_SED=$SED
13260 fi
13261
13262 fi
13263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13264 $as_echo "$ac_cv_path_SED" >&6; }
13265 SED="$ac_cv_path_SED"
13266 rm -f conftest.sed
13267
13268
13269 # Set the 'development' global.
13270 . $srcdir/../bfd/development.sh
13271
13272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13273 $as_echo_n "checking for ANSI C header files... " >&6; }
13274 if ${ac_cv_header_stdc+:} false; then :
13275 $as_echo_n "(cached) " >&6
13276 else
13277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h. */
13279 #include <stdlib.h>
13280 #include <stdarg.h>
13281 #include <string.h>
13282 #include <float.h>
13283
13284 int
13285 main ()
13286 {
13287
13288 ;
13289 return 0;
13290 }
13291 _ACEOF
13292 if ac_fn_c_try_compile "$LINENO"; then :
13293 ac_cv_header_stdc=yes
13294 else
13295 ac_cv_header_stdc=no
13296 fi
13297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13298
13299 if test $ac_cv_header_stdc = yes; then
13300 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13302 /* end confdefs.h. */
13303 #include <string.h>
13304
13305 _ACEOF
13306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13307 $EGREP "memchr" >/dev/null 2>&1; then :
13308
13309 else
13310 ac_cv_header_stdc=no
13311 fi
13312 rm -f conftest*
13313
13314 fi
13315
13316 if test $ac_cv_header_stdc = yes; then
13317 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319 /* end confdefs.h. */
13320 #include <stdlib.h>
13321
13322 _ACEOF
13323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13324 $EGREP "free" >/dev/null 2>&1; then :
13325
13326 else
13327 ac_cv_header_stdc=no
13328 fi
13329 rm -f conftest*
13330
13331 fi
13332
13333 if test $ac_cv_header_stdc = yes; then
13334 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13335 if test "$cross_compiling" = yes; then :
13336 :
13337 else
13338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13339 /* end confdefs.h. */
13340 #include <ctype.h>
13341 #include <stdlib.h>
13342 #if ((' ' & 0x0FF) == 0x020)
13343 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13344 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13345 #else
13346 # define ISLOWER(c) \
13347 (('a' <= (c) && (c) <= 'i') \
13348 || ('j' <= (c) && (c) <= 'r') \
13349 || ('s' <= (c) && (c) <= 'z'))
13350 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13351 #endif
13352
13353 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13354 int
13355 main ()
13356 {
13357 int i;
13358 for (i = 0; i < 256; i++)
13359 if (XOR (islower (i), ISLOWER (i))
13360 || toupper (i) != TOUPPER (i))
13361 return 2;
13362 return 0;
13363 }
13364 _ACEOF
13365 if ac_fn_c_try_run "$LINENO"; then :
13366
13367 else
13368 ac_cv_header_stdc=no
13369 fi
13370 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13371 conftest.$ac_objext conftest.beam conftest.$ac_ext
13372 fi
13373
13374 fi
13375 fi
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13377 $as_echo "$ac_cv_header_stdc" >&6; }
13378 if test $ac_cv_header_stdc = yes; then
13379
13380 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13381
13382 fi
13383
13384 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13385 # for constant arguments. Useless!
13386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13387 $as_echo_n "checking for working alloca.h... " >&6; }
13388 if ${ac_cv_working_alloca_h+:} false; then :
13389 $as_echo_n "(cached) " >&6
13390 else
13391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13392 /* end confdefs.h. */
13393 #include <alloca.h>
13394 int
13395 main ()
13396 {
13397 char *p = (char *) alloca (2 * sizeof (int));
13398 if (p) return 0;
13399 ;
13400 return 0;
13401 }
13402 _ACEOF
13403 if ac_fn_c_try_link "$LINENO"; then :
13404 ac_cv_working_alloca_h=yes
13405 else
13406 ac_cv_working_alloca_h=no
13407 fi
13408 rm -f core conftest.err conftest.$ac_objext \
13409 conftest$ac_exeext conftest.$ac_ext
13410 fi
13411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13412 $as_echo "$ac_cv_working_alloca_h" >&6; }
13413 if test $ac_cv_working_alloca_h = yes; then
13414
13415 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13416
13417 fi
13418
13419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13420 $as_echo_n "checking for alloca... " >&6; }
13421 if ${ac_cv_func_alloca_works+:} false; then :
13422 $as_echo_n "(cached) " >&6
13423 else
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425 /* end confdefs.h. */
13426 #ifdef __GNUC__
13427 # define alloca __builtin_alloca
13428 #else
13429 # ifdef _MSC_VER
13430 # include <malloc.h>
13431 # define alloca _alloca
13432 # else
13433 # ifdef HAVE_ALLOCA_H
13434 # include <alloca.h>
13435 # else
13436 # ifdef _AIX
13437 #pragma alloca
13438 # else
13439 # ifndef alloca /* predefined by HP cc +Olibcalls */
13440 void *alloca (size_t);
13441 # endif
13442 # endif
13443 # endif
13444 # endif
13445 #endif
13446
13447 int
13448 main ()
13449 {
13450 char *p = (char *) alloca (1);
13451 if (p) return 0;
13452 ;
13453 return 0;
13454 }
13455 _ACEOF
13456 if ac_fn_c_try_link "$LINENO"; then :
13457 ac_cv_func_alloca_works=yes
13458 else
13459 ac_cv_func_alloca_works=no
13460 fi
13461 rm -f core conftest.err conftest.$ac_objext \
13462 conftest$ac_exeext conftest.$ac_ext
13463 fi
13464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13465 $as_echo "$ac_cv_func_alloca_works" >&6; }
13466
13467 if test $ac_cv_func_alloca_works = yes; then
13468
13469 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13470
13471 else
13472 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13473 # that cause trouble. Some versions do not even contain alloca or
13474 # contain a buggy version. If you still want to use their alloca,
13475 # use ar to extract alloca.o from them instead of compiling alloca.c.
13476
13477 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13478
13479 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13480
13481
13482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13483 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13484 if ${ac_cv_os_cray+:} false; then :
13485 $as_echo_n "(cached) " >&6
13486 else
13487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13488 /* end confdefs.h. */
13489 #if defined CRAY && ! defined CRAY2
13490 webecray
13491 #else
13492 wenotbecray
13493 #endif
13494
13495 _ACEOF
13496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13497 $EGREP "webecray" >/dev/null 2>&1; then :
13498 ac_cv_os_cray=yes
13499 else
13500 ac_cv_os_cray=no
13501 fi
13502 rm -f conftest*
13503
13504 fi
13505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13506 $as_echo "$ac_cv_os_cray" >&6; }
13507 if test $ac_cv_os_cray = yes; then
13508 for ac_func in _getb67 GETB67 getb67; do
13509 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13510 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13511 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13512
13513 cat >>confdefs.h <<_ACEOF
13514 #define CRAY_STACKSEG_END $ac_func
13515 _ACEOF
13516
13517 break
13518 fi
13519
13520 done
13521 fi
13522
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13524 $as_echo_n "checking stack direction for C alloca... " >&6; }
13525 if ${ac_cv_c_stack_direction+:} false; then :
13526 $as_echo_n "(cached) " >&6
13527 else
13528 if test "$cross_compiling" = yes; then :
13529 ac_cv_c_stack_direction=0
13530 else
13531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13532 /* end confdefs.h. */
13533 $ac_includes_default
13534 int
13535 find_stack_direction (int *addr, int depth)
13536 {
13537 int dir, dummy = 0;
13538 if (! addr)
13539 addr = &dummy;
13540 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13541 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13542 return dir + dummy;
13543 }
13544
13545 int
13546 main (int argc, char **argv)
13547 {
13548 return find_stack_direction (0, argc + !argv + 20) < 0;
13549 }
13550 _ACEOF
13551 if ac_fn_c_try_run "$LINENO"; then :
13552 ac_cv_c_stack_direction=1
13553 else
13554 ac_cv_c_stack_direction=-1
13555 fi
13556 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13557 conftest.$ac_objext conftest.beam conftest.$ac_ext
13558 fi
13559
13560 fi
13561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13562 $as_echo "$ac_cv_c_stack_direction" >&6; }
13563 cat >>confdefs.h <<_ACEOF
13564 #define STACK_DIRECTION $ac_cv_c_stack_direction
13565 _ACEOF
13566
13567
13568 fi
13569
13570
13571 WIN32APILIBS=
13572 case ${host} in
13573 *mingw32*)
13574
13575 $as_echo "#define USE_WIN32API 1" >>confdefs.h
13576
13577 WIN32APILIBS="-lws2_32"
13578 ;;
13579 esac
13580
13581
13582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13583 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13584 if ${am_cv_langinfo_codeset+:} false; then :
13585 $as_echo_n "(cached) " >&6
13586 else
13587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13588 /* end confdefs.h. */
13589 #include <langinfo.h>
13590 int
13591 main ()
13592 {
13593 char* cs = nl_langinfo(CODESET);
13594 ;
13595 return 0;
13596 }
13597 _ACEOF
13598 if ac_fn_c_try_link "$LINENO"; then :
13599 am_cv_langinfo_codeset=yes
13600 else
13601 am_cv_langinfo_codeset=no
13602 fi
13603 rm -f core conftest.err conftest.$ac_objext \
13604 conftest$ac_exeext conftest.$ac_ext
13605
13606 fi
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13608 $as_echo "$am_cv_langinfo_codeset" >&6; }
13609 if test $am_cv_langinfo_codeset = yes; then
13610
13611 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13612
13613 fi
13614
13615
13616 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
13617 do :
13618 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13619 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13620 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13621 cat >>confdefs.h <<_ACEOF
13622 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13623 _ACEOF
13624
13625 fi
13626
13627 done
13628
13629
13630
13631 for ac_func in getpagesize
13632 do :
13633 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13634 if test "x$ac_cv_func_getpagesize" = xyes; then :
13635 cat >>confdefs.h <<_ACEOF
13636 #define HAVE_GETPAGESIZE 1
13637 _ACEOF
13638
13639 fi
13640 done
13641
13642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13643 $as_echo_n "checking for working mmap... " >&6; }
13644 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
13645 $as_echo_n "(cached) " >&6
13646 else
13647 if test "$cross_compiling" = yes; then :
13648 ac_cv_func_mmap_fixed_mapped=no
13649 else
13650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13651 /* end confdefs.h. */
13652 $ac_includes_default
13653 /* malloc might have been renamed as rpl_malloc. */
13654 #undef malloc
13655
13656 /* Thanks to Mike Haertel and Jim Avera for this test.
13657 Here is a matrix of mmap possibilities:
13658 mmap private not fixed
13659 mmap private fixed at somewhere currently unmapped
13660 mmap private fixed at somewhere already mapped
13661 mmap shared not fixed
13662 mmap shared fixed at somewhere currently unmapped
13663 mmap shared fixed at somewhere already mapped
13664 For private mappings, we should verify that changes cannot be read()
13665 back from the file, nor mmap's back from the file at a different
13666 address. (There have been systems where private was not correctly
13667 implemented like the infamous i386 svr4.0, and systems where the
13668 VM page cache was not coherent with the file system buffer cache
13669 like early versions of FreeBSD and possibly contemporary NetBSD.)
13670 For shared mappings, we should conversely verify that changes get
13671 propagated back to all the places they're supposed to be.
13672
13673 Grep wants private fixed already mapped.
13674 The main things grep needs to know about mmap are:
13675 * does it exist and is it safe to write into the mmap'd area
13676 * how to use it (BSD variants) */
13677
13678 #include <fcntl.h>
13679 #include <sys/mman.h>
13680
13681 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13682 char *malloc ();
13683 #endif
13684
13685 /* This mess was copied from the GNU getpagesize.h. */
13686 #ifndef HAVE_GETPAGESIZE
13687 # ifdef _SC_PAGESIZE
13688 # define getpagesize() sysconf(_SC_PAGESIZE)
13689 # else /* no _SC_PAGESIZE */
13690 # ifdef HAVE_SYS_PARAM_H
13691 # include <sys/param.h>
13692 # ifdef EXEC_PAGESIZE
13693 # define getpagesize() EXEC_PAGESIZE
13694 # else /* no EXEC_PAGESIZE */
13695 # ifdef NBPG
13696 # define getpagesize() NBPG * CLSIZE
13697 # ifndef CLSIZE
13698 # define CLSIZE 1
13699 # endif /* no CLSIZE */
13700 # else /* no NBPG */
13701 # ifdef NBPC
13702 # define getpagesize() NBPC
13703 # else /* no NBPC */
13704 # ifdef PAGESIZE
13705 # define getpagesize() PAGESIZE
13706 # endif /* PAGESIZE */
13707 # endif /* no NBPC */
13708 # endif /* no NBPG */
13709 # endif /* no EXEC_PAGESIZE */
13710 # else /* no HAVE_SYS_PARAM_H */
13711 # define getpagesize() 8192 /* punt totally */
13712 # endif /* no HAVE_SYS_PARAM_H */
13713 # endif /* no _SC_PAGESIZE */
13714
13715 #endif /* no HAVE_GETPAGESIZE */
13716
13717 int
13718 main ()
13719 {
13720 char *data, *data2, *data3;
13721 const char *cdata2;
13722 int i, pagesize;
13723 int fd, fd2;
13724
13725 pagesize = getpagesize ();
13726
13727 /* First, make a file with some known garbage in it. */
13728 data = (char *) malloc (pagesize);
13729 if (!data)
13730 return 1;
13731 for (i = 0; i < pagesize; ++i)
13732 *(data + i) = rand ();
13733 umask (0);
13734 fd = creat ("conftest.mmap", 0600);
13735 if (fd < 0)
13736 return 2;
13737 if (write (fd, data, pagesize) != pagesize)
13738 return 3;
13739 close (fd);
13740
13741 /* Next, check that the tail of a page is zero-filled. File must have
13742 non-zero length, otherwise we risk SIGBUS for entire page. */
13743 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13744 if (fd2 < 0)
13745 return 4;
13746 cdata2 = "";
13747 if (write (fd2, cdata2, 1) != 1)
13748 return 5;
13749 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13750 if (data2 == MAP_FAILED)
13751 return 6;
13752 for (i = 0; i < pagesize; ++i)
13753 if (*(data2 + i))
13754 return 7;
13755 close (fd2);
13756 if (munmap (data2, pagesize))
13757 return 8;
13758
13759 /* Next, try to mmap the file at a fixed address which already has
13760 something else allocated at it. If we can, also make sure that
13761 we see the same garbage. */
13762 fd = open ("conftest.mmap", O_RDWR);
13763 if (fd < 0)
13764 return 9;
13765 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13766 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13767 return 10;
13768 for (i = 0; i < pagesize; ++i)
13769 if (*(data + i) != *(data2 + i))
13770 return 11;
13771
13772 /* Finally, make sure that changes to the mapped area do not
13773 percolate back to the file as seen by read(). (This is a bug on
13774 some variants of i386 svr4.0.) */
13775 for (i = 0; i < pagesize; ++i)
13776 *(data2 + i) = *(data2 + i) + 1;
13777 data3 = (char *) malloc (pagesize);
13778 if (!data3)
13779 return 12;
13780 if (read (fd, data3, pagesize) != pagesize)
13781 return 13;
13782 for (i = 0; i < pagesize; ++i)
13783 if (*(data + i) != *(data3 + i))
13784 return 14;
13785 close (fd);
13786 return 0;
13787 }
13788 _ACEOF
13789 if ac_fn_c_try_run "$LINENO"; then :
13790 ac_cv_func_mmap_fixed_mapped=yes
13791 else
13792 ac_cv_func_mmap_fixed_mapped=no
13793 fi
13794 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13795 conftest.$ac_objext conftest.beam conftest.$ac_ext
13796 fi
13797
13798 fi
13799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13800 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13801 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13802
13803 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13804
13805 fi
13806 rm -f conftest.mmap conftest.txt
13807
13808 for ac_header in vfork.h
13809 do :
13810 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13811 if test "x$ac_cv_header_vfork_h" = xyes; then :
13812 cat >>confdefs.h <<_ACEOF
13813 #define HAVE_VFORK_H 1
13814 _ACEOF
13815
13816 fi
13817
13818 done
13819
13820 for ac_func in fork vfork
13821 do :
13822 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13823 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13824 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13825 cat >>confdefs.h <<_ACEOF
13826 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13827 _ACEOF
13828
13829 fi
13830 done
13831
13832 if test "x$ac_cv_func_fork" = xyes; then
13833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13834 $as_echo_n "checking for working fork... " >&6; }
13835 if ${ac_cv_func_fork_works+:} false; then :
13836 $as_echo_n "(cached) " >&6
13837 else
13838 if test "$cross_compiling" = yes; then :
13839 ac_cv_func_fork_works=cross
13840 else
13841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13842 /* end confdefs.h. */
13843 $ac_includes_default
13844 int
13845 main ()
13846 {
13847
13848 /* By Ruediger Kuhlmann. */
13849 return fork () < 0;
13850
13851 ;
13852 return 0;
13853 }
13854 _ACEOF
13855 if ac_fn_c_try_run "$LINENO"; then :
13856 ac_cv_func_fork_works=yes
13857 else
13858 ac_cv_func_fork_works=no
13859 fi
13860 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13861 conftest.$ac_objext conftest.beam conftest.$ac_ext
13862 fi
13863
13864 fi
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13866 $as_echo "$ac_cv_func_fork_works" >&6; }
13867
13868 else
13869 ac_cv_func_fork_works=$ac_cv_func_fork
13870 fi
13871 if test "x$ac_cv_func_fork_works" = xcross; then
13872 case $host in
13873 *-*-amigaos* | *-*-msdosdjgpp*)
13874 # Override, as these systems have only a dummy fork() stub
13875 ac_cv_func_fork_works=no
13876 ;;
13877 *)
13878 ac_cv_func_fork_works=yes
13879 ;;
13880 esac
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13882 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13883 fi
13884 ac_cv_func_vfork_works=$ac_cv_func_vfork
13885 if test "x$ac_cv_func_vfork" = xyes; then
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13887 $as_echo_n "checking for working vfork... " >&6; }
13888 if ${ac_cv_func_vfork_works+:} false; then :
13889 $as_echo_n "(cached) " >&6
13890 else
13891 if test "$cross_compiling" = yes; then :
13892 ac_cv_func_vfork_works=cross
13893 else
13894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13895 /* end confdefs.h. */
13896 /* Thanks to Paul Eggert for this test. */
13897 $ac_includes_default
13898 #include <sys/wait.h>
13899 #ifdef HAVE_VFORK_H
13900 # include <vfork.h>
13901 #endif
13902 /* On some sparc systems, changes by the child to local and incoming
13903 argument registers are propagated back to the parent. The compiler
13904 is told about this with #include <vfork.h>, but some compilers
13905 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13906 static variable whose address is put into a register that is
13907 clobbered by the vfork. */
13908 static void
13909 #ifdef __cplusplus
13910 sparc_address_test (int arg)
13911 # else
13912 sparc_address_test (arg) int arg;
13913 #endif
13914 {
13915 static pid_t child;
13916 if (!child) {
13917 child = vfork ();
13918 if (child < 0) {
13919 perror ("vfork");
13920 _exit(2);
13921 }
13922 if (!child) {
13923 arg = getpid();
13924 write(-1, "", 0);
13925 _exit (arg);
13926 }
13927 }
13928 }
13929
13930 int
13931 main ()
13932 {
13933 pid_t parent = getpid ();
13934 pid_t child;
13935
13936 sparc_address_test (0);
13937
13938 child = vfork ();
13939
13940 if (child == 0) {
13941 /* Here is another test for sparc vfork register problems. This
13942 test uses lots of local variables, at least as many local
13943 variables as main has allocated so far including compiler
13944 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13945 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13946 reuse the register of parent for one of the local variables,
13947 since it will think that parent can't possibly be used any more
13948 in this routine. Assigning to the local variable will thus
13949 munge parent in the parent process. */
13950 pid_t
13951 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13952 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13953 /* Convince the compiler that p..p7 are live; otherwise, it might
13954 use the same hardware register for all 8 local variables. */
13955 if (p != p1 || p != p2 || p != p3 || p != p4
13956 || p != p5 || p != p6 || p != p7)
13957 _exit(1);
13958
13959 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13960 from child file descriptors. If the child closes a descriptor
13961 before it execs or exits, this munges the parent's descriptor
13962 as well. Test for this by closing stdout in the child. */
13963 _exit(close(fileno(stdout)) != 0);
13964 } else {
13965 int status;
13966 struct stat st;
13967
13968 while (wait(&status) != child)
13969 ;
13970 return (
13971 /* Was there some problem with vforking? */
13972 child < 0
13973
13974 /* Did the child fail? (This shouldn't happen.) */
13975 || status
13976
13977 /* Did the vfork/compiler bug occur? */
13978 || parent != getpid()
13979
13980 /* Did the file descriptor bug occur? */
13981 || fstat(fileno(stdout), &st) != 0
13982 );
13983 }
13984 }
13985 _ACEOF
13986 if ac_fn_c_try_run "$LINENO"; then :
13987 ac_cv_func_vfork_works=yes
13988 else
13989 ac_cv_func_vfork_works=no
13990 fi
13991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13992 conftest.$ac_objext conftest.beam conftest.$ac_ext
13993 fi
13994
13995 fi
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13997 $as_echo "$ac_cv_func_vfork_works" >&6; }
13998
13999 fi;
14000 if test "x$ac_cv_func_fork_works" = xcross; then
14001 ac_cv_func_vfork_works=$ac_cv_func_vfork
14002 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14003 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14004 fi
14005
14006 if test "x$ac_cv_func_vfork_works" = xyes; then
14007
14008 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
14009
14010 else
14011
14012 $as_echo "#define vfork fork" >>confdefs.h
14013
14014 fi
14015 if test "x$ac_cv_func_fork_works" = xyes; then
14016
14017 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
14018
14019 fi
14020
14021 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
14022 ptrace64 sbrk setns sigaltstack sigprocmask \
14023 setpgid setpgrp getrusage getauxval sigtimedwait
14024 do :
14025 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14026 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14027 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14028 cat >>confdefs.h <<_ACEOF
14029 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14030 _ACEOF
14031
14032 fi
14033 done
14034
14035
14036 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
14037 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
14038 # only in linux/personality.h.
14039 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
14040 "
14041 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
14042 ac_have_decl=1
14043 else
14044 ac_have_decl=0
14045 fi
14046
14047 cat >>confdefs.h <<_ACEOF
14048 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
14049 _ACEOF
14050
14051
14052 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
14053 if test "x$ac_cv_have_decl_strstr" = xyes; then :
14054 ac_have_decl=1
14055 else
14056 ac_have_decl=0
14057 fi
14058
14059 cat >>confdefs.h <<_ACEOF
14060 #define HAVE_DECL_STRSTR $ac_have_decl
14061 _ACEOF
14062
14063
14064 # ----------------------- #
14065 # Checks for structures. #
14066 # ----------------------- #
14067
14068 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
14069 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
14070
14071 cat >>confdefs.h <<_ACEOF
14072 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
14073 _ACEOF
14074
14075
14076 fi
14077 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
14078 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
14079
14080 cat >>confdefs.h <<_ACEOF
14081 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14082 _ACEOF
14083
14084
14085 fi
14086
14087
14088 # On FreeBSD we need libutil for the kinfo_get* functions. On
14089 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
14090 # Figure out which one to use.
14091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
14092 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
14093 if ${ac_cv_search_kinfo_getfile+:} false; then :
14094 $as_echo_n "(cached) " >&6
14095 else
14096 ac_func_search_save_LIBS=$LIBS
14097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14098 /* end confdefs.h. */
14099
14100 /* Override any GCC internal prototype to avoid an error.
14101 Use char because int might match the return type of a GCC
14102 builtin and then its argument prototype would still apply. */
14103 #ifdef __cplusplus
14104 extern "C"
14105 #endif
14106 char kinfo_getfile ();
14107 int
14108 main ()
14109 {
14110 return kinfo_getfile ();
14111 ;
14112 return 0;
14113 }
14114 _ACEOF
14115 for ac_lib in '' util util-freebsd; do
14116 if test -z "$ac_lib"; then
14117 ac_res="none required"
14118 else
14119 ac_res=-l$ac_lib
14120 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14121 fi
14122 if ac_fn_c_try_link "$LINENO"; then :
14123 ac_cv_search_kinfo_getfile=$ac_res
14124 fi
14125 rm -f core conftest.err conftest.$ac_objext \
14126 conftest$ac_exeext
14127 if ${ac_cv_search_kinfo_getfile+:} false; then :
14128 break
14129 fi
14130 done
14131 if ${ac_cv_search_kinfo_getfile+:} false; then :
14132
14133 else
14134 ac_cv_search_kinfo_getfile=no
14135 fi
14136 rm conftest.$ac_ext
14137 LIBS=$ac_func_search_save_LIBS
14138 fi
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
14140 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
14141 ac_res=$ac_cv_search_kinfo_getfile
14142 if test "$ac_res" != no; then :
14143 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14144
14145 fi
14146
14147
14148 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
14149 for ac_func in kinfo_getfile
14150 do :
14151 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
14152 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
14153 cat >>confdefs.h <<_ACEOF
14154 #define HAVE_KINFO_GETFILE 1
14155 _ACEOF
14156
14157 fi
14158 done
14159
14160
14161 # ----------------------- #
14162 # Check for threading. #
14163 # ----------------------- #
14164
14165 # Check whether --enable-threading was given.
14166 if test "${enable_threading+set}" = set; then :
14167 enableval=$enable_threading; case "$enableval" in
14168 yes) want_threading=yes ;;
14169 no) want_threading=no ;;
14170 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
14171 esac
14172 else
14173 want_threading=yes
14174 fi
14175
14176
14177 # Check for std::thread. This does not work on some platforms, like
14178 # mingw and DJGPP.
14179 ac_ext=cpp
14180 ac_cpp='$CXXCPP $CPPFLAGS'
14181 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14182 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14183 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14184
14185
14186
14187
14188
14189 ac_ext=c
14190 ac_cpp='$CPP $CPPFLAGS'
14191 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14192 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14193 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14194
14195 ax_pthread_ok=no
14196
14197 # We used to check for pthread.h first, but this fails if pthread.h
14198 # requires special compiler flags (e.g. on Tru64 or Sequent).
14199 # It gets checked for in the link test anyway.
14200
14201 # First of all, check if the user has set any of the PTHREAD_LIBS,
14202 # etcetera environment variables, and if threads linking works using
14203 # them:
14204 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
14205 ax_pthread_save_CC="$CC"
14206 ax_pthread_save_CFLAGS="$CFLAGS"
14207 ax_pthread_save_LIBS="$LIBS"
14208 if test "x$PTHREAD_CC" != "x"; then :
14209 CC="$PTHREAD_CC"
14210 fi
14211 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14212 LIBS="$PTHREAD_LIBS $LIBS"
14213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
14214 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
14215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216 /* end confdefs.h. */
14217
14218 /* Override any GCC internal prototype to avoid an error.
14219 Use char because int might match the return type of a GCC
14220 builtin and then its argument prototype would still apply. */
14221 #ifdef __cplusplus
14222 extern "C"
14223 #endif
14224 char pthread_join ();
14225 int
14226 main ()
14227 {
14228 return pthread_join ();
14229 ;
14230 return 0;
14231 }
14232 _ACEOF
14233 if ac_fn_c_try_link "$LINENO"; then :
14234 ax_pthread_ok=yes
14235 fi
14236 rm -f core conftest.err conftest.$ac_objext \
14237 conftest$ac_exeext conftest.$ac_ext
14238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14239 $as_echo "$ax_pthread_ok" >&6; }
14240 if test "x$ax_pthread_ok" = "xno"; then
14241 PTHREAD_LIBS=""
14242 PTHREAD_CFLAGS=""
14243 fi
14244 CC="$ax_pthread_save_CC"
14245 CFLAGS="$ax_pthread_save_CFLAGS"
14246 LIBS="$ax_pthread_save_LIBS"
14247 fi
14248
14249 # We must check for the threads library under a number of different
14250 # names; the ordering is very important because some systems
14251 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14252 # libraries is broken (non-POSIX).
14253
14254 # Create a list of thread flags to try. Items starting with a "-" are
14255 # C compiler flags, and other items are library names, except for "none"
14256 # which indicates that we try without any flags at all, and "pthread-config"
14257 # which is a program returning the flags for the Pth emulation library.
14258
14259 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
14260
14261 # The ordering *is* (sometimes) important. Some notes on the
14262 # individual items follow:
14263
14264 # pthreads: AIX (must check this before -lpthread)
14265 # none: in case threads are in libc; should be tried before -Kthread and
14266 # other compiler flags to prevent continual compiler warnings
14267 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14268 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14269 # (Note: HP C rejects this with "bad form for `-t' option")
14270 # -pthreads: Solaris/gcc (Note: HP C also rejects)
14271 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14272 # doesn't hurt to check since this sometimes defines pthreads and
14273 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
14274 # is present but should not be used directly; and before -mthreads,
14275 # because the compiler interprets this as "-mt" + "-hreads")
14276 # -mthreads: Mingw32/gcc, Lynx/gcc
14277 # pthread: Linux, etcetera
14278 # --thread-safe: KAI C++
14279 # pthread-config: use pthread-config program (for GNU Pth library)
14280
14281 case $host_os in
14282
14283 freebsd*)
14284
14285 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14286 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
14287
14288 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14289 ;;
14290
14291 hpux*)
14292
14293 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14294 # multi-threading and also sets -lpthread."
14295
14296 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14297 ;;
14298
14299 openedition*)
14300
14301 # IBM z/OS requires a feature-test macro to be defined in order to
14302 # enable POSIX threads at all, so give the user a hint if this is
14303 # not set. (We don't define these ourselves, as they can affect
14304 # other portions of the system API in unpredictable ways.)
14305
14306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14307 /* end confdefs.h. */
14308
14309 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14310 AX_PTHREAD_ZOS_MISSING
14311 # endif
14312
14313 _ACEOF
14314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14315 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14317 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
14318 fi
14319 rm -f conftest*
14320
14321 ;;
14322
14323 solaris*)
14324
14325 # On Solaris (at least, for some versions), libc contains stubbed
14326 # (non-functional) versions of the pthreads routines, so link-based
14327 # tests will erroneously succeed. (N.B.: The stubs are missing
14328 # pthread_cleanup_push, or rather a function called by this macro,
14329 # so we could check for that, but who knows whether they'll stub
14330 # that too in a future libc.) So we'll check first for the
14331 # standard Solaris way of linking pthreads (-mt -lpthread).
14332
14333 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
14334 ;;
14335 esac
14336
14337 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14338
14339 if test "x$GCC" = "xyes"; then :
14340 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
14341 fi
14342
14343 # The presence of a feature test macro requesting re-entrant function
14344 # definitions is, on some systems, a strong hint that pthreads support is
14345 # correctly enabled
14346
14347 case $host_os in
14348 darwin* | hpux* | linux* | osf* | solaris*)
14349 ax_pthread_check_macro="_REENTRANT"
14350 ;;
14351
14352 aix*)
14353 ax_pthread_check_macro="_THREAD_SAFE"
14354 ;;
14355
14356 *)
14357 ax_pthread_check_macro="--"
14358 ;;
14359 esac
14360 if test "x$ax_pthread_check_macro" = "x--"; then :
14361 ax_pthread_check_cond=0
14362 else
14363 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
14364 fi
14365
14366 # Are we compiling with Clang?
14367
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14369 $as_echo_n "checking whether $CC is Clang... " >&6; }
14370 if ${ax_cv_PTHREAD_CLANG+:} false; then :
14371 $as_echo_n "(cached) " >&6
14372 else
14373 ax_cv_PTHREAD_CLANG=no
14374 # Note that Autoconf sets GCC=yes for Clang as well as GCC
14375 if test "x$GCC" = "xyes"; then
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377 /* end confdefs.h. */
14378 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14379 # if defined(__clang__) && defined(__llvm__)
14380 AX_PTHREAD_CC_IS_CLANG
14381 # endif
14382
14383 _ACEOF
14384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14385 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14386 ax_cv_PTHREAD_CLANG=yes
14387 fi
14388 rm -f conftest*
14389
14390 fi
14391
14392 fi
14393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14394 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14395 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
14396
14397 ax_pthread_clang_warning=no
14398
14399 # Clang needs special handling, because older versions handle the -pthread
14400 # option in a rather... idiosyncratic way
14401
14402 if test "x$ax_pthread_clang" = "xyes"; then
14403
14404 # Clang takes -pthread; it has never supported any other flag
14405
14406 # (Note 1: This will need to be revisited if a system that Clang
14407 # supports has POSIX threads in a separate library. This tends not
14408 # to be the way of modern systems, but it's conceivable.)
14409
14410 # (Note 2: On some systems, notably Darwin, -pthread is not needed
14411 # to get POSIX threads support; the API is always present and
14412 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
14413 # -pthread does define _REENTRANT, and while the Darwin headers
14414 # ignore this macro, third-party headers might not.)
14415
14416 PTHREAD_CFLAGS="-pthread"
14417 PTHREAD_LIBS=
14418
14419 ax_pthread_ok=yes
14420
14421 # However, older versions of Clang make a point of warning the user
14422 # that, in an invocation where only linking and no compilation is
14423 # taking place, the -pthread option has no effect ("argument unused
14424 # during compilation"). They expect -pthread to be passed in only
14425 # when source code is being compiled.
14426 #
14427 # Problem is, this is at odds with the way Automake and most other
14428 # C build frameworks function, which is that the same flags used in
14429 # compilation (CFLAGS) are also used in linking. Many systems
14430 # supported by AX_PTHREAD require exactly this for POSIX threads
14431 # support, and in fact it is often not straightforward to specify a
14432 # flag that is used only in the compilation phase and not in
14433 # linking. Such a scenario is extremely rare in practice.
14434 #
14435 # Even though use of the -pthread flag in linking would only print
14436 # a warning, this can be a nuisance for well-run software projects
14437 # that build with -Werror. So if the active version of Clang has
14438 # this misfeature, we search for an option to squash it.
14439
14440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14441 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14442 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14443 $as_echo_n "(cached) " >&6
14444 else
14445 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14446 # Create an alternate version of $ac_link that compiles and
14447 # links in two steps (.c -> .o, .o -> exe) instead of one
14448 # (.c -> exe), because the warning occurs only in the second
14449 # step
14450 ax_pthread_save_ac_link="$ac_link"
14451 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14452 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14453 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14454 ax_pthread_save_CFLAGS="$CFLAGS"
14455 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14456 if test "x$ax_pthread_try" = "xunknown"; then :
14457 break
14458 fi
14459 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14460 ac_link="$ax_pthread_save_ac_link"
14461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14462 /* end confdefs.h. */
14463 int main(void){return 0;}
14464 _ACEOF
14465 if ac_fn_c_try_link "$LINENO"; then :
14466 ac_link="$ax_pthread_2step_ac_link"
14467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14468 /* end confdefs.h. */
14469 int main(void){return 0;}
14470 _ACEOF
14471 if ac_fn_c_try_link "$LINENO"; then :
14472 break
14473 fi
14474 rm -f core conftest.err conftest.$ac_objext \
14475 conftest$ac_exeext conftest.$ac_ext
14476
14477 fi
14478 rm -f core conftest.err conftest.$ac_objext \
14479 conftest$ac_exeext conftest.$ac_ext
14480 done
14481 ac_link="$ax_pthread_save_ac_link"
14482 CFLAGS="$ax_pthread_save_CFLAGS"
14483 if test "x$ax_pthread_try" = "x"; then :
14484 ax_pthread_try=no
14485 fi
14486 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
14487
14488 fi
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14490 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
14491
14492 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14493 no | unknown) ;;
14494 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14495 esac
14496
14497 fi # $ax_pthread_clang = yes
14498
14499 if test "x$ax_pthread_ok" = "xno"; then
14500 for ax_pthread_try_flag in $ax_pthread_flags; do
14501
14502 case $ax_pthread_try_flag in
14503 none)
14504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14505 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
14506 ;;
14507
14508 -mt,pthread)
14509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14510 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14511 PTHREAD_CFLAGS="-mt"
14512 PTHREAD_LIBS="-lpthread"
14513 ;;
14514
14515 -*)
14516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14517 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14518 PTHREAD_CFLAGS="$ax_pthread_try_flag"
14519 ;;
14520
14521 pthread-config)
14522 # Extract the first word of "pthread-config", so it can be a program name with args.
14523 set dummy pthread-config; ac_word=$2
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14525 $as_echo_n "checking for $ac_word... " >&6; }
14526 if ${ac_cv_prog_ax_pthread_config+:} false; then :
14527 $as_echo_n "(cached) " >&6
14528 else
14529 if test -n "$ax_pthread_config"; then
14530 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14531 else
14532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14533 for as_dir in $PATH
14534 do
14535 IFS=$as_save_IFS
14536 test -z "$as_dir" && as_dir=.
14537 for ac_exec_ext in '' $ac_executable_extensions; do
14538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14539 ac_cv_prog_ax_pthread_config="yes"
14540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14541 break 2
14542 fi
14543 done
14544 done
14545 IFS=$as_save_IFS
14546
14547 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14548 fi
14549 fi
14550 ax_pthread_config=$ac_cv_prog_ax_pthread_config
14551 if test -n "$ax_pthread_config"; then
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14553 $as_echo "$ax_pthread_config" >&6; }
14554 else
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14556 $as_echo "no" >&6; }
14557 fi
14558
14559
14560 if test "x$ax_pthread_config" = "xno"; then :
14561 continue
14562 fi
14563 PTHREAD_CFLAGS="`pthread-config --cflags`"
14564 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14565 ;;
14566
14567 *)
14568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14569 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14570 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14571 ;;
14572 esac
14573
14574 ax_pthread_save_CFLAGS="$CFLAGS"
14575 ax_pthread_save_LIBS="$LIBS"
14576 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14577 LIBS="$PTHREAD_LIBS $LIBS"
14578
14579 # Check for various functions. We must include pthread.h,
14580 # since some functions may be macros. (On the Sequent, we
14581 # need a special flag -Kthread to make this header compile.)
14582 # We check for pthread_join because it is in -lpthread on IRIX
14583 # while pthread_create is in libc. We check for pthread_attr_init
14584 # due to DEC craziness with -lpthreads. We check for
14585 # pthread_cleanup_push because it is one of the few pthread
14586 # functions on Solaris that doesn't have a non-functional libc stub.
14587 # We try pthread_create on general principles.
14588
14589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590 /* end confdefs.h. */
14591 #include <pthread.h>
14592 # if $ax_pthread_check_cond
14593 # error "$ax_pthread_check_macro must be defined"
14594 # endif
14595 static void routine(void *a) { a = 0; }
14596 static void *start_routine(void *a) { return a; }
14597 int
14598 main ()
14599 {
14600 pthread_t th; pthread_attr_t attr;
14601 pthread_create(&th, 0, start_routine, 0);
14602 pthread_join(th, 0);
14603 pthread_attr_init(&attr);
14604 pthread_cleanup_push(routine, 0);
14605 pthread_cleanup_pop(0) /* ; */
14606 ;
14607 return 0;
14608 }
14609 _ACEOF
14610 if ac_fn_c_try_link "$LINENO"; then :
14611 ax_pthread_ok=yes
14612 fi
14613 rm -f core conftest.err conftest.$ac_objext \
14614 conftest$ac_exeext conftest.$ac_ext
14615
14616 CFLAGS="$ax_pthread_save_CFLAGS"
14617 LIBS="$ax_pthread_save_LIBS"
14618
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14620 $as_echo "$ax_pthread_ok" >&6; }
14621 if test "x$ax_pthread_ok" = "xyes"; then :
14622 break
14623 fi
14624
14625 PTHREAD_LIBS=""
14626 PTHREAD_CFLAGS=""
14627 done
14628 fi
14629
14630 # Various other checks:
14631 if test "x$ax_pthread_ok" = "xyes"; then
14632 ax_pthread_save_CFLAGS="$CFLAGS"
14633 ax_pthread_save_LIBS="$LIBS"
14634 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14635 LIBS="$PTHREAD_LIBS $LIBS"
14636
14637 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14639 $as_echo_n "checking for joinable pthread attribute... " >&6; }
14640 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14641 $as_echo_n "(cached) " >&6
14642 else
14643 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14644 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14646 /* end confdefs.h. */
14647 #include <pthread.h>
14648 int
14649 main ()
14650 {
14651 int attr = $ax_pthread_attr; return attr /* ; */
14652 ;
14653 return 0;
14654 }
14655 _ACEOF
14656 if ac_fn_c_try_link "$LINENO"; then :
14657 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14658 fi
14659 rm -f core conftest.err conftest.$ac_objext \
14660 conftest$ac_exeext conftest.$ac_ext
14661 done
14662
14663 fi
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14665 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14666 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14667 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14668 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14669
14670 cat >>confdefs.h <<_ACEOF
14671 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14672 _ACEOF
14673
14674 ax_pthread_joinable_attr_defined=yes
14675
14676 fi
14677
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14679 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14680 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14681 $as_echo_n "(cached) " >&6
14682 else
14683 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14684 case $host_os in
14685 solaris*)
14686 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14687 ;;
14688 esac
14689
14690 fi
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14692 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14693 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14694 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14695 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14696 ax_pthread_special_flags_added=yes
14697 fi
14698
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14700 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14701 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14702 $as_echo_n "(cached) " >&6
14703 else
14704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14705 /* end confdefs.h. */
14706 #include <pthread.h>
14707 int
14708 main ()
14709 {
14710 int i = PTHREAD_PRIO_INHERIT;
14711 ;
14712 return 0;
14713 }
14714 _ACEOF
14715 if ac_fn_c_try_link "$LINENO"; then :
14716 ax_cv_PTHREAD_PRIO_INHERIT=yes
14717 else
14718 ax_cv_PTHREAD_PRIO_INHERIT=no
14719 fi
14720 rm -f core conftest.err conftest.$ac_objext \
14721 conftest$ac_exeext conftest.$ac_ext
14722
14723 fi
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14725 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14726 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14727 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14728
14729 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14730
14731 ax_pthread_prio_inherit_defined=yes
14732
14733 fi
14734
14735 CFLAGS="$ax_pthread_save_CFLAGS"
14736 LIBS="$ax_pthread_save_LIBS"
14737
14738 # More AIX lossage: compile with *_r variant
14739 if test "x$GCC" != "xyes"; then
14740 case $host_os in
14741 aix*)
14742 case "x/$CC" in #(
14743 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14744 #handle absolute path differently from PATH based program lookup
14745 case "x$CC" in #(
14746 x/*) :
14747 if as_fn_executable_p ${CC}_r; then :
14748 PTHREAD_CC="${CC}_r"
14749 fi ;; #(
14750 *) :
14751 for ac_prog in ${CC}_r
14752 do
14753 # Extract the first word of "$ac_prog", so it can be a program name with args.
14754 set dummy $ac_prog; ac_word=$2
14755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14756 $as_echo_n "checking for $ac_word... " >&6; }
14757 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14758 $as_echo_n "(cached) " >&6
14759 else
14760 if test -n "$PTHREAD_CC"; then
14761 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14762 else
14763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14764 for as_dir in $PATH
14765 do
14766 IFS=$as_save_IFS
14767 test -z "$as_dir" && as_dir=.
14768 for ac_exec_ext in '' $ac_executable_extensions; do
14769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14770 ac_cv_prog_PTHREAD_CC="$ac_prog"
14771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14772 break 2
14773 fi
14774 done
14775 done
14776 IFS=$as_save_IFS
14777
14778 fi
14779 fi
14780 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14781 if test -n "$PTHREAD_CC"; then
14782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14783 $as_echo "$PTHREAD_CC" >&6; }
14784 else
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14786 $as_echo "no" >&6; }
14787 fi
14788
14789
14790 test -n "$PTHREAD_CC" && break
14791 done
14792 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14793 ;;
14794 esac ;; #(
14795 *) :
14796 ;;
14797 esac
14798 ;;
14799 esac
14800 fi
14801 fi
14802
14803 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14804
14805
14806
14807
14808
14809 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14810 if test "x$ax_pthread_ok" = "xyes"; then
14811 threads=yes
14812 :
14813 else
14814 ax_pthread_ok=no
14815 threads=no
14816 fi
14817 ac_ext=cpp
14818 ac_cpp='$CXXCPP $CPPFLAGS'
14819 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14820 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14821 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14822
14823
14824 save_LIBS="$LIBS"
14825 LIBS="$PTHREAD_LIBS $LIBS"
14826 save_CXXFLAGS="$CXXFLAGS"
14827 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14829 $as_echo_n "checking for std::thread... " >&6; }
14830 if ${gdb_cv_cxx_std_thread+:} false; then :
14831 $as_echo_n "(cached) " >&6
14832 else
14833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14834 /* end confdefs.h. */
14835 #include <thread>
14836 void callback() { }
14837 int
14838 main ()
14839 {
14840 std::thread t(callback);
14841 ;
14842 return 0;
14843 }
14844 _ACEOF
14845 if ac_fn_cxx_try_compile "$LINENO"; then :
14846 gdb_cv_cxx_std_thread=yes
14847 else
14848 gdb_cv_cxx_std_thread=no
14849 fi
14850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14851 fi
14852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14853 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
14854
14855 if test "$threads" = "yes"; then
14856 # This check must be here, while LIBS includes any necessary
14857 # threading library.
14858 for ac_func in pthread_sigmask pthread_setname_np
14859 do :
14860 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14861 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14862 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14863 cat >>confdefs.h <<_ACEOF
14864 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14865 _ACEOF
14866
14867 fi
14868 done
14869
14870 fi
14871 LIBS="$save_LIBS"
14872 CXXFLAGS="$save_CXXFLAGS"
14873
14874 if test "$want_threading" = "yes"; then
14875 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14876
14877 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14878
14879 fi
14880 fi
14881 ac_ext=c
14882 ac_cpp='$CPP $CPPFLAGS'
14883 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14884 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14885 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14886
14887
14888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14889 $as_echo_n "checking for sigsetjmp... " >&6; }
14890 if ${gdb_cv_func_sigsetjmp+:} false; then :
14891 $as_echo_n "(cached) " >&6
14892 else
14893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14894 /* end confdefs.h. */
14895 #include <setjmp.h>
14896 int
14897 main ()
14898 {
14899 sigjmp_buf env;
14900 while (! sigsetjmp (env, 1))
14901 siglongjmp (env, 1);
14902
14903 ;
14904 return 0;
14905 }
14906 _ACEOF
14907 if ac_fn_c_try_compile "$LINENO"; then :
14908 gdb_cv_func_sigsetjmp=yes
14909 else
14910 gdb_cv_func_sigsetjmp=no
14911
14912 fi
14913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14914
14915 fi
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14917 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14918 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14919
14920 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14921
14922 fi
14923
14924
14925 # Check whether --with-intel_pt was given.
14926 if test "${with_intel_pt+set}" = set; then :
14927 withval=$with_intel_pt;
14928 else
14929 with_intel_pt=auto
14930 fi
14931
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14933 $as_echo_n "checking whether to use intel pt... " >&6; }
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14935 $as_echo "$with_intel_pt" >&6; }
14936
14937 if test "${with_intel_pt}" = no; then
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14939 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14940 HAVE_LIBIPT=no
14941 else
14942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14943 /* end confdefs.h. */
14944
14945 #include <linux/perf_event.h>
14946 #ifndef PERF_ATTR_SIZE_VER5
14947 # error
14948 #endif
14949
14950 _ACEOF
14951 if ac_fn_c_try_cpp "$LINENO"; then :
14952 perf_event=yes
14953 else
14954 perf_event=no
14955 fi
14956 rm -f conftest.err conftest.i conftest.$ac_ext
14957 if test "$perf_event" != yes; then
14958 if test "$with_intel_pt" = yes; then
14959 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14960 else
14961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14962 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14963 fi
14964 fi
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974 use_additional=yes
14975
14976 acl_save_prefix="$prefix"
14977 prefix="$acl_final_prefix"
14978 acl_save_exec_prefix="$exec_prefix"
14979 exec_prefix="$acl_final_exec_prefix"
14980
14981 eval additional_includedir=\"$includedir\"
14982 eval additional_libdir=\"$libdir\"
14983
14984 exec_prefix="$acl_save_exec_prefix"
14985 prefix="$acl_save_prefix"
14986
14987
14988 # Check whether --with-libipt-prefix was given.
14989 if test "${with_libipt_prefix+set}" = set; then :
14990 withval=$with_libipt_prefix;
14991 if test "X$withval" = "Xno"; then
14992 use_additional=no
14993 else
14994 if test "X$withval" = "X"; then
14995
14996 acl_save_prefix="$prefix"
14997 prefix="$acl_final_prefix"
14998 acl_save_exec_prefix="$exec_prefix"
14999 exec_prefix="$acl_final_exec_prefix"
15000
15001 eval additional_includedir=\"$includedir\"
15002 eval additional_libdir=\"$libdir\"
15003
15004 exec_prefix="$acl_save_exec_prefix"
15005 prefix="$acl_save_prefix"
15006
15007 else
15008 additional_includedir="$withval/include"
15009 additional_libdir="$withval/lib"
15010 fi
15011 fi
15012
15013 fi
15014
15015
15016 # Check whether --with-libipt-type was given.
15017 if test "${with_libipt_type+set}" = set; then :
15018 withval=$with_libipt_type; with_libipt_type=$withval
15019 else
15020 with_libipt_type=auto
15021 fi
15022
15023 lib_type=`eval echo \$with_libipt_type`
15024
15025 LIBIPT=
15026 LTLIBIPT=
15027 INCIPT=
15028 rpathdirs=
15029 ltrpathdirs=
15030 names_already_handled=
15031 names_next_round='ipt '
15032 while test -n "$names_next_round"; do
15033 names_this_round="$names_next_round"
15034 names_next_round=
15035 for name in $names_this_round; do
15036 already_handled=
15037 for n in $names_already_handled; do
15038 if test "$n" = "$name"; then
15039 already_handled=yes
15040 break
15041 fi
15042 done
15043 if test -z "$already_handled"; then
15044 names_already_handled="$names_already_handled $name"
15045 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15046 eval value=\"\$HAVE_LIB$uppername\"
15047 if test -n "$value"; then
15048 if test "$value" = yes; then
15049 eval value=\"\$LIB$uppername\"
15050 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
15051 eval value=\"\$LTLIB$uppername\"
15052 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
15053 else
15054 :
15055 fi
15056 else
15057 found_dir=
15058 found_la=
15059 found_so=
15060 found_a=
15061 if test $use_additional = yes; then
15062 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
15063 found_dir="$additional_libdir"
15064 found_so="$additional_libdir/lib$name.$shlibext"
15065 if test -f "$additional_libdir/lib$name.la"; then
15066 found_la="$additional_libdir/lib$name.la"
15067 fi
15068 elif test x$lib_type != xshared; then
15069 if test -f "$additional_libdir/lib$name.$libext"; then
15070 found_dir="$additional_libdir"
15071 found_a="$additional_libdir/lib$name.$libext"
15072 if test -f "$additional_libdir/lib$name.la"; then
15073 found_la="$additional_libdir/lib$name.la"
15074 fi
15075 fi
15076 fi
15077 fi
15078 if test "X$found_dir" = "X"; then
15079 for x in $LDFLAGS $LTLIBIPT; do
15080
15081 acl_save_prefix="$prefix"
15082 prefix="$acl_final_prefix"
15083 acl_save_exec_prefix="$exec_prefix"
15084 exec_prefix="$acl_final_exec_prefix"
15085 eval x=\"$x\"
15086 exec_prefix="$acl_save_exec_prefix"
15087 prefix="$acl_save_prefix"
15088
15089 case "$x" in
15090 -L*)
15091 dir=`echo "X$x" | sed -e 's/^X-L//'`
15092 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
15093 found_dir="$dir"
15094 found_so="$dir/lib$name.$shlibext"
15095 if test -f "$dir/lib$name.la"; then
15096 found_la="$dir/lib$name.la"
15097 fi
15098 elif test x$lib_type != xshared; then
15099 if test -f "$dir/lib$name.$libext"; then
15100 found_dir="$dir"
15101 found_a="$dir/lib$name.$libext"
15102 if test -f "$dir/lib$name.la"; then
15103 found_la="$dir/lib$name.la"
15104 fi
15105 fi
15106 fi
15107 ;;
15108 esac
15109 if test "X$found_dir" != "X"; then
15110 break
15111 fi
15112 done
15113 fi
15114 if test "X$found_dir" != "X"; then
15115 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
15116 if test "X$found_so" != "X"; then
15117 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15118 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15119 else
15120 haveit=
15121 for x in $ltrpathdirs; do
15122 if test "X$x" = "X$found_dir"; then
15123 haveit=yes
15124 break
15125 fi
15126 done
15127 if test -z "$haveit"; then
15128 ltrpathdirs="$ltrpathdirs $found_dir"
15129 fi
15130 if test "$hardcode_direct" = yes; then
15131 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15132 else
15133 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15134 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15135 haveit=
15136 for x in $rpathdirs; do
15137 if test "X$x" = "X$found_dir"; then
15138 haveit=yes
15139 break
15140 fi
15141 done
15142 if test -z "$haveit"; then
15143 rpathdirs="$rpathdirs $found_dir"
15144 fi
15145 else
15146 haveit=
15147 for x in $LDFLAGS $LIBIPT; do
15148
15149 acl_save_prefix="$prefix"
15150 prefix="$acl_final_prefix"
15151 acl_save_exec_prefix="$exec_prefix"
15152 exec_prefix="$acl_final_exec_prefix"
15153 eval x=\"$x\"
15154 exec_prefix="$acl_save_exec_prefix"
15155 prefix="$acl_save_prefix"
15156
15157 if test "X$x" = "X-L$found_dir"; then
15158 haveit=yes
15159 break
15160 fi
15161 done
15162 if test -z "$haveit"; then
15163 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
15164 fi
15165 if test "$hardcode_minus_L" != no; then
15166 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15167 else
15168 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15169 fi
15170 fi
15171 fi
15172 fi
15173 else
15174 if test "X$found_a" != "X"; then
15175 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
15176 else
15177 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
15178 fi
15179 fi
15180 additional_includedir=
15181 case "$found_dir" in
15182 */lib | */lib/)
15183 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15184 additional_includedir="$basedir/include"
15185 ;;
15186 esac
15187 if test "X$additional_includedir" != "X"; then
15188 if test "X$additional_includedir" != "X/usr/include"; then
15189 haveit=
15190 if test "X$additional_includedir" = "X/usr/local/include"; then
15191 if test -n "$GCC"; then
15192 case $host_os in
15193 linux*) haveit=yes;;
15194 esac
15195 fi
15196 fi
15197 if test -z "$haveit"; then
15198 for x in $CPPFLAGS $INCIPT; do
15199
15200 acl_save_prefix="$prefix"
15201 prefix="$acl_final_prefix"
15202 acl_save_exec_prefix="$exec_prefix"
15203 exec_prefix="$acl_final_exec_prefix"
15204 eval x=\"$x\"
15205 exec_prefix="$acl_save_exec_prefix"
15206 prefix="$acl_save_prefix"
15207
15208 if test "X$x" = "X-I$additional_includedir"; then
15209 haveit=yes
15210 break
15211 fi
15212 done
15213 if test -z "$haveit"; then
15214 if test -d "$additional_includedir"; then
15215 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
15216 fi
15217 fi
15218 fi
15219 fi
15220 fi
15221 if test -n "$found_la"; then
15222 save_libdir="$libdir"
15223 case "$found_la" in
15224 */* | *\\*) . "$found_la" ;;
15225 *) . "./$found_la" ;;
15226 esac
15227 libdir="$save_libdir"
15228 for dep in $dependency_libs; do
15229 case "$dep" in
15230 -L*)
15231 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15232 if test "X$additional_libdir" != "X/usr/lib"; then
15233 haveit=
15234 if test "X$additional_libdir" = "X/usr/local/lib"; then
15235 if test -n "$GCC"; then
15236 case $host_os in
15237 linux*) haveit=yes;;
15238 esac
15239 fi
15240 fi
15241 if test -z "$haveit"; then
15242 haveit=
15243 for x in $LDFLAGS $LIBIPT; do
15244
15245 acl_save_prefix="$prefix"
15246 prefix="$acl_final_prefix"
15247 acl_save_exec_prefix="$exec_prefix"
15248 exec_prefix="$acl_final_exec_prefix"
15249 eval x=\"$x\"
15250 exec_prefix="$acl_save_exec_prefix"
15251 prefix="$acl_save_prefix"
15252
15253 if test "X$x" = "X-L$additional_libdir"; then
15254 haveit=yes
15255 break
15256 fi
15257 done
15258 if test -z "$haveit"; then
15259 if test -d "$additional_libdir"; then
15260 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
15261 fi
15262 fi
15263 haveit=
15264 for x in $LDFLAGS $LTLIBIPT; do
15265
15266 acl_save_prefix="$prefix"
15267 prefix="$acl_final_prefix"
15268 acl_save_exec_prefix="$exec_prefix"
15269 exec_prefix="$acl_final_exec_prefix"
15270 eval x=\"$x\"
15271 exec_prefix="$acl_save_exec_prefix"
15272 prefix="$acl_save_prefix"
15273
15274 if test "X$x" = "X-L$additional_libdir"; then
15275 haveit=yes
15276 break
15277 fi
15278 done
15279 if test -z "$haveit"; then
15280 if test -d "$additional_libdir"; then
15281 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
15282 fi
15283 fi
15284 fi
15285 fi
15286 ;;
15287 -R*)
15288 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15289 if test "$enable_rpath" != no; then
15290 haveit=
15291 for x in $rpathdirs; do
15292 if test "X$x" = "X$dir"; then
15293 haveit=yes
15294 break
15295 fi
15296 done
15297 if test -z "$haveit"; then
15298 rpathdirs="$rpathdirs $dir"
15299 fi
15300 haveit=
15301 for x in $ltrpathdirs; do
15302 if test "X$x" = "X$dir"; then
15303 haveit=yes
15304 break
15305 fi
15306 done
15307 if test -z "$haveit"; then
15308 ltrpathdirs="$ltrpathdirs $dir"
15309 fi
15310 fi
15311 ;;
15312 -l*)
15313 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15314 ;;
15315 *.la)
15316 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15317 ;;
15318 *)
15319 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
15320 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
15321 ;;
15322 esac
15323 done
15324 fi
15325 else
15326 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
15327 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15328 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
15329 else
15330 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
15331 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
15332 fi
15333 fi
15334 fi
15335 fi
15336 done
15337 done
15338 if test "X$rpathdirs" != "X"; then
15339 if test -n "$hardcode_libdir_separator"; then
15340 alldirs=
15341 for found_dir in $rpathdirs; do
15342 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15343 done
15344 acl_save_libdir="$libdir"
15345 libdir="$alldirs"
15346 eval flag=\"$hardcode_libdir_flag_spec\"
15347 libdir="$acl_save_libdir"
15348 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15349 else
15350 for found_dir in $rpathdirs; do
15351 acl_save_libdir="$libdir"
15352 libdir="$found_dir"
15353 eval flag=\"$hardcode_libdir_flag_spec\"
15354 libdir="$acl_save_libdir"
15355 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15356 done
15357 fi
15358 fi
15359 if test "X$ltrpathdirs" != "X"; then
15360 for found_dir in $ltrpathdirs; do
15361 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
15362 done
15363 fi
15364
15365
15366 ac_save_CPPFLAGS="$CPPFLAGS"
15367
15368 for element in $INCIPT; do
15369 haveit=
15370 for x in $CPPFLAGS; do
15371
15372 acl_save_prefix="$prefix"
15373 prefix="$acl_final_prefix"
15374 acl_save_exec_prefix="$exec_prefix"
15375 exec_prefix="$acl_final_exec_prefix"
15376 eval x=\"$x\"
15377 exec_prefix="$acl_save_exec_prefix"
15378 prefix="$acl_save_prefix"
15379
15380 if test "X$x" = "X$element"; then
15381 haveit=yes
15382 break
15383 fi
15384 done
15385 if test -z "$haveit"; then
15386 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15387 fi
15388 done
15389
15390
15391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
15392 $as_echo_n "checking for libipt... " >&6; }
15393 if ${ac_cv_libipt+:} false; then :
15394 $as_echo_n "(cached) " >&6
15395 else
15396
15397 ac_save_LIBS="$LIBS"
15398 LIBS="$LIBS $LIBIPT"
15399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15400 /* end confdefs.h. */
15401 #include "intel-pt.h"
15402 int
15403 main ()
15404 {
15405 pt_insn_alloc_decoder (0);
15406 ;
15407 return 0;
15408 }
15409 _ACEOF
15410 if ac_fn_c_try_link "$LINENO"; then :
15411 ac_cv_libipt=yes
15412 else
15413 ac_cv_libipt=no
15414 fi
15415 rm -f core conftest.err conftest.$ac_objext \
15416 conftest$ac_exeext conftest.$ac_ext
15417 LIBS="$ac_save_LIBS"
15418
15419 fi
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
15421 $as_echo "$ac_cv_libipt" >&6; }
15422 if test "$ac_cv_libipt" = yes; then
15423 HAVE_LIBIPT=yes
15424
15425 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
15426
15427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
15428 $as_echo_n "checking how to link with libipt... " >&6; }
15429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
15430 $as_echo "$LIBIPT" >&6; }
15431 else
15432 HAVE_LIBIPT=no
15433 CPPFLAGS="$ac_save_CPPFLAGS"
15434 LIBIPT=
15435 LTLIBIPT=
15436 fi
15437
15438
15439
15440
15441
15442
15443 if test "$HAVE_LIBIPT" != yes; then
15444 if test "$with_intel_pt" = yes; then
15445 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
15446 else
15447 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
15448 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
15449 fi
15450 else
15451 save_LIBS=$LIBS
15452 LIBS="$LIBS $LIBIPT"
15453 for ac_func in pt_insn_event
15454 do :
15455 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
15456 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
15457 cat >>confdefs.h <<_ACEOF
15458 #define HAVE_PT_INSN_EVENT 1
15459 _ACEOF
15460
15461 fi
15462 done
15463
15464 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
15465 "
15466 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
15467
15468 cat >>confdefs.h <<_ACEOF
15469 #define HAVE_STRUCT_PT_INSN_ENABLED 1
15470 _ACEOF
15471
15472
15473 fi
15474 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
15475 "
15476 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
15477
15478 cat >>confdefs.h <<_ACEOF
15479 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
15480 _ACEOF
15481
15482
15483 fi
15484
15485 LIBS=$save_LIBS
15486 fi
15487 fi
15488
15489 # Check if the compiler and runtime support printing long longs.
15490
15491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15492 $as_echo_n "checking for long long support in printf... " >&6; }
15493 if ${gdb_cv_printf_has_long_long+:} false; then :
15494 $as_echo_n "(cached) " >&6
15495 else
15496 if test "$cross_compiling" = yes; then :
15497 gdb_cv_printf_has_long_long=no
15498 else
15499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500 /* end confdefs.h. */
15501 $ac_includes_default
15502 int
15503 main ()
15504 {
15505 char buf[32];
15506 long long l = 0;
15507 l = (l << 16) + 0x0123;
15508 l = (l << 16) + 0x4567;
15509 l = (l << 16) + 0x89ab;
15510 l = (l << 16) + 0xcdef;
15511 sprintf (buf, "0x%016llx", l);
15512 return (strcmp ("0x0123456789abcdef", buf));
15513 ;
15514 return 0;
15515 }
15516 _ACEOF
15517 if ac_fn_c_try_run "$LINENO"; then :
15518 gdb_cv_printf_has_long_long=yes
15519 else
15520 gdb_cv_printf_has_long_long=no
15521 fi
15522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15523 conftest.$ac_objext conftest.beam conftest.$ac_ext
15524 fi
15525
15526 fi
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15528 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15529 if test "$gdb_cv_printf_has_long_long" = yes; then
15530
15531 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15532
15533 fi
15534
15535
15536 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15537
15538 for ac_header in sys/procfs.h
15539 do :
15540 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
15541 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
15542 cat >>confdefs.h <<_ACEOF
15543 #define HAVE_SYS_PROCFS_H 1
15544 _ACEOF
15545
15546 fi
15547
15548 done
15549
15550 if test "$ac_cv_header_sys_procfs_h" = yes; then
15551
15552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15553 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15554 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
15555 $as_echo_n "(cached) " >&6
15556 else
15557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15558 /* end confdefs.h. */
15559
15560 #define _SYSCALL32
15561 #include <sys/procfs.h>
15562 int
15563 main ()
15564 {
15565 gregset_t avar
15566 ;
15567 return 0;
15568 }
15569 _ACEOF
15570 if ac_fn_c_try_compile "$LINENO"; then :
15571 bfd_cv_have_sys_procfs_type_gregset_t=yes
15572 else
15573 bfd_cv_have_sys_procfs_type_gregset_t=no
15574
15575 fi
15576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15577 fi
15578
15579 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
15580
15581 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
15582
15583 fi
15584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15585 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
15586
15587
15588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15589 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15590 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
15591 $as_echo_n "(cached) " >&6
15592 else
15593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15594 /* end confdefs.h. */
15595
15596 #define _SYSCALL32
15597 #include <sys/procfs.h>
15598 int
15599 main ()
15600 {
15601 fpregset_t avar
15602 ;
15603 return 0;
15604 }
15605 _ACEOF
15606 if ac_fn_c_try_compile "$LINENO"; then :
15607 bfd_cv_have_sys_procfs_type_fpregset_t=yes
15608 else
15609 bfd_cv_have_sys_procfs_type_fpregset_t=no
15610
15611 fi
15612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15613 fi
15614
15615 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
15616
15617 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
15618
15619 fi
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15621 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
15622
15623
15624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15625 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15626 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
15627 $as_echo_n "(cached) " >&6
15628 else
15629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15630 /* end confdefs.h. */
15631
15632 #define _SYSCALL32
15633 #include <sys/procfs.h>
15634 int
15635 main ()
15636 {
15637 prgregset_t avar
15638 ;
15639 return 0;
15640 }
15641 _ACEOF
15642 if ac_fn_c_try_compile "$LINENO"; then :
15643 bfd_cv_have_sys_procfs_type_prgregset_t=yes
15644 else
15645 bfd_cv_have_sys_procfs_type_prgregset_t=no
15646
15647 fi
15648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15649 fi
15650
15651 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
15652
15653 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15654
15655 fi
15656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15657 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15658
15659
15660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15661 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15662 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
15663 $as_echo_n "(cached) " >&6
15664 else
15665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15666 /* end confdefs.h. */
15667
15668 #define _SYSCALL32
15669 #include <sys/procfs.h>
15670 int
15671 main ()
15672 {
15673 prfpregset_t avar
15674 ;
15675 return 0;
15676 }
15677 _ACEOF
15678 if ac_fn_c_try_compile "$LINENO"; then :
15679 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
15680 else
15681 bfd_cv_have_sys_procfs_type_prfpregset_t=no
15682
15683 fi
15684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15685 fi
15686
15687 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15688
15689 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15690
15691 fi
15692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15693 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15694
15695
15696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15697 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15698 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15699 $as_echo_n "(cached) " >&6
15700 else
15701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15702 /* end confdefs.h. */
15703
15704 #define _SYSCALL32
15705 #include <sys/procfs.h>
15706 int
15707 main ()
15708 {
15709 prgregset32_t avar
15710 ;
15711 return 0;
15712 }
15713 _ACEOF
15714 if ac_fn_c_try_compile "$LINENO"; then :
15715 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15716 else
15717 bfd_cv_have_sys_procfs_type_prgregset32_t=no
15718
15719 fi
15720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15721 fi
15722
15723 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15724
15725 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15726
15727 fi
15728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15729 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15730
15731
15732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15733 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15734 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15735 $as_echo_n "(cached) " >&6
15736 else
15737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15738 /* end confdefs.h. */
15739
15740 #define _SYSCALL32
15741 #include <sys/procfs.h>
15742 int
15743 main ()
15744 {
15745 lwpid_t avar
15746 ;
15747 return 0;
15748 }
15749 _ACEOF
15750 if ac_fn_c_try_compile "$LINENO"; then :
15751 bfd_cv_have_sys_procfs_type_lwpid_t=yes
15752 else
15753 bfd_cv_have_sys_procfs_type_lwpid_t=no
15754
15755 fi
15756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15757 fi
15758
15759 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15760
15761 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15762
15763 fi
15764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15765 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15766
15767
15768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15769 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15770 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15771 $as_echo_n "(cached) " >&6
15772 else
15773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15774 /* end confdefs.h. */
15775
15776 #define _SYSCALL32
15777 #include <sys/procfs.h>
15778 int
15779 main ()
15780 {
15781 psaddr_t avar
15782 ;
15783 return 0;
15784 }
15785 _ACEOF
15786 if ac_fn_c_try_compile "$LINENO"; then :
15787 bfd_cv_have_sys_procfs_type_psaddr_t=yes
15788 else
15789 bfd_cv_have_sys_procfs_type_psaddr_t=no
15790
15791 fi
15792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15793 fi
15794
15795 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15796
15797 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15798
15799 fi
15800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15801 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15802
15803
15804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15805 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15806 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15807 $as_echo_n "(cached) " >&6
15808 else
15809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15810 /* end confdefs.h. */
15811
15812 #define _SYSCALL32
15813 #include <sys/procfs.h>
15814 int
15815 main ()
15816 {
15817 elf_fpregset_t avar
15818 ;
15819 return 0;
15820 }
15821 _ACEOF
15822 if ac_fn_c_try_compile "$LINENO"; then :
15823 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15824 else
15825 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15826
15827 fi
15828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15829 fi
15830
15831 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15832
15833 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15834
15835 fi
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15837 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15838
15839 fi
15840
15841
15842 # Check the return and argument types of ptrace.
15843
15844
15845 for ac_header in sys/ptrace.h ptrace.h
15846 do :
15847 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15848 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15849 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15850 cat >>confdefs.h <<_ACEOF
15851 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15852 _ACEOF
15853
15854 fi
15855
15856 done
15857
15858
15859 gdb_ptrace_headers='
15860 #include <sys/types.h>
15861 #if HAVE_SYS_PTRACE_H
15862 # include <sys/ptrace.h>
15863 #endif
15864 #if HAVE_UNISTD_H
15865 # include <unistd.h>
15866 #endif
15867 '
15868
15869 # Check return type. Varargs (used on GNU/Linux) conflict with the
15870 # empty argument list, so check for that explicitly.
15871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15872 $as_echo_n "checking return type of ptrace... " >&6; }
15873 if ${gdb_cv_func_ptrace_ret+:} false; then :
15874 $as_echo_n "(cached) " >&6
15875 else
15876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877 /* end confdefs.h. */
15878  $gdb_ptrace_headers
15879 int
15880 main ()
15881 {
15882 extern long ptrace (enum __ptrace_request, ...);
15883
15884 ;
15885 return 0;
15886 }
15887 _ACEOF
15888 if ac_fn_c_try_compile "$LINENO"; then :
15889 gdb_cv_func_ptrace_ret='long'
15890 else
15891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15892 /* end confdefs.h. */
15893 $gdb_ptrace_headers
15894 int
15895 main ()
15896 {
15897 extern int ptrace ();
15898
15899 ;
15900 return 0;
15901 }
15902 _ACEOF
15903 if ac_fn_c_try_compile "$LINENO"; then :
15904 gdb_cv_func_ptrace_ret='int'
15905 else
15906 gdb_cv_func_ptrace_ret='long'
15907
15908 fi
15909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15910
15911 fi
15912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15913
15914 fi
15915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15916 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15917
15918
15919 cat >>confdefs.h <<_ACEOF
15920 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15921 _ACEOF
15922
15923
15924 # Check argument types.
15925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15926 $as_echo_n "checking types of arguments for ptrace... " >&6; }
15927 if ${gdb_cv_func_ptrace_args+:} false; then :
15928 $as_echo_n "(cached) " >&6
15929 else
15930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15931 /* end confdefs.h. */
15932 $gdb_ptrace_headers
15933 int
15934 main ()
15935 {
15936 extern long ptrace (enum __ptrace_request, ...);
15937
15938 ;
15939 return 0;
15940 }
15941 _ACEOF
15942 if ac_fn_c_try_compile "$LINENO"; then :
15943 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15944 else
15945 for gdb_arg1 in 'int' 'long'; do
15946 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15947 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15948 for gdb_arg4 in 'int' 'long' 'void *'; do
15949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15950 /* end confdefs.h. */
15951 $gdb_ptrace_headers
15952 int
15953 main ()
15954 {
15955 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15956
15957 ;
15958 return 0;
15959 }
15960 _ACEOF
15961 if ac_fn_c_try_compile "$LINENO"; then :
15962 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15963 break 4;
15964
15965 fi
15966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15967
15968 for gdb_arg5 in 'int *' 'int' 'long'; do
15969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15970 /* end confdefs.h. */
15971 $gdb_ptrace_headers
15972 int
15973 main ()
15974 {
15975 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15976
15977 ;
15978 return 0;
15979 }
15980 _ACEOF
15981 if ac_fn_c_try_compile "$LINENO"; then :
15982 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15983 break 5;
15984
15985 fi
15986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15987 done
15988 done
15989 done
15990 done
15991 done
15992 # Provide a safe default value.
15993 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15994
15995 fi
15996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15997
15998 fi
15999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
16000 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
16001
16002 ac_save_IFS=$IFS; IFS=','
16003 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
16004 IFS=$ac_save_IFS
16005 shift
16006
16007 cat >>confdefs.h <<_ACEOF
16008 #define PTRACE_TYPE_ARG1 $1
16009 _ACEOF
16010
16011
16012 cat >>confdefs.h <<_ACEOF
16013 #define PTRACE_TYPE_ARG3 $3
16014 _ACEOF
16015
16016
16017 cat >>confdefs.h <<_ACEOF
16018 #define PTRACE_TYPE_ARG4 $4
16019 _ACEOF
16020
16021 if test -n "$5"; then
16022
16023 cat >>confdefs.h <<_ACEOF
16024 #define PTRACE_TYPE_ARG5 $5
16025 _ACEOF
16026
16027 fi
16028
16029
16030 if test "$cross_compiling" = no; then
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
16032 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
16033 if ${ac_cv_func_setpgrp_void+:} false; then :
16034 $as_echo_n "(cached) " >&6
16035 else
16036 if test "$cross_compiling" = yes; then :
16037 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
16038 else
16039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16040 /* end confdefs.h. */
16041 $ac_includes_default
16042 int
16043 main ()
16044 {
16045 /* If this system has a BSD-style setpgrp which takes arguments,
16046 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
16047 exit successfully. */
16048 return setpgrp (1,1) != -1;
16049 ;
16050 return 0;
16051 }
16052 _ACEOF
16053 if ac_fn_c_try_run "$LINENO"; then :
16054 ac_cv_func_setpgrp_void=no
16055 else
16056 ac_cv_func_setpgrp_void=yes
16057 fi
16058 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16059 conftest.$ac_objext conftest.beam conftest.$ac_ext
16060 fi
16061
16062 fi
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
16064 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
16065 if test $ac_cv_func_setpgrp_void = yes; then
16066
16067 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
16068
16069 fi
16070
16071 else
16072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
16073 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
16074 if ${ac_cv_func_setpgrp_void+:} false; then :
16075 $as_echo_n "(cached) " >&6
16076 else
16077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16078 /* end confdefs.h. */
16079 #include <unistd.h>
16080 int
16081 main ()
16082 {
16083 if (setpgrp(1,1) == -1)
16084 exit (0);
16085 else
16086 exit (1);
16087
16088 ;
16089 return 0;
16090 }
16091 _ACEOF
16092 if ac_fn_c_try_compile "$LINENO"; then :
16093 ac_cv_func_setpgrp_void=no
16094 else
16095 ac_cv_func_setpgrp_void=yes
16096
16097 fi
16098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16099
16100 fi
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
16102 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
16103 if test "$ac_cv_func_setpgrp_void" = yes; then
16104 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
16105
16106 fi
16107 fi
16108
16109 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
16110 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
16111 #include <sys/proc.h>
16112
16113 "
16114 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
16115
16116 cat >>confdefs.h <<_ACEOF
16117 #define HAVE_STRUCT_THREAD_TD_PCB 1
16118 _ACEOF
16119
16120
16121 fi
16122
16123
16124 # See if <sys/lwp.h> defines `struct lwp`.
16125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
16126 $as_echo_n "checking for struct lwp... " >&6; }
16127 if ${gdb_cv_struct_lwp+:} false; then :
16128 $as_echo_n "(cached) " >&6
16129 else
16130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16131 /* end confdefs.h. */
16132 #include <sys/param.h>
16133 #define _KMEMUSER
16134 #include <sys/lwp.h>
16135 int
16136 main ()
16137 {
16138 struct lwp l;
16139
16140 ;
16141 return 0;
16142 }
16143 _ACEOF
16144 if ac_fn_c_try_compile "$LINENO"; then :
16145 gdb_cv_struct_lwp=yes
16146 else
16147 gdb_cv_struct_lwp=no
16148
16149 fi
16150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16151
16152 fi
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
16154 $as_echo "$gdb_cv_struct_lwp" >&6; }
16155 if test "$gdb_cv_struct_lwp" = yes; then
16156
16157 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
16158
16159 fi
16160
16161 # See if <machine/reg.h> degines `struct reg'.
16162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
16163 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
16164 if ${gdb_cv_struct_reg+:} false; then :
16165 $as_echo_n "(cached) " >&6
16166 else
16167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16168 /* end confdefs.h. */
16169 #include <sys/types.h>
16170 #include <machine/reg.h>
16171 int
16172 main ()
16173 {
16174 struct reg r;
16175
16176 ;
16177 return 0;
16178 }
16179 _ACEOF
16180 if ac_fn_c_try_compile "$LINENO"; then :
16181 gdb_cv_struct_reg=yes
16182 else
16183 gdb_cv_struct_reg=no
16184
16185 fi
16186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16187
16188 fi
16189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
16190 $as_echo "$gdb_cv_struct_reg" >&6; }
16191 if test "$gdb_cv_struct_reg" = yes; then
16192
16193 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
16194
16195 fi
16196
16197 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16198 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
16199 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
16200 #include <machine/reg.h>
16201 "
16202 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
16203
16204 cat >>confdefs.h <<_ACEOF
16205 #define HAVE_STRUCT_REG_R_FS 1
16206 _ACEOF
16207
16208
16209 fi
16210 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
16211 #include <machine/reg.h>
16212 "
16213 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
16214
16215 cat >>confdefs.h <<_ACEOF
16216 #define HAVE_STRUCT_REG_R_GS 1
16217 _ACEOF
16218
16219
16220 fi
16221
16222
16223 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
16224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
16225 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
16226 if ${gdb_cv_have_ptrace_getregs+:} false; then :
16227 $as_echo_n "(cached) " >&6
16228 else
16229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16230 /* end confdefs.h. */
16231 #include <sys/ptrace.h>
16232 int
16233 main ()
16234 {
16235 PTRACE_GETREGS;
16236 ;
16237 return 0;
16238 }
16239 _ACEOF
16240 if ac_fn_c_try_compile "$LINENO"; then :
16241 gdb_cv_have_ptrace_getregs=yes
16242 else
16243 gdb_cv_have_ptrace_getregs=no
16244
16245 fi
16246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16247
16248 fi
16249
16250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
16251 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
16252 if test "$gdb_cv_have_ptrace_getregs" = yes; then
16253
16254 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
16255
16256 fi
16257
16258 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
16260 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
16261 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
16262 $as_echo_n "(cached) " >&6
16263 else
16264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16265 /* end confdefs.h. */
16266 #include <sys/ptrace.h>
16267 int
16268 main ()
16269 {
16270 PTRACE_GETFPXREGS;
16271 ;
16272 return 0;
16273 }
16274 _ACEOF
16275 if ac_fn_c_try_compile "$LINENO"; then :
16276 gdb_cv_have_ptrace_getfpxregs=yes
16277 else
16278 gdb_cv_have_ptrace_getfpxregs=no
16279
16280 fi
16281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16282
16283 fi
16284
16285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16286 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
16287 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
16288
16289 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
16290
16291 fi
16292
16293 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
16294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
16295 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
16296 if ${gdb_cv_have_pt_getdbregs+:} false; then :
16297 $as_echo_n "(cached) " >&6
16298 else
16299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16300 /* end confdefs.h. */
16301 #include <sys/types.h>
16302 #include <sys/ptrace.h>
16303 int
16304 main ()
16305 {
16306 PT_GETDBREGS;
16307
16308 ;
16309 return 0;
16310 }
16311 _ACEOF
16312 if ac_fn_c_try_compile "$LINENO"; then :
16313 gdb_cv_have_pt_getdbregs=yes
16314 else
16315 gdb_cv_have_pt_getdbregs=no
16316
16317 fi
16318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16319
16320 fi
16321
16322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
16323 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
16324 if test "$gdb_cv_have_pt_getdbregs" = yes; then
16325
16326 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
16327
16328 fi
16329
16330 # See if <sys/ptrace.h> supports LWP names on FreeBSD
16331 # Older FreeBSD versions don't have the pl_tdname member of
16332 # `struct ptrace_lwpinfo'.
16333 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
16334 "
16335 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
16336
16337 cat >>confdefs.h <<_ACEOF
16338 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
16339 _ACEOF
16340
16341
16342 fi
16343
16344
16345 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
16346 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
16347 # FreeBSD 10.3.
16348 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
16349 "
16350 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
16351
16352 cat >>confdefs.h <<_ACEOF
16353 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
16354 _ACEOF
16355
16356
16357 fi
16358
16359
16360 # Check if the compiler supports the `long long' type.
16361
16362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
16363 $as_echo_n "checking for long long support in compiler... " >&6; }
16364 if ${gdb_cv_c_long_long+:} false; then :
16365 $as_echo_n "(cached) " >&6
16366 else
16367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16368 /* end confdefs.h. */
16369 extern long long foo;
16370 int
16371 main ()
16372 {
16373 switch (foo & 2) { case 0: return 1; }
16374 ;
16375 return 0;
16376 }
16377 _ACEOF
16378 if ac_fn_c_try_compile "$LINENO"; then :
16379 gdb_cv_c_long_long=yes
16380 else
16381 gdb_cv_c_long_long=no
16382 fi
16383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16384 fi
16385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
16386 $as_echo "$gdb_cv_c_long_long" >&6; }
16387 if test "$gdb_cv_c_long_long" != yes; then
16388 # libdecnumber requires long long.
16389 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
16390 fi
16391
16392 # Check if the compiler and runtime support printing decfloats.
16393
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
16395 $as_echo_n "checking for decfloat support in printf... " >&6; }
16396 if ${gdb_cv_printf_has_decfloat+:} false; then :
16397 $as_echo_n "(cached) " >&6
16398 else
16399 if test "$cross_compiling" = yes; then :
16400 gdb_cv_printf_has_decfloat=no
16401 else
16402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16403 /* end confdefs.h. */
16404 $ac_includes_default
16405 int
16406 main ()
16407 {
16408 char buf[64];
16409 _Decimal32 d32 = 1.2345df;
16410 _Decimal64 d64 = 1.2345dd;
16411 _Decimal128 d128 = 1.2345dl;
16412 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
16413 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
16414 ;
16415 return 0;
16416 }
16417 _ACEOF
16418 if ac_fn_c_try_run "$LINENO"; then :
16419 gdb_cv_printf_has_decfloat=yes
16420 else
16421 gdb_cv_printf_has_decfloat=no
16422 fi
16423 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16424 conftest.$ac_objext conftest.beam conftest.$ac_ext
16425 fi
16426
16427 fi
16428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
16429 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
16430 if test "$gdb_cv_printf_has_decfloat" = yes; then
16431
16432 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
16433
16434 fi
16435
16436 # Check if the compiler supports the `long double' type. We can't use
16437 # AC_C_LONG_DOUBLE because that one does additional checks on the
16438 # constants defined in <float.h> that fail on some systems,
16439 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
16440
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
16442 $as_echo_n "checking for long double support in compiler... " >&6; }
16443 if ${gdb_cv_c_long_double+:} false; then :
16444 $as_echo_n "(cached) " >&6
16445 else
16446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16447 /* end confdefs.h. */
16448 long double foo;
16449 _ACEOF
16450 if ac_fn_c_try_compile "$LINENO"; then :
16451 gdb_cv_c_long_double=yes
16452 else
16453 gdb_cv_c_long_double=no
16454 fi
16455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16456 fi
16457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
16458 $as_echo "$gdb_cv_c_long_double" >&6; }
16459 if test "$gdb_cv_c_long_double" = yes; then
16460
16461 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16462
16463 fi
16464
16465 # Check if the compiler and runtime support printing long doubles.
16466
16467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
16468 $as_echo_n "checking for long double support in printf... " >&6; }
16469 if ${gdb_cv_printf_has_long_double+:} false; then :
16470 $as_echo_n "(cached) " >&6
16471 else
16472 if test "$cross_compiling" = yes; then :
16473 gdb_cv_printf_has_long_double=no
16474 else
16475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16476 /* end confdefs.h. */
16477 $ac_includes_default
16478 int
16479 main ()
16480 {
16481 char buf[16];
16482 long double f = 3.141592653;
16483 sprintf (buf, "%Lg", f);
16484 return (strncmp ("3.14159", buf, 7));
16485 ;
16486 return 0;
16487 }
16488 _ACEOF
16489 if ac_fn_c_try_run "$LINENO"; then :
16490 gdb_cv_printf_has_long_double=yes
16491 else
16492 gdb_cv_printf_has_long_double=no
16493 fi
16494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16495 conftest.$ac_objext conftest.beam conftest.$ac_ext
16496 fi
16497
16498 fi
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
16500 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
16501 if test "$gdb_cv_printf_has_long_double" = yes; then
16502
16503 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
16504
16505 fi
16506
16507 # Check if the compiler and runtime support scanning long doubles.
16508
16509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
16510 $as_echo_n "checking for long double support in scanf... " >&6; }
16511 if ${gdb_cv_scanf_has_long_double+:} false; then :
16512 $as_echo_n "(cached) " >&6
16513 else
16514 if test "$cross_compiling" = yes; then :
16515 gdb_cv_scanf_has_long_double=no
16516 else
16517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16518 /* end confdefs.h. */
16519 #include <stdio.h>
16520 int
16521 main ()
16522 {
16523 char *buf = "3.141592653";
16524 long double f = 0;
16525 sscanf (buf, "%Lg", &f);
16526 return !(f > 3.14159 && f < 3.14160);
16527 ;
16528 return 0;
16529 }
16530 _ACEOF
16531 if ac_fn_c_try_run "$LINENO"; then :
16532 gdb_cv_scanf_has_long_double=yes
16533 else
16534 gdb_cv_scanf_has_long_double=no
16535 fi
16536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16537 conftest.$ac_objext conftest.beam conftest.$ac_ext
16538 fi
16539
16540 fi
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16542 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
16543 if test "$gdb_cv_scanf_has_long_double" = yes; then
16544
16545 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
16546
16547 fi
16548
16549 case ${host_os} in
16550 aix*)
16551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16552 $as_echo_n "checking for -bbigtoc option... " >&6; }
16553 if ${gdb_cv_bigtoc+:} false; then :
16554 $as_echo_n "(cached) " >&6
16555 else
16556 SAVE_LDFLAGS=$LDFLAGS
16557
16558 case $GCC in
16559 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16560 *) gdb_cv_bigtoc=-bbigtoc ;;
16561 esac
16562
16563 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16565 /* end confdefs.h. */
16566
16567 int
16568 main ()
16569 {
16570 int i;
16571 ;
16572 return 0;
16573 }
16574 _ACEOF
16575 if ac_fn_c_try_link "$LINENO"; then :
16576
16577 else
16578 gdb_cv_bigtoc=
16579
16580 fi
16581 rm -f core conftest.err conftest.$ac_objext \
16582 conftest$ac_exeext conftest.$ac_ext
16583 LDFLAGS="${SAVE_LDFLAGS}"
16584
16585 fi
16586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16587 $as_echo "$gdb_cv_bigtoc" >&6; }
16588 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16589 ;;
16590 esac
16591
16592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16593 $as_echo_n "checking for the dynamic export flag... " >&6; }
16594 dynamic_list=false
16595 if test "${gdb_native}" = yes; then
16596 # The dynamically loaded libthread_db needs access to symbols in the gdb
16597 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16598 # may not be supported there.
16599 old_LDFLAGS="$LDFLAGS"
16600 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16601 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16602 LDFLAGS="$LDFLAGS $RDYNAMIC"
16603 if test "${have_libpython}" = no; then
16604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16605 /* end confdefs.h. */
16606
16607 int
16608 main ()
16609 {
16610
16611 ;
16612 return 0;
16613 }
16614 _ACEOF
16615 if ac_fn_c_try_link "$LINENO"; then :
16616 dynamic_list=true
16617 fi
16618 rm -f core conftest.err conftest.$ac_objext \
16619 conftest$ac_exeext conftest.$ac_ext
16620 else
16621 # Workaround http://bugs.python.org/issue4434 where static
16622 # libpythonX.Y.a would get its symbols required for
16623 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16624 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16625
16626 # Note the workaround for Python
16627 # http://bugs.python.org/issue10112 earlier has removed
16628 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16629 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16630 # always pass.
16631 old_CFLAGS="$CFLAGS"
16632 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16633 old_LIBS="$LIBS"
16634 LIBS="$LIBS $PYTHON_LIBS"
16635 old_CPPFLAGS="$CPPFLAGS"
16636 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16637 if test "$cross_compiling" = yes; then :
16638 true
16639 else
16640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16641 /* end confdefs.h. */
16642 #include "Python.h"
16643 int
16644 main ()
16645 {
16646 int err;
16647 Py_Initialize ();
16648 err = PyRun_SimpleString ("import ctypes\n");
16649 Py_Finalize ();
16650 return err == 0 ? 0 : 1;
16651 ;
16652 return 0;
16653 }
16654 _ACEOF
16655 if ac_fn_c_try_run "$LINENO"; then :
16656 dynamic_list=true
16657 fi
16658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16659 conftest.$ac_objext conftest.beam conftest.$ac_ext
16660 fi
16661
16662 LIBS="$old_LIBS"
16663 CFLAGS="$old_CFLAGS"
16664 CPPFLAGS="$old_CPPFLAGS"
16665 fi
16666 LDFLAGS="$old_LDFLAGS"
16667 fi
16668 if $dynamic_list; then
16669 found="-Wl,--dynamic-list"
16670 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16671 else
16672 found="-rdynamic"
16673 RDYNAMIC="-rdynamic"
16674 fi
16675
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16677 $as_echo "$found" >&6; }
16678
16679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether execinfo.h backtrace is available" >&5
16680 $as_echo_n "checking whether execinfo.h backtrace is available... " >&6; }
16681 if ${gdb_cv_execinfo_backtrace+:} false; then :
16682 $as_echo_n "(cached) " >&6
16683 else
16684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16685 /* end confdefs.h. */
16686
16687 #include <execinfo.h>
16688
16689 int
16690 main ()
16691 {
16692
16693 int f;
16694 void *b[2];
16695 f = backtrace (b, 2);
16696 backtrace_symbols_fd (b, f, 2);
16697
16698 ;
16699 return 0;
16700 }
16701 _ACEOF
16702 if ac_fn_c_try_link "$LINENO"; then :
16703 gdb_cv_execinfo_backtrace=yes
16704 else
16705 gdb_cv_execinfo_backtrace=no
16706 fi
16707 rm -f core conftest.err conftest.$ac_objext \
16708 conftest$ac_exeext conftest.$ac_ext
16709 fi
16710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_execinfo_backtrace" >&5
16711 $as_echo "$gdb_cv_execinfo_backtrace" >&6; }
16712 if test "$gdb_cv_execinfo_backtrace" = yes; then
16713
16714 $as_echo "#define HAVE_EXECINFO_BACKTRACE 1" >>confdefs.h
16715
16716 fi
16717
16718
16719 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16720 case ${host_os} in
16721 aix*)
16722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16723 $as_echo_n "checking for AiX thread debugging library... " >&6; }
16724 if ${gdb_cv_have_aix_thread_debug+:} false; then :
16725 $as_echo_n "(cached) " >&6
16726 else
16727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16728 /* end confdefs.h. */
16729 #include <sys/pthdebug.h>
16730 int
16731 main ()
16732 {
16733 #ifndef PTHDB_VERSION_3
16734 #error
16735 #endif
16736
16737 ;
16738 return 0;
16739 }
16740 _ACEOF
16741 if ac_fn_c_try_compile "$LINENO"; then :
16742 gdb_cv_have_aix_thread_debug=yes
16743 else
16744 gdb_cv_have_aix_thread_debug=no
16745
16746 fi
16747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16748
16749 fi
16750
16751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16752 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16753 if test "$gdb_cv_have_aix_thread_debug" = yes; then
16754 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16755 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16756 LIBS="$LIBS -lpthdebug"
16757
16758 # Older versions of AIX do not provide the declaration for
16759 # the getthrds function (it appears that it was introduced
16760 # with AIX 6.x).
16761 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16762 "
16763 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16764 ac_have_decl=1
16765 else
16766 ac_have_decl=0
16767 fi
16768
16769 cat >>confdefs.h <<_ACEOF
16770 #define HAVE_DECL_GETTHRDS $ac_have_decl
16771 _ACEOF
16772
16773 fi
16774 ;;
16775 esac
16776
16777 fi
16778
16779 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16781 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16782 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16783 $as_echo_n "(cached) " >&6
16784 else
16785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16786 /* end confdefs.h. */
16787 #include <thread_db.h>
16788 int
16789 main ()
16790 {
16791 int i = TD_NOTALLOC;
16792
16793 ;
16794 return 0;
16795 }
16796 _ACEOF
16797 if ac_fn_c_try_compile "$LINENO"; then :
16798 gdb_cv_thread_db_h_has_td_notalloc=yes
16799 else
16800 gdb_cv_thread_db_h_has_td_notalloc=no
16801
16802 fi
16803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16804
16805 fi
16806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16807 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16808
16809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16810 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16811 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16812 $as_echo_n "(cached) " >&6
16813 else
16814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16815 /* end confdefs.h. */
16816 #include <thread_db.h>
16817 int
16818 main ()
16819 {
16820 int i = TD_VERSION;
16821
16822 ;
16823 return 0;
16824 }
16825 _ACEOF
16826 if ac_fn_c_try_compile "$LINENO"; then :
16827 gdb_cv_thread_db_h_has_td_version=yes
16828 else
16829 gdb_cv_thread_db_h_has_td_version=no
16830
16831 fi
16832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16833
16834 fi
16835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16836 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16837
16838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16839 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16840 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16841 $as_echo_n "(cached) " >&6
16842 else
16843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16844 /* end confdefs.h. */
16845 #include <thread_db.h>
16846 int
16847 main ()
16848 {
16849 int i = TD_NOTLS;
16850
16851 ;
16852 return 0;
16853 }
16854 _ACEOF
16855 if ac_fn_c_try_compile "$LINENO"; then :
16856 gdb_cv_thread_db_h_has_td_notls=yes
16857 else
16858 gdb_cv_thread_db_h_has_td_notls=no
16859
16860 fi
16861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16862
16863 fi
16864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16865 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16866 fi
16867 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16868
16869 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16870
16871 fi
16872 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16873
16874 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16875
16876 fi
16877 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16878
16879 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16880
16881 fi
16882
16883 case $host_os in
16884 go32* | *djgpp*)
16885 gdbinit=gdb.ini
16886 ;;
16887 *)
16888 gdbinit=.gdbinit
16889 ;;
16890 esac
16891
16892 cat >>confdefs.h <<_ACEOF
16893 #define GDBINIT "$gdbinit"
16894 _ACEOF
16895
16896
16897
16898 cat >>confdefs.h <<_ACEOF
16899 #define GDBEARLYINIT ".gdbearlyinit"
16900 _ACEOF
16901
16902
16903
16904 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16905 # except that the argument to --with-sysroot is optional.
16906 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16907 if test "x$with_sysroot" = xyes; then
16908 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16909 fi
16910
16911 # Check whether --with-sysroot was given.
16912 if test "${with_sysroot+set}" = set; then :
16913 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16914 else
16915 TARGET_SYSTEM_ROOT=
16916 fi
16917
16918
16919 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16920 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16921 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16922 ac_define_dir=`eval echo $ac_define_dir`
16923
16924 cat >>confdefs.h <<_ACEOF
16925 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16926 _ACEOF
16927
16928
16929
16930
16931 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16932 if test "x$prefix" = xNONE; then
16933 test_prefix=/usr/local
16934 else
16935 test_prefix=$prefix
16936 fi
16937 else
16938 test_prefix=$exec_prefix
16939 fi
16940 value=0
16941 case ${ac_define_dir} in
16942 "${test_prefix}"|"${test_prefix}/"*|\
16943 '${exec_prefix}'|'${exec_prefix}/'*)
16944 value=1
16945 ;;
16946 esac
16947
16948 cat >>confdefs.h <<_ACEOF
16949 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16950 _ACEOF
16951
16952
16953
16954
16955
16956 # Check whether --with-system-gdbinit was given.
16957 if test "${with_system_gdbinit+set}" = set; then :
16958 withval=$with_system_gdbinit;
16959 SYSTEM_GDBINIT=$withval
16960 else
16961 SYSTEM_GDBINIT=
16962 fi
16963
16964
16965 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16966 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16967 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16968 ac_define_dir=`eval echo $ac_define_dir`
16969
16970 cat >>confdefs.h <<_ACEOF
16971 #define SYSTEM_GDBINIT "$ac_define_dir"
16972 _ACEOF
16973
16974
16975
16976
16977 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16978 if test "x$prefix" = xNONE; then
16979 test_prefix=/usr/local
16980 else
16981 test_prefix=$prefix
16982 fi
16983 else
16984 test_prefix=$exec_prefix
16985 fi
16986 value=0
16987 case ${ac_define_dir} in
16988 "${test_prefix}"|"${test_prefix}/"*|\
16989 '${exec_prefix}'|'${exec_prefix}/'*)
16990 value=1
16991 ;;
16992 esac
16993
16994 cat >>confdefs.h <<_ACEOF
16995 #define SYSTEM_GDBINIT_RELOCATABLE $value
16996 _ACEOF
16997
16998
16999
17000
17001
17002 # Check whether --with-system-gdbinit-dir was given.
17003 if test "${with_system_gdbinit_dir+set}" = set; then :
17004 withval=$with_system_gdbinit_dir;
17005 SYSTEM_GDBINIT_DIR=$withval
17006 else
17007 SYSTEM_GDBINIT_DIR=
17008 fi
17009
17010
17011 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
17012 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17013 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
17014 ac_define_dir=`eval echo $ac_define_dir`
17015
17016 cat >>confdefs.h <<_ACEOF
17017 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
17018 _ACEOF
17019
17020
17021
17022
17023 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
17024 if test "x$prefix" = xNONE; then
17025 test_prefix=/usr/local
17026 else
17027 test_prefix=$prefix
17028 fi
17029 else
17030 test_prefix=$exec_prefix
17031 fi
17032 value=0
17033 case ${ac_define_dir} in
17034 "${test_prefix}"|"${test_prefix}/"*|\
17035 '${exec_prefix}'|'${exec_prefix}/'*)
17036 value=1
17037 ;;
17038 esac
17039
17040 cat >>confdefs.h <<_ACEOF
17041 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
17042 _ACEOF
17043
17044
17045
17046
17047
17048
17049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
17050 $as_echo_n "checking the compiler type... " >&6; }
17051 if ${gdb_cv_compiler_type+:} false; then :
17052 $as_echo_n "(cached) " >&6
17053 else
17054 gdb_cv_compiler_type=unknown
17055 if test "$gdb_cv_compiler_type" = unknown; then
17056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17057 /* end confdefs.h. */
17058
17059 int
17060 main ()
17061 {
17062
17063 #if !defined __GNUC__ || defined __clang__
17064 #error not gcc
17065 #endif
17066
17067 ;
17068 return 0;
17069 }
17070 _ACEOF
17071 if ac_fn_c_try_compile "$LINENO"; then :
17072 gdb_cv_compiler_type=gcc
17073 fi
17074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17075 fi
17076
17077 if test "$gdb_cv_compiler_type" = unknown; then
17078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17079 /* end confdefs.h. */
17080
17081 int
17082 main ()
17083 {
17084
17085 #ifndef __clang__
17086 #error not clang
17087 #endif
17088
17089 ;
17090 return 0;
17091 }
17092 _ACEOF
17093 if ac_fn_c_try_compile "$LINENO"; then :
17094 gdb_cv_compiler_type=clang
17095 fi
17096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17097 fi
17098
17099 fi
17100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
17101 $as_echo "$gdb_cv_compiler_type" >&6; }
17102
17103 GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
17104
17105
17106 # Check whether --enable-werror was given.
17107 if test "${enable_werror+set}" = set; then :
17108 enableval=$enable_werror; case "${enableval}" in
17109 yes | y) ERROR_ON_WARNING="yes" ;;
17110 no | n) ERROR_ON_WARNING="no" ;;
17111 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
17112 esac
17113 fi
17114
17115
17116 # Enable -Werror by default when using gcc. Turn it off for releases.
17117 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
17118 ERROR_ON_WARNING=yes
17119 fi
17120
17121 WERROR_CFLAGS=""
17122 if test "${ERROR_ON_WARNING}" = yes ; then
17123 WERROR_CFLAGS="-Werror"
17124 fi
17125
17126 # The options we'll try to enable.
17127 build_warnings="-Wall -Wpointer-arith \
17128 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
17129 -Wno-switch -Wno-char-subscripts \
17130 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
17131 -Wno-sign-compare -Wno-error=maybe-uninitialized \
17132 -Wno-mismatched-tags \
17133 -Wno-error=deprecated-register \
17134 -Wsuggest-override \
17135 -Wimplicit-fallthrough=3 \
17136 -Wduplicated-cond \
17137 -Wshadow=local \
17138 -Wdeprecated-copy \
17139 -Wdeprecated-copy-dtor \
17140 -Wredundant-move \
17141 -Wmissing-declarations \
17142 -Wstrict-null-sentinel \
17143 "
17144
17145 # The -Wmissing-prototypes flag will be accepted by GCC, but results
17146 # in a warning being printed about the flag not being valid for C++,
17147 # this is something to do with using ccache, and argument ordering.
17148 if test "$GDB_COMPILER_TYPE" != gcc; then
17149 build_warnings="$build_warnings -Wmissing-prototypes"
17150 fi
17151
17152 case "${host}" in
17153 *-*-mingw32*)
17154 # Enable -Wno-format by default when using gcc on mingw since many
17155 # GCC versions complain about %I64.
17156 build_warnings="$build_warnings -Wno-format" ;;
17157 *-*-solaris*)
17158 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
17159 # doesn't understand.
17160 build_warnings="$build_warnings -Wno-unknown-pragmas"
17161 # Solaris 11 <unistd.h> marks vfork deprecated.
17162 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
17163 *)
17164 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
17165 # but there's a special case for this below.
17166 build_warnings="$build_warnings -Wformat-nonliteral" ;;
17167 esac
17168
17169 # Check whether --enable-build-warnings was given.
17170 if test "${enable_build_warnings+set}" = set; then :
17171 enableval=$enable_build_warnings; case "${enableval}" in
17172 yes) ;;
17173 no) build_warnings="-w";;
17174 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17175 build_warnings="${build_warnings} ${t}";;
17176 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17177 build_warnings="${t} ${build_warnings}";;
17178 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17179 esac
17180 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17181 echo "Setting compiler warning flags = $build_warnings" 6>&1
17182 fi
17183 fi
17184 # Check whether --enable-gdb-build-warnings was given.
17185 if test "${enable_gdb_build_warnings+set}" = set; then :
17186 enableval=$enable_gdb_build_warnings; case "${enableval}" in
17187 yes) ;;
17188 no) build_warnings="-w";;
17189 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17190 build_warnings="${build_warnings} ${t}";;
17191 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17192 build_warnings="${t} ${build_warnings}";;
17193 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17194 esac
17195 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17196 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
17197 fi
17198 fi
17199
17200 # The set of warnings supported by a C++ compiler is not the same as
17201 # of the C compiler.
17202 ac_ext=cpp
17203 ac_cpp='$CXXCPP $CPPFLAGS'
17204 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17205 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17206 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17207
17208
17209 WARN_CFLAGS=""
17210 if test "x${build_warnings}" != x -a "x$GCC" = xyes
17211 then
17212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
17213 $as_echo_n "checking compiler warning flags... " >&6; }
17214 # Separate out the -Werror flag as some files just cannot be
17215 # compiled with it enabled.
17216 for w in ${build_warnings}; do
17217 # GCC does not complain about -Wno-unknown-warning. Invert
17218 # and test -Wunknown-warning instead.
17219 case $w in
17220 -Wno-*)
17221 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
17222 -Wformat-nonliteral)
17223 # gcc requires -Wformat before -Wformat-nonliteral
17224 # will work, so stick them together.
17225 w="-Wformat $w"
17226 wtest="$w"
17227 ;;
17228 *)
17229 wtest=$w ;;
17230 esac
17231
17232 case $w in
17233 -Werr*) WERROR_CFLAGS=-Werror ;;
17234 *)
17235 # Check whether GCC accepts it.
17236 saved_CFLAGS="$CFLAGS"
17237 CFLAGS="$CFLAGS -Werror $wtest"
17238 saved_CXXFLAGS="$CXXFLAGS"
17239 CXXFLAGS="$CXXFLAGS -Werror $wtest"
17240 if test "x$w" = "x-Wunused-variable"; then
17241 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
17242 # fixed in GCC 4.9. This test is derived from the gdb
17243 # source code that triggered this bug in GCC.
17244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17245 /* end confdefs.h. */
17246 struct scoped_restore_base {};
17247 struct scoped_restore_tmpl : public scoped_restore_base {
17248 ~scoped_restore_tmpl() {}
17249 };
17250 int
17251 main ()
17252 {
17253 const scoped_restore_base &b = scoped_restore_tmpl();
17254
17255 ;
17256 return 0;
17257 }
17258 _ACEOF
17259 if ac_fn_cxx_try_compile "$LINENO"; then :
17260 WARN_CFLAGS="${WARN_CFLAGS} $w"
17261 fi
17262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17263 else
17264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17265 /* end confdefs.h. */
17266
17267 int
17268 main ()
17269 {
17270
17271 ;
17272 return 0;
17273 }
17274 _ACEOF
17275 if ac_fn_cxx_try_compile "$LINENO"; then :
17276 WARN_CFLAGS="${WARN_CFLAGS} $w"
17277 fi
17278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17279 fi
17280 CFLAGS="$saved_CFLAGS"
17281 CXXFLAGS="$saved_CXXFLAGS"
17282 esac
17283 done
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
17285 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
17286 fi
17287
17288
17289
17290 ac_ext=c
17291 ac_cpp='$CPP $CPPFLAGS'
17292 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17293 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17294 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17295
17296
17297
17298 # Check whether --enable-ubsan was given.
17299 if test "${enable_ubsan+set}" = set; then :
17300 enableval=$enable_ubsan;
17301 else
17302 enable_ubsan=no
17303 fi
17304
17305 if test "x$enable_ubsan" = xauto; then
17306 if $development; then
17307 enable_ubsan=yes
17308 fi
17309 fi
17310 ac_ext=cpp
17311 ac_cpp='$CXXCPP $CPPFLAGS'
17312 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17313 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17314 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17315
17316 if test "x$enable_ubsan" = xyes; then
17317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
17318 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
17319 saved_CXXFLAGS="$CXXFLAGS"
17320 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17322 /* end confdefs.h. */
17323
17324 int
17325 main ()
17326 {
17327
17328 ;
17329 return 0;
17330 }
17331 _ACEOF
17332 if ac_fn_cxx_try_link "$LINENO"; then :
17333 enable_ubsan=yes
17334 else
17335 enable_ubsan=no
17336
17337 fi
17338 rm -f core conftest.err conftest.$ac_objext \
17339 conftest$ac_exeext conftest.$ac_ext
17340 CXXFLAGS="$saved_CXXFLAGS"
17341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
17342 $as_echo "$enable_ubsan" >&6; }
17343 if test "x$enable_ubsan" = xyes; then
17344 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17345 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
17346 fi
17347 fi
17348 ac_ext=c
17349 ac_cpp='$CPP $CPPFLAGS'
17350 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17351 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17352 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17353
17354
17355
17356 # In the Cygwin environment, we need some additional flags.
17357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
17358 $as_echo_n "checking for cygwin... " >&6; }
17359 if ${gdb_cv_os_cygwin+:} false; then :
17360 $as_echo_n "(cached) " >&6
17361 else
17362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17363 /* end confdefs.h. */
17364
17365 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
17366 lose
17367 #endif
17368 _ACEOF
17369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17370 $EGREP "^lose$" >/dev/null 2>&1; then :
17371 gdb_cv_os_cygwin=yes
17372 else
17373 gdb_cv_os_cygwin=no
17374 fi
17375 rm -f conftest*
17376
17377 fi
17378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
17379 $as_echo "$gdb_cv_os_cygwin" >&6; }
17380
17381
17382 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
17383 case ${host} in
17384 *go32* ) SER_HARDWIRE=ser-go32.o ;;
17385 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
17386 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
17387 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
17388 esac
17389
17390
17391 # libreadline needs libuser32.a in a cygwin environment
17392 WIN32LIBS=
17393 if test x"$gdb_cv_os_cygwin" = xyes; then
17394 WIN32LIBS="-luser32"
17395 case "${target}" in
17396 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
17397 ;;
17398 esac
17399 fi
17400
17401 # The ser-tcp.c module requires sockets.
17402 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
17403 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
17404
17405 # Add ELF support to GDB, but only if BFD includes ELF support.
17406
17407 OLD_CFLAGS=$CFLAGS
17408 OLD_LDFLAGS=$LDFLAGS
17409 OLD_LIBS=$LIBS
17410 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17411 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17412 # always want our bfd.
17413 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17414 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17415 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $ZSTD_LIBS $LDFLAGS"
17416 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17417 LIBS="-lbfd -liberty -lz $intl $LIBS"
17418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
17419 $as_echo_n "checking for ELF support in BFD... " >&6; }
17420 if ${gdb_cv_var_elf+:} false; then :
17421 $as_echo_n "(cached) " >&6
17422 else
17423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17424 /* end confdefs.h. */
17425 #include <stdlib.h>
17426 #include <string.h>
17427 #include "bfd.h"
17428 #include "elf-bfd.h"
17429 int
17430 main ()
17431 {
17432 return bfd_get_elf_phdr_upper_bound (NULL);
17433
17434 ;
17435 return 0;
17436 }
17437 _ACEOF
17438 if ac_fn_c_try_link "$LINENO"; then :
17439 gdb_cv_var_elf=yes
17440 else
17441 gdb_cv_var_elf=no
17442
17443 fi
17444 rm -f core conftest.err conftest.$ac_objext \
17445 conftest$ac_exeext conftest.$ac_ext
17446
17447 fi
17448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
17449 $as_echo "$gdb_cv_var_elf" >&6; }
17450 CFLAGS=$OLD_CFLAGS
17451 LDFLAGS=$OLD_LDFLAGS
17452 LIBS=$OLD_LIBS
17453 if test "$gdb_cv_var_elf" = yes; then
17454 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
17455 gcore-elf.o elf-none-tdep.o"
17456
17457 $as_echo "#define HAVE_ELF 1" >>confdefs.h
17458
17459 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
17460 if test "$plugins" = "yes"; then
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17462 $as_echo_n "checking for library containing dlopen... " >&6; }
17463 if ${ac_cv_search_dlopen+:} false; then :
17464 $as_echo_n "(cached) " >&6
17465 else
17466 ac_func_search_save_LIBS=$LIBS
17467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17468 /* end confdefs.h. */
17469
17470 /* Override any GCC internal prototype to avoid an error.
17471 Use char because int might match the return type of a GCC
17472 builtin and then its argument prototype would still apply. */
17473 #ifdef __cplusplus
17474 extern "C"
17475 #endif
17476 char dlopen ();
17477 int
17478 main ()
17479 {
17480 return dlopen ();
17481 ;
17482 return 0;
17483 }
17484 _ACEOF
17485 for ac_lib in '' dl; do
17486 if test -z "$ac_lib"; then
17487 ac_res="none required"
17488 else
17489 ac_res=-l$ac_lib
17490 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17491 fi
17492 if ac_fn_c_try_link "$LINENO"; then :
17493 ac_cv_search_dlopen=$ac_res
17494 fi
17495 rm -f core conftest.err conftest.$ac_objext \
17496 conftest$ac_exeext
17497 if ${ac_cv_search_dlopen+:} false; then :
17498 break
17499 fi
17500 done
17501 if ${ac_cv_search_dlopen+:} false; then :
17502
17503 else
17504 ac_cv_search_dlopen=no
17505 fi
17506 rm conftest.$ac_ext
17507 LIBS=$ac_func_search_save_LIBS
17508 fi
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17510 $as_echo "$ac_cv_search_dlopen" >&6; }
17511 ac_res=$ac_cv_search_dlopen
17512 if test "$ac_res" != no; then :
17513 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17514
17515 fi
17516
17517 fi
17518 fi
17519
17520 # Add macho support to GDB, but only if BFD includes it.
17521
17522 OLD_CFLAGS=$CFLAGS
17523 OLD_LDFLAGS=$LDFLAGS
17524 OLD_LIBS=$LIBS
17525 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17526 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17527 # always want our bfd.
17528 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17529 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17530 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $ZSTD_LIBS $LDFLAGS"
17531 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17532 LIBS="-lbfd -liberty -lz $intl $LIBS"
17533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
17534 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
17535 if ${gdb_cv_var_macho+:} false; then :
17536 $as_echo_n "(cached) " >&6
17537 else
17538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17539 /* end confdefs.h. */
17540 #include <stdlib.h>
17541 #include <string.h>
17542 #include "bfd.h"
17543 #include "mach-o.h"
17544 int
17545 main ()
17546 {
17547 return bfd_mach_o_lookup_command (NULL, 0, NULL);
17548
17549 ;
17550 return 0;
17551 }
17552 _ACEOF
17553 if ac_fn_c_try_link "$LINENO"; then :
17554 gdb_cv_var_macho=yes
17555 else
17556 gdb_cv_var_macho=no
17557
17558 fi
17559 rm -f core conftest.err conftest.$ac_objext \
17560 conftest$ac_exeext conftest.$ac_ext
17561
17562 fi
17563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
17564 $as_echo "$gdb_cv_var_macho" >&6; }
17565 CFLAGS=$OLD_CFLAGS
17566 LDFLAGS=$OLD_LDFLAGS
17567 LIBS=$OLD_LIBS
17568 if test "$gdb_cv_var_macho" = yes; then
17569 CONFIG_OBS="$CONFIG_OBS machoread.o"
17570 fi
17571
17572 # Add any host-specific objects to GDB.
17573 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
17574
17575 # If building on ELF, look for lzma support for embedded compressed debug info.
17576 if test "$gdb_cv_var_elf" = yes; then
17577
17578 # Check whether --with-lzma was given.
17579 if test "${with_lzma+set}" = set; then :
17580 withval=$with_lzma;
17581 else
17582 with_lzma=auto
17583 fi
17584
17585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
17586 $as_echo_n "checking whether to use lzma... " >&6; }
17587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
17588 $as_echo "$with_lzma" >&6; }
17589
17590 if test "${with_lzma}" != no; then
17591
17592
17593
17594
17595
17596
17597
17598
17599 use_additional=yes
17600
17601 acl_save_prefix="$prefix"
17602 prefix="$acl_final_prefix"
17603 acl_save_exec_prefix="$exec_prefix"
17604 exec_prefix="$acl_final_exec_prefix"
17605
17606 eval additional_includedir=\"$includedir\"
17607 eval additional_libdir=\"$libdir\"
17608
17609 exec_prefix="$acl_save_exec_prefix"
17610 prefix="$acl_save_prefix"
17611
17612
17613 # Check whether --with-liblzma-prefix was given.
17614 if test "${with_liblzma_prefix+set}" = set; then :
17615 withval=$with_liblzma_prefix;
17616 if test "X$withval" = "Xno"; then
17617 use_additional=no
17618 else
17619 if test "X$withval" = "X"; then
17620
17621 acl_save_prefix="$prefix"
17622 prefix="$acl_final_prefix"
17623 acl_save_exec_prefix="$exec_prefix"
17624 exec_prefix="$acl_final_exec_prefix"
17625
17626 eval additional_includedir=\"$includedir\"
17627 eval additional_libdir=\"$libdir\"
17628
17629 exec_prefix="$acl_save_exec_prefix"
17630 prefix="$acl_save_prefix"
17631
17632 else
17633 additional_includedir="$withval/include"
17634 additional_libdir="$withval/lib"
17635 fi
17636 fi
17637
17638 fi
17639
17640
17641 # Check whether --with-liblzma-type was given.
17642 if test "${with_liblzma_type+set}" = set; then :
17643 withval=$with_liblzma_type; with_liblzma_type=$withval
17644 else
17645 with_liblzma_type=auto
17646 fi
17647
17648 lib_type=`eval echo \$with_liblzma_type`
17649
17650 LIBLZMA=
17651 LTLIBLZMA=
17652 INCLZMA=
17653 rpathdirs=
17654 ltrpathdirs=
17655 names_already_handled=
17656 names_next_round='lzma '
17657 while test -n "$names_next_round"; do
17658 names_this_round="$names_next_round"
17659 names_next_round=
17660 for name in $names_this_round; do
17661 already_handled=
17662 for n in $names_already_handled; do
17663 if test "$n" = "$name"; then
17664 already_handled=yes
17665 break
17666 fi
17667 done
17668 if test -z "$already_handled"; then
17669 names_already_handled="$names_already_handled $name"
17670 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17671 eval value=\"\$HAVE_LIB$uppername\"
17672 if test -n "$value"; then
17673 if test "$value" = yes; then
17674 eval value=\"\$LIB$uppername\"
17675 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17676 eval value=\"\$LTLIB$uppername\"
17677 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17678 else
17679 :
17680 fi
17681 else
17682 found_dir=
17683 found_la=
17684 found_so=
17685 found_a=
17686 if test $use_additional = yes; then
17687 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17688 found_dir="$additional_libdir"
17689 found_so="$additional_libdir/lib$name.$shlibext"
17690 if test -f "$additional_libdir/lib$name.la"; then
17691 found_la="$additional_libdir/lib$name.la"
17692 fi
17693 elif test x$lib_type != xshared; then
17694 if test -f "$additional_libdir/lib$name.$libext"; then
17695 found_dir="$additional_libdir"
17696 found_a="$additional_libdir/lib$name.$libext"
17697 if test -f "$additional_libdir/lib$name.la"; then
17698 found_la="$additional_libdir/lib$name.la"
17699 fi
17700 fi
17701 fi
17702 fi
17703 if test "X$found_dir" = "X"; then
17704 for x in $LDFLAGS $LTLIBLZMA; do
17705
17706 acl_save_prefix="$prefix"
17707 prefix="$acl_final_prefix"
17708 acl_save_exec_prefix="$exec_prefix"
17709 exec_prefix="$acl_final_exec_prefix"
17710 eval x=\"$x\"
17711 exec_prefix="$acl_save_exec_prefix"
17712 prefix="$acl_save_prefix"
17713
17714 case "$x" in
17715 -L*)
17716 dir=`echo "X$x" | sed -e 's/^X-L//'`
17717 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17718 found_dir="$dir"
17719 found_so="$dir/lib$name.$shlibext"
17720 if test -f "$dir/lib$name.la"; then
17721 found_la="$dir/lib$name.la"
17722 fi
17723 elif test x$lib_type != xshared; then
17724 if test -f "$dir/lib$name.$libext"; then
17725 found_dir="$dir"
17726 found_a="$dir/lib$name.$libext"
17727 if test -f "$dir/lib$name.la"; then
17728 found_la="$dir/lib$name.la"
17729 fi
17730 fi
17731 fi
17732 ;;
17733 esac
17734 if test "X$found_dir" != "X"; then
17735 break
17736 fi
17737 done
17738 fi
17739 if test "X$found_dir" != "X"; then
17740 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17741 if test "X$found_so" != "X"; then
17742 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17743 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17744 else
17745 haveit=
17746 for x in $ltrpathdirs; do
17747 if test "X$x" = "X$found_dir"; then
17748 haveit=yes
17749 break
17750 fi
17751 done
17752 if test -z "$haveit"; then
17753 ltrpathdirs="$ltrpathdirs $found_dir"
17754 fi
17755 if test "$hardcode_direct" = yes; then
17756 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17757 else
17758 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17759 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17760 haveit=
17761 for x in $rpathdirs; do
17762 if test "X$x" = "X$found_dir"; then
17763 haveit=yes
17764 break
17765 fi
17766 done
17767 if test -z "$haveit"; then
17768 rpathdirs="$rpathdirs $found_dir"
17769 fi
17770 else
17771 haveit=
17772 for x in $LDFLAGS $LIBLZMA; do
17773
17774 acl_save_prefix="$prefix"
17775 prefix="$acl_final_prefix"
17776 acl_save_exec_prefix="$exec_prefix"
17777 exec_prefix="$acl_final_exec_prefix"
17778 eval x=\"$x\"
17779 exec_prefix="$acl_save_exec_prefix"
17780 prefix="$acl_save_prefix"
17781
17782 if test "X$x" = "X-L$found_dir"; then
17783 haveit=yes
17784 break
17785 fi
17786 done
17787 if test -z "$haveit"; then
17788 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17789 fi
17790 if test "$hardcode_minus_L" != no; then
17791 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17792 else
17793 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17794 fi
17795 fi
17796 fi
17797 fi
17798 else
17799 if test "X$found_a" != "X"; then
17800 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17801 else
17802 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17803 fi
17804 fi
17805 additional_includedir=
17806 case "$found_dir" in
17807 */lib | */lib/)
17808 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17809 additional_includedir="$basedir/include"
17810 ;;
17811 esac
17812 if test "X$additional_includedir" != "X"; then
17813 if test "X$additional_includedir" != "X/usr/include"; then
17814 haveit=
17815 if test "X$additional_includedir" = "X/usr/local/include"; then
17816 if test -n "$GCC"; then
17817 case $host_os in
17818 linux*) haveit=yes;;
17819 esac
17820 fi
17821 fi
17822 if test -z "$haveit"; then
17823 for x in $CPPFLAGS $INCLZMA; do
17824
17825 acl_save_prefix="$prefix"
17826 prefix="$acl_final_prefix"
17827 acl_save_exec_prefix="$exec_prefix"
17828 exec_prefix="$acl_final_exec_prefix"
17829 eval x=\"$x\"
17830 exec_prefix="$acl_save_exec_prefix"
17831 prefix="$acl_save_prefix"
17832
17833 if test "X$x" = "X-I$additional_includedir"; then
17834 haveit=yes
17835 break
17836 fi
17837 done
17838 if test -z "$haveit"; then
17839 if test -d "$additional_includedir"; then
17840 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17841 fi
17842 fi
17843 fi
17844 fi
17845 fi
17846 if test -n "$found_la"; then
17847 save_libdir="$libdir"
17848 case "$found_la" in
17849 */* | *\\*) . "$found_la" ;;
17850 *) . "./$found_la" ;;
17851 esac
17852 libdir="$save_libdir"
17853 for dep in $dependency_libs; do
17854 case "$dep" in
17855 -L*)
17856 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17857 if test "X$additional_libdir" != "X/usr/lib"; then
17858 haveit=
17859 if test "X$additional_libdir" = "X/usr/local/lib"; then
17860 if test -n "$GCC"; then
17861 case $host_os in
17862 linux*) haveit=yes;;
17863 esac
17864 fi
17865 fi
17866 if test -z "$haveit"; then
17867 haveit=
17868 for x in $LDFLAGS $LIBLZMA; do
17869
17870 acl_save_prefix="$prefix"
17871 prefix="$acl_final_prefix"
17872 acl_save_exec_prefix="$exec_prefix"
17873 exec_prefix="$acl_final_exec_prefix"
17874 eval x=\"$x\"
17875 exec_prefix="$acl_save_exec_prefix"
17876 prefix="$acl_save_prefix"
17877
17878 if test "X$x" = "X-L$additional_libdir"; then
17879 haveit=yes
17880 break
17881 fi
17882 done
17883 if test -z "$haveit"; then
17884 if test -d "$additional_libdir"; then
17885 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17886 fi
17887 fi
17888 haveit=
17889 for x in $LDFLAGS $LTLIBLZMA; do
17890
17891 acl_save_prefix="$prefix"
17892 prefix="$acl_final_prefix"
17893 acl_save_exec_prefix="$exec_prefix"
17894 exec_prefix="$acl_final_exec_prefix"
17895 eval x=\"$x\"
17896 exec_prefix="$acl_save_exec_prefix"
17897 prefix="$acl_save_prefix"
17898
17899 if test "X$x" = "X-L$additional_libdir"; then
17900 haveit=yes
17901 break
17902 fi
17903 done
17904 if test -z "$haveit"; then
17905 if test -d "$additional_libdir"; then
17906 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17907 fi
17908 fi
17909 fi
17910 fi
17911 ;;
17912 -R*)
17913 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17914 if test "$enable_rpath" != no; then
17915 haveit=
17916 for x in $rpathdirs; do
17917 if test "X$x" = "X$dir"; then
17918 haveit=yes
17919 break
17920 fi
17921 done
17922 if test -z "$haveit"; then
17923 rpathdirs="$rpathdirs $dir"
17924 fi
17925 haveit=
17926 for x in $ltrpathdirs; do
17927 if test "X$x" = "X$dir"; then
17928 haveit=yes
17929 break
17930 fi
17931 done
17932 if test -z "$haveit"; then
17933 ltrpathdirs="$ltrpathdirs $dir"
17934 fi
17935 fi
17936 ;;
17937 -l*)
17938 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17939 ;;
17940 *.la)
17941 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17942 ;;
17943 *)
17944 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17945 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17946 ;;
17947 esac
17948 done
17949 fi
17950 else
17951 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17952 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17953 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17954 else
17955 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17956 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17957 fi
17958 fi
17959 fi
17960 fi
17961 done
17962 done
17963 if test "X$rpathdirs" != "X"; then
17964 if test -n "$hardcode_libdir_separator"; then
17965 alldirs=
17966 for found_dir in $rpathdirs; do
17967 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17968 done
17969 acl_save_libdir="$libdir"
17970 libdir="$alldirs"
17971 eval flag=\"$hardcode_libdir_flag_spec\"
17972 libdir="$acl_save_libdir"
17973 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17974 else
17975 for found_dir in $rpathdirs; do
17976 acl_save_libdir="$libdir"
17977 libdir="$found_dir"
17978 eval flag=\"$hardcode_libdir_flag_spec\"
17979 libdir="$acl_save_libdir"
17980 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17981 done
17982 fi
17983 fi
17984 if test "X$ltrpathdirs" != "X"; then
17985 for found_dir in $ltrpathdirs; do
17986 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17987 done
17988 fi
17989
17990
17991 ac_save_CPPFLAGS="$CPPFLAGS"
17992
17993 for element in $INCLZMA; do
17994 haveit=
17995 for x in $CPPFLAGS; do
17996
17997 acl_save_prefix="$prefix"
17998 prefix="$acl_final_prefix"
17999 acl_save_exec_prefix="$exec_prefix"
18000 exec_prefix="$acl_final_exec_prefix"
18001 eval x=\"$x\"
18002 exec_prefix="$acl_save_exec_prefix"
18003 prefix="$acl_save_prefix"
18004
18005 if test "X$x" = "X$element"; then
18006 haveit=yes
18007 break
18008 fi
18009 done
18010 if test -z "$haveit"; then
18011 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18012 fi
18013 done
18014
18015
18016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
18017 $as_echo_n "checking for liblzma... " >&6; }
18018 if ${ac_cv_liblzma+:} false; then :
18019 $as_echo_n "(cached) " >&6
18020 else
18021
18022 ac_save_LIBS="$LIBS"
18023 LIBS="$LIBS $LIBLZMA"
18024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18025 /* end confdefs.h. */
18026 #include "lzma.h"
18027 int
18028 main ()
18029 {
18030 lzma_index_iter iter;
18031 lzma_index_iter_init (&iter, 0);
18032 lzma_mf_is_supported (LZMA_MF_HC3);
18033 ;
18034 return 0;
18035 }
18036 _ACEOF
18037 if ac_fn_c_try_link "$LINENO"; then :
18038 ac_cv_liblzma=yes
18039 else
18040 ac_cv_liblzma=no
18041 fi
18042 rm -f core conftest.err conftest.$ac_objext \
18043 conftest$ac_exeext conftest.$ac_ext
18044 LIBS="$ac_save_LIBS"
18045
18046 fi
18047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
18048 $as_echo "$ac_cv_liblzma" >&6; }
18049 if test "$ac_cv_liblzma" = yes; then
18050 HAVE_LIBLZMA=yes
18051
18052 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
18053
18054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
18055 $as_echo_n "checking how to link with liblzma... " >&6; }
18056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
18057 $as_echo "$LIBLZMA" >&6; }
18058 else
18059 HAVE_LIBLZMA=no
18060 CPPFLAGS="$ac_save_CPPFLAGS"
18061 LIBLZMA=
18062 LTLIBLZMA=
18063 fi
18064
18065
18066
18067
18068
18069
18070 if test "$HAVE_LIBLZMA" != yes; then
18071 if test "$with_lzma" = yes; then
18072 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
18073 fi
18074 fi
18075 fi
18076 fi
18077
18078 LIBGUI="../libgui/src/libgui.a"
18079 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
18080
18081
18082
18083 WIN32LDAPP=
18084
18085
18086
18087 case "${host}" in
18088 *-*-cygwin* | *-*-mingw* )
18089 configdir="win"
18090 ;;
18091 *)
18092 configdir="unix"
18093 ;;
18094 esac
18095
18096 GDBTKLIBS=
18097 if test "${enable_gdbtk}" = "yes"; then
18098
18099 # Gdbtk must have an absolute path to srcdir in order to run
18100 # properly when not installed.
18101 here=`pwd`
18102 cd ${srcdir}
18103 GDBTK_SRC_DIR=`pwd`
18104 cd $here
18105
18106
18107 #
18108 # Ok, lets find the tcl configuration
18109 # First, look for one uninstalled.
18110 # the alternative search directory is invoked by --with-tcl
18111 #
18112
18113 if test x"${no_tcl}" = x ; then
18114 # we reset no_tcl in case something fails here
18115 no_tcl=true
18116
18117 # Check whether --with-tcl was given.
18118 if test "${with_tcl+set}" = set; then :
18119 withval=$with_tcl; with_tclconfig=${withval}
18120 fi
18121
18122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
18123 $as_echo_n "checking for Tcl configuration... " >&6; }
18124 if ${ac_cv_c_tclconfig+:} false; then :
18125 $as_echo_n "(cached) " >&6
18126 else
18127
18128
18129 # First check to see if --with-tcl was specified.
18130 case "${host}" in
18131 *-*-cygwin*) platDir="win" ;;
18132 *) platDir="unix" ;;
18133 esac
18134 if test x"${with_tclconfig}" != x ; then
18135 if test -f "${with_tclconfig}/tclConfig.sh" ; then
18136 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
18137 else
18138 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
18139 fi
18140 fi
18141
18142 # then check for a private Tcl installation
18143 if test x"${ac_cv_c_tclconfig}" = x ; then
18144 for i in \
18145 ../tcl \
18146 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18147 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
18148 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
18149 ../../tcl \
18150 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18151 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
18152 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
18153 ../../../tcl \
18154 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18155 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
18156 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
18157 if test -f "$i/$platDir/tclConfig.sh" ; then
18158 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18159 break
18160 fi
18161 done
18162 fi
18163
18164 # on Darwin, check in Framework installation locations
18165 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
18166 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18167 `ls -d /Library/Frameworks 2>/dev/null` \
18168 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18169 `ls -d /System/Library/Frameworks 2>/dev/null` \
18170 ; do
18171 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
18172 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
18173 break
18174 fi
18175 done
18176 fi
18177
18178 # check in a few common install locations
18179 if test x"${ac_cv_c_tclconfig}" = x ; then
18180 for i in `ls -d ${libdir} 2>/dev/null` \
18181 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18182 `ls -d ${prefix}/lib 2>/dev/null` \
18183 `ls -d /usr/local/lib 2>/dev/null` \
18184 `ls -d /usr/contrib/lib 2>/dev/null` \
18185 `ls -d /usr/lib 2>/dev/null` \
18186 ; do
18187 if test -f "$i/tclConfig.sh" ; then
18188 ac_cv_c_tclconfig=`(cd $i; pwd)`
18189 break
18190 fi
18191 done
18192 fi
18193
18194 # check in a few other private locations
18195 if test x"${ac_cv_c_tclconfig}" = x ; then
18196 for i in \
18197 ${srcdir}/../tcl \
18198 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18199 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
18200 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
18201 if test -f "$i/$platDir/tclConfig.sh" ; then
18202 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18203 break
18204 fi
18205 done
18206 fi
18207
18208 fi
18209
18210
18211 if test x"${ac_cv_c_tclconfig}" = x ; then
18212 TCL_BIN_DIR="# no Tcl configs found"
18213 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
18214 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
18215 else
18216 no_tcl=
18217 TCL_BIN_DIR=${ac_cv_c_tclconfig}
18218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
18219 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18220 fi
18221 fi
18222
18223
18224 # If $no_tk is nonempty, then we can't do Tk, and there is no
18225 # point to doing Tcl.
18226
18227 #
18228 # Ok, lets find the tk configuration
18229 # First, look for one uninstalled.
18230 # the alternative search directory is invoked by --with-tk
18231 #
18232
18233 if test x"${no_tk}" = x ; then
18234 # we reset no_tk in case something fails here
18235 no_tk=true
18236
18237 # Check whether --with-tk was given.
18238 if test "${with_tk+set}" = set; then :
18239 withval=$with_tk; with_tkconfig=${withval}
18240 fi
18241
18242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
18243 $as_echo_n "checking for Tk configuration... " >&6; }
18244 if ${ac_cv_c_tkconfig+:} false; then :
18245 $as_echo_n "(cached) " >&6
18246 else
18247
18248
18249 # First check to see if --with-tkconfig was specified.
18250 if test x"${with_tkconfig}" != x ; then
18251 if test -f "${with_tkconfig}/tkConfig.sh" ; then
18252 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
18253 else
18254 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
18255 fi
18256 fi
18257
18258 # then check for a private Tk library
18259 case "${host}" in
18260 *-*-cygwin*) platDir="win" ;;
18261 *) platDir="unix" ;;
18262 esac
18263 if test x"${ac_cv_c_tkconfig}" = x ; then
18264 for i in \
18265 ../tk \
18266 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18267 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
18268 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
18269 ../../tk \
18270 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18271 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
18272 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
18273 ../../../tk \
18274 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18275 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
18276 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
18277 if test -f "$i/$platDir/tkConfig.sh" ; then
18278 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18279 break
18280 fi
18281 done
18282 fi
18283
18284 # on Darwin, check in Framework installation locations
18285 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
18286 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18287 `ls -d /Library/Frameworks 2>/dev/null` \
18288 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18289 `ls -d /System/Library/Frameworks 2>/dev/null` \
18290 ; do
18291 if test -f "$i/Tk.framework/tkConfig.sh" ; then
18292 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
18293 break
18294 fi
18295 done
18296 fi
18297
18298 # check in a few common install locations
18299 if test x"${ac_cv_c_tkconfig}" = x ; then
18300 for i in `ls -d ${libdir} 2>/dev/null` \
18301 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18302 `ls -d ${prefix}/lib 2>/dev/null` \
18303 `ls -d /usr/local/lib 2>/dev/null` \
18304 `ls -d /usr/contrib/lib 2>/dev/null` \
18305 `ls -d /usr/lib 2>/dev/null` \
18306 ; do
18307 if test -f "$i/tkConfig.sh" ; then
18308 ac_cv_c_tkconfig=`(cd $i; pwd)`
18309 break
18310 fi
18311 done
18312 fi
18313 # check in a few other private locations
18314 if test x"${ac_cv_c_tkconfig}" = x ; then
18315 for i in \
18316 ${srcdir}/../tk \
18317 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18318 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
18319 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
18320 if test -f "$i/$platDir/tkConfig.sh" ; then
18321 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18322 break
18323 fi
18324 done
18325 fi
18326
18327 fi
18328
18329
18330 if test x"${ac_cv_c_tkconfig}" = x ; then
18331 TK_BIN_DIR="# no Tk configs found"
18332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
18333 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
18334 else
18335 no_tk=
18336 TK_BIN_DIR=${ac_cv_c_tkconfig}
18337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
18338 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18339 fi
18340 fi
18341
18342
18343 if test -z "${no_tcl}" -a -z "${no_tk}"; then
18344
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
18346 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
18347
18348 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
18349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18350 $as_echo "loading" >&6; }
18351 . ${TCL_BIN_DIR}/tclConfig.sh
18352 else
18353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
18354 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18355 fi
18356
18357 # eval is required to do the TCL_DBGX substitution
18358 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
18359 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18360
18361 # If the TCL_BIN_DIR is the build directory (not the install directory),
18362 # then set the common variable name to the value of the build variables.
18363 # For example, the variable TCL_LIB_SPEC will be set to the value
18364 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
18365 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
18366 # installed and uninstalled version of Tcl.
18367 if test -f "${TCL_BIN_DIR}/Makefile" ; then
18368 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
18369 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
18370 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
18371 elif test "`uname -s`" = "Darwin"; then
18372 # If Tcl was built as a framework, attempt to use the libraries
18373 # from the framework at the given location so that linking works
18374 # against Tcl.framework installed in an arbitrary location.
18375 case ${TCL_DEFS} in
18376 *TCL_FRAMEWORK*)
18377 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
18378 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
18379 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
18380 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
18381 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
18382 break
18383 fi
18384 done
18385 fi
18386 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
18387 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
18388 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
18389 fi
18390 ;;
18391 esac
18392 fi
18393
18394 # eval is required to do the TCL_DBGX substitution
18395 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
18396 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
18397 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
18398 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414 # Check for in-tree tcl
18415 here=`pwd`
18416 cd ${srcdir}/..
18417 topdir=`pwd`
18418 cd ${here}
18419
18420 intree="no"
18421 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
18422 intree="yes"
18423 fi
18424
18425 # Find Tcl private headers
18426 if test x"${intree}" = xno; then
18427
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
18429 $as_echo_n "checking for Tcl private headers... " >&6; }
18430 private_dir=""
18431 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
18432 if test -f ${dir}/tclInt.h ; then
18433 private_dir=${dir}
18434 fi
18435
18436 if test x"${private_dir}" = x; then
18437 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
18438 else
18439 TCL_PRIVATE_INCLUDE="-I${private_dir}"
18440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18441 $as_echo "${private_dir}" >&6; }
18442 fi
18443
18444 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
18445 TCL_LIBRARY="${TCL_LIB_SPEC}"
18446 TCL_DEPS=""
18447 else
18448 # If building tcl in the same src tree, private headers
18449 # are not needed, but we need to be sure to use the right
18450 # headers library
18451 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
18452 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
18453 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
18454 fi
18455
18456
18457
18458
18459
18460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
18461 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
18462
18463 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
18464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18465 $as_echo "loading" >&6; }
18466 . ${TK_BIN_DIR}/tkConfig.sh
18467 else
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
18469 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18470 fi
18471
18472 # eval is required to do the TK_DBGX substitution
18473 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
18474 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
18475
18476 # If the TK_BIN_DIR is the build directory (not the install directory),
18477 # then set the common variable name to the value of the build variables.
18478 # For example, the variable TK_LIB_SPEC will be set to the value
18479 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
18480 # instead of TK_BUILD_LIB_SPEC since it will work with both an
18481 # installed and uninstalled version of Tcl.
18482 if test -f "${TK_BIN_DIR}/Makefile" ; then
18483 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
18484 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
18485 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
18486 elif test "`uname -s`" = "Darwin"; then
18487 # If Tk was built as a framework, attempt to use the libraries
18488 # from the framework at the given location so that linking works
18489 # against Tk.framework installed in an arbitrary location.
18490 case ${TK_DEFS} in
18491 *TK_FRAMEWORK*)
18492 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
18493 for i in "`cd ${TK_BIN_DIR}; pwd`" \
18494 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
18495 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
18496 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
18497 break
18498 fi
18499 done
18500 fi
18501 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
18502 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
18503 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
18504 fi
18505 ;;
18506 esac
18507 fi
18508
18509 # eval is required to do the TK_DBGX substitution
18510 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
18511 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
18512 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
18513 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528 # Check for in-tree Tk
18529 intree="no"
18530 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
18531 intree="yes"
18532 fi
18533
18534 # Find Tk private headers
18535 if test x"${intree}" = xno; then
18536
18537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
18538 $as_echo_n "checking for Tk private headers... " >&6; }
18539 private_dir=""
18540 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
18541 if test -f ${dir}/tkInt.h; then
18542 private_dir=${dir}
18543 fi
18544
18545 if test x"${private_dir}" = x; then
18546 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
18547 else
18548 TK_PRIVATE_INCLUDE="-I${private_dir}"
18549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18550 $as_echo "${private_dir}" >&6; }
18551 fi
18552
18553 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
18554 TK_LIBRARY=${TK_LIB_SPEC}
18555 TK_DEPS=""
18556 else
18557 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
18558 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
18559 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
18560 fi
18561
18562
18563
18564
18565
18566 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
18567
18568 # Include some libraries that Tcl and Tk want.
18569 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
18570 # Yes, the ordering seems wrong here. But it isn't.
18571 # TK_LIBS is the list of libraries that need to be linked
18572 # after Tcl/Tk. Note that this isn't put into LIBS. If it
18573 # were in LIBS then any link tests after this point would
18574 # try to include things like `$(LIBGUI)', which wouldn't work.
18575 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
18576
18577 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
18578 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
18579 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
18580 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
18581 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
18582 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
18583 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
18584
18585 if test x"$gdb_cv_os_cygwin" = xyes; then
18586 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
18587 WIN32LDAPP="-Wl,--subsystem,console"
18588 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
18589 fi
18590
18591 subdirs="$subdirs gdbtk"
18592
18593 fi
18594 fi
18595
18596
18597
18598
18599
18600
18601
18602
18603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
18604 $as_echo_n "checking for X... " >&6; }
18605
18606
18607 # Check whether --with-x was given.
18608 if test "${with_x+set}" = set; then :
18609 withval=$with_x;
18610 fi
18611
18612 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
18613 if test "x$with_x" = xno; then
18614 # The user explicitly disabled X.
18615 have_x=disabled
18616 else
18617 case $x_includes,$x_libraries in #(
18618 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
18619 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
18620 $as_echo_n "(cached) " >&6
18621 else
18622 # One or both of the vars are not set, and there is no cached value.
18623 ac_x_includes=no ac_x_libraries=no
18624 rm -f -r conftest.dir
18625 if mkdir conftest.dir; then
18626 cd conftest.dir
18627 cat >Imakefile <<'_ACEOF'
18628 incroot:
18629 @echo incroot='${INCROOT}'
18630 usrlibdir:
18631 @echo usrlibdir='${USRLIBDIR}'
18632 libdir:
18633 @echo libdir='${LIBDIR}'
18634 _ACEOF
18635 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
18636 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
18637 for ac_var in incroot usrlibdir libdir; do
18638 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
18639 done
18640 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
18641 for ac_extension in a so sl dylib la dll; do
18642 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
18643 test -f "$ac_im_libdir/libX11.$ac_extension"; then
18644 ac_im_usrlibdir=$ac_im_libdir; break
18645 fi
18646 done
18647 # Screen out bogus values from the imake configuration. They are
18648 # bogus both because they are the default anyway, and because
18649 # using them would break gcc on systems where it needs fixed includes.
18650 case $ac_im_incroot in
18651 /usr/include) ac_x_includes= ;;
18652 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
18653 esac
18654 case $ac_im_usrlibdir in
18655 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
18656 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
18657 esac
18658 fi
18659 cd ..
18660 rm -f -r conftest.dir
18661 fi
18662
18663 # Standard set of common directories for X headers.
18664 # Check X11 before X11Rn because it is often a symlink to the current release.
18665 ac_x_header_dirs='
18666 /usr/X11/include
18667 /usr/X11R7/include
18668 /usr/X11R6/include
18669 /usr/X11R5/include
18670 /usr/X11R4/include
18671
18672 /usr/include/X11
18673 /usr/include/X11R7
18674 /usr/include/X11R6
18675 /usr/include/X11R5
18676 /usr/include/X11R4
18677
18678 /usr/local/X11/include
18679 /usr/local/X11R7/include
18680 /usr/local/X11R6/include
18681 /usr/local/X11R5/include
18682 /usr/local/X11R4/include
18683
18684 /usr/local/include/X11
18685 /usr/local/include/X11R7
18686 /usr/local/include/X11R6
18687 /usr/local/include/X11R5
18688 /usr/local/include/X11R4
18689
18690 /usr/X386/include
18691 /usr/x386/include
18692 /usr/XFree86/include/X11
18693
18694 /usr/include
18695 /usr/local/include
18696 /usr/unsupported/include
18697 /usr/athena/include
18698 /usr/local/x11r5/include
18699 /usr/lpp/Xamples/include
18700
18701 /usr/openwin/include
18702 /usr/openwin/share/include'
18703
18704 if test "$ac_x_includes" = no; then
18705 # Guess where to find include files, by looking for Xlib.h.
18706 # First, try using that file with no special directory specified.
18707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18708 /* end confdefs.h. */
18709 #include <X11/Xlib.h>
18710 _ACEOF
18711 if ac_fn_c_try_cpp "$LINENO"; then :
18712 # We can compile using X headers with no special include directory.
18713 ac_x_includes=
18714 else
18715 for ac_dir in $ac_x_header_dirs; do
18716 if test -r "$ac_dir/X11/Xlib.h"; then
18717 ac_x_includes=$ac_dir
18718 break
18719 fi
18720 done
18721 fi
18722 rm -f conftest.err conftest.i conftest.$ac_ext
18723 fi # $ac_x_includes = no
18724
18725 if test "$ac_x_libraries" = no; then
18726 # Check for the libraries.
18727 # See if we find them without any special options.
18728 # Don't add to $LIBS permanently.
18729 ac_save_LIBS=$LIBS
18730 LIBS="-lX11 $LIBS"
18731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18732 /* end confdefs.h. */
18733 #include <X11/Xlib.h>
18734 int
18735 main ()
18736 {
18737 XrmInitialize ()
18738 ;
18739 return 0;
18740 }
18741 _ACEOF
18742 if ac_fn_c_try_link "$LINENO"; then :
18743 LIBS=$ac_save_LIBS
18744 # We can link X programs with no special library path.
18745 ac_x_libraries=
18746 else
18747 LIBS=$ac_save_LIBS
18748 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18749 do
18750 # Don't even attempt the hair of trying to link an X program!
18751 for ac_extension in a so sl dylib la dll; do
18752 if test -r "$ac_dir/libX11.$ac_extension"; then
18753 ac_x_libraries=$ac_dir
18754 break 2
18755 fi
18756 done
18757 done
18758 fi
18759 rm -f core conftest.err conftest.$ac_objext \
18760 conftest$ac_exeext conftest.$ac_ext
18761 fi # $ac_x_libraries = no
18762
18763 case $ac_x_includes,$ac_x_libraries in #(
18764 no,* | *,no | *\'*)
18765 # Didn't find X, or a directory has "'" in its name.
18766 ac_cv_have_x="have_x=no";; #(
18767 *)
18768 # Record where we found X for the cache.
18769 ac_cv_have_x="have_x=yes\
18770 ac_x_includes='$ac_x_includes'\
18771 ac_x_libraries='$ac_x_libraries'"
18772 esac
18773 fi
18774 ;; #(
18775 *) have_x=yes;;
18776 esac
18777 eval "$ac_cv_have_x"
18778 fi # $with_x != no
18779
18780 if test "$have_x" != yes; then
18781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18782 $as_echo "$have_x" >&6; }
18783 no_x=yes
18784 else
18785 # If each of the values was on the command line, it overrides each guess.
18786 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18787 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18788 # Update the cache value to reflect the command line values.
18789 ac_cv_have_x="have_x=yes\
18790 ac_x_includes='$x_includes'\
18791 ac_x_libraries='$x_libraries'"
18792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18793 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18794 fi
18795
18796
18797 # Unlike the sim directory, whether a simulator is linked is controlled by
18798 # presence of a gdb_sim definition in the target configure.tgt entry.
18799 # This code just checks for a few cases where we'd like to ignore those
18800 # definitions, even when they're present in the '.mt' file. These cases
18801 # are when --disable-sim is specified, or if the simulator directory is
18802 # not part of the source tree.
18803 #
18804 # Check whether --enable-sim was given.
18805 if test "${enable_sim+set}" = set; then :
18806 enableval=$enable_sim; echo "enable_sim = $enable_sim";
18807 echo "enableval = ${enableval}";
18808 case "${enableval}" in
18809 yes) ignore_sim=false ;;
18810 no) ignore_sim=true ;;
18811 *) ignore_sim=false ;;
18812 esac
18813 else
18814 ignore_sim=false
18815 fi
18816
18817
18818 if test ! -d "${srcdir}/../sim"; then
18819 ignore_sim=true
18820 fi
18821
18822 SIM=
18823 SIM_OBS=
18824 if test "${ignore_sim}" = "false"; then
18825 if test x"${gdb_sim}" != x ; then
18826 SIM="${gdb_sim}"
18827 SIM_OBS="remote-sim.o"
18828
18829 # Some tdep code should only be compiled in when the ppc sim is
18830 # built. PR sim/13418.
18831 case $target in
18832 powerpc*-*-*)
18833
18834 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18835
18836 ;;
18837 esac
18838 fi
18839 fi
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854 # List of host floatformats.
18855
18856 cat >>confdefs.h <<_ACEOF
18857 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18858 _ACEOF
18859
18860
18861 cat >>confdefs.h <<_ACEOF
18862 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18863 _ACEOF
18864
18865
18866 cat >>confdefs.h <<_ACEOF
18867 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18868 _ACEOF
18869
18870
18871 # target_subdir is used by the testsuite to find the target libraries.
18872 target_subdir=
18873 if test "${host}" != "${target}"; then
18874 target_subdir="${target_alias}/"
18875 fi
18876
18877
18878 # Import nat definitions.
18879 nat_makefile_frag=/dev/null
18880 if test "${gdb_native}" = "yes"; then
18881 . ${srcdir}/configure.nat
18882 nativefile=$NAT_FILE
18883 fi
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895 if test x"${gdb_osabi}" != x ; then
18896
18897 cat >>confdefs.h <<_ACEOF
18898 #define GDB_OSABI_DEFAULT $gdb_osabi
18899 _ACEOF
18900
18901 fi
18902
18903 # Setup possible use of libbacktrace.
18904 # Check whether --enable-libbacktrace was given.
18905 if test "${enable_libbacktrace+set}" = set; then :
18906 enableval=$enable_libbacktrace;
18907 case $enableval in
18908 yes | no)
18909 ;;
18910 *)
18911 as_fn_error $? "bad value $enableval for --enable-libbacktrace" "$LINENO" 5
18912 ;;
18913 esac
18914
18915 else
18916 enable_libbacktrace=yes
18917 fi
18918
18919
18920 if test "${enable_libbacktrace}" = "yes"; then
18921 LIBBACKTRACE_INC="-I$srcdir/../libbacktrace/ -I../libbacktrace/"
18922 LIBBACKTRACE_LIB=../libbacktrace/.libs/libbacktrace.a
18923
18924 $as_echo "#define HAVE_LIBBACKTRACE 1" >>confdefs.h
18925
18926 else
18927 LIBBACKTRACE_INC=
18928 LIBBACKTRACE_LIB=
18929 fi
18930
18931
18932
18933
18934 # Check for babeltrace and babeltrace-ctf
18935
18936 # Check whether --with-babeltrace was given.
18937 if test "${with_babeltrace+set}" = set; then :
18938 withval=$with_babeltrace;
18939 else
18940 with_babeltrace=auto
18941 fi
18942
18943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18944 $as_echo_n "checking whether to use babeltrace... " >&6; }
18945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18946 $as_echo "$with_babeltrace" >&6; }
18947
18948 if test "x$with_babeltrace" = "xno"; then
18949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18950 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18951 else
18952 # Append -Werror to CFLAGS so that configure can catch the warning
18953 # "assignment from incompatible pointer type", which is related to
18954 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18955 # in GDB, while babeltrace 1.0.3 is broken.
18956 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18957 # safe to save and restore CFLAGS here.
18958 saved_CFLAGS=$CFLAGS
18959 CFLAGS="$CFLAGS -Werror"
18960
18961
18962
18963
18964
18965
18966
18967
18968 use_additional=yes
18969
18970 acl_save_prefix="$prefix"
18971 prefix="$acl_final_prefix"
18972 acl_save_exec_prefix="$exec_prefix"
18973 exec_prefix="$acl_final_exec_prefix"
18974
18975 eval additional_includedir=\"$includedir\"
18976 eval additional_libdir=\"$libdir\"
18977
18978 exec_prefix="$acl_save_exec_prefix"
18979 prefix="$acl_save_prefix"
18980
18981
18982 # Check whether --with-libbabeltrace-prefix was given.
18983 if test "${with_libbabeltrace_prefix+set}" = set; then :
18984 withval=$with_libbabeltrace_prefix;
18985 if test "X$withval" = "Xno"; then
18986 use_additional=no
18987 else
18988 if test "X$withval" = "X"; then
18989
18990 acl_save_prefix="$prefix"
18991 prefix="$acl_final_prefix"
18992 acl_save_exec_prefix="$exec_prefix"
18993 exec_prefix="$acl_final_exec_prefix"
18994
18995 eval additional_includedir=\"$includedir\"
18996 eval additional_libdir=\"$libdir\"
18997
18998 exec_prefix="$acl_save_exec_prefix"
18999 prefix="$acl_save_prefix"
19000
19001 else
19002 additional_includedir="$withval/include"
19003 additional_libdir="$withval/lib"
19004 fi
19005 fi
19006
19007 fi
19008
19009
19010 # Check whether --with-libbabeltrace-type was given.
19011 if test "${with_libbabeltrace_type+set}" = set; then :
19012 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
19013 else
19014 with_libbabeltrace_type=auto
19015 fi
19016
19017 lib_type=`eval echo \$with_libbabeltrace_type`
19018
19019 LIBBABELTRACE=
19020 LTLIBBABELTRACE=
19021 INCBABELTRACE=
19022 rpathdirs=
19023 ltrpathdirs=
19024 names_already_handled=
19025 names_next_round='babeltrace babeltrace-ctf'
19026 while test -n "$names_next_round"; do
19027 names_this_round="$names_next_round"
19028 names_next_round=
19029 for name in $names_this_round; do
19030 already_handled=
19031 for n in $names_already_handled; do
19032 if test "$n" = "$name"; then
19033 already_handled=yes
19034 break
19035 fi
19036 done
19037 if test -z "$already_handled"; then
19038 names_already_handled="$names_already_handled $name"
19039 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19040 eval value=\"\$HAVE_LIB$uppername\"
19041 if test -n "$value"; then
19042 if test "$value" = yes; then
19043 eval value=\"\$LIB$uppername\"
19044 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
19045 eval value=\"\$LTLIB$uppername\"
19046 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
19047 else
19048 :
19049 fi
19050 else
19051 found_dir=
19052 found_la=
19053 found_so=
19054 found_a=
19055 if test $use_additional = yes; then
19056 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19057 found_dir="$additional_libdir"
19058 found_so="$additional_libdir/lib$name.$shlibext"
19059 if test -f "$additional_libdir/lib$name.la"; then
19060 found_la="$additional_libdir/lib$name.la"
19061 fi
19062 elif test x$lib_type != xshared; then
19063 if test -f "$additional_libdir/lib$name.$libext"; then
19064 found_dir="$additional_libdir"
19065 found_a="$additional_libdir/lib$name.$libext"
19066 if test -f "$additional_libdir/lib$name.la"; then
19067 found_la="$additional_libdir/lib$name.la"
19068 fi
19069 fi
19070 fi
19071 fi
19072 if test "X$found_dir" = "X"; then
19073 for x in $LDFLAGS $LTLIBBABELTRACE; do
19074
19075 acl_save_prefix="$prefix"
19076 prefix="$acl_final_prefix"
19077 acl_save_exec_prefix="$exec_prefix"
19078 exec_prefix="$acl_final_exec_prefix"
19079 eval x=\"$x\"
19080 exec_prefix="$acl_save_exec_prefix"
19081 prefix="$acl_save_prefix"
19082
19083 case "$x" in
19084 -L*)
19085 dir=`echo "X$x" | sed -e 's/^X-L//'`
19086 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19087 found_dir="$dir"
19088 found_so="$dir/lib$name.$shlibext"
19089 if test -f "$dir/lib$name.la"; then
19090 found_la="$dir/lib$name.la"
19091 fi
19092 elif test x$lib_type != xshared; then
19093 if test -f "$dir/lib$name.$libext"; then
19094 found_dir="$dir"
19095 found_a="$dir/lib$name.$libext"
19096 if test -f "$dir/lib$name.la"; then
19097 found_la="$dir/lib$name.la"
19098 fi
19099 fi
19100 fi
19101 ;;
19102 esac
19103 if test "X$found_dir" != "X"; then
19104 break
19105 fi
19106 done
19107 fi
19108 if test "X$found_dir" != "X"; then
19109 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
19110 if test "X$found_so" != "X"; then
19111 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19112 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19113 else
19114 haveit=
19115 for x in $ltrpathdirs; do
19116 if test "X$x" = "X$found_dir"; then
19117 haveit=yes
19118 break
19119 fi
19120 done
19121 if test -z "$haveit"; then
19122 ltrpathdirs="$ltrpathdirs $found_dir"
19123 fi
19124 if test "$hardcode_direct" = yes; then
19125 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19126 else
19127 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19128 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19129 haveit=
19130 for x in $rpathdirs; do
19131 if test "X$x" = "X$found_dir"; then
19132 haveit=yes
19133 break
19134 fi
19135 done
19136 if test -z "$haveit"; then
19137 rpathdirs="$rpathdirs $found_dir"
19138 fi
19139 else
19140 haveit=
19141 for x in $LDFLAGS $LIBBABELTRACE; do
19142
19143 acl_save_prefix="$prefix"
19144 prefix="$acl_final_prefix"
19145 acl_save_exec_prefix="$exec_prefix"
19146 exec_prefix="$acl_final_exec_prefix"
19147 eval x=\"$x\"
19148 exec_prefix="$acl_save_exec_prefix"
19149 prefix="$acl_save_prefix"
19150
19151 if test "X$x" = "X-L$found_dir"; then
19152 haveit=yes
19153 break
19154 fi
19155 done
19156 if test -z "$haveit"; then
19157 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
19158 fi
19159 if test "$hardcode_minus_L" != no; then
19160 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19161 else
19162 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19163 fi
19164 fi
19165 fi
19166 fi
19167 else
19168 if test "X$found_a" != "X"; then
19169 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
19170 else
19171 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
19172 fi
19173 fi
19174 additional_includedir=
19175 case "$found_dir" in
19176 */lib | */lib/)
19177 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19178 additional_includedir="$basedir/include"
19179 ;;
19180 esac
19181 if test "X$additional_includedir" != "X"; then
19182 if test "X$additional_includedir" != "X/usr/include"; then
19183 haveit=
19184 if test "X$additional_includedir" = "X/usr/local/include"; then
19185 if test -n "$GCC"; then
19186 case $host_os in
19187 linux*) haveit=yes;;
19188 esac
19189 fi
19190 fi
19191 if test -z "$haveit"; then
19192 for x in $CPPFLAGS $INCBABELTRACE; do
19193
19194 acl_save_prefix="$prefix"
19195 prefix="$acl_final_prefix"
19196 acl_save_exec_prefix="$exec_prefix"
19197 exec_prefix="$acl_final_exec_prefix"
19198 eval x=\"$x\"
19199 exec_prefix="$acl_save_exec_prefix"
19200 prefix="$acl_save_prefix"
19201
19202 if test "X$x" = "X-I$additional_includedir"; then
19203 haveit=yes
19204 break
19205 fi
19206 done
19207 if test -z "$haveit"; then
19208 if test -d "$additional_includedir"; then
19209 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
19210 fi
19211 fi
19212 fi
19213 fi
19214 fi
19215 if test -n "$found_la"; then
19216 save_libdir="$libdir"
19217 case "$found_la" in
19218 */* | *\\*) . "$found_la" ;;
19219 *) . "./$found_la" ;;
19220 esac
19221 libdir="$save_libdir"
19222 for dep in $dependency_libs; do
19223 case "$dep" in
19224 -L*)
19225 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19226 if test "X$additional_libdir" != "X/usr/lib"; then
19227 haveit=
19228 if test "X$additional_libdir" = "X/usr/local/lib"; then
19229 if test -n "$GCC"; then
19230 case $host_os in
19231 linux*) haveit=yes;;
19232 esac
19233 fi
19234 fi
19235 if test -z "$haveit"; then
19236 haveit=
19237 for x in $LDFLAGS $LIBBABELTRACE; do
19238
19239 acl_save_prefix="$prefix"
19240 prefix="$acl_final_prefix"
19241 acl_save_exec_prefix="$exec_prefix"
19242 exec_prefix="$acl_final_exec_prefix"
19243 eval x=\"$x\"
19244 exec_prefix="$acl_save_exec_prefix"
19245 prefix="$acl_save_prefix"
19246
19247 if test "X$x" = "X-L$additional_libdir"; then
19248 haveit=yes
19249 break
19250 fi
19251 done
19252 if test -z "$haveit"; then
19253 if test -d "$additional_libdir"; then
19254 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
19255 fi
19256 fi
19257 haveit=
19258 for x in $LDFLAGS $LTLIBBABELTRACE; do
19259
19260 acl_save_prefix="$prefix"
19261 prefix="$acl_final_prefix"
19262 acl_save_exec_prefix="$exec_prefix"
19263 exec_prefix="$acl_final_exec_prefix"
19264 eval x=\"$x\"
19265 exec_prefix="$acl_save_exec_prefix"
19266 prefix="$acl_save_prefix"
19267
19268 if test "X$x" = "X-L$additional_libdir"; then
19269 haveit=yes
19270 break
19271 fi
19272 done
19273 if test -z "$haveit"; then
19274 if test -d "$additional_libdir"; then
19275 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
19276 fi
19277 fi
19278 fi
19279 fi
19280 ;;
19281 -R*)
19282 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19283 if test "$enable_rpath" != no; then
19284 haveit=
19285 for x in $rpathdirs; do
19286 if test "X$x" = "X$dir"; then
19287 haveit=yes
19288 break
19289 fi
19290 done
19291 if test -z "$haveit"; then
19292 rpathdirs="$rpathdirs $dir"
19293 fi
19294 haveit=
19295 for x in $ltrpathdirs; do
19296 if test "X$x" = "X$dir"; then
19297 haveit=yes
19298 break
19299 fi
19300 done
19301 if test -z "$haveit"; then
19302 ltrpathdirs="$ltrpathdirs $dir"
19303 fi
19304 fi
19305 ;;
19306 -l*)
19307 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19308 ;;
19309 *.la)
19310 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19311 ;;
19312 *)
19313 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
19314 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
19315 ;;
19316 esac
19317 done
19318 fi
19319 else
19320 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19321 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19322 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
19323 else
19324 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
19325 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
19326 fi
19327 fi
19328 fi
19329 fi
19330 done
19331 done
19332 if test "X$rpathdirs" != "X"; then
19333 if test -n "$hardcode_libdir_separator"; then
19334 alldirs=
19335 for found_dir in $rpathdirs; do
19336 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19337 done
19338 acl_save_libdir="$libdir"
19339 libdir="$alldirs"
19340 eval flag=\"$hardcode_libdir_flag_spec\"
19341 libdir="$acl_save_libdir"
19342 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19343 else
19344 for found_dir in $rpathdirs; do
19345 acl_save_libdir="$libdir"
19346 libdir="$found_dir"
19347 eval flag=\"$hardcode_libdir_flag_spec\"
19348 libdir="$acl_save_libdir"
19349 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19350 done
19351 fi
19352 fi
19353 if test "X$ltrpathdirs" != "X"; then
19354 for found_dir in $ltrpathdirs; do
19355 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
19356 done
19357 fi
19358
19359
19360 ac_save_CPPFLAGS="$CPPFLAGS"
19361
19362 for element in $INCBABELTRACE; do
19363 haveit=
19364 for x in $CPPFLAGS; do
19365
19366 acl_save_prefix="$prefix"
19367 prefix="$acl_final_prefix"
19368 acl_save_exec_prefix="$exec_prefix"
19369 exec_prefix="$acl_final_exec_prefix"
19370 eval x=\"$x\"
19371 exec_prefix="$acl_save_exec_prefix"
19372 prefix="$acl_save_prefix"
19373
19374 if test "X$x" = "X$element"; then
19375 haveit=yes
19376 break
19377 fi
19378 done
19379 if test -z "$haveit"; then
19380 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19381 fi
19382 done
19383
19384
19385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
19386 $as_echo_n "checking for libbabeltrace... " >&6; }
19387 if ${ac_cv_libbabeltrace+:} false; then :
19388 $as_echo_n "(cached) " >&6
19389 else
19390
19391 ac_save_LIBS="$LIBS"
19392 LIBS="$LIBS $LIBBABELTRACE"
19393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19394 /* end confdefs.h. */
19395 #include <babeltrace/babeltrace.h>
19396 #include <babeltrace/ctf/events.h>
19397 #include <babeltrace/ctf/iterator.h>
19398 int
19399 main ()
19400 {
19401 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
19402 struct bt_ctf_event *event = NULL;
19403 const struct bt_definition *scope;
19404
19405 pos->type = BT_SEEK_BEGIN;
19406 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
19407 scope = bt_ctf_get_top_level_scope (event,
19408 BT_STREAM_EVENT_HEADER);
19409 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
19410
19411 ;
19412 return 0;
19413 }
19414 _ACEOF
19415 if ac_fn_c_try_link "$LINENO"; then :
19416 ac_cv_libbabeltrace=yes
19417 else
19418 ac_cv_libbabeltrace=no
19419 fi
19420 rm -f core conftest.err conftest.$ac_objext \
19421 conftest$ac_exeext conftest.$ac_ext
19422 LIBS="$ac_save_LIBS"
19423
19424 fi
19425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
19426 $as_echo "$ac_cv_libbabeltrace" >&6; }
19427 if test "$ac_cv_libbabeltrace" = yes; then
19428 HAVE_LIBBABELTRACE=yes
19429
19430 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
19431
19432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
19433 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
19434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
19435 $as_echo "$LIBBABELTRACE" >&6; }
19436 else
19437 HAVE_LIBBABELTRACE=no
19438 CPPFLAGS="$ac_save_CPPFLAGS"
19439 LIBBABELTRACE=
19440 LTLIBBABELTRACE=
19441 fi
19442
19443
19444
19445
19446
19447
19448 CFLAGS=$saved_CFLAGS
19449
19450 if test "$HAVE_LIBBABELTRACE" != yes; then
19451 if test "$with_babeltrace" = yes; then
19452 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
19453 else
19454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
19455 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
19456 fi
19457 fi
19458 fi
19459
19460 # Check for xxhash
19461
19462 # Check whether --with-xxhash was given.
19463 if test "${with_xxhash+set}" = set; then :
19464 withval=$with_xxhash;
19465 else
19466 with_xxhash=auto
19467 fi
19468
19469
19470 # Check whether --enable-libctf was given.
19471 if test "${enable_libctf+set}" = set; then :
19472 enableval=$enable_libctf;
19473 case "$enableval" in
19474 yes|no) ;;
19475 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
19476 esac
19477
19478 else
19479 enable_libctf=yes
19480 fi
19481
19482
19483 if test x${enable_static} = xno; then
19484 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
19485 CTF_DEPS="../libctf/.libs/libctf.so"
19486 else
19487 LIBCTF="../libctf/.libs/libctf.a"
19488 CTF_DEPS="$LIBCTF"
19489 fi
19490 if test "${enable_libctf}" = yes; then
19491
19492 $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
19493
19494 else
19495 LIBCTF=
19496 CTF_DEPS=
19497 fi
19498
19499
19500
19501 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
19502 # empty version.
19503
19504 if test "x$with_xxhash" != "xno"; then
19505
19506
19507
19508
19509
19510
19511
19512
19513 use_additional=yes
19514
19515 acl_save_prefix="$prefix"
19516 prefix="$acl_final_prefix"
19517 acl_save_exec_prefix="$exec_prefix"
19518 exec_prefix="$acl_final_exec_prefix"
19519
19520 eval additional_includedir=\"$includedir\"
19521 eval additional_libdir=\"$libdir\"
19522
19523 exec_prefix="$acl_save_exec_prefix"
19524 prefix="$acl_save_prefix"
19525
19526
19527 # Check whether --with-libxxhash-prefix was given.
19528 if test "${with_libxxhash_prefix+set}" = set; then :
19529 withval=$with_libxxhash_prefix;
19530 if test "X$withval" = "Xno"; then
19531 use_additional=no
19532 else
19533 if test "X$withval" = "X"; then
19534
19535 acl_save_prefix="$prefix"
19536 prefix="$acl_final_prefix"
19537 acl_save_exec_prefix="$exec_prefix"
19538 exec_prefix="$acl_final_exec_prefix"
19539
19540 eval additional_includedir=\"$includedir\"
19541 eval additional_libdir=\"$libdir\"
19542
19543 exec_prefix="$acl_save_exec_prefix"
19544 prefix="$acl_save_prefix"
19545
19546 else
19547 additional_includedir="$withval/include"
19548 additional_libdir="$withval/lib"
19549 fi
19550 fi
19551
19552 fi
19553
19554
19555 # Check whether --with-libxxhash-type was given.
19556 if test "${with_libxxhash_type+set}" = set; then :
19557 withval=$with_libxxhash_type; with_libxxhash_type=$withval
19558 else
19559 with_libxxhash_type=auto
19560 fi
19561
19562 lib_type=`eval echo \$with_libxxhash_type`
19563
19564 LIBXXHASH=
19565 LTLIBXXHASH=
19566 INCXXHASH=
19567 rpathdirs=
19568 ltrpathdirs=
19569 names_already_handled=
19570 names_next_round='xxhash '
19571 while test -n "$names_next_round"; do
19572 names_this_round="$names_next_round"
19573 names_next_round=
19574 for name in $names_this_round; do
19575 already_handled=
19576 for n in $names_already_handled; do
19577 if test "$n" = "$name"; then
19578 already_handled=yes
19579 break
19580 fi
19581 done
19582 if test -z "$already_handled"; then
19583 names_already_handled="$names_already_handled $name"
19584 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19585 eval value=\"\$HAVE_LIB$uppername\"
19586 if test -n "$value"; then
19587 if test "$value" = yes; then
19588 eval value=\"\$LIB$uppername\"
19589 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
19590 eval value=\"\$LTLIB$uppername\"
19591 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
19592 else
19593 :
19594 fi
19595 else
19596 found_dir=
19597 found_la=
19598 found_so=
19599 found_a=
19600 if test $use_additional = yes; then
19601 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19602 found_dir="$additional_libdir"
19603 found_so="$additional_libdir/lib$name.$shlibext"
19604 if test -f "$additional_libdir/lib$name.la"; then
19605 found_la="$additional_libdir/lib$name.la"
19606 fi
19607 elif test x$lib_type != xshared; then
19608 if test -f "$additional_libdir/lib$name.$libext"; then
19609 found_dir="$additional_libdir"
19610 found_a="$additional_libdir/lib$name.$libext"
19611 if test -f "$additional_libdir/lib$name.la"; then
19612 found_la="$additional_libdir/lib$name.la"
19613 fi
19614 fi
19615 fi
19616 fi
19617 if test "X$found_dir" = "X"; then
19618 for x in $LDFLAGS $LTLIBXXHASH; do
19619
19620 acl_save_prefix="$prefix"
19621 prefix="$acl_final_prefix"
19622 acl_save_exec_prefix="$exec_prefix"
19623 exec_prefix="$acl_final_exec_prefix"
19624 eval x=\"$x\"
19625 exec_prefix="$acl_save_exec_prefix"
19626 prefix="$acl_save_prefix"
19627
19628 case "$x" in
19629 -L*)
19630 dir=`echo "X$x" | sed -e 's/^X-L//'`
19631 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19632 found_dir="$dir"
19633 found_so="$dir/lib$name.$shlibext"
19634 if test -f "$dir/lib$name.la"; then
19635 found_la="$dir/lib$name.la"
19636 fi
19637 elif test x$lib_type != xshared; then
19638 if test -f "$dir/lib$name.$libext"; then
19639 found_dir="$dir"
19640 found_a="$dir/lib$name.$libext"
19641 if test -f "$dir/lib$name.la"; then
19642 found_la="$dir/lib$name.la"
19643 fi
19644 fi
19645 fi
19646 ;;
19647 esac
19648 if test "X$found_dir" != "X"; then
19649 break
19650 fi
19651 done
19652 fi
19653 if test "X$found_dir" != "X"; then
19654 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
19655 if test "X$found_so" != "X"; then
19656 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19657 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19658 else
19659 haveit=
19660 for x in $ltrpathdirs; do
19661 if test "X$x" = "X$found_dir"; then
19662 haveit=yes
19663 break
19664 fi
19665 done
19666 if test -z "$haveit"; then
19667 ltrpathdirs="$ltrpathdirs $found_dir"
19668 fi
19669 if test "$hardcode_direct" = yes; then
19670 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19671 else
19672 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19673 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19674 haveit=
19675 for x in $rpathdirs; do
19676 if test "X$x" = "X$found_dir"; then
19677 haveit=yes
19678 break
19679 fi
19680 done
19681 if test -z "$haveit"; then
19682 rpathdirs="$rpathdirs $found_dir"
19683 fi
19684 else
19685 haveit=
19686 for x in $LDFLAGS $LIBXXHASH; do
19687
19688 acl_save_prefix="$prefix"
19689 prefix="$acl_final_prefix"
19690 acl_save_exec_prefix="$exec_prefix"
19691 exec_prefix="$acl_final_exec_prefix"
19692 eval x=\"$x\"
19693 exec_prefix="$acl_save_exec_prefix"
19694 prefix="$acl_save_prefix"
19695
19696 if test "X$x" = "X-L$found_dir"; then
19697 haveit=yes
19698 break
19699 fi
19700 done
19701 if test -z "$haveit"; then
19702 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19703 fi
19704 if test "$hardcode_minus_L" != no; then
19705 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19706 else
19707 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19708 fi
19709 fi
19710 fi
19711 fi
19712 else
19713 if test "X$found_a" != "X"; then
19714 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19715 else
19716 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19717 fi
19718 fi
19719 additional_includedir=
19720 case "$found_dir" in
19721 */lib | */lib/)
19722 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19723 additional_includedir="$basedir/include"
19724 ;;
19725 esac
19726 if test "X$additional_includedir" != "X"; then
19727 if test "X$additional_includedir" != "X/usr/include"; then
19728 haveit=
19729 if test "X$additional_includedir" = "X/usr/local/include"; then
19730 if test -n "$GCC"; then
19731 case $host_os in
19732 linux*) haveit=yes;;
19733 esac
19734 fi
19735 fi
19736 if test -z "$haveit"; then
19737 for x in $CPPFLAGS $INCXXHASH; do
19738
19739 acl_save_prefix="$prefix"
19740 prefix="$acl_final_prefix"
19741 acl_save_exec_prefix="$exec_prefix"
19742 exec_prefix="$acl_final_exec_prefix"
19743 eval x=\"$x\"
19744 exec_prefix="$acl_save_exec_prefix"
19745 prefix="$acl_save_prefix"
19746
19747 if test "X$x" = "X-I$additional_includedir"; then
19748 haveit=yes
19749 break
19750 fi
19751 done
19752 if test -z "$haveit"; then
19753 if test -d "$additional_includedir"; then
19754 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19755 fi
19756 fi
19757 fi
19758 fi
19759 fi
19760 if test -n "$found_la"; then
19761 save_libdir="$libdir"
19762 case "$found_la" in
19763 */* | *\\*) . "$found_la" ;;
19764 *) . "./$found_la" ;;
19765 esac
19766 libdir="$save_libdir"
19767 for dep in $dependency_libs; do
19768 case "$dep" in
19769 -L*)
19770 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19771 if test "X$additional_libdir" != "X/usr/lib"; then
19772 haveit=
19773 if test "X$additional_libdir" = "X/usr/local/lib"; then
19774 if test -n "$GCC"; then
19775 case $host_os in
19776 linux*) haveit=yes;;
19777 esac
19778 fi
19779 fi
19780 if test -z "$haveit"; then
19781 haveit=
19782 for x in $LDFLAGS $LIBXXHASH; do
19783
19784 acl_save_prefix="$prefix"
19785 prefix="$acl_final_prefix"
19786 acl_save_exec_prefix="$exec_prefix"
19787 exec_prefix="$acl_final_exec_prefix"
19788 eval x=\"$x\"
19789 exec_prefix="$acl_save_exec_prefix"
19790 prefix="$acl_save_prefix"
19791
19792 if test "X$x" = "X-L$additional_libdir"; then
19793 haveit=yes
19794 break
19795 fi
19796 done
19797 if test -z "$haveit"; then
19798 if test -d "$additional_libdir"; then
19799 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19800 fi
19801 fi
19802 haveit=
19803 for x in $LDFLAGS $LTLIBXXHASH; do
19804
19805 acl_save_prefix="$prefix"
19806 prefix="$acl_final_prefix"
19807 acl_save_exec_prefix="$exec_prefix"
19808 exec_prefix="$acl_final_exec_prefix"
19809 eval x=\"$x\"
19810 exec_prefix="$acl_save_exec_prefix"
19811 prefix="$acl_save_prefix"
19812
19813 if test "X$x" = "X-L$additional_libdir"; then
19814 haveit=yes
19815 break
19816 fi
19817 done
19818 if test -z "$haveit"; then
19819 if test -d "$additional_libdir"; then
19820 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19821 fi
19822 fi
19823 fi
19824 fi
19825 ;;
19826 -R*)
19827 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19828 if test "$enable_rpath" != no; then
19829 haveit=
19830 for x in $rpathdirs; do
19831 if test "X$x" = "X$dir"; then
19832 haveit=yes
19833 break
19834 fi
19835 done
19836 if test -z "$haveit"; then
19837 rpathdirs="$rpathdirs $dir"
19838 fi
19839 haveit=
19840 for x in $ltrpathdirs; do
19841 if test "X$x" = "X$dir"; then
19842 haveit=yes
19843 break
19844 fi
19845 done
19846 if test -z "$haveit"; then
19847 ltrpathdirs="$ltrpathdirs $dir"
19848 fi
19849 fi
19850 ;;
19851 -l*)
19852 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19853 ;;
19854 *.la)
19855 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19856 ;;
19857 *)
19858 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19859 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19860 ;;
19861 esac
19862 done
19863 fi
19864 else
19865 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19866 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19867 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19868 else
19869 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19870 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19871 fi
19872 fi
19873 fi
19874 fi
19875 done
19876 done
19877 if test "X$rpathdirs" != "X"; then
19878 if test -n "$hardcode_libdir_separator"; then
19879 alldirs=
19880 for found_dir in $rpathdirs; do
19881 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19882 done
19883 acl_save_libdir="$libdir"
19884 libdir="$alldirs"
19885 eval flag=\"$hardcode_libdir_flag_spec\"
19886 libdir="$acl_save_libdir"
19887 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19888 else
19889 for found_dir in $rpathdirs; do
19890 acl_save_libdir="$libdir"
19891 libdir="$found_dir"
19892 eval flag=\"$hardcode_libdir_flag_spec\"
19893 libdir="$acl_save_libdir"
19894 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19895 done
19896 fi
19897 fi
19898 if test "X$ltrpathdirs" != "X"; then
19899 for found_dir in $ltrpathdirs; do
19900 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19901 done
19902 fi
19903
19904
19905 ac_save_CPPFLAGS="$CPPFLAGS"
19906
19907 for element in $INCXXHASH; do
19908 haveit=
19909 for x in $CPPFLAGS; do
19910
19911 acl_save_prefix="$prefix"
19912 prefix="$acl_final_prefix"
19913 acl_save_exec_prefix="$exec_prefix"
19914 exec_prefix="$acl_final_exec_prefix"
19915 eval x=\"$x\"
19916 exec_prefix="$acl_save_exec_prefix"
19917 prefix="$acl_save_prefix"
19918
19919 if test "X$x" = "X$element"; then
19920 haveit=yes
19921 break
19922 fi
19923 done
19924 if test -z "$haveit"; then
19925 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19926 fi
19927 done
19928
19929
19930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19931 $as_echo_n "checking for libxxhash... " >&6; }
19932 if ${ac_cv_libxxhash+:} false; then :
19933 $as_echo_n "(cached) " >&6
19934 else
19935
19936 ac_save_LIBS="$LIBS"
19937 LIBS="$LIBS $LIBXXHASH"
19938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19939 /* end confdefs.h. */
19940 #include <xxhash.h>
19941 int
19942 main ()
19943 {
19944 XXH32("foo", 3, 0);
19945
19946 ;
19947 return 0;
19948 }
19949 _ACEOF
19950 if ac_fn_c_try_link "$LINENO"; then :
19951 ac_cv_libxxhash=yes
19952 else
19953 ac_cv_libxxhash=no
19954 fi
19955 rm -f core conftest.err conftest.$ac_objext \
19956 conftest$ac_exeext conftest.$ac_ext
19957 LIBS="$ac_save_LIBS"
19958
19959 fi
19960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19961 $as_echo "$ac_cv_libxxhash" >&6; }
19962 if test "$ac_cv_libxxhash" = yes; then
19963 HAVE_LIBXXHASH=yes
19964
19965 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19966
19967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19968 $as_echo_n "checking how to link with libxxhash... " >&6; }
19969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19970 $as_echo "$LIBXXHASH" >&6; }
19971 else
19972 HAVE_LIBXXHASH=no
19973 CPPFLAGS="$ac_save_CPPFLAGS"
19974 LIBXXHASH=
19975 LTLIBXXHASH=
19976 fi
19977
19978
19979
19980
19981
19982
19983 if test "$HAVE_LIBXXHASH" != yes; then
19984 if test "$with_xxhash" = yes; then
19985 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19986 fi
19987 fi
19988 if test "x$with_xxhash" = "xauto"; then
19989 with_xxhash="$HAVE_LIBXXHASH"
19990 fi
19991 fi
19992
19993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19994 $as_echo_n "checking whether to use xxhash... " >&6; }
19995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19996 $as_echo "$with_xxhash" >&6; }
19997
19998 NM_H=
19999 rm -f nm.h
20000 if test "${nativefile}" != ""; then
20001 case "${nativefile}" in
20002 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
20003 * ) GDB_NM_FILE="${nativefile}"
20004 esac
20005 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
20006
20007
20008 cat >>confdefs.h <<_ACEOF
20009 #define GDB_NM_FILE "${GDB_NM_FILE}"
20010 _ACEOF
20011
20012 NM_H=nm.h
20013 fi
20014
20015
20016
20017 for ac_prog in xsltproc
20018 do
20019 # Extract the first word of "$ac_prog", so it can be a program name with args.
20020 set dummy $ac_prog; ac_word=$2
20021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20022 $as_echo_n "checking for $ac_word... " >&6; }
20023 if ${ac_cv_path_XSLTPROC+:} false; then :
20024 $as_echo_n "(cached) " >&6
20025 else
20026 case $XSLTPROC in
20027 [\\/]* | ?:[\\/]*)
20028 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
20029 ;;
20030 *)
20031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20032 for as_dir in $PATH
20033 do
20034 IFS=$as_save_IFS
20035 test -z "$as_dir" && as_dir=.
20036 for ac_exec_ext in '' $ac_executable_extensions; do
20037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20038 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
20039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20040 break 2
20041 fi
20042 done
20043 done
20044 IFS=$as_save_IFS
20045
20046 ;;
20047 esac
20048 fi
20049 XSLTPROC=$ac_cv_path_XSLTPROC
20050 if test -n "$XSLTPROC"; then
20051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
20052 $as_echo "$XSLTPROC" >&6; }
20053 else
20054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20055 $as_echo "no" >&6; }
20056 fi
20057
20058
20059 test -n "$XSLTPROC" && break
20060 done
20061 test -n "$XSLTPROC" || XSLTPROC="missing"
20062
20063 if test "x$USE_MAINTAINER_MODE" = xyes; then
20064 if test "${XSLTPROC}" = missing; then
20065 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
20066 fi
20067 fi
20068
20069
20070
20071
20072
20073 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
20074
20075
20076
20077 # Check whether we will enable the inclusion of unit tests when
20078 # compiling GDB.
20079 #
20080 # The default value of this option changes depending whether we're on
20081 # development mode (in which case it's "true") or not (in which case
20082 # it's "false"). The $development variable is set by the GDB_AC_COMMON
20083 # macro, which must therefore be used before GDB_AC_SELFTEST.
20084
20085 if test "x$development" != xtrue && test "x$development" != xfalse; then :
20086 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
20087 fi
20088
20089 # Check whether --enable-unit-tests was given.
20090 if test "${enable_unit_tests+set}" = set; then :
20091 enableval=$enable_unit_tests; case "${enableval}" in
20092 yes) enable_unittests=true ;;
20093 no) enable_unittests=false ;;
20094 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
20095 esac
20096 else
20097 enable_unittests=$development
20098 fi
20099
20100
20101 if $enable_unittests; then
20102
20103 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
20104
20105
20106 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
20107 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
20108
20109 fi
20110
20111
20112
20113 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
20114 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
20115 if test "x$GDB_TRANSFORM_NAME" = x; then
20116 GDB_TRANSFORM_NAME=gdb
20117 fi
20118
20119
20120
20121 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
20122 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
20123 if test "x$GCORE_TRANSFORM_NAME" = x; then
20124 GCORE_TRANSFORM_NAME=gcore
20125 fi
20126
20127
20128 ac_config_files="$ac_config_files gcore"
20129
20130 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
20131
20132
20133 cat >confcache <<\_ACEOF
20134 # This file is a shell script that caches the results of configure
20135 # tests run on this system so they can be shared between configure
20136 # scripts and configure runs, see configure's option --config-cache.
20137 # It is not useful on other systems. If it contains results you don't
20138 # want to keep, you may remove or edit it.
20139 #
20140 # config.status only pays attention to the cache file if you give it
20141 # the --recheck option to rerun configure.
20142 #
20143 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20144 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20145 # following values.
20146
20147 _ACEOF
20148
20149 # The following way of writing the cache mishandles newlines in values,
20150 # but we know of no workaround that is simple, portable, and efficient.
20151 # So, we kill variables containing newlines.
20152 # Ultrix sh set writes to stderr and can't be redirected directly,
20153 # and sets the high bit in the cache file unless we assign to the vars.
20154 (
20155 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20156 eval ac_val=\$$ac_var
20157 case $ac_val in #(
20158 *${as_nl}*)
20159 case $ac_var in #(
20160 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20161 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20162 esac
20163 case $ac_var in #(
20164 _ | IFS | as_nl) ;; #(
20165 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20166 *) { eval $ac_var=; unset $ac_var;} ;;
20167 esac ;;
20168 esac
20169 done
20170
20171 (set) 2>&1 |
20172 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20173 *${as_nl}ac_space=\ *)
20174 # `set' does not quote correctly, so add quotes: double-quote
20175 # substitution turns \\\\ into \\, and sed turns \\ into \.
20176 sed -n \
20177 "s/'/'\\\\''/g;
20178 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20179 ;; #(
20180 *)
20181 # `set' quotes correctly as required by POSIX, so do not add quotes.
20182 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20183 ;;
20184 esac |
20185 sort
20186 ) |
20187 sed '
20188 /^ac_cv_env_/b end
20189 t clear
20190 :clear
20191 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20192 t end
20193 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20194 :end' >>confcache
20195 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20196 if test -w "$cache_file"; then
20197 if test "x$cache_file" != "x/dev/null"; then
20198 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20199 $as_echo "$as_me: updating cache $cache_file" >&6;}
20200 if test ! -f "$cache_file" || test -h "$cache_file"; then
20201 cat confcache >"$cache_file"
20202 else
20203 case $cache_file in #(
20204 */* | ?:*)
20205 mv -f confcache "$cache_file"$$ &&
20206 mv -f "$cache_file"$$ "$cache_file" ;; #(
20207 *)
20208 mv -f confcache "$cache_file" ;;
20209 esac
20210 fi
20211 fi
20212 else
20213 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20214 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20215 fi
20216 fi
20217 rm -f confcache
20218
20219 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20220 # Let make expand exec_prefix.
20221 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20222
20223 DEFS=-DHAVE_CONFIG_H
20224
20225 ac_libobjs=
20226 ac_ltlibobjs=
20227 U=
20228 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20229 # 1. Remove the extension, and $U if already installed.
20230 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20231 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20232 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20233 # will be set to the directory where LIBOBJS objects are built.
20234 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20235 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20236 done
20237 LIBOBJS=$ac_libobjs
20238
20239 LTLIBOBJS=$ac_ltlibobjs
20240
20241
20242 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
20243 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
20244 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20245 fi
20246 if test -z "${ENABLE_BFD_64_BIT_TRUE}" && test -z "${ENABLE_BFD_64_BIT_FALSE}"; then
20247 as_fn_error $? "conditional \"ENABLE_BFD_64_BIT\" was never defined.
20248 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20249 fi
20250 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
20251 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
20252 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20253 fi
20254 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
20255 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
20256 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20257 fi
20258
20259
20260 : "${CONFIG_STATUS=./config.status}"
20261 ac_write_fail=0
20262 ac_clean_files_save=$ac_clean_files
20263 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20264 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20265 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20266 as_write_fail=0
20267 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20268 #! $SHELL
20269 # Generated by $as_me.
20270 # Run this file to recreate the current configuration.
20271 # Compiler output produced by configure, useful for debugging
20272 # configure, is in config.log if it exists.
20273
20274 debug=false
20275 ac_cs_recheck=false
20276 ac_cs_silent=false
20277
20278 SHELL=\${CONFIG_SHELL-$SHELL}
20279 export SHELL
20280 _ASEOF
20281 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20282 ## -------------------- ##
20283 ## M4sh Initialization. ##
20284 ## -------------------- ##
20285
20286 # Be more Bourne compatible
20287 DUALCASE=1; export DUALCASE # for MKS sh
20288 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20289 emulate sh
20290 NULLCMD=:
20291 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20292 # is contrary to our usage. Disable this feature.
20293 alias -g '${1+"$@"}'='"$@"'
20294 setopt NO_GLOB_SUBST
20295 else
20296 case `(set -o) 2>/dev/null` in #(
20297 *posix*) :
20298 set -o posix ;; #(
20299 *) :
20300 ;;
20301 esac
20302 fi
20303
20304
20305 as_nl='
20306 '
20307 export as_nl
20308 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20309 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20310 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20311 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20312 # Prefer a ksh shell builtin over an external printf program on Solaris,
20313 # but without wasting forks for bash or zsh.
20314 if test -z "$BASH_VERSION$ZSH_VERSION" \
20315 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20316 as_echo='print -r --'
20317 as_echo_n='print -rn --'
20318 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20319 as_echo='printf %s\n'
20320 as_echo_n='printf %s'
20321 else
20322 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20323 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20324 as_echo_n='/usr/ucb/echo -n'
20325 else
20326 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20327 as_echo_n_body='eval
20328 arg=$1;
20329 case $arg in #(
20330 *"$as_nl"*)
20331 expr "X$arg" : "X\\(.*\\)$as_nl";
20332 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20333 esac;
20334 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20335 '
20336 export as_echo_n_body
20337 as_echo_n='sh -c $as_echo_n_body as_echo'
20338 fi
20339 export as_echo_body
20340 as_echo='sh -c $as_echo_body as_echo'
20341 fi
20342
20343 # The user is always right.
20344 if test "${PATH_SEPARATOR+set}" != set; then
20345 PATH_SEPARATOR=:
20346 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20347 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20348 PATH_SEPARATOR=';'
20349 }
20350 fi
20351
20352
20353 # IFS
20354 # We need space, tab and new line, in precisely that order. Quoting is
20355 # there to prevent editors from complaining about space-tab.
20356 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20357 # splitting by setting IFS to empty value.)
20358 IFS=" "" $as_nl"
20359
20360 # Find who we are. Look in the path if we contain no directory separator.
20361 as_myself=
20362 case $0 in #((
20363 *[\\/]* ) as_myself=$0 ;;
20364 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20365 for as_dir in $PATH
20366 do
20367 IFS=$as_save_IFS
20368 test -z "$as_dir" && as_dir=.
20369 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20370 done
20371 IFS=$as_save_IFS
20372
20373 ;;
20374 esac
20375 # We did not find ourselves, most probably we were run as `sh COMMAND'
20376 # in which case we are not to be found in the path.
20377 if test "x$as_myself" = x; then
20378 as_myself=$0
20379 fi
20380 if test ! -f "$as_myself"; then
20381 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20382 exit 1
20383 fi
20384
20385 # Unset variables that we do not need and which cause bugs (e.g. in
20386 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20387 # suppresses any "Segmentation fault" message there. '((' could
20388 # trigger a bug in pdksh 5.2.14.
20389 for as_var in BASH_ENV ENV MAIL MAILPATH
20390 do eval test x\${$as_var+set} = xset \
20391 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20392 done
20393 PS1='$ '
20394 PS2='> '
20395 PS4='+ '
20396
20397 # NLS nuisances.
20398 LC_ALL=C
20399 export LC_ALL
20400 LANGUAGE=C
20401 export LANGUAGE
20402
20403 # CDPATH.
20404 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20405
20406
20407 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20408 # ----------------------------------------
20409 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20410 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20411 # script with STATUS, using 1 if that was 0.
20412 as_fn_error ()
20413 {
20414 as_status=$1; test $as_status -eq 0 && as_status=1
20415 if test "$4"; then
20416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20418 fi
20419 $as_echo "$as_me: error: $2" >&2
20420 as_fn_exit $as_status
20421 } # as_fn_error
20422
20423
20424 # as_fn_set_status STATUS
20425 # -----------------------
20426 # Set $? to STATUS, without forking.
20427 as_fn_set_status ()
20428 {
20429 return $1
20430 } # as_fn_set_status
20431
20432 # as_fn_exit STATUS
20433 # -----------------
20434 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20435 as_fn_exit ()
20436 {
20437 set +e
20438 as_fn_set_status $1
20439 exit $1
20440 } # as_fn_exit
20441
20442 # as_fn_unset VAR
20443 # ---------------
20444 # Portably unset VAR.
20445 as_fn_unset ()
20446 {
20447 { eval $1=; unset $1;}
20448 }
20449 as_unset=as_fn_unset
20450 # as_fn_append VAR VALUE
20451 # ----------------------
20452 # Append the text in VALUE to the end of the definition contained in VAR. Take
20453 # advantage of any shell optimizations that allow amortized linear growth over
20454 # repeated appends, instead of the typical quadratic growth present in naive
20455 # implementations.
20456 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20457 eval 'as_fn_append ()
20458 {
20459 eval $1+=\$2
20460 }'
20461 else
20462 as_fn_append ()
20463 {
20464 eval $1=\$$1\$2
20465 }
20466 fi # as_fn_append
20467
20468 # as_fn_arith ARG...
20469 # ------------------
20470 # Perform arithmetic evaluation on the ARGs, and store the result in the
20471 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20472 # must be portable across $(()) and expr.
20473 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20474 eval 'as_fn_arith ()
20475 {
20476 as_val=$(( $* ))
20477 }'
20478 else
20479 as_fn_arith ()
20480 {
20481 as_val=`expr "$@" || test $? -eq 1`
20482 }
20483 fi # as_fn_arith
20484
20485
20486 if expr a : '\(a\)' >/dev/null 2>&1 &&
20487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20488 as_expr=expr
20489 else
20490 as_expr=false
20491 fi
20492
20493 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20494 as_basename=basename
20495 else
20496 as_basename=false
20497 fi
20498
20499 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20500 as_dirname=dirname
20501 else
20502 as_dirname=false
20503 fi
20504
20505 as_me=`$as_basename -- "$0" ||
20506 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20507 X"$0" : 'X\(//\)$' \| \
20508 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20509 $as_echo X/"$0" |
20510 sed '/^.*\/\([^/][^/]*\)\/*$/{
20511 s//\1/
20512 q
20513 }
20514 /^X\/\(\/\/\)$/{
20515 s//\1/
20516 q
20517 }
20518 /^X\/\(\/\).*/{
20519 s//\1/
20520 q
20521 }
20522 s/.*/./; q'`
20523
20524 # Avoid depending upon Character Ranges.
20525 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20526 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20527 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20528 as_cr_digits='0123456789'
20529 as_cr_alnum=$as_cr_Letters$as_cr_digits
20530
20531 ECHO_C= ECHO_N= ECHO_T=
20532 case `echo -n x` in #(((((
20533 -n*)
20534 case `echo 'xy\c'` in
20535 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20536 xy) ECHO_C='\c';;
20537 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20538 ECHO_T=' ';;
20539 esac;;
20540 *)
20541 ECHO_N='-n';;
20542 esac
20543
20544 rm -f conf$$ conf$$.exe conf$$.file
20545 if test -d conf$$.dir; then
20546 rm -f conf$$.dir/conf$$.file
20547 else
20548 rm -f conf$$.dir
20549 mkdir conf$$.dir 2>/dev/null
20550 fi
20551 if (echo >conf$$.file) 2>/dev/null; then
20552 if ln -s conf$$.file conf$$ 2>/dev/null; then
20553 as_ln_s='ln -s'
20554 # ... but there are two gotchas:
20555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20557 # In both cases, we have to default to `cp -pR'.
20558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20559 as_ln_s='cp -pR'
20560 elif ln conf$$.file conf$$ 2>/dev/null; then
20561 as_ln_s=ln
20562 else
20563 as_ln_s='cp -pR'
20564 fi
20565 else
20566 as_ln_s='cp -pR'
20567 fi
20568 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20569 rmdir conf$$.dir 2>/dev/null
20570
20571
20572 # as_fn_mkdir_p
20573 # -------------
20574 # Create "$as_dir" as a directory, including parents if necessary.
20575 as_fn_mkdir_p ()
20576 {
20577
20578 case $as_dir in #(
20579 -*) as_dir=./$as_dir;;
20580 esac
20581 test -d "$as_dir" || eval $as_mkdir_p || {
20582 as_dirs=
20583 while :; do
20584 case $as_dir in #(
20585 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20586 *) as_qdir=$as_dir;;
20587 esac
20588 as_dirs="'$as_qdir' $as_dirs"
20589 as_dir=`$as_dirname -- "$as_dir" ||
20590 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20591 X"$as_dir" : 'X\(//\)[^/]' \| \
20592 X"$as_dir" : 'X\(//\)$' \| \
20593 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20594 $as_echo X"$as_dir" |
20595 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20596 s//\1/
20597 q
20598 }
20599 /^X\(\/\/\)[^/].*/{
20600 s//\1/
20601 q
20602 }
20603 /^X\(\/\/\)$/{
20604 s//\1/
20605 q
20606 }
20607 /^X\(\/\).*/{
20608 s//\1/
20609 q
20610 }
20611 s/.*/./; q'`
20612 test -d "$as_dir" && break
20613 done
20614 test -z "$as_dirs" || eval "mkdir $as_dirs"
20615 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20616
20617
20618 } # as_fn_mkdir_p
20619 if mkdir -p . 2>/dev/null; then
20620 as_mkdir_p='mkdir -p "$as_dir"'
20621 else
20622 test -d ./-p && rmdir ./-p
20623 as_mkdir_p=false
20624 fi
20625
20626
20627 # as_fn_executable_p FILE
20628 # -----------------------
20629 # Test if FILE is an executable regular file.
20630 as_fn_executable_p ()
20631 {
20632 test -f "$1" && test -x "$1"
20633 } # as_fn_executable_p
20634 as_test_x='test -x'
20635 as_executable_p=as_fn_executable_p
20636
20637 # Sed expression to map a string onto a valid CPP name.
20638 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20639
20640 # Sed expression to map a string onto a valid variable name.
20641 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20642
20643
20644 exec 6>&1
20645 ## ----------------------------------- ##
20646 ## Main body of $CONFIG_STATUS script. ##
20647 ## ----------------------------------- ##
20648 _ASEOF
20649 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20650
20651 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20652 # Save the log message, to keep $0 and so on meaningful, and to
20653 # report actual input values of CONFIG_FILES etc. instead of their
20654 # values after options handling.
20655 ac_log="
20656 This file was extended by $as_me, which was
20657 generated by GNU Autoconf 2.69. Invocation command line was
20658
20659 CONFIG_FILES = $CONFIG_FILES
20660 CONFIG_HEADERS = $CONFIG_HEADERS
20661 CONFIG_LINKS = $CONFIG_LINKS
20662 CONFIG_COMMANDS = $CONFIG_COMMANDS
20663 $ $0 $@
20664
20665 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20666 "
20667
20668 _ACEOF
20669
20670 case $ac_config_files in *"
20671 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20672 esac
20673
20674 case $ac_config_headers in *"
20675 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20676 esac
20677
20678
20679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20680 # Files that config.status was made for.
20681 config_files="$ac_config_files"
20682 config_headers="$ac_config_headers"
20683 config_links="$ac_config_links"
20684 config_commands="$ac_config_commands"
20685
20686 _ACEOF
20687
20688 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20689 ac_cs_usage="\
20690 \`$as_me' instantiates files and other configuration actions
20691 from templates according to the current configuration. Unless the files
20692 and actions are specified as TAGs, all are instantiated by default.
20693
20694 Usage: $0 [OPTION]... [TAG]...
20695
20696 -h, --help print this help, then exit
20697 -V, --version print version number and configuration settings, then exit
20698 --config print configuration, then exit
20699 -q, --quiet, --silent
20700 do not print progress messages
20701 -d, --debug don't remove temporary files
20702 --recheck update $as_me by reconfiguring in the same conditions
20703 --file=FILE[:TEMPLATE]
20704 instantiate the configuration file FILE
20705 --header=FILE[:TEMPLATE]
20706 instantiate the configuration header FILE
20707
20708 Configuration files:
20709 $config_files
20710
20711 Configuration headers:
20712 $config_headers
20713
20714 Configuration links:
20715 $config_links
20716
20717 Configuration commands:
20718 $config_commands
20719
20720 Report bugs to the package provider."
20721
20722 _ACEOF
20723 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20724 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20725 ac_cs_version="\\
20726 config.status
20727 configured by $0, generated by GNU Autoconf 2.69,
20728 with options \\"\$ac_cs_config\\"
20729
20730 Copyright (C) 2012 Free Software Foundation, Inc.
20731 This config.status script is free software; the Free Software Foundation
20732 gives unlimited permission to copy, distribute and modify it."
20733
20734 ac_pwd='$ac_pwd'
20735 srcdir='$srcdir'
20736 INSTALL='$INSTALL'
20737 AWK='$AWK'
20738 test -n "\$AWK" || AWK=awk
20739 _ACEOF
20740
20741 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20742 # The default lists apply if the user does not specify any file.
20743 ac_need_defaults=:
20744 while test $# != 0
20745 do
20746 case $1 in
20747 --*=?*)
20748 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20749 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20750 ac_shift=:
20751 ;;
20752 --*=)
20753 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20754 ac_optarg=
20755 ac_shift=:
20756 ;;
20757 *)
20758 ac_option=$1
20759 ac_optarg=$2
20760 ac_shift=shift
20761 ;;
20762 esac
20763
20764 case $ac_option in
20765 # Handling of the options.
20766 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20767 ac_cs_recheck=: ;;
20768 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20769 $as_echo "$ac_cs_version"; exit ;;
20770 --config | --confi | --conf | --con | --co | --c )
20771 $as_echo "$ac_cs_config"; exit ;;
20772 --debug | --debu | --deb | --de | --d | -d )
20773 debug=: ;;
20774 --file | --fil | --fi | --f )
20775 $ac_shift
20776 case $ac_optarg in
20777 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20778 '') as_fn_error $? "missing file argument" ;;
20779 esac
20780 as_fn_append CONFIG_FILES " '$ac_optarg'"
20781 ac_need_defaults=false;;
20782 --header | --heade | --head | --hea )
20783 $ac_shift
20784 case $ac_optarg in
20785 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20786 esac
20787 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20788 ac_need_defaults=false;;
20789 --he | --h)
20790 # Conflict between --help and --header
20791 as_fn_error $? "ambiguous option: \`$1'
20792 Try \`$0 --help' for more information.";;
20793 --help | --hel | -h )
20794 $as_echo "$ac_cs_usage"; exit ;;
20795 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20796 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20797 ac_cs_silent=: ;;
20798
20799 # This is an error.
20800 -*) as_fn_error $? "unrecognized option: \`$1'
20801 Try \`$0 --help' for more information." ;;
20802
20803 *) as_fn_append ac_config_targets " $1"
20804 ac_need_defaults=false ;;
20805
20806 esac
20807 shift
20808 done
20809
20810 ac_configure_extra_args=
20811
20812 if $ac_cs_silent; then
20813 exec 6>/dev/null
20814 ac_configure_extra_args="$ac_configure_extra_args --silent"
20815 fi
20816
20817 _ACEOF
20818 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20819 if \$ac_cs_recheck; then
20820 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20821 shift
20822 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20823 CONFIG_SHELL='$SHELL'
20824 export CONFIG_SHELL
20825 exec "\$@"
20826 fi
20827
20828 _ACEOF
20829 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20830 exec 5>>config.log
20831 {
20832 echo
20833 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20834 ## Running $as_me. ##
20835 _ASBOX
20836 $as_echo "$ac_log"
20837 } >&5
20838
20839 _ACEOF
20840 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20841 #
20842 # INIT-COMMANDS
20843 #
20844 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20845 GDB_NM_FILE=$GDB_NM_FILE
20846
20847 _ACEOF
20848
20849 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20850
20851 # Handling of arguments.
20852 for ac_config_target in $ac_config_targets
20853 do
20854 case $ac_config_target in
20855 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20856 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20857 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20858 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20859 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20860 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20861 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20862 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20863 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20864 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20865
20866 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20867 esac
20868 done
20869
20870
20871 # If the user did not use the arguments to specify the items to instantiate,
20872 # then the envvar interface is used. Set only those that are not.
20873 # We use the long form for the default assignment because of an extremely
20874 # bizarre bug on SunOS 4.1.3.
20875 if $ac_need_defaults; then
20876 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20877 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20878 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20879 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20880 fi
20881
20882 # Have a temporary directory for convenience. Make it in the build tree
20883 # simply because there is no reason against having it here, and in addition,
20884 # creating and moving files from /tmp can sometimes cause problems.
20885 # Hook for its removal unless debugging.
20886 # Note that there is a small window in which the directory will not be cleaned:
20887 # after its creation but before its name has been assigned to `$tmp'.
20888 $debug ||
20889 {
20890 tmp= ac_tmp=
20891 trap 'exit_status=$?
20892 : "${ac_tmp:=$tmp}"
20893 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20894 ' 0
20895 trap 'as_fn_exit 1' 1 2 13 15
20896 }
20897 # Create a (secure) tmp directory for tmp files.
20898
20899 {
20900 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20901 test -d "$tmp"
20902 } ||
20903 {
20904 tmp=./conf$$-$RANDOM
20905 (umask 077 && mkdir "$tmp")
20906 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20907 ac_tmp=$tmp
20908
20909 # Set up the scripts for CONFIG_FILES section.
20910 # No need to generate them if there are no CONFIG_FILES.
20911 # This happens for instance with `./config.status config.h'.
20912 if test -n "$CONFIG_FILES"; then
20913
20914 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20915 ac_cs_awk_getline=:
20916 ac_cs_awk_pipe_init=
20917 ac_cs_awk_read_file='
20918 while ((getline aline < (F[key])) > 0)
20919 print(aline)
20920 close(F[key])'
20921 ac_cs_awk_pipe_fini=
20922 else
20923 ac_cs_awk_getline=false
20924 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20925 ac_cs_awk_read_file='
20926 print "|#_!!_#|"
20927 print "cat " F[key] " &&"
20928 '$ac_cs_awk_pipe_init
20929 # The final `:' finishes the AND list.
20930 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20931 fi
20932 ac_cr=`echo X | tr X '\015'`
20933 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20934 # But we know of no other shell where ac_cr would be empty at this
20935 # point, so we can use a bashism as a fallback.
20936 if test "x$ac_cr" = x; then
20937 eval ac_cr=\$\'\\r\'
20938 fi
20939 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20940 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20941 ac_cs_awk_cr='\\r'
20942 else
20943 ac_cs_awk_cr=$ac_cr
20944 fi
20945
20946 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20947 _ACEOF
20948
20949 # Create commands to substitute file output variables.
20950 {
20951 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20952 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20953 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20954 echo "_ACAWK" &&
20955 echo "_ACEOF"
20956 } >conf$$files.sh &&
20957 . ./conf$$files.sh ||
20958 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20959 rm -f conf$$files.sh
20960
20961 {
20962 echo "cat >conf$$subs.awk <<_ACEOF" &&
20963 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20964 echo "_ACEOF"
20965 } >conf$$subs.sh ||
20966 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20967 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20968 ac_delim='%!_!# '
20969 for ac_last_try in false false false false false :; do
20970 . ./conf$$subs.sh ||
20971 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20972
20973 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20974 if test $ac_delim_n = $ac_delim_num; then
20975 break
20976 elif $ac_last_try; then
20977 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20978 else
20979 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20980 fi
20981 done
20982 rm -f conf$$subs.sh
20983
20984 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20985 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20986 _ACEOF
20987 sed -n '
20988 h
20989 s/^/S["/; s/!.*/"]=/
20990 p
20991 g
20992 s/^[^!]*!//
20993 :repl
20994 t repl
20995 s/'"$ac_delim"'$//
20996 t delim
20997 :nl
20998 h
20999 s/\(.\{148\}\)..*/\1/
21000 t more1
21001 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21002 p
21003 n
21004 b repl
21005 :more1
21006 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21007 p
21008 g
21009 s/.\{148\}//
21010 t nl
21011 :delim
21012 h
21013 s/\(.\{148\}\)..*/\1/
21014 t more2
21015 s/["\\]/\\&/g; s/^/"/; s/$/"/
21016 p
21017 b
21018 :more2
21019 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21020 p
21021 g
21022 s/.\{148\}//
21023 t delim
21024 ' <conf$$subs.awk | sed '
21025 /^[^""]/{
21026 N
21027 s/\n//
21028 }
21029 ' >>$CONFIG_STATUS || ac_write_fail=1
21030 rm -f conf$$subs.awk
21031 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21032 _ACAWK
21033 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
21034 for (key in S) S_is_set[key] = 1
21035 FS = "\a"
21036 \$ac_cs_awk_pipe_init
21037 }
21038 {
21039 line = $ 0
21040 nfields = split(line, field, "@")
21041 substed = 0
21042 len = length(field[1])
21043 for (i = 2; i < nfields; i++) {
21044 key = field[i]
21045 keylen = length(key)
21046 if (S_is_set[key]) {
21047 value = S[key]
21048 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21049 len += length(value) + length(field[++i])
21050 substed = 1
21051 } else
21052 len += 1 + keylen
21053 }
21054 if (nfields == 3 && !substed) {
21055 key = field[2]
21056 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
21057 \$ac_cs_awk_read_file
21058 next
21059 }
21060 }
21061 print line
21062 }
21063 \$ac_cs_awk_pipe_fini
21064 _ACAWK
21065 _ACEOF
21066 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21067 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21068 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21069 else
21070 cat
21071 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
21072 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
21073 _ACEOF
21074
21075 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
21076 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
21077 # trailing colons and then remove the whole line if VPATH becomes empty
21078 # (actually we leave an empty line to preserve line numbers).
21079 if test "x$srcdir" = x.; then
21080 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
21081 h
21082 s///
21083 s/^/:/
21084 s/[ ]*$/:/
21085 s/:\$(srcdir):/:/g
21086 s/:\${srcdir}:/:/g
21087 s/:@srcdir@:/:/g
21088 s/^:*//
21089 s/:*$//
21090 x
21091 s/\(=[ ]*\).*/\1/
21092 G
21093 s/\n//
21094 s/^[^=]*=[ ]*$//
21095 }'
21096 fi
21097
21098 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21099 fi # test -n "$CONFIG_FILES"
21100
21101 # Set up the scripts for CONFIG_HEADERS section.
21102 # No need to generate them if there are no CONFIG_HEADERS.
21103 # This happens for instance with `./config.status Makefile'.
21104 if test -n "$CONFIG_HEADERS"; then
21105 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
21106 BEGIN {
21107 _ACEOF
21108
21109 # Transform confdefs.h into an awk script `defines.awk', embedded as
21110 # here-document in config.status, that substitutes the proper values into
21111 # config.h.in to produce config.h.
21112
21113 # Create a delimiter string that does not exist in confdefs.h, to ease
21114 # handling of long lines.
21115 ac_delim='%!_!# '
21116 for ac_last_try in false false :; do
21117 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
21118 if test -z "$ac_tt"; then
21119 break
21120 elif $ac_last_try; then
21121 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
21122 else
21123 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21124 fi
21125 done
21126
21127 # For the awk script, D is an array of macro values keyed by name,
21128 # likewise P contains macro parameters if any. Preserve backslash
21129 # newline sequences.
21130
21131 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21132 sed -n '
21133 s/.\{148\}/&'"$ac_delim"'/g
21134 t rset
21135 :rset
21136 s/^[ ]*#[ ]*define[ ][ ]*/ /
21137 t def
21138 d
21139 :def
21140 s/\\$//
21141 t bsnl
21142 s/["\\]/\\&/g
21143 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21144 D["\1"]=" \3"/p
21145 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21146 d
21147 :bsnl
21148 s/["\\]/\\&/g
21149 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21150 D["\1"]=" \3\\\\\\n"\\/p
21151 t cont
21152 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21153 t cont
21154 d
21155 :cont
21156 n
21157 s/.\{148\}/&'"$ac_delim"'/g
21158 t clear
21159 :clear
21160 s/\\$//
21161 t bsnlc
21162 s/["\\]/\\&/g; s/^/"/; s/$/"/p
21163 d
21164 :bsnlc
21165 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21166 b cont
21167 ' <confdefs.h | sed '
21168 s/'"$ac_delim"'/"\\\
21169 "/g' >>$CONFIG_STATUS || ac_write_fail=1
21170
21171 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21172 for (key in D) D_is_set[key] = 1
21173 FS = "\a"
21174 }
21175 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21176 line = \$ 0
21177 split(line, arg, " ")
21178 if (arg[1] == "#") {
21179 defundef = arg[2]
21180 mac1 = arg[3]
21181 } else {
21182 defundef = substr(arg[1], 2)
21183 mac1 = arg[2]
21184 }
21185 split(mac1, mac2, "(") #)
21186 macro = mac2[1]
21187 prefix = substr(line, 1, index(line, defundef) - 1)
21188 if (D_is_set[macro]) {
21189 # Preserve the white space surrounding the "#".
21190 print prefix "define", macro P[macro] D[macro]
21191 next
21192 } else {
21193 # Replace #undef with comments. This is necessary, for example,
21194 # in the case of _POSIX_SOURCE, which is predefined and required
21195 # on some systems where configure will not decide to define it.
21196 if (defundef == "undef") {
21197 print "/*", prefix defundef, macro, "*/"
21198 next
21199 }
21200 }
21201 }
21202 { print }
21203 _ACAWK
21204 _ACEOF
21205 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21206 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21207 fi # test -n "$CONFIG_HEADERS"
21208
21209
21210 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
21211 shift
21212 for ac_tag
21213 do
21214 case $ac_tag in
21215 :[FHLC]) ac_mode=$ac_tag; continue;;
21216 esac
21217 case $ac_mode$ac_tag in
21218 :[FHL]*:*);;
21219 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21220 :[FH]-) ac_tag=-:-;;
21221 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21222 esac
21223 ac_save_IFS=$IFS
21224 IFS=:
21225 set x $ac_tag
21226 IFS=$ac_save_IFS
21227 shift
21228 ac_file=$1
21229 shift
21230
21231 case $ac_mode in
21232 :L) ac_source=$1;;
21233 :[FH])
21234 ac_file_inputs=
21235 for ac_f
21236 do
21237 case $ac_f in
21238 -) ac_f="$ac_tmp/stdin";;
21239 *) # Look for the file first in the build tree, then in the source tree
21240 # (if the path is not absolute). The absolute path cannot be DOS-style,
21241 # because $ac_f cannot contain `:'.
21242 test -f "$ac_f" ||
21243 case $ac_f in
21244 [\\/$]*) false;;
21245 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21246 esac ||
21247 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21248 esac
21249 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21250 as_fn_append ac_file_inputs " '$ac_f'"
21251 done
21252
21253 # Let's still pretend it is `configure' which instantiates (i.e., don't
21254 # use $as_me), people would be surprised to read:
21255 # /* config.h. Generated by config.status. */
21256 configure_input='Generated from '`
21257 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21258 `' by configure.'
21259 if test x"$ac_file" != x-; then
21260 configure_input="$ac_file. $configure_input"
21261 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21262 $as_echo "$as_me: creating $ac_file" >&6;}
21263 fi
21264 # Neutralize special characters interpreted by sed in replacement strings.
21265 case $configure_input in #(
21266 *\&* | *\|* | *\\* )
21267 ac_sed_conf_input=`$as_echo "$configure_input" |
21268 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21269 *) ac_sed_conf_input=$configure_input;;
21270 esac
21271
21272 case $ac_tag in
21273 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21274 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21275 esac
21276 ;;
21277 esac
21278
21279 ac_dir=`$as_dirname -- "$ac_file" ||
21280 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21281 X"$ac_file" : 'X\(//\)[^/]' \| \
21282 X"$ac_file" : 'X\(//\)$' \| \
21283 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21284 $as_echo X"$ac_file" |
21285 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21286 s//\1/
21287 q
21288 }
21289 /^X\(\/\/\)[^/].*/{
21290 s//\1/
21291 q
21292 }
21293 /^X\(\/\/\)$/{
21294 s//\1/
21295 q
21296 }
21297 /^X\(\/\).*/{
21298 s//\1/
21299 q
21300 }
21301 s/.*/./; q'`
21302 as_dir="$ac_dir"; as_fn_mkdir_p
21303 ac_builddir=.
21304
21305 case "$ac_dir" in
21306 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21307 *)
21308 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21309 # A ".." for each directory in $ac_dir_suffix.
21310 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21311 case $ac_top_builddir_sub in
21312 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21313 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21314 esac ;;
21315 esac
21316 ac_abs_top_builddir=$ac_pwd
21317 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21318 # for backward compatibility:
21319 ac_top_builddir=$ac_top_build_prefix
21320
21321 case $srcdir in
21322 .) # We are building in place.
21323 ac_srcdir=.
21324 ac_top_srcdir=$ac_top_builddir_sub
21325 ac_abs_top_srcdir=$ac_pwd ;;
21326 [\\/]* | ?:[\\/]* ) # Absolute name.
21327 ac_srcdir=$srcdir$ac_dir_suffix;
21328 ac_top_srcdir=$srcdir
21329 ac_abs_top_srcdir=$srcdir ;;
21330 *) # Relative name.
21331 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21332 ac_top_srcdir=$ac_top_build_prefix$srcdir
21333 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21334 esac
21335 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21336
21337
21338 case $ac_mode in
21339 :F)
21340 #
21341 # CONFIG_FILE
21342 #
21343
21344 case $INSTALL in
21345 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21346 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21347 esac
21348 _ACEOF
21349
21350 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21351 # If the template does not know about datarootdir, expand it.
21352 # FIXME: This hack should be removed a few years after 2.60.
21353 ac_datarootdir_hack=; ac_datarootdir_seen=
21354 ac_sed_dataroot='
21355 /datarootdir/ {
21356 p
21357 q
21358 }
21359 /@datadir@/p
21360 /@docdir@/p
21361 /@infodir@/p
21362 /@localedir@/p
21363 /@mandir@/p'
21364 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21365 *datarootdir*) ac_datarootdir_seen=yes;;
21366 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21367 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21368 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21369 _ACEOF
21370 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21371 ac_datarootdir_hack='
21372 s&@datadir@&$datadir&g
21373 s&@docdir@&$docdir&g
21374 s&@infodir@&$infodir&g
21375 s&@localedir@&$localedir&g
21376 s&@mandir@&$mandir&g
21377 s&\\\${datarootdir}&$datarootdir&g' ;;
21378 esac
21379 _ACEOF
21380
21381 # Neutralize VPATH when `$srcdir' = `.'.
21382 # Shell code in configure.ac might set extrasub.
21383 # FIXME: do we really want to maintain this feature?
21384 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21385 ac_sed_extra="$ac_vpsub
21386 $extrasub
21387 _ACEOF
21388 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21389 :t
21390 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21391 s|@configure_input@|$ac_sed_conf_input|;t t
21392 s&@top_builddir@&$ac_top_builddir_sub&;t t
21393 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21394 s&@srcdir@&$ac_srcdir&;t t
21395 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21396 s&@top_srcdir@&$ac_top_srcdir&;t t
21397 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21398 s&@builddir@&$ac_builddir&;t t
21399 s&@abs_builddir@&$ac_abs_builddir&;t t
21400 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21401 s&@INSTALL@&$ac_INSTALL&;t t
21402 $ac_datarootdir_hack
21403 "
21404 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
21405 if $ac_cs_awk_getline; then
21406 $AWK -f "$ac_tmp/subs.awk"
21407 else
21408 $AWK -f "$ac_tmp/subs.awk" | $SHELL
21409 fi \
21410 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21411
21412 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21413 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21414 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21415 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21417 which seems to be undefined. Please make sure it is defined" >&5
21418 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21419 which seems to be undefined. Please make sure it is defined" >&2;}
21420
21421 rm -f "$ac_tmp/stdin"
21422 case $ac_file in
21423 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21424 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21425 esac \
21426 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21427 ;;
21428 :H)
21429 #
21430 # CONFIG_HEADER
21431 #
21432 if test x"$ac_file" != x-; then
21433 {
21434 $as_echo "/* $configure_input */" \
21435 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21436 } >"$ac_tmp/config.h" \
21437 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21438 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21439 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21440 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21441 else
21442 rm -f "$ac_file"
21443 mv "$ac_tmp/config.h" "$ac_file" \
21444 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21445 fi
21446 else
21447 $as_echo "/* $configure_input */" \
21448 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21449 || as_fn_error $? "could not create -" "$LINENO" 5
21450 fi
21451 ;;
21452 :L)
21453 #
21454 # CONFIG_LINK
21455 #
21456
21457 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21458 :
21459 else
21460 # Prefer the file from the source tree if names are identical.
21461 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21462 ac_source=$srcdir/$ac_source
21463 fi
21464
21465 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21466 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21467
21468 if test ! -r "$ac_source"; then
21469 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21470 fi
21471 rm -f "$ac_file"
21472
21473 # Try a relative symlink, then a hard link, then a copy.
21474 case $ac_source in
21475 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21476 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21477 esac
21478 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21479 ln "$ac_source" "$ac_file" 2>/dev/null ||
21480 cp -p "$ac_source" "$ac_file" ||
21481 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21482 fi
21483 ;;
21484 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21485 $as_echo "$as_me: executing $ac_file commands" >&6;}
21486 ;;
21487 esac
21488
21489
21490 case $ac_file$ac_mode in
21491 "config.h":H) echo > stamp-h ;;
21492 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
21493 "nm.h":L) echo > stamp-nmh ;;
21494 "gcore":F) chmod +x gcore ;;
21495
21496 esac
21497 done # for ac_tag
21498
21499
21500 as_fn_exit 0
21501 _ACEOF
21502 ac_clean_files=$ac_clean_files_save
21503
21504 test $ac_write_fail = 0 ||
21505 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21506
21507
21508 # configure is writing to config.log, and then calls config.status.
21509 # config.status does its own redirection, appending to config.log.
21510 # Unfortunately, on DOS this fails, as config.log is still kept open
21511 # by configure, so config.status won't be able to write to it; its
21512 # output is simply discarded. So we exec the FD to /dev/null,
21513 # effectively closing config.log, so it can be properly (re)opened and
21514 # appended to by config.status. When coming back to configure, we
21515 # need to make the FD available again.
21516 if test "$no_create" != yes; then
21517 ac_cs_success=:
21518 ac_config_status_args=
21519 test "$silent" = yes &&
21520 ac_config_status_args="$ac_config_status_args --quiet"
21521 exec 5>/dev/null
21522 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21523 exec 5>>config.log
21524 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21525 # would make configure fail if this is the last instruction.
21526 $ac_cs_success || as_fn_exit 1
21527 fi
21528
21529 #
21530 # CONFIG_SUBDIRS section.
21531 #
21532 if test "$no_recursion" != yes; then
21533
21534 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
21535 # so they do not pile up.
21536 ac_sub_configure_args=
21537 ac_prev=
21538 eval "set x $ac_configure_args"
21539 shift
21540 for ac_arg
21541 do
21542 if test -n "$ac_prev"; then
21543 ac_prev=
21544 continue
21545 fi
21546 case $ac_arg in
21547 -cache-file | --cache-file | --cache-fil | --cache-fi \
21548 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
21549 ac_prev=cache_file ;;
21550 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
21551 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
21552 | --c=*)
21553 ;;
21554 --config-cache | -C)
21555 ;;
21556 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
21557 ac_prev=srcdir ;;
21558 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
21559 ;;
21560 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
21561 ac_prev=prefix ;;
21562 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
21563 ;;
21564 --disable-option-checking)
21565 ;;
21566 *)
21567 case $ac_arg in
21568 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21569 esac
21570 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
21571 esac
21572 done
21573
21574 # Always prepend --prefix to ensure using the same prefix
21575 # in subdir configurations.
21576 ac_arg="--prefix=$prefix"
21577 case $ac_arg in
21578 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21579 esac
21580 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
21581
21582 # Pass --silent
21583 if test "$silent" = yes; then
21584 ac_sub_configure_args="--silent $ac_sub_configure_args"
21585 fi
21586
21587 # Always prepend --disable-option-checking to silence warnings, since
21588 # different subdirs can have different --enable and --with options.
21589 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
21590
21591 ac_popdir=`pwd`
21592 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
21593
21594 # Do not complain, so a configure script can configure whichever
21595 # parts of a large source tree are present.
21596 test -d "$srcdir/$ac_dir" || continue
21597
21598 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
21599 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
21600 $as_echo "$ac_msg" >&6
21601 as_dir="$ac_dir"; as_fn_mkdir_p
21602 ac_builddir=.
21603
21604 case "$ac_dir" in
21605 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21606 *)
21607 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21608 # A ".." for each directory in $ac_dir_suffix.
21609 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21610 case $ac_top_builddir_sub in
21611 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21612 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21613 esac ;;
21614 esac
21615 ac_abs_top_builddir=$ac_pwd
21616 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21617 # for backward compatibility:
21618 ac_top_builddir=$ac_top_build_prefix
21619
21620 case $srcdir in
21621 .) # We are building in place.
21622 ac_srcdir=.
21623 ac_top_srcdir=$ac_top_builddir_sub
21624 ac_abs_top_srcdir=$ac_pwd ;;
21625 [\\/]* | ?:[\\/]* ) # Absolute name.
21626 ac_srcdir=$srcdir$ac_dir_suffix;
21627 ac_top_srcdir=$srcdir
21628 ac_abs_top_srcdir=$srcdir ;;
21629 *) # Relative name.
21630 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21631 ac_top_srcdir=$ac_top_build_prefix$srcdir
21632 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21633 esac
21634 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21635
21636
21637 cd "$ac_dir"
21638
21639 # Check for guested configure; otherwise get Cygnus style configure.
21640 if test -f "$ac_srcdir/configure.gnu"; then
21641 ac_sub_configure=$ac_srcdir/configure.gnu
21642 elif test -f "$ac_srcdir/configure"; then
21643 ac_sub_configure=$ac_srcdir/configure
21644 elif test -f "$ac_srcdir/configure.in"; then
21645 # This should be Cygnus configure.
21646 ac_sub_configure=$ac_aux_dir/configure
21647 else
21648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
21649 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
21650 ac_sub_configure=
21651 fi
21652
21653 # The recursion is here.
21654 if test -n "$ac_sub_configure"; then
21655 # Make the cache file name correct relative to the subdirectory.
21656 case $cache_file in
21657 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
21658 *) # Relative name.
21659 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
21660 esac
21661
21662 { $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
21663 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
21664 # The eval makes quoting arguments work.
21665 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
21666 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
21667 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
21668 fi
21669
21670 cd "$ac_popdir"
21671 done
21672 fi
21673 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21675 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21676 fi
21677