]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/configure
gdb: Allow more control over where to find python libraries
[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 LTLIBBABELTRACE
635 LIBBABELTRACE
636 HAVE_LIBBABELTRACE
637 HAVE_NATIVE_GCORE_HOST
638 NAT_GENERATED_FILES
639 XM_CLIBS
640 MH_CFLAGS
641 LOADLIBES
642 NAT_CDEPS
643 NATDEPFILES
644 NAT_FILE
645 target_subdir
646 CONFIG_UNINSTALL
647 CONFIG_INSTALL
648 CONFIG_CLEAN
649 CONFIG_ALL
650 CONFIG_SRCS
651 CONFIG_DEPS
652 CONFIG_OBS
653 PROFILE_CFLAGS
654 ENABLE_CFLAGS
655 SIM_OBS
656 SIM
657 XMKMF
658 GDBTK_SRC_DIR
659 GDBTK_CFLAGS
660 GDBTKLIBS
661 X_LIBS
662 X_LDFLAGS
663 X_CFLAGS
664 TK_XINCLUDES
665 TK_DEPS
666 TK_LIBRARY
667 TK_INCLUDE
668 TK_STUB_LIB_SPEC
669 TK_STUB_LIB_FLAG
670 TK_STUB_LIB_FILE
671 TK_LIB_SPEC
672 TK_LIB_FLAG
673 TK_LIB_FILE
674 TK_SRC_DIR
675 TK_BIN_DIR
676 TK_VERSION
677 TCL_DEPS
678 TCL_LIBRARY
679 TCL_INCLUDE
680 TCL_STUB_LIB_SPEC
681 TCL_STUB_LIB_FLAG
682 TCL_STUB_LIB_FILE
683 TCL_LIB_SPEC
684 TCL_LIB_FLAG
685 TCL_LIB_FILE
686 TCL_SRC_DIR
687 TCL_BIN_DIR
688 TCL_PATCH_LEVEL
689 TCL_VERSION
690 WIN32LDAPP
691 WIN32LIBS
692 GUI_CFLAGS_X
693 LIBGUI
694 LTLIBLZMA
695 LIBLZMA
696 HAVE_LIBLZMA
697 SER_HARDWIRE
698 WERROR_CFLAGS
699 WARN_CFLAGS
700 SYSTEM_GDBINIT_DIR
701 SYSTEM_GDBINIT
702 TARGET_SYSTEM_ROOT
703 CONFIG_LDFLAGS
704 RDYNAMIC
705 LTLIBIPT
706 LIBIPT
707 HAVE_LIBIPT
708 PTHREAD_CFLAGS
709 PTHREAD_LIBS
710 PTHREAD_CC
711 ax_pthread_config
712 SED
713 ALLOCA
714 SRCHIGH_CFLAGS
715 SRCHIGH_LIBS
716 HAVE_GUILE_FALSE
717 HAVE_GUILE_TRUE
718 GUILE_LIBS
719 GUILE_CPPFLAGS
720 GUILD_TARGET_FLAG
721 GUILD
722 pkg_config_prog_path
723 HAVE_PYTHON_FALSE
724 HAVE_PYTHON_TRUE
725 PYTHON_LIBS
726 PYTHON_CPPFLAGS
727 PYTHON_CFLAGS
728 python_prog_path
729 LTLIBMPFR
730 LIBMPFR
731 HAVE_LIBMPFR
732 LTLIBEXPAT
733 LIBEXPAT
734 HAVE_LIBEXPAT
735 JIT_READER_DIR
736 TARGET_PTR
737 READLINE_TEXI_INCFLAG
738 READLINE_CFLAGS
739 READLINE_DEPS
740 READLINE
741 LTLIBICONV
742 LIBICONV
743 zlibinc
744 zlibdir
745 MIG
746 WINDRES
747 DLLTOOL
748 AR
749 YFLAGS
750 YACC
751 RANLIB
752 LN_S
753 INSTALL_DATA
754 INSTALL_SCRIPT
755 INSTALL_PROGRAM
756 AWK
757 REPORT_BUGS_TEXI
758 REPORT_BUGS_TO
759 PKGVERSION
760 CODESIGN_CERT
761 HAVE_NATIVE_GCORE_TARGET
762 TARGET_OBS
763 subdirs
764 GDB_DATADIR
765 DEBUGDIR
766 MAKEINFO_EXTRA_FLAGS
767 MAKEINFOFLAGS
768 MAKEINFO
769 PACKAGE
770 CATOBJEXT
771 GENCAT
772 INSTOBJEXT
773 DATADIRNAME
774 CATALOGS
775 POSUB
776 GMSGFMT
777 XGETTEXT
778 INCINTL
779 LIBINTL_DEP
780 LIBINTL
781 USE_NLS
782 CCDEPMODE
783 DEPDIR
784 am__leading_dot
785 CXX_DIALECT
786 HAVE_CXX11
787 INSTALL_STRIP_PROGRAM
788 STRIP
789 install_sh
790 target_os
791 target_vendor
792 target_cpu
793 target
794 host_os
795 host_vendor
796 host_cpu
797 host
798 build_os
799 build_vendor
800 build_cpu
801 build
802 EGREP
803 GREP
804 CPP
805 ac_ct_CXX
806 CXXFLAGS
807 CXX
808 OBJEXT
809 EXEEXT
810 ac_ct_CC
811 CPPFLAGS
812 LDFLAGS
813 CFLAGS
814 CC
815 MAINT
816 MAINTAINER_MODE_FALSE
817 MAINTAINER_MODE_TRUE
818 target_alias
819 host_alias
820 build_alias
821 LIBS
822 ECHO_T
823 ECHO_N
824 ECHO_C
825 DEFS
826 mandir
827 localedir
828 libdir
829 psdir
830 pdfdir
831 dvidir
832 htmldir
833 infodir
834 docdir
835 oldincludedir
836 includedir
837 localstatedir
838 sharedstatedir
839 sysconfdir
840 datadir
841 datarootdir
842 libexecdir
843 sbindir
844 bindir
845 program_transform_name
846 prefix
847 exec_prefix
848 PACKAGE_URL
849 PACKAGE_BUGREPORT
850 PACKAGE_STRING
851 PACKAGE_VERSION
852 PACKAGE_TARNAME
853 PACKAGE_NAME
854 PATH_SEPARATOR
855 SHELL'
856 ac_subst_files='nat_makefile_frag'
857 ac_user_opts='
858 enable_option_checking
859 enable_maintainer_mode
860 enable_plugins
861 enable_largefile
862 with_separate_debug_dir
863 with_gdb_datadir
864 with_relocated_sources
865 with_auto_load_dir
866 with_auto_load_safe_path
867 enable_targets
868 enable_64_bit_bfd
869 enable_gdbmi
870 enable_tui
871 enable_gdbtk
872 with_libunwind_ia64
873 with_curses
874 enable_profiling
875 enable_codesign
876 with_pkgversion
877 with_bugurl
878 with_system_zlib
879 with_gnu_ld
880 enable_rpath
881 with_libiconv_prefix
882 with_libiconv_type
883 with_iconv_bin
884 with_system_readline
885 with_jit_reader_dir
886 with_expat
887 with_libexpat_prefix
888 with_libexpat_type
889 with_mpfr
890 with_libmpfr_prefix
891 with_libmpfr_type
892 with_python
893 with_python_libdir
894 with_guile
895 enable_source_highlight
896 with_intel_pt
897 with_libipt_prefix
898 with_libipt_type
899 with_included_regex
900 with_sysroot
901 with_system_gdbinit
902 with_system_gdbinit_dir
903 enable_werror
904 enable_build_warnings
905 enable_gdb_build_warnings
906 enable_ubsan
907 with_lzma
908 with_liblzma_prefix
909 with_liblzma_type
910 with_tcl
911 with_tk
912 with_x
913 enable_sim
914 with_babeltrace
915 with_libbabeltrace_prefix
916 with_libbabeltrace_type
917 with_xxhash
918 with_libxxhash_prefix
919 with_libxxhash_type
920 enable_unit_tests
921 '
922 ac_precious_vars='build_alias
923 host_alias
924 target_alias
925 CC
926 CFLAGS
927 LDFLAGS
928 LIBS
929 CPPFLAGS
930 CXX
931 CXXFLAGS
932 CCC
933 CPP
934 MAKEINFO
935 MAKEINFOFLAGS
936 YACC
937 YFLAGS
938 XMKMF'
939 ac_subdirs_all='testsuite
940 gdbtk'
941
942 # Initialize some variables set by options.
943 ac_init_help=
944 ac_init_version=false
945 ac_unrecognized_opts=
946 ac_unrecognized_sep=
947 # The variables have the same names as the options, with
948 # dashes changed to underlines.
949 cache_file=/dev/null
950 exec_prefix=NONE
951 no_create=
952 no_recursion=
953 prefix=NONE
954 program_prefix=NONE
955 program_suffix=NONE
956 program_transform_name=s,x,x,
957 silent=
958 site=
959 srcdir=
960 verbose=
961 x_includes=NONE
962 x_libraries=NONE
963
964 # Installation directory options.
965 # These are left unexpanded so users can "make install exec_prefix=/foo"
966 # and all the variables that are supposed to be based on exec_prefix
967 # by default will actually change.
968 # Use braces instead of parens because sh, perl, etc. also accept them.
969 # (The list follows the same order as the GNU Coding Standards.)
970 bindir='${exec_prefix}/bin'
971 sbindir='${exec_prefix}/sbin'
972 libexecdir='${exec_prefix}/libexec'
973 datarootdir='${prefix}/share'
974 datadir='${datarootdir}'
975 sysconfdir='${prefix}/etc'
976 sharedstatedir='${prefix}/com'
977 localstatedir='${prefix}/var'
978 includedir='${prefix}/include'
979 oldincludedir='/usr/include'
980 docdir='${datarootdir}/doc/${PACKAGE}'
981 infodir='${datarootdir}/info'
982 htmldir='${docdir}'
983 dvidir='${docdir}'
984 pdfdir='${docdir}'
985 psdir='${docdir}'
986 libdir='${exec_prefix}/lib'
987 localedir='${datarootdir}/locale'
988 mandir='${datarootdir}/man'
989
990 ac_prev=
991 ac_dashdash=
992 for ac_option
993 do
994 # If the previous option needs an argument, assign it.
995 if test -n "$ac_prev"; then
996 eval $ac_prev=\$ac_option
997 ac_prev=
998 continue
999 fi
1000
1001 case $ac_option in
1002 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1003 *=) ac_optarg= ;;
1004 *) ac_optarg=yes ;;
1005 esac
1006
1007 # Accept the important Cygnus configure options, so we can diagnose typos.
1008
1009 case $ac_dashdash$ac_option in
1010 --)
1011 ac_dashdash=yes ;;
1012
1013 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1014 ac_prev=bindir ;;
1015 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1016 bindir=$ac_optarg ;;
1017
1018 -build | --build | --buil | --bui | --bu)
1019 ac_prev=build_alias ;;
1020 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1021 build_alias=$ac_optarg ;;
1022
1023 -cache-file | --cache-file | --cache-fil | --cache-fi \
1024 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1025 ac_prev=cache_file ;;
1026 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1027 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1028 cache_file=$ac_optarg ;;
1029
1030 --config-cache | -C)
1031 cache_file=config.cache ;;
1032
1033 -datadir | --datadir | --datadi | --datad)
1034 ac_prev=datadir ;;
1035 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1036 datadir=$ac_optarg ;;
1037
1038 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1039 | --dataroo | --dataro | --datar)
1040 ac_prev=datarootdir ;;
1041 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1042 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1043 datarootdir=$ac_optarg ;;
1044
1045 -disable-* | --disable-*)
1046 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1047 # Reject names that are not valid shell variable names.
1048 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1049 as_fn_error $? "invalid feature name: $ac_useropt"
1050 ac_useropt_orig=$ac_useropt
1051 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1052 case $ac_user_opts in
1053 *"
1054 "enable_$ac_useropt"
1055 "*) ;;
1056 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1057 ac_unrecognized_sep=', ';;
1058 esac
1059 eval enable_$ac_useropt=no ;;
1060
1061 -docdir | --docdir | --docdi | --doc | --do)
1062 ac_prev=docdir ;;
1063 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1064 docdir=$ac_optarg ;;
1065
1066 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1067 ac_prev=dvidir ;;
1068 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1069 dvidir=$ac_optarg ;;
1070
1071 -enable-* | --enable-*)
1072 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1073 # Reject names that are not valid shell variable names.
1074 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1075 as_fn_error $? "invalid feature name: $ac_useropt"
1076 ac_useropt_orig=$ac_useropt
1077 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1078 case $ac_user_opts in
1079 *"
1080 "enable_$ac_useropt"
1081 "*) ;;
1082 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1083 ac_unrecognized_sep=', ';;
1084 esac
1085 eval enable_$ac_useropt=\$ac_optarg ;;
1086
1087 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1088 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1089 | --exec | --exe | --ex)
1090 ac_prev=exec_prefix ;;
1091 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1092 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1093 | --exec=* | --exe=* | --ex=*)
1094 exec_prefix=$ac_optarg ;;
1095
1096 -gas | --gas | --ga | --g)
1097 # Obsolete; use --with-gas.
1098 with_gas=yes ;;
1099
1100 -help | --help | --hel | --he | -h)
1101 ac_init_help=long ;;
1102 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1103 ac_init_help=recursive ;;
1104 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1105 ac_init_help=short ;;
1106
1107 -host | --host | --hos | --ho)
1108 ac_prev=host_alias ;;
1109 -host=* | --host=* | --hos=* | --ho=*)
1110 host_alias=$ac_optarg ;;
1111
1112 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1113 ac_prev=htmldir ;;
1114 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1115 | --ht=*)
1116 htmldir=$ac_optarg ;;
1117
1118 -includedir | --includedir | --includedi | --included | --include \
1119 | --includ | --inclu | --incl | --inc)
1120 ac_prev=includedir ;;
1121 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1122 | --includ=* | --inclu=* | --incl=* | --inc=*)
1123 includedir=$ac_optarg ;;
1124
1125 -infodir | --infodir | --infodi | --infod | --info | --inf)
1126 ac_prev=infodir ;;
1127 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1128 infodir=$ac_optarg ;;
1129
1130 -libdir | --libdir | --libdi | --libd)
1131 ac_prev=libdir ;;
1132 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1133 libdir=$ac_optarg ;;
1134
1135 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1136 | --libexe | --libex | --libe)
1137 ac_prev=libexecdir ;;
1138 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1139 | --libexe=* | --libex=* | --libe=*)
1140 libexecdir=$ac_optarg ;;
1141
1142 -localedir | --localedir | --localedi | --localed | --locale)
1143 ac_prev=localedir ;;
1144 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1145 localedir=$ac_optarg ;;
1146
1147 -localstatedir | --localstatedir | --localstatedi | --localstated \
1148 | --localstate | --localstat | --localsta | --localst | --locals)
1149 ac_prev=localstatedir ;;
1150 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1151 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1152 localstatedir=$ac_optarg ;;
1153
1154 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1155 ac_prev=mandir ;;
1156 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1157 mandir=$ac_optarg ;;
1158
1159 -nfp | --nfp | --nf)
1160 # Obsolete; use --without-fp.
1161 with_fp=no ;;
1162
1163 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1164 | --no-cr | --no-c | -n)
1165 no_create=yes ;;
1166
1167 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1168 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1169 no_recursion=yes ;;
1170
1171 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1172 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1173 | --oldin | --oldi | --old | --ol | --o)
1174 ac_prev=oldincludedir ;;
1175 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1176 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1177 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1178 oldincludedir=$ac_optarg ;;
1179
1180 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1181 ac_prev=prefix ;;
1182 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1183 prefix=$ac_optarg ;;
1184
1185 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1186 | --program-pre | --program-pr | --program-p)
1187 ac_prev=program_prefix ;;
1188 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1189 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1190 program_prefix=$ac_optarg ;;
1191
1192 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1193 | --program-suf | --program-su | --program-s)
1194 ac_prev=program_suffix ;;
1195 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1196 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1197 program_suffix=$ac_optarg ;;
1198
1199 -program-transform-name | --program-transform-name \
1200 | --program-transform-nam | --program-transform-na \
1201 | --program-transform-n | --program-transform- \
1202 | --program-transform | --program-transfor \
1203 | --program-transfo | --program-transf \
1204 | --program-trans | --program-tran \
1205 | --progr-tra | --program-tr | --program-t)
1206 ac_prev=program_transform_name ;;
1207 -program-transform-name=* | --program-transform-name=* \
1208 | --program-transform-nam=* | --program-transform-na=* \
1209 | --program-transform-n=* | --program-transform-=* \
1210 | --program-transform=* | --program-transfor=* \
1211 | --program-transfo=* | --program-transf=* \
1212 | --program-trans=* | --program-tran=* \
1213 | --progr-tra=* | --program-tr=* | --program-t=*)
1214 program_transform_name=$ac_optarg ;;
1215
1216 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1217 ac_prev=pdfdir ;;
1218 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1219 pdfdir=$ac_optarg ;;
1220
1221 -psdir | --psdir | --psdi | --psd | --ps)
1222 ac_prev=psdir ;;
1223 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1224 psdir=$ac_optarg ;;
1225
1226 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1227 | -silent | --silent | --silen | --sile | --sil)
1228 silent=yes ;;
1229
1230 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1231 ac_prev=sbindir ;;
1232 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1233 | --sbi=* | --sb=*)
1234 sbindir=$ac_optarg ;;
1235
1236 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1237 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1238 | --sharedst | --shareds | --shared | --share | --shar \
1239 | --sha | --sh)
1240 ac_prev=sharedstatedir ;;
1241 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1242 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1243 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1244 | --sha=* | --sh=*)
1245 sharedstatedir=$ac_optarg ;;
1246
1247 -site | --site | --sit)
1248 ac_prev=site ;;
1249 -site=* | --site=* | --sit=*)
1250 site=$ac_optarg ;;
1251
1252 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1253 ac_prev=srcdir ;;
1254 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1255 srcdir=$ac_optarg ;;
1256
1257 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1258 | --syscon | --sysco | --sysc | --sys | --sy)
1259 ac_prev=sysconfdir ;;
1260 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1261 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1262 sysconfdir=$ac_optarg ;;
1263
1264 -target | --target | --targe | --targ | --tar | --ta | --t)
1265 ac_prev=target_alias ;;
1266 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1267 target_alias=$ac_optarg ;;
1268
1269 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1270 verbose=yes ;;
1271
1272 -version | --version | --versio | --versi | --vers | -V)
1273 ac_init_version=: ;;
1274
1275 -with-* | --with-*)
1276 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1277 # Reject names that are not valid shell variable names.
1278 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1279 as_fn_error $? "invalid package name: $ac_useropt"
1280 ac_useropt_orig=$ac_useropt
1281 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1282 case $ac_user_opts in
1283 *"
1284 "with_$ac_useropt"
1285 "*) ;;
1286 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1287 ac_unrecognized_sep=', ';;
1288 esac
1289 eval with_$ac_useropt=\$ac_optarg ;;
1290
1291 -without-* | --without-*)
1292 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1293 # Reject names that are not valid shell variable names.
1294 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1295 as_fn_error $? "invalid package name: $ac_useropt"
1296 ac_useropt_orig=$ac_useropt
1297 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1298 case $ac_user_opts in
1299 *"
1300 "with_$ac_useropt"
1301 "*) ;;
1302 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1303 ac_unrecognized_sep=', ';;
1304 esac
1305 eval with_$ac_useropt=no ;;
1306
1307 --x)
1308 # Obsolete; use --with-x.
1309 with_x=yes ;;
1310
1311 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1312 | --x-incl | --x-inc | --x-in | --x-i)
1313 ac_prev=x_includes ;;
1314 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1315 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1316 x_includes=$ac_optarg ;;
1317
1318 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1319 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1320 ac_prev=x_libraries ;;
1321 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1322 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1323 x_libraries=$ac_optarg ;;
1324
1325 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1326 Try \`$0 --help' for more information"
1327 ;;
1328
1329 *=*)
1330 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1331 # Reject names that are not valid shell variable names.
1332 case $ac_envvar in #(
1333 '' | [0-9]* | *[!_$as_cr_alnum]* )
1334 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1335 esac
1336 eval $ac_envvar=\$ac_optarg
1337 export $ac_envvar ;;
1338
1339 *)
1340 # FIXME: should be removed in autoconf 3.0.
1341 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1342 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1343 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1344 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1345 ;;
1346
1347 esac
1348 done
1349
1350 if test -n "$ac_prev"; then
1351 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1352 as_fn_error $? "missing argument to $ac_option"
1353 fi
1354
1355 if test -n "$ac_unrecognized_opts"; then
1356 case $enable_option_checking in
1357 no) ;;
1358 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1359 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1360 esac
1361 fi
1362
1363 # Check all directory arguments for consistency.
1364 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1365 datadir sysconfdir sharedstatedir localstatedir includedir \
1366 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1367 libdir localedir mandir
1368 do
1369 eval ac_val=\$$ac_var
1370 # Remove trailing slashes.
1371 case $ac_val in
1372 */ )
1373 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1374 eval $ac_var=\$ac_val;;
1375 esac
1376 # Be sure to have absolute directory names.
1377 case $ac_val in
1378 [\\/$]* | ?:[\\/]* ) continue;;
1379 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1380 esac
1381 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1382 done
1383
1384 # There might be people who depend on the old broken behavior: `$host'
1385 # used to hold the argument of --host etc.
1386 # FIXME: To remove some day.
1387 build=$build_alias
1388 host=$host_alias
1389 target=$target_alias
1390
1391 # FIXME: To remove some day.
1392 if test "x$host_alias" != x; then
1393 if test "x$build_alias" = x; then
1394 cross_compiling=maybe
1395 elif test "x$build_alias" != "x$host_alias"; then
1396 cross_compiling=yes
1397 fi
1398 fi
1399
1400 ac_tool_prefix=
1401 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1402
1403 test "$silent" = yes && exec 6>/dev/null
1404
1405
1406 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1407 ac_ls_di=`ls -di .` &&
1408 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1409 as_fn_error $? "working directory cannot be determined"
1410 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1411 as_fn_error $? "pwd does not report name of working directory"
1412
1413
1414 # Find the source files, if location was not specified.
1415 if test -z "$srcdir"; then
1416 ac_srcdir_defaulted=yes
1417 # Try the directory containing this script, then the parent directory.
1418 ac_confdir=`$as_dirname -- "$as_myself" ||
1419 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1420 X"$as_myself" : 'X\(//\)[^/]' \| \
1421 X"$as_myself" : 'X\(//\)$' \| \
1422 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1423 $as_echo X"$as_myself" |
1424 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1425 s//\1/
1426 q
1427 }
1428 /^X\(\/\/\)[^/].*/{
1429 s//\1/
1430 q
1431 }
1432 /^X\(\/\/\)$/{
1433 s//\1/
1434 q
1435 }
1436 /^X\(\/\).*/{
1437 s//\1/
1438 q
1439 }
1440 s/.*/./; q'`
1441 srcdir=$ac_confdir
1442 if test ! -r "$srcdir/$ac_unique_file"; then
1443 srcdir=..
1444 fi
1445 else
1446 ac_srcdir_defaulted=no
1447 fi
1448 if test ! -r "$srcdir/$ac_unique_file"; then
1449 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1450 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1451 fi
1452 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1453 ac_abs_confdir=`(
1454 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1455 pwd)`
1456 # When building in place, set srcdir=.
1457 if test "$ac_abs_confdir" = "$ac_pwd"; then
1458 srcdir=.
1459 fi
1460 # Remove unnecessary trailing slashes from srcdir.
1461 # Double slashes in file names in object file debugging info
1462 # mess up M-x gdb in Emacs.
1463 case $srcdir in
1464 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1465 esac
1466 for ac_var in $ac_precious_vars; do
1467 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1468 eval ac_env_${ac_var}_value=\$${ac_var}
1469 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1470 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1471 done
1472
1473 #
1474 # Report the --help message.
1475 #
1476 if test "$ac_init_help" = "long"; then
1477 # Omit some internal or obsolete options to make the list less imposing.
1478 # This message is too long to be a string in the A/UX 3.1 sh.
1479 cat <<_ACEOF
1480 \`configure' configures this package to adapt to many kinds of systems.
1481
1482 Usage: $0 [OPTION]... [VAR=VALUE]...
1483
1484 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1485 VAR=VALUE. See below for descriptions of some of the useful variables.
1486
1487 Defaults for the options are specified in brackets.
1488
1489 Configuration:
1490 -h, --help display this help and exit
1491 --help=short display options specific to this package
1492 --help=recursive display the short help of all the included packages
1493 -V, --version display version information and exit
1494 -q, --quiet, --silent do not print \`checking ...' messages
1495 --cache-file=FILE cache test results in FILE [disabled]
1496 -C, --config-cache alias for \`--cache-file=config.cache'
1497 -n, --no-create do not create output files
1498 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1499
1500 Installation directories:
1501 --prefix=PREFIX install architecture-independent files in PREFIX
1502 [$ac_default_prefix]
1503 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1504 [PREFIX]
1505
1506 By default, \`make install' will install all the files in
1507 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1508 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1509 for instance \`--prefix=\$HOME'.
1510
1511 For better control, use the options below.
1512
1513 Fine tuning of the installation directories:
1514 --bindir=DIR user executables [EPREFIX/bin]
1515 --sbindir=DIR system admin executables [EPREFIX/sbin]
1516 --libexecdir=DIR program executables [EPREFIX/libexec]
1517 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1518 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1519 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1520 --libdir=DIR object code libraries [EPREFIX/lib]
1521 --includedir=DIR C header files [PREFIX/include]
1522 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1523 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1524 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1525 --infodir=DIR info documentation [DATAROOTDIR/info]
1526 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1527 --mandir=DIR man documentation [DATAROOTDIR/man]
1528 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1529 --htmldir=DIR html documentation [DOCDIR]
1530 --dvidir=DIR dvi documentation [DOCDIR]
1531 --pdfdir=DIR pdf documentation [DOCDIR]
1532 --psdir=DIR ps documentation [DOCDIR]
1533 _ACEOF
1534
1535 cat <<\_ACEOF
1536
1537 Program names:
1538 --program-prefix=PREFIX prepend PREFIX to installed program names
1539 --program-suffix=SUFFIX append SUFFIX to installed program names
1540 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1541
1542 X features:
1543 --x-includes=DIR X include files are in DIR
1544 --x-libraries=DIR X library files are in DIR
1545
1546 System types:
1547 --build=BUILD configure for building on BUILD [guessed]
1548 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1549 --target=TARGET configure for building compilers for TARGET [HOST]
1550 _ACEOF
1551 fi
1552
1553 if test -n "$ac_init_help"; then
1554
1555 cat <<\_ACEOF
1556
1557 Optional Features:
1558 --disable-option-checking ignore unrecognized --enable/--with options
1559 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1560 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1561 --enable-maintainer-mode
1562 enable make rules and dependencies not useful (and
1563 sometimes confusing) to the casual installer
1564 --enable-plugins Enable support for plugins
1565 --disable-largefile omit support for large files
1566 --enable-targets=TARGETS
1567 alternative target configurations
1568 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1569 --disable-gdbmi disable machine-interface (MI)
1570 --enable-tui enable full-screen terminal user interface (TUI)
1571 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1572 --enable-profiling enable profiling of GDB
1573 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1574 --disable-rpath do not hardcode runtime library paths
1575 --enable-source-highlight
1576 enable source-highlight for source listings
1577 --enable-werror treat compile warnings as errors
1578 --enable-build-warnings enable build-time compiler warnings if gcc is used
1579 --enable-gdb-build-warnings
1580 enable GDB specific build-time compiler warnings if
1581 gcc is used
1582 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1583 --enable-sim link gdb with simulator
1584 --enable-unit-tests Enable the inclusion of unit tests when compiling
1585 GDB
1586
1587 Optional Packages:
1588 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1589 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1590 --with-separate-debug-dir=PATH
1591 look for global separate debug info in this path
1592 [LIBDIR/debug]
1593 --with-gdb-datadir=PATH look for global separate data files in this path
1594 [DATADIR/gdb]
1595 --with-relocated-sources=PATH
1596 automatically relocate this path for source files
1597 --with-auto-load-dir=PATH
1598 directories from which to load auto-loaded scripts
1599 [$debugdir:$datadir/auto-load]
1600 --with-auto-load-safe-path=PATH
1601 directories safe to hold auto-loaded files
1602 [--with-auto-load-dir]
1603 --without-auto-load-safe-path
1604 do not restrict auto-loaded files locations
1605 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1606 --with-curses use the curses library instead of the termcap
1607 library
1608 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1609 --with-bugurl=URL Direct users to URL to report a bug
1610 --with-system-zlib use installed libz
1611 --with-gnu-ld assume the C compiler uses GNU ld default=no
1612 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1613 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1614 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1615 --with-iconv-bin=PATH specify where to find the iconv program
1616 --with-system-readline use installed readline library
1617 --with-jit-reader-dir=PATH
1618 directory to load the JIT readers from
1619 --with-expat include expat support (auto/yes/no)
1620 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1621 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1622 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1623 --with-mpfr include MPFR support (auto/yes/no)
1624 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1625 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1626 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1627 --with-python[=PYTHON] include python support
1628 (auto/yes/no/<python-program>)
1629 --with-python-libdir[=DIR]
1630 search for python's libraries in DIR
1631 --with-guile[=GUILE] include guile support
1632 (auto/yes/no/<guile-version>/<pkg-config-program>)
1633 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1634 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1635 --without-libipt-prefix don't search for libipt in includedir and libdir
1636 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1637 --without-included-regex
1638 don't use included regex; this is the default on
1639 systems with version 2 of the GNU C library (use
1640 with caution on other system)
1641 --with-sysroot[=DIR] search for usr/lib et al within DIR
1642 --with-system-gdbinit=PATH
1643 automatically load a system-wide gdbinit file
1644 --with-system-gdbinit-dir=PATH
1645 automatically load system-wide gdbinit files from
1646 this directory
1647 --with-lzma support lzma compression (auto/yes/no)
1648 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1649 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1650 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1651 --with-tcl directory containing tcl configuration (tclConfig.sh)
1652 --with-tk directory containing tk configuration (tkConfig.sh)
1653 --with-x use the X Window System
1654 --with-babeltrace include babeltrace support (auto/yes/no)
1655 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1656 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1657 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1658 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1659 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1660 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1661 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1662
1663 Some influential environment variables:
1664 CC C compiler command
1665 CFLAGS C compiler flags
1666 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1667 nonstandard directory <lib dir>
1668 LIBS libraries to pass to the linker, e.g. -l<library>
1669 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1670 you have headers in a nonstandard directory <include dir>
1671 CXX C++ compiler command
1672 CXXFLAGS C++ compiler flags
1673 CPP C preprocessor
1674 MAKEINFO Parent configure detects if it is of sufficient version.
1675 MAKEINFOFLAGS
1676 Parameters for MAKEINFO.
1677 YACC The `Yet Another Compiler Compiler' implementation to use.
1678 Defaults to the first program found out of: `bison -y', `byacc',
1679 `yacc'.
1680 YFLAGS The list of arguments that will be passed by default to $YACC.
1681 This script will default YFLAGS to the empty string to avoid a
1682 default value of `-d' given by some make applications.
1683 XMKMF Path to xmkmf, Makefile generator for X Window System
1684
1685 Use these variables to override the choices made by `configure' or to help
1686 it to find libraries and programs with nonstandard names/locations.
1687
1688 Report bugs to the package provider.
1689 _ACEOF
1690 ac_status=$?
1691 fi
1692
1693 if test "$ac_init_help" = "recursive"; then
1694 # If there are subdirs, report their specific --help.
1695 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1696 test -d "$ac_dir" ||
1697 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1698 continue
1699 ac_builddir=.
1700
1701 case "$ac_dir" in
1702 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1703 *)
1704 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1705 # A ".." for each directory in $ac_dir_suffix.
1706 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1707 case $ac_top_builddir_sub in
1708 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1709 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1710 esac ;;
1711 esac
1712 ac_abs_top_builddir=$ac_pwd
1713 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1714 # for backward compatibility:
1715 ac_top_builddir=$ac_top_build_prefix
1716
1717 case $srcdir in
1718 .) # We are building in place.
1719 ac_srcdir=.
1720 ac_top_srcdir=$ac_top_builddir_sub
1721 ac_abs_top_srcdir=$ac_pwd ;;
1722 [\\/]* | ?:[\\/]* ) # Absolute name.
1723 ac_srcdir=$srcdir$ac_dir_suffix;
1724 ac_top_srcdir=$srcdir
1725 ac_abs_top_srcdir=$srcdir ;;
1726 *) # Relative name.
1727 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1728 ac_top_srcdir=$ac_top_build_prefix$srcdir
1729 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1730 esac
1731 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1732
1733 cd "$ac_dir" || { ac_status=$?; continue; }
1734 # Check for guested configure.
1735 if test -f "$ac_srcdir/configure.gnu"; then
1736 echo &&
1737 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1738 elif test -f "$ac_srcdir/configure"; then
1739 echo &&
1740 $SHELL "$ac_srcdir/configure" --help=recursive
1741 else
1742 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1743 fi || ac_status=$?
1744 cd "$ac_pwd" || { ac_status=$?; break; }
1745 done
1746 fi
1747
1748 test -n "$ac_init_help" && exit $ac_status
1749 if $ac_init_version; then
1750 cat <<\_ACEOF
1751 configure
1752 generated by GNU Autoconf 2.69
1753
1754 Copyright (C) 2012 Free Software Foundation, Inc.
1755 This configure script is free software; the Free Software Foundation
1756 gives unlimited permission to copy, distribute and modify it.
1757 _ACEOF
1758 exit
1759 fi
1760
1761 ## ------------------------ ##
1762 ## Autoconf initialization. ##
1763 ## ------------------------ ##
1764
1765 # ac_fn_c_try_compile LINENO
1766 # --------------------------
1767 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1768 ac_fn_c_try_compile ()
1769 {
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 rm -f conftest.$ac_objext
1772 if { { ac_try="$ac_compile"
1773 case "(($ac_try" in
1774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775 *) ac_try_echo=$ac_try;;
1776 esac
1777 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778 $as_echo "$ac_try_echo"; } >&5
1779 (eval "$ac_compile") 2>conftest.err
1780 ac_status=$?
1781 if test -s conftest.err; then
1782 grep -v '^ *+' conftest.err >conftest.er1
1783 cat conftest.er1 >&5
1784 mv -f conftest.er1 conftest.err
1785 fi
1786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1787 test $ac_status = 0; } && {
1788 test -z "$ac_c_werror_flag" ||
1789 test ! -s conftest.err
1790 } && test -s conftest.$ac_objext; then :
1791 ac_retval=0
1792 else
1793 $as_echo "$as_me: failed program was:" >&5
1794 sed 's/^/| /' conftest.$ac_ext >&5
1795
1796 ac_retval=1
1797 fi
1798 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1799 as_fn_set_status $ac_retval
1800
1801 } # ac_fn_c_try_compile
1802
1803 # ac_fn_cxx_try_compile LINENO
1804 # ----------------------------
1805 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1806 ac_fn_cxx_try_compile ()
1807 {
1808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1809 rm -f conftest.$ac_objext
1810 if { { ac_try="$ac_compile"
1811 case "(($ac_try" in
1812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1813 *) ac_try_echo=$ac_try;;
1814 esac
1815 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1816 $as_echo "$ac_try_echo"; } >&5
1817 (eval "$ac_compile") 2>conftest.err
1818 ac_status=$?
1819 if test -s conftest.err; then
1820 grep -v '^ *+' conftest.err >conftest.er1
1821 cat conftest.er1 >&5
1822 mv -f conftest.er1 conftest.err
1823 fi
1824 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1825 test $ac_status = 0; } && {
1826 test -z "$ac_cxx_werror_flag" ||
1827 test ! -s conftest.err
1828 } && test -s conftest.$ac_objext; then :
1829 ac_retval=0
1830 else
1831 $as_echo "$as_me: failed program was:" >&5
1832 sed 's/^/| /' conftest.$ac_ext >&5
1833
1834 ac_retval=1
1835 fi
1836 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1837 as_fn_set_status $ac_retval
1838
1839 } # ac_fn_cxx_try_compile
1840
1841 # ac_fn_c_try_cpp LINENO
1842 # ----------------------
1843 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1844 ac_fn_c_try_cpp ()
1845 {
1846 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1847 if { { ac_try="$ac_cpp conftest.$ac_ext"
1848 case "(($ac_try" in
1849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1850 *) ac_try_echo=$ac_try;;
1851 esac
1852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1853 $as_echo "$ac_try_echo"; } >&5
1854 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1855 ac_status=$?
1856 if test -s conftest.err; then
1857 grep -v '^ *+' conftest.err >conftest.er1
1858 cat conftest.er1 >&5
1859 mv -f conftest.er1 conftest.err
1860 fi
1861 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1862 test $ac_status = 0; } > conftest.i && {
1863 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1864 test ! -s conftest.err
1865 }; then :
1866 ac_retval=0
1867 else
1868 $as_echo "$as_me: failed program was:" >&5
1869 sed 's/^/| /' conftest.$ac_ext >&5
1870
1871 ac_retval=1
1872 fi
1873 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1874 as_fn_set_status $ac_retval
1875
1876 } # ac_fn_c_try_cpp
1877
1878 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1879 # -------------------------------------------------------
1880 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1881 # the include files in INCLUDES and setting the cache variable VAR
1882 # accordingly.
1883 ac_fn_c_check_header_mongrel ()
1884 {
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1886 if eval \${$3+:} false; then :
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888 $as_echo_n "checking for $2... " >&6; }
1889 if eval \${$3+:} false; then :
1890 $as_echo_n "(cached) " >&6
1891 fi
1892 eval ac_res=\$$3
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894 $as_echo "$ac_res" >&6; }
1895 else
1896 # Is the header compilable?
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1898 $as_echo_n "checking $2 usability... " >&6; }
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900 /* end confdefs.h. */
1901 $4
1902 #include <$2>
1903 _ACEOF
1904 if ac_fn_c_try_compile "$LINENO"; then :
1905 ac_header_compiler=yes
1906 else
1907 ac_header_compiler=no
1908 fi
1909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1911 $as_echo "$ac_header_compiler" >&6; }
1912
1913 # Is the header present?
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1915 $as_echo_n "checking $2 presence... " >&6; }
1916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1917 /* end confdefs.h. */
1918 #include <$2>
1919 _ACEOF
1920 if ac_fn_c_try_cpp "$LINENO"; then :
1921 ac_header_preproc=yes
1922 else
1923 ac_header_preproc=no
1924 fi
1925 rm -f conftest.err conftest.i conftest.$ac_ext
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1927 $as_echo "$ac_header_preproc" >&6; }
1928
1929 # So? What about this header?
1930 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1931 yes:no: )
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1933 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1935 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1936 ;;
1937 no:yes:* )
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1939 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1941 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1943 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1945 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1947 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1948 ;;
1949 esac
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1951 $as_echo_n "checking for $2... " >&6; }
1952 if eval \${$3+:} false; then :
1953 $as_echo_n "(cached) " >&6
1954 else
1955 eval "$3=\$ac_header_compiler"
1956 fi
1957 eval ac_res=\$$3
1958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1959 $as_echo "$ac_res" >&6; }
1960 fi
1961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1962
1963 } # ac_fn_c_check_header_mongrel
1964
1965 # ac_fn_c_try_run LINENO
1966 # ----------------------
1967 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1968 # that executables *can* be run.
1969 ac_fn_c_try_run ()
1970 {
1971 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972 if { { ac_try="$ac_link"
1973 case "(($ac_try" in
1974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1975 *) ac_try_echo=$ac_try;;
1976 esac
1977 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1978 $as_echo "$ac_try_echo"; } >&5
1979 (eval "$ac_link") 2>&5
1980 ac_status=$?
1981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1982 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1983 { { case "(($ac_try" in
1984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1985 *) ac_try_echo=$ac_try;;
1986 esac
1987 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1988 $as_echo "$ac_try_echo"; } >&5
1989 (eval "$ac_try") 2>&5
1990 ac_status=$?
1991 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1992 test $ac_status = 0; }; }; then :
1993 ac_retval=0
1994 else
1995 $as_echo "$as_me: program exited with status $ac_status" >&5
1996 $as_echo "$as_me: failed program was:" >&5
1997 sed 's/^/| /' conftest.$ac_ext >&5
1998
1999 ac_retval=$ac_status
2000 fi
2001 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2003 as_fn_set_status $ac_retval
2004
2005 } # ac_fn_c_try_run
2006
2007 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2008 # -------------------------------------------------------
2009 # Tests whether HEADER exists and can be compiled using the include files in
2010 # INCLUDES, setting the cache variable VAR accordingly.
2011 ac_fn_c_check_header_compile ()
2012 {
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2015 $as_echo_n "checking for $2... " >&6; }
2016 if eval \${$3+:} false; then :
2017 $as_echo_n "(cached) " >&6
2018 else
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020 /* end confdefs.h. */
2021 $4
2022 #include <$2>
2023 _ACEOF
2024 if ac_fn_c_try_compile "$LINENO"; then :
2025 eval "$3=yes"
2026 else
2027 eval "$3=no"
2028 fi
2029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2030 fi
2031 eval ac_res=\$$3
2032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2033 $as_echo "$ac_res" >&6; }
2034 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2035
2036 } # ac_fn_c_check_header_compile
2037
2038 # ac_fn_c_try_link LINENO
2039 # -----------------------
2040 # Try to link conftest.$ac_ext, and return whether this succeeded.
2041 ac_fn_c_try_link ()
2042 {
2043 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2044 rm -f conftest.$ac_objext conftest$ac_exeext
2045 if { { ac_try="$ac_link"
2046 case "(($ac_try" in
2047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2048 *) ac_try_echo=$ac_try;;
2049 esac
2050 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2051 $as_echo "$ac_try_echo"; } >&5
2052 (eval "$ac_link") 2>conftest.err
2053 ac_status=$?
2054 if test -s conftest.err; then
2055 grep -v '^ *+' conftest.err >conftest.er1
2056 cat conftest.er1 >&5
2057 mv -f conftest.er1 conftest.err
2058 fi
2059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2060 test $ac_status = 0; } && {
2061 test -z "$ac_c_werror_flag" ||
2062 test ! -s conftest.err
2063 } && test -s conftest$ac_exeext && {
2064 test "$cross_compiling" = yes ||
2065 test -x conftest$ac_exeext
2066 }; then :
2067 ac_retval=0
2068 else
2069 $as_echo "$as_me: failed program was:" >&5
2070 sed 's/^/| /' conftest.$ac_ext >&5
2071
2072 ac_retval=1
2073 fi
2074 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2075 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2076 # interfere with the next link command; also delete a directory that is
2077 # left behind by Apple's compiler. We do this before executing the actions.
2078 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2079 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2080 as_fn_set_status $ac_retval
2081
2082 } # ac_fn_c_try_link
2083
2084 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2085 # --------------------------------------------
2086 # Tries to find the compile-time value of EXPR in a program that includes
2087 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2088 # computed
2089 ac_fn_c_compute_int ()
2090 {
2091 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2092 if test "$cross_compiling" = yes; then
2093 # Depending upon the size, compute the lo and hi bounds.
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095 /* end confdefs.h. */
2096 $4
2097 int
2098 main ()
2099 {
2100 static int test_array [1 - 2 * !(($2) >= 0)];
2101 test_array [0] = 0;
2102 return test_array [0];
2103
2104 ;
2105 return 0;
2106 }
2107 _ACEOF
2108 if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_lo=0 ac_mid=0
2110 while :; do
2111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112 /* end confdefs.h. */
2113 $4
2114 int
2115 main ()
2116 {
2117 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2118 test_array [0] = 0;
2119 return test_array [0];
2120
2121 ;
2122 return 0;
2123 }
2124 _ACEOF
2125 if ac_fn_c_try_compile "$LINENO"; then :
2126 ac_hi=$ac_mid; break
2127 else
2128 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2129 if test $ac_lo -le $ac_mid; then
2130 ac_lo= ac_hi=
2131 break
2132 fi
2133 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2134 fi
2135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2136 done
2137 else
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h. */
2140 $4
2141 int
2142 main ()
2143 {
2144 static int test_array [1 - 2 * !(($2) < 0)];
2145 test_array [0] = 0;
2146 return test_array [0];
2147
2148 ;
2149 return 0;
2150 }
2151 _ACEOF
2152 if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_hi=-1 ac_mid=-1
2154 while :; do
2155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156 /* end confdefs.h. */
2157 $4
2158 int
2159 main ()
2160 {
2161 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2162 test_array [0] = 0;
2163 return test_array [0];
2164
2165 ;
2166 return 0;
2167 }
2168 _ACEOF
2169 if ac_fn_c_try_compile "$LINENO"; then :
2170 ac_lo=$ac_mid; break
2171 else
2172 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2173 if test $ac_mid -le $ac_hi; then
2174 ac_lo= ac_hi=
2175 break
2176 fi
2177 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2178 fi
2179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180 done
2181 else
2182 ac_lo= ac_hi=
2183 fi
2184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2185 fi
2186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187 # Binary search between lo and hi bounds.
2188 while test "x$ac_lo" != "x$ac_hi"; do
2189 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191 /* end confdefs.h. */
2192 $4
2193 int
2194 main ()
2195 {
2196 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2197 test_array [0] = 0;
2198 return test_array [0];
2199
2200 ;
2201 return 0;
2202 }
2203 _ACEOF
2204 if ac_fn_c_try_compile "$LINENO"; then :
2205 ac_hi=$ac_mid
2206 else
2207 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2208 fi
2209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210 done
2211 case $ac_lo in #((
2212 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2213 '') ac_retval=1 ;;
2214 esac
2215 else
2216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217 /* end confdefs.h. */
2218 $4
2219 static long int longval () { return $2; }
2220 static unsigned long int ulongval () { return $2; }
2221 #include <stdio.h>
2222 #include <stdlib.h>
2223 int
2224 main ()
2225 {
2226
2227 FILE *f = fopen ("conftest.val", "w");
2228 if (! f)
2229 return 1;
2230 if (($2) < 0)
2231 {
2232 long int i = longval ();
2233 if (i != ($2))
2234 return 1;
2235 fprintf (f, "%ld", i);
2236 }
2237 else
2238 {
2239 unsigned long int i = ulongval ();
2240 if (i != ($2))
2241 return 1;
2242 fprintf (f, "%lu", i);
2243 }
2244 /* Do not output a trailing newline, as this causes \r\n confusion
2245 on some platforms. */
2246 return ferror (f) || fclose (f) != 0;
2247
2248 ;
2249 return 0;
2250 }
2251 _ACEOF
2252 if ac_fn_c_try_run "$LINENO"; then :
2253 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2254 else
2255 ac_retval=1
2256 fi
2257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2258 conftest.$ac_objext conftest.beam conftest.$ac_ext
2259 rm -f conftest.val
2260
2261 fi
2262 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263 as_fn_set_status $ac_retval
2264
2265 } # ac_fn_c_compute_int
2266
2267 # ac_fn_c_check_func LINENO FUNC VAR
2268 # ----------------------------------
2269 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2270 ac_fn_c_check_func ()
2271 {
2272 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2274 $as_echo_n "checking for $2... " >&6; }
2275 if eval \${$3+:} false; then :
2276 $as_echo_n "(cached) " >&6
2277 else
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279 /* end confdefs.h. */
2280 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2281 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2282 #define $2 innocuous_$2
2283
2284 /* System header to define __stub macros and hopefully few prototypes,
2285 which can conflict with char $2 (); below.
2286 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2287 <limits.h> exists even on freestanding compilers. */
2288
2289 #ifdef __STDC__
2290 # include <limits.h>
2291 #else
2292 # include <assert.h>
2293 #endif
2294
2295 #undef $2
2296
2297 /* Override any GCC internal prototype to avoid an error.
2298 Use char because int might match the return type of a GCC
2299 builtin and then its argument prototype would still apply. */
2300 #ifdef __cplusplus
2301 extern "C"
2302 #endif
2303 char $2 ();
2304 /* The GNU C library defines this for functions which it implements
2305 to always fail with ENOSYS. Some functions are actually named
2306 something starting with __ and the normal name is an alias. */
2307 #if defined __stub_$2 || defined __stub___$2
2308 choke me
2309 #endif
2310
2311 int
2312 main ()
2313 {
2314 return $2 ();
2315 ;
2316 return 0;
2317 }
2318 _ACEOF
2319 if ac_fn_c_try_link "$LINENO"; then :
2320 eval "$3=yes"
2321 else
2322 eval "$3=no"
2323 fi
2324 rm -f core conftest.err conftest.$ac_objext \
2325 conftest$ac_exeext conftest.$ac_ext
2326 fi
2327 eval ac_res=\$$3
2328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2329 $as_echo "$ac_res" >&6; }
2330 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2331
2332 } # ac_fn_c_check_func
2333
2334 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2335 # -------------------------------------------
2336 # Tests whether TYPE exists after having included INCLUDES, setting cache
2337 # variable VAR accordingly.
2338 ac_fn_c_check_type ()
2339 {
2340 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2342 $as_echo_n "checking for $2... " >&6; }
2343 if eval \${$3+:} false; then :
2344 $as_echo_n "(cached) " >&6
2345 else
2346 eval "$3=no"
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348 /* end confdefs.h. */
2349 $4
2350 int
2351 main ()
2352 {
2353 if (sizeof ($2))
2354 return 0;
2355 ;
2356 return 0;
2357 }
2358 _ACEOF
2359 if ac_fn_c_try_compile "$LINENO"; then :
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361 /* end confdefs.h. */
2362 $4
2363 int
2364 main ()
2365 {
2366 if (sizeof (($2)))
2367 return 0;
2368 ;
2369 return 0;
2370 }
2371 _ACEOF
2372 if ac_fn_c_try_compile "$LINENO"; then :
2373
2374 else
2375 eval "$3=yes"
2376 fi
2377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2378 fi
2379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2380 fi
2381 eval ac_res=\$$3
2382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2383 $as_echo "$ac_res" >&6; }
2384 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2385
2386 } # ac_fn_c_check_type
2387
2388 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2389 # ---------------------------------------------
2390 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2391 # accordingly.
2392 ac_fn_c_check_decl ()
2393 {
2394 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395 as_decl_name=`echo $2|sed 's/ *(.*//'`
2396 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2398 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2399 if eval \${$3+:} false; then :
2400 $as_echo_n "(cached) " >&6
2401 else
2402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2403 /* end confdefs.h. */
2404 $4
2405 int
2406 main ()
2407 {
2408 #ifndef $as_decl_name
2409 #ifdef __cplusplus
2410 (void) $as_decl_use;
2411 #else
2412 (void) $as_decl_name;
2413 #endif
2414 #endif
2415
2416 ;
2417 return 0;
2418 }
2419 _ACEOF
2420 if ac_fn_c_try_compile "$LINENO"; then :
2421 eval "$3=yes"
2422 else
2423 eval "$3=no"
2424 fi
2425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426 fi
2427 eval ac_res=\$$3
2428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2429 $as_echo "$ac_res" >&6; }
2430 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2431
2432 } # ac_fn_c_check_decl
2433
2434 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2435 # ----------------------------------------------------
2436 # Tries to find if the field MEMBER exists in type AGGR, after including
2437 # INCLUDES, setting cache variable VAR accordingly.
2438 ac_fn_c_check_member ()
2439 {
2440 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2442 $as_echo_n "checking for $2.$3... " >&6; }
2443 if eval \${$4+:} false; then :
2444 $as_echo_n "(cached) " >&6
2445 else
2446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2447 /* end confdefs.h. */
2448 $5
2449 int
2450 main ()
2451 {
2452 static $2 ac_aggr;
2453 if (ac_aggr.$3)
2454 return 0;
2455 ;
2456 return 0;
2457 }
2458 _ACEOF
2459 if ac_fn_c_try_compile "$LINENO"; then :
2460 eval "$4=yes"
2461 else
2462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463 /* end confdefs.h. */
2464 $5
2465 int
2466 main ()
2467 {
2468 static $2 ac_aggr;
2469 if (sizeof ac_aggr.$3)
2470 return 0;
2471 ;
2472 return 0;
2473 }
2474 _ACEOF
2475 if ac_fn_c_try_compile "$LINENO"; then :
2476 eval "$4=yes"
2477 else
2478 eval "$4=no"
2479 fi
2480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2481 fi
2482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2483 fi
2484 eval ac_res=\$$4
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2486 $as_echo "$ac_res" >&6; }
2487 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2488
2489 } # ac_fn_c_check_member
2490
2491 # ac_fn_cxx_try_link LINENO
2492 # -------------------------
2493 # Try to link conftest.$ac_ext, and return whether this succeeded.
2494 ac_fn_cxx_try_link ()
2495 {
2496 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2497 rm -f conftest.$ac_objext conftest$ac_exeext
2498 if { { ac_try="$ac_link"
2499 case "(($ac_try" in
2500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2501 *) ac_try_echo=$ac_try;;
2502 esac
2503 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2504 $as_echo "$ac_try_echo"; } >&5
2505 (eval "$ac_link") 2>conftest.err
2506 ac_status=$?
2507 if test -s conftest.err; then
2508 grep -v '^ *+' conftest.err >conftest.er1
2509 cat conftest.er1 >&5
2510 mv -f conftest.er1 conftest.err
2511 fi
2512 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2513 test $ac_status = 0; } && {
2514 test -z "$ac_cxx_werror_flag" ||
2515 test ! -s conftest.err
2516 } && test -s conftest$ac_exeext && {
2517 test "$cross_compiling" = yes ||
2518 test -x conftest$ac_exeext
2519 }; then :
2520 ac_retval=0
2521 else
2522 $as_echo "$as_me: failed program was:" >&5
2523 sed 's/^/| /' conftest.$ac_ext >&5
2524
2525 ac_retval=1
2526 fi
2527 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2528 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2529 # interfere with the next link command; also delete a directory that is
2530 # left behind by Apple's compiler. We do this before executing the actions.
2531 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2532 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2533 as_fn_set_status $ac_retval
2534
2535 } # ac_fn_cxx_try_link
2536
2537 # ac_fn_cxx_check_func LINENO FUNC VAR
2538 # ------------------------------------
2539 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2540 ac_fn_cxx_check_func ()
2541 {
2542 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2544 $as_echo_n "checking for $2... " >&6; }
2545 if eval \${$3+:} false; then :
2546 $as_echo_n "(cached) " >&6
2547 else
2548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2549 /* end confdefs.h. */
2550 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2551 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2552 #define $2 innocuous_$2
2553
2554 /* System header to define __stub macros and hopefully few prototypes,
2555 which can conflict with char $2 (); below.
2556 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2557 <limits.h> exists even on freestanding compilers. */
2558
2559 #ifdef __STDC__
2560 # include <limits.h>
2561 #else
2562 # include <assert.h>
2563 #endif
2564
2565 #undef $2
2566
2567 /* Override any GCC internal prototype to avoid an error.
2568 Use char because int might match the return type of a GCC
2569 builtin and then its argument prototype would still apply. */
2570 #ifdef __cplusplus
2571 extern "C"
2572 #endif
2573 char $2 ();
2574 /* The GNU C library defines this for functions which it implements
2575 to always fail with ENOSYS. Some functions are actually named
2576 something starting with __ and the normal name is an alias. */
2577 #if defined __stub_$2 || defined __stub___$2
2578 choke me
2579 #endif
2580
2581 int
2582 main ()
2583 {
2584 return $2 ();
2585 ;
2586 return 0;
2587 }
2588 _ACEOF
2589 if ac_fn_cxx_try_link "$LINENO"; then :
2590 eval "$3=yes"
2591 else
2592 eval "$3=no"
2593 fi
2594 rm -f core conftest.err conftest.$ac_objext \
2595 conftest$ac_exeext conftest.$ac_ext
2596 fi
2597 eval ac_res=\$$3
2598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2599 $as_echo "$ac_res" >&6; }
2600 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601
2602 } # ac_fn_cxx_check_func
2603 cat >config.log <<_ACEOF
2604 This file contains any messages produced by compilers while
2605 running configure, to aid debugging if configure makes a mistake.
2606
2607 It was created by $as_me, which was
2608 generated by GNU Autoconf 2.69. Invocation command line was
2609
2610 $ $0 $@
2611
2612 _ACEOF
2613 exec 5>>config.log
2614 {
2615 cat <<_ASUNAME
2616 ## --------- ##
2617 ## Platform. ##
2618 ## --------- ##
2619
2620 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2621 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2622 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2623 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2624 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2625
2626 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2627 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2628
2629 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2630 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2631 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2632 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2633 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2634 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2635 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2636
2637 _ASUNAME
2638
2639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2640 for as_dir in $PATH
2641 do
2642 IFS=$as_save_IFS
2643 test -z "$as_dir" && as_dir=.
2644 $as_echo "PATH: $as_dir"
2645 done
2646 IFS=$as_save_IFS
2647
2648 } >&5
2649
2650 cat >&5 <<_ACEOF
2651
2652
2653 ## ----------- ##
2654 ## Core tests. ##
2655 ## ----------- ##
2656
2657 _ACEOF
2658
2659
2660 # Keep a trace of the command line.
2661 # Strip out --no-create and --no-recursion so they do not pile up.
2662 # Strip out --silent because we don't want to record it for future runs.
2663 # Also quote any args containing shell meta-characters.
2664 # Make two passes to allow for proper duplicate-argument suppression.
2665 ac_configure_args=
2666 ac_configure_args0=
2667 ac_configure_args1=
2668 ac_must_keep_next=false
2669 for ac_pass in 1 2
2670 do
2671 for ac_arg
2672 do
2673 case $ac_arg in
2674 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2675 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2676 | -silent | --silent | --silen | --sile | --sil)
2677 continue ;;
2678 *\'*)
2679 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2680 esac
2681 case $ac_pass in
2682 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2683 2)
2684 as_fn_append ac_configure_args1 " '$ac_arg'"
2685 if test $ac_must_keep_next = true; then
2686 ac_must_keep_next=false # Got value, back to normal.
2687 else
2688 case $ac_arg in
2689 *=* | --config-cache | -C | -disable-* | --disable-* \
2690 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2691 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2692 | -with-* | --with-* | -without-* | --without-* | --x)
2693 case "$ac_configure_args0 " in
2694 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2695 esac
2696 ;;
2697 -* ) ac_must_keep_next=true ;;
2698 esac
2699 fi
2700 as_fn_append ac_configure_args " '$ac_arg'"
2701 ;;
2702 esac
2703 done
2704 done
2705 { ac_configure_args0=; unset ac_configure_args0;}
2706 { ac_configure_args1=; unset ac_configure_args1;}
2707
2708 # When interrupted or exit'd, cleanup temporary files, and complete
2709 # config.log. We remove comments because anyway the quotes in there
2710 # would cause problems or look ugly.
2711 # WARNING: Use '\'' to represent an apostrophe within the trap.
2712 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2713 trap 'exit_status=$?
2714 # Save into config.log some information that might help in debugging.
2715 {
2716 echo
2717
2718 $as_echo "## ---------------- ##
2719 ## Cache variables. ##
2720 ## ---------------- ##"
2721 echo
2722 # The following way of writing the cache mishandles newlines in values,
2723 (
2724 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2725 eval ac_val=\$$ac_var
2726 case $ac_val in #(
2727 *${as_nl}*)
2728 case $ac_var in #(
2729 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2730 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2731 esac
2732 case $ac_var in #(
2733 _ | IFS | as_nl) ;; #(
2734 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2735 *) { eval $ac_var=; unset $ac_var;} ;;
2736 esac ;;
2737 esac
2738 done
2739 (set) 2>&1 |
2740 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2741 *${as_nl}ac_space=\ *)
2742 sed -n \
2743 "s/'\''/'\''\\\\'\'''\''/g;
2744 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2745 ;; #(
2746 *)
2747 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2748 ;;
2749 esac |
2750 sort
2751 )
2752 echo
2753
2754 $as_echo "## ----------------- ##
2755 ## Output variables. ##
2756 ## ----------------- ##"
2757 echo
2758 for ac_var in $ac_subst_vars
2759 do
2760 eval ac_val=\$$ac_var
2761 case $ac_val in
2762 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2763 esac
2764 $as_echo "$ac_var='\''$ac_val'\''"
2765 done | sort
2766 echo
2767
2768 if test -n "$ac_subst_files"; then
2769 $as_echo "## ------------------- ##
2770 ## File substitutions. ##
2771 ## ------------------- ##"
2772 echo
2773 for ac_var in $ac_subst_files
2774 do
2775 eval ac_val=\$$ac_var
2776 case $ac_val in
2777 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2778 esac
2779 $as_echo "$ac_var='\''$ac_val'\''"
2780 done | sort
2781 echo
2782 fi
2783
2784 if test -s confdefs.h; then
2785 $as_echo "## ----------- ##
2786 ## confdefs.h. ##
2787 ## ----------- ##"
2788 echo
2789 cat confdefs.h
2790 echo
2791 fi
2792 test "$ac_signal" != 0 &&
2793 $as_echo "$as_me: caught signal $ac_signal"
2794 $as_echo "$as_me: exit $exit_status"
2795 } >&5
2796 rm -f core *.core core.conftest.* &&
2797 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2798 exit $exit_status
2799 ' 0
2800 for ac_signal in 1 2 13 15; do
2801 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2802 done
2803 ac_signal=0
2804
2805 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2806 rm -f -r conftest* confdefs.h
2807
2808 $as_echo "/* confdefs.h */" > confdefs.h
2809
2810 # Predefined preprocessor variables.
2811
2812 cat >>confdefs.h <<_ACEOF
2813 #define PACKAGE_NAME "$PACKAGE_NAME"
2814 _ACEOF
2815
2816 cat >>confdefs.h <<_ACEOF
2817 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2818 _ACEOF
2819
2820 cat >>confdefs.h <<_ACEOF
2821 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2822 _ACEOF
2823
2824 cat >>confdefs.h <<_ACEOF
2825 #define PACKAGE_STRING "$PACKAGE_STRING"
2826 _ACEOF
2827
2828 cat >>confdefs.h <<_ACEOF
2829 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2830 _ACEOF
2831
2832 cat >>confdefs.h <<_ACEOF
2833 #define PACKAGE_URL "$PACKAGE_URL"
2834 _ACEOF
2835
2836
2837 # Let the site file select an alternate cache file if it wants to.
2838 # Prefer an explicitly selected file to automatically selected ones.
2839 ac_site_file1=NONE
2840 ac_site_file2=NONE
2841 if test -n "$CONFIG_SITE"; then
2842 # We do not want a PATH search for config.site.
2843 case $CONFIG_SITE in #((
2844 -*) ac_site_file1=./$CONFIG_SITE;;
2845 */*) ac_site_file1=$CONFIG_SITE;;
2846 *) ac_site_file1=./$CONFIG_SITE;;
2847 esac
2848 elif test "x$prefix" != xNONE; then
2849 ac_site_file1=$prefix/share/config.site
2850 ac_site_file2=$prefix/etc/config.site
2851 else
2852 ac_site_file1=$ac_default_prefix/share/config.site
2853 ac_site_file2=$ac_default_prefix/etc/config.site
2854 fi
2855 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2856 do
2857 test "x$ac_site_file" = xNONE && continue
2858 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2860 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2861 sed 's/^/| /' "$ac_site_file" >&5
2862 . "$ac_site_file" \
2863 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2864 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2865 as_fn_error $? "failed to load site script $ac_site_file
2866 See \`config.log' for more details" "$LINENO" 5; }
2867 fi
2868 done
2869
2870 if test -r "$cache_file"; then
2871 # Some versions of bash will fail to source /dev/null (special files
2872 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2873 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2875 $as_echo "$as_me: loading cache $cache_file" >&6;}
2876 case $cache_file in
2877 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2878 *) . "./$cache_file";;
2879 esac
2880 fi
2881 else
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2883 $as_echo "$as_me: creating cache $cache_file" >&6;}
2884 >$cache_file
2885 fi
2886
2887 as_fn_append ac_header_list " stdlib.h"
2888 as_fn_append ac_header_list " unistd.h"
2889 as_fn_append ac_header_list " sys/param.h"
2890 # Check that the precious variables saved in the cache have kept the same
2891 # value.
2892 ac_cache_corrupted=false
2893 for ac_var in $ac_precious_vars; do
2894 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2895 eval ac_new_set=\$ac_env_${ac_var}_set
2896 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2897 eval ac_new_val=\$ac_env_${ac_var}_value
2898 case $ac_old_set,$ac_new_set in
2899 set,)
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2901 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2902 ac_cache_corrupted=: ;;
2903 ,set)
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2905 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2906 ac_cache_corrupted=: ;;
2907 ,);;
2908 *)
2909 if test "x$ac_old_val" != "x$ac_new_val"; then
2910 # differences in whitespace do not lead to failure.
2911 ac_old_val_w=`echo x $ac_old_val`
2912 ac_new_val_w=`echo x $ac_new_val`
2913 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2915 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2916 ac_cache_corrupted=:
2917 else
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2919 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2920 eval $ac_var=\$ac_old_val
2921 fi
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2923 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2925 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2926 fi;;
2927 esac
2928 # Pass precious variables to config.status.
2929 if test "$ac_new_set" = set; then
2930 case $ac_new_val in
2931 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2932 *) ac_arg=$ac_var=$ac_new_val ;;
2933 esac
2934 case " $ac_configure_args " in
2935 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2936 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2937 esac
2938 fi
2939 done
2940 if $ac_cache_corrupted; then
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2942 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2943 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2944 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2945 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2946 fi
2947 ## -------------------- ##
2948 ## Main body of script. ##
2949 ## -------------------- ##
2950
2951 ac_ext=c
2952 ac_cpp='$CPP $CPPFLAGS'
2953 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2954 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2955 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2956
2957
2958
2959
2960
2961 ac_config_headers="$ac_config_headers config.h:config.in"
2962
2963
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2965 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2966 # Check whether --enable-maintainer-mode was given.
2967 if test "${enable_maintainer_mode+set}" = set; then :
2968 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2969 else
2970 USE_MAINTAINER_MODE=no
2971 fi
2972
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2974 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2975 if test $USE_MAINTAINER_MODE = yes; then
2976 MAINTAINER_MODE_TRUE=
2977 MAINTAINER_MODE_FALSE='#'
2978 else
2979 MAINTAINER_MODE_TRUE='#'
2980 MAINTAINER_MODE_FALSE=
2981 fi
2982
2983 MAINT=$MAINTAINER_MODE_TRUE
2984
2985
2986
2987 # Set the 'development' global.
2988 . $srcdir/../bfd/development.sh
2989
2990 ac_ext=c
2991 ac_cpp='$CPP $CPPFLAGS'
2992 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2993 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2994 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2995 if test -n "$ac_tool_prefix"; then
2996 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2997 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2999 $as_echo_n "checking for $ac_word... " >&6; }
3000 if ${ac_cv_prog_CC+:} false; then :
3001 $as_echo_n "(cached) " >&6
3002 else
3003 if test -n "$CC"; then
3004 ac_cv_prog_CC="$CC" # Let the user override the test.
3005 else
3006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3007 for as_dir in $PATH
3008 do
3009 IFS=$as_save_IFS
3010 test -z "$as_dir" && as_dir=.
3011 for ac_exec_ext in '' $ac_executable_extensions; do
3012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3013 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3015 break 2
3016 fi
3017 done
3018 done
3019 IFS=$as_save_IFS
3020
3021 fi
3022 fi
3023 CC=$ac_cv_prog_CC
3024 if test -n "$CC"; then
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3026 $as_echo "$CC" >&6; }
3027 else
3028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3029 $as_echo "no" >&6; }
3030 fi
3031
3032
3033 fi
3034 if test -z "$ac_cv_prog_CC"; then
3035 ac_ct_CC=$CC
3036 # Extract the first word of "gcc", so it can be a program name with args.
3037 set dummy gcc; ac_word=$2
3038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3039 $as_echo_n "checking for $ac_word... " >&6; }
3040 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3041 $as_echo_n "(cached) " >&6
3042 else
3043 if test -n "$ac_ct_CC"; then
3044 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3045 else
3046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3047 for as_dir in $PATH
3048 do
3049 IFS=$as_save_IFS
3050 test -z "$as_dir" && as_dir=.
3051 for ac_exec_ext in '' $ac_executable_extensions; do
3052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3053 ac_cv_prog_ac_ct_CC="gcc"
3054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3055 break 2
3056 fi
3057 done
3058 done
3059 IFS=$as_save_IFS
3060
3061 fi
3062 fi
3063 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3064 if test -n "$ac_ct_CC"; then
3065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3066 $as_echo "$ac_ct_CC" >&6; }
3067 else
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3069 $as_echo "no" >&6; }
3070 fi
3071
3072 if test "x$ac_ct_CC" = x; then
3073 CC=""
3074 else
3075 case $cross_compiling:$ac_tool_warned in
3076 yes:)
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3078 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3079 ac_tool_warned=yes ;;
3080 esac
3081 CC=$ac_ct_CC
3082 fi
3083 else
3084 CC="$ac_cv_prog_CC"
3085 fi
3086
3087 if test -z "$CC"; then
3088 if test -n "$ac_tool_prefix"; then
3089 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3090 set dummy ${ac_tool_prefix}cc; ac_word=$2
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3092 $as_echo_n "checking for $ac_word... " >&6; }
3093 if ${ac_cv_prog_CC+:} false; then :
3094 $as_echo_n "(cached) " >&6
3095 else
3096 if test -n "$CC"; then
3097 ac_cv_prog_CC="$CC" # Let the user override the test.
3098 else
3099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3100 for as_dir in $PATH
3101 do
3102 IFS=$as_save_IFS
3103 test -z "$as_dir" && as_dir=.
3104 for ac_exec_ext in '' $ac_executable_extensions; do
3105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3106 ac_cv_prog_CC="${ac_tool_prefix}cc"
3107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3108 break 2
3109 fi
3110 done
3111 done
3112 IFS=$as_save_IFS
3113
3114 fi
3115 fi
3116 CC=$ac_cv_prog_CC
3117 if test -n "$CC"; then
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3119 $as_echo "$CC" >&6; }
3120 else
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122 $as_echo "no" >&6; }
3123 fi
3124
3125
3126 fi
3127 fi
3128 if test -z "$CC"; then
3129 # Extract the first word of "cc", so it can be a program name with args.
3130 set dummy cc; ac_word=$2
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3132 $as_echo_n "checking for $ac_word... " >&6; }
3133 if ${ac_cv_prog_CC+:} false; then :
3134 $as_echo_n "(cached) " >&6
3135 else
3136 if test -n "$CC"; then
3137 ac_cv_prog_CC="$CC" # Let the user override the test.
3138 else
3139 ac_prog_rejected=no
3140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3141 for as_dir in $PATH
3142 do
3143 IFS=$as_save_IFS
3144 test -z "$as_dir" && as_dir=.
3145 for ac_exec_ext in '' $ac_executable_extensions; do
3146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3147 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3148 ac_prog_rejected=yes
3149 continue
3150 fi
3151 ac_cv_prog_CC="cc"
3152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3153 break 2
3154 fi
3155 done
3156 done
3157 IFS=$as_save_IFS
3158
3159 if test $ac_prog_rejected = yes; then
3160 # We found a bogon in the path, so make sure we never use it.
3161 set dummy $ac_cv_prog_CC
3162 shift
3163 if test $# != 0; then
3164 # We chose a different compiler from the bogus one.
3165 # However, it has the same basename, so the bogon will be chosen
3166 # first if we set CC to just the basename; use the full file name.
3167 shift
3168 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3169 fi
3170 fi
3171 fi
3172 fi
3173 CC=$ac_cv_prog_CC
3174 if test -n "$CC"; then
3175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3176 $as_echo "$CC" >&6; }
3177 else
3178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3179 $as_echo "no" >&6; }
3180 fi
3181
3182
3183 fi
3184 if test -z "$CC"; then
3185 if test -n "$ac_tool_prefix"; then
3186 for ac_prog in cl.exe
3187 do
3188 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3189 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3191 $as_echo_n "checking for $ac_word... " >&6; }
3192 if ${ac_cv_prog_CC+:} false; then :
3193 $as_echo_n "(cached) " >&6
3194 else
3195 if test -n "$CC"; then
3196 ac_cv_prog_CC="$CC" # Let the user override the test.
3197 else
3198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3199 for as_dir in $PATH
3200 do
3201 IFS=$as_save_IFS
3202 test -z "$as_dir" && as_dir=.
3203 for ac_exec_ext in '' $ac_executable_extensions; do
3204 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3205 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3207 break 2
3208 fi
3209 done
3210 done
3211 IFS=$as_save_IFS
3212
3213 fi
3214 fi
3215 CC=$ac_cv_prog_CC
3216 if test -n "$CC"; then
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3218 $as_echo "$CC" >&6; }
3219 else
3220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3221 $as_echo "no" >&6; }
3222 fi
3223
3224
3225 test -n "$CC" && break
3226 done
3227 fi
3228 if test -z "$CC"; then
3229 ac_ct_CC=$CC
3230 for ac_prog in cl.exe
3231 do
3232 # Extract the first word of "$ac_prog", so it can be a program name with args.
3233 set dummy $ac_prog; ac_word=$2
3234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3235 $as_echo_n "checking for $ac_word... " >&6; }
3236 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3237 $as_echo_n "(cached) " >&6
3238 else
3239 if test -n "$ac_ct_CC"; then
3240 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3241 else
3242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3243 for as_dir in $PATH
3244 do
3245 IFS=$as_save_IFS
3246 test -z "$as_dir" && as_dir=.
3247 for ac_exec_ext in '' $ac_executable_extensions; do
3248 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3249 ac_cv_prog_ac_ct_CC="$ac_prog"
3250 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3251 break 2
3252 fi
3253 done
3254 done
3255 IFS=$as_save_IFS
3256
3257 fi
3258 fi
3259 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3260 if test -n "$ac_ct_CC"; then
3261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3262 $as_echo "$ac_ct_CC" >&6; }
3263 else
3264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3265 $as_echo "no" >&6; }
3266 fi
3267
3268
3269 test -n "$ac_ct_CC" && break
3270 done
3271
3272 if test "x$ac_ct_CC" = x; then
3273 CC=""
3274 else
3275 case $cross_compiling:$ac_tool_warned in
3276 yes:)
3277 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3278 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3279 ac_tool_warned=yes ;;
3280 esac
3281 CC=$ac_ct_CC
3282 fi
3283 fi
3284
3285 fi
3286
3287
3288 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3289 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3290 as_fn_error $? "no acceptable C compiler found in \$PATH
3291 See \`config.log' for more details" "$LINENO" 5; }
3292
3293 # Provide some information about the compiler.
3294 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3295 set X $ac_compile
3296 ac_compiler=$2
3297 for ac_option in --version -v -V -qversion; do
3298 { { ac_try="$ac_compiler $ac_option >&5"
3299 case "(($ac_try" in
3300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3301 *) ac_try_echo=$ac_try;;
3302 esac
3303 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3304 $as_echo "$ac_try_echo"; } >&5
3305 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3306 ac_status=$?
3307 if test -s conftest.err; then
3308 sed '10a\
3309 ... rest of stderr output deleted ...
3310 10q' conftest.err >conftest.er1
3311 cat conftest.er1 >&5
3312 fi
3313 rm -f conftest.er1 conftest.err
3314 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3315 test $ac_status = 0; }
3316 done
3317
3318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3319 /* end confdefs.h. */
3320
3321 int
3322 main ()
3323 {
3324
3325 ;
3326 return 0;
3327 }
3328 _ACEOF
3329 ac_clean_files_save=$ac_clean_files
3330 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3331 # Try to create an executable without -o first, disregard a.out.
3332 # It will help us diagnose broken compilers, and finding out an intuition
3333 # of exeext.
3334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3335 $as_echo_n "checking whether the C compiler works... " >&6; }
3336 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3337
3338 # The possible output files:
3339 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3340
3341 ac_rmfiles=
3342 for ac_file in $ac_files
3343 do
3344 case $ac_file in
3345 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3346 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3347 esac
3348 done
3349 rm -f $ac_rmfiles
3350
3351 if { { ac_try="$ac_link_default"
3352 case "(($ac_try" in
3353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3354 *) ac_try_echo=$ac_try;;
3355 esac
3356 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3357 $as_echo "$ac_try_echo"; } >&5
3358 (eval "$ac_link_default") 2>&5
3359 ac_status=$?
3360 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3361 test $ac_status = 0; }; then :
3362 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3363 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3364 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3365 # so that the user can short-circuit this test for compilers unknown to
3366 # Autoconf.
3367 for ac_file in $ac_files ''
3368 do
3369 test -f "$ac_file" || continue
3370 case $ac_file in
3371 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3372 ;;
3373 [ab].out )
3374 # We found the default executable, but exeext='' is most
3375 # certainly right.
3376 break;;
3377 *.* )
3378 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3379 then :; else
3380 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3381 fi
3382 # We set ac_cv_exeext here because the later test for it is not
3383 # safe: cross compilers may not add the suffix if given an `-o'
3384 # argument, so we may need to know it at that point already.
3385 # Even if this section looks crufty: it has the advantage of
3386 # actually working.
3387 break;;
3388 * )
3389 break;;
3390 esac
3391 done
3392 test "$ac_cv_exeext" = no && ac_cv_exeext=
3393
3394 else
3395 ac_file=''
3396 fi
3397 if test -z "$ac_file"; then :
3398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3399 $as_echo "no" >&6; }
3400 $as_echo "$as_me: failed program was:" >&5
3401 sed 's/^/| /' conftest.$ac_ext >&5
3402
3403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3404 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3405 as_fn_error 77 "C compiler cannot create executables
3406 See \`config.log' for more details" "$LINENO" 5; }
3407 else
3408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3409 $as_echo "yes" >&6; }
3410 fi
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3412 $as_echo_n "checking for C compiler default output file name... " >&6; }
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3414 $as_echo "$ac_file" >&6; }
3415 ac_exeext=$ac_cv_exeext
3416
3417 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3418 ac_clean_files=$ac_clean_files_save
3419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3420 $as_echo_n "checking for suffix of executables... " >&6; }
3421 if { { ac_try="$ac_link"
3422 case "(($ac_try" in
3423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3424 *) ac_try_echo=$ac_try;;
3425 esac
3426 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3427 $as_echo "$ac_try_echo"; } >&5
3428 (eval "$ac_link") 2>&5
3429 ac_status=$?
3430 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3431 test $ac_status = 0; }; then :
3432 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3433 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3434 # work properly (i.e., refer to `conftest.exe'), while it won't with
3435 # `rm'.
3436 for ac_file in conftest.exe conftest conftest.*; do
3437 test -f "$ac_file" || continue
3438 case $ac_file in
3439 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3440 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3441 break;;
3442 * ) break;;
3443 esac
3444 done
3445 else
3446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3447 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3448 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3449 See \`config.log' for more details" "$LINENO" 5; }
3450 fi
3451 rm -f conftest conftest$ac_cv_exeext
3452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3453 $as_echo "$ac_cv_exeext" >&6; }
3454
3455 rm -f conftest.$ac_ext
3456 EXEEXT=$ac_cv_exeext
3457 ac_exeext=$EXEEXT
3458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3459 /* end confdefs.h. */
3460 #include <stdio.h>
3461 int
3462 main ()
3463 {
3464 FILE *f = fopen ("conftest.out", "w");
3465 return ferror (f) || fclose (f) != 0;
3466
3467 ;
3468 return 0;
3469 }
3470 _ACEOF
3471 ac_clean_files="$ac_clean_files conftest.out"
3472 # Check that the compiler produces executables we can run. If not, either
3473 # the compiler is broken, or we cross compile.
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3475 $as_echo_n "checking whether we are cross compiling... " >&6; }
3476 if test "$cross_compiling" != yes; then
3477 { { ac_try="$ac_link"
3478 case "(($ac_try" in
3479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3480 *) ac_try_echo=$ac_try;;
3481 esac
3482 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3483 $as_echo "$ac_try_echo"; } >&5
3484 (eval "$ac_link") 2>&5
3485 ac_status=$?
3486 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3487 test $ac_status = 0; }
3488 if { ac_try='./conftest$ac_cv_exeext'
3489 { { case "(($ac_try" in
3490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3491 *) ac_try_echo=$ac_try;;
3492 esac
3493 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3494 $as_echo "$ac_try_echo"; } >&5
3495 (eval "$ac_try") 2>&5
3496 ac_status=$?
3497 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3498 test $ac_status = 0; }; }; then
3499 cross_compiling=no
3500 else
3501 if test "$cross_compiling" = maybe; then
3502 cross_compiling=yes
3503 else
3504 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3505 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3506 as_fn_error $? "cannot run C compiled programs.
3507 If you meant to cross compile, use \`--host'.
3508 See \`config.log' for more details" "$LINENO" 5; }
3509 fi
3510 fi
3511 fi
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3513 $as_echo "$cross_compiling" >&6; }
3514
3515 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3516 ac_clean_files=$ac_clean_files_save
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3518 $as_echo_n "checking for suffix of object files... " >&6; }
3519 if ${ac_cv_objext+:} false; then :
3520 $as_echo_n "(cached) " >&6
3521 else
3522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3523 /* end confdefs.h. */
3524
3525 int
3526 main ()
3527 {
3528
3529 ;
3530 return 0;
3531 }
3532 _ACEOF
3533 rm -f conftest.o conftest.obj
3534 if { { ac_try="$ac_compile"
3535 case "(($ac_try" in
3536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3537 *) ac_try_echo=$ac_try;;
3538 esac
3539 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3540 $as_echo "$ac_try_echo"; } >&5
3541 (eval "$ac_compile") 2>&5
3542 ac_status=$?
3543 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3544 test $ac_status = 0; }; then :
3545 for ac_file in conftest.o conftest.obj conftest.*; do
3546 test -f "$ac_file" || continue;
3547 case $ac_file in
3548 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3549 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3550 break;;
3551 esac
3552 done
3553 else
3554 $as_echo "$as_me: failed program was:" >&5
3555 sed 's/^/| /' conftest.$ac_ext >&5
3556
3557 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3558 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3559 as_fn_error $? "cannot compute suffix of object files: cannot compile
3560 See \`config.log' for more details" "$LINENO" 5; }
3561 fi
3562 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3563 fi
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3565 $as_echo "$ac_cv_objext" >&6; }
3566 OBJEXT=$ac_cv_objext
3567 ac_objext=$OBJEXT
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3569 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3570 if ${ac_cv_c_compiler_gnu+:} false; then :
3571 $as_echo_n "(cached) " >&6
3572 else
3573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3574 /* end confdefs.h. */
3575
3576 int
3577 main ()
3578 {
3579 #ifndef __GNUC__
3580 choke me
3581 #endif
3582
3583 ;
3584 return 0;
3585 }
3586 _ACEOF
3587 if ac_fn_c_try_compile "$LINENO"; then :
3588 ac_compiler_gnu=yes
3589 else
3590 ac_compiler_gnu=no
3591 fi
3592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3593 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3594
3595 fi
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3597 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3598 if test $ac_compiler_gnu = yes; then
3599 GCC=yes
3600 else
3601 GCC=
3602 fi
3603 ac_test_CFLAGS=${CFLAGS+set}
3604 ac_save_CFLAGS=$CFLAGS
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3606 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3607 if ${ac_cv_prog_cc_g+:} false; then :
3608 $as_echo_n "(cached) " >&6
3609 else
3610 ac_save_c_werror_flag=$ac_c_werror_flag
3611 ac_c_werror_flag=yes
3612 ac_cv_prog_cc_g=no
3613 CFLAGS="-g"
3614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3615 /* end confdefs.h. */
3616
3617 int
3618 main ()
3619 {
3620
3621 ;
3622 return 0;
3623 }
3624 _ACEOF
3625 if ac_fn_c_try_compile "$LINENO"; then :
3626 ac_cv_prog_cc_g=yes
3627 else
3628 CFLAGS=""
3629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3630 /* end confdefs.h. */
3631
3632 int
3633 main ()
3634 {
3635
3636 ;
3637 return 0;
3638 }
3639 _ACEOF
3640 if ac_fn_c_try_compile "$LINENO"; then :
3641
3642 else
3643 ac_c_werror_flag=$ac_save_c_werror_flag
3644 CFLAGS="-g"
3645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3646 /* end confdefs.h. */
3647
3648 int
3649 main ()
3650 {
3651
3652 ;
3653 return 0;
3654 }
3655 _ACEOF
3656 if ac_fn_c_try_compile "$LINENO"; then :
3657 ac_cv_prog_cc_g=yes
3658 fi
3659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3660 fi
3661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3662 fi
3663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3664 ac_c_werror_flag=$ac_save_c_werror_flag
3665 fi
3666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3667 $as_echo "$ac_cv_prog_cc_g" >&6; }
3668 if test "$ac_test_CFLAGS" = set; then
3669 CFLAGS=$ac_save_CFLAGS
3670 elif test $ac_cv_prog_cc_g = yes; then
3671 if test "$GCC" = yes; then
3672 CFLAGS="-g -O2"
3673 else
3674 CFLAGS="-g"
3675 fi
3676 else
3677 if test "$GCC" = yes; then
3678 CFLAGS="-O2"
3679 else
3680 CFLAGS=
3681 fi
3682 fi
3683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3684 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3685 if ${ac_cv_prog_cc_c89+:} false; then :
3686 $as_echo_n "(cached) " >&6
3687 else
3688 ac_cv_prog_cc_c89=no
3689 ac_save_CC=$CC
3690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3691 /* end confdefs.h. */
3692 #include <stdarg.h>
3693 #include <stdio.h>
3694 struct stat;
3695 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3696 struct buf { int x; };
3697 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3698 static char *e (p, i)
3699 char **p;
3700 int i;
3701 {
3702 return p[i];
3703 }
3704 static char *f (char * (*g) (char **, int), char **p, ...)
3705 {
3706 char *s;
3707 va_list v;
3708 va_start (v,p);
3709 s = g (p, va_arg (v,int));
3710 va_end (v);
3711 return s;
3712 }
3713
3714 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3715 function prototypes and stuff, but not '\xHH' hex character constants.
3716 These don't provoke an error unfortunately, instead are silently treated
3717 as 'x'. The following induces an error, until -std is added to get
3718 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3719 array size at least. It's necessary to write '\x00'==0 to get something
3720 that's true only with -std. */
3721 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3722
3723 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3724 inside strings and character constants. */
3725 #define FOO(x) 'x'
3726 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3727
3728 int test (int i, double x);
3729 struct s1 {int (*f) (int a);};
3730 struct s2 {int (*f) (double a);};
3731 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3732 int argc;
3733 char **argv;
3734 int
3735 main ()
3736 {
3737 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3738 ;
3739 return 0;
3740 }
3741 _ACEOF
3742 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3743 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3744 do
3745 CC="$ac_save_CC $ac_arg"
3746 if ac_fn_c_try_compile "$LINENO"; then :
3747 ac_cv_prog_cc_c89=$ac_arg
3748 fi
3749 rm -f core conftest.err conftest.$ac_objext
3750 test "x$ac_cv_prog_cc_c89" != "xno" && break
3751 done
3752 rm -f conftest.$ac_ext
3753 CC=$ac_save_CC
3754
3755 fi
3756 # AC_CACHE_VAL
3757 case "x$ac_cv_prog_cc_c89" in
3758 x)
3759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3760 $as_echo "none needed" >&6; } ;;
3761 xno)
3762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3763 $as_echo "unsupported" >&6; } ;;
3764 *)
3765 CC="$CC $ac_cv_prog_cc_c89"
3766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3767 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3768 esac
3769 if test "x$ac_cv_prog_cc_c89" != xno; then :
3770
3771 fi
3772
3773 ac_ext=c
3774 ac_cpp='$CPP $CPPFLAGS'
3775 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3776 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3777 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3778
3779 ac_ext=cpp
3780 ac_cpp='$CXXCPP $CPPFLAGS'
3781 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3782 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3783 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3784 if test -z "$CXX"; then
3785 if test -n "$CCC"; then
3786 CXX=$CCC
3787 else
3788 if test -n "$ac_tool_prefix"; then
3789 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3790 do
3791 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3792 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3794 $as_echo_n "checking for $ac_word... " >&6; }
3795 if ${ac_cv_prog_CXX+:} false; then :
3796 $as_echo_n "(cached) " >&6
3797 else
3798 if test -n "$CXX"; then
3799 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3800 else
3801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802 for as_dir in $PATH
3803 do
3804 IFS=$as_save_IFS
3805 test -z "$as_dir" && as_dir=.
3806 for ac_exec_ext in '' $ac_executable_extensions; do
3807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3808 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3810 break 2
3811 fi
3812 done
3813 done
3814 IFS=$as_save_IFS
3815
3816 fi
3817 fi
3818 CXX=$ac_cv_prog_CXX
3819 if test -n "$CXX"; then
3820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3821 $as_echo "$CXX" >&6; }
3822 else
3823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3824 $as_echo "no" >&6; }
3825 fi
3826
3827
3828 test -n "$CXX" && break
3829 done
3830 fi
3831 if test -z "$CXX"; then
3832 ac_ct_CXX=$CXX
3833 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3834 do
3835 # Extract the first word of "$ac_prog", so it can be a program name with args.
3836 set dummy $ac_prog; ac_word=$2
3837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3838 $as_echo_n "checking for $ac_word... " >&6; }
3839 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3840 $as_echo_n "(cached) " >&6
3841 else
3842 if test -n "$ac_ct_CXX"; then
3843 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3844 else
3845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3846 for as_dir in $PATH
3847 do
3848 IFS=$as_save_IFS
3849 test -z "$as_dir" && as_dir=.
3850 for ac_exec_ext in '' $ac_executable_extensions; do
3851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3852 ac_cv_prog_ac_ct_CXX="$ac_prog"
3853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3854 break 2
3855 fi
3856 done
3857 done
3858 IFS=$as_save_IFS
3859
3860 fi
3861 fi
3862 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3863 if test -n "$ac_ct_CXX"; then
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3865 $as_echo "$ac_ct_CXX" >&6; }
3866 else
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3868 $as_echo "no" >&6; }
3869 fi
3870
3871
3872 test -n "$ac_ct_CXX" && break
3873 done
3874
3875 if test "x$ac_ct_CXX" = x; then
3876 CXX="g++"
3877 else
3878 case $cross_compiling:$ac_tool_warned in
3879 yes:)
3880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3881 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3882 ac_tool_warned=yes ;;
3883 esac
3884 CXX=$ac_ct_CXX
3885 fi
3886 fi
3887
3888 fi
3889 fi
3890 # Provide some information about the compiler.
3891 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3892 set X $ac_compile
3893 ac_compiler=$2
3894 for ac_option in --version -v -V -qversion; do
3895 { { ac_try="$ac_compiler $ac_option >&5"
3896 case "(($ac_try" in
3897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3898 *) ac_try_echo=$ac_try;;
3899 esac
3900 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3901 $as_echo "$ac_try_echo"; } >&5
3902 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3903 ac_status=$?
3904 if test -s conftest.err; then
3905 sed '10a\
3906 ... rest of stderr output deleted ...
3907 10q' conftest.err >conftest.er1
3908 cat conftest.er1 >&5
3909 fi
3910 rm -f conftest.er1 conftest.err
3911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3912 test $ac_status = 0; }
3913 done
3914
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3916 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3917 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3918 $as_echo_n "(cached) " >&6
3919 else
3920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3921 /* end confdefs.h. */
3922
3923 int
3924 main ()
3925 {
3926 #ifndef __GNUC__
3927 choke me
3928 #endif
3929
3930 ;
3931 return 0;
3932 }
3933 _ACEOF
3934 if ac_fn_cxx_try_compile "$LINENO"; then :
3935 ac_compiler_gnu=yes
3936 else
3937 ac_compiler_gnu=no
3938 fi
3939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3940 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3941
3942 fi
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3944 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3945 if test $ac_compiler_gnu = yes; then
3946 GXX=yes
3947 else
3948 GXX=
3949 fi
3950 ac_test_CXXFLAGS=${CXXFLAGS+set}
3951 ac_save_CXXFLAGS=$CXXFLAGS
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3953 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3954 if ${ac_cv_prog_cxx_g+:} false; then :
3955 $as_echo_n "(cached) " >&6
3956 else
3957 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3958 ac_cxx_werror_flag=yes
3959 ac_cv_prog_cxx_g=no
3960 CXXFLAGS="-g"
3961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3962 /* end confdefs.h. */
3963
3964 int
3965 main ()
3966 {
3967
3968 ;
3969 return 0;
3970 }
3971 _ACEOF
3972 if ac_fn_cxx_try_compile "$LINENO"; then :
3973 ac_cv_prog_cxx_g=yes
3974 else
3975 CXXFLAGS=""
3976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3977 /* end confdefs.h. */
3978
3979 int
3980 main ()
3981 {
3982
3983 ;
3984 return 0;
3985 }
3986 _ACEOF
3987 if ac_fn_cxx_try_compile "$LINENO"; then :
3988
3989 else
3990 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3991 CXXFLAGS="-g"
3992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3993 /* end confdefs.h. */
3994
3995 int
3996 main ()
3997 {
3998
3999 ;
4000 return 0;
4001 }
4002 _ACEOF
4003 if ac_fn_cxx_try_compile "$LINENO"; then :
4004 ac_cv_prog_cxx_g=yes
4005 fi
4006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4007 fi
4008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4009 fi
4010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4011 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4012 fi
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4014 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4015 if test "$ac_test_CXXFLAGS" = set; then
4016 CXXFLAGS=$ac_save_CXXFLAGS
4017 elif test $ac_cv_prog_cxx_g = yes; then
4018 if test "$GXX" = yes; then
4019 CXXFLAGS="-g -O2"
4020 else
4021 CXXFLAGS="-g"
4022 fi
4023 else
4024 if test "$GXX" = yes; then
4025 CXXFLAGS="-O2"
4026 else
4027 CXXFLAGS=
4028 fi
4029 fi
4030 ac_ext=c
4031 ac_cpp='$CPP $CPPFLAGS'
4032 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4033 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4034 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4035
4036
4037
4038 ac_ext=c
4039 ac_cpp='$CPP $CPPFLAGS'
4040 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4041 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4042 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4044 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4045 # On Suns, sometimes $CPP names a directory.
4046 if test -n "$CPP" && test -d "$CPP"; then
4047 CPP=
4048 fi
4049 if test -z "$CPP"; then
4050 if ${ac_cv_prog_CPP+:} false; then :
4051 $as_echo_n "(cached) " >&6
4052 else
4053 # Double quotes because CPP needs to be expanded
4054 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4055 do
4056 ac_preproc_ok=false
4057 for ac_c_preproc_warn_flag in '' yes
4058 do
4059 # Use a header file that comes with gcc, so configuring glibc
4060 # with a fresh cross-compiler works.
4061 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4062 # <limits.h> exists even on freestanding compilers.
4063 # On the NeXT, cc -E runs the code through the compiler's parser,
4064 # not just through cpp. "Syntax error" is here to catch this case.
4065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4066 /* end confdefs.h. */
4067 #ifdef __STDC__
4068 # include <limits.h>
4069 #else
4070 # include <assert.h>
4071 #endif
4072 Syntax error
4073 _ACEOF
4074 if ac_fn_c_try_cpp "$LINENO"; then :
4075
4076 else
4077 # Broken: fails on valid input.
4078 continue
4079 fi
4080 rm -f conftest.err conftest.i conftest.$ac_ext
4081
4082 # OK, works on sane cases. Now check whether nonexistent headers
4083 # can be detected and how.
4084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4085 /* end confdefs.h. */
4086 #include <ac_nonexistent.h>
4087 _ACEOF
4088 if ac_fn_c_try_cpp "$LINENO"; then :
4089 # Broken: success on invalid input.
4090 continue
4091 else
4092 # Passes both tests.
4093 ac_preproc_ok=:
4094 break
4095 fi
4096 rm -f conftest.err conftest.i conftest.$ac_ext
4097
4098 done
4099 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4100 rm -f conftest.i conftest.err conftest.$ac_ext
4101 if $ac_preproc_ok; then :
4102 break
4103 fi
4104
4105 done
4106 ac_cv_prog_CPP=$CPP
4107
4108 fi
4109 CPP=$ac_cv_prog_CPP
4110 else
4111 ac_cv_prog_CPP=$CPP
4112 fi
4113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4114 $as_echo "$CPP" >&6; }
4115 ac_preproc_ok=false
4116 for ac_c_preproc_warn_flag in '' yes
4117 do
4118 # Use a header file that comes with gcc, so configuring glibc
4119 # with a fresh cross-compiler works.
4120 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4121 # <limits.h> exists even on freestanding compilers.
4122 # On the NeXT, cc -E runs the code through the compiler's parser,
4123 # not just through cpp. "Syntax error" is here to catch this case.
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4125 /* end confdefs.h. */
4126 #ifdef __STDC__
4127 # include <limits.h>
4128 #else
4129 # include <assert.h>
4130 #endif
4131 Syntax error
4132 _ACEOF
4133 if ac_fn_c_try_cpp "$LINENO"; then :
4134
4135 else
4136 # Broken: fails on valid input.
4137 continue
4138 fi
4139 rm -f conftest.err conftest.i conftest.$ac_ext
4140
4141 # OK, works on sane cases. Now check whether nonexistent headers
4142 # can be detected and how.
4143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4144 /* end confdefs.h. */
4145 #include <ac_nonexistent.h>
4146 _ACEOF
4147 if ac_fn_c_try_cpp "$LINENO"; then :
4148 # Broken: success on invalid input.
4149 continue
4150 else
4151 # Passes both tests.
4152 ac_preproc_ok=:
4153 break
4154 fi
4155 rm -f conftest.err conftest.i conftest.$ac_ext
4156
4157 done
4158 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4159 rm -f conftest.i conftest.err conftest.$ac_ext
4160 if $ac_preproc_ok; then :
4161
4162 else
4163 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4164 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4165 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4166 See \`config.log' for more details" "$LINENO" 5; }
4167 fi
4168
4169 ac_ext=c
4170 ac_cpp='$CPP $CPPFLAGS'
4171 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4172 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4173 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4174
4175
4176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4177 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4178 if ${ac_cv_path_GREP+:} false; then :
4179 $as_echo_n "(cached) " >&6
4180 else
4181 if test -z "$GREP"; then
4182 ac_path_GREP_found=false
4183 # Loop through the user's path and test for each of PROGNAME-LIST
4184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4185 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4186 do
4187 IFS=$as_save_IFS
4188 test -z "$as_dir" && as_dir=.
4189 for ac_prog in grep ggrep; do
4190 for ac_exec_ext in '' $ac_executable_extensions; do
4191 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4192 as_fn_executable_p "$ac_path_GREP" || continue
4193 # Check for GNU ac_path_GREP and select it if it is found.
4194 # Check for GNU $ac_path_GREP
4195 case `"$ac_path_GREP" --version 2>&1` in
4196 *GNU*)
4197 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4198 *)
4199 ac_count=0
4200 $as_echo_n 0123456789 >"conftest.in"
4201 while :
4202 do
4203 cat "conftest.in" "conftest.in" >"conftest.tmp"
4204 mv "conftest.tmp" "conftest.in"
4205 cp "conftest.in" "conftest.nl"
4206 $as_echo 'GREP' >> "conftest.nl"
4207 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4208 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4209 as_fn_arith $ac_count + 1 && ac_count=$as_val
4210 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4211 # Best one so far, save it but keep looking for a better one
4212 ac_cv_path_GREP="$ac_path_GREP"
4213 ac_path_GREP_max=$ac_count
4214 fi
4215 # 10*(2^10) chars as input seems more than enough
4216 test $ac_count -gt 10 && break
4217 done
4218 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4219 esac
4220
4221 $ac_path_GREP_found && break 3
4222 done
4223 done
4224 done
4225 IFS=$as_save_IFS
4226 if test -z "$ac_cv_path_GREP"; then
4227 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4228 fi
4229 else
4230 ac_cv_path_GREP=$GREP
4231 fi
4232
4233 fi
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4235 $as_echo "$ac_cv_path_GREP" >&6; }
4236 GREP="$ac_cv_path_GREP"
4237
4238
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4240 $as_echo_n "checking for egrep... " >&6; }
4241 if ${ac_cv_path_EGREP+:} false; then :
4242 $as_echo_n "(cached) " >&6
4243 else
4244 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4245 then ac_cv_path_EGREP="$GREP -E"
4246 else
4247 if test -z "$EGREP"; then
4248 ac_path_EGREP_found=false
4249 # Loop through the user's path and test for each of PROGNAME-LIST
4250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4251 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4252 do
4253 IFS=$as_save_IFS
4254 test -z "$as_dir" && as_dir=.
4255 for ac_prog in egrep; do
4256 for ac_exec_ext in '' $ac_executable_extensions; do
4257 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4258 as_fn_executable_p "$ac_path_EGREP" || continue
4259 # Check for GNU ac_path_EGREP and select it if it is found.
4260 # Check for GNU $ac_path_EGREP
4261 case `"$ac_path_EGREP" --version 2>&1` in
4262 *GNU*)
4263 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4264 *)
4265 ac_count=0
4266 $as_echo_n 0123456789 >"conftest.in"
4267 while :
4268 do
4269 cat "conftest.in" "conftest.in" >"conftest.tmp"
4270 mv "conftest.tmp" "conftest.in"
4271 cp "conftest.in" "conftest.nl"
4272 $as_echo 'EGREP' >> "conftest.nl"
4273 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4274 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4275 as_fn_arith $ac_count + 1 && ac_count=$as_val
4276 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4277 # Best one so far, save it but keep looking for a better one
4278 ac_cv_path_EGREP="$ac_path_EGREP"
4279 ac_path_EGREP_max=$ac_count
4280 fi
4281 # 10*(2^10) chars as input seems more than enough
4282 test $ac_count -gt 10 && break
4283 done
4284 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4285 esac
4286
4287 $ac_path_EGREP_found && break 3
4288 done
4289 done
4290 done
4291 IFS=$as_save_IFS
4292 if test -z "$ac_cv_path_EGREP"; then
4293 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4294 fi
4295 else
4296 ac_cv_path_EGREP=$EGREP
4297 fi
4298
4299 fi
4300 fi
4301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4302 $as_echo "$ac_cv_path_EGREP" >&6; }
4303 EGREP="$ac_cv_path_EGREP"
4304
4305
4306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4307 $as_echo_n "checking for ANSI C header files... " >&6; }
4308 if ${ac_cv_header_stdc+:} false; then :
4309 $as_echo_n "(cached) " >&6
4310 else
4311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4312 /* end confdefs.h. */
4313 #include <stdlib.h>
4314 #include <stdarg.h>
4315 #include <string.h>
4316 #include <float.h>
4317
4318 int
4319 main ()
4320 {
4321
4322 ;
4323 return 0;
4324 }
4325 _ACEOF
4326 if ac_fn_c_try_compile "$LINENO"; then :
4327 ac_cv_header_stdc=yes
4328 else
4329 ac_cv_header_stdc=no
4330 fi
4331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4332
4333 if test $ac_cv_header_stdc = yes; then
4334 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4336 /* end confdefs.h. */
4337 #include <string.h>
4338
4339 _ACEOF
4340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4341 $EGREP "memchr" >/dev/null 2>&1; then :
4342
4343 else
4344 ac_cv_header_stdc=no
4345 fi
4346 rm -f conftest*
4347
4348 fi
4349
4350 if test $ac_cv_header_stdc = yes; then
4351 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4353 /* end confdefs.h. */
4354 #include <stdlib.h>
4355
4356 _ACEOF
4357 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4358 $EGREP "free" >/dev/null 2>&1; then :
4359
4360 else
4361 ac_cv_header_stdc=no
4362 fi
4363 rm -f conftest*
4364
4365 fi
4366
4367 if test $ac_cv_header_stdc = yes; then
4368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4369 if test "$cross_compiling" = yes; then :
4370 :
4371 else
4372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4373 /* end confdefs.h. */
4374 #include <ctype.h>
4375 #include <stdlib.h>
4376 #if ((' ' & 0x0FF) == 0x020)
4377 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4378 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4379 #else
4380 # define ISLOWER(c) \
4381 (('a' <= (c) && (c) <= 'i') \
4382 || ('j' <= (c) && (c) <= 'r') \
4383 || ('s' <= (c) && (c) <= 'z'))
4384 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4385 #endif
4386
4387 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4388 int
4389 main ()
4390 {
4391 int i;
4392 for (i = 0; i < 256; i++)
4393 if (XOR (islower (i), ISLOWER (i))
4394 || toupper (i) != TOUPPER (i))
4395 return 2;
4396 return 0;
4397 }
4398 _ACEOF
4399 if ac_fn_c_try_run "$LINENO"; then :
4400
4401 else
4402 ac_cv_header_stdc=no
4403 fi
4404 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4405 conftest.$ac_objext conftest.beam conftest.$ac_ext
4406 fi
4407
4408 fi
4409 fi
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4411 $as_echo "$ac_cv_header_stdc" >&6; }
4412 if test $ac_cv_header_stdc = yes; then
4413
4414 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4415
4416 fi
4417
4418 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4419 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4420 inttypes.h stdint.h unistd.h
4421 do :
4422 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4423 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4424 "
4425 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4426 cat >>confdefs.h <<_ACEOF
4427 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4428 _ACEOF
4429
4430 fi
4431
4432 done
4433
4434
4435
4436 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4437 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4438 MINIX=yes
4439 else
4440 MINIX=
4441 fi
4442
4443
4444 if test "$MINIX" = yes; then
4445
4446 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4447
4448
4449 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4450
4451
4452 $as_echo "#define _MINIX 1" >>confdefs.h
4453
4454 fi
4455
4456
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4458 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4459 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4460 $as_echo_n "(cached) " >&6
4461 else
4462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463 /* end confdefs.h. */
4464
4465 # define __EXTENSIONS__ 1
4466 $ac_includes_default
4467 int
4468 main ()
4469 {
4470
4471 ;
4472 return 0;
4473 }
4474 _ACEOF
4475 if ac_fn_c_try_compile "$LINENO"; then :
4476 ac_cv_safe_to_define___extensions__=yes
4477 else
4478 ac_cv_safe_to_define___extensions__=no
4479 fi
4480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4481 fi
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4483 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4484 test $ac_cv_safe_to_define___extensions__ = yes &&
4485 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4486
4487 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4488
4489 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4490
4491 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4492
4493 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4494
4495
4496 ac_aux_dir=
4497 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4498 if test -f "$ac_dir/install-sh"; then
4499 ac_aux_dir=$ac_dir
4500 ac_install_sh="$ac_aux_dir/install-sh -c"
4501 break
4502 elif test -f "$ac_dir/install.sh"; then
4503 ac_aux_dir=$ac_dir
4504 ac_install_sh="$ac_aux_dir/install.sh -c"
4505 break
4506 elif test -f "$ac_dir/shtool"; then
4507 ac_aux_dir=$ac_dir
4508 ac_install_sh="$ac_aux_dir/shtool install -c"
4509 break
4510 fi
4511 done
4512 if test -z "$ac_aux_dir"; then
4513 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4514 fi
4515
4516 # These three variables are undocumented and unsupported,
4517 # and are intended to be withdrawn in a future Autoconf release.
4518 # They can cause serious problems if a builder's source tree is in a directory
4519 # whose full name contains unusual characters.
4520 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4521 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4522 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4523
4524
4525 # Make sure we can run config.sub.
4526 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4527 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4528
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4530 $as_echo_n "checking build system type... " >&6; }
4531 if ${ac_cv_build+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533 else
4534 ac_build_alias=$build_alias
4535 test "x$ac_build_alias" = x &&
4536 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4537 test "x$ac_build_alias" = x &&
4538 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4539 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4540 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4541
4542 fi
4543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4544 $as_echo "$ac_cv_build" >&6; }
4545 case $ac_cv_build in
4546 *-*-*) ;;
4547 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4548 esac
4549 build=$ac_cv_build
4550 ac_save_IFS=$IFS; IFS='-'
4551 set x $ac_cv_build
4552 shift
4553 build_cpu=$1
4554 build_vendor=$2
4555 shift; shift
4556 # Remember, the first character of IFS is used to create $*,
4557 # except with old shells:
4558 build_os=$*
4559 IFS=$ac_save_IFS
4560 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4561
4562
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4564 $as_echo_n "checking host system type... " >&6; }
4565 if ${ac_cv_host+:} false; then :
4566 $as_echo_n "(cached) " >&6
4567 else
4568 if test "x$host_alias" = x; then
4569 ac_cv_host=$ac_cv_build
4570 else
4571 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4572 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4573 fi
4574
4575 fi
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4577 $as_echo "$ac_cv_host" >&6; }
4578 case $ac_cv_host in
4579 *-*-*) ;;
4580 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4581 esac
4582 host=$ac_cv_host
4583 ac_save_IFS=$IFS; IFS='-'
4584 set x $ac_cv_host
4585 shift
4586 host_cpu=$1
4587 host_vendor=$2
4588 shift; shift
4589 # Remember, the first character of IFS is used to create $*,
4590 # except with old shells:
4591 host_os=$*
4592 IFS=$ac_save_IFS
4593 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4594
4595
4596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4597 $as_echo_n "checking target system type... " >&6; }
4598 if ${ac_cv_target+:} false; then :
4599 $as_echo_n "(cached) " >&6
4600 else
4601 if test "x$target_alias" = x; then
4602 ac_cv_target=$ac_cv_host
4603 else
4604 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4605 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4606 fi
4607
4608 fi
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4610 $as_echo "$ac_cv_target" >&6; }
4611 case $ac_cv_target in
4612 *-*-*) ;;
4613 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4614 esac
4615 target=$ac_cv_target
4616 ac_save_IFS=$IFS; IFS='-'
4617 set x $ac_cv_target
4618 shift
4619 target_cpu=$1
4620 target_vendor=$2
4621 shift; shift
4622 # Remember, the first character of IFS is used to create $*,
4623 # except with old shells:
4624 target_os=$*
4625 IFS=$ac_save_IFS
4626 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4627
4628
4629 # The aliases save the names the user supplied, while $host etc.
4630 # will get canonicalized.
4631 test -n "$target_alias" &&
4632 test "$program_prefix$program_suffix$program_transform_name" = \
4633 NONENONEs,x,x, &&
4634 program_prefix=${target_alias}-
4635
4636 # The tests for host and target for $enable_largefile require
4637 # canonical names.
4638
4639
4640
4641 # As the $enable_largefile decision depends on --enable-plugins we must set it
4642 # even in directories otherwise not depending on the $plugins option.
4643
4644
4645 maybe_plugins=no
4646 for ac_header in dlfcn.h
4647 do :
4648 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4649 "
4650 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4651 cat >>confdefs.h <<_ACEOF
4652 #define HAVE_DLFCN_H 1
4653 _ACEOF
4654 maybe_plugins=yes
4655 fi
4656
4657 done
4658
4659 for ac_header in windows.h
4660 do :
4661 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4662 "
4663 if test "x$ac_cv_header_windows_h" = xyes; then :
4664 cat >>confdefs.h <<_ACEOF
4665 #define HAVE_WINDOWS_H 1
4666 _ACEOF
4667 maybe_plugins=yes
4668 fi
4669
4670 done
4671
4672
4673 # Check whether --enable-plugins was given.
4674 if test "${enable_plugins+set}" = set; then :
4675 enableval=$enable_plugins; case "${enableval}" in
4676 no) plugins=no ;;
4677 *) plugins=yes
4678 if test "$maybe_plugins" != "yes" ; then
4679 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4680 fi ;;
4681 esac
4682 else
4683 plugins=$maybe_plugins
4684
4685 fi
4686
4687 if test "$plugins" = "yes"; then
4688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4689 $as_echo_n "checking for library containing dlsym... " >&6; }
4690 if ${ac_cv_search_dlsym+:} false; then :
4691 $as_echo_n "(cached) " >&6
4692 else
4693 ac_func_search_save_LIBS=$LIBS
4694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4695 /* end confdefs.h. */
4696
4697 /* Override any GCC internal prototype to avoid an error.
4698 Use char because int might match the return type of a GCC
4699 builtin and then its argument prototype would still apply. */
4700 #ifdef __cplusplus
4701 extern "C"
4702 #endif
4703 char dlsym ();
4704 int
4705 main ()
4706 {
4707 return dlsym ();
4708 ;
4709 return 0;
4710 }
4711 _ACEOF
4712 for ac_lib in '' dl; do
4713 if test -z "$ac_lib"; then
4714 ac_res="none required"
4715 else
4716 ac_res=-l$ac_lib
4717 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4718 fi
4719 if ac_fn_c_try_link "$LINENO"; then :
4720 ac_cv_search_dlsym=$ac_res
4721 fi
4722 rm -f core conftest.err conftest.$ac_objext \
4723 conftest$ac_exeext
4724 if ${ac_cv_search_dlsym+:} false; then :
4725 break
4726 fi
4727 done
4728 if ${ac_cv_search_dlsym+:} false; then :
4729
4730 else
4731 ac_cv_search_dlsym=no
4732 fi
4733 rm conftest.$ac_ext
4734 LIBS=$ac_func_search_save_LIBS
4735 fi
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4737 $as_echo "$ac_cv_search_dlsym" >&6; }
4738 ac_res=$ac_cv_search_dlsym
4739 if test "$ac_res" != no; then :
4740 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4741
4742 fi
4743
4744 fi
4745
4746
4747 case "${host}" in
4748 sparc-*-solaris*|i[3-7]86-*-solaris*)
4749 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4750 # are mutually exclusive; and without procfs support, the bfd/ elf module
4751 # cannot provide certain routines such as elfcore_write_prpsinfo
4752 # or elfcore_write_prstatus. So unless the user explicitly requested
4753 # large-file support through the --enable-largefile switch, disable
4754 # large-file support in favor of procfs support.
4755 test "${target}" = "${host}" -a "x$plugins" = xno \
4756 && : ${enable_largefile="no"}
4757 ;;
4758 esac
4759
4760 # Check whether --enable-largefile was given.
4761 if test "${enable_largefile+set}" = set; then :
4762 enableval=$enable_largefile;
4763 fi
4764
4765 if test "$enable_largefile" != no; then
4766
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4768 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4769 if ${ac_cv_sys_largefile_CC+:} false; then :
4770 $as_echo_n "(cached) " >&6
4771 else
4772 ac_cv_sys_largefile_CC=no
4773 if test "$GCC" != yes; then
4774 ac_save_CC=$CC
4775 while :; do
4776 # IRIX 6.2 and later do not support large files by default,
4777 # so use the C compiler's -n32 option if that helps.
4778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4779 /* end confdefs.h. */
4780 #include <sys/types.h>
4781 /* Check that off_t can represent 2**63 - 1 correctly.
4782 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4783 since some C++ compilers masquerading as C compilers
4784 incorrectly reject 9223372036854775807. */
4785 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4786 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4787 && LARGE_OFF_T % 2147483647 == 1)
4788 ? 1 : -1];
4789 int
4790 main ()
4791 {
4792
4793 ;
4794 return 0;
4795 }
4796 _ACEOF
4797 if ac_fn_c_try_compile "$LINENO"; then :
4798 break
4799 fi
4800 rm -f core conftest.err conftest.$ac_objext
4801 CC="$CC -n32"
4802 if ac_fn_c_try_compile "$LINENO"; then :
4803 ac_cv_sys_largefile_CC=' -n32'; break
4804 fi
4805 rm -f core conftest.err conftest.$ac_objext
4806 break
4807 done
4808 CC=$ac_save_CC
4809 rm -f conftest.$ac_ext
4810 fi
4811 fi
4812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4813 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4814 if test "$ac_cv_sys_largefile_CC" != no; then
4815 CC=$CC$ac_cv_sys_largefile_CC
4816 fi
4817
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4819 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4820 if ${ac_cv_sys_file_offset_bits+:} false; then :
4821 $as_echo_n "(cached) " >&6
4822 else
4823 while :; do
4824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4825 /* end confdefs.h. */
4826 #include <sys/types.h>
4827 /* Check that off_t can represent 2**63 - 1 correctly.
4828 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4829 since some C++ compilers masquerading as C compilers
4830 incorrectly reject 9223372036854775807. */
4831 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4832 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4833 && LARGE_OFF_T % 2147483647 == 1)
4834 ? 1 : -1];
4835 int
4836 main ()
4837 {
4838
4839 ;
4840 return 0;
4841 }
4842 _ACEOF
4843 if ac_fn_c_try_compile "$LINENO"; then :
4844 ac_cv_sys_file_offset_bits=no; break
4845 fi
4846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4848 /* end confdefs.h. */
4849 #define _FILE_OFFSET_BITS 64
4850 #include <sys/types.h>
4851 /* Check that off_t can represent 2**63 - 1 correctly.
4852 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4853 since some C++ compilers masquerading as C compilers
4854 incorrectly reject 9223372036854775807. */
4855 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4856 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4857 && LARGE_OFF_T % 2147483647 == 1)
4858 ? 1 : -1];
4859 int
4860 main ()
4861 {
4862
4863 ;
4864 return 0;
4865 }
4866 _ACEOF
4867 if ac_fn_c_try_compile "$LINENO"; then :
4868 ac_cv_sys_file_offset_bits=64; break
4869 fi
4870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871 ac_cv_sys_file_offset_bits=unknown
4872 break
4873 done
4874 fi
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4876 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4877 case $ac_cv_sys_file_offset_bits in #(
4878 no | unknown) ;;
4879 *)
4880 cat >>confdefs.h <<_ACEOF
4881 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4882 _ACEOF
4883 ;;
4884 esac
4885 rm -rf conftest*
4886 if test $ac_cv_sys_file_offset_bits = unknown; then
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4888 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4889 if ${ac_cv_sys_large_files+:} false; then :
4890 $as_echo_n "(cached) " >&6
4891 else
4892 while :; do
4893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4894 /* end confdefs.h. */
4895 #include <sys/types.h>
4896 /* Check that off_t can represent 2**63 - 1 correctly.
4897 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4898 since some C++ compilers masquerading as C compilers
4899 incorrectly reject 9223372036854775807. */
4900 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4901 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4902 && LARGE_OFF_T % 2147483647 == 1)
4903 ? 1 : -1];
4904 int
4905 main ()
4906 {
4907
4908 ;
4909 return 0;
4910 }
4911 _ACEOF
4912 if ac_fn_c_try_compile "$LINENO"; then :
4913 ac_cv_sys_large_files=no; break
4914 fi
4915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4917 /* end confdefs.h. */
4918 #define _LARGE_FILES 1
4919 #include <sys/types.h>
4920 /* Check that off_t can represent 2**63 - 1 correctly.
4921 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4922 since some C++ compilers masquerading as C compilers
4923 incorrectly reject 9223372036854775807. */
4924 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4925 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4926 && LARGE_OFF_T % 2147483647 == 1)
4927 ? 1 : -1];
4928 int
4929 main ()
4930 {
4931
4932 ;
4933 return 0;
4934 }
4935 _ACEOF
4936 if ac_fn_c_try_compile "$LINENO"; then :
4937 ac_cv_sys_large_files=1; break
4938 fi
4939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4940 ac_cv_sys_large_files=unknown
4941 break
4942 done
4943 fi
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4945 $as_echo "$ac_cv_sys_large_files" >&6; }
4946 case $ac_cv_sys_large_files in #(
4947 no | unknown) ;;
4948 *)
4949 cat >>confdefs.h <<_ACEOF
4950 #define _LARGE_FILES $ac_cv_sys_large_files
4951 _ACEOF
4952 ;;
4953 esac
4954 rm -rf conftest*
4955 fi
4956
4957
4958 fi
4959
4960
4961
4962
4963
4964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4965 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4966 if ${am_cv_prog_cc_stdc+:} false; then :
4967 $as_echo_n "(cached) " >&6
4968 else
4969 am_cv_prog_cc_stdc=no
4970 ac_save_CC="$CC"
4971 # Don't try gcc -ansi; that turns off useful extensions and
4972 # breaks some systems' header files.
4973 # AIX -qlanglvl=ansi
4974 # Ultrix and OSF/1 -std1
4975 # HP-UX 10.20 and later -Ae
4976 # HP-UX older versions -Aa -D_HPUX_SOURCE
4977 # SVR4 -Xc -D__EXTENSIONS__
4978 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4979 do
4980 CC="$ac_save_CC $ac_arg"
4981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4982 /* end confdefs.h. */
4983 #include <stdarg.h>
4984 #include <stdio.h>
4985 #include <sys/types.h>
4986 #include <sys/stat.h>
4987 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4988 struct buf { int x; };
4989 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4990 static char *e (p, i)
4991 char **p;
4992 int i;
4993 {
4994 return p[i];
4995 }
4996 static char *f (char * (*g) (char **, int), char **p, ...)
4997 {
4998 char *s;
4999 va_list v;
5000 va_start (v,p);
5001 s = g (p, va_arg (v,int));
5002 va_end (v);
5003 return s;
5004 }
5005 int test (int i, double x);
5006 struct s1 {int (*f) (int a);};
5007 struct s2 {int (*f) (double a);};
5008 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5009 int argc;
5010 char **argv;
5011
5012 int
5013 main ()
5014 {
5015
5016 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5017
5018 ;
5019 return 0;
5020 }
5021 _ACEOF
5022 if ac_fn_c_try_compile "$LINENO"; then :
5023 am_cv_prog_cc_stdc="$ac_arg"; break
5024 fi
5025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5026 done
5027 CC="$ac_save_CC"
5028
5029 fi
5030
5031 if test -z "$am_cv_prog_cc_stdc"; then
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5033 $as_echo "none needed" >&6; }
5034 else
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5036 $as_echo "$am_cv_prog_cc_stdc" >&6; }
5037 fi
5038 case "x$am_cv_prog_cc_stdc" in
5039 x|xno) ;;
5040 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5041 esac
5042
5043 # Expand $ac_aux_dir to an absolute path.
5044 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5045
5046 if test x"${install_sh+set}" != xset; then
5047 case $am_aux_dir in
5048 *\ * | *\ *)
5049 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5050 *)
5051 install_sh="\${SHELL} $am_aux_dir/install-sh"
5052 esac
5053 fi
5054
5055 # Installed binaries are usually stripped using 'strip' when the user
5056 # run "make install-strip". However 'strip' might not be the right
5057 # tool to use in cross-compilation environments, therefore Automake
5058 # will honor the 'STRIP' environment variable to overrule this program.
5059 if test "$cross_compiling" != no; then
5060 if test -n "$ac_tool_prefix"; then
5061 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5062 set dummy ${ac_tool_prefix}strip; ac_word=$2
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5064 $as_echo_n "checking for $ac_word... " >&6; }
5065 if ${ac_cv_prog_STRIP+:} false; then :
5066 $as_echo_n "(cached) " >&6
5067 else
5068 if test -n "$STRIP"; then
5069 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5070 else
5071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072 for as_dir in $PATH
5073 do
5074 IFS=$as_save_IFS
5075 test -z "$as_dir" && as_dir=.
5076 for ac_exec_ext in '' $ac_executable_extensions; do
5077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5078 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5080 break 2
5081 fi
5082 done
5083 done
5084 IFS=$as_save_IFS
5085
5086 fi
5087 fi
5088 STRIP=$ac_cv_prog_STRIP
5089 if test -n "$STRIP"; then
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5091 $as_echo "$STRIP" >&6; }
5092 else
5093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094 $as_echo "no" >&6; }
5095 fi
5096
5097
5098 fi
5099 if test -z "$ac_cv_prog_STRIP"; then
5100 ac_ct_STRIP=$STRIP
5101 # Extract the first word of "strip", so it can be a program name with args.
5102 set dummy strip; ac_word=$2
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104 $as_echo_n "checking for $ac_word... " >&6; }
5105 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5106 $as_echo_n "(cached) " >&6
5107 else
5108 if test -n "$ac_ct_STRIP"; then
5109 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5110 else
5111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5112 for as_dir in $PATH
5113 do
5114 IFS=$as_save_IFS
5115 test -z "$as_dir" && as_dir=.
5116 for ac_exec_ext in '' $ac_executable_extensions; do
5117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5118 ac_cv_prog_ac_ct_STRIP="strip"
5119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5120 break 2
5121 fi
5122 done
5123 done
5124 IFS=$as_save_IFS
5125
5126 fi
5127 fi
5128 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5129 if test -n "$ac_ct_STRIP"; then
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5131 $as_echo "$ac_ct_STRIP" >&6; }
5132 else
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134 $as_echo "no" >&6; }
5135 fi
5136
5137 if test "x$ac_ct_STRIP" = x; then
5138 STRIP=":"
5139 else
5140 case $cross_compiling:$ac_tool_warned in
5141 yes:)
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5143 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5144 ac_tool_warned=yes ;;
5145 esac
5146 STRIP=$ac_ct_STRIP
5147 fi
5148 else
5149 STRIP="$ac_cv_prog_STRIP"
5150 fi
5151
5152 fi
5153 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5154
5155
5156 ac_aux_dir=
5157 for ac_dir in .. "$srcdir"/..; do
5158 if test -f "$ac_dir/install-sh"; then
5159 ac_aux_dir=$ac_dir
5160 ac_install_sh="$ac_aux_dir/install-sh -c"
5161 break
5162 elif test -f "$ac_dir/install.sh"; then
5163 ac_aux_dir=$ac_dir
5164 ac_install_sh="$ac_aux_dir/install.sh -c"
5165 break
5166 elif test -f "$ac_dir/shtool"; then
5167 ac_aux_dir=$ac_dir
5168 ac_install_sh="$ac_aux_dir/shtool install -c"
5169 break
5170 fi
5171 done
5172 if test -z "$ac_aux_dir"; then
5173 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5174 fi
5175
5176 # These three variables are undocumented and unsupported,
5177 # and are intended to be withdrawn in a future Autoconf release.
5178 # They can cause serious problems if a builder's source tree is in a directory
5179 # whose full name contains unusual characters.
5180 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5181 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5182 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5183
5184
5185
5186 test "$program_prefix" != NONE &&
5187 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5188 # Use a double $ so make ignores it.
5189 test "$program_suffix" != NONE &&
5190 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5191 # Double any \ or $.
5192 # By default was `s,x,x', remove it if useless.
5193 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5194 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5195
5196
5197 # We require a C++11 compiler. Check if one is available, and if
5198 # necessary, set CXX_DIALECT to some -std=xxx switch.
5199
5200 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5201 ac_ext=cpp
5202 ac_cpp='$CXXCPP $CPPFLAGS'
5203 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5204 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5205 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5206 CXX_DIALECT=""
5207 ac_success=no
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5209 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5210 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5211 $as_echo_n "(cached) " >&6
5212 else
5213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5214 /* end confdefs.h. */
5215
5216
5217 // If the compiler admits that it is not ready for C++11, why torture it?
5218 // Hopefully, this will speed up the test.
5219
5220 #ifndef __cplusplus
5221
5222 #error "This is not a C++ compiler"
5223
5224 #elif __cplusplus < 201103L
5225
5226 #error "This is not a C++11 compiler"
5227
5228 #else
5229
5230 namespace cxx11
5231 {
5232
5233 namespace test_static_assert
5234 {
5235
5236 template <typename T>
5237 struct check
5238 {
5239 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5240 };
5241
5242 }
5243
5244 namespace test_final_override
5245 {
5246
5247 struct Base
5248 {
5249 virtual void f() {}
5250 };
5251
5252 struct Derived : public Base
5253 {
5254 virtual void f() override {}
5255 };
5256
5257 }
5258
5259 namespace test_double_right_angle_brackets
5260 {
5261
5262 template < typename T >
5263 struct check {};
5264
5265 typedef check<void> single_type;
5266 typedef check<check<void>> double_type;
5267 typedef check<check<check<void>>> triple_type;
5268 typedef check<check<check<check<void>>>> quadruple_type;
5269
5270 }
5271
5272 namespace test_decltype
5273 {
5274
5275 int
5276 f()
5277 {
5278 int a = 1;
5279 decltype(a) b = 2;
5280 return a + b;
5281 }
5282
5283 }
5284
5285 namespace test_type_deduction
5286 {
5287
5288 template < typename T1, typename T2 >
5289 struct is_same
5290 {
5291 static const bool value = false;
5292 };
5293
5294 template < typename T >
5295 struct is_same<T, T>
5296 {
5297 static const bool value = true;
5298 };
5299
5300 template < typename T1, typename T2 >
5301 auto
5302 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5303 {
5304 return a1 + a2;
5305 }
5306
5307 int
5308 test(const int c, volatile int v)
5309 {
5310 static_assert(is_same<int, decltype(0)>::value == true, "");
5311 static_assert(is_same<int, decltype(c)>::value == false, "");
5312 static_assert(is_same<int, decltype(v)>::value == false, "");
5313 auto ac = c;
5314 auto av = v;
5315 auto sumi = ac + av + 'x';
5316 auto sumf = ac + av + 1.0;
5317 static_assert(is_same<int, decltype(ac)>::value == true, "");
5318 static_assert(is_same<int, decltype(av)>::value == true, "");
5319 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5320 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5321 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5322 return (sumf > 0.0) ? sumi : add(c, v);
5323 }
5324
5325 }
5326
5327 namespace test_noexcept
5328 {
5329
5330 int f() { return 0; }
5331 int g() noexcept { return 0; }
5332
5333 static_assert(noexcept(f()) == false, "");
5334 static_assert(noexcept(g()) == true, "");
5335
5336 }
5337
5338 namespace test_constexpr
5339 {
5340
5341 template < typename CharT >
5342 unsigned long constexpr
5343 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5344 {
5345 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5346 }
5347
5348 template < typename CharT >
5349 unsigned long constexpr
5350 strlen_c(const CharT *const s) noexcept
5351 {
5352 return strlen_c_r(s, 0UL);
5353 }
5354
5355 static_assert(strlen_c("") == 0UL, "");
5356 static_assert(strlen_c("1") == 1UL, "");
5357 static_assert(strlen_c("example") == 7UL, "");
5358 static_assert(strlen_c("another\0example") == 7UL, "");
5359
5360 }
5361
5362 namespace test_rvalue_references
5363 {
5364
5365 template < int N >
5366 struct answer
5367 {
5368 static constexpr int value = N;
5369 };
5370
5371 answer<1> f(int&) { return answer<1>(); }
5372 answer<2> f(const int&) { return answer<2>(); }
5373 answer<3> f(int&&) { return answer<3>(); }
5374
5375 void
5376 test()
5377 {
5378 int i = 0;
5379 const int c = 0;
5380 static_assert(decltype(f(i))::value == 1, "");
5381 static_assert(decltype(f(c))::value == 2, "");
5382 static_assert(decltype(f(0))::value == 3, "");
5383 }
5384
5385 }
5386
5387 namespace test_uniform_initialization
5388 {
5389
5390 struct test
5391 {
5392 static const int zero {};
5393 static const int one {1};
5394 };
5395
5396 static_assert(test::zero == 0, "");
5397 static_assert(test::one == 1, "");
5398
5399 }
5400
5401 namespace test_lambdas
5402 {
5403
5404 void
5405 test1()
5406 {
5407 auto lambda1 = [](){};
5408 auto lambda2 = lambda1;
5409 lambda1();
5410 lambda2();
5411 }
5412
5413 int
5414 test2()
5415 {
5416 auto a = [](int i, int j){ return i + j; }(1, 2);
5417 auto b = []() -> int { return '0'; }();
5418 auto c = [=](){ return a + b; }();
5419 auto d = [&](){ return c; }();
5420 auto e = [a, &b](int x) mutable {
5421 const auto identity = [](int y){ return y; };
5422 for (auto i = 0; i < a; ++i)
5423 a += b--;
5424 return x + identity(a + b);
5425 }(0);
5426 return a + b + c + d + e;
5427 }
5428
5429 int
5430 test3()
5431 {
5432 const auto nullary = [](){ return 0; };
5433 const auto unary = [](int x){ return x; };
5434 using nullary_t = decltype(nullary);
5435 using unary_t = decltype(unary);
5436 const auto higher1st = [](nullary_t f){ return f(); };
5437 const auto higher2nd = [unary](nullary_t f1){
5438 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5439 };
5440 return higher1st(nullary) + higher2nd(nullary)(unary);
5441 }
5442
5443 }
5444
5445 namespace test_variadic_templates
5446 {
5447
5448 template <int...>
5449 struct sum;
5450
5451 template <int N0, int... N1toN>
5452 struct sum<N0, N1toN...>
5453 {
5454 static constexpr auto value = N0 + sum<N1toN...>::value;
5455 };
5456
5457 template <>
5458 struct sum<>
5459 {
5460 static constexpr auto value = 0;
5461 };
5462
5463 static_assert(sum<>::value == 0, "");
5464 static_assert(sum<1>::value == 1, "");
5465 static_assert(sum<23>::value == 23, "");
5466 static_assert(sum<1, 2>::value == 3, "");
5467 static_assert(sum<5, 5, 11>::value == 21, "");
5468 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5469
5470 }
5471
5472 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5473 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5474 // because of this.
5475 namespace test_template_alias_sfinae
5476 {
5477
5478 struct foo {};
5479
5480 template<typename T>
5481 using member = typename T::member_type;
5482
5483 template<typename T>
5484 void func(...) {}
5485
5486 template<typename T>
5487 void func(member<T>*) {}
5488
5489 void test();
5490
5491 void test() { func<foo>(0); }
5492
5493 }
5494
5495 } // namespace cxx11
5496
5497 #endif // __cplusplus >= 201103L
5498
5499
5500
5501 _ACEOF
5502 if ac_fn_cxx_try_compile "$LINENO"; then :
5503 ax_cv_cxx_compile_cxx11=yes
5504 else
5505 ax_cv_cxx_compile_cxx11=no
5506 fi
5507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5508 fi
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5510 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5511 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5512 ac_success=yes
5513 fi
5514
5515 if test x$ac_success = xno; then
5516 for alternative in ${ax_cxx_compile_alternatives}; do
5517 switch="-std=gnu++${alternative}"
5518 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5520 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5521 if eval \${$cachevar+:} false; then :
5522 $as_echo_n "(cached) " >&6
5523 else
5524 ac_save_CXX="$CXX"
5525 CXX="$CXX $switch"
5526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5527 /* end confdefs.h. */
5528
5529
5530 // If the compiler admits that it is not ready for C++11, why torture it?
5531 // Hopefully, this will speed up the test.
5532
5533 #ifndef __cplusplus
5534
5535 #error "This is not a C++ compiler"
5536
5537 #elif __cplusplus < 201103L
5538
5539 #error "This is not a C++11 compiler"
5540
5541 #else
5542
5543 namespace cxx11
5544 {
5545
5546 namespace test_static_assert
5547 {
5548
5549 template <typename T>
5550 struct check
5551 {
5552 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5553 };
5554
5555 }
5556
5557 namespace test_final_override
5558 {
5559
5560 struct Base
5561 {
5562 virtual void f() {}
5563 };
5564
5565 struct Derived : public Base
5566 {
5567 virtual void f() override {}
5568 };
5569
5570 }
5571
5572 namespace test_double_right_angle_brackets
5573 {
5574
5575 template < typename T >
5576 struct check {};
5577
5578 typedef check<void> single_type;
5579 typedef check<check<void>> double_type;
5580 typedef check<check<check<void>>> triple_type;
5581 typedef check<check<check<check<void>>>> quadruple_type;
5582
5583 }
5584
5585 namespace test_decltype
5586 {
5587
5588 int
5589 f()
5590 {
5591 int a = 1;
5592 decltype(a) b = 2;
5593 return a + b;
5594 }
5595
5596 }
5597
5598 namespace test_type_deduction
5599 {
5600
5601 template < typename T1, typename T2 >
5602 struct is_same
5603 {
5604 static const bool value = false;
5605 };
5606
5607 template < typename T >
5608 struct is_same<T, T>
5609 {
5610 static const bool value = true;
5611 };
5612
5613 template < typename T1, typename T2 >
5614 auto
5615 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5616 {
5617 return a1 + a2;
5618 }
5619
5620 int
5621 test(const int c, volatile int v)
5622 {
5623 static_assert(is_same<int, decltype(0)>::value == true, "");
5624 static_assert(is_same<int, decltype(c)>::value == false, "");
5625 static_assert(is_same<int, decltype(v)>::value == false, "");
5626 auto ac = c;
5627 auto av = v;
5628 auto sumi = ac + av + 'x';
5629 auto sumf = ac + av + 1.0;
5630 static_assert(is_same<int, decltype(ac)>::value == true, "");
5631 static_assert(is_same<int, decltype(av)>::value == true, "");
5632 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5633 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5634 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5635 return (sumf > 0.0) ? sumi : add(c, v);
5636 }
5637
5638 }
5639
5640 namespace test_noexcept
5641 {
5642
5643 int f() { return 0; }
5644 int g() noexcept { return 0; }
5645
5646 static_assert(noexcept(f()) == false, "");
5647 static_assert(noexcept(g()) == true, "");
5648
5649 }
5650
5651 namespace test_constexpr
5652 {
5653
5654 template < typename CharT >
5655 unsigned long constexpr
5656 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5657 {
5658 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5659 }
5660
5661 template < typename CharT >
5662 unsigned long constexpr
5663 strlen_c(const CharT *const s) noexcept
5664 {
5665 return strlen_c_r(s, 0UL);
5666 }
5667
5668 static_assert(strlen_c("") == 0UL, "");
5669 static_assert(strlen_c("1") == 1UL, "");
5670 static_assert(strlen_c("example") == 7UL, "");
5671 static_assert(strlen_c("another\0example") == 7UL, "");
5672
5673 }
5674
5675 namespace test_rvalue_references
5676 {
5677
5678 template < int N >
5679 struct answer
5680 {
5681 static constexpr int value = N;
5682 };
5683
5684 answer<1> f(int&) { return answer<1>(); }
5685 answer<2> f(const int&) { return answer<2>(); }
5686 answer<3> f(int&&) { return answer<3>(); }
5687
5688 void
5689 test()
5690 {
5691 int i = 0;
5692 const int c = 0;
5693 static_assert(decltype(f(i))::value == 1, "");
5694 static_assert(decltype(f(c))::value == 2, "");
5695 static_assert(decltype(f(0))::value == 3, "");
5696 }
5697
5698 }
5699
5700 namespace test_uniform_initialization
5701 {
5702
5703 struct test
5704 {
5705 static const int zero {};
5706 static const int one {1};
5707 };
5708
5709 static_assert(test::zero == 0, "");
5710 static_assert(test::one == 1, "");
5711
5712 }
5713
5714 namespace test_lambdas
5715 {
5716
5717 void
5718 test1()
5719 {
5720 auto lambda1 = [](){};
5721 auto lambda2 = lambda1;
5722 lambda1();
5723 lambda2();
5724 }
5725
5726 int
5727 test2()
5728 {
5729 auto a = [](int i, int j){ return i + j; }(1, 2);
5730 auto b = []() -> int { return '0'; }();
5731 auto c = [=](){ return a + b; }();
5732 auto d = [&](){ return c; }();
5733 auto e = [a, &b](int x) mutable {
5734 const auto identity = [](int y){ return y; };
5735 for (auto i = 0; i < a; ++i)
5736 a += b--;
5737 return x + identity(a + b);
5738 }(0);
5739 return a + b + c + d + e;
5740 }
5741
5742 int
5743 test3()
5744 {
5745 const auto nullary = [](){ return 0; };
5746 const auto unary = [](int x){ return x; };
5747 using nullary_t = decltype(nullary);
5748 using unary_t = decltype(unary);
5749 const auto higher1st = [](nullary_t f){ return f(); };
5750 const auto higher2nd = [unary](nullary_t f1){
5751 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5752 };
5753 return higher1st(nullary) + higher2nd(nullary)(unary);
5754 }
5755
5756 }
5757
5758 namespace test_variadic_templates
5759 {
5760
5761 template <int...>
5762 struct sum;
5763
5764 template <int N0, int... N1toN>
5765 struct sum<N0, N1toN...>
5766 {
5767 static constexpr auto value = N0 + sum<N1toN...>::value;
5768 };
5769
5770 template <>
5771 struct sum<>
5772 {
5773 static constexpr auto value = 0;
5774 };
5775
5776 static_assert(sum<>::value == 0, "");
5777 static_assert(sum<1>::value == 1, "");
5778 static_assert(sum<23>::value == 23, "");
5779 static_assert(sum<1, 2>::value == 3, "");
5780 static_assert(sum<5, 5, 11>::value == 21, "");
5781 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5782
5783 }
5784
5785 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5786 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5787 // because of this.
5788 namespace test_template_alias_sfinae
5789 {
5790
5791 struct foo {};
5792
5793 template<typename T>
5794 using member = typename T::member_type;
5795
5796 template<typename T>
5797 void func(...) {}
5798
5799 template<typename T>
5800 void func(member<T>*) {}
5801
5802 void test();
5803
5804 void test() { func<foo>(0); }
5805
5806 }
5807
5808 } // namespace cxx11
5809
5810 #endif // __cplusplus >= 201103L
5811
5812
5813
5814 _ACEOF
5815 if ac_fn_cxx_try_compile "$LINENO"; then :
5816 eval $cachevar=yes
5817 else
5818 eval $cachevar=no
5819 fi
5820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5821 CXX="$ac_save_CXX"
5822 fi
5823 eval ac_res=\$$cachevar
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5825 $as_echo "$ac_res" >&6; }
5826 if eval test x\$$cachevar = xyes; then
5827 CXX_DIALECT="$switch"
5828 ac_success=yes
5829 break
5830 fi
5831 done
5832 fi
5833
5834 if test x$ac_success = xno; then
5835 for alternative in ${ax_cxx_compile_alternatives}; do
5836 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5837 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5839 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5840 if eval \${$cachevar+:} false; then :
5841 $as_echo_n "(cached) " >&6
5842 else
5843 ac_save_CXX="$CXX"
5844 CXX="$CXX $switch"
5845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5846 /* end confdefs.h. */
5847
5848
5849 // If the compiler admits that it is not ready for C++11, why torture it?
5850 // Hopefully, this will speed up the test.
5851
5852 #ifndef __cplusplus
5853
5854 #error "This is not a C++ compiler"
5855
5856 #elif __cplusplus < 201103L
5857
5858 #error "This is not a C++11 compiler"
5859
5860 #else
5861
5862 namespace cxx11
5863 {
5864
5865 namespace test_static_assert
5866 {
5867
5868 template <typename T>
5869 struct check
5870 {
5871 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5872 };
5873
5874 }
5875
5876 namespace test_final_override
5877 {
5878
5879 struct Base
5880 {
5881 virtual void f() {}
5882 };
5883
5884 struct Derived : public Base
5885 {
5886 virtual void f() override {}
5887 };
5888
5889 }
5890
5891 namespace test_double_right_angle_brackets
5892 {
5893
5894 template < typename T >
5895 struct check {};
5896
5897 typedef check<void> single_type;
5898 typedef check<check<void>> double_type;
5899 typedef check<check<check<void>>> triple_type;
5900 typedef check<check<check<check<void>>>> quadruple_type;
5901
5902 }
5903
5904 namespace test_decltype
5905 {
5906
5907 int
5908 f()
5909 {
5910 int a = 1;
5911 decltype(a) b = 2;
5912 return a + b;
5913 }
5914
5915 }
5916
5917 namespace test_type_deduction
5918 {
5919
5920 template < typename T1, typename T2 >
5921 struct is_same
5922 {
5923 static const bool value = false;
5924 };
5925
5926 template < typename T >
5927 struct is_same<T, T>
5928 {
5929 static const bool value = true;
5930 };
5931
5932 template < typename T1, typename T2 >
5933 auto
5934 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5935 {
5936 return a1 + a2;
5937 }
5938
5939 int
5940 test(const int c, volatile int v)
5941 {
5942 static_assert(is_same<int, decltype(0)>::value == true, "");
5943 static_assert(is_same<int, decltype(c)>::value == false, "");
5944 static_assert(is_same<int, decltype(v)>::value == false, "");
5945 auto ac = c;
5946 auto av = v;
5947 auto sumi = ac + av + 'x';
5948 auto sumf = ac + av + 1.0;
5949 static_assert(is_same<int, decltype(ac)>::value == true, "");
5950 static_assert(is_same<int, decltype(av)>::value == true, "");
5951 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5952 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5953 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5954 return (sumf > 0.0) ? sumi : add(c, v);
5955 }
5956
5957 }
5958
5959 namespace test_noexcept
5960 {
5961
5962 int f() { return 0; }
5963 int g() noexcept { return 0; }
5964
5965 static_assert(noexcept(f()) == false, "");
5966 static_assert(noexcept(g()) == true, "");
5967
5968 }
5969
5970 namespace test_constexpr
5971 {
5972
5973 template < typename CharT >
5974 unsigned long constexpr
5975 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5976 {
5977 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5978 }
5979
5980 template < typename CharT >
5981 unsigned long constexpr
5982 strlen_c(const CharT *const s) noexcept
5983 {
5984 return strlen_c_r(s, 0UL);
5985 }
5986
5987 static_assert(strlen_c("") == 0UL, "");
5988 static_assert(strlen_c("1") == 1UL, "");
5989 static_assert(strlen_c("example") == 7UL, "");
5990 static_assert(strlen_c("another\0example") == 7UL, "");
5991
5992 }
5993
5994 namespace test_rvalue_references
5995 {
5996
5997 template < int N >
5998 struct answer
5999 {
6000 static constexpr int value = N;
6001 };
6002
6003 answer<1> f(int&) { return answer<1>(); }
6004 answer<2> f(const int&) { return answer<2>(); }
6005 answer<3> f(int&&) { return answer<3>(); }
6006
6007 void
6008 test()
6009 {
6010 int i = 0;
6011 const int c = 0;
6012 static_assert(decltype(f(i))::value == 1, "");
6013 static_assert(decltype(f(c))::value == 2, "");
6014 static_assert(decltype(f(0))::value == 3, "");
6015 }
6016
6017 }
6018
6019 namespace test_uniform_initialization
6020 {
6021
6022 struct test
6023 {
6024 static const int zero {};
6025 static const int one {1};
6026 };
6027
6028 static_assert(test::zero == 0, "");
6029 static_assert(test::one == 1, "");
6030
6031 }
6032
6033 namespace test_lambdas
6034 {
6035
6036 void
6037 test1()
6038 {
6039 auto lambda1 = [](){};
6040 auto lambda2 = lambda1;
6041 lambda1();
6042 lambda2();
6043 }
6044
6045 int
6046 test2()
6047 {
6048 auto a = [](int i, int j){ return i + j; }(1, 2);
6049 auto b = []() -> int { return '0'; }();
6050 auto c = [=](){ return a + b; }();
6051 auto d = [&](){ return c; }();
6052 auto e = [a, &b](int x) mutable {
6053 const auto identity = [](int y){ return y; };
6054 for (auto i = 0; i < a; ++i)
6055 a += b--;
6056 return x + identity(a + b);
6057 }(0);
6058 return a + b + c + d + e;
6059 }
6060
6061 int
6062 test3()
6063 {
6064 const auto nullary = [](){ return 0; };
6065 const auto unary = [](int x){ return x; };
6066 using nullary_t = decltype(nullary);
6067 using unary_t = decltype(unary);
6068 const auto higher1st = [](nullary_t f){ return f(); };
6069 const auto higher2nd = [unary](nullary_t f1){
6070 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6071 };
6072 return higher1st(nullary) + higher2nd(nullary)(unary);
6073 }
6074
6075 }
6076
6077 namespace test_variadic_templates
6078 {
6079
6080 template <int...>
6081 struct sum;
6082
6083 template <int N0, int... N1toN>
6084 struct sum<N0, N1toN...>
6085 {
6086 static constexpr auto value = N0 + sum<N1toN...>::value;
6087 };
6088
6089 template <>
6090 struct sum<>
6091 {
6092 static constexpr auto value = 0;
6093 };
6094
6095 static_assert(sum<>::value == 0, "");
6096 static_assert(sum<1>::value == 1, "");
6097 static_assert(sum<23>::value == 23, "");
6098 static_assert(sum<1, 2>::value == 3, "");
6099 static_assert(sum<5, 5, 11>::value == 21, "");
6100 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6101
6102 }
6103
6104 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6105 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6106 // because of this.
6107 namespace test_template_alias_sfinae
6108 {
6109
6110 struct foo {};
6111
6112 template<typename T>
6113 using member = typename T::member_type;
6114
6115 template<typename T>
6116 void func(...) {}
6117
6118 template<typename T>
6119 void func(member<T>*) {}
6120
6121 void test();
6122
6123 void test() { func<foo>(0); }
6124
6125 }
6126
6127 } // namespace cxx11
6128
6129 #endif // __cplusplus >= 201103L
6130
6131
6132
6133 _ACEOF
6134 if ac_fn_cxx_try_compile "$LINENO"; then :
6135 eval $cachevar=yes
6136 else
6137 eval $cachevar=no
6138 fi
6139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6140 CXX="$ac_save_CXX"
6141 fi
6142 eval ac_res=\$$cachevar
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6144 $as_echo "$ac_res" >&6; }
6145 if eval test x\$$cachevar = xyes; then
6146 CXX_DIALECT="$switch"
6147 ac_success=yes
6148 break
6149 fi
6150 done
6151 if test x$ac_success = xyes; then
6152 break
6153 fi
6154 done
6155 fi
6156 ac_ext=c
6157 ac_cpp='$CPP $CPPFLAGS'
6158 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6159 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6160 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6161
6162 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6163 if test x$ac_success = xno; then
6164 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6165 fi
6166 fi
6167 if test x$ac_success = xno; then
6168 HAVE_CXX11=0
6169 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6170 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6171 else
6172 HAVE_CXX11=1
6173
6174 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6175
6176 fi
6177
6178
6179
6180
6181 # Dependency checking.
6182 rm -rf .tst 2>/dev/null
6183 mkdir .tst 2>/dev/null
6184 if test -d .tst; then
6185 am__leading_dot=.
6186 else
6187 am__leading_dot=_
6188 fi
6189 rmdir .tst 2>/dev/null
6190
6191 DEPDIR="${am__leading_dot}deps"
6192
6193 ac_config_commands="$ac_config_commands depdir"
6194
6195
6196 depcc="$CC" am_compiler_list=
6197
6198 am_depcomp=$ac_aux_dir/depcomp
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6200 $as_echo_n "checking dependency style of $depcc... " >&6; }
6201 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6202 $as_echo_n "(cached) " >&6
6203 else
6204 if test -f "$am_depcomp"; then
6205 # We make a subdir and do the tests there. Otherwise we can end up
6206 # making bogus files that we don't know about and never remove. For
6207 # instance it was reported that on HP-UX the gcc test will end up
6208 # making a dummy file named `D' -- because `-MD' means `put the output
6209 # in D'.
6210 mkdir conftest.dir
6211 # Copy depcomp to subdir because otherwise we won't find it if we're
6212 # using a relative directory.
6213 cp "$am_depcomp" conftest.dir
6214 cd conftest.dir
6215 # We will build objects and dependencies in a subdirectory because
6216 # it helps to detect inapplicable dependency modes. For instance
6217 # both Tru64's cc and ICC support -MD to output dependencies as a
6218 # side effect of compilation, but ICC will put the dependencies in
6219 # the current directory while Tru64 will put them in the object
6220 # directory.
6221 mkdir sub
6222
6223 am_cv_CC_dependencies_compiler_type=none
6224 if test "$am_compiler_list" = ""; then
6225 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6226 fi
6227 for depmode in $am_compiler_list; do
6228 if test $depmode = none; then break; fi
6229
6230 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6231 # Setup a source with many dependencies, because some compilers
6232 # like to wrap large dependency lists on column 80 (with \), and
6233 # we should not choose a depcomp mode which is confused by this.
6234 #
6235 # We need to recreate these files for each test, as the compiler may
6236 # overwrite some of them when testing with obscure command lines.
6237 # This happens at least with the AIX C compiler.
6238 : > sub/conftest.c
6239 for i in 1 2 3 4 5 6; do
6240 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6241 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6242 # Solaris 8's {/usr,}/bin/sh.
6243 touch sub/conftst$i.h
6244 done
6245 echo "include sub/conftest.Po" > confmf
6246
6247 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6248 # mode. It turns out that the SunPro C++ compiler does not properly
6249 # handle `-M -o', and we need to detect this.
6250 depcmd="depmode=$depmode \
6251 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6252 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6253 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6254 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6255 if env $depcmd > conftest.err 2>&1 &&
6256 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6257 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6258 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6259 # icc doesn't choke on unknown options, it will just issue warnings
6260 # or remarks (even with -Werror). So we grep stderr for any message
6261 # that says an option was ignored or not supported.
6262 # When given -MP, icc 7.0 and 7.1 complain thusly:
6263 # icc: Command line warning: ignoring option '-M'; no argument required
6264 # The diagnosis changed in icc 8.0:
6265 # icc: Command line remark: option '-MP' not supported
6266 if (grep 'ignoring option' conftest.err ||
6267 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6268 am_cv_CC_dependencies_compiler_type=$depmode
6269 $as_echo "$as_me:$LINENO: success" >&5
6270 break
6271 fi
6272 fi
6273 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6274 sed -e 's/^/| /' < conftest.err >&5
6275 done
6276
6277 cd ..
6278 rm -rf conftest.dir
6279 else
6280 am_cv_CC_dependencies_compiler_type=none
6281 fi
6282
6283 fi
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6285 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6286 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6287 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6288 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6289
6290 fi
6291
6292
6293
6294 CONFIG_OBS=
6295 CONFIG_DEPS=
6296 CONFIG_SRCS=
6297 ENABLE_CFLAGS=
6298
6299 CONFIG_ALL=
6300 CONFIG_CLEAN=
6301 CONFIG_INSTALL=
6302 CONFIG_UNINSTALL=
6303
6304 # If we haven't got the data from the intl directory,
6305 # assume NLS is disabled.
6306 USE_NLS=no
6307 LIBINTL=
6308 LIBINTL_DEP=
6309 INCINTL=
6310 XGETTEXT=
6311 GMSGFMT=
6312 POSUB=
6313
6314 if test -f ../intl/config.intl; then
6315 . ../intl/config.intl
6316 fi
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6318 $as_echo_n "checking whether NLS is requested... " >&6; }
6319 if test x"$USE_NLS" != xyes; then
6320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321 $as_echo "no" >&6; }
6322 else
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6324 $as_echo "yes" >&6; }
6325
6326 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6327
6328
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6330 $as_echo_n "checking for catalogs to be installed... " >&6; }
6331 # Look for .po and .gmo files in the source directory.
6332 CATALOGS=
6333 XLINGUAS=
6334 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6335 # If there aren't any .gmo files the shell will give us the
6336 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6337 # weeded out.
6338 case "$cat" in *\**)
6339 continue;;
6340 esac
6341 # The quadruple backslash is collapsed to a double backslash
6342 # by the backticks, then collapsed again by the double quotes,
6343 # leaving us with one backslash in the sed expression (right
6344 # before the dot that mustn't act as a wildcard).
6345 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6346 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6347 # The user is allowed to set LINGUAS to a list of languages to
6348 # install catalogs for. If it's empty that means "all of them."
6349 if test "x$LINGUAS" = x; then
6350 CATALOGS="$CATALOGS $cat"
6351 XLINGUAS="$XLINGUAS $lang"
6352 else
6353 case "$LINGUAS" in *$lang*)
6354 CATALOGS="$CATALOGS $cat"
6355 XLINGUAS="$XLINGUAS $lang"
6356 ;;
6357 esac
6358 fi
6359 done
6360 LINGUAS="$XLINGUAS"
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6362 $as_echo "$LINGUAS" >&6; }
6363
6364
6365 DATADIRNAME=share
6366
6367 INSTOBJEXT=.mo
6368
6369 GENCAT=gencat
6370
6371 CATOBJEXT=.gmo
6372
6373 fi
6374
6375 localedir='${datadir}/locale'
6376
6377
6378 if test x"$USE_NLS" = xyes; then
6379 CONFIG_ALL="$CONFIG_ALL all-po"
6380 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6381 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6382 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6383 fi
6384
6385 PACKAGE=gdb
6386
6387 cat >>confdefs.h <<_ACEOF
6388 #define PACKAGE "$PACKAGE"
6389 _ACEOF
6390
6391
6392
6393 # We never need to detect it in this sub-configure.
6394 # But preserve it for config.status --recheck.
6395
6396
6397
6398 MAKEINFO_EXTRA_FLAGS=""
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6400 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6401 if ${gdb_cv_have_makeinfo_click+:} false; then :
6402 $as_echo_n "(cached) " >&6
6403 else
6404 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6405 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6406 gdb_cv_have_makeinfo_click=yes
6407 else
6408 gdb_cv_have_makeinfo_click=no
6409 fi
6410 fi
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6412 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6413 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6414 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6415 fi
6416
6417
6418
6419
6420 # Check whether --with-separate-debug-dir was given.
6421 if test "${with_separate_debug_dir+set}" = set; then :
6422 withval=$with_separate_debug_dir;
6423 DEBUGDIR=$withval
6424 else
6425 DEBUGDIR=${libdir}/debug
6426 fi
6427
6428
6429 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6430 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6431 ac_define_dir=`eval echo $DEBUGDIR`
6432 ac_define_dir=`eval echo $ac_define_dir`
6433
6434 cat >>confdefs.h <<_ACEOF
6435 #define DEBUGDIR "$ac_define_dir"
6436 _ACEOF
6437
6438
6439
6440
6441 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6442 if test "x$prefix" = xNONE; then
6443 test_prefix=/usr/local
6444 else
6445 test_prefix=$prefix
6446 fi
6447 else
6448 test_prefix=$exec_prefix
6449 fi
6450 value=0
6451 case ${ac_define_dir} in
6452 "${test_prefix}"|"${test_prefix}/"*|\
6453 '${exec_prefix}'|'${exec_prefix}/'*)
6454 value=1
6455 ;;
6456 esac
6457
6458 cat >>confdefs.h <<_ACEOF
6459 #define DEBUGDIR_RELOCATABLE $value
6460 _ACEOF
6461
6462
6463
6464
6465 # We can't pass paths as command line arguments.
6466 # Mingw32 tries to be clever and will convert the paths for us.
6467 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6468 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6469 # This breaks GDB's relocatable path conversions since paths passed in
6470 # config.h would not get so translated, the path prefixes no longer match.
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 $bindir`
6475 ac_define_dir=`eval echo $ac_define_dir`
6476
6477 cat >>confdefs.h <<_ACEOF
6478 #define BINDIR "$ac_define_dir"
6479 _ACEOF
6480
6481
6482
6483 # GDB's datadir relocation
6484
6485
6486
6487 # Check whether --with-gdb-datadir was given.
6488 if test "${with_gdb_datadir+set}" = set; then :
6489 withval=$with_gdb_datadir;
6490 GDB_DATADIR=$withval
6491 else
6492 GDB_DATADIR=${datadir}/gdb
6493 fi
6494
6495
6496 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6497 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6498 ac_define_dir=`eval echo $GDB_DATADIR`
6499 ac_define_dir=`eval echo $ac_define_dir`
6500
6501 cat >>confdefs.h <<_ACEOF
6502 #define GDB_DATADIR "$ac_define_dir"
6503 _ACEOF
6504
6505
6506
6507
6508 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6509 if test "x$prefix" = xNONE; then
6510 test_prefix=/usr/local
6511 else
6512 test_prefix=$prefix
6513 fi
6514 else
6515 test_prefix=$exec_prefix
6516 fi
6517 value=0
6518 case ${ac_define_dir} in
6519 "${test_prefix}"|"${test_prefix}/"*|\
6520 '${exec_prefix}'|'${exec_prefix}/'*)
6521 value=1
6522 ;;
6523 esac
6524
6525 cat >>confdefs.h <<_ACEOF
6526 #define GDB_DATADIR_RELOCATABLE $value
6527 _ACEOF
6528
6529
6530
6531
6532
6533 # Check whether --with-relocated-sources was given.
6534 if test "${with_relocated_sources+set}" = set; then :
6535 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6536
6537 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6538 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6539 ac_define_dir=`eval echo $reloc_srcdir`
6540 ac_define_dir=`eval echo $ac_define_dir`
6541
6542 cat >>confdefs.h <<_ACEOF
6543 #define RELOC_SRCDIR "$ac_define_dir"
6544 _ACEOF
6545
6546
6547
6548 fi
6549
6550
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6552 $as_echo_n "checking for default auto-load directory... " >&6; }
6553
6554 # Check whether --with-auto-load-dir was given.
6555 if test "${with_auto_load_dir+set}" = set; then :
6556 withval=$with_auto_load_dir;
6557 else
6558 with_auto_load_dir='$debugdir:$datadir/auto-load'
6559 fi
6560
6561 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6562
6563 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6564 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6565 ac_define_dir=`eval echo $escape_dir`
6566 ac_define_dir=`eval echo $ac_define_dir`
6567
6568 cat >>confdefs.h <<_ACEOF
6569 #define AUTO_LOAD_DIR "$ac_define_dir"
6570 _ACEOF
6571
6572
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6574 $as_echo "$with_auto_load_dir" >&6; }
6575
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6577 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6578
6579 # Check whether --with-auto-load-safe-path was given.
6580 if test "${with_auto_load_safe_path+set}" = set; then :
6581 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6582 with_auto_load_safe_path="/"
6583 fi
6584 else
6585 with_auto_load_safe_path="$with_auto_load_dir"
6586 fi
6587
6588 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6589
6590 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6591 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6592 ac_define_dir=`eval echo $escape_dir`
6593 ac_define_dir=`eval echo $ac_define_dir`
6594
6595 cat >>confdefs.h <<_ACEOF
6596 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6597 _ACEOF
6598
6599
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6601 $as_echo "$with_auto_load_safe_path" >&6; }
6602
6603
6604
6605 subdirs="$subdirs testsuite"
6606
6607
6608 # Check whether to support alternative target configurations
6609 # Check whether --enable-targets was given.
6610 if test "${enable_targets+set}" = set; then :
6611 enableval=$enable_targets; case "${enableval}" in
6612 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6613 ;;
6614 no) enable_targets= ;;
6615 *) enable_targets=$enableval ;;
6616 esac
6617 fi
6618
6619
6620 # Check whether to enable 64-bit support on 32-bit hosts
6621 # Check whether --enable-64-bit-bfd was given.
6622 if test "${enable_64_bit_bfd+set}" = set; then :
6623 enableval=$enable_64_bit_bfd; case "${enableval}" in
6624 yes) want64=true ;;
6625 no) want64=false ;;
6626 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6627 esac
6628 else
6629 want64=false
6630 fi
6631
6632 # Provide defaults for some variables set by the per-host and per-target
6633 # configuration.
6634 gdb_host_obs=posix-hdep.o
6635
6636 if test "${target}" = "${host}"; then
6637 gdb_native=yes
6638 else
6639 gdb_native=no
6640 fi
6641
6642 . $srcdir/configure.host
6643
6644 # Accumulate some settings from configure.tgt over all enabled targets
6645
6646 TARGET_OBS=
6647 all_targets=
6648 HAVE_NATIVE_GCORE_TARGET=
6649
6650 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6651 do
6652 if test "$targ_alias" = "all"; then
6653 all_targets=true
6654 else
6655 # Canonicalize the secondary target names.
6656 result=`$ac_config_sub $targ_alias 2>/dev/null`
6657 if test -n "$result"; then
6658 targ=$result
6659 else
6660 targ=$targ_alias
6661 fi
6662
6663 . ${srcdir}/configure.tgt
6664
6665 if test -z "${gdb_target_obs}"; then :
6666 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6667 fi
6668
6669 # Target-specific object files
6670 for i in ${gdb_target_obs}; do
6671 case " $TARGET_OBS " in
6672 *" ${i} "*) ;;
6673 *)
6674 TARGET_OBS="$TARGET_OBS ${i}"
6675 ;;
6676 esac
6677 done
6678
6679 # Check whether this target needs 64-bit CORE_ADDR
6680 if test x${want64} = xfalse; then
6681 . ${srcdir}/../bfd/config.bfd
6682 fi
6683
6684 # Check whether this target is native and supports gcore.
6685 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6686 && $gdb_have_gcore; then
6687 HAVE_NATIVE_GCORE_TARGET=1
6688 fi
6689 fi
6690 done
6691
6692 if test x${all_targets} = xtrue; then
6693
6694 # We want all 64-bit targets if we either:
6695 # - run on a 64-bit host or
6696 # - already require 64-bit support for some other target or
6697 # - the --enable-64-bit-bfd option was supplied
6698 # Otherwise we only support all 32-bit targets.
6699 #
6700 # NOTE: This test must be in sync with the corresponding
6701 # tests in BFD!
6702
6703 if test x${want64} = xfalse; then
6704 # The cast to long int works around a bug in the HP C Compiler
6705 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6706 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6707 # This bug is HP SR number 8606223364.
6708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6709 $as_echo_n "checking size of long... " >&6; }
6710 if ${ac_cv_sizeof_long+:} false; then :
6711 $as_echo_n "(cached) " >&6
6712 else
6713 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6714
6715 else
6716 if test "$ac_cv_type_long" = yes; then
6717 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6718 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6719 as_fn_error 77 "cannot compute sizeof (long)
6720 See \`config.log' for more details" "$LINENO" 5; }
6721 else
6722 ac_cv_sizeof_long=0
6723 fi
6724 fi
6725
6726 fi
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6728 $as_echo "$ac_cv_sizeof_long" >&6; }
6729
6730
6731
6732 cat >>confdefs.h <<_ACEOF
6733 #define SIZEOF_LONG $ac_cv_sizeof_long
6734 _ACEOF
6735
6736
6737 if test "x${ac_cv_sizeof_long}" = "x8"; then
6738 want64=true
6739 fi
6740 fi
6741 if test x${want64} = xtrue; then
6742 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6743 else
6744 TARGET_OBS='$(ALL_TARGET_OBS)'
6745 fi
6746 fi
6747
6748
6749
6750
6751 # For other settings, only the main target counts.
6752 gdb_sim=
6753 gdb_osabi=
6754 targ=$target; . ${srcdir}/configure.tgt
6755
6756 # Fetch the default architecture and default target vector from BFD.
6757 targ=$target; . $srcdir/../bfd/config.bfd
6758
6759 # We only want the first architecture, so strip off the others if
6760 # there is more than one.
6761 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6762
6763 if test "x$targ_archs" != x; then
6764
6765 cat >>confdefs.h <<_ACEOF
6766 #define DEFAULT_BFD_ARCH $targ_archs
6767 _ACEOF
6768
6769 fi
6770 if test "x$targ_defvec" != x; then
6771
6772 cat >>confdefs.h <<_ACEOF
6773 #define DEFAULT_BFD_VEC $targ_defvec
6774 _ACEOF
6775
6776 fi
6777
6778 # Enable MI.
6779 # Check whether --enable-gdbmi was given.
6780 if test "${enable_gdbmi+set}" = set; then :
6781 enableval=$enable_gdbmi; case $enableval in
6782 yes | no)
6783 ;;
6784 *)
6785 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6786 esac
6787 else
6788 enable_gdbmi=yes
6789 fi
6790
6791 if test x"$enable_gdbmi" = xyes; then
6792 if test -d "$srcdir/mi"; then
6793 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6794 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6795 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6796 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6797 fi
6798 fi
6799
6800 # Enable TUI.
6801 # Check whether --enable-tui was given.
6802 if test "${enable_tui+set}" = set; then :
6803 enableval=$enable_tui; case $enableval in
6804 yes | no | auto)
6805 ;;
6806 *)
6807 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6808 esac
6809 else
6810 enable_tui=auto
6811 fi
6812
6813
6814 # Enable gdbtk.
6815 # Check whether --enable-gdbtk was given.
6816 if test "${enable_gdbtk+set}" = set; then :
6817 enableval=$enable_gdbtk; case $enableval in
6818 yes | no)
6819 ;;
6820 *)
6821 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6822 esac
6823 else
6824 if test -d "$srcdir/gdbtk"; then
6825 enable_gdbtk=yes
6826 else
6827 enable_gdbtk=no
6828 fi
6829 fi
6830
6831 # We unconditionally disable gdbtk tests on selected platforms.
6832 case $host_os in
6833 go32* | windows*)
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6835 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6836 enable_gdbtk=no ;;
6837 esac
6838
6839 # Libunwind support for ia64.
6840
6841
6842 # Check whether --with-libunwind-ia64 was given.
6843 if test "${with_libunwind_ia64+set}" = set; then :
6844 withval=$with_libunwind_ia64;
6845 else
6846 with_libunwind_ia64=auto
6847 fi
6848
6849
6850 # Backward compatibility option.
6851 if test "${with_libunwind+set}" = set; then
6852 if test x"$with_libunwind_ia64" != xauto; then
6853 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6854 fi
6855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6856 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6857 with_libunwind_ia64="$with_libunwind"
6858 fi
6859
6860 case "$with_libunwind_ia64" in
6861 yes | no)
6862 ;;
6863 auto)
6864 for ac_header in libunwind-ia64.h
6865 do :
6866 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6867 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6868 cat >>confdefs.h <<_ACEOF
6869 #define HAVE_LIBUNWIND_IA64_H 1
6870 _ACEOF
6871
6872 fi
6873
6874 done
6875
6876 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6877 ;;
6878 *)
6879 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6880 ;;
6881 esac
6882
6883 if test x"$with_libunwind_ia64" = xyes; then
6884 for ac_header in libunwind-ia64.h
6885 do :
6886 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6887 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6888 cat >>confdefs.h <<_ACEOF
6889 #define HAVE_LIBUNWIND_IA64_H 1
6890 _ACEOF
6891
6892 fi
6893
6894 done
6895
6896 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6897 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6898 fi
6899 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6900 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6901 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6902 fi
6903
6904 opt_curses=no
6905
6906 # Check whether --with-curses was given.
6907 if test "${with_curses+set}" = set; then :
6908 withval=$with_curses; opt_curses=$withval
6909 fi
6910
6911
6912 prefer_curses=no
6913 if test "$opt_curses" = "yes"; then
6914 prefer_curses=yes
6915 fi
6916
6917 # Profiling support.
6918 # Check whether --enable-profiling was given.
6919 if test "${enable_profiling+set}" = set; then :
6920 enableval=$enable_profiling; case $enableval in
6921 yes | no)
6922 ;;
6923 *)
6924 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6925 esac
6926 else
6927 enable_profiling=no
6928 fi
6929
6930
6931 for ac_func in monstartup _mcleanup
6932 do :
6933 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6934 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6935 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6936 cat >>confdefs.h <<_ACEOF
6937 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6938 _ACEOF
6939
6940 fi
6941 done
6942
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6944 $as_echo_n "checking for _etext... " >&6; }
6945 if ${ac_cv_var__etext+:} false; then :
6946 $as_echo_n "(cached) " >&6
6947 else
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949 /* end confdefs.h. */
6950 #include <stdlib.h>
6951 extern char _etext;
6952
6953 int
6954 main ()
6955 {
6956 free (&_etext);
6957 ;
6958 return 0;
6959 }
6960 _ACEOF
6961 if ac_fn_c_try_link "$LINENO"; then :
6962 ac_cv_var__etext=yes
6963 else
6964 ac_cv_var__etext=no
6965 fi
6966 rm -f core conftest.err conftest.$ac_objext \
6967 conftest$ac_exeext conftest.$ac_ext
6968 fi
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6970 $as_echo "$ac_cv_var__etext" >&6; }
6971 if test "$ac_cv_var__etext" = yes; then
6972
6973 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6974
6975 fi
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6977 $as_echo_n "checking for etext... " >&6; }
6978 if ${ac_cv_var_etext+:} false; then :
6979 $as_echo_n "(cached) " >&6
6980 else
6981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6982 /* end confdefs.h. */
6983 #include <stdlib.h>
6984 extern char etext;
6985
6986 int
6987 main ()
6988 {
6989 free (&etext);
6990 ;
6991 return 0;
6992 }
6993 _ACEOF
6994 if ac_fn_c_try_link "$LINENO"; then :
6995 ac_cv_var_etext=yes
6996 else
6997 ac_cv_var_etext=no
6998 fi
6999 rm -f core conftest.err conftest.$ac_objext \
7000 conftest$ac_exeext conftest.$ac_ext
7001 fi
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7003 $as_echo "$ac_cv_var_etext" >&6; }
7004 if test "$ac_cv_var_etext" = yes; then
7005
7006 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7007
7008 fi
7009 if test "$enable_profiling" = yes ; then
7010 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7011 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7012 fi
7013 PROFILE_CFLAGS=-pg
7014 OLD_CFLAGS="$CFLAGS"
7015 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7016
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7018 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7019 if ${ac_cv_cc_supports_pg+:} false; then :
7020 $as_echo_n "(cached) " >&6
7021 else
7022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7023 /* end confdefs.h. */
7024
7025 int
7026 main ()
7027 {
7028 int x;
7029 ;
7030 return 0;
7031 }
7032 _ACEOF
7033 if ac_fn_c_try_compile "$LINENO"; then :
7034 ac_cv_cc_supports_pg=yes
7035 else
7036 ac_cv_cc_supports_pg=no
7037 fi
7038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7039 fi
7040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7041 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7042
7043 if test "$ac_cv_cc_supports_pg" = no; then
7044 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7045 fi
7046
7047 CFLAGS="$OLD_CFLAGS"
7048 fi
7049
7050 CODESIGN_CERT=
7051 # Check whether --enable-codesign was given.
7052 if test "${enable_codesign+set}" = set; then :
7053 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7054 fi
7055
7056
7057
7058
7059
7060 # Check whether --with-pkgversion was given.
7061 if test "${with_pkgversion+set}" = set; then :
7062 withval=$with_pkgversion; case "$withval" in
7063 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7064 no) PKGVERSION= ;;
7065 *) PKGVERSION="($withval) " ;;
7066 esac
7067 else
7068 PKGVERSION="(GDB) "
7069
7070 fi
7071
7072
7073
7074
7075
7076 # Check whether --with-bugurl was given.
7077 if test "${with_bugurl+set}" = set; then :
7078 withval=$with_bugurl; case "$withval" in
7079 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7080 no) BUGURL=
7081 ;;
7082 *) BUGURL="$withval"
7083 ;;
7084 esac
7085 else
7086 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7087
7088 fi
7089
7090 case ${BUGURL} in
7091 "")
7092 REPORT_BUGS_TO=
7093 REPORT_BUGS_TEXI=
7094 ;;
7095 *)
7096 REPORT_BUGS_TO="<$BUGURL>"
7097 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7098 ;;
7099 esac;
7100
7101
7102
7103
7104 cat >>confdefs.h <<_ACEOF
7105 #define PKGVERSION "$PKGVERSION"
7106 _ACEOF
7107
7108
7109 cat >>confdefs.h <<_ACEOF
7110 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7111 _ACEOF
7112
7113
7114 # --------------------- #
7115 # Checks for programs. #
7116 # --------------------- #
7117
7118 for ac_prog in gawk mawk nawk awk
7119 do
7120 # Extract the first word of "$ac_prog", so it can be a program name with args.
7121 set dummy $ac_prog; ac_word=$2
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7123 $as_echo_n "checking for $ac_word... " >&6; }
7124 if ${ac_cv_prog_AWK+:} false; then :
7125 $as_echo_n "(cached) " >&6
7126 else
7127 if test -n "$AWK"; then
7128 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7129 else
7130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7131 for as_dir in $PATH
7132 do
7133 IFS=$as_save_IFS
7134 test -z "$as_dir" && as_dir=.
7135 for ac_exec_ext in '' $ac_executable_extensions; do
7136 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7137 ac_cv_prog_AWK="$ac_prog"
7138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7139 break 2
7140 fi
7141 done
7142 done
7143 IFS=$as_save_IFS
7144
7145 fi
7146 fi
7147 AWK=$ac_cv_prog_AWK
7148 if test -n "$AWK"; then
7149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7150 $as_echo "$AWK" >&6; }
7151 else
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7153 $as_echo "no" >&6; }
7154 fi
7155
7156
7157 test -n "$AWK" && break
7158 done
7159
7160 # Find a good install program. We prefer a C program (faster),
7161 # so one script is as good as another. But avoid the broken or
7162 # incompatible versions:
7163 # SysV /etc/install, /usr/sbin/install
7164 # SunOS /usr/etc/install
7165 # IRIX /sbin/install
7166 # AIX /bin/install
7167 # AmigaOS /C/install, which installs bootblocks on floppy discs
7168 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7169 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7170 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7171 # OS/2's system install, which has a completely different semantic
7172 # ./install, which can be erroneously created by make from ./install.sh.
7173 # Reject install programs that cannot install multiple files.
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7175 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7176 if test -z "$INSTALL"; then
7177 if ${ac_cv_path_install+:} false; then :
7178 $as_echo_n "(cached) " >&6
7179 else
7180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7181 for as_dir in $PATH
7182 do
7183 IFS=$as_save_IFS
7184 test -z "$as_dir" && as_dir=.
7185 # Account for people who put trailing slashes in PATH elements.
7186 case $as_dir/ in #((
7187 ./ | .// | /[cC]/* | \
7188 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7189 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7190 /usr/ucb/* ) ;;
7191 *)
7192 # OSF1 and SCO ODT 3.0 have their own names for install.
7193 # Don't use installbsd from OSF since it installs stuff as root
7194 # by default.
7195 for ac_prog in ginstall scoinst install; do
7196 for ac_exec_ext in '' $ac_executable_extensions; do
7197 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7198 if test $ac_prog = install &&
7199 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7200 # AIX install. It has an incompatible calling convention.
7201 :
7202 elif test $ac_prog = install &&
7203 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7204 # program-specific install script used by HP pwplus--don't use.
7205 :
7206 else
7207 rm -rf conftest.one conftest.two conftest.dir
7208 echo one > conftest.one
7209 echo two > conftest.two
7210 mkdir conftest.dir
7211 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7212 test -s conftest.one && test -s conftest.two &&
7213 test -s conftest.dir/conftest.one &&
7214 test -s conftest.dir/conftest.two
7215 then
7216 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7217 break 3
7218 fi
7219 fi
7220 fi
7221 done
7222 done
7223 ;;
7224 esac
7225
7226 done
7227 IFS=$as_save_IFS
7228
7229 rm -rf conftest.one conftest.two conftest.dir
7230
7231 fi
7232 if test "${ac_cv_path_install+set}" = set; then
7233 INSTALL=$ac_cv_path_install
7234 else
7235 # As a last resort, use the slow shell script. Don't cache a
7236 # value for INSTALL within a source directory, because that will
7237 # break other packages using the cache if that directory is
7238 # removed, or if the value is a relative name.
7239 INSTALL=$ac_install_sh
7240 fi
7241 fi
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7243 $as_echo "$INSTALL" >&6; }
7244
7245 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7246 # It thinks the first close brace ends the variable substitution.
7247 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7248
7249 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7250
7251 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7252
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7254 $as_echo_n "checking whether ln -s works... " >&6; }
7255 LN_S=$as_ln_s
7256 if test "$LN_S" = "ln -s"; then
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7258 $as_echo "yes" >&6; }
7259 else
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7261 $as_echo "no, using $LN_S" >&6; }
7262 fi
7263
7264 if test -n "$ac_tool_prefix"; then
7265 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7266 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7268 $as_echo_n "checking for $ac_word... " >&6; }
7269 if ${ac_cv_prog_RANLIB+:} false; then :
7270 $as_echo_n "(cached) " >&6
7271 else
7272 if test -n "$RANLIB"; then
7273 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7274 else
7275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7276 for as_dir in $PATH
7277 do
7278 IFS=$as_save_IFS
7279 test -z "$as_dir" && as_dir=.
7280 for ac_exec_ext in '' $ac_executable_extensions; do
7281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7282 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7284 break 2
7285 fi
7286 done
7287 done
7288 IFS=$as_save_IFS
7289
7290 fi
7291 fi
7292 RANLIB=$ac_cv_prog_RANLIB
7293 if test -n "$RANLIB"; then
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7295 $as_echo "$RANLIB" >&6; }
7296 else
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298 $as_echo "no" >&6; }
7299 fi
7300
7301
7302 fi
7303 if test -z "$ac_cv_prog_RANLIB"; then
7304 ac_ct_RANLIB=$RANLIB
7305 # Extract the first word of "ranlib", so it can be a program name with args.
7306 set dummy ranlib; ac_word=$2
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7308 $as_echo_n "checking for $ac_word... " >&6; }
7309 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7310 $as_echo_n "(cached) " >&6
7311 else
7312 if test -n "$ac_ct_RANLIB"; then
7313 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7314 else
7315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7316 for as_dir in $PATH
7317 do
7318 IFS=$as_save_IFS
7319 test -z "$as_dir" && as_dir=.
7320 for ac_exec_ext in '' $ac_executable_extensions; do
7321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7322 ac_cv_prog_ac_ct_RANLIB="ranlib"
7323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7324 break 2
7325 fi
7326 done
7327 done
7328 IFS=$as_save_IFS
7329
7330 fi
7331 fi
7332 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7333 if test -n "$ac_ct_RANLIB"; then
7334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7335 $as_echo "$ac_ct_RANLIB" >&6; }
7336 else
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7338 $as_echo "no" >&6; }
7339 fi
7340
7341 if test "x$ac_ct_RANLIB" = x; then
7342 RANLIB=":"
7343 else
7344 case $cross_compiling:$ac_tool_warned in
7345 yes:)
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7347 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7348 ac_tool_warned=yes ;;
7349 esac
7350 RANLIB=$ac_ct_RANLIB
7351 fi
7352 else
7353 RANLIB="$ac_cv_prog_RANLIB"
7354 fi
7355
7356 for ac_prog in 'bison -y' byacc
7357 do
7358 # Extract the first word of "$ac_prog", so it can be a program name with args.
7359 set dummy $ac_prog; ac_word=$2
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7361 $as_echo_n "checking for $ac_word... " >&6; }
7362 if ${ac_cv_prog_YACC+:} false; then :
7363 $as_echo_n "(cached) " >&6
7364 else
7365 if test -n "$YACC"; then
7366 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7367 else
7368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7369 for as_dir in $PATH
7370 do
7371 IFS=$as_save_IFS
7372 test -z "$as_dir" && as_dir=.
7373 for ac_exec_ext in '' $ac_executable_extensions; do
7374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7375 ac_cv_prog_YACC="$ac_prog"
7376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7377 break 2
7378 fi
7379 done
7380 done
7381 IFS=$as_save_IFS
7382
7383 fi
7384 fi
7385 YACC=$ac_cv_prog_YACC
7386 if test -n "$YACC"; then
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7388 $as_echo "$YACC" >&6; }
7389 else
7390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7391 $as_echo "no" >&6; }
7392 fi
7393
7394
7395 test -n "$YACC" && break
7396 done
7397 test -n "$YACC" || YACC="yacc"
7398
7399
7400 if test -n "$ac_tool_prefix"; then
7401 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7402 set dummy ${ac_tool_prefix}ar; ac_word=$2
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404 $as_echo_n "checking for $ac_word... " >&6; }
7405 if ${ac_cv_prog_AR+:} false; then :
7406 $as_echo_n "(cached) " >&6
7407 else
7408 if test -n "$AR"; then
7409 ac_cv_prog_AR="$AR" # Let the user override the test.
7410 else
7411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7412 for as_dir in $PATH
7413 do
7414 IFS=$as_save_IFS
7415 test -z "$as_dir" && as_dir=.
7416 for ac_exec_ext in '' $ac_executable_extensions; do
7417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7418 ac_cv_prog_AR="${ac_tool_prefix}ar"
7419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7420 break 2
7421 fi
7422 done
7423 done
7424 IFS=$as_save_IFS
7425
7426 fi
7427 fi
7428 AR=$ac_cv_prog_AR
7429 if test -n "$AR"; then
7430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7431 $as_echo "$AR" >&6; }
7432 else
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7434 $as_echo "no" >&6; }
7435 fi
7436
7437
7438 fi
7439 if test -z "$ac_cv_prog_AR"; then
7440 ac_ct_AR=$AR
7441 # Extract the first word of "ar", so it can be a program name with args.
7442 set dummy ar; ac_word=$2
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7444 $as_echo_n "checking for $ac_word... " >&6; }
7445 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7446 $as_echo_n "(cached) " >&6
7447 else
7448 if test -n "$ac_ct_AR"; then
7449 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7450 else
7451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452 for as_dir in $PATH
7453 do
7454 IFS=$as_save_IFS
7455 test -z "$as_dir" && as_dir=.
7456 for ac_exec_ext in '' $ac_executable_extensions; do
7457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7458 ac_cv_prog_ac_ct_AR="ar"
7459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7460 break 2
7461 fi
7462 done
7463 done
7464 IFS=$as_save_IFS
7465
7466 fi
7467 fi
7468 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7469 if test -n "$ac_ct_AR"; then
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7471 $as_echo "$ac_ct_AR" >&6; }
7472 else
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474 $as_echo "no" >&6; }
7475 fi
7476
7477 if test "x$ac_ct_AR" = x; then
7478 AR=""
7479 else
7480 case $cross_compiling:$ac_tool_warned in
7481 yes:)
7482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7483 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7484 ac_tool_warned=yes ;;
7485 esac
7486 AR=$ac_ct_AR
7487 fi
7488 else
7489 AR="$ac_cv_prog_AR"
7490 fi
7491
7492 if test -n "$ac_tool_prefix"; then
7493 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7494 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7496 $as_echo_n "checking for $ac_word... " >&6; }
7497 if ${ac_cv_prog_DLLTOOL+:} false; then :
7498 $as_echo_n "(cached) " >&6
7499 else
7500 if test -n "$DLLTOOL"; then
7501 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7502 else
7503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7504 for as_dir in $PATH
7505 do
7506 IFS=$as_save_IFS
7507 test -z "$as_dir" && as_dir=.
7508 for ac_exec_ext in '' $ac_executable_extensions; do
7509 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7510 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7512 break 2
7513 fi
7514 done
7515 done
7516 IFS=$as_save_IFS
7517
7518 fi
7519 fi
7520 DLLTOOL=$ac_cv_prog_DLLTOOL
7521 if test -n "$DLLTOOL"; then
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7523 $as_echo "$DLLTOOL" >&6; }
7524 else
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526 $as_echo "no" >&6; }
7527 fi
7528
7529
7530 fi
7531 if test -z "$ac_cv_prog_DLLTOOL"; then
7532 ac_ct_DLLTOOL=$DLLTOOL
7533 # Extract the first word of "dlltool", so it can be a program name with args.
7534 set dummy dlltool; ac_word=$2
7535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7536 $as_echo_n "checking for $ac_word... " >&6; }
7537 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7538 $as_echo_n "(cached) " >&6
7539 else
7540 if test -n "$ac_ct_DLLTOOL"; then
7541 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7542 else
7543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7544 for as_dir in $PATH
7545 do
7546 IFS=$as_save_IFS
7547 test -z "$as_dir" && as_dir=.
7548 for ac_exec_ext in '' $ac_executable_extensions; do
7549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7550 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7552 break 2
7553 fi
7554 done
7555 done
7556 IFS=$as_save_IFS
7557
7558 fi
7559 fi
7560 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7561 if test -n "$ac_ct_DLLTOOL"; then
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7563 $as_echo "$ac_ct_DLLTOOL" >&6; }
7564 else
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7566 $as_echo "no" >&6; }
7567 fi
7568
7569 if test "x$ac_ct_DLLTOOL" = x; then
7570 DLLTOOL=""
7571 else
7572 case $cross_compiling:$ac_tool_warned in
7573 yes:)
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7575 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7576 ac_tool_warned=yes ;;
7577 esac
7578 DLLTOOL=$ac_ct_DLLTOOL
7579 fi
7580 else
7581 DLLTOOL="$ac_cv_prog_DLLTOOL"
7582 fi
7583
7584 if test -n "$ac_tool_prefix"; then
7585 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7586 set dummy ${ac_tool_prefix}windres; ac_word=$2
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588 $as_echo_n "checking for $ac_word... " >&6; }
7589 if ${ac_cv_prog_WINDRES+:} false; then :
7590 $as_echo_n "(cached) " >&6
7591 else
7592 if test -n "$WINDRES"; then
7593 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7594 else
7595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7596 for as_dir in $PATH
7597 do
7598 IFS=$as_save_IFS
7599 test -z "$as_dir" && as_dir=.
7600 for ac_exec_ext in '' $ac_executable_extensions; do
7601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7602 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7604 break 2
7605 fi
7606 done
7607 done
7608 IFS=$as_save_IFS
7609
7610 fi
7611 fi
7612 WINDRES=$ac_cv_prog_WINDRES
7613 if test -n "$WINDRES"; then
7614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7615 $as_echo "$WINDRES" >&6; }
7616 else
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7618 $as_echo "no" >&6; }
7619 fi
7620
7621
7622 fi
7623 if test -z "$ac_cv_prog_WINDRES"; then
7624 ac_ct_WINDRES=$WINDRES
7625 # Extract the first word of "windres", so it can be a program name with args.
7626 set dummy windres; ac_word=$2
7627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7628 $as_echo_n "checking for $ac_word... " >&6; }
7629 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7630 $as_echo_n "(cached) " >&6
7631 else
7632 if test -n "$ac_ct_WINDRES"; then
7633 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7634 else
7635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7636 for as_dir in $PATH
7637 do
7638 IFS=$as_save_IFS
7639 test -z "$as_dir" && as_dir=.
7640 for ac_exec_ext in '' $ac_executable_extensions; do
7641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7642 ac_cv_prog_ac_ct_WINDRES="windres"
7643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7644 break 2
7645 fi
7646 done
7647 done
7648 IFS=$as_save_IFS
7649
7650 fi
7651 fi
7652 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7653 if test -n "$ac_ct_WINDRES"; then
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7655 $as_echo "$ac_ct_WINDRES" >&6; }
7656 else
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7658 $as_echo "no" >&6; }
7659 fi
7660
7661 if test "x$ac_ct_WINDRES" = x; then
7662 WINDRES=""
7663 else
7664 case $cross_compiling:$ac_tool_warned in
7665 yes:)
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7667 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7668 ac_tool_warned=yes ;;
7669 esac
7670 WINDRES=$ac_ct_WINDRES
7671 fi
7672 else
7673 WINDRES="$ac_cv_prog_WINDRES"
7674 fi
7675
7676
7677 case $host_os in
7678 gnu*)
7679 # Needed for GNU Hurd hosts.
7680 if test -n "$ac_tool_prefix"; then
7681 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7682 set dummy ${ac_tool_prefix}mig; ac_word=$2
7683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7684 $as_echo_n "checking for $ac_word... " >&6; }
7685 if ${ac_cv_prog_MIG+:} false; then :
7686 $as_echo_n "(cached) " >&6
7687 else
7688 if test -n "$MIG"; then
7689 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7690 else
7691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7692 for as_dir in $PATH
7693 do
7694 IFS=$as_save_IFS
7695 test -z "$as_dir" && as_dir=.
7696 for ac_exec_ext in '' $ac_executable_extensions; do
7697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7698 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7700 break 2
7701 fi
7702 done
7703 done
7704 IFS=$as_save_IFS
7705
7706 fi
7707 fi
7708 MIG=$ac_cv_prog_MIG
7709 if test -n "$MIG"; then
7710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7711 $as_echo "$MIG" >&6; }
7712 else
7713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7714 $as_echo "no" >&6; }
7715 fi
7716
7717
7718 fi
7719 if test -z "$ac_cv_prog_MIG"; then
7720 ac_ct_MIG=$MIG
7721 # Extract the first word of "mig", so it can be a program name with args.
7722 set dummy mig; ac_word=$2
7723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7724 $as_echo_n "checking for $ac_word... " >&6; }
7725 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7726 $as_echo_n "(cached) " >&6
7727 else
7728 if test -n "$ac_ct_MIG"; then
7729 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7730 else
7731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7732 for as_dir in $PATH
7733 do
7734 IFS=$as_save_IFS
7735 test -z "$as_dir" && as_dir=.
7736 for ac_exec_ext in '' $ac_executable_extensions; do
7737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7738 ac_cv_prog_ac_ct_MIG="mig"
7739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7740 break 2
7741 fi
7742 done
7743 done
7744 IFS=$as_save_IFS
7745
7746 fi
7747 fi
7748 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7749 if test -n "$ac_ct_MIG"; then
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7751 $as_echo "$ac_ct_MIG" >&6; }
7752 else
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7754 $as_echo "no" >&6; }
7755 fi
7756
7757 if test "x$ac_ct_MIG" = x; then
7758 MIG=""
7759 else
7760 case $cross_compiling:$ac_tool_warned in
7761 yes:)
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7763 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7764 ac_tool_warned=yes ;;
7765 esac
7766 MIG=$ac_ct_MIG
7767 fi
7768 else
7769 MIG="$ac_cv_prog_MIG"
7770 fi
7771
7772 if test x"$MIG" = x; then
7773 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7774 fi
7775 ;;
7776 esac
7777
7778 # ---------------------- #
7779 # Checks for libraries. #
7780 # ---------------------- #
7781
7782 # We might need to link with -lm; most simulators need it.
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7784 $as_echo_n "checking for main in -lm... " >&6; }
7785 if ${ac_cv_lib_m_main+:} false; then :
7786 $as_echo_n "(cached) " >&6
7787 else
7788 ac_check_lib_save_LIBS=$LIBS
7789 LIBS="-lm $LIBS"
7790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7791 /* end confdefs.h. */
7792
7793
7794 int
7795 main ()
7796 {
7797 return main ();
7798 ;
7799 return 0;
7800 }
7801 _ACEOF
7802 if ac_fn_c_try_link "$LINENO"; then :
7803 ac_cv_lib_m_main=yes
7804 else
7805 ac_cv_lib_m_main=no
7806 fi
7807 rm -f core conftest.err conftest.$ac_objext \
7808 conftest$ac_exeext conftest.$ac_ext
7809 LIBS=$ac_check_lib_save_LIBS
7810 fi
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7812 $as_echo "$ac_cv_lib_m_main" >&6; }
7813 if test "x$ac_cv_lib_m_main" = xyes; then :
7814 cat >>confdefs.h <<_ACEOF
7815 #define HAVE_LIBM 1
7816 _ACEOF
7817
7818 LIBS="-lm $LIBS"
7819
7820 fi
7821
7822
7823 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7825 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7826 if ${ac_cv_search_gethostbyname+:} false; then :
7827 $as_echo_n "(cached) " >&6
7828 else
7829 ac_func_search_save_LIBS=$LIBS
7830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831 /* end confdefs.h. */
7832
7833 /* Override any GCC internal prototype to avoid an error.
7834 Use char because int might match the return type of a GCC
7835 builtin and then its argument prototype would still apply. */
7836 #ifdef __cplusplus
7837 extern "C"
7838 #endif
7839 char gethostbyname ();
7840 int
7841 main ()
7842 {
7843 return gethostbyname ();
7844 ;
7845 return 0;
7846 }
7847 _ACEOF
7848 for ac_lib in '' nsl; do
7849 if test -z "$ac_lib"; then
7850 ac_res="none required"
7851 else
7852 ac_res=-l$ac_lib
7853 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7854 fi
7855 if ac_fn_c_try_link "$LINENO"; then :
7856 ac_cv_search_gethostbyname=$ac_res
7857 fi
7858 rm -f core conftest.err conftest.$ac_objext \
7859 conftest$ac_exeext
7860 if ${ac_cv_search_gethostbyname+:} false; then :
7861 break
7862 fi
7863 done
7864 if ${ac_cv_search_gethostbyname+:} false; then :
7865
7866 else
7867 ac_cv_search_gethostbyname=no
7868 fi
7869 rm conftest.$ac_ext
7870 LIBS=$ac_func_search_save_LIBS
7871 fi
7872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7873 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7874 ac_res=$ac_cv_search_gethostbyname
7875 if test "$ac_res" != no; then :
7876 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7877
7878 fi
7879
7880
7881 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7883 $as_echo_n "checking for library containing socketpair... " >&6; }
7884 if ${ac_cv_search_socketpair+:} false; then :
7885 $as_echo_n "(cached) " >&6
7886 else
7887 ac_func_search_save_LIBS=$LIBS
7888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7889 /* end confdefs.h. */
7890
7891 /* Override any GCC internal prototype to avoid an error.
7892 Use char because int might match the return type of a GCC
7893 builtin and then its argument prototype would still apply. */
7894 #ifdef __cplusplus
7895 extern "C"
7896 #endif
7897 char socketpair ();
7898 int
7899 main ()
7900 {
7901 return socketpair ();
7902 ;
7903 return 0;
7904 }
7905 _ACEOF
7906 for ac_lib in '' socket; do
7907 if test -z "$ac_lib"; then
7908 ac_res="none required"
7909 else
7910 ac_res=-l$ac_lib
7911 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7912 fi
7913 if ac_fn_c_try_link "$LINENO"; then :
7914 ac_cv_search_socketpair=$ac_res
7915 fi
7916 rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext
7918 if ${ac_cv_search_socketpair+:} false; then :
7919 break
7920 fi
7921 done
7922 if ${ac_cv_search_socketpair+:} false; then :
7923
7924 else
7925 ac_cv_search_socketpair=no
7926 fi
7927 rm conftest.$ac_ext
7928 LIBS=$ac_func_search_save_LIBS
7929 fi
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7931 $as_echo "$ac_cv_search_socketpair" >&6; }
7932 ac_res=$ac_cv_search_socketpair
7933 if test "$ac_res" != no; then :
7934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7935
7936 fi
7937
7938
7939 # Link in zlib if we can. This allows us to read compressed debug sections.
7940
7941 # Use the system's zlib library.
7942 zlibdir="-L\$(top_builddir)/../zlib"
7943 zlibinc="-I\$(top_srcdir)/../zlib"
7944
7945 # Check whether --with-system-zlib was given.
7946 if test "${with_system_zlib+set}" = set; then :
7947 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7948 zlibdir=
7949 zlibinc=
7950 fi
7951
7952 fi
7953
7954
7955
7956
7957
7958 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7959 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7961 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7962 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7963 $as_echo_n "(cached) " >&6
7964 else
7965 ac_func_search_save_LIBS=$LIBS
7966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7967 /* end confdefs.h. */
7968
7969 /* Override any GCC internal prototype to avoid an error.
7970 Use char because int might match the return type of a GCC
7971 builtin and then its argument prototype would still apply. */
7972 #ifdef __cplusplus
7973 extern "C"
7974 #endif
7975 char kinfo_getvmmap ();
7976 int
7977 main ()
7978 {
7979 return kinfo_getvmmap ();
7980 ;
7981 return 0;
7982 }
7983 _ACEOF
7984 for ac_lib in '' util util-freebsd; do
7985 if test -z "$ac_lib"; then
7986 ac_res="none required"
7987 else
7988 ac_res=-l$ac_lib
7989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7990 fi
7991 if ac_fn_c_try_link "$LINENO"; then :
7992 ac_cv_search_kinfo_getvmmap=$ac_res
7993 fi
7994 rm -f core conftest.err conftest.$ac_objext \
7995 conftest$ac_exeext
7996 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7997 break
7998 fi
7999 done
8000 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8001
8002 else
8003 ac_cv_search_kinfo_getvmmap=no
8004 fi
8005 rm conftest.$ac_ext
8006 LIBS=$ac_func_search_save_LIBS
8007 fi
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8009 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8010 ac_res=$ac_cv_search_kinfo_getvmmap
8011 if test "$ac_res" != no; then :
8012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8013
8014 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8015
8016 fi
8017
8018
8019
8020 if test "X$prefix" = "XNONE"; then
8021 acl_final_prefix="$ac_default_prefix"
8022 else
8023 acl_final_prefix="$prefix"
8024 fi
8025 if test "X$exec_prefix" = "XNONE"; then
8026 acl_final_exec_prefix='${prefix}'
8027 else
8028 acl_final_exec_prefix="$exec_prefix"
8029 fi
8030 acl_save_prefix="$prefix"
8031 prefix="$acl_final_prefix"
8032 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8033 prefix="$acl_save_prefix"
8034
8035
8036 # Check whether --with-gnu-ld was given.
8037 if test "${with_gnu_ld+set}" = set; then :
8038 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8039 else
8040 with_gnu_ld=no
8041 fi
8042
8043 # Prepare PATH_SEPARATOR.
8044 # The user is always right.
8045 if test "${PATH_SEPARATOR+set}" != set; then
8046 echo "#! /bin/sh" >conf$$.sh
8047 echo "exit 0" >>conf$$.sh
8048 chmod +x conf$$.sh
8049 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8050 PATH_SEPARATOR=';'
8051 else
8052 PATH_SEPARATOR=:
8053 fi
8054 rm -f conf$$.sh
8055 fi
8056 ac_prog=ld
8057 if test "$GCC" = yes; then
8058 # Check if gcc -print-prog-name=ld gives a path.
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8060 $as_echo_n "checking for ld used by GCC... " >&6; }
8061 case $host in
8062 *-*-mingw*)
8063 # gcc leaves a trailing carriage return which upsets mingw
8064 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8065 *)
8066 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8067 esac
8068 case $ac_prog in
8069 # Accept absolute paths.
8070 [\\/]* | [A-Za-z]:[\\/]*)
8071 re_direlt='/[^/][^/]*/\.\./'
8072 # Canonicalize the path of ld
8073 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8074 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8075 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8076 done
8077 test -z "$LD" && LD="$ac_prog"
8078 ;;
8079 "")
8080 # If it fails, then pretend we aren't using GCC.
8081 ac_prog=ld
8082 ;;
8083 *)
8084 # If it is relative, then search for the first ld in PATH.
8085 with_gnu_ld=unknown
8086 ;;
8087 esac
8088 elif test "$with_gnu_ld" = yes; then
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8090 $as_echo_n "checking for GNU ld... " >&6; }
8091 else
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8093 $as_echo_n "checking for non-GNU ld... " >&6; }
8094 fi
8095 if ${acl_cv_path_LD+:} false; then :
8096 $as_echo_n "(cached) " >&6
8097 else
8098 if test -z "$LD"; then
8099 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8100 for ac_dir in $PATH; do
8101 test -z "$ac_dir" && ac_dir=.
8102 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8103 acl_cv_path_LD="$ac_dir/$ac_prog"
8104 # Check to see if the program is GNU ld. I'd rather use --version,
8105 # but apparently some GNU ld's only accept -v.
8106 # Break only if it was the GNU/non-GNU ld that we prefer.
8107 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8108 test "$with_gnu_ld" != no && break
8109 else
8110 test "$with_gnu_ld" != yes && break
8111 fi
8112 fi
8113 done
8114 IFS="$ac_save_ifs"
8115 else
8116 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8117 fi
8118 fi
8119
8120 LD="$acl_cv_path_LD"
8121 if test -n "$LD"; then
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8123 $as_echo "$LD" >&6; }
8124 else
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8126 $as_echo "no" >&6; }
8127 fi
8128 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8130 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8131 if ${acl_cv_prog_gnu_ld+:} false; then :
8132 $as_echo_n "(cached) " >&6
8133 else
8134 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8135 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8136 acl_cv_prog_gnu_ld=yes
8137 else
8138 acl_cv_prog_gnu_ld=no
8139 fi
8140 fi
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8142 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8143 with_gnu_ld=$acl_cv_prog_gnu_ld
8144
8145
8146
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8148 $as_echo_n "checking for shared library run path origin... " >&6; }
8149 if ${acl_cv_rpath+:} false; then :
8150 $as_echo_n "(cached) " >&6
8151 else
8152
8153 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8154 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8155 . ./conftest.sh
8156 rm -f ./conftest.sh
8157 acl_cv_rpath=done
8158
8159 fi
8160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8161 $as_echo "$acl_cv_rpath" >&6; }
8162 wl="$acl_cv_wl"
8163 libext="$acl_cv_libext"
8164 shlibext="$acl_cv_shlibext"
8165 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8166 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8167 hardcode_direct="$acl_cv_hardcode_direct"
8168 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8169 # Check whether --enable-rpath was given.
8170 if test "${enable_rpath+set}" = set; then :
8171 enableval=$enable_rpath; :
8172 else
8173 enable_rpath=yes
8174 fi
8175
8176
8177
8178
8179
8180
8181
8182
8183 use_additional=yes
8184
8185 acl_save_prefix="$prefix"
8186 prefix="$acl_final_prefix"
8187 acl_save_exec_prefix="$exec_prefix"
8188 exec_prefix="$acl_final_exec_prefix"
8189
8190 eval additional_includedir=\"$includedir\"
8191 eval additional_libdir=\"$libdir\"
8192
8193 exec_prefix="$acl_save_exec_prefix"
8194 prefix="$acl_save_prefix"
8195
8196
8197 # Check whether --with-libiconv-prefix was given.
8198 if test "${with_libiconv_prefix+set}" = set; then :
8199 withval=$with_libiconv_prefix;
8200 if test "X$withval" = "Xno"; then
8201 use_additional=no
8202 else
8203 if test "X$withval" = "X"; then
8204
8205 acl_save_prefix="$prefix"
8206 prefix="$acl_final_prefix"
8207 acl_save_exec_prefix="$exec_prefix"
8208 exec_prefix="$acl_final_exec_prefix"
8209
8210 eval additional_includedir=\"$includedir\"
8211 eval additional_libdir=\"$libdir\"
8212
8213 exec_prefix="$acl_save_exec_prefix"
8214 prefix="$acl_save_prefix"
8215
8216 else
8217 additional_includedir="$withval/include"
8218 additional_libdir="$withval/lib"
8219 fi
8220 fi
8221
8222 fi
8223
8224
8225 # Check whether --with-libiconv-type was given.
8226 if test "${with_libiconv_type+set}" = set; then :
8227 withval=$with_libiconv_type; with_libiconv_type=$withval
8228 else
8229 with_libiconv_type=auto
8230 fi
8231
8232 lib_type=`eval echo \$with_libiconv_type`
8233
8234 LIBICONV=
8235 LTLIBICONV=
8236 INCICONV=
8237 rpathdirs=
8238 ltrpathdirs=
8239 names_already_handled=
8240 names_next_round='iconv '
8241 while test -n "$names_next_round"; do
8242 names_this_round="$names_next_round"
8243 names_next_round=
8244 for name in $names_this_round; do
8245 already_handled=
8246 for n in $names_already_handled; do
8247 if test "$n" = "$name"; then
8248 already_handled=yes
8249 break
8250 fi
8251 done
8252 if test -z "$already_handled"; then
8253 names_already_handled="$names_already_handled $name"
8254 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8255 eval value=\"\$HAVE_LIB$uppername\"
8256 if test -n "$value"; then
8257 if test "$value" = yes; then
8258 eval value=\"\$LIB$uppername\"
8259 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8260 eval value=\"\$LTLIB$uppername\"
8261 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8262 else
8263 :
8264 fi
8265 else
8266 found_dir=
8267 found_la=
8268 found_so=
8269 found_a=
8270 if test $use_additional = yes; then
8271 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8272 found_dir="$additional_libdir"
8273 found_so="$additional_libdir/lib$name.$shlibext"
8274 if test -f "$additional_libdir/lib$name.la"; then
8275 found_la="$additional_libdir/lib$name.la"
8276 fi
8277 elif test x$lib_type != xshared; then
8278 if test -f "$additional_libdir/lib$name.$libext"; then
8279 found_dir="$additional_libdir"
8280 found_a="$additional_libdir/lib$name.$libext"
8281 if test -f "$additional_libdir/lib$name.la"; then
8282 found_la="$additional_libdir/lib$name.la"
8283 fi
8284 fi
8285 fi
8286 fi
8287 if test "X$found_dir" = "X"; then
8288 for x in $LDFLAGS $LTLIBICONV; do
8289
8290 acl_save_prefix="$prefix"
8291 prefix="$acl_final_prefix"
8292 acl_save_exec_prefix="$exec_prefix"
8293 exec_prefix="$acl_final_exec_prefix"
8294 eval x=\"$x\"
8295 exec_prefix="$acl_save_exec_prefix"
8296 prefix="$acl_save_prefix"
8297
8298 case "$x" in
8299 -L*)
8300 dir=`echo "X$x" | sed -e 's/^X-L//'`
8301 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8302 found_dir="$dir"
8303 found_so="$dir/lib$name.$shlibext"
8304 if test -f "$dir/lib$name.la"; then
8305 found_la="$dir/lib$name.la"
8306 fi
8307 elif test x$lib_type != xshared; then
8308 if test -f "$dir/lib$name.$libext"; then
8309 found_dir="$dir"
8310 found_a="$dir/lib$name.$libext"
8311 if test -f "$dir/lib$name.la"; then
8312 found_la="$dir/lib$name.la"
8313 fi
8314 fi
8315 fi
8316 ;;
8317 esac
8318 if test "X$found_dir" != "X"; then
8319 break
8320 fi
8321 done
8322 fi
8323 if test "X$found_dir" != "X"; then
8324 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8325 if test "X$found_so" != "X"; then
8326 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8327 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8328 else
8329 haveit=
8330 for x in $ltrpathdirs; do
8331 if test "X$x" = "X$found_dir"; then
8332 haveit=yes
8333 break
8334 fi
8335 done
8336 if test -z "$haveit"; then
8337 ltrpathdirs="$ltrpathdirs $found_dir"
8338 fi
8339 if test "$hardcode_direct" = yes; then
8340 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8341 else
8342 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8343 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8344 haveit=
8345 for x in $rpathdirs; do
8346 if test "X$x" = "X$found_dir"; then
8347 haveit=yes
8348 break
8349 fi
8350 done
8351 if test -z "$haveit"; then
8352 rpathdirs="$rpathdirs $found_dir"
8353 fi
8354 else
8355 haveit=
8356 for x in $LDFLAGS $LIBICONV; do
8357
8358 acl_save_prefix="$prefix"
8359 prefix="$acl_final_prefix"
8360 acl_save_exec_prefix="$exec_prefix"
8361 exec_prefix="$acl_final_exec_prefix"
8362 eval x=\"$x\"
8363 exec_prefix="$acl_save_exec_prefix"
8364 prefix="$acl_save_prefix"
8365
8366 if test "X$x" = "X-L$found_dir"; then
8367 haveit=yes
8368 break
8369 fi
8370 done
8371 if test -z "$haveit"; then
8372 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8373 fi
8374 if test "$hardcode_minus_L" != no; then
8375 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8376 else
8377 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8378 fi
8379 fi
8380 fi
8381 fi
8382 else
8383 if test "X$found_a" != "X"; then
8384 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8385 else
8386 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8387 fi
8388 fi
8389 additional_includedir=
8390 case "$found_dir" in
8391 */lib | */lib/)
8392 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8393 additional_includedir="$basedir/include"
8394 ;;
8395 esac
8396 if test "X$additional_includedir" != "X"; then
8397 if test "X$additional_includedir" != "X/usr/include"; then
8398 haveit=
8399 if test "X$additional_includedir" = "X/usr/local/include"; then
8400 if test -n "$GCC"; then
8401 case $host_os in
8402 linux*) haveit=yes;;
8403 esac
8404 fi
8405 fi
8406 if test -z "$haveit"; then
8407 for x in $CPPFLAGS $INCICONV; do
8408
8409 acl_save_prefix="$prefix"
8410 prefix="$acl_final_prefix"
8411 acl_save_exec_prefix="$exec_prefix"
8412 exec_prefix="$acl_final_exec_prefix"
8413 eval x=\"$x\"
8414 exec_prefix="$acl_save_exec_prefix"
8415 prefix="$acl_save_prefix"
8416
8417 if test "X$x" = "X-I$additional_includedir"; then
8418 haveit=yes
8419 break
8420 fi
8421 done
8422 if test -z "$haveit"; then
8423 if test -d "$additional_includedir"; then
8424 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8425 fi
8426 fi
8427 fi
8428 fi
8429 fi
8430 if test -n "$found_la"; then
8431 save_libdir="$libdir"
8432 case "$found_la" in
8433 */* | *\\*) . "$found_la" ;;
8434 *) . "./$found_la" ;;
8435 esac
8436 libdir="$save_libdir"
8437 for dep in $dependency_libs; do
8438 case "$dep" in
8439 -L*)
8440 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8441 if test "X$additional_libdir" != "X/usr/lib"; then
8442 haveit=
8443 if test "X$additional_libdir" = "X/usr/local/lib"; then
8444 if test -n "$GCC"; then
8445 case $host_os in
8446 linux*) haveit=yes;;
8447 esac
8448 fi
8449 fi
8450 if test -z "$haveit"; then
8451 haveit=
8452 for x in $LDFLAGS $LIBICONV; do
8453
8454 acl_save_prefix="$prefix"
8455 prefix="$acl_final_prefix"
8456 acl_save_exec_prefix="$exec_prefix"
8457 exec_prefix="$acl_final_exec_prefix"
8458 eval x=\"$x\"
8459 exec_prefix="$acl_save_exec_prefix"
8460 prefix="$acl_save_prefix"
8461
8462 if test "X$x" = "X-L$additional_libdir"; then
8463 haveit=yes
8464 break
8465 fi
8466 done
8467 if test -z "$haveit"; then
8468 if test -d "$additional_libdir"; then
8469 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8470 fi
8471 fi
8472 haveit=
8473 for x in $LDFLAGS $LTLIBICONV; do
8474
8475 acl_save_prefix="$prefix"
8476 prefix="$acl_final_prefix"
8477 acl_save_exec_prefix="$exec_prefix"
8478 exec_prefix="$acl_final_exec_prefix"
8479 eval x=\"$x\"
8480 exec_prefix="$acl_save_exec_prefix"
8481 prefix="$acl_save_prefix"
8482
8483 if test "X$x" = "X-L$additional_libdir"; then
8484 haveit=yes
8485 break
8486 fi
8487 done
8488 if test -z "$haveit"; then
8489 if test -d "$additional_libdir"; then
8490 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8491 fi
8492 fi
8493 fi
8494 fi
8495 ;;
8496 -R*)
8497 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8498 if test "$enable_rpath" != no; then
8499 haveit=
8500 for x in $rpathdirs; do
8501 if test "X$x" = "X$dir"; then
8502 haveit=yes
8503 break
8504 fi
8505 done
8506 if test -z "$haveit"; then
8507 rpathdirs="$rpathdirs $dir"
8508 fi
8509 haveit=
8510 for x in $ltrpathdirs; do
8511 if test "X$x" = "X$dir"; then
8512 haveit=yes
8513 break
8514 fi
8515 done
8516 if test -z "$haveit"; then
8517 ltrpathdirs="$ltrpathdirs $dir"
8518 fi
8519 fi
8520 ;;
8521 -l*)
8522 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8523 ;;
8524 *.la)
8525 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8526 ;;
8527 *)
8528 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8529 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8530 ;;
8531 esac
8532 done
8533 fi
8534 else
8535 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8536 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8537 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8538 else
8539 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8540 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8541 fi
8542 fi
8543 fi
8544 fi
8545 done
8546 done
8547 if test "X$rpathdirs" != "X"; then
8548 if test -n "$hardcode_libdir_separator"; then
8549 alldirs=
8550 for found_dir in $rpathdirs; do
8551 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8552 done
8553 acl_save_libdir="$libdir"
8554 libdir="$alldirs"
8555 eval flag=\"$hardcode_libdir_flag_spec\"
8556 libdir="$acl_save_libdir"
8557 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8558 else
8559 for found_dir in $rpathdirs; do
8560 acl_save_libdir="$libdir"
8561 libdir="$found_dir"
8562 eval flag=\"$hardcode_libdir_flag_spec\"
8563 libdir="$acl_save_libdir"
8564 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8565 done
8566 fi
8567 fi
8568 if test "X$ltrpathdirs" != "X"; then
8569 for found_dir in $ltrpathdirs; do
8570 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8571 done
8572 fi
8573
8574
8575
8576
8577
8578
8579
8580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8581 $as_echo_n "checking for iconv... " >&6; }
8582 if ${am_cv_func_iconv+:} false; then :
8583 $as_echo_n "(cached) " >&6
8584 else
8585
8586 am_cv_func_iconv="no, consider installing GNU libiconv"
8587 am_cv_lib_iconv=no
8588 am_save_CPPFLAGS="$CPPFLAGS"
8589 CPPFLAGS="$CPPFLAGS $INCICONV"
8590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8591 /* end confdefs.h. */
8592 #include <stdlib.h>
8593 #include <iconv.h>
8594 int
8595 main ()
8596 {
8597 iconv_t cd = iconv_open("","");
8598 iconv(cd,NULL,NULL,NULL,NULL);
8599 iconv_close(cd);
8600 ;
8601 return 0;
8602 }
8603 _ACEOF
8604 if ac_fn_c_try_link "$LINENO"; then :
8605 am_cv_func_iconv=yes
8606 fi
8607 rm -f core conftest.err conftest.$ac_objext \
8608 conftest$ac_exeext conftest.$ac_ext
8609 CPPFLAGS="$am_save_CPPFLAGS"
8610
8611 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8612 for _libs in .libs _libs; do
8613 am_save_CPPFLAGS="$CPPFLAGS"
8614 am_save_LIBS="$LIBS"
8615 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8616 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8618 /* end confdefs.h. */
8619 #include <stdlib.h>
8620 #include <iconv.h>
8621 int
8622 main ()
8623 {
8624 iconv_t cd = iconv_open("","");
8625 iconv(cd,NULL,NULL,NULL,NULL);
8626 iconv_close(cd);
8627 ;
8628 return 0;
8629 }
8630 _ACEOF
8631 if ac_fn_c_try_link "$LINENO"; then :
8632 INCICONV="-I../libiconv/include"
8633 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8634 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8635 am_cv_lib_iconv=yes
8636 am_cv_func_iconv=yes
8637 fi
8638 rm -f core conftest.err conftest.$ac_objext \
8639 conftest$ac_exeext conftest.$ac_ext
8640 CPPFLAGS="$am_save_CPPFLAGS"
8641 LIBS="$am_save_LIBS"
8642 if test "$am_cv_func_iconv" = "yes"; then
8643 break
8644 fi
8645 done
8646 fi
8647
8648 if test "$am_cv_func_iconv" != yes; then
8649 am_save_CPPFLAGS="$CPPFLAGS"
8650 am_save_LIBS="$LIBS"
8651 CPPFLAGS="$CPPFLAGS $INCICONV"
8652 LIBS="$LIBS $LIBICONV"
8653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8654 /* end confdefs.h. */
8655 #include <stdlib.h>
8656 #include <iconv.h>
8657 int
8658 main ()
8659 {
8660 iconv_t cd = iconv_open("","");
8661 iconv(cd,NULL,NULL,NULL,NULL);
8662 iconv_close(cd);
8663 ;
8664 return 0;
8665 }
8666 _ACEOF
8667 if ac_fn_c_try_link "$LINENO"; then :
8668 am_cv_lib_iconv=yes
8669 am_cv_func_iconv=yes
8670 fi
8671 rm -f core conftest.err conftest.$ac_objext \
8672 conftest$ac_exeext conftest.$ac_ext
8673 CPPFLAGS="$am_save_CPPFLAGS"
8674 LIBS="$am_save_LIBS"
8675 fi
8676
8677 fi
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8679 $as_echo "$am_cv_func_iconv" >&6; }
8680 if test "$am_cv_func_iconv" = yes; then
8681
8682 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8683
8684 fi
8685 if test "$am_cv_lib_iconv" = yes; then
8686
8687 for element in $INCICONV; do
8688 haveit=
8689 for x in $CPPFLAGS; do
8690
8691 acl_save_prefix="$prefix"
8692 prefix="$acl_final_prefix"
8693 acl_save_exec_prefix="$exec_prefix"
8694 exec_prefix="$acl_final_exec_prefix"
8695 eval x=\"$x\"
8696 exec_prefix="$acl_save_exec_prefix"
8697 prefix="$acl_save_prefix"
8698
8699 if test "X$x" = "X$element"; then
8700 haveit=yes
8701 break
8702 fi
8703 done
8704 if test -z "$haveit"; then
8705 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8706 fi
8707 done
8708
8709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8710 $as_echo_n "checking how to link with libiconv... " >&6; }
8711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8712 $as_echo "$LIBICONV" >&6; }
8713 else
8714 LIBICONV=
8715 LTLIBICONV=
8716 fi
8717
8718
8719
8720 if test "$am_cv_func_iconv" = yes; then
8721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8722 $as_echo_n "checking for iconv declaration... " >&6; }
8723 if ${am_cv_proto_iconv+:} false; then :
8724 $as_echo_n "(cached) " >&6
8725 else
8726
8727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8728 /* end confdefs.h. */
8729
8730 #include <stdlib.h>
8731 #include <iconv.h>
8732 extern
8733 #ifdef __cplusplus
8734 "C"
8735 #endif
8736 #if defined(__STDC__) || defined(__cplusplus)
8737 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8738 #else
8739 size_t iconv();
8740 #endif
8741
8742 int
8743 main ()
8744 {
8745
8746 ;
8747 return 0;
8748 }
8749 _ACEOF
8750 if ac_fn_c_try_compile "$LINENO"; then :
8751 am_cv_proto_iconv_arg1=""
8752 else
8753 am_cv_proto_iconv_arg1="const"
8754 fi
8755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8756 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);"
8757 fi
8758
8759 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8761 }$am_cv_proto_iconv" >&5
8762 $as_echo "${ac_t:-
8763 }$am_cv_proto_iconv" >&6; }
8764
8765 cat >>confdefs.h <<_ACEOF
8766 #define ICONV_CONST $am_cv_proto_iconv_arg1
8767 _ACEOF
8768
8769 fi
8770
8771
8772 # GDB may fork/exec the iconv program to get the list of supported character
8773 # sets. Allow the user to specify where to find it.
8774 # There are several factors affecting the choice of option name:
8775 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8776 # the build-time location of libiconv files.
8777 # - The program we need to find is iconv, which comes with glibc. The user
8778 # doesn't necessarily have libiconv installed. Therefore naming this
8779 # --with-libiconv-foo feels wrong.
8780 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8781 # defined to work on directories not files (though it really doesn't know
8782 # the difference).
8783 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8784 # with --with-libiconv-prefix.
8785 # Putting these together is why the option name is --with-iconv-bin.
8786
8787
8788 # Check whether --with-iconv-bin was given.
8789 if test "${with_iconv_bin+set}" = set; then :
8790 withval=$with_iconv_bin; iconv_bin="${withval}"
8791
8792 cat >>confdefs.h <<_ACEOF
8793 #define ICONV_BIN "${iconv_bin}"
8794 _ACEOF
8795
8796
8797 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8798 if test "x$prefix" = xNONE; then
8799 test_prefix=/usr/local
8800 else
8801 test_prefix=$prefix
8802 fi
8803 else
8804 test_prefix=$exec_prefix
8805 fi
8806 value=0
8807 case ${iconv_bin} in
8808 "${test_prefix}"|"${test_prefix}/"*|\
8809 '${exec_prefix}'|'${exec_prefix}/'*)
8810 value=1
8811 ;;
8812 esac
8813
8814 cat >>confdefs.h <<_ACEOF
8815 #define ICONV_BIN_RELOCATABLE $value
8816 _ACEOF
8817
8818
8819
8820 fi
8821
8822
8823 # For the TUI, we need enhanced curses functionality.
8824 if test x"$enable_tui" != xno; then
8825 prefer_curses=yes
8826 fi
8827
8828 curses_found=no
8829 if test x"$prefer_curses" = xyes; then
8830 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8831 # curses library because the latter might not provide all the
8832 # functionality we need. However, this leads to problems on systems
8833 # where the linker searches /usr/local/lib, but the compiler doesn't
8834 # search /usr/local/include, if ncurses is installed in /usr/local. A
8835 # default installation of ncurses on alpha*-dec-osf* will lead to such
8836 # a situation.
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8838 $as_echo_n "checking for library containing waddstr... " >&6; }
8839 if ${ac_cv_search_waddstr+:} false; then :
8840 $as_echo_n "(cached) " >&6
8841 else
8842 ac_func_search_save_LIBS=$LIBS
8843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8844 /* end confdefs.h. */
8845
8846 /* Override any GCC internal prototype to avoid an error.
8847 Use char because int might match the return type of a GCC
8848 builtin and then its argument prototype would still apply. */
8849 #ifdef __cplusplus
8850 extern "C"
8851 #endif
8852 char waddstr ();
8853 int
8854 main ()
8855 {
8856 return waddstr ();
8857 ;
8858 return 0;
8859 }
8860 _ACEOF
8861 for ac_lib in '' ncursesw ncurses cursesX curses; do
8862 if test -z "$ac_lib"; then
8863 ac_res="none required"
8864 else
8865 ac_res=-l$ac_lib
8866 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8867 fi
8868 if ac_fn_c_try_link "$LINENO"; then :
8869 ac_cv_search_waddstr=$ac_res
8870 fi
8871 rm -f core conftest.err conftest.$ac_objext \
8872 conftest$ac_exeext
8873 if ${ac_cv_search_waddstr+:} false; then :
8874 break
8875 fi
8876 done
8877 if ${ac_cv_search_waddstr+:} false; then :
8878
8879 else
8880 ac_cv_search_waddstr=no
8881 fi
8882 rm conftest.$ac_ext
8883 LIBS=$ac_func_search_save_LIBS
8884 fi
8885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8886 $as_echo "$ac_cv_search_waddstr" >&6; }
8887 ac_res=$ac_cv_search_waddstr
8888 if test "$ac_res" != no; then :
8889 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8890
8891 fi
8892
8893
8894 if test "$ac_cv_search_waddstr" != no; then
8895 curses_found=yes
8896 fi
8897 fi
8898
8899 # Check whether we should enable the TUI, but only do so if we really
8900 # can.
8901 if test x"$enable_tui" != xno; then
8902 if test -d "$srcdir/tui"; then
8903 if test "$curses_found" != no; then
8904 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8905 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8906 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8907 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8908 else
8909 if test x"$enable_tui" = xyes; then
8910 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8911 else
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8913 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8914 fi
8915 fi
8916 fi
8917 fi
8918
8919 # Since GDB uses Readline, we need termcap functionality. In many
8920 # cases this will be provided by the curses library, but some systems
8921 # have a separate termcap library, or no curses library at all.
8922
8923 case $host_os in
8924 cygwin*)
8925 if test -d "$srcdir/libtermcap"; then
8926 LIBS="../libtermcap/libtermcap.a $LIBS"
8927 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8928 fi ;;
8929 go32* | *djgpp*)
8930 ac_cv_search_tgetent="none required"
8931 ;;
8932 esac
8933
8934 # These are the libraries checked by Readline.
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8936 $as_echo_n "checking for library containing tgetent... " >&6; }
8937 if ${ac_cv_search_tgetent+:} false; then :
8938 $as_echo_n "(cached) " >&6
8939 else
8940 ac_func_search_save_LIBS=$LIBS
8941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8942 /* end confdefs.h. */
8943
8944 /* Override any GCC internal prototype to avoid an error.
8945 Use char because int might match the return type of a GCC
8946 builtin and then its argument prototype would still apply. */
8947 #ifdef __cplusplus
8948 extern "C"
8949 #endif
8950 char tgetent ();
8951 int
8952 main ()
8953 {
8954 return tgetent ();
8955 ;
8956 return 0;
8957 }
8958 _ACEOF
8959 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
8960 if test -z "$ac_lib"; then
8961 ac_res="none required"
8962 else
8963 ac_res=-l$ac_lib
8964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8965 fi
8966 if ac_fn_c_try_link "$LINENO"; then :
8967 ac_cv_search_tgetent=$ac_res
8968 fi
8969 rm -f core conftest.err conftest.$ac_objext \
8970 conftest$ac_exeext
8971 if ${ac_cv_search_tgetent+:} false; then :
8972 break
8973 fi
8974 done
8975 if ${ac_cv_search_tgetent+:} false; then :
8976
8977 else
8978 ac_cv_search_tgetent=no
8979 fi
8980 rm conftest.$ac_ext
8981 LIBS=$ac_func_search_save_LIBS
8982 fi
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8984 $as_echo "$ac_cv_search_tgetent" >&6; }
8985 ac_res=$ac_cv_search_tgetent
8986 if test "$ac_res" != no; then :
8987 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8988
8989 fi
8990
8991
8992 if test "$ac_cv_search_tgetent" = no; then
8993 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8994 fi
8995
8996
8997 # Check whether --with-system-readline was given.
8998 if test "${with_system_readline+set}" = set; then :
8999 withval=$with_system_readline;
9000 fi
9001
9002
9003 if test "$with_system_readline" = yes; then
9004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9005 $as_echo_n "checking whether system readline is new enough... " >&6; }
9006 if ${gdb_cv_readline_ok+:} false; then :
9007 $as_echo_n "(cached) " >&6
9008 else
9009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9010 /* end confdefs.h. */
9011 #include <stdio.h>
9012 #include <readline/readline.h>
9013 int
9014 main ()
9015 {
9016 #if RL_VERSION_MAJOR < 7
9017 # error "readline version 7 required"
9018 #endif
9019 ;
9020 return 0;
9021 }
9022 _ACEOF
9023 if ac_fn_c_try_compile "$LINENO"; then :
9024 gdb_cv_readline_ok=yes
9025 else
9026 gdb_cv_readline_ok=no
9027 fi
9028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9029 fi
9030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9031 $as_echo "$gdb_cv_readline_ok" >&6; }
9032 if test "$gdb_cv_readline_ok" != yes; then
9033 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9034 fi
9035
9036 READLINE=-lreadline
9037 READLINE_DEPS=
9038 READLINE_CFLAGS=
9039 READLINE_TEXI_INCFLAG=
9040 else
9041 READLINE='$(READLINE_DIR)/libreadline.a'
9042 READLINE_DEPS='$(READLINE)'
9043 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9044 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9045 fi
9046
9047
9048
9049
9050
9051 # Generate jit-reader.h
9052
9053 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9054 TARGET_PTR=
9055
9056 # The cast to long int works around a bug in the HP C Compiler
9057 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9058 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9059 # This bug is HP SR number 8606223364.
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9061 $as_echo_n "checking size of unsigned long long... " >&6; }
9062 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9063 $as_echo_n "(cached) " >&6
9064 else
9065 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9066
9067 else
9068 if test "$ac_cv_type_unsigned_long_long" = yes; then
9069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9070 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9071 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9072 See \`config.log' for more details" "$LINENO" 5; }
9073 else
9074 ac_cv_sizeof_unsigned_long_long=0
9075 fi
9076 fi
9077
9078 fi
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9080 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9081
9082
9083
9084 cat >>confdefs.h <<_ACEOF
9085 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9086 _ACEOF
9087
9088
9089 # The cast to long int works around a bug in the HP C Compiler
9090 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9091 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9092 # This bug is HP SR number 8606223364.
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9094 $as_echo_n "checking size of unsigned long... " >&6; }
9095 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9096 $as_echo_n "(cached) " >&6
9097 else
9098 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9099
9100 else
9101 if test "$ac_cv_type_unsigned_long" = yes; then
9102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9103 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9104 as_fn_error 77 "cannot compute sizeof (unsigned long)
9105 See \`config.log' for more details" "$LINENO" 5; }
9106 else
9107 ac_cv_sizeof_unsigned_long=0
9108 fi
9109 fi
9110
9111 fi
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9113 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9114
9115
9116
9117 cat >>confdefs.h <<_ACEOF
9118 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9119 _ACEOF
9120
9121
9122 # The cast to long int works around a bug in the HP C Compiler
9123 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9124 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9125 # This bug is HP SR number 8606223364.
9126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9127 $as_echo_n "checking size of unsigned __int128... " >&6; }
9128 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9129 $as_echo_n "(cached) " >&6
9130 else
9131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9132
9133 else
9134 if test "$ac_cv_type_unsigned___int128" = yes; then
9135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9136 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9137 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9138 See \`config.log' for more details" "$LINENO" 5; }
9139 else
9140 ac_cv_sizeof_unsigned___int128=0
9141 fi
9142 fi
9143
9144 fi
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9146 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9147
9148
9149
9150 cat >>confdefs.h <<_ACEOF
9151 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9152 _ACEOF
9153
9154
9155
9156 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9157 TARGET_PTR="unsigned long"
9158 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9159 TARGET_PTR="unsigned long long"
9160 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9161 TARGET_PTR="unsigned __int128"
9162 else
9163 TARGET_PTR="unsigned long"
9164 fi
9165
9166
9167 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9168
9169
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9171 $as_echo_n "checking for library containing dlopen... " >&6; }
9172 if ${ac_cv_search_dlopen+:} false; then :
9173 $as_echo_n "(cached) " >&6
9174 else
9175 ac_func_search_save_LIBS=$LIBS
9176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9177 /* end confdefs.h. */
9178
9179 /* Override any GCC internal prototype to avoid an error.
9180 Use char because int might match the return type of a GCC
9181 builtin and then its argument prototype would still apply. */
9182 #ifdef __cplusplus
9183 extern "C"
9184 #endif
9185 char dlopen ();
9186 int
9187 main ()
9188 {
9189 return dlopen ();
9190 ;
9191 return 0;
9192 }
9193 _ACEOF
9194 for ac_lib in '' dl; do
9195 if test -z "$ac_lib"; then
9196 ac_res="none required"
9197 else
9198 ac_res=-l$ac_lib
9199 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9200 fi
9201 if ac_fn_c_try_link "$LINENO"; then :
9202 ac_cv_search_dlopen=$ac_res
9203 fi
9204 rm -f core conftest.err conftest.$ac_objext \
9205 conftest$ac_exeext
9206 if ${ac_cv_search_dlopen+:} false; then :
9207 break
9208 fi
9209 done
9210 if ${ac_cv_search_dlopen+:} false; then :
9211
9212 else
9213 ac_cv_search_dlopen=no
9214 fi
9215 rm conftest.$ac_ext
9216 LIBS=$ac_func_search_save_LIBS
9217 fi
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9219 $as_echo "$ac_cv_search_dlopen" >&6; }
9220 ac_res=$ac_cv_search_dlopen
9221 if test "$ac_res" != no; then :
9222 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9223
9224 fi
9225
9226
9227
9228
9229 # Check whether --with-jit-reader-dir was given.
9230 if test "${with_jit_reader_dir+set}" = set; then :
9231 withval=$with_jit_reader_dir;
9232 JIT_READER_DIR=$withval
9233 else
9234 JIT_READER_DIR=${libdir}/gdb
9235 fi
9236
9237
9238 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9239 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9240 ac_define_dir=`eval echo $JIT_READER_DIR`
9241 ac_define_dir=`eval echo $ac_define_dir`
9242
9243 cat >>confdefs.h <<_ACEOF
9244 #define JIT_READER_DIR "$ac_define_dir"
9245 _ACEOF
9246
9247
9248
9249
9250 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9251 if test "x$prefix" = xNONE; then
9252 test_prefix=/usr/local
9253 else
9254 test_prefix=$prefix
9255 fi
9256 else
9257 test_prefix=$exec_prefix
9258 fi
9259 value=0
9260 case ${ac_define_dir} in
9261 "${test_prefix}"|"${test_prefix}/"*|\
9262 '${exec_prefix}'|'${exec_prefix}/'*)
9263 value=1
9264 ;;
9265 esac
9266
9267 cat >>confdefs.h <<_ACEOF
9268 #define JIT_READER_DIR_RELOCATABLE $value
9269 _ACEOF
9270
9271
9272
9273
9274
9275 # Check whether --with-expat was given.
9276 if test "${with_expat+set}" = set; then :
9277 withval=$with_expat;
9278 else
9279 with_expat=auto
9280 fi
9281
9282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9283 $as_echo_n "checking whether to use expat... " >&6; }
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9285 $as_echo "$with_expat" >&6; }
9286
9287 if test "${with_expat}" = no; then
9288 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9289 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9290 HAVE_LIBEXPAT=no
9291 else
9292
9293
9294
9295
9296
9297
9298
9299
9300 use_additional=yes
9301
9302 acl_save_prefix="$prefix"
9303 prefix="$acl_final_prefix"
9304 acl_save_exec_prefix="$exec_prefix"
9305 exec_prefix="$acl_final_exec_prefix"
9306
9307 eval additional_includedir=\"$includedir\"
9308 eval additional_libdir=\"$libdir\"
9309
9310 exec_prefix="$acl_save_exec_prefix"
9311 prefix="$acl_save_prefix"
9312
9313
9314 # Check whether --with-libexpat-prefix was given.
9315 if test "${with_libexpat_prefix+set}" = set; then :
9316 withval=$with_libexpat_prefix;
9317 if test "X$withval" = "Xno"; then
9318 use_additional=no
9319 else
9320 if test "X$withval" = "X"; then
9321
9322 acl_save_prefix="$prefix"
9323 prefix="$acl_final_prefix"
9324 acl_save_exec_prefix="$exec_prefix"
9325 exec_prefix="$acl_final_exec_prefix"
9326
9327 eval additional_includedir=\"$includedir\"
9328 eval additional_libdir=\"$libdir\"
9329
9330 exec_prefix="$acl_save_exec_prefix"
9331 prefix="$acl_save_prefix"
9332
9333 else
9334 additional_includedir="$withval/include"
9335 additional_libdir="$withval/lib"
9336 fi
9337 fi
9338
9339 fi
9340
9341
9342 # Check whether --with-libexpat-type was given.
9343 if test "${with_libexpat_type+set}" = set; then :
9344 withval=$with_libexpat_type; with_libexpat_type=$withval
9345 else
9346 with_libexpat_type=auto
9347 fi
9348
9349 lib_type=`eval echo \$with_libexpat_type`
9350
9351 LIBEXPAT=
9352 LTLIBEXPAT=
9353 INCEXPAT=
9354 rpathdirs=
9355 ltrpathdirs=
9356 names_already_handled=
9357 names_next_round='expat '
9358 while test -n "$names_next_round"; do
9359 names_this_round="$names_next_round"
9360 names_next_round=
9361 for name in $names_this_round; do
9362 already_handled=
9363 for n in $names_already_handled; do
9364 if test "$n" = "$name"; then
9365 already_handled=yes
9366 break
9367 fi
9368 done
9369 if test -z "$already_handled"; then
9370 names_already_handled="$names_already_handled $name"
9371 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9372 eval value=\"\$HAVE_LIB$uppername\"
9373 if test -n "$value"; then
9374 if test "$value" = yes; then
9375 eval value=\"\$LIB$uppername\"
9376 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9377 eval value=\"\$LTLIB$uppername\"
9378 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9379 else
9380 :
9381 fi
9382 else
9383 found_dir=
9384 found_la=
9385 found_so=
9386 found_a=
9387 if test $use_additional = yes; then
9388 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9389 found_dir="$additional_libdir"
9390 found_so="$additional_libdir/lib$name.$shlibext"
9391 if test -f "$additional_libdir/lib$name.la"; then
9392 found_la="$additional_libdir/lib$name.la"
9393 fi
9394 elif test x$lib_type != xshared; then
9395 if test -f "$additional_libdir/lib$name.$libext"; then
9396 found_dir="$additional_libdir"
9397 found_a="$additional_libdir/lib$name.$libext"
9398 if test -f "$additional_libdir/lib$name.la"; then
9399 found_la="$additional_libdir/lib$name.la"
9400 fi
9401 fi
9402 fi
9403 fi
9404 if test "X$found_dir" = "X"; then
9405 for x in $LDFLAGS $LTLIBEXPAT; do
9406
9407 acl_save_prefix="$prefix"
9408 prefix="$acl_final_prefix"
9409 acl_save_exec_prefix="$exec_prefix"
9410 exec_prefix="$acl_final_exec_prefix"
9411 eval x=\"$x\"
9412 exec_prefix="$acl_save_exec_prefix"
9413 prefix="$acl_save_prefix"
9414
9415 case "$x" in
9416 -L*)
9417 dir=`echo "X$x" | sed -e 's/^X-L//'`
9418 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9419 found_dir="$dir"
9420 found_so="$dir/lib$name.$shlibext"
9421 if test -f "$dir/lib$name.la"; then
9422 found_la="$dir/lib$name.la"
9423 fi
9424 elif test x$lib_type != xshared; then
9425 if test -f "$dir/lib$name.$libext"; then
9426 found_dir="$dir"
9427 found_a="$dir/lib$name.$libext"
9428 if test -f "$dir/lib$name.la"; then
9429 found_la="$dir/lib$name.la"
9430 fi
9431 fi
9432 fi
9433 ;;
9434 esac
9435 if test "X$found_dir" != "X"; then
9436 break
9437 fi
9438 done
9439 fi
9440 if test "X$found_dir" != "X"; then
9441 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9442 if test "X$found_so" != "X"; then
9443 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9444 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9445 else
9446 haveit=
9447 for x in $ltrpathdirs; do
9448 if test "X$x" = "X$found_dir"; then
9449 haveit=yes
9450 break
9451 fi
9452 done
9453 if test -z "$haveit"; then
9454 ltrpathdirs="$ltrpathdirs $found_dir"
9455 fi
9456 if test "$hardcode_direct" = yes; then
9457 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9458 else
9459 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9460 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9461 haveit=
9462 for x in $rpathdirs; do
9463 if test "X$x" = "X$found_dir"; then
9464 haveit=yes
9465 break
9466 fi
9467 done
9468 if test -z "$haveit"; then
9469 rpathdirs="$rpathdirs $found_dir"
9470 fi
9471 else
9472 haveit=
9473 for x in $LDFLAGS $LIBEXPAT; do
9474
9475 acl_save_prefix="$prefix"
9476 prefix="$acl_final_prefix"
9477 acl_save_exec_prefix="$exec_prefix"
9478 exec_prefix="$acl_final_exec_prefix"
9479 eval x=\"$x\"
9480 exec_prefix="$acl_save_exec_prefix"
9481 prefix="$acl_save_prefix"
9482
9483 if test "X$x" = "X-L$found_dir"; then
9484 haveit=yes
9485 break
9486 fi
9487 done
9488 if test -z "$haveit"; then
9489 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9490 fi
9491 if test "$hardcode_minus_L" != no; then
9492 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9493 else
9494 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9495 fi
9496 fi
9497 fi
9498 fi
9499 else
9500 if test "X$found_a" != "X"; then
9501 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9502 else
9503 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9504 fi
9505 fi
9506 additional_includedir=
9507 case "$found_dir" in
9508 */lib | */lib/)
9509 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9510 additional_includedir="$basedir/include"
9511 ;;
9512 esac
9513 if test "X$additional_includedir" != "X"; then
9514 if test "X$additional_includedir" != "X/usr/include"; then
9515 haveit=
9516 if test "X$additional_includedir" = "X/usr/local/include"; then
9517 if test -n "$GCC"; then
9518 case $host_os in
9519 linux*) haveit=yes;;
9520 esac
9521 fi
9522 fi
9523 if test -z "$haveit"; then
9524 for x in $CPPFLAGS $INCEXPAT; do
9525
9526 acl_save_prefix="$prefix"
9527 prefix="$acl_final_prefix"
9528 acl_save_exec_prefix="$exec_prefix"
9529 exec_prefix="$acl_final_exec_prefix"
9530 eval x=\"$x\"
9531 exec_prefix="$acl_save_exec_prefix"
9532 prefix="$acl_save_prefix"
9533
9534 if test "X$x" = "X-I$additional_includedir"; then
9535 haveit=yes
9536 break
9537 fi
9538 done
9539 if test -z "$haveit"; then
9540 if test -d "$additional_includedir"; then
9541 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9542 fi
9543 fi
9544 fi
9545 fi
9546 fi
9547 if test -n "$found_la"; then
9548 save_libdir="$libdir"
9549 case "$found_la" in
9550 */* | *\\*) . "$found_la" ;;
9551 *) . "./$found_la" ;;
9552 esac
9553 libdir="$save_libdir"
9554 for dep in $dependency_libs; do
9555 case "$dep" in
9556 -L*)
9557 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9558 if test "X$additional_libdir" != "X/usr/lib"; then
9559 haveit=
9560 if test "X$additional_libdir" = "X/usr/local/lib"; then
9561 if test -n "$GCC"; then
9562 case $host_os in
9563 linux*) haveit=yes;;
9564 esac
9565 fi
9566 fi
9567 if test -z "$haveit"; then
9568 haveit=
9569 for x in $LDFLAGS $LIBEXPAT; do
9570
9571 acl_save_prefix="$prefix"
9572 prefix="$acl_final_prefix"
9573 acl_save_exec_prefix="$exec_prefix"
9574 exec_prefix="$acl_final_exec_prefix"
9575 eval x=\"$x\"
9576 exec_prefix="$acl_save_exec_prefix"
9577 prefix="$acl_save_prefix"
9578
9579 if test "X$x" = "X-L$additional_libdir"; then
9580 haveit=yes
9581 break
9582 fi
9583 done
9584 if test -z "$haveit"; then
9585 if test -d "$additional_libdir"; then
9586 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9587 fi
9588 fi
9589 haveit=
9590 for x in $LDFLAGS $LTLIBEXPAT; do
9591
9592 acl_save_prefix="$prefix"
9593 prefix="$acl_final_prefix"
9594 acl_save_exec_prefix="$exec_prefix"
9595 exec_prefix="$acl_final_exec_prefix"
9596 eval x=\"$x\"
9597 exec_prefix="$acl_save_exec_prefix"
9598 prefix="$acl_save_prefix"
9599
9600 if test "X$x" = "X-L$additional_libdir"; then
9601 haveit=yes
9602 break
9603 fi
9604 done
9605 if test -z "$haveit"; then
9606 if test -d "$additional_libdir"; then
9607 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9608 fi
9609 fi
9610 fi
9611 fi
9612 ;;
9613 -R*)
9614 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9615 if test "$enable_rpath" != no; then
9616 haveit=
9617 for x in $rpathdirs; do
9618 if test "X$x" = "X$dir"; then
9619 haveit=yes
9620 break
9621 fi
9622 done
9623 if test -z "$haveit"; then
9624 rpathdirs="$rpathdirs $dir"
9625 fi
9626 haveit=
9627 for x in $ltrpathdirs; do
9628 if test "X$x" = "X$dir"; then
9629 haveit=yes
9630 break
9631 fi
9632 done
9633 if test -z "$haveit"; then
9634 ltrpathdirs="$ltrpathdirs $dir"
9635 fi
9636 fi
9637 ;;
9638 -l*)
9639 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9640 ;;
9641 *.la)
9642 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9643 ;;
9644 *)
9645 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9646 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9647 ;;
9648 esac
9649 done
9650 fi
9651 else
9652 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9653 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9654 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9655 else
9656 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9657 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9658 fi
9659 fi
9660 fi
9661 fi
9662 done
9663 done
9664 if test "X$rpathdirs" != "X"; then
9665 if test -n "$hardcode_libdir_separator"; then
9666 alldirs=
9667 for found_dir in $rpathdirs; do
9668 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9669 done
9670 acl_save_libdir="$libdir"
9671 libdir="$alldirs"
9672 eval flag=\"$hardcode_libdir_flag_spec\"
9673 libdir="$acl_save_libdir"
9674 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9675 else
9676 for found_dir in $rpathdirs; do
9677 acl_save_libdir="$libdir"
9678 libdir="$found_dir"
9679 eval flag=\"$hardcode_libdir_flag_spec\"
9680 libdir="$acl_save_libdir"
9681 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9682 done
9683 fi
9684 fi
9685 if test "X$ltrpathdirs" != "X"; then
9686 for found_dir in $ltrpathdirs; do
9687 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9688 done
9689 fi
9690
9691
9692 ac_save_CPPFLAGS="$CPPFLAGS"
9693
9694 for element in $INCEXPAT; do
9695 haveit=
9696 for x in $CPPFLAGS; do
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 eval x=\"$x\"
9703 exec_prefix="$acl_save_exec_prefix"
9704 prefix="$acl_save_prefix"
9705
9706 if test "X$x" = "X$element"; then
9707 haveit=yes
9708 break
9709 fi
9710 done
9711 if test -z "$haveit"; then
9712 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9713 fi
9714 done
9715
9716
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9718 $as_echo_n "checking for libexpat... " >&6; }
9719 if ${ac_cv_libexpat+:} false; then :
9720 $as_echo_n "(cached) " >&6
9721 else
9722
9723 ac_save_LIBS="$LIBS"
9724 LIBS="$LIBS $LIBEXPAT"
9725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9726 /* end confdefs.h. */
9727 #include "expat.h"
9728 int
9729 main ()
9730 {
9731 XML_Parser p = XML_ParserCreate (0);
9732 ;
9733 return 0;
9734 }
9735 _ACEOF
9736 if ac_fn_c_try_link "$LINENO"; then :
9737 ac_cv_libexpat=yes
9738 else
9739 ac_cv_libexpat=no
9740 fi
9741 rm -f core conftest.err conftest.$ac_objext \
9742 conftest$ac_exeext conftest.$ac_ext
9743 LIBS="$ac_save_LIBS"
9744
9745 fi
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9747 $as_echo "$ac_cv_libexpat" >&6; }
9748 if test "$ac_cv_libexpat" = yes; then
9749 HAVE_LIBEXPAT=yes
9750
9751 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9752
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9754 $as_echo_n "checking how to link with libexpat... " >&6; }
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9756 $as_echo "$LIBEXPAT" >&6; }
9757 else
9758 HAVE_LIBEXPAT=no
9759 CPPFLAGS="$ac_save_CPPFLAGS"
9760 LIBEXPAT=
9761 LTLIBEXPAT=
9762 fi
9763
9764
9765
9766
9767
9768
9769 if test "$HAVE_LIBEXPAT" != yes; then
9770 if test "$with_expat" = yes; then
9771 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9772 else
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9774 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9775 fi
9776 else
9777 save_LIBS=$LIBS
9778 LIBS="$LIBS $LIBEXPAT"
9779 for ac_func in XML_StopParser
9780 do :
9781 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9782 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9783 cat >>confdefs.h <<_ACEOF
9784 #define HAVE_XML_STOPPARSER 1
9785 _ACEOF
9786
9787 fi
9788 done
9789
9790 LIBS=$save_LIBS
9791 fi
9792 fi
9793
9794
9795 # Check whether --with-mpfr was given.
9796 if test "${with_mpfr+set}" = set; then :
9797 withval=$with_mpfr;
9798 else
9799 with_mpfr=auto
9800 fi
9801
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9803 $as_echo_n "checking whether to use MPFR... " >&6; }
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9805 $as_echo "$with_mpfr" >&6; }
9806
9807 if test "${with_mpfr}" = no; then
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9809 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9810 HAVE_LIBMPFR=no
9811 else
9812
9813
9814
9815
9816
9817
9818
9819
9820 use_additional=yes
9821
9822 acl_save_prefix="$prefix"
9823 prefix="$acl_final_prefix"
9824 acl_save_exec_prefix="$exec_prefix"
9825 exec_prefix="$acl_final_exec_prefix"
9826
9827 eval additional_includedir=\"$includedir\"
9828 eval additional_libdir=\"$libdir\"
9829
9830 exec_prefix="$acl_save_exec_prefix"
9831 prefix="$acl_save_prefix"
9832
9833
9834 # Check whether --with-libmpfr-prefix was given.
9835 if test "${with_libmpfr_prefix+set}" = set; then :
9836 withval=$with_libmpfr_prefix;
9837 if test "X$withval" = "Xno"; then
9838 use_additional=no
9839 else
9840 if test "X$withval" = "X"; then
9841
9842 acl_save_prefix="$prefix"
9843 prefix="$acl_final_prefix"
9844 acl_save_exec_prefix="$exec_prefix"
9845 exec_prefix="$acl_final_exec_prefix"
9846
9847 eval additional_includedir=\"$includedir\"
9848 eval additional_libdir=\"$libdir\"
9849
9850 exec_prefix="$acl_save_exec_prefix"
9851 prefix="$acl_save_prefix"
9852
9853 else
9854 additional_includedir="$withval/include"
9855 additional_libdir="$withval/lib"
9856 fi
9857 fi
9858
9859 fi
9860
9861
9862 # Check whether --with-libmpfr-type was given.
9863 if test "${with_libmpfr_type+set}" = set; then :
9864 withval=$with_libmpfr_type; with_libmpfr_type=$withval
9865 else
9866 with_libmpfr_type=auto
9867 fi
9868
9869 lib_type=`eval echo \$with_libmpfr_type`
9870
9871 LIBMPFR=
9872 LTLIBMPFR=
9873 INCMPFR=
9874 rpathdirs=
9875 ltrpathdirs=
9876 names_already_handled=
9877 names_next_round='mpfr gmp'
9878 while test -n "$names_next_round"; do
9879 names_this_round="$names_next_round"
9880 names_next_round=
9881 for name in $names_this_round; do
9882 already_handled=
9883 for n in $names_already_handled; do
9884 if test "$n" = "$name"; then
9885 already_handled=yes
9886 break
9887 fi
9888 done
9889 if test -z "$already_handled"; then
9890 names_already_handled="$names_already_handled $name"
9891 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9892 eval value=\"\$HAVE_LIB$uppername\"
9893 if test -n "$value"; then
9894 if test "$value" = yes; then
9895 eval value=\"\$LIB$uppername\"
9896 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9897 eval value=\"\$LTLIB$uppername\"
9898 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9899 else
9900 :
9901 fi
9902 else
9903 found_dir=
9904 found_la=
9905 found_so=
9906 found_a=
9907 if test $use_additional = yes; then
9908 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9909 found_dir="$additional_libdir"
9910 found_so="$additional_libdir/lib$name.$shlibext"
9911 if test -f "$additional_libdir/lib$name.la"; then
9912 found_la="$additional_libdir/lib$name.la"
9913 fi
9914 elif test x$lib_type != xshared; then
9915 if test -f "$additional_libdir/lib$name.$libext"; then
9916 found_dir="$additional_libdir"
9917 found_a="$additional_libdir/lib$name.$libext"
9918 if test -f "$additional_libdir/lib$name.la"; then
9919 found_la="$additional_libdir/lib$name.la"
9920 fi
9921 fi
9922 fi
9923 fi
9924 if test "X$found_dir" = "X"; then
9925 for x in $LDFLAGS $LTLIBMPFR; do
9926
9927 acl_save_prefix="$prefix"
9928 prefix="$acl_final_prefix"
9929 acl_save_exec_prefix="$exec_prefix"
9930 exec_prefix="$acl_final_exec_prefix"
9931 eval x=\"$x\"
9932 exec_prefix="$acl_save_exec_prefix"
9933 prefix="$acl_save_prefix"
9934
9935 case "$x" in
9936 -L*)
9937 dir=`echo "X$x" | sed -e 's/^X-L//'`
9938 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9939 found_dir="$dir"
9940 found_so="$dir/lib$name.$shlibext"
9941 if test -f "$dir/lib$name.la"; then
9942 found_la="$dir/lib$name.la"
9943 fi
9944 elif test x$lib_type != xshared; then
9945 if test -f "$dir/lib$name.$libext"; then
9946 found_dir="$dir"
9947 found_a="$dir/lib$name.$libext"
9948 if test -f "$dir/lib$name.la"; then
9949 found_la="$dir/lib$name.la"
9950 fi
9951 fi
9952 fi
9953 ;;
9954 esac
9955 if test "X$found_dir" != "X"; then
9956 break
9957 fi
9958 done
9959 fi
9960 if test "X$found_dir" != "X"; then
9961 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9962 if test "X$found_so" != "X"; then
9963 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9964 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9965 else
9966 haveit=
9967 for x in $ltrpathdirs; do
9968 if test "X$x" = "X$found_dir"; then
9969 haveit=yes
9970 break
9971 fi
9972 done
9973 if test -z "$haveit"; then
9974 ltrpathdirs="$ltrpathdirs $found_dir"
9975 fi
9976 if test "$hardcode_direct" = yes; then
9977 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9978 else
9979 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9980 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9981 haveit=
9982 for x in $rpathdirs; do
9983 if test "X$x" = "X$found_dir"; then
9984 haveit=yes
9985 break
9986 fi
9987 done
9988 if test -z "$haveit"; then
9989 rpathdirs="$rpathdirs $found_dir"
9990 fi
9991 else
9992 haveit=
9993 for x in $LDFLAGS $LIBMPFR; do
9994
9995 acl_save_prefix="$prefix"
9996 prefix="$acl_final_prefix"
9997 acl_save_exec_prefix="$exec_prefix"
9998 exec_prefix="$acl_final_exec_prefix"
9999 eval x=\"$x\"
10000 exec_prefix="$acl_save_exec_prefix"
10001 prefix="$acl_save_prefix"
10002
10003 if test "X$x" = "X-L$found_dir"; then
10004 haveit=yes
10005 break
10006 fi
10007 done
10008 if test -z "$haveit"; then
10009 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10010 fi
10011 if test "$hardcode_minus_L" != no; then
10012 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10013 else
10014 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10015 fi
10016 fi
10017 fi
10018 fi
10019 else
10020 if test "X$found_a" != "X"; then
10021 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10022 else
10023 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10024 fi
10025 fi
10026 additional_includedir=
10027 case "$found_dir" in
10028 */lib | */lib/)
10029 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10030 additional_includedir="$basedir/include"
10031 ;;
10032 esac
10033 if test "X$additional_includedir" != "X"; then
10034 if test "X$additional_includedir" != "X/usr/include"; then
10035 haveit=
10036 if test "X$additional_includedir" = "X/usr/local/include"; then
10037 if test -n "$GCC"; then
10038 case $host_os in
10039 linux*) haveit=yes;;
10040 esac
10041 fi
10042 fi
10043 if test -z "$haveit"; then
10044 for x in $CPPFLAGS $INCMPFR; do
10045
10046 acl_save_prefix="$prefix"
10047 prefix="$acl_final_prefix"
10048 acl_save_exec_prefix="$exec_prefix"
10049 exec_prefix="$acl_final_exec_prefix"
10050 eval x=\"$x\"
10051 exec_prefix="$acl_save_exec_prefix"
10052 prefix="$acl_save_prefix"
10053
10054 if test "X$x" = "X-I$additional_includedir"; then
10055 haveit=yes
10056 break
10057 fi
10058 done
10059 if test -z "$haveit"; then
10060 if test -d "$additional_includedir"; then
10061 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10062 fi
10063 fi
10064 fi
10065 fi
10066 fi
10067 if test -n "$found_la"; then
10068 save_libdir="$libdir"
10069 case "$found_la" in
10070 */* | *\\*) . "$found_la" ;;
10071 *) . "./$found_la" ;;
10072 esac
10073 libdir="$save_libdir"
10074 for dep in $dependency_libs; do
10075 case "$dep" in
10076 -L*)
10077 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10078 if test "X$additional_libdir" != "X/usr/lib"; then
10079 haveit=
10080 if test "X$additional_libdir" = "X/usr/local/lib"; then
10081 if test -n "$GCC"; then
10082 case $host_os in
10083 linux*) haveit=yes;;
10084 esac
10085 fi
10086 fi
10087 if test -z "$haveit"; then
10088 haveit=
10089 for x in $LDFLAGS $LIBMPFR; do
10090
10091 acl_save_prefix="$prefix"
10092 prefix="$acl_final_prefix"
10093 acl_save_exec_prefix="$exec_prefix"
10094 exec_prefix="$acl_final_exec_prefix"
10095 eval x=\"$x\"
10096 exec_prefix="$acl_save_exec_prefix"
10097 prefix="$acl_save_prefix"
10098
10099 if test "X$x" = "X-L$additional_libdir"; then
10100 haveit=yes
10101 break
10102 fi
10103 done
10104 if test -z "$haveit"; then
10105 if test -d "$additional_libdir"; then
10106 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10107 fi
10108 fi
10109 haveit=
10110 for x in $LDFLAGS $LTLIBMPFR; do
10111
10112 acl_save_prefix="$prefix"
10113 prefix="$acl_final_prefix"
10114 acl_save_exec_prefix="$exec_prefix"
10115 exec_prefix="$acl_final_exec_prefix"
10116 eval x=\"$x\"
10117 exec_prefix="$acl_save_exec_prefix"
10118 prefix="$acl_save_prefix"
10119
10120 if test "X$x" = "X-L$additional_libdir"; then
10121 haveit=yes
10122 break
10123 fi
10124 done
10125 if test -z "$haveit"; then
10126 if test -d "$additional_libdir"; then
10127 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10128 fi
10129 fi
10130 fi
10131 fi
10132 ;;
10133 -R*)
10134 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10135 if test "$enable_rpath" != no; then
10136 haveit=
10137 for x in $rpathdirs; do
10138 if test "X$x" = "X$dir"; then
10139 haveit=yes
10140 break
10141 fi
10142 done
10143 if test -z "$haveit"; then
10144 rpathdirs="$rpathdirs $dir"
10145 fi
10146 haveit=
10147 for x in $ltrpathdirs; do
10148 if test "X$x" = "X$dir"; then
10149 haveit=yes
10150 break
10151 fi
10152 done
10153 if test -z "$haveit"; then
10154 ltrpathdirs="$ltrpathdirs $dir"
10155 fi
10156 fi
10157 ;;
10158 -l*)
10159 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10160 ;;
10161 *.la)
10162 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10163 ;;
10164 *)
10165 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10166 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10167 ;;
10168 esac
10169 done
10170 fi
10171 else
10172 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10173 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10174 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10175 else
10176 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10177 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10178 fi
10179 fi
10180 fi
10181 fi
10182 done
10183 done
10184 if test "X$rpathdirs" != "X"; then
10185 if test -n "$hardcode_libdir_separator"; then
10186 alldirs=
10187 for found_dir in $rpathdirs; do
10188 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10189 done
10190 acl_save_libdir="$libdir"
10191 libdir="$alldirs"
10192 eval flag=\"$hardcode_libdir_flag_spec\"
10193 libdir="$acl_save_libdir"
10194 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10195 else
10196 for found_dir in $rpathdirs; do
10197 acl_save_libdir="$libdir"
10198 libdir="$found_dir"
10199 eval flag=\"$hardcode_libdir_flag_spec\"
10200 libdir="$acl_save_libdir"
10201 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10202 done
10203 fi
10204 fi
10205 if test "X$ltrpathdirs" != "X"; then
10206 for found_dir in $ltrpathdirs; do
10207 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10208 done
10209 fi
10210
10211
10212 ac_save_CPPFLAGS="$CPPFLAGS"
10213
10214 for element in $INCMPFR; do
10215 haveit=
10216 for x in $CPPFLAGS; do
10217
10218 acl_save_prefix="$prefix"
10219 prefix="$acl_final_prefix"
10220 acl_save_exec_prefix="$exec_prefix"
10221 exec_prefix="$acl_final_exec_prefix"
10222 eval x=\"$x\"
10223 exec_prefix="$acl_save_exec_prefix"
10224 prefix="$acl_save_prefix"
10225
10226 if test "X$x" = "X$element"; then
10227 haveit=yes
10228 break
10229 fi
10230 done
10231 if test -z "$haveit"; then
10232 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10233 fi
10234 done
10235
10236
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10238 $as_echo_n "checking for libmpfr... " >&6; }
10239 if ${ac_cv_libmpfr+:} false; then :
10240 $as_echo_n "(cached) " >&6
10241 else
10242
10243 ac_save_LIBS="$LIBS"
10244 LIBS="$LIBS $LIBMPFR"
10245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10246 /* end confdefs.h. */
10247 #include <mpfr.h>
10248 int
10249 main ()
10250 {
10251 mpfr_exp_t exp; mpfr_t x;
10252 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10253 ;
10254 return 0;
10255 }
10256 _ACEOF
10257 if ac_fn_c_try_link "$LINENO"; then :
10258 ac_cv_libmpfr=yes
10259 else
10260 ac_cv_libmpfr=no
10261 fi
10262 rm -f core conftest.err conftest.$ac_objext \
10263 conftest$ac_exeext conftest.$ac_ext
10264 LIBS="$ac_save_LIBS"
10265
10266 fi
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10268 $as_echo "$ac_cv_libmpfr" >&6; }
10269 if test "$ac_cv_libmpfr" = yes; then
10270 HAVE_LIBMPFR=yes
10271
10272 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10273
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10275 $as_echo_n "checking how to link with libmpfr... " >&6; }
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10277 $as_echo "$LIBMPFR" >&6; }
10278 else
10279 HAVE_LIBMPFR=no
10280 CPPFLAGS="$ac_save_CPPFLAGS"
10281 LIBMPFR=
10282 LTLIBMPFR=
10283 fi
10284
10285
10286
10287
10288
10289
10290 if test "$HAVE_LIBMPFR" != yes; then
10291 if test "$with_mpfr" = yes; then
10292 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10293 else
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10295 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10296 fi
10297 fi
10298 fi
10299
10300 # --------------------- #
10301 # Check for libpython. #
10302 # --------------------- #
10303
10304
10305
10306
10307
10308
10309 # Check whether --with-python was given.
10310 if test "${with_python+set}" = set; then :
10311 withval=$with_python;
10312 else
10313 with_python=auto
10314 fi
10315
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10317 $as_echo_n "checking whether to use python... " >&6; }
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10319 $as_echo "$with_python" >&6; }
10320
10321 if test "${with_python}" = no; then
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10323 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10324 have_libpython=no
10325 else
10326 case "${with_python}" in
10327 [\\/]* | ?:[\\/]*)
10328 if test -d "${with_python}"; then
10329 # Assume the python binary is ${with_python}/bin/python.
10330 python_prog="${with_python}/bin/python"
10331 python_prefix=
10332 # If python does not exit ${with_python}/bin, then try in
10333 # ${with_python}. On Windows/MinGW, this is where the Python
10334 # executable is.
10335 if test ! -x "${python_prog}"; then
10336 python_prog="${with_python}/python"
10337 python_prefix=
10338 fi
10339 if test ! -x "${python_prog}"; then
10340 # Fall back to gdb 7.0/7.1 behaviour.
10341 python_prog=missing
10342 python_prefix=${with_python}
10343 fi
10344 elif test -x "${with_python}"; then
10345 # While we can't run python compiled for $host (unless host == build),
10346 # the user could write a script that provides the needed information,
10347 # so we support that.
10348 python_prog=${with_python}
10349 python_prefix=
10350 else
10351 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10352 fi
10353 ;;
10354 */*)
10355 # Disallow --with-python=foo/bar.
10356 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10357 ;;
10358 *)
10359 # The user has either specified auto, yes, or the name of the python
10360 # program assumed to be in $PATH.
10361 python_prefix=
10362 case "${with_python}" in
10363 yes | auto)
10364 if test "${build}" = "${host}"; then
10365 # Extract the first word of "python", so it can be a program name with args.
10366 set dummy python; ac_word=$2
10367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368 $as_echo_n "checking for $ac_word... " >&6; }
10369 if ${ac_cv_path_python_prog_path+:} false; then :
10370 $as_echo_n "(cached) " >&6
10371 else
10372 case $python_prog_path in
10373 [\\/]* | ?:[\\/]*)
10374 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10375 ;;
10376 *)
10377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378 for as_dir in $PATH
10379 do
10380 IFS=$as_save_IFS
10381 test -z "$as_dir" && as_dir=.
10382 for ac_exec_ext in '' $ac_executable_extensions; do
10383 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10384 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10386 break 2
10387 fi
10388 done
10389 done
10390 IFS=$as_save_IFS
10391
10392 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10393 ;;
10394 esac
10395 fi
10396 python_prog_path=$ac_cv_path_python_prog_path
10397 if test -n "$python_prog_path"; then
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10399 $as_echo "$python_prog_path" >&6; }
10400 else
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402 $as_echo "no" >&6; }
10403 fi
10404
10405
10406 if test "${python_prog_path}" = missing; then
10407 python_prog=missing
10408 else
10409 python_prog=${python_prog_path}
10410 fi
10411 else
10412 # Not much we can do except assume the cross-compiler will find the
10413 # right files.
10414 python_prog=missing
10415 fi
10416 ;;
10417 *)
10418 # While we can't run python compiled for $host (unless host == build),
10419 # the user could write a script that provides the needed information,
10420 # so we support that.
10421 python_prog="${with_python}"
10422 # Extract the first word of "${python_prog}", so it can be a program name with args.
10423 set dummy ${python_prog}; ac_word=$2
10424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10425 $as_echo_n "checking for $ac_word... " >&6; }
10426 if ${ac_cv_path_python_prog_path+:} false; then :
10427 $as_echo_n "(cached) " >&6
10428 else
10429 case $python_prog_path in
10430 [\\/]* | ?:[\\/]*)
10431 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10432 ;;
10433 *)
10434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435 for as_dir in $PATH
10436 do
10437 IFS=$as_save_IFS
10438 test -z "$as_dir" && as_dir=.
10439 for ac_exec_ext in '' $ac_executable_extensions; do
10440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10441 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10443 break 2
10444 fi
10445 done
10446 done
10447 IFS=$as_save_IFS
10448
10449 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10450 ;;
10451 esac
10452 fi
10453 python_prog_path=$ac_cv_path_python_prog_path
10454 if test -n "$python_prog_path"; then
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10456 $as_echo "$python_prog_path" >&6; }
10457 else
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459 $as_echo "no" >&6; }
10460 fi
10461
10462
10463 if test "${python_prog_path}" = missing; then
10464 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10465 fi
10466 ;;
10467 esac
10468 esac
10469
10470 if test "${python_prog}" != missing; then
10471 # We have a python program to use, but it may be too old.
10472 # Don't flag an error for --with-python=auto (the default).
10473 have_python_config=yes
10474 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10475 if test $? != 0; then
10476 have_python_config=failed
10477 if test "${with_python}" != auto; then
10478 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10479 fi
10480 fi
10481 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10482 if test $? != 0; then
10483 have_python_config=failed
10484 if test "${with_python}" != auto; then
10485 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10486 fi
10487 fi
10488 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10489 if test $? != 0; then
10490 have_python_config=failed
10491 if test "${with_python}" != auto; then
10492 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10493 fi
10494 fi
10495 else
10496 # We do not have a python executable we can use to determine where
10497 # to find the Python headers and libs. We cannot guess the include
10498 # path from the python_prefix either, because that include path
10499 # depends on the Python version. So, there is nothing much we can
10500 # do except assume that the compiler will be able to find those files.
10501 python_includes=
10502 python_libs=
10503 have_python_config=no
10504 fi
10505
10506 # If we have python-config, only try the configuration it provides.
10507 # Otherwise fallback on the old way of trying different versions of
10508 # python in turn.
10509
10510 have_libpython=no
10511 if test "${have_python_config}" = yes; then
10512
10513
10514 new_CPPFLAGS=${python_includes}
10515 new_LIBS=${python_libs}
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10517 $as_echo_n "checking for python... " >&6; }
10518 save_CPPFLAGS=$CPPFLAGS
10519 save_LIBS=$LIBS
10520 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10521 LIBS="$new_LIBS $LIBS"
10522 found_usable_python=no
10523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10524 /* end confdefs.h. */
10525 #include "Python.h"
10526 int
10527 main ()
10528 {
10529 Py_Initialize ();
10530 ;
10531 return 0;
10532 }
10533 _ACEOF
10534 if ac_fn_c_try_link "$LINENO"; then :
10535 have_libpython=yes
10536 found_usable_python=yes
10537 PYTHON_CPPFLAGS=$new_CPPFLAGS
10538 PYTHON_LIBS=$new_LIBS
10539 fi
10540 rm -f core conftest.err conftest.$ac_objext \
10541 conftest$ac_exeext conftest.$ac_ext
10542 CPPFLAGS=$save_CPPFLAGS
10543 LIBS=$save_LIBS
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10545 $as_echo "${found_usable_python}" >&6; }
10546
10547 elif test "${have_python_config}" != failed; then
10548 if test "${have_libpython}" = no; then
10549
10550
10551 new_CPPFLAGS=${python_includes}
10552 new_LIBS="-lpython2.7 ${python_libs}"
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10554 $as_echo_n "checking for python... " >&6; }
10555 save_CPPFLAGS=$CPPFLAGS
10556 save_LIBS=$LIBS
10557 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10558 LIBS="$new_LIBS $LIBS"
10559 found_usable_python=no
10560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10561 /* end confdefs.h. */
10562 #include "Python.h"
10563 int
10564 main ()
10565 {
10566 Py_Initialize ();
10567 ;
10568 return 0;
10569 }
10570 _ACEOF
10571 if ac_fn_c_try_link "$LINENO"; then :
10572 have_libpython=yes
10573 found_usable_python=yes
10574 PYTHON_CPPFLAGS=$new_CPPFLAGS
10575 PYTHON_LIBS=$new_LIBS
10576 fi
10577 rm -f core conftest.err conftest.$ac_objext \
10578 conftest$ac_exeext conftest.$ac_ext
10579 CPPFLAGS=$save_CPPFLAGS
10580 LIBS=$save_LIBS
10581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10582 $as_echo "${found_usable_python}" >&6; }
10583
10584 fi
10585 if test "${have_libpython}" = no; then
10586
10587
10588 new_CPPFLAGS=${python_includes}
10589 new_LIBS="-lpython2.6 ${python_libs}"
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10591 $as_echo_n "checking for python... " >&6; }
10592 save_CPPFLAGS=$CPPFLAGS
10593 save_LIBS=$LIBS
10594 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10595 LIBS="$new_LIBS $LIBS"
10596 found_usable_python=no
10597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598 /* end confdefs.h. */
10599 #include "Python.h"
10600 int
10601 main ()
10602 {
10603 Py_Initialize ();
10604 ;
10605 return 0;
10606 }
10607 _ACEOF
10608 if ac_fn_c_try_link "$LINENO"; then :
10609 have_libpython=yes
10610 found_usable_python=yes
10611 PYTHON_CPPFLAGS=$new_CPPFLAGS
10612 PYTHON_LIBS=$new_LIBS
10613 fi
10614 rm -f core conftest.err conftest.$ac_objext \
10615 conftest$ac_exeext conftest.$ac_ext
10616 CPPFLAGS=$save_CPPFLAGS
10617 LIBS=$save_LIBS
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10619 $as_echo "${found_usable_python}" >&6; }
10620
10621 fi
10622 fi
10623
10624 if test "${have_libpython}" = no; then
10625 case "${with_python}" in
10626 yes)
10627 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10628 ;;
10629 auto)
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10631 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10632 ;;
10633 *)
10634 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10635 ;;
10636 esac
10637 else
10638 if test -n "${python_prefix}"; then
10639
10640 cat >>confdefs.h <<_ACEOF
10641 #define WITH_PYTHON_PATH "${python_prefix}"
10642 _ACEOF
10643
10644
10645 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10646 if test "x$prefix" = xNONE; then
10647 test_prefix=/usr/local
10648 else
10649 test_prefix=$prefix
10650 fi
10651 else
10652 test_prefix=$exec_prefix
10653 fi
10654 value=0
10655 case ${python_prefix} in
10656 "${test_prefix}"|"${test_prefix}/"*|\
10657 '${exec_prefix}'|'${exec_prefix}/'*)
10658 value=1
10659 ;;
10660 esac
10661
10662 cat >>confdefs.h <<_ACEOF
10663 #define PYTHON_PATH_RELOCATABLE $value
10664 _ACEOF
10665
10666
10667 fi
10668 fi
10669 fi
10670
10671
10672 # Check whether --with-python-libdir was given.
10673 if test "${with_python_libdir+set}" = set; then :
10674 withval=$with_python_libdir;
10675 else
10676
10677 # If no python libdir is specified then select one based on
10678 # python's prefix path.
10679 if test -n "${python_prefix}"; then
10680 with_python_libdir=${python_prefix}/lib
10681 fi
10682
10683 fi
10684
10685
10686 if test "${have_libpython}" != no; then
10687
10688 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10689
10690 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10691 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10692 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10693 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10694 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10695
10696 if test -n "${with_python_libdir}"; then
10697
10698 cat >>confdefs.h <<_ACEOF
10699 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10700 _ACEOF
10701
10702
10703 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10704 if test "x$prefix" = xNONE; then
10705 test_prefix=/usr/local
10706 else
10707 test_prefix=$prefix
10708 fi
10709 else
10710 test_prefix=$exec_prefix
10711 fi
10712 value=0
10713 case ${with_python_libdir} in
10714 "${test_prefix}"|"${test_prefix}/"*|\
10715 '${exec_prefix}'|'${exec_prefix}/'*)
10716 value=1
10717 ;;
10718 esac
10719
10720 cat >>confdefs.h <<_ACEOF
10721 #define PYTHON_LIBDIR_RELOCATABLE $value
10722 _ACEOF
10723
10724
10725 fi
10726
10727 # Flags needed to compile Python code (taken from python-config --cflags).
10728 # We cannot call python-config directly because it will output whatever was
10729 # used when compiling the Python interpreter itself, including flags which
10730 # would make the python-related objects be compiled differently from the
10731 # rest of GDB (e.g., -O2 and -fPIC).
10732 if test "${GCC}" = yes; then
10733 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10734 # Python headers recommend -DNDEBUG, but it's unclear if that just
10735 # refers to building Python itself. In release mode, though, it
10736 # doesn't hurt for the Python code in gdb to follow.
10737 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10738 fi
10739
10740 if test "x${tentative_python_cflags}" != x; then
10741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10742 $as_echo_n "checking compiler flags for python code... " >&6; }
10743 for flag in ${tentative_python_cflags}; do
10744 # Check that the compiler accepts it
10745 saved_CFLAGS="$CFLAGS"
10746 CFLAGS="$CFLAGS $flag"
10747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10748 /* end confdefs.h. */
10749
10750 int
10751 main ()
10752 {
10753
10754 ;
10755 return 0;
10756 }
10757 _ACEOF
10758 if ac_fn_c_try_compile "$LINENO"; then :
10759 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10760 fi
10761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10762 CFLAGS="$saved_CFLAGS"
10763 done
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10765 $as_echo "${PYTHON_CFLAGS}" >&6; }
10766 fi
10767
10768 # On x64 Windows, Python's include headers, and pyconfig.h in
10769 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10770 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10771 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10772 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10773 # The issue was reported to the Python community, but still isn't
10774 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10775
10776 case "$gdb_host" in
10777 mingw64)
10778 if test "${GCC}" = yes; then
10779 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10780 fi
10781 ;;
10782 esac
10783 else
10784 # Even if Python support is not compiled in, we need to have this file
10785 # included so that the "python" command, et.al., still exists.
10786 CONFIG_OBS="$CONFIG_OBS python/python.o"
10787 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10788 fi
10789
10790 # Work around Python http://bugs.python.org/issue10112. See also
10791 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10792 # no effect. Note that the only test after this that uses Python is
10793 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10794 # run without -export-dynamic too.
10795 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10796
10797
10798
10799
10800 if test "${have_libpython}" != no; then
10801 HAVE_PYTHON_TRUE=
10802 HAVE_PYTHON_FALSE='#'
10803 else
10804 HAVE_PYTHON_TRUE='#'
10805 HAVE_PYTHON_FALSE=
10806 fi
10807
10808
10809 # -------------------- #
10810 # Check for libguile. #
10811 # -------------------- #
10812
10813
10814
10815
10816
10817
10818 # Check whether --with-guile was given.
10819 if test "${with_guile+set}" = set; then :
10820 withval=$with_guile;
10821 else
10822 with_guile=auto
10823 fi
10824
10825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10826 $as_echo_n "checking whether to use guile... " >&6; }
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10828 $as_echo "$with_guile" >&6; }
10829
10830 # Extract the first word of "pkg-config", so it can be a program name with args.
10831 set dummy pkg-config; ac_word=$2
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10833 $as_echo_n "checking for $ac_word... " >&6; }
10834 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10835 $as_echo_n "(cached) " >&6
10836 else
10837 case $pkg_config_prog_path in
10838 [\\/]* | ?:[\\/]*)
10839 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10840 ;;
10841 *)
10842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10843 for as_dir in $PATH
10844 do
10845 IFS=$as_save_IFS
10846 test -z "$as_dir" && as_dir=.
10847 for ac_exec_ext in '' $ac_executable_extensions; do
10848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10849 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10851 break 2
10852 fi
10853 done
10854 done
10855 IFS=$as_save_IFS
10856
10857 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10858 ;;
10859 esac
10860 fi
10861 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10862 if test -n "$pkg_config_prog_path"; then
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10864 $as_echo "$pkg_config_prog_path" >&6; }
10865 else
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10867 $as_echo "no" >&6; }
10868 fi
10869
10870
10871
10872 try_guile_versions="guile-2.0"
10873 have_libguile=no
10874 case "${with_guile}" in
10875 no)
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10877 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10878 ;;
10879 auto)
10880 if test "${pkg_config_prog_path}" = "missing"; then
10881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10882 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10883 else
10884
10885 pkg_config=${pkg_config_prog_path}
10886 guile_version_list=${try_guile_versions}
10887 flag_errors=no
10888
10889 found_usable_guile=checking
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10891 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10892 for guile_version in ${guile_version_list}; do
10893 ${pkg_config} --exists ${guile_version} 2>/dev/null
10894 if test $? != 0; then
10895 continue
10896 fi
10897 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10898 if test $? != 0; then
10899 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10900 fi
10901 new_LIBS=`${pkg_config} --libs ${guile_version}`
10902 if test $? != 0; then
10903 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10904 fi
10905 found_usable_guile=${guile_version}
10906 break
10907 done
10908 if test "${found_usable_guile}" = "checking"; then
10909 if test "${flag_errors}" = "yes"; then
10910 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10911 else
10912 found_usable_guile=no
10913 fi
10914 fi
10915 if test "${found_usable_guile}" != no; then
10916 save_CPPFLAGS=$CPPFLAGS
10917 save_LIBS=$LIBS
10918 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10919 LIBS="$LIBS $new_LIBS"
10920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10921 /* end confdefs.h. */
10922 #include "libguile.h"
10923 int
10924 main ()
10925 {
10926 scm_init_guile ();
10927 ;
10928 return 0;
10929 }
10930 _ACEOF
10931 if ac_fn_c_try_link "$LINENO"; then :
10932 have_libguile=yes
10933 GUILE_CPPFLAGS=$new_CPPFLAGS
10934 GUILE_LIBS=$new_LIBS
10935 else
10936 found_usable_guile=no
10937 fi
10938 rm -f core conftest.err conftest.$ac_objext \
10939 conftest$ac_exeext conftest.$ac_ext
10940 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10941 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10942
10943 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10944
10945
10946 fi
10947
10948 CPPFLAGS=$save_CPPFLAGS
10949 LIBS=$save_LIBS
10950 if test "${found_usable_guile}" = no; then
10951 if test "${flag_errors}" = yes; then
10952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10953 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10954 as_fn_error $? "linking guile version ${guile_version} test program failed
10955 See \`config.log' for more details" "$LINENO" 5; }
10956 fi
10957 fi
10958 fi
10959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10960 $as_echo "${found_usable_guile}" >&6; }
10961
10962 fi
10963 ;;
10964 yes)
10965 if test "${pkg_config_prog_path}" = "missing"; then
10966 as_fn_error $? "pkg-config not found" "$LINENO" 5
10967 fi
10968
10969 pkg_config=${pkg_config_prog_path}
10970 guile_version_list=${try_guile_versions}
10971 flag_errors=yes
10972
10973 found_usable_guile=checking
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10975 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10976 for guile_version in ${guile_version_list}; do
10977 ${pkg_config} --exists ${guile_version} 2>/dev/null
10978 if test $? != 0; then
10979 continue
10980 fi
10981 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10982 if test $? != 0; then
10983 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10984 fi
10985 new_LIBS=`${pkg_config} --libs ${guile_version}`
10986 if test $? != 0; then
10987 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10988 fi
10989 found_usable_guile=${guile_version}
10990 break
10991 done
10992 if test "${found_usable_guile}" = "checking"; then
10993 if test "${flag_errors}" = "yes"; then
10994 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10995 else
10996 found_usable_guile=no
10997 fi
10998 fi
10999 if test "${found_usable_guile}" != no; then
11000 save_CPPFLAGS=$CPPFLAGS
11001 save_LIBS=$LIBS
11002 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11003 LIBS="$LIBS $new_LIBS"
11004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11005 /* end confdefs.h. */
11006 #include "libguile.h"
11007 int
11008 main ()
11009 {
11010 scm_init_guile ();
11011 ;
11012 return 0;
11013 }
11014 _ACEOF
11015 if ac_fn_c_try_link "$LINENO"; then :
11016 have_libguile=yes
11017 GUILE_CPPFLAGS=$new_CPPFLAGS
11018 GUILE_LIBS=$new_LIBS
11019 else
11020 found_usable_guile=no
11021 fi
11022 rm -f core conftest.err conftest.$ac_objext \
11023 conftest$ac_exeext conftest.$ac_ext
11024 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11025 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11026
11027 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11028
11029
11030 fi
11031
11032 CPPFLAGS=$save_CPPFLAGS
11033 LIBS=$save_LIBS
11034 if test "${found_usable_guile}" = no; then
11035 if test "${flag_errors}" = yes; then
11036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11037 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11038 as_fn_error $? "linking guile version ${guile_version} test program failed
11039 See \`config.log' for more details" "$LINENO" 5; }
11040 fi
11041 fi
11042 fi
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11044 $as_echo "${found_usable_guile}" >&6; }
11045
11046 ;;
11047 [\\/]* | ?:[\\/]*)
11048 if test -x "${with_guile}"; then
11049
11050 pkg_config=${with_guile}
11051 guile_version_list=${try_guile_versions}
11052 flag_errors=yes
11053
11054 found_usable_guile=checking
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11056 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11057 for guile_version in ${guile_version_list}; do
11058 ${pkg_config} --exists ${guile_version} 2>/dev/null
11059 if test $? != 0; then
11060 continue
11061 fi
11062 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11063 if test $? != 0; then
11064 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11065 fi
11066 new_LIBS=`${pkg_config} --libs ${guile_version}`
11067 if test $? != 0; then
11068 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11069 fi
11070 found_usable_guile=${guile_version}
11071 break
11072 done
11073 if test "${found_usable_guile}" = "checking"; then
11074 if test "${flag_errors}" = "yes"; then
11075 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11076 else
11077 found_usable_guile=no
11078 fi
11079 fi
11080 if test "${found_usable_guile}" != no; then
11081 save_CPPFLAGS=$CPPFLAGS
11082 save_LIBS=$LIBS
11083 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11084 LIBS="$LIBS $new_LIBS"
11085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11086 /* end confdefs.h. */
11087 #include "libguile.h"
11088 int
11089 main ()
11090 {
11091 scm_init_guile ();
11092 ;
11093 return 0;
11094 }
11095 _ACEOF
11096 if ac_fn_c_try_link "$LINENO"; then :
11097 have_libguile=yes
11098 GUILE_CPPFLAGS=$new_CPPFLAGS
11099 GUILE_LIBS=$new_LIBS
11100 else
11101 found_usable_guile=no
11102 fi
11103 rm -f core conftest.err conftest.$ac_objext \
11104 conftest$ac_exeext conftest.$ac_ext
11105 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11106 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11107
11108 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11109
11110
11111 fi
11112
11113 CPPFLAGS=$save_CPPFLAGS
11114 LIBS=$save_LIBS
11115 if test "${found_usable_guile}" = no; then
11116 if test "${flag_errors}" = yes; then
11117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11118 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11119 as_fn_error $? "linking guile version ${guile_version} test program failed
11120 See \`config.log' for more details" "$LINENO" 5; }
11121 fi
11122 fi
11123 fi
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11125 $as_echo "${found_usable_guile}" >&6; }
11126
11127 else
11128 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11129 fi
11130 ;;
11131 "" | */*)
11132 # Disallow --with=guile="" and --with-guile=foo/bar.
11133 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11134 ;;
11135 *)
11136 # A space separate list of guile versions to try, in order.
11137 if test "${pkg_config_prog_path}" = "missing"; then
11138 as_fn_error $? "pkg-config not found" "$LINENO" 5
11139 fi
11140
11141 pkg_config=${pkg_config_prog_path}
11142 guile_version_list=${with_guile}
11143 flag_errors=yes
11144
11145 found_usable_guile=checking
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11147 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11148 for guile_version in ${guile_version_list}; do
11149 ${pkg_config} --exists ${guile_version} 2>/dev/null
11150 if test $? != 0; then
11151 continue
11152 fi
11153 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11154 if test $? != 0; then
11155 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11156 fi
11157 new_LIBS=`${pkg_config} --libs ${guile_version}`
11158 if test $? != 0; then
11159 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11160 fi
11161 found_usable_guile=${guile_version}
11162 break
11163 done
11164 if test "${found_usable_guile}" = "checking"; then
11165 if test "${flag_errors}" = "yes"; then
11166 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11167 else
11168 found_usable_guile=no
11169 fi
11170 fi
11171 if test "${found_usable_guile}" != no; then
11172 save_CPPFLAGS=$CPPFLAGS
11173 save_LIBS=$LIBS
11174 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11175 LIBS="$LIBS $new_LIBS"
11176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11177 /* end confdefs.h. */
11178 #include "libguile.h"
11179 int
11180 main ()
11181 {
11182 scm_init_guile ();
11183 ;
11184 return 0;
11185 }
11186 _ACEOF
11187 if ac_fn_c_try_link "$LINENO"; then :
11188 have_libguile=yes
11189 GUILE_CPPFLAGS=$new_CPPFLAGS
11190 GUILE_LIBS=$new_LIBS
11191 else
11192 found_usable_guile=no
11193 fi
11194 rm -f core conftest.err conftest.$ac_objext \
11195 conftest$ac_exeext conftest.$ac_ext
11196 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11197 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11198
11199 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11200
11201
11202 fi
11203
11204 CPPFLAGS=$save_CPPFLAGS
11205 LIBS=$save_LIBS
11206 if test "${found_usable_guile}" = no; then
11207 if test "${flag_errors}" = yes; then
11208 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11209 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11210 as_fn_error $? "linking guile version ${guile_version} test program failed
11211 See \`config.log' for more details" "$LINENO" 5; }
11212 fi
11213 fi
11214 fi
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11216 $as_echo "${found_usable_guile}" >&6; }
11217
11218 ;;
11219 esac
11220
11221 if test "${have_libguile}" != no; then
11222 case "${with_guile}" in
11223 [\\/]* | ?:[\\/]*)
11224
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11226 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11227 if ${ac_cv_guild_program_name+:} false; then :
11228 $as_echo_n "(cached) " >&6
11229 else
11230 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11231
11232 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11233 # the 'guild' and 'bindir' variables. In that case, try to guess
11234 # what the program name is, at the risk of getting it wrong if
11235 # Guile was configured with '--program-suffix' or similar.
11236 if test "x$ac_cv_guild_program_name" = "x"; then
11237 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11238 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11239 fi
11240
11241 fi
11242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11243 $as_echo "$ac_cv_guild_program_name" >&6; }
11244
11245 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11246 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11247 fi
11248
11249 GUILD="$ac_cv_guild_program_name"
11250
11251
11252 ;;
11253 *)
11254
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11256 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11257 if ${ac_cv_guild_program_name+:} false; then :
11258 $as_echo_n "(cached) " >&6
11259 else
11260 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11261
11262 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11263 # the 'guild' and 'bindir' variables. In that case, try to guess
11264 # what the program name is, at the risk of getting it wrong if
11265 # Guile was configured with '--program-suffix' or similar.
11266 if test "x$ac_cv_guild_program_name" = "x"; then
11267 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11268 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11269 fi
11270
11271 fi
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11273 $as_echo "$ac_cv_guild_program_name" >&6; }
11274
11275 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11276 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11277 fi
11278
11279 GUILD="$ac_cv_guild_program_name"
11280
11281
11282 ;;
11283 esac
11284
11285
11286 if test "$cross_compiling" = no; then
11287 GUILD_TARGET_FLAG=
11288 else
11289 GUILD_TARGET_FLAG="--target=$host"
11290 fi
11291
11292
11293
11294
11295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11296 $as_echo_n "checking whether guild supports this host... " >&6; }
11297 if ${ac_cv_guild_ok+:} false; then :
11298 $as_echo_n "(cached) " >&6
11299 else
11300 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11301 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11302 ac_cv_guild_ok=yes
11303 else
11304 ac_cv_guild_ok=no
11305 fi
11306 fi
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11308 $as_echo "$ac_cv_guild_ok" >&6; }
11309
11310 if test "$ac_cv_guild_ok" = no; then
11311 have_libguile=no
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11313 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11314 fi
11315 fi
11316
11317 if test "${have_libguile}" != no; then
11318
11319 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11320
11321 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11322 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11323 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11324 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11325 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11326
11327 save_LIBS="$LIBS"
11328 save_CPPFLAGS="$CPPFLAGS"
11329 LIBS="$GUILE_LIBS"
11330 CPPFLAGS="$GUILE_CPPFLAGS"
11331 for ac_func in scm_new_smob
11332 do :
11333 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11334 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11335 cat >>confdefs.h <<_ACEOF
11336 #define HAVE_SCM_NEW_SMOB 1
11337 _ACEOF
11338
11339 fi
11340 done
11341
11342 LIBS="$save_LIBS"
11343 CPPFLAGS="$save_CPPFLAGS"
11344 else
11345 # Even if Guile support is not compiled in, we need to have these files
11346 # included.
11347 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11348 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11349 fi
11350
11351
11352 if test "${have_libguile}" != no; then
11353 HAVE_GUILE_TRUE=
11354 HAVE_GUILE_FALSE='#'
11355 else
11356 HAVE_GUILE_TRUE='#'
11357 HAVE_GUILE_FALSE=
11358 fi
11359
11360
11361 # ---------------------------- #
11362 # Check for source highlight. #
11363 # ---------------------------- #
11364
11365 SRCHIGH_LIBS=
11366 SRCHIGH_CFLAGS=
11367
11368 # Check whether --enable-source-highlight was given.
11369 if test "${enable_source_highlight+set}" = set; then :
11370 enableval=$enable_source_highlight; case "${enableval}" in
11371 yes) enable_source_highlight=yes ;;
11372 no) enable_source_highlight=no ;;
11373 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11374 esac
11375 else
11376 enable_source_highlight=auto
11377 fi
11378
11379
11380 if test "${enable_source_highlight}" != "no"; then
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11382 $as_echo_n "checking for the source-highlight library... " >&6; }
11383 if test "${pkg_config_prog_path}" = "missing"; then
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11385 $as_echo "no - pkg-config not found" >&6; }
11386 if test "${enable_source_highlight}" = "yes"; then
11387 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11388 fi
11389 else
11390 case "$LDFLAGS" in
11391 *static-libstdc*)
11392 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11393 ;;
11394 esac
11395
11396 if ${pkg_config_prog_path} --exists source-highlight; then
11397 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11398 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11399
11400 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11401
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11403 $as_echo "yes" >&6; }
11404 else
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11406 $as_echo "no" >&6; }
11407 if test "${enable_source_highlight}" = "yes"; then
11408 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11409 fi
11410 fi
11411 fi
11412 fi
11413
11414
11415
11416 # ------------------------- #
11417 # Checks for header files. #
11418 # ------------------------- #
11419
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11421 $as_echo_n "checking for ANSI C header files... " >&6; }
11422 if ${ac_cv_header_stdc+:} false; then :
11423 $as_echo_n "(cached) " >&6
11424 else
11425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11426 /* end confdefs.h. */
11427 #include <stdlib.h>
11428 #include <stdarg.h>
11429 #include <string.h>
11430 #include <float.h>
11431
11432 int
11433 main ()
11434 {
11435
11436 ;
11437 return 0;
11438 }
11439 _ACEOF
11440 if ac_fn_c_try_compile "$LINENO"; then :
11441 ac_cv_header_stdc=yes
11442 else
11443 ac_cv_header_stdc=no
11444 fi
11445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11446
11447 if test $ac_cv_header_stdc = yes; then
11448 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11450 /* end confdefs.h. */
11451 #include <string.h>
11452
11453 _ACEOF
11454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11455 $EGREP "memchr" >/dev/null 2>&1; then :
11456
11457 else
11458 ac_cv_header_stdc=no
11459 fi
11460 rm -f conftest*
11461
11462 fi
11463
11464 if test $ac_cv_header_stdc = yes; then
11465 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11467 /* end confdefs.h. */
11468 #include <stdlib.h>
11469
11470 _ACEOF
11471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11472 $EGREP "free" >/dev/null 2>&1; then :
11473
11474 else
11475 ac_cv_header_stdc=no
11476 fi
11477 rm -f conftest*
11478
11479 fi
11480
11481 if test $ac_cv_header_stdc = yes; then
11482 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11483 if test "$cross_compiling" = yes; then :
11484 :
11485 else
11486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487 /* end confdefs.h. */
11488 #include <ctype.h>
11489 #include <stdlib.h>
11490 #if ((' ' & 0x0FF) == 0x020)
11491 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11492 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11493 #else
11494 # define ISLOWER(c) \
11495 (('a' <= (c) && (c) <= 'i') \
11496 || ('j' <= (c) && (c) <= 'r') \
11497 || ('s' <= (c) && (c) <= 'z'))
11498 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11499 #endif
11500
11501 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11502 int
11503 main ()
11504 {
11505 int i;
11506 for (i = 0; i < 256; i++)
11507 if (XOR (islower (i), ISLOWER (i))
11508 || toupper (i) != TOUPPER (i))
11509 return 2;
11510 return 0;
11511 }
11512 _ACEOF
11513 if ac_fn_c_try_run "$LINENO"; then :
11514
11515 else
11516 ac_cv_header_stdc=no
11517 fi
11518 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11519 conftest.$ac_objext conftest.beam conftest.$ac_ext
11520 fi
11521
11522 fi
11523 fi
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11525 $as_echo "$ac_cv_header_stdc" >&6; }
11526 if test $ac_cv_header_stdc = yes; then
11527
11528 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11529
11530 fi
11531
11532 # elf_hp.h is for HP/UX 64-bit shared library support.
11533 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \
11534 thread_db.h \
11535 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11536 sys/resource.h sys/ptrace.h ptrace.h \
11537 sys/reg.h sys/debugreg.h sys/select.h \
11538 termios.h elf_hp.h
11539 do :
11540 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11541 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11542 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11543 cat >>confdefs.h <<_ACEOF
11544 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11545 _ACEOF
11546
11547 fi
11548
11549 done
11550
11551 for ac_header in sys/user.h
11552 do :
11553 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11554 # include <sys/param.h>
11555 #endif
11556
11557 "
11558 if test "x$ac_cv_header_sys_user_h" = xyes; then :
11559 cat >>confdefs.h <<_ACEOF
11560 #define HAVE_SYS_USER_H 1
11561 _ACEOF
11562
11563 fi
11564
11565 done
11566
11567
11568 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11569 do :
11570 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11571 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11572 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11573 cat >>confdefs.h <<_ACEOF
11574 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11575 _ACEOF
11576
11577 fi
11578
11579 done
11580
11581 for ac_header in term.h
11582 do :
11583 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11584 # include <curses.h>
11585 #endif
11586
11587 "
11588 if test "x$ac_cv_header_term_h" = xyes; then :
11589 cat >>confdefs.h <<_ACEOF
11590 #define HAVE_TERM_H 1
11591 _ACEOF
11592
11593 fi
11594
11595 done
11596
11597
11598 # ------------------------- #
11599 # Checks for declarations. #
11600 # ------------------------- #
11601
11602
11603 # Check for presence and size of long long.
11604 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11605 if test "x$ac_cv_type_long_long" = xyes; then :
11606
11607 cat >>confdefs.h <<_ACEOF
11608 #define HAVE_LONG_LONG 1
11609 _ACEOF
11610
11611 # The cast to long int works around a bug in the HP C Compiler
11612 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11613 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11614 # This bug is HP SR number 8606223364.
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11616 $as_echo_n "checking size of long long... " >&6; }
11617 if ${ac_cv_sizeof_long_long+:} false; then :
11618 $as_echo_n "(cached) " >&6
11619 else
11620 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11621
11622 else
11623 if test "$ac_cv_type_long_long" = yes; then
11624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11625 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11626 as_fn_error 77 "cannot compute sizeof (long long)
11627 See \`config.log' for more details" "$LINENO" 5; }
11628 else
11629 ac_cv_sizeof_long_long=0
11630 fi
11631 fi
11632
11633 fi
11634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11635 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11636
11637
11638
11639 cat >>confdefs.h <<_ACEOF
11640 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11641 _ACEOF
11642
11643
11644 fi
11645
11646
11647 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11648 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11649 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11650 ac_have_decl=1
11651 else
11652 ac_have_decl=0
11653 fi
11654
11655 cat >>confdefs.h <<_ACEOF
11656 #define HAVE_DECL_BASENAME $ac_have_decl
11657 _ACEOF
11658 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11659 if test "x$ac_cv_have_decl_ffs" = xyes; then :
11660 ac_have_decl=1
11661 else
11662 ac_have_decl=0
11663 fi
11664
11665 cat >>confdefs.h <<_ACEOF
11666 #define HAVE_DECL_FFS $ac_have_decl
11667 _ACEOF
11668 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11669 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11670 ac_have_decl=1
11671 else
11672 ac_have_decl=0
11673 fi
11674
11675 cat >>confdefs.h <<_ACEOF
11676 #define HAVE_DECL_ASPRINTF $ac_have_decl
11677 _ACEOF
11678 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11679 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11680 ac_have_decl=1
11681 else
11682 ac_have_decl=0
11683 fi
11684
11685 cat >>confdefs.h <<_ACEOF
11686 #define HAVE_DECL_VASPRINTF $ac_have_decl
11687 _ACEOF
11688 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11689 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11690 ac_have_decl=1
11691 else
11692 ac_have_decl=0
11693 fi
11694
11695 cat >>confdefs.h <<_ACEOF
11696 #define HAVE_DECL_SNPRINTF $ac_have_decl
11697 _ACEOF
11698 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11699 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11700 ac_have_decl=1
11701 else
11702 ac_have_decl=0
11703 fi
11704
11705 cat >>confdefs.h <<_ACEOF
11706 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11707 _ACEOF
11708
11709 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11710 if test "x$ac_cv_have_decl_strtol" = xyes; then :
11711 ac_have_decl=1
11712 else
11713 ac_have_decl=0
11714 fi
11715
11716 cat >>confdefs.h <<_ACEOF
11717 #define HAVE_DECL_STRTOL $ac_have_decl
11718 _ACEOF
11719 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11720 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11721 ac_have_decl=1
11722 else
11723 ac_have_decl=0
11724 fi
11725
11726 cat >>confdefs.h <<_ACEOF
11727 #define HAVE_DECL_STRTOUL $ac_have_decl
11728 _ACEOF
11729 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11730 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11731 ac_have_decl=1
11732 else
11733 ac_have_decl=0
11734 fi
11735
11736 cat >>confdefs.h <<_ACEOF
11737 #define HAVE_DECL_STRTOLL $ac_have_decl
11738 _ACEOF
11739 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11740 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11741 ac_have_decl=1
11742 else
11743 ac_have_decl=0
11744 fi
11745
11746 cat >>confdefs.h <<_ACEOF
11747 #define HAVE_DECL_STRTOULL $ac_have_decl
11748 _ACEOF
11749
11750 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11751 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11752 ac_have_decl=1
11753 else
11754 ac_have_decl=0
11755 fi
11756
11757 cat >>confdefs.h <<_ACEOF
11758 #define HAVE_DECL_STRVERSCMP $ac_have_decl
11759 _ACEOF
11760
11761
11762
11763 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11764 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11765 ac_have_decl=1
11766 else
11767 ac_have_decl=0
11768 fi
11769
11770 cat >>confdefs.h <<_ACEOF
11771 #define HAVE_DECL_SNPRINTF $ac_have_decl
11772 _ACEOF
11773
11774
11775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11776 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11777 if ${am_cv_val_LC_MESSAGES+:} false; then :
11778 $as_echo_n "(cached) " >&6
11779 else
11780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h. */
11782 #include <locale.h>
11783 int
11784 main ()
11785 {
11786 return LC_MESSAGES
11787 ;
11788 return 0;
11789 }
11790 _ACEOF
11791 if ac_fn_c_try_link "$LINENO"; then :
11792 am_cv_val_LC_MESSAGES=yes
11793 else
11794 am_cv_val_LC_MESSAGES=no
11795 fi
11796 rm -f core conftest.err conftest.$ac_objext \
11797 conftest$ac_exeext conftest.$ac_ext
11798 fi
11799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11800 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11801 if test $am_cv_val_LC_MESSAGES = yes; then
11802
11803 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11804
11805 fi
11806
11807
11808 # ------------------ #
11809 # Checks for types. #
11810 # ------------------ #
11811
11812 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11813 #include <sys/socket.h>
11814
11815 "
11816 if test "x$ac_cv_type_socklen_t" = xyes; then :
11817
11818 cat >>confdefs.h <<_ACEOF
11819 #define HAVE_SOCKLEN_T 1
11820 _ACEOF
11821
11822
11823 fi
11824
11825
11826 # ------------------------------------- #
11827 # Checks for compiler characteristics. #
11828 # ------------------------------------- #
11829
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11831 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11832 if ${ac_cv_c_const+:} false; then :
11833 $as_echo_n "(cached) " >&6
11834 else
11835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11836 /* end confdefs.h. */
11837
11838 int
11839 main ()
11840 {
11841
11842 #ifndef __cplusplus
11843 /* Ultrix mips cc rejects this sort of thing. */
11844 typedef int charset[2];
11845 const charset cs = { 0, 0 };
11846 /* SunOS 4.1.1 cc rejects this. */
11847 char const *const *pcpcc;
11848 char **ppc;
11849 /* NEC SVR4.0.2 mips cc rejects this. */
11850 struct point {int x, y;};
11851 static struct point const zero = {0,0};
11852 /* AIX XL C 1.02.0.0 rejects this.
11853 It does not let you subtract one const X* pointer from another in
11854 an arm of an if-expression whose if-part is not a constant
11855 expression */
11856 const char *g = "string";
11857 pcpcc = &g + (g ? g-g : 0);
11858 /* HPUX 7.0 cc rejects these. */
11859 ++pcpcc;
11860 ppc = (char**) pcpcc;
11861 pcpcc = (char const *const *) ppc;
11862 { /* SCO 3.2v4 cc rejects this sort of thing. */
11863 char tx;
11864 char *t = &tx;
11865 char const *s = 0 ? (char *) 0 : (char const *) 0;
11866
11867 *t++ = 0;
11868 if (s) return 0;
11869 }
11870 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11871 int x[] = {25, 17};
11872 const int *foo = &x[0];
11873 ++foo;
11874 }
11875 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11876 typedef const int *iptr;
11877 iptr p = 0;
11878 ++p;
11879 }
11880 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11881 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11882 struct s { int j; const int *ap[3]; } bx;
11883 struct s *b = &bx; b->j = 5;
11884 }
11885 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11886 const int foo = 10;
11887 if (!foo) return 0;
11888 }
11889 return !cs[0] && !zero.x;
11890 #endif
11891
11892 ;
11893 return 0;
11894 }
11895 _ACEOF
11896 if ac_fn_c_try_compile "$LINENO"; then :
11897 ac_cv_c_const=yes
11898 else
11899 ac_cv_c_const=no
11900 fi
11901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11902 fi
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11904 $as_echo "$ac_cv_c_const" >&6; }
11905 if test $ac_cv_c_const = no; then
11906
11907 $as_echo "#define const /**/" >>confdefs.h
11908
11909 fi
11910
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11912 $as_echo_n "checking for inline... " >&6; }
11913 if ${ac_cv_c_inline+:} false; then :
11914 $as_echo_n "(cached) " >&6
11915 else
11916 ac_cv_c_inline=no
11917 for ac_kw in inline __inline__ __inline; do
11918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11919 /* end confdefs.h. */
11920 #ifndef __cplusplus
11921 typedef int foo_t;
11922 static $ac_kw foo_t static_foo () {return 0; }
11923 $ac_kw foo_t foo () {return 0; }
11924 #endif
11925
11926 _ACEOF
11927 if ac_fn_c_try_compile "$LINENO"; then :
11928 ac_cv_c_inline=$ac_kw
11929 fi
11930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931 test "$ac_cv_c_inline" != no && break
11932 done
11933
11934 fi
11935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11936 $as_echo "$ac_cv_c_inline" >&6; }
11937
11938 case $ac_cv_c_inline in
11939 inline | yes) ;;
11940 *)
11941 case $ac_cv_c_inline in
11942 no) ac_val=;;
11943 *) ac_val=$ac_cv_c_inline;;
11944 esac
11945 cat >>confdefs.h <<_ACEOF
11946 #ifndef __cplusplus
11947 #define inline $ac_val
11948 #endif
11949 _ACEOF
11950 ;;
11951 esac
11952
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11954 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11955 if ${ac_cv_c_bigendian+:} false; then :
11956 $as_echo_n "(cached) " >&6
11957 else
11958 ac_cv_c_bigendian=unknown
11959 # See if we're dealing with a universal compiler.
11960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11961 /* end confdefs.h. */
11962 #ifndef __APPLE_CC__
11963 not a universal capable compiler
11964 #endif
11965 typedef int dummy;
11966
11967 _ACEOF
11968 if ac_fn_c_try_compile "$LINENO"; then :
11969
11970 # Check for potential -arch flags. It is not universal unless
11971 # there are at least two -arch flags with different values.
11972 ac_arch=
11973 ac_prev=
11974 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11975 if test -n "$ac_prev"; then
11976 case $ac_word in
11977 i?86 | x86_64 | ppc | ppc64)
11978 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11979 ac_arch=$ac_word
11980 else
11981 ac_cv_c_bigendian=universal
11982 break
11983 fi
11984 ;;
11985 esac
11986 ac_prev=
11987 elif test "x$ac_word" = "x-arch"; then
11988 ac_prev=arch
11989 fi
11990 done
11991 fi
11992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11993 if test $ac_cv_c_bigendian = unknown; then
11994 # See if sys/param.h defines the BYTE_ORDER macro.
11995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11996 /* end confdefs.h. */
11997 #include <sys/types.h>
11998 #include <sys/param.h>
11999
12000 int
12001 main ()
12002 {
12003 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12004 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12005 && LITTLE_ENDIAN)
12006 bogus endian macros
12007 #endif
12008
12009 ;
12010 return 0;
12011 }
12012 _ACEOF
12013 if ac_fn_c_try_compile "$LINENO"; then :
12014 # It does; now see whether it defined to BIG_ENDIAN or not.
12015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12016 /* end confdefs.h. */
12017 #include <sys/types.h>
12018 #include <sys/param.h>
12019
12020 int
12021 main ()
12022 {
12023 #if BYTE_ORDER != BIG_ENDIAN
12024 not big endian
12025 #endif
12026
12027 ;
12028 return 0;
12029 }
12030 _ACEOF
12031 if ac_fn_c_try_compile "$LINENO"; then :
12032 ac_cv_c_bigendian=yes
12033 else
12034 ac_cv_c_bigendian=no
12035 fi
12036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12037 fi
12038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12039 fi
12040 if test $ac_cv_c_bigendian = unknown; then
12041 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12043 /* end confdefs.h. */
12044 #include <limits.h>
12045
12046 int
12047 main ()
12048 {
12049 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12050 bogus endian macros
12051 #endif
12052
12053 ;
12054 return 0;
12055 }
12056 _ACEOF
12057 if ac_fn_c_try_compile "$LINENO"; then :
12058 # It does; now see whether it defined to _BIG_ENDIAN or not.
12059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12060 /* end confdefs.h. */
12061 #include <limits.h>
12062
12063 int
12064 main ()
12065 {
12066 #ifndef _BIG_ENDIAN
12067 not big endian
12068 #endif
12069
12070 ;
12071 return 0;
12072 }
12073 _ACEOF
12074 if ac_fn_c_try_compile "$LINENO"; then :
12075 ac_cv_c_bigendian=yes
12076 else
12077 ac_cv_c_bigendian=no
12078 fi
12079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12080 fi
12081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12082 fi
12083 if test $ac_cv_c_bigendian = unknown; then
12084 # Compile a test program.
12085 if test "$cross_compiling" = yes; then :
12086 # Try to guess by grepping values from an object file.
12087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12088 /* end confdefs.h. */
12089 short int ascii_mm[] =
12090 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12091 short int ascii_ii[] =
12092 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12093 int use_ascii (int i) {
12094 return ascii_mm[i] + ascii_ii[i];
12095 }
12096 short int ebcdic_ii[] =
12097 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12098 short int ebcdic_mm[] =
12099 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12100 int use_ebcdic (int i) {
12101 return ebcdic_mm[i] + ebcdic_ii[i];
12102 }
12103 extern int foo;
12104
12105 int
12106 main ()
12107 {
12108 return use_ascii (foo) == use_ebcdic (foo);
12109 ;
12110 return 0;
12111 }
12112 _ACEOF
12113 if ac_fn_c_try_compile "$LINENO"; then :
12114 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12115 ac_cv_c_bigendian=yes
12116 fi
12117 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12118 if test "$ac_cv_c_bigendian" = unknown; then
12119 ac_cv_c_bigendian=no
12120 else
12121 # finding both strings is unlikely to happen, but who knows?
12122 ac_cv_c_bigendian=unknown
12123 fi
12124 fi
12125 fi
12126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12127 else
12128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12129 /* end confdefs.h. */
12130 $ac_includes_default
12131 int
12132 main ()
12133 {
12134
12135 /* Are we little or big endian? From Harbison&Steele. */
12136 union
12137 {
12138 long int l;
12139 char c[sizeof (long int)];
12140 } u;
12141 u.l = 1;
12142 return u.c[sizeof (long int) - 1] == 1;
12143
12144 ;
12145 return 0;
12146 }
12147 _ACEOF
12148 if ac_fn_c_try_run "$LINENO"; then :
12149 ac_cv_c_bigendian=no
12150 else
12151 ac_cv_c_bigendian=yes
12152 fi
12153 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12154 conftest.$ac_objext conftest.beam conftest.$ac_ext
12155 fi
12156
12157 fi
12158 fi
12159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12160 $as_echo "$ac_cv_c_bigendian" >&6; }
12161 case $ac_cv_c_bigendian in #(
12162 yes)
12163 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12164 ;; #(
12165 no)
12166 ;; #(
12167 universal)
12168
12169 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12170
12171 ;; #(
12172 *)
12173 as_fn_error $? "unknown endianness
12174 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12175 esac
12176
12177
12178 # ------------------------------ #
12179 # Checks for library functions. #
12180 # ------------------------------ #
12181
12182 for ac_func in getuid getgid \
12183 pipe poll pread pread64 pwrite resize_term \
12184 getpgid setsid \
12185 sigaction sigsetmask socketpair \
12186 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12187 setrlimit getrlimit posix_madvise waitpid \
12188 use_default_colors
12189 do :
12190 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12191 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12192 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12193 cat >>confdefs.h <<_ACEOF
12194 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12195 _ACEOF
12196
12197 fi
12198 done
12199
12200
12201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12202 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12203 if ${am_cv_langinfo_codeset+:} false; then :
12204 $as_echo_n "(cached) " >&6
12205 else
12206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12207 /* end confdefs.h. */
12208 #include <langinfo.h>
12209 int
12210 main ()
12211 {
12212 char* cs = nl_langinfo(CODESET);
12213 ;
12214 return 0;
12215 }
12216 _ACEOF
12217 if ac_fn_c_try_link "$LINENO"; then :
12218 am_cv_langinfo_codeset=yes
12219 else
12220 am_cv_langinfo_codeset=no
12221 fi
12222 rm -f core conftest.err conftest.$ac_objext \
12223 conftest$ac_exeext conftest.$ac_ext
12224
12225 fi
12226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12227 $as_echo "$am_cv_langinfo_codeset" >&6; }
12228 if test $am_cv_langinfo_codeset = yes; then
12229
12230 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12231
12232 fi
12233
12234 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12235 if test "x$ac_cv_type_size_t" = xyes; then :
12236
12237 else
12238
12239 cat >>confdefs.h <<_ACEOF
12240 #define size_t unsigned int
12241 _ACEOF
12242
12243 fi
12244
12245
12246
12247
12248 for ac_header in $ac_header_list
12249 do :
12250 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12251 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12252 "
12253 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12254 cat >>confdefs.h <<_ACEOF
12255 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12256 _ACEOF
12257
12258 fi
12259
12260 done
12261
12262
12263
12264
12265
12266
12267
12268 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12269 if test "x$ac_cv_type_pid_t" = xyes; then :
12270
12271 else
12272
12273 cat >>confdefs.h <<_ACEOF
12274 #define pid_t int
12275 _ACEOF
12276
12277 fi
12278
12279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12280 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12281 if ${ac_cv_path_SED+:} false; then :
12282 $as_echo_n "(cached) " >&6
12283 else
12284 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12285 for ac_i in 1 2 3 4 5 6 7; do
12286 ac_script="$ac_script$as_nl$ac_script"
12287 done
12288 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12289 { ac_script=; unset ac_script;}
12290 if test -z "$SED"; then
12291 ac_path_SED_found=false
12292 # Loop through the user's path and test for each of PROGNAME-LIST
12293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12294 for as_dir in $PATH
12295 do
12296 IFS=$as_save_IFS
12297 test -z "$as_dir" && as_dir=.
12298 for ac_prog in sed gsed; do
12299 for ac_exec_ext in '' $ac_executable_extensions; do
12300 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12301 as_fn_executable_p "$ac_path_SED" || continue
12302 # Check for GNU ac_path_SED and select it if it is found.
12303 # Check for GNU $ac_path_SED
12304 case `"$ac_path_SED" --version 2>&1` in
12305 *GNU*)
12306 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12307 *)
12308 ac_count=0
12309 $as_echo_n 0123456789 >"conftest.in"
12310 while :
12311 do
12312 cat "conftest.in" "conftest.in" >"conftest.tmp"
12313 mv "conftest.tmp" "conftest.in"
12314 cp "conftest.in" "conftest.nl"
12315 $as_echo '' >> "conftest.nl"
12316 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12317 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12318 as_fn_arith $ac_count + 1 && ac_count=$as_val
12319 if test $ac_count -gt ${ac_path_SED_max-0}; then
12320 # Best one so far, save it but keep looking for a better one
12321 ac_cv_path_SED="$ac_path_SED"
12322 ac_path_SED_max=$ac_count
12323 fi
12324 # 10*(2^10) chars as input seems more than enough
12325 test $ac_count -gt 10 && break
12326 done
12327 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12328 esac
12329
12330 $ac_path_SED_found && break 3
12331 done
12332 done
12333 done
12334 IFS=$as_save_IFS
12335 if test -z "$ac_cv_path_SED"; then
12336 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12337 fi
12338 else
12339 ac_cv_path_SED=$SED
12340 fi
12341
12342 fi
12343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12344 $as_echo "$ac_cv_path_SED" >&6; }
12345 SED="$ac_cv_path_SED"
12346 rm -f conftest.sed
12347
12348
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12350 $as_echo_n "checking for ANSI C header files... " >&6; }
12351 if ${ac_cv_header_stdc+:} false; then :
12352 $as_echo_n "(cached) " >&6
12353 else
12354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12355 /* end confdefs.h. */
12356 #include <stdlib.h>
12357 #include <stdarg.h>
12358 #include <string.h>
12359 #include <float.h>
12360
12361 int
12362 main ()
12363 {
12364
12365 ;
12366 return 0;
12367 }
12368 _ACEOF
12369 if ac_fn_c_try_compile "$LINENO"; then :
12370 ac_cv_header_stdc=yes
12371 else
12372 ac_cv_header_stdc=no
12373 fi
12374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12375
12376 if test $ac_cv_header_stdc = yes; then
12377 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12379 /* end confdefs.h. */
12380 #include <string.h>
12381
12382 _ACEOF
12383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12384 $EGREP "memchr" >/dev/null 2>&1; then :
12385
12386 else
12387 ac_cv_header_stdc=no
12388 fi
12389 rm -f conftest*
12390
12391 fi
12392
12393 if test $ac_cv_header_stdc = yes; then
12394 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12396 /* end confdefs.h. */
12397 #include <stdlib.h>
12398
12399 _ACEOF
12400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12401 $EGREP "free" >/dev/null 2>&1; then :
12402
12403 else
12404 ac_cv_header_stdc=no
12405 fi
12406 rm -f conftest*
12407
12408 fi
12409
12410 if test $ac_cv_header_stdc = yes; then
12411 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12412 if test "$cross_compiling" = yes; then :
12413 :
12414 else
12415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12416 /* end confdefs.h. */
12417 #include <ctype.h>
12418 #include <stdlib.h>
12419 #if ((' ' & 0x0FF) == 0x020)
12420 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12421 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12422 #else
12423 # define ISLOWER(c) \
12424 (('a' <= (c) && (c) <= 'i') \
12425 || ('j' <= (c) && (c) <= 'r') \
12426 || ('s' <= (c) && (c) <= 'z'))
12427 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12428 #endif
12429
12430 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12431 int
12432 main ()
12433 {
12434 int i;
12435 for (i = 0; i < 256; i++)
12436 if (XOR (islower (i), ISLOWER (i))
12437 || toupper (i) != TOUPPER (i))
12438 return 2;
12439 return 0;
12440 }
12441 _ACEOF
12442 if ac_fn_c_try_run "$LINENO"; then :
12443
12444 else
12445 ac_cv_header_stdc=no
12446 fi
12447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12448 conftest.$ac_objext conftest.beam conftest.$ac_ext
12449 fi
12450
12451 fi
12452 fi
12453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12454 $as_echo "$ac_cv_header_stdc" >&6; }
12455 if test $ac_cv_header_stdc = yes; then
12456
12457 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12458
12459 fi
12460
12461 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12462 # for constant arguments. Useless!
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12464 $as_echo_n "checking for working alloca.h... " >&6; }
12465 if ${ac_cv_working_alloca_h+:} false; then :
12466 $as_echo_n "(cached) " >&6
12467 else
12468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12469 /* end confdefs.h. */
12470 #include <alloca.h>
12471 int
12472 main ()
12473 {
12474 char *p = (char *) alloca (2 * sizeof (int));
12475 if (p) return 0;
12476 ;
12477 return 0;
12478 }
12479 _ACEOF
12480 if ac_fn_c_try_link "$LINENO"; then :
12481 ac_cv_working_alloca_h=yes
12482 else
12483 ac_cv_working_alloca_h=no
12484 fi
12485 rm -f core conftest.err conftest.$ac_objext \
12486 conftest$ac_exeext conftest.$ac_ext
12487 fi
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12489 $as_echo "$ac_cv_working_alloca_h" >&6; }
12490 if test $ac_cv_working_alloca_h = yes; then
12491
12492 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12493
12494 fi
12495
12496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12497 $as_echo_n "checking for alloca... " >&6; }
12498 if ${ac_cv_func_alloca_works+:} false; then :
12499 $as_echo_n "(cached) " >&6
12500 else
12501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12502 /* end confdefs.h. */
12503 #ifdef __GNUC__
12504 # define alloca __builtin_alloca
12505 #else
12506 # ifdef _MSC_VER
12507 # include <malloc.h>
12508 # define alloca _alloca
12509 # else
12510 # ifdef HAVE_ALLOCA_H
12511 # include <alloca.h>
12512 # else
12513 # ifdef _AIX
12514 #pragma alloca
12515 # else
12516 # ifndef alloca /* predefined by HP cc +Olibcalls */
12517 void *alloca (size_t);
12518 # endif
12519 # endif
12520 # endif
12521 # endif
12522 #endif
12523
12524 int
12525 main ()
12526 {
12527 char *p = (char *) alloca (1);
12528 if (p) return 0;
12529 ;
12530 return 0;
12531 }
12532 _ACEOF
12533 if ac_fn_c_try_link "$LINENO"; then :
12534 ac_cv_func_alloca_works=yes
12535 else
12536 ac_cv_func_alloca_works=no
12537 fi
12538 rm -f core conftest.err conftest.$ac_objext \
12539 conftest$ac_exeext conftest.$ac_ext
12540 fi
12541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12542 $as_echo "$ac_cv_func_alloca_works" >&6; }
12543
12544 if test $ac_cv_func_alloca_works = yes; then
12545
12546 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12547
12548 else
12549 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12550 # that cause trouble. Some versions do not even contain alloca or
12551 # contain a buggy version. If you still want to use their alloca,
12552 # use ar to extract alloca.o from them instead of compiling alloca.c.
12553
12554 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12555
12556 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12557
12558
12559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12560 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12561 if ${ac_cv_os_cray+:} false; then :
12562 $as_echo_n "(cached) " >&6
12563 else
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565 /* end confdefs.h. */
12566 #if defined CRAY && ! defined CRAY2
12567 webecray
12568 #else
12569 wenotbecray
12570 #endif
12571
12572 _ACEOF
12573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12574 $EGREP "webecray" >/dev/null 2>&1; then :
12575 ac_cv_os_cray=yes
12576 else
12577 ac_cv_os_cray=no
12578 fi
12579 rm -f conftest*
12580
12581 fi
12582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12583 $as_echo "$ac_cv_os_cray" >&6; }
12584 if test $ac_cv_os_cray = yes; then
12585 for ac_func in _getb67 GETB67 getb67; do
12586 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12587 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12588 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12589
12590 cat >>confdefs.h <<_ACEOF
12591 #define CRAY_STACKSEG_END $ac_func
12592 _ACEOF
12593
12594 break
12595 fi
12596
12597 done
12598 fi
12599
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12601 $as_echo_n "checking stack direction for C alloca... " >&6; }
12602 if ${ac_cv_c_stack_direction+:} false; then :
12603 $as_echo_n "(cached) " >&6
12604 else
12605 if test "$cross_compiling" = yes; then :
12606 ac_cv_c_stack_direction=0
12607 else
12608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12609 /* end confdefs.h. */
12610 $ac_includes_default
12611 int
12612 find_stack_direction (int *addr, int depth)
12613 {
12614 int dir, dummy = 0;
12615 if (! addr)
12616 addr = &dummy;
12617 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12618 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12619 return dir + dummy;
12620 }
12621
12622 int
12623 main (int argc, char **argv)
12624 {
12625 return find_stack_direction (0, argc + !argv + 20) < 0;
12626 }
12627 _ACEOF
12628 if ac_fn_c_try_run "$LINENO"; then :
12629 ac_cv_c_stack_direction=1
12630 else
12631 ac_cv_c_stack_direction=-1
12632 fi
12633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12634 conftest.$ac_objext conftest.beam conftest.$ac_ext
12635 fi
12636
12637 fi
12638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12639 $as_echo "$ac_cv_c_stack_direction" >&6; }
12640 cat >>confdefs.h <<_ACEOF
12641 #define STACK_DIRECTION $ac_cv_c_stack_direction
12642 _ACEOF
12643
12644
12645 fi
12646
12647
12648 WIN32APILIBS=
12649 case ${host} in
12650 *mingw32*)
12651
12652 $as_echo "#define USE_WIN32API 1" >>confdefs.h
12653
12654 WIN32APILIBS="-lws2_32"
12655 ;;
12656 esac
12657
12658
12659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12660 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12661 if ${am_cv_langinfo_codeset+:} false; then :
12662 $as_echo_n "(cached) " >&6
12663 else
12664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12665 /* end confdefs.h. */
12666 #include <langinfo.h>
12667 int
12668 main ()
12669 {
12670 char* cs = nl_langinfo(CODESET);
12671 ;
12672 return 0;
12673 }
12674 _ACEOF
12675 if ac_fn_c_try_link "$LINENO"; then :
12676 am_cv_langinfo_codeset=yes
12677 else
12678 am_cv_langinfo_codeset=no
12679 fi
12680 rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
12682
12683 fi
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12685 $as_echo "$am_cv_langinfo_codeset" >&6; }
12686 if test $am_cv_langinfo_codeset = yes; then
12687
12688 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12689
12690 fi
12691
12692
12693 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 sys/procfs.h proc_service.h
12694 do :
12695 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12696 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12697 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12698 cat >>confdefs.h <<_ACEOF
12699 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12700 _ACEOF
12701
12702 fi
12703
12704 done
12705
12706
12707
12708 for ac_func in getpagesize
12709 do :
12710 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12711 if test "x$ac_cv_func_getpagesize" = xyes; then :
12712 cat >>confdefs.h <<_ACEOF
12713 #define HAVE_GETPAGESIZE 1
12714 _ACEOF
12715
12716 fi
12717 done
12718
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12720 $as_echo_n "checking for working mmap... " >&6; }
12721 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12722 $as_echo_n "(cached) " >&6
12723 else
12724 if test "$cross_compiling" = yes; then :
12725 ac_cv_func_mmap_fixed_mapped=no
12726 else
12727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12728 /* end confdefs.h. */
12729 $ac_includes_default
12730 /* malloc might have been renamed as rpl_malloc. */
12731 #undef malloc
12732
12733 /* Thanks to Mike Haertel and Jim Avera for this test.
12734 Here is a matrix of mmap possibilities:
12735 mmap private not fixed
12736 mmap private fixed at somewhere currently unmapped
12737 mmap private fixed at somewhere already mapped
12738 mmap shared not fixed
12739 mmap shared fixed at somewhere currently unmapped
12740 mmap shared fixed at somewhere already mapped
12741 For private mappings, we should verify that changes cannot be read()
12742 back from the file, nor mmap's back from the file at a different
12743 address. (There have been systems where private was not correctly
12744 implemented like the infamous i386 svr4.0, and systems where the
12745 VM page cache was not coherent with the file system buffer cache
12746 like early versions of FreeBSD and possibly contemporary NetBSD.)
12747 For shared mappings, we should conversely verify that changes get
12748 propagated back to all the places they're supposed to be.
12749
12750 Grep wants private fixed already mapped.
12751 The main things grep needs to know about mmap are:
12752 * does it exist and is it safe to write into the mmap'd area
12753 * how to use it (BSD variants) */
12754
12755 #include <fcntl.h>
12756 #include <sys/mman.h>
12757
12758 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12759 char *malloc ();
12760 #endif
12761
12762 /* This mess was copied from the GNU getpagesize.h. */
12763 #ifndef HAVE_GETPAGESIZE
12764 # ifdef _SC_PAGESIZE
12765 # define getpagesize() sysconf(_SC_PAGESIZE)
12766 # else /* no _SC_PAGESIZE */
12767 # ifdef HAVE_SYS_PARAM_H
12768 # include <sys/param.h>
12769 # ifdef EXEC_PAGESIZE
12770 # define getpagesize() EXEC_PAGESIZE
12771 # else /* no EXEC_PAGESIZE */
12772 # ifdef NBPG
12773 # define getpagesize() NBPG * CLSIZE
12774 # ifndef CLSIZE
12775 # define CLSIZE 1
12776 # endif /* no CLSIZE */
12777 # else /* no NBPG */
12778 # ifdef NBPC
12779 # define getpagesize() NBPC
12780 # else /* no NBPC */
12781 # ifdef PAGESIZE
12782 # define getpagesize() PAGESIZE
12783 # endif /* PAGESIZE */
12784 # endif /* no NBPC */
12785 # endif /* no NBPG */
12786 # endif /* no EXEC_PAGESIZE */
12787 # else /* no HAVE_SYS_PARAM_H */
12788 # define getpagesize() 8192 /* punt totally */
12789 # endif /* no HAVE_SYS_PARAM_H */
12790 # endif /* no _SC_PAGESIZE */
12791
12792 #endif /* no HAVE_GETPAGESIZE */
12793
12794 int
12795 main ()
12796 {
12797 char *data, *data2, *data3;
12798 const char *cdata2;
12799 int i, pagesize;
12800 int fd, fd2;
12801
12802 pagesize = getpagesize ();
12803
12804 /* First, make a file with some known garbage in it. */
12805 data = (char *) malloc (pagesize);
12806 if (!data)
12807 return 1;
12808 for (i = 0; i < pagesize; ++i)
12809 *(data + i) = rand ();
12810 umask (0);
12811 fd = creat ("conftest.mmap", 0600);
12812 if (fd < 0)
12813 return 2;
12814 if (write (fd, data, pagesize) != pagesize)
12815 return 3;
12816 close (fd);
12817
12818 /* Next, check that the tail of a page is zero-filled. File must have
12819 non-zero length, otherwise we risk SIGBUS for entire page. */
12820 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12821 if (fd2 < 0)
12822 return 4;
12823 cdata2 = "";
12824 if (write (fd2, cdata2, 1) != 1)
12825 return 5;
12826 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12827 if (data2 == MAP_FAILED)
12828 return 6;
12829 for (i = 0; i < pagesize; ++i)
12830 if (*(data2 + i))
12831 return 7;
12832 close (fd2);
12833 if (munmap (data2, pagesize))
12834 return 8;
12835
12836 /* Next, try to mmap the file at a fixed address which already has
12837 something else allocated at it. If we can, also make sure that
12838 we see the same garbage. */
12839 fd = open ("conftest.mmap", O_RDWR);
12840 if (fd < 0)
12841 return 9;
12842 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12843 MAP_PRIVATE | MAP_FIXED, fd, 0L))
12844 return 10;
12845 for (i = 0; i < pagesize; ++i)
12846 if (*(data + i) != *(data2 + i))
12847 return 11;
12848
12849 /* Finally, make sure that changes to the mapped area do not
12850 percolate back to the file as seen by read(). (This is a bug on
12851 some variants of i386 svr4.0.) */
12852 for (i = 0; i < pagesize; ++i)
12853 *(data2 + i) = *(data2 + i) + 1;
12854 data3 = (char *) malloc (pagesize);
12855 if (!data3)
12856 return 12;
12857 if (read (fd, data3, pagesize) != pagesize)
12858 return 13;
12859 for (i = 0; i < pagesize; ++i)
12860 if (*(data + i) != *(data3 + i))
12861 return 14;
12862 close (fd);
12863 return 0;
12864 }
12865 _ACEOF
12866 if ac_fn_c_try_run "$LINENO"; then :
12867 ac_cv_func_mmap_fixed_mapped=yes
12868 else
12869 ac_cv_func_mmap_fixed_mapped=no
12870 fi
12871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12872 conftest.$ac_objext conftest.beam conftest.$ac_ext
12873 fi
12874
12875 fi
12876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12877 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12878 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12879
12880 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12881
12882 fi
12883 rm -f conftest.mmap conftest.txt
12884
12885 for ac_header in vfork.h
12886 do :
12887 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12888 if test "x$ac_cv_header_vfork_h" = xyes; then :
12889 cat >>confdefs.h <<_ACEOF
12890 #define HAVE_VFORK_H 1
12891 _ACEOF
12892
12893 fi
12894
12895 done
12896
12897 for ac_func in fork vfork
12898 do :
12899 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12900 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12901 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12902 cat >>confdefs.h <<_ACEOF
12903 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12904 _ACEOF
12905
12906 fi
12907 done
12908
12909 if test "x$ac_cv_func_fork" = xyes; then
12910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12911 $as_echo_n "checking for working fork... " >&6; }
12912 if ${ac_cv_func_fork_works+:} false; then :
12913 $as_echo_n "(cached) " >&6
12914 else
12915 if test "$cross_compiling" = yes; then :
12916 ac_cv_func_fork_works=cross
12917 else
12918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12919 /* end confdefs.h. */
12920 $ac_includes_default
12921 int
12922 main ()
12923 {
12924
12925 /* By Ruediger Kuhlmann. */
12926 return fork () < 0;
12927
12928 ;
12929 return 0;
12930 }
12931 _ACEOF
12932 if ac_fn_c_try_run "$LINENO"; then :
12933 ac_cv_func_fork_works=yes
12934 else
12935 ac_cv_func_fork_works=no
12936 fi
12937 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12938 conftest.$ac_objext conftest.beam conftest.$ac_ext
12939 fi
12940
12941 fi
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12943 $as_echo "$ac_cv_func_fork_works" >&6; }
12944
12945 else
12946 ac_cv_func_fork_works=$ac_cv_func_fork
12947 fi
12948 if test "x$ac_cv_func_fork_works" = xcross; then
12949 case $host in
12950 *-*-amigaos* | *-*-msdosdjgpp*)
12951 # Override, as these systems have only a dummy fork() stub
12952 ac_cv_func_fork_works=no
12953 ;;
12954 *)
12955 ac_cv_func_fork_works=yes
12956 ;;
12957 esac
12958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12959 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
12960 fi
12961 ac_cv_func_vfork_works=$ac_cv_func_vfork
12962 if test "x$ac_cv_func_vfork" = xyes; then
12963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12964 $as_echo_n "checking for working vfork... " >&6; }
12965 if ${ac_cv_func_vfork_works+:} false; then :
12966 $as_echo_n "(cached) " >&6
12967 else
12968 if test "$cross_compiling" = yes; then :
12969 ac_cv_func_vfork_works=cross
12970 else
12971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12972 /* end confdefs.h. */
12973 /* Thanks to Paul Eggert for this test. */
12974 $ac_includes_default
12975 #include <sys/wait.h>
12976 #ifdef HAVE_VFORK_H
12977 # include <vfork.h>
12978 #endif
12979 /* On some sparc systems, changes by the child to local and incoming
12980 argument registers are propagated back to the parent. The compiler
12981 is told about this with #include <vfork.h>, but some compilers
12982 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12983 static variable whose address is put into a register that is
12984 clobbered by the vfork. */
12985 static void
12986 #ifdef __cplusplus
12987 sparc_address_test (int arg)
12988 # else
12989 sparc_address_test (arg) int arg;
12990 #endif
12991 {
12992 static pid_t child;
12993 if (!child) {
12994 child = vfork ();
12995 if (child < 0) {
12996 perror ("vfork");
12997 _exit(2);
12998 }
12999 if (!child) {
13000 arg = getpid();
13001 write(-1, "", 0);
13002 _exit (arg);
13003 }
13004 }
13005 }
13006
13007 int
13008 main ()
13009 {
13010 pid_t parent = getpid ();
13011 pid_t child;
13012
13013 sparc_address_test (0);
13014
13015 child = vfork ();
13016
13017 if (child == 0) {
13018 /* Here is another test for sparc vfork register problems. This
13019 test uses lots of local variables, at least as many local
13020 variables as main has allocated so far including compiler
13021 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13022 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13023 reuse the register of parent for one of the local variables,
13024 since it will think that parent can't possibly be used any more
13025 in this routine. Assigning to the local variable will thus
13026 munge parent in the parent process. */
13027 pid_t
13028 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13029 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13030 /* Convince the compiler that p..p7 are live; otherwise, it might
13031 use the same hardware register for all 8 local variables. */
13032 if (p != p1 || p != p2 || p != p3 || p != p4
13033 || p != p5 || p != p6 || p != p7)
13034 _exit(1);
13035
13036 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13037 from child file descriptors. If the child closes a descriptor
13038 before it execs or exits, this munges the parent's descriptor
13039 as well. Test for this by closing stdout in the child. */
13040 _exit(close(fileno(stdout)) != 0);
13041 } else {
13042 int status;
13043 struct stat st;
13044
13045 while (wait(&status) != child)
13046 ;
13047 return (
13048 /* Was there some problem with vforking? */
13049 child < 0
13050
13051 /* Did the child fail? (This shouldn't happen.) */
13052 || status
13053
13054 /* Did the vfork/compiler bug occur? */
13055 || parent != getpid()
13056
13057 /* Did the file descriptor bug occur? */
13058 || fstat(fileno(stdout), &st) != 0
13059 );
13060 }
13061 }
13062 _ACEOF
13063 if ac_fn_c_try_run "$LINENO"; then :
13064 ac_cv_func_vfork_works=yes
13065 else
13066 ac_cv_func_vfork_works=no
13067 fi
13068 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13069 conftest.$ac_objext conftest.beam conftest.$ac_ext
13070 fi
13071
13072 fi
13073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13074 $as_echo "$ac_cv_func_vfork_works" >&6; }
13075
13076 fi;
13077 if test "x$ac_cv_func_fork_works" = xcross; then
13078 ac_cv_func_vfork_works=$ac_cv_func_vfork
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13080 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13081 fi
13082
13083 if test "x$ac_cv_func_vfork_works" = xyes; then
13084
13085 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13086
13087 else
13088
13089 $as_echo "#define vfork fork" >>confdefs.h
13090
13091 fi
13092 if test "x$ac_cv_func_fork_works" = xyes; then
13093
13094 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13095
13096 fi
13097
13098 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
13099 ptrace64 sbrk setns sigaltstack sigprocmask \
13100 setpgid setpgrp getrusage getauxval
13101 do :
13102 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13103 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13104 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13105 cat >>confdefs.h <<_ACEOF
13106 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13107 _ACEOF
13108
13109 fi
13110 done
13111
13112
13113 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13114 "
13115 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13116 ac_have_decl=1
13117 else
13118 ac_have_decl=0
13119 fi
13120
13121 cat >>confdefs.h <<_ACEOF
13122 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13123 _ACEOF
13124
13125
13126 if test "$cross_compiling" = yes; then :
13127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13128 /* end confdefs.h. */
13129 #include <sys/personality.h>
13130 int
13131 main ()
13132 {
13133
13134 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13135 # define ADDR_NO_RANDOMIZE 0x0040000
13136 # endif
13137 /* Test the flag could be set and stays set. */
13138 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13139 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13140 return 1
13141 ;
13142 return 0;
13143 }
13144 _ACEOF
13145 if ac_fn_c_try_link "$LINENO"; then :
13146 have_personality=true
13147 else
13148 have_personality=false
13149 fi
13150 rm -f core conftest.err conftest.$ac_objext \
13151 conftest$ac_exeext conftest.$ac_ext
13152 else
13153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13154 /* end confdefs.h. */
13155 #include <sys/personality.h>
13156 int
13157 main ()
13158 {
13159
13160 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13161 # define ADDR_NO_RANDOMIZE 0x0040000
13162 # endif
13163 /* Test the flag could be set and stays set. */
13164 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13165 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13166 return 1
13167 ;
13168 return 0;
13169 }
13170 _ACEOF
13171 if ac_fn_c_try_run "$LINENO"; then :
13172 have_personality=true
13173 else
13174 have_personality=false
13175 fi
13176 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13177 conftest.$ac_objext conftest.beam conftest.$ac_ext
13178 fi
13179
13180 if $have_personality
13181 then
13182
13183 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
13184
13185 fi
13186
13187 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13188 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13189 ac_have_decl=1
13190 else
13191 ac_have_decl=0
13192 fi
13193
13194 cat >>confdefs.h <<_ACEOF
13195 #define HAVE_DECL_STRSTR $ac_have_decl
13196 _ACEOF
13197
13198
13199 # ----------------------- #
13200 # Checks for structures. #
13201 # ----------------------- #
13202
13203 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13204 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13205
13206 cat >>confdefs.h <<_ACEOF
13207 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13208 _ACEOF
13209
13210
13211 fi
13212 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13213 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13214
13215 cat >>confdefs.h <<_ACEOF
13216 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13217 _ACEOF
13218
13219
13220 fi
13221
13222
13223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13224 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13225 if ${ac_cv_search_kinfo_getfile+:} false; then :
13226 $as_echo_n "(cached) " >&6
13227 else
13228 ac_func_search_save_LIBS=$LIBS
13229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13230 /* end confdefs.h. */
13231
13232 /* Override any GCC internal prototype to avoid an error.
13233 Use char because int might match the return type of a GCC
13234 builtin and then its argument prototype would still apply. */
13235 #ifdef __cplusplus
13236 extern "C"
13237 #endif
13238 char kinfo_getfile ();
13239 int
13240 main ()
13241 {
13242 return kinfo_getfile ();
13243 ;
13244 return 0;
13245 }
13246 _ACEOF
13247 for ac_lib in '' util util-freebsd; do
13248 if test -z "$ac_lib"; then
13249 ac_res="none required"
13250 else
13251 ac_res=-l$ac_lib
13252 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13253 fi
13254 if ac_fn_c_try_link "$LINENO"; then :
13255 ac_cv_search_kinfo_getfile=$ac_res
13256 fi
13257 rm -f core conftest.err conftest.$ac_objext \
13258 conftest$ac_exeext
13259 if ${ac_cv_search_kinfo_getfile+:} false; then :
13260 break
13261 fi
13262 done
13263 if ${ac_cv_search_kinfo_getfile+:} false; then :
13264
13265 else
13266 ac_cv_search_kinfo_getfile=no
13267 fi
13268 rm conftest.$ac_ext
13269 LIBS=$ac_func_search_save_LIBS
13270 fi
13271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13272 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13273 ac_res=$ac_cv_search_kinfo_getfile
13274 if test "$ac_res" != no; then :
13275 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13276
13277 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
13278
13279 fi
13280
13281
13282 # Check for std::thread. This does not work on some platforms, like
13283 # mingw and DJGPP.
13284 ac_ext=cpp
13285 ac_cpp='$CXXCPP $CPPFLAGS'
13286 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13287 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13288 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13289
13290
13291
13292
13293
13294 ac_ext=c
13295 ac_cpp='$CPP $CPPFLAGS'
13296 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13297 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13298 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13299
13300 ax_pthread_ok=no
13301
13302 # We used to check for pthread.h first, but this fails if pthread.h
13303 # requires special compiler flags (e.g. on Tru64 or Sequent).
13304 # It gets checked for in the link test anyway.
13305
13306 # First of all, check if the user has set any of the PTHREAD_LIBS,
13307 # etcetera environment variables, and if threads linking works using
13308 # them:
13309 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13310 ax_pthread_save_CC="$CC"
13311 ax_pthread_save_CFLAGS="$CFLAGS"
13312 ax_pthread_save_LIBS="$LIBS"
13313 if test "x$PTHREAD_CC" != "x"; then :
13314 CC="$PTHREAD_CC"
13315 fi
13316 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13317 LIBS="$PTHREAD_LIBS $LIBS"
13318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13319 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13321 /* end confdefs.h. */
13322
13323 /* Override any GCC internal prototype to avoid an error.
13324 Use char because int might match the return type of a GCC
13325 builtin and then its argument prototype would still apply. */
13326 #ifdef __cplusplus
13327 extern "C"
13328 #endif
13329 char pthread_join ();
13330 int
13331 main ()
13332 {
13333 return pthread_join ();
13334 ;
13335 return 0;
13336 }
13337 _ACEOF
13338 if ac_fn_c_try_link "$LINENO"; then :
13339 ax_pthread_ok=yes
13340 fi
13341 rm -f core conftest.err conftest.$ac_objext \
13342 conftest$ac_exeext conftest.$ac_ext
13343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13344 $as_echo "$ax_pthread_ok" >&6; }
13345 if test "x$ax_pthread_ok" = "xno"; then
13346 PTHREAD_LIBS=""
13347 PTHREAD_CFLAGS=""
13348 fi
13349 CC="$ax_pthread_save_CC"
13350 CFLAGS="$ax_pthread_save_CFLAGS"
13351 LIBS="$ax_pthread_save_LIBS"
13352 fi
13353
13354 # We must check for the threads library under a number of different
13355 # names; the ordering is very important because some systems
13356 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13357 # libraries is broken (non-POSIX).
13358
13359 # Create a list of thread flags to try. Items starting with a "-" are
13360 # C compiler flags, and other items are library names, except for "none"
13361 # which indicates that we try without any flags at all, and "pthread-config"
13362 # which is a program returning the flags for the Pth emulation library.
13363
13364 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13365
13366 # The ordering *is* (sometimes) important. Some notes on the
13367 # individual items follow:
13368
13369 # pthreads: AIX (must check this before -lpthread)
13370 # none: in case threads are in libc; should be tried before -Kthread and
13371 # other compiler flags to prevent continual compiler warnings
13372 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13373 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13374 # (Note: HP C rejects this with "bad form for `-t' option")
13375 # -pthreads: Solaris/gcc (Note: HP C also rejects)
13376 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13377 # doesn't hurt to check since this sometimes defines pthreads and
13378 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
13379 # is present but should not be used directly; and before -mthreads,
13380 # because the compiler interprets this as "-mt" + "-hreads")
13381 # -mthreads: Mingw32/gcc, Lynx/gcc
13382 # pthread: Linux, etcetera
13383 # --thread-safe: KAI C++
13384 # pthread-config: use pthread-config program (for GNU Pth library)
13385
13386 case $host_os in
13387
13388 freebsd*)
13389
13390 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13391 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13392
13393 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13394 ;;
13395
13396 hpux*)
13397
13398 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13399 # multi-threading and also sets -lpthread."
13400
13401 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13402 ;;
13403
13404 openedition*)
13405
13406 # IBM z/OS requires a feature-test macro to be defined in order to
13407 # enable POSIX threads at all, so give the user a hint if this is
13408 # not set. (We don't define these ourselves, as they can affect
13409 # other portions of the system API in unpredictable ways.)
13410
13411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13412 /* end confdefs.h. */
13413
13414 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13415 AX_PTHREAD_ZOS_MISSING
13416 # endif
13417
13418 _ACEOF
13419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13420 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13422 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13423 fi
13424 rm -f conftest*
13425
13426 ;;
13427
13428 solaris*)
13429
13430 # On Solaris (at least, for some versions), libc contains stubbed
13431 # (non-functional) versions of the pthreads routines, so link-based
13432 # tests will erroneously succeed. (N.B.: The stubs are missing
13433 # pthread_cleanup_push, or rather a function called by this macro,
13434 # so we could check for that, but who knows whether they'll stub
13435 # that too in a future libc.) So we'll check first for the
13436 # standard Solaris way of linking pthreads (-mt -lpthread).
13437
13438 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13439 ;;
13440 esac
13441
13442 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13443
13444 if test "x$GCC" = "xyes"; then :
13445 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13446 fi
13447
13448 # The presence of a feature test macro requesting re-entrant function
13449 # definitions is, on some systems, a strong hint that pthreads support is
13450 # correctly enabled
13451
13452 case $host_os in
13453 darwin* | hpux* | linux* | osf* | solaris*)
13454 ax_pthread_check_macro="_REENTRANT"
13455 ;;
13456
13457 aix*)
13458 ax_pthread_check_macro="_THREAD_SAFE"
13459 ;;
13460
13461 *)
13462 ax_pthread_check_macro="--"
13463 ;;
13464 esac
13465 if test "x$ax_pthread_check_macro" = "x--"; then :
13466 ax_pthread_check_cond=0
13467 else
13468 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13469 fi
13470
13471 # Are we compiling with Clang?
13472
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13474 $as_echo_n "checking whether $CC is Clang... " >&6; }
13475 if ${ax_cv_PTHREAD_CLANG+:} false; then :
13476 $as_echo_n "(cached) " >&6
13477 else
13478 ax_cv_PTHREAD_CLANG=no
13479 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13480 if test "x$GCC" = "xyes"; then
13481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13482 /* end confdefs.h. */
13483 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13484 # if defined(__clang__) && defined(__llvm__)
13485 AX_PTHREAD_CC_IS_CLANG
13486 # endif
13487
13488 _ACEOF
13489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13490 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13491 ax_cv_PTHREAD_CLANG=yes
13492 fi
13493 rm -f conftest*
13494
13495 fi
13496
13497 fi
13498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13499 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13500 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13501
13502 ax_pthread_clang_warning=no
13503
13504 # Clang needs special handling, because older versions handle the -pthread
13505 # option in a rather... idiosyncratic way
13506
13507 if test "x$ax_pthread_clang" = "xyes"; then
13508
13509 # Clang takes -pthread; it has never supported any other flag
13510
13511 # (Note 1: This will need to be revisited if a system that Clang
13512 # supports has POSIX threads in a separate library. This tends not
13513 # to be the way of modern systems, but it's conceivable.)
13514
13515 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13516 # to get POSIX threads support; the API is always present and
13517 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13518 # -pthread does define _REENTRANT, and while the Darwin headers
13519 # ignore this macro, third-party headers might not.)
13520
13521 PTHREAD_CFLAGS="-pthread"
13522 PTHREAD_LIBS=
13523
13524 ax_pthread_ok=yes
13525
13526 # However, older versions of Clang make a point of warning the user
13527 # that, in an invocation where only linking and no compilation is
13528 # taking place, the -pthread option has no effect ("argument unused
13529 # during compilation"). They expect -pthread to be passed in only
13530 # when source code is being compiled.
13531 #
13532 # Problem is, this is at odds with the way Automake and most other
13533 # C build frameworks function, which is that the same flags used in
13534 # compilation (CFLAGS) are also used in linking. Many systems
13535 # supported by AX_PTHREAD require exactly this for POSIX threads
13536 # support, and in fact it is often not straightforward to specify a
13537 # flag that is used only in the compilation phase and not in
13538 # linking. Such a scenario is extremely rare in practice.
13539 #
13540 # Even though use of the -pthread flag in linking would only print
13541 # a warning, this can be a nuisance for well-run software projects
13542 # that build with -Werror. So if the active version of Clang has
13543 # this misfeature, we search for an option to squash it.
13544
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13546 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13547 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13548 $as_echo_n "(cached) " >&6
13549 else
13550 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13551 # Create an alternate version of $ac_link that compiles and
13552 # links in two steps (.c -> .o, .o -> exe) instead of one
13553 # (.c -> exe), because the warning occurs only in the second
13554 # step
13555 ax_pthread_save_ac_link="$ac_link"
13556 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13557 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13558 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13559 ax_pthread_save_CFLAGS="$CFLAGS"
13560 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13561 if test "x$ax_pthread_try" = "xunknown"; then :
13562 break
13563 fi
13564 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13565 ac_link="$ax_pthread_save_ac_link"
13566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13567 /* end confdefs.h. */
13568 int main(void){return 0;}
13569 _ACEOF
13570 if ac_fn_c_try_link "$LINENO"; then :
13571 ac_link="$ax_pthread_2step_ac_link"
13572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573 /* end confdefs.h. */
13574 int main(void){return 0;}
13575 _ACEOF
13576 if ac_fn_c_try_link "$LINENO"; then :
13577 break
13578 fi
13579 rm -f core conftest.err conftest.$ac_objext \
13580 conftest$ac_exeext conftest.$ac_ext
13581
13582 fi
13583 rm -f core conftest.err conftest.$ac_objext \
13584 conftest$ac_exeext conftest.$ac_ext
13585 done
13586 ac_link="$ax_pthread_save_ac_link"
13587 CFLAGS="$ax_pthread_save_CFLAGS"
13588 if test "x$ax_pthread_try" = "x"; then :
13589 ax_pthread_try=no
13590 fi
13591 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13592
13593 fi
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13595 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13596
13597 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13598 no | unknown) ;;
13599 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13600 esac
13601
13602 fi # $ax_pthread_clang = yes
13603
13604 if test "x$ax_pthread_ok" = "xno"; then
13605 for ax_pthread_try_flag in $ax_pthread_flags; do
13606
13607 case $ax_pthread_try_flag in
13608 none)
13609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13610 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
13611 ;;
13612
13613 -mt,pthread)
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13615 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13616 PTHREAD_CFLAGS="-mt"
13617 PTHREAD_LIBS="-lpthread"
13618 ;;
13619
13620 -*)
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13622 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13623 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13624 ;;
13625
13626 pthread-config)
13627 # Extract the first word of "pthread-config", so it can be a program name with args.
13628 set dummy pthread-config; ac_word=$2
13629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13630 $as_echo_n "checking for $ac_word... " >&6; }
13631 if ${ac_cv_prog_ax_pthread_config+:} false; then :
13632 $as_echo_n "(cached) " >&6
13633 else
13634 if test -n "$ax_pthread_config"; then
13635 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13636 else
13637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13638 for as_dir in $PATH
13639 do
13640 IFS=$as_save_IFS
13641 test -z "$as_dir" && as_dir=.
13642 for ac_exec_ext in '' $ac_executable_extensions; do
13643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13644 ac_cv_prog_ax_pthread_config="yes"
13645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13646 break 2
13647 fi
13648 done
13649 done
13650 IFS=$as_save_IFS
13651
13652 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13653 fi
13654 fi
13655 ax_pthread_config=$ac_cv_prog_ax_pthread_config
13656 if test -n "$ax_pthread_config"; then
13657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13658 $as_echo "$ax_pthread_config" >&6; }
13659 else
13660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13661 $as_echo "no" >&6; }
13662 fi
13663
13664
13665 if test "x$ax_pthread_config" = "xno"; then :
13666 continue
13667 fi
13668 PTHREAD_CFLAGS="`pthread-config --cflags`"
13669 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13670 ;;
13671
13672 *)
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13674 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13675 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13676 ;;
13677 esac
13678
13679 ax_pthread_save_CFLAGS="$CFLAGS"
13680 ax_pthread_save_LIBS="$LIBS"
13681 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13682 LIBS="$PTHREAD_LIBS $LIBS"
13683
13684 # Check for various functions. We must include pthread.h,
13685 # since some functions may be macros. (On the Sequent, we
13686 # need a special flag -Kthread to make this header compile.)
13687 # We check for pthread_join because it is in -lpthread on IRIX
13688 # while pthread_create is in libc. We check for pthread_attr_init
13689 # due to DEC craziness with -lpthreads. We check for
13690 # pthread_cleanup_push because it is one of the few pthread
13691 # functions on Solaris that doesn't have a non-functional libc stub.
13692 # We try pthread_create on general principles.
13693
13694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13695 /* end confdefs.h. */
13696 #include <pthread.h>
13697 # if $ax_pthread_check_cond
13698 # error "$ax_pthread_check_macro must be defined"
13699 # endif
13700 static void routine(void *a) { a = 0; }
13701 static void *start_routine(void *a) { return a; }
13702 int
13703 main ()
13704 {
13705 pthread_t th; pthread_attr_t attr;
13706 pthread_create(&th, 0, start_routine, 0);
13707 pthread_join(th, 0);
13708 pthread_attr_init(&attr);
13709 pthread_cleanup_push(routine, 0);
13710 pthread_cleanup_pop(0) /* ; */
13711 ;
13712 return 0;
13713 }
13714 _ACEOF
13715 if ac_fn_c_try_link "$LINENO"; then :
13716 ax_pthread_ok=yes
13717 fi
13718 rm -f core conftest.err conftest.$ac_objext \
13719 conftest$ac_exeext conftest.$ac_ext
13720
13721 CFLAGS="$ax_pthread_save_CFLAGS"
13722 LIBS="$ax_pthread_save_LIBS"
13723
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13725 $as_echo "$ax_pthread_ok" >&6; }
13726 if test "x$ax_pthread_ok" = "xyes"; then :
13727 break
13728 fi
13729
13730 PTHREAD_LIBS=""
13731 PTHREAD_CFLAGS=""
13732 done
13733 fi
13734
13735 # Various other checks:
13736 if test "x$ax_pthread_ok" = "xyes"; then
13737 ax_pthread_save_CFLAGS="$CFLAGS"
13738 ax_pthread_save_LIBS="$LIBS"
13739 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13740 LIBS="$PTHREAD_LIBS $LIBS"
13741
13742 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13744 $as_echo_n "checking for joinable pthread attribute... " >&6; }
13745 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13746 $as_echo_n "(cached) " >&6
13747 else
13748 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13749 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13751 /* end confdefs.h. */
13752 #include <pthread.h>
13753 int
13754 main ()
13755 {
13756 int attr = $ax_pthread_attr; return attr /* ; */
13757 ;
13758 return 0;
13759 }
13760 _ACEOF
13761 if ac_fn_c_try_link "$LINENO"; then :
13762 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13763 fi
13764 rm -f core conftest.err conftest.$ac_objext \
13765 conftest$ac_exeext conftest.$ac_ext
13766 done
13767
13768 fi
13769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13770 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13771 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13772 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
13773 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
13774
13775 cat >>confdefs.h <<_ACEOF
13776 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
13777 _ACEOF
13778
13779 ax_pthread_joinable_attr_defined=yes
13780
13781 fi
13782
13783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
13784 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
13785 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
13786 $as_echo_n "(cached) " >&6
13787 else
13788 ax_cv_PTHREAD_SPECIAL_FLAGS=no
13789 case $host_os in
13790 solaris*)
13791 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
13792 ;;
13793 esac
13794
13795 fi
13796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
13797 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
13798 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
13799 test "x$ax_pthread_special_flags_added" != "xyes"; then :
13800 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
13801 ax_pthread_special_flags_added=yes
13802 fi
13803
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
13805 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
13806 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
13807 $as_echo_n "(cached) " >&6
13808 else
13809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13810 /* end confdefs.h. */
13811 #include <pthread.h>
13812 int
13813 main ()
13814 {
13815 int i = PTHREAD_PRIO_INHERIT;
13816 ;
13817 return 0;
13818 }
13819 _ACEOF
13820 if ac_fn_c_try_link "$LINENO"; then :
13821 ax_cv_PTHREAD_PRIO_INHERIT=yes
13822 else
13823 ax_cv_PTHREAD_PRIO_INHERIT=no
13824 fi
13825 rm -f core conftest.err conftest.$ac_objext \
13826 conftest$ac_exeext conftest.$ac_ext
13827
13828 fi
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
13830 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
13831 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
13832 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
13833
13834 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
13835
13836 ax_pthread_prio_inherit_defined=yes
13837
13838 fi
13839
13840 CFLAGS="$ax_pthread_save_CFLAGS"
13841 LIBS="$ax_pthread_save_LIBS"
13842
13843 # More AIX lossage: compile with *_r variant
13844 if test "x$GCC" != "xyes"; then
13845 case $host_os in
13846 aix*)
13847 case "x/$CC" in #(
13848 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
13849 #handle absolute path differently from PATH based program lookup
13850 case "x$CC" in #(
13851 x/*) :
13852 if as_fn_executable_p ${CC}_r; then :
13853 PTHREAD_CC="${CC}_r"
13854 fi ;; #(
13855 *) :
13856 for ac_prog in ${CC}_r
13857 do
13858 # Extract the first word of "$ac_prog", so it can be a program name with args.
13859 set dummy $ac_prog; ac_word=$2
13860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13861 $as_echo_n "checking for $ac_word... " >&6; }
13862 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
13863 $as_echo_n "(cached) " >&6
13864 else
13865 if test -n "$PTHREAD_CC"; then
13866 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13867 else
13868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13869 for as_dir in $PATH
13870 do
13871 IFS=$as_save_IFS
13872 test -z "$as_dir" && as_dir=.
13873 for ac_exec_ext in '' $ac_executable_extensions; do
13874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13875 ac_cv_prog_PTHREAD_CC="$ac_prog"
13876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13877 break 2
13878 fi
13879 done
13880 done
13881 IFS=$as_save_IFS
13882
13883 fi
13884 fi
13885 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13886 if test -n "$PTHREAD_CC"; then
13887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
13888 $as_echo "$PTHREAD_CC" >&6; }
13889 else
13890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13891 $as_echo "no" >&6; }
13892 fi
13893
13894
13895 test -n "$PTHREAD_CC" && break
13896 done
13897 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13898 ;;
13899 esac ;; #(
13900 *) :
13901 ;;
13902 esac
13903 ;;
13904 esac
13905 fi
13906 fi
13907
13908 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13909
13910
13911
13912
13913
13914 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
13915 if test "x$ax_pthread_ok" = "xyes"; then
13916 threads=yes
13917 :
13918 else
13919 ax_pthread_ok=no
13920 threads=no
13921 fi
13922 ac_ext=cpp
13923 ac_cpp='$CXXCPP $CPPFLAGS'
13924 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13925 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13926 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13927
13928
13929 if test "$threads" = "yes"; then
13930 save_LIBS="$LIBS"
13931 LIBS="$PTHREAD_LIBS $LIBS"
13932 save_CXXFLAGS="$CXXFLAGS"
13933 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
13935 $as_echo_n "checking for std::thread... " >&6; }
13936 if ${gdb_cv_cxx_std_thread+:} false; then :
13937 $as_echo_n "(cached) " >&6
13938 else
13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13940 /* end confdefs.h. */
13941 #include <thread>
13942 void callback() { }
13943 int
13944 main ()
13945 {
13946 std::thread t(callback);
13947 ;
13948 return 0;
13949 }
13950 _ACEOF
13951 if ac_fn_cxx_try_compile "$LINENO"; then :
13952 gdb_cv_cxx_std_thread=yes
13953 else
13954 gdb_cv_cxx_std_thread=no
13955 fi
13956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13957 fi
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
13959 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
13960
13961 # This check must be here, while LIBS includes any necessary
13962 # threading library.
13963 for ac_func in pthread_sigmask pthread_setname_np
13964 do :
13965 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13966 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
13967 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13968 cat >>confdefs.h <<_ACEOF
13969 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13970 _ACEOF
13971
13972 fi
13973 done
13974
13975
13976 LIBS="$save_LIBS"
13977 CXXFLAGS="$save_CXXFLAGS"
13978 fi
13979 if test "$gdb_cv_cxx_std_thread" = "yes"; then
13980
13981 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
13982
13983 fi
13984 ac_ext=c
13985 ac_cpp='$CPP $CPPFLAGS'
13986 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13987 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13988 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13989
13990
13991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13992 $as_echo_n "checking for sigsetjmp... " >&6; }
13993 if ${gdb_cv_func_sigsetjmp+:} false; then :
13994 $as_echo_n "(cached) " >&6
13995 else
13996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13997 /* end confdefs.h. */
13998
13999 #include <setjmp.h>
14000
14001 int
14002 main ()
14003 {
14004 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14005 ;
14006 return 0;
14007 }
14008 _ACEOF
14009 if ac_fn_c_try_compile "$LINENO"; then :
14010 gdb_cv_func_sigsetjmp=yes
14011 else
14012 gdb_cv_func_sigsetjmp=no
14013 fi
14014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14015 fi
14016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14017 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14018 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14019
14020 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14021
14022 fi
14023
14024
14025 # Check whether --with-intel_pt was given.
14026 if test "${with_intel_pt+set}" = set; then :
14027 withval=$with_intel_pt;
14028 else
14029 with_intel_pt=auto
14030 fi
14031
14032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14033 $as_echo_n "checking whether to use intel pt... " >&6; }
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14035 $as_echo "$with_intel_pt" >&6; }
14036
14037 if test "${with_intel_pt}" = no; then
14038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14039 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14040 HAVE_LIBIPT=no
14041 else
14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h. */
14044
14045 #include <linux/perf_event.h>
14046 #ifndef PERF_ATTR_SIZE_VER5
14047 # error
14048 #endif
14049
14050 _ACEOF
14051 if ac_fn_c_try_cpp "$LINENO"; then :
14052 perf_event=yes
14053 else
14054 perf_event=no
14055 fi
14056 rm -f conftest.err conftest.i conftest.$ac_ext
14057 if test "$perf_event" != yes; then
14058 if test "$with_intel_pt" = yes; then
14059 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14060 else
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14062 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14063 fi
14064 fi
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074 use_additional=yes
14075
14076 acl_save_prefix="$prefix"
14077 prefix="$acl_final_prefix"
14078 acl_save_exec_prefix="$exec_prefix"
14079 exec_prefix="$acl_final_exec_prefix"
14080
14081 eval additional_includedir=\"$includedir\"
14082 eval additional_libdir=\"$libdir\"
14083
14084 exec_prefix="$acl_save_exec_prefix"
14085 prefix="$acl_save_prefix"
14086
14087
14088 # Check whether --with-libipt-prefix was given.
14089 if test "${with_libipt_prefix+set}" = set; then :
14090 withval=$with_libipt_prefix;
14091 if test "X$withval" = "Xno"; then
14092 use_additional=no
14093 else
14094 if test "X$withval" = "X"; then
14095
14096 acl_save_prefix="$prefix"
14097 prefix="$acl_final_prefix"
14098 acl_save_exec_prefix="$exec_prefix"
14099 exec_prefix="$acl_final_exec_prefix"
14100
14101 eval additional_includedir=\"$includedir\"
14102 eval additional_libdir=\"$libdir\"
14103
14104 exec_prefix="$acl_save_exec_prefix"
14105 prefix="$acl_save_prefix"
14106
14107 else
14108 additional_includedir="$withval/include"
14109 additional_libdir="$withval/lib"
14110 fi
14111 fi
14112
14113 fi
14114
14115
14116 # Check whether --with-libipt-type was given.
14117 if test "${with_libipt_type+set}" = set; then :
14118 withval=$with_libipt_type; with_libipt_type=$withval
14119 else
14120 with_libipt_type=auto
14121 fi
14122
14123 lib_type=`eval echo \$with_libipt_type`
14124
14125 LIBIPT=
14126 LTLIBIPT=
14127 INCIPT=
14128 rpathdirs=
14129 ltrpathdirs=
14130 names_already_handled=
14131 names_next_round='ipt '
14132 while test -n "$names_next_round"; do
14133 names_this_round="$names_next_round"
14134 names_next_round=
14135 for name in $names_this_round; do
14136 already_handled=
14137 for n in $names_already_handled; do
14138 if test "$n" = "$name"; then
14139 already_handled=yes
14140 break
14141 fi
14142 done
14143 if test -z "$already_handled"; then
14144 names_already_handled="$names_already_handled $name"
14145 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14146 eval value=\"\$HAVE_LIB$uppername\"
14147 if test -n "$value"; then
14148 if test "$value" = yes; then
14149 eval value=\"\$LIB$uppername\"
14150 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14151 eval value=\"\$LTLIB$uppername\"
14152 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14153 else
14154 :
14155 fi
14156 else
14157 found_dir=
14158 found_la=
14159 found_so=
14160 found_a=
14161 if test $use_additional = yes; then
14162 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14163 found_dir="$additional_libdir"
14164 found_so="$additional_libdir/lib$name.$shlibext"
14165 if test -f "$additional_libdir/lib$name.la"; then
14166 found_la="$additional_libdir/lib$name.la"
14167 fi
14168 elif test x$lib_type != xshared; then
14169 if test -f "$additional_libdir/lib$name.$libext"; then
14170 found_dir="$additional_libdir"
14171 found_a="$additional_libdir/lib$name.$libext"
14172 if test -f "$additional_libdir/lib$name.la"; then
14173 found_la="$additional_libdir/lib$name.la"
14174 fi
14175 fi
14176 fi
14177 fi
14178 if test "X$found_dir" = "X"; then
14179 for x in $LDFLAGS $LTLIBIPT; do
14180
14181 acl_save_prefix="$prefix"
14182 prefix="$acl_final_prefix"
14183 acl_save_exec_prefix="$exec_prefix"
14184 exec_prefix="$acl_final_exec_prefix"
14185 eval x=\"$x\"
14186 exec_prefix="$acl_save_exec_prefix"
14187 prefix="$acl_save_prefix"
14188
14189 case "$x" in
14190 -L*)
14191 dir=`echo "X$x" | sed -e 's/^X-L//'`
14192 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14193 found_dir="$dir"
14194 found_so="$dir/lib$name.$shlibext"
14195 if test -f "$dir/lib$name.la"; then
14196 found_la="$dir/lib$name.la"
14197 fi
14198 elif test x$lib_type != xshared; then
14199 if test -f "$dir/lib$name.$libext"; then
14200 found_dir="$dir"
14201 found_a="$dir/lib$name.$libext"
14202 if test -f "$dir/lib$name.la"; then
14203 found_la="$dir/lib$name.la"
14204 fi
14205 fi
14206 fi
14207 ;;
14208 esac
14209 if test "X$found_dir" != "X"; then
14210 break
14211 fi
14212 done
14213 fi
14214 if test "X$found_dir" != "X"; then
14215 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14216 if test "X$found_so" != "X"; then
14217 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14218 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14219 else
14220 haveit=
14221 for x in $ltrpathdirs; do
14222 if test "X$x" = "X$found_dir"; then
14223 haveit=yes
14224 break
14225 fi
14226 done
14227 if test -z "$haveit"; then
14228 ltrpathdirs="$ltrpathdirs $found_dir"
14229 fi
14230 if test "$hardcode_direct" = yes; then
14231 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14232 else
14233 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14234 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14235 haveit=
14236 for x in $rpathdirs; do
14237 if test "X$x" = "X$found_dir"; then
14238 haveit=yes
14239 break
14240 fi
14241 done
14242 if test -z "$haveit"; then
14243 rpathdirs="$rpathdirs $found_dir"
14244 fi
14245 else
14246 haveit=
14247 for x in $LDFLAGS $LIBIPT; do
14248
14249 acl_save_prefix="$prefix"
14250 prefix="$acl_final_prefix"
14251 acl_save_exec_prefix="$exec_prefix"
14252 exec_prefix="$acl_final_exec_prefix"
14253 eval x=\"$x\"
14254 exec_prefix="$acl_save_exec_prefix"
14255 prefix="$acl_save_prefix"
14256
14257 if test "X$x" = "X-L$found_dir"; then
14258 haveit=yes
14259 break
14260 fi
14261 done
14262 if test -z "$haveit"; then
14263 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14264 fi
14265 if test "$hardcode_minus_L" != no; then
14266 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14267 else
14268 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14269 fi
14270 fi
14271 fi
14272 fi
14273 else
14274 if test "X$found_a" != "X"; then
14275 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14276 else
14277 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14278 fi
14279 fi
14280 additional_includedir=
14281 case "$found_dir" in
14282 */lib | */lib/)
14283 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14284 additional_includedir="$basedir/include"
14285 ;;
14286 esac
14287 if test "X$additional_includedir" != "X"; then
14288 if test "X$additional_includedir" != "X/usr/include"; then
14289 haveit=
14290 if test "X$additional_includedir" = "X/usr/local/include"; then
14291 if test -n "$GCC"; then
14292 case $host_os in
14293 linux*) haveit=yes;;
14294 esac
14295 fi
14296 fi
14297 if test -z "$haveit"; then
14298 for x in $CPPFLAGS $INCIPT; do
14299
14300 acl_save_prefix="$prefix"
14301 prefix="$acl_final_prefix"
14302 acl_save_exec_prefix="$exec_prefix"
14303 exec_prefix="$acl_final_exec_prefix"
14304 eval x=\"$x\"
14305 exec_prefix="$acl_save_exec_prefix"
14306 prefix="$acl_save_prefix"
14307
14308 if test "X$x" = "X-I$additional_includedir"; then
14309 haveit=yes
14310 break
14311 fi
14312 done
14313 if test -z "$haveit"; then
14314 if test -d "$additional_includedir"; then
14315 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14316 fi
14317 fi
14318 fi
14319 fi
14320 fi
14321 if test -n "$found_la"; then
14322 save_libdir="$libdir"
14323 case "$found_la" in
14324 */* | *\\*) . "$found_la" ;;
14325 *) . "./$found_la" ;;
14326 esac
14327 libdir="$save_libdir"
14328 for dep in $dependency_libs; do
14329 case "$dep" in
14330 -L*)
14331 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14332 if test "X$additional_libdir" != "X/usr/lib"; then
14333 haveit=
14334 if test "X$additional_libdir" = "X/usr/local/lib"; then
14335 if test -n "$GCC"; then
14336 case $host_os in
14337 linux*) haveit=yes;;
14338 esac
14339 fi
14340 fi
14341 if test -z "$haveit"; then
14342 haveit=
14343 for x in $LDFLAGS $LIBIPT; do
14344
14345 acl_save_prefix="$prefix"
14346 prefix="$acl_final_prefix"
14347 acl_save_exec_prefix="$exec_prefix"
14348 exec_prefix="$acl_final_exec_prefix"
14349 eval x=\"$x\"
14350 exec_prefix="$acl_save_exec_prefix"
14351 prefix="$acl_save_prefix"
14352
14353 if test "X$x" = "X-L$additional_libdir"; then
14354 haveit=yes
14355 break
14356 fi
14357 done
14358 if test -z "$haveit"; then
14359 if test -d "$additional_libdir"; then
14360 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14361 fi
14362 fi
14363 haveit=
14364 for x in $LDFLAGS $LTLIBIPT; do
14365
14366 acl_save_prefix="$prefix"
14367 prefix="$acl_final_prefix"
14368 acl_save_exec_prefix="$exec_prefix"
14369 exec_prefix="$acl_final_exec_prefix"
14370 eval x=\"$x\"
14371 exec_prefix="$acl_save_exec_prefix"
14372 prefix="$acl_save_prefix"
14373
14374 if test "X$x" = "X-L$additional_libdir"; then
14375 haveit=yes
14376 break
14377 fi
14378 done
14379 if test -z "$haveit"; then
14380 if test -d "$additional_libdir"; then
14381 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14382 fi
14383 fi
14384 fi
14385 fi
14386 ;;
14387 -R*)
14388 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14389 if test "$enable_rpath" != no; then
14390 haveit=
14391 for x in $rpathdirs; do
14392 if test "X$x" = "X$dir"; then
14393 haveit=yes
14394 break
14395 fi
14396 done
14397 if test -z "$haveit"; then
14398 rpathdirs="$rpathdirs $dir"
14399 fi
14400 haveit=
14401 for x in $ltrpathdirs; do
14402 if test "X$x" = "X$dir"; then
14403 haveit=yes
14404 break
14405 fi
14406 done
14407 if test -z "$haveit"; then
14408 ltrpathdirs="$ltrpathdirs $dir"
14409 fi
14410 fi
14411 ;;
14412 -l*)
14413 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14414 ;;
14415 *.la)
14416 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14417 ;;
14418 *)
14419 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14420 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14421 ;;
14422 esac
14423 done
14424 fi
14425 else
14426 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14427 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14428 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14429 else
14430 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14431 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14432 fi
14433 fi
14434 fi
14435 fi
14436 done
14437 done
14438 if test "X$rpathdirs" != "X"; then
14439 if test -n "$hardcode_libdir_separator"; then
14440 alldirs=
14441 for found_dir in $rpathdirs; do
14442 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14443 done
14444 acl_save_libdir="$libdir"
14445 libdir="$alldirs"
14446 eval flag=\"$hardcode_libdir_flag_spec\"
14447 libdir="$acl_save_libdir"
14448 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14449 else
14450 for found_dir in $rpathdirs; do
14451 acl_save_libdir="$libdir"
14452 libdir="$found_dir"
14453 eval flag=\"$hardcode_libdir_flag_spec\"
14454 libdir="$acl_save_libdir"
14455 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14456 done
14457 fi
14458 fi
14459 if test "X$ltrpathdirs" != "X"; then
14460 for found_dir in $ltrpathdirs; do
14461 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14462 done
14463 fi
14464
14465
14466 ac_save_CPPFLAGS="$CPPFLAGS"
14467
14468 for element in $INCIPT; do
14469 haveit=
14470 for x in $CPPFLAGS; do
14471
14472 acl_save_prefix="$prefix"
14473 prefix="$acl_final_prefix"
14474 acl_save_exec_prefix="$exec_prefix"
14475 exec_prefix="$acl_final_exec_prefix"
14476 eval x=\"$x\"
14477 exec_prefix="$acl_save_exec_prefix"
14478 prefix="$acl_save_prefix"
14479
14480 if test "X$x" = "X$element"; then
14481 haveit=yes
14482 break
14483 fi
14484 done
14485 if test -z "$haveit"; then
14486 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14487 fi
14488 done
14489
14490
14491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14492 $as_echo_n "checking for libipt... " >&6; }
14493 if ${ac_cv_libipt+:} false; then :
14494 $as_echo_n "(cached) " >&6
14495 else
14496
14497 ac_save_LIBS="$LIBS"
14498 LIBS="$LIBS $LIBIPT"
14499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500 /* end confdefs.h. */
14501 #include "intel-pt.h"
14502 int
14503 main ()
14504 {
14505 pt_insn_alloc_decoder (0);
14506 ;
14507 return 0;
14508 }
14509 _ACEOF
14510 if ac_fn_c_try_link "$LINENO"; then :
14511 ac_cv_libipt=yes
14512 else
14513 ac_cv_libipt=no
14514 fi
14515 rm -f core conftest.err conftest.$ac_objext \
14516 conftest$ac_exeext conftest.$ac_ext
14517 LIBS="$ac_save_LIBS"
14518
14519 fi
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14521 $as_echo "$ac_cv_libipt" >&6; }
14522 if test "$ac_cv_libipt" = yes; then
14523 HAVE_LIBIPT=yes
14524
14525 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14526
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14528 $as_echo_n "checking how to link with libipt... " >&6; }
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14530 $as_echo "$LIBIPT" >&6; }
14531 else
14532 HAVE_LIBIPT=no
14533 CPPFLAGS="$ac_save_CPPFLAGS"
14534 LIBIPT=
14535 LTLIBIPT=
14536 fi
14537
14538
14539
14540
14541
14542
14543 if test "$HAVE_LIBIPT" != yes; then
14544 if test "$with_intel_pt" = yes; then
14545 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14546 else
14547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14548 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14549 fi
14550 else
14551 save_LIBS=$LIBS
14552 LIBS="$LIBS $LIBIPT"
14553 for ac_func in pt_insn_event
14554 do :
14555 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14556 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
14557 cat >>confdefs.h <<_ACEOF
14558 #define HAVE_PT_INSN_EVENT 1
14559 _ACEOF
14560
14561 fi
14562 done
14563
14564 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14565 "
14566 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
14567
14568 cat >>confdefs.h <<_ACEOF
14569 #define HAVE_STRUCT_PT_INSN_ENABLED 1
14570 _ACEOF
14571
14572
14573 fi
14574 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14575 "
14576 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14577
14578 cat >>confdefs.h <<_ACEOF
14579 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
14580 _ACEOF
14581
14582
14583 fi
14584
14585 LIBS=$save_LIBS
14586 fi
14587 fi
14588
14589 if test "$ac_cv_header_sys_procfs_h" = yes; then
14590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14591 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14592 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14593 $as_echo_n "(cached) " >&6
14594 else
14595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14596 /* end confdefs.h. */
14597
14598 #define _SYSCALL32
14599 /* Needed for new procfs interface on sparc-solaris. */
14600 #define _STRUCTURED_PROC 1
14601 #include <sys/procfs.h>
14602 int
14603 main ()
14604 {
14605 gregset_t avar
14606 ;
14607 return 0;
14608 }
14609 _ACEOF
14610 if ac_fn_c_try_compile "$LINENO"; then :
14611 bfd_cv_have_sys_procfs_type_gregset_t=yes
14612 else
14613 bfd_cv_have_sys_procfs_type_gregset_t=no
14614
14615 fi
14616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14617 fi
14618
14619 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14620
14621 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14622
14623 fi
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14625 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14626
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14628 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14629 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14630 $as_echo_n "(cached) " >&6
14631 else
14632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14633 /* end confdefs.h. */
14634
14635 #define _SYSCALL32
14636 /* Needed for new procfs interface on sparc-solaris. */
14637 #define _STRUCTURED_PROC 1
14638 #include <sys/procfs.h>
14639 int
14640 main ()
14641 {
14642 fpregset_t avar
14643 ;
14644 return 0;
14645 }
14646 _ACEOF
14647 if ac_fn_c_try_compile "$LINENO"; then :
14648 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14649 else
14650 bfd_cv_have_sys_procfs_type_fpregset_t=no
14651
14652 fi
14653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14654 fi
14655
14656 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14657
14658 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14659
14660 fi
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14662 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14663
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14665 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14666 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14667 $as_echo_n "(cached) " >&6
14668 else
14669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14670 /* end confdefs.h. */
14671
14672 #define _SYSCALL32
14673 /* Needed for new procfs interface on sparc-solaris. */
14674 #define _STRUCTURED_PROC 1
14675 #include <sys/procfs.h>
14676 int
14677 main ()
14678 {
14679 prgregset_t avar
14680 ;
14681 return 0;
14682 }
14683 _ACEOF
14684 if ac_fn_c_try_compile "$LINENO"; then :
14685 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14686 else
14687 bfd_cv_have_sys_procfs_type_prgregset_t=no
14688
14689 fi
14690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14691 fi
14692
14693 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14694
14695 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14696
14697 fi
14698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14699 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14700
14701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14702 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14703 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14704 $as_echo_n "(cached) " >&6
14705 else
14706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14707 /* end confdefs.h. */
14708
14709 #define _SYSCALL32
14710 /* Needed for new procfs interface on sparc-solaris. */
14711 #define _STRUCTURED_PROC 1
14712 #include <sys/procfs.h>
14713 int
14714 main ()
14715 {
14716 prfpregset_t avar
14717 ;
14718 return 0;
14719 }
14720 _ACEOF
14721 if ac_fn_c_try_compile "$LINENO"; then :
14722 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14723 else
14724 bfd_cv_have_sys_procfs_type_prfpregset_t=no
14725
14726 fi
14727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14728 fi
14729
14730 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14731
14732 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14733
14734 fi
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14736 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14737
14738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14739 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14740 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14741 $as_echo_n "(cached) " >&6
14742 else
14743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14744 /* end confdefs.h. */
14745
14746 #define _SYSCALL32
14747 /* Needed for new procfs interface on sparc-solaris. */
14748 #define _STRUCTURED_PROC 1
14749 #include <sys/procfs.h>
14750 int
14751 main ()
14752 {
14753 prgregset32_t avar
14754 ;
14755 return 0;
14756 }
14757 _ACEOF
14758 if ac_fn_c_try_compile "$LINENO"; then :
14759 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14760 else
14761 bfd_cv_have_sys_procfs_type_prgregset32_t=no
14762
14763 fi
14764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14765 fi
14766
14767 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14768
14769 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14770
14771 fi
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14773 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14774
14775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14776 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14777 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14778 $as_echo_n "(cached) " >&6
14779 else
14780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14781 /* end confdefs.h. */
14782
14783 #define _SYSCALL32
14784 /* Needed for new procfs interface on sparc-solaris. */
14785 #define _STRUCTURED_PROC 1
14786 #include <sys/procfs.h>
14787 int
14788 main ()
14789 {
14790 lwpid_t avar
14791 ;
14792 return 0;
14793 }
14794 _ACEOF
14795 if ac_fn_c_try_compile "$LINENO"; then :
14796 bfd_cv_have_sys_procfs_type_lwpid_t=yes
14797 else
14798 bfd_cv_have_sys_procfs_type_lwpid_t=no
14799
14800 fi
14801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14802 fi
14803
14804 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14805
14806 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14807
14808 fi
14809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14810 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14811
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14813 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14814 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14815 $as_echo_n "(cached) " >&6
14816 else
14817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14818 /* end confdefs.h. */
14819
14820 #define _SYSCALL32
14821 /* Needed for new procfs interface on sparc-solaris. */
14822 #define _STRUCTURED_PROC 1
14823 #include <sys/procfs.h>
14824 int
14825 main ()
14826 {
14827 psaddr_t avar
14828 ;
14829 return 0;
14830 }
14831 _ACEOF
14832 if ac_fn_c_try_compile "$LINENO"; then :
14833 bfd_cv_have_sys_procfs_type_psaddr_t=yes
14834 else
14835 bfd_cv_have_sys_procfs_type_psaddr_t=no
14836
14837 fi
14838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14839 fi
14840
14841 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14842
14843 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14844
14845 fi
14846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14847 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14848
14849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14850 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14851 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14852 $as_echo_n "(cached) " >&6
14853 else
14854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855 /* end confdefs.h. */
14856
14857 #define _SYSCALL32
14858 /* Needed for new procfs interface on sparc-solaris. */
14859 #define _STRUCTURED_PROC 1
14860 #include <sys/procfs.h>
14861 int
14862 main ()
14863 {
14864 elf_fpregset_t avar
14865 ;
14866 return 0;
14867 }
14868 _ACEOF
14869 if ac_fn_c_try_compile "$LINENO"; then :
14870 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14871 else
14872 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14873
14874 fi
14875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14876 fi
14877
14878 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14879
14880 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14881
14882 fi
14883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14884 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14885
14886 fi
14887
14888
14889 # Check the return and argument types of ptrace.
14890
14891
14892 for ac_header in sys/ptrace.h ptrace.h
14893 do :
14894 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14895 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14896 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14897 cat >>confdefs.h <<_ACEOF
14898 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14899 _ACEOF
14900
14901 fi
14902
14903 done
14904
14905
14906 gdb_ptrace_headers='
14907 #include <sys/types.h>
14908 #if HAVE_SYS_PTRACE_H
14909 # include <sys/ptrace.h>
14910 #endif
14911 #if HAVE_UNISTD_H
14912 # include <unistd.h>
14913 #endif
14914 '
14915 # There is no point in checking if we don't have a prototype.
14916 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
14917 "
14918 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
14919 ac_have_decl=1
14920 else
14921 ac_have_decl=0
14922 fi
14923
14924 cat >>confdefs.h <<_ACEOF
14925 #define HAVE_DECL_PTRACE $ac_have_decl
14926 _ACEOF
14927 if test $ac_have_decl = 1; then :
14928
14929 else
14930
14931 : ${gdb_cv_func_ptrace_ret='int'}
14932 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14933
14934 fi
14935
14936 # Check return type. Varargs (used on GNU/Linux) conflict with the
14937 # empty argument list, so check for that explicitly.
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14939 $as_echo_n "checking return type of ptrace... " >&6; }
14940 if ${gdb_cv_func_ptrace_ret+:} false; then :
14941 $as_echo_n "(cached) " >&6
14942 else
14943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14944 /* end confdefs.h. */
14945 $gdb_ptrace_headers
14946 int
14947 main ()
14948 {
14949 extern long ptrace (enum __ptrace_request, ...);
14950 ;
14951 return 0;
14952 }
14953 _ACEOF
14954 if ac_fn_c_try_compile "$LINENO"; then :
14955 gdb_cv_func_ptrace_ret='long'
14956 else
14957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958 /* end confdefs.h. */
14959 $gdb_ptrace_headers
14960 int
14961 main ()
14962 {
14963 extern int ptrace ();
14964 ;
14965 return 0;
14966 }
14967 _ACEOF
14968 if ac_fn_c_try_compile "$LINENO"; then :
14969 gdb_cv_func_ptrace_ret='int'
14970 else
14971 gdb_cv_func_ptrace_ret='long'
14972 fi
14973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14974 fi
14975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14976 fi
14977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14978 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
14979
14980 cat >>confdefs.h <<_ACEOF
14981 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
14982 _ACEOF
14983
14984 # Check argument types.
14985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14986 $as_echo_n "checking types of arguments for ptrace... " >&6; }
14987 if ${gdb_cv_func_ptrace_args+:} false; then :
14988 $as_echo_n "(cached) " >&6
14989 else
14990
14991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14992 /* end confdefs.h. */
14993 $gdb_ptrace_headers
14994 int
14995 main ()
14996 {
14997 extern long ptrace (enum __ptrace_request, ...);
14998 ;
14999 return 0;
15000 }
15001 _ACEOF
15002 if ac_fn_c_try_compile "$LINENO"; then :
15003 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15004 else
15005
15006 for gdb_arg1 in 'int' 'long'; do
15007 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15008 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15009 for gdb_arg4 in 'int' 'long' 'void *'; do
15010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15011 /* end confdefs.h. */
15012 $gdb_ptrace_headers
15013 int
15014 main ()
15015 {
15016
15017 extern $gdb_cv_func_ptrace_ret
15018 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15019
15020 ;
15021 return 0;
15022 }
15023 _ACEOF
15024 if ac_fn_c_try_compile "$LINENO"; then :
15025 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15026 break 4;
15027 fi
15028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15029 for gdb_arg5 in 'int *' 'int' 'long'; do
15030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15031 /* end confdefs.h. */
15032 $gdb_ptrace_headers
15033 int
15034 main ()
15035 {
15036
15037 extern $gdb_cv_func_ptrace_ret
15038 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15039
15040 ;
15041 return 0;
15042 }
15043 _ACEOF
15044 if ac_fn_c_try_compile "$LINENO"; then :
15045
15046 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15047 break 5;
15048 fi
15049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15050 done
15051 done
15052 done
15053 done
15054 done
15055 # Provide a safe default value.
15056 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15057
15058 fi
15059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15060 fi
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15062 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15063 ac_save_IFS=$IFS; IFS=','
15064 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15065 IFS=$ac_save_IFS
15066 shift
15067
15068 cat >>confdefs.h <<_ACEOF
15069 #define PTRACE_TYPE_ARG1 $1
15070 _ACEOF
15071
15072
15073 cat >>confdefs.h <<_ACEOF
15074 #define PTRACE_TYPE_ARG3 $3
15075 _ACEOF
15076
15077
15078 cat >>confdefs.h <<_ACEOF
15079 #define PTRACE_TYPE_ARG4 $4
15080 _ACEOF
15081
15082 if test -n "$5"; then
15083
15084 cat >>confdefs.h <<_ACEOF
15085 #define PTRACE_TYPE_ARG5 $5
15086 _ACEOF
15087
15088 fi
15089
15090
15091 if test "$cross_compiling" = no; then
15092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15093 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15094 if ${ac_cv_func_setpgrp_void+:} false; then :
15095 $as_echo_n "(cached) " >&6
15096 else
15097 if test "$cross_compiling" = yes; then :
15098 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15099 else
15100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15101 /* end confdefs.h. */
15102 $ac_includes_default
15103 int
15104 main ()
15105 {
15106 /* If this system has a BSD-style setpgrp which takes arguments,
15107 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15108 exit successfully. */
15109 return setpgrp (1,1) != -1;
15110 ;
15111 return 0;
15112 }
15113 _ACEOF
15114 if ac_fn_c_try_run "$LINENO"; then :
15115 ac_cv_func_setpgrp_void=no
15116 else
15117 ac_cv_func_setpgrp_void=yes
15118 fi
15119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15120 conftest.$ac_objext conftest.beam conftest.$ac_ext
15121 fi
15122
15123 fi
15124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15125 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15126 if test $ac_cv_func_setpgrp_void = yes; then
15127
15128 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15129
15130 fi
15131
15132 else
15133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15134 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15135 if ${ac_cv_func_setpgrp_void+:} false; then :
15136 $as_echo_n "(cached) " >&6
15137 else
15138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15139 /* end confdefs.h. */
15140
15141 #include <unistd.h>
15142
15143 int
15144 main ()
15145 {
15146
15147 if (setpgrp(1,1) == -1)
15148 exit (0);
15149 else
15150 exit (1);
15151
15152 ;
15153 return 0;
15154 }
15155 _ACEOF
15156 if ac_fn_c_try_compile "$LINENO"; then :
15157 ac_cv_func_setpgrp_void=no
15158 else
15159 ac_cv_func_setpgrp_void=yes
15160 fi
15161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15162 fi
15163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15164 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15165 if test "$ac_cv_func_setpgrp_void" = yes; then
15166 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15167
15168 fi
15169 fi
15170
15171 # Assume we'll default to using the included libiberty regex.
15172 gdb_use_included_regex=yes
15173
15174 # However, if the system regex is GNU regex, then default to *not*
15175 # using the included regex.
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15177 $as_echo_n "checking for GNU regex... " >&6; }
15178 if ${gdb_cv_have_gnu_regex+:} false; then :
15179 $as_echo_n "(cached) " >&6
15180 else
15181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15182 /* end confdefs.h. */
15183 #include <gnu-versions.h>
15184 int
15185 main ()
15186 {
15187 #define REGEX_INTERFACE_VERSION 1
15188 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15189 # error "Version mismatch"
15190 #endif
15191 ;
15192 return 0;
15193 }
15194 _ACEOF
15195 if ac_fn_c_try_compile "$LINENO"; then :
15196 gdb_cv_have_gnu_regex=yes
15197 else
15198 gdb_cv_have_gnu_regex=no
15199 fi
15200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15201 fi
15202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15203 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
15204 if test "$gdb_cv_have_gnu_regex" = yes; then
15205 gdb_use_included_regex=no
15206 fi
15207
15208
15209 # Check whether --with-included-regex was given.
15210 if test "${with_included_regex+set}" = set; then :
15211 withval=$with_included_regex; gdb_with_regex=$withval
15212 else
15213 gdb_with_regex=$gdb_use_included_regex
15214 fi
15215
15216 if test "$gdb_with_regex" = yes; then
15217
15218 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
15219
15220 fi
15221
15222 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15223 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15224 #include <sys/proc.h>
15225
15226 "
15227 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15228
15229 cat >>confdefs.h <<_ACEOF
15230 #define HAVE_STRUCT_THREAD_TD_PCB 1
15231 _ACEOF
15232
15233
15234 fi
15235
15236
15237 # See if <sys/lwp.h> defines `struct lwp`.
15238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15239 $as_echo_n "checking for struct lwp... " >&6; }
15240 if ${gdb_cv_struct_lwp+:} false; then :
15241 $as_echo_n "(cached) " >&6
15242 else
15243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15244 /* end confdefs.h. */
15245 #include <sys/param.h>
15246 #define _KMEMUSER
15247 #include <sys/lwp.h>
15248 int
15249 main ()
15250 {
15251 struct lwp l;
15252 ;
15253 return 0;
15254 }
15255 _ACEOF
15256 if ac_fn_c_try_compile "$LINENO"; then :
15257 gdb_cv_struct_lwp=yes
15258 else
15259 gdb_cv_struct_lwp=no
15260 fi
15261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15262 fi
15263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15264 $as_echo "$gdb_cv_struct_lwp" >&6; }
15265 if test "$gdb_cv_struct_lwp" = yes; then
15266
15267 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15268
15269 fi
15270
15271 # See if <machine/reg.h> degines `struct reg'.
15272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15273 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15274 if ${gdb_cv_struct_reg+:} false; then :
15275 $as_echo_n "(cached) " >&6
15276 else
15277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15278 /* end confdefs.h. */
15279 #include <sys/types.h>
15280 #include <machine/reg.h>
15281 int
15282 main ()
15283 {
15284 struct reg r;
15285 ;
15286 return 0;
15287 }
15288 _ACEOF
15289 if ac_fn_c_try_compile "$LINENO"; then :
15290 gdb_cv_struct_reg=yes
15291 else
15292 gdb_cv_struct_reg=no
15293 fi
15294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15295 fi
15296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15297 $as_echo "$gdb_cv_struct_reg" >&6; }
15298 if test "$gdb_cv_struct_reg" = yes; then
15299
15300 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15301
15302 fi
15303
15304 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15305 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15306 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15307 #include <machine/reg.h>
15308 "
15309 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15310
15311 cat >>confdefs.h <<_ACEOF
15312 #define HAVE_STRUCT_REG_R_FS 1
15313 _ACEOF
15314
15315
15316 fi
15317 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15318 #include <machine/reg.h>
15319 "
15320 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15321
15322 cat >>confdefs.h <<_ACEOF
15323 #define HAVE_STRUCT_REG_R_GS 1
15324 _ACEOF
15325
15326
15327 fi
15328
15329
15330 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
15331 # Older amd64 Linux's don't have the fs_base and gs_base members of
15332 # `struct user_regs_struct'.
15333 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
15334 #include <sys/user.h>
15335 "
15336 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
15337
15338 cat >>confdefs.h <<_ACEOF
15339 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
15340 _ACEOF
15341
15342
15343 fi
15344 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
15345 #include <sys/user.h>
15346 "
15347 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
15348
15349 cat >>confdefs.h <<_ACEOF
15350 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
15351 _ACEOF
15352
15353
15354 fi
15355
15356
15357 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15359 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15360 if ${gdb_cv_have_ptrace_getregs+:} false; then :
15361 $as_echo_n "(cached) " >&6
15362 else
15363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15364 /* end confdefs.h. */
15365 #include <sys/ptrace.h>
15366 int
15367 main ()
15368 {
15369 PTRACE_GETREGS;
15370 ;
15371 return 0;
15372 }
15373 _ACEOF
15374 if ac_fn_c_try_compile "$LINENO"; then :
15375 gdb_cv_have_ptrace_getregs=yes
15376 else
15377 gdb_cv_have_ptrace_getregs=no
15378 fi
15379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15380 fi
15381
15382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15383 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15384 if test "$gdb_cv_have_ptrace_getregs" = yes; then
15385
15386 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15387
15388 fi
15389
15390 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15392 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15393 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15394 $as_echo_n "(cached) " >&6
15395 else
15396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15397 /* end confdefs.h. */
15398 #include <sys/ptrace.h>
15399 int
15400 main ()
15401 {
15402 PTRACE_GETFPXREGS;
15403 ;
15404 return 0;
15405 }
15406 _ACEOF
15407 if ac_fn_c_try_compile "$LINENO"; then :
15408 gdb_cv_have_ptrace_getfpxregs=yes
15409 else
15410 gdb_cv_have_ptrace_getfpxregs=no
15411 fi
15412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15413 fi
15414
15415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15416 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15417 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
15418
15419 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
15420
15421 fi
15422
15423 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15425 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
15426 if ${gdb_cv_have_pt_getdbregs+:} false; then :
15427 $as_echo_n "(cached) " >&6
15428 else
15429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15430 /* end confdefs.h. */
15431 #include <sys/types.h>
15432 #include <sys/ptrace.h>
15433 int
15434 main ()
15435 {
15436 PT_GETDBREGS;
15437 ;
15438 return 0;
15439 }
15440 _ACEOF
15441 if ac_fn_c_try_compile "$LINENO"; then :
15442 gdb_cv_have_pt_getdbregs=yes
15443 else
15444 gdb_cv_have_pt_getdbregs=no
15445 fi
15446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15447 fi
15448
15449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15450 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15451 if test "$gdb_cv_have_pt_getdbregs" = yes; then
15452
15453 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
15454
15455 fi
15456
15457 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15459 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15460 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
15461 $as_echo_n "(cached) " >&6
15462 else
15463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15464 /* end confdefs.h. */
15465 #include <sys/types.h>
15466 #include <sys/ptrace.h>
15467 int
15468 main ()
15469 {
15470 PT_GETXMMREGS;
15471 ;
15472 return 0;
15473 }
15474 _ACEOF
15475 if ac_fn_c_try_compile "$LINENO"; then :
15476 gdb_cv_have_pt_getxmmregs=yes
15477 else
15478 gdb_cv_have_pt_getxmmregs=no
15479 fi
15480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15481 fi
15482
15483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15484 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15485 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
15486
15487 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
15488
15489 fi
15490
15491 # See if <sys/ptrace.h> supports LWP names on FreeBSD
15492 # Older FreeBSD versions don't have the pl_tdname member of
15493 # `struct ptrace_lwpinfo'.
15494 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15495 "
15496 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
15497
15498 cat >>confdefs.h <<_ACEOF
15499 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15500 _ACEOF
15501
15502
15503 fi
15504
15505
15506 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15507 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15508 # FreeBSD 10.3.
15509 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>
15510 "
15511 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15512
15513 cat >>confdefs.h <<_ACEOF
15514 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15515 _ACEOF
15516
15517
15518 fi
15519
15520
15521 # Check if the compiler supports the `long long' type.
15522
15523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15524 $as_echo_n "checking for long long support in compiler... " >&6; }
15525 if ${gdb_cv_c_long_long+:} false; then :
15526 $as_echo_n "(cached) " >&6
15527 else
15528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15529 /* end confdefs.h. */
15530 extern long long foo;
15531 int
15532 main ()
15533 {
15534 switch (foo & 2) { case 0: return 1; }
15535 ;
15536 return 0;
15537 }
15538 _ACEOF
15539 if ac_fn_c_try_compile "$LINENO"; then :
15540 gdb_cv_c_long_long=yes
15541 else
15542 gdb_cv_c_long_long=no
15543 fi
15544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15545 fi
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15547 $as_echo "$gdb_cv_c_long_long" >&6; }
15548 if test "$gdb_cv_c_long_long" != yes; then
15549 # libdecnumber requires long long.
15550 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
15551 fi
15552
15553 # Check if the compiler and runtime support printing long longs.
15554
15555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15556 $as_echo_n "checking for long long support in printf... " >&6; }
15557 if ${gdb_cv_printf_has_long_long+:} false; then :
15558 $as_echo_n "(cached) " >&6
15559 else
15560 if test "$cross_compiling" = yes; then :
15561 gdb_cv_printf_has_long_long=no
15562 else
15563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15564 /* end confdefs.h. */
15565 $ac_includes_default
15566 int
15567 main ()
15568 {
15569 char buf[32];
15570 long long l = 0;
15571 l = (l << 16) + 0x0123;
15572 l = (l << 16) + 0x4567;
15573 l = (l << 16) + 0x89ab;
15574 l = (l << 16) + 0xcdef;
15575 sprintf (buf, "0x%016llx", l);
15576 return (strcmp ("0x0123456789abcdef", buf));
15577 ;
15578 return 0;
15579 }
15580 _ACEOF
15581 if ac_fn_c_try_run "$LINENO"; then :
15582 gdb_cv_printf_has_long_long=yes
15583 else
15584 gdb_cv_printf_has_long_long=no
15585 fi
15586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15587 conftest.$ac_objext conftest.beam conftest.$ac_ext
15588 fi
15589
15590 fi
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15592 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15593 if test "$gdb_cv_printf_has_long_long" = yes; then
15594
15595 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15596
15597 fi
15598
15599 # Check if the compiler and runtime support printing decfloats.
15600
15601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15602 $as_echo_n "checking for decfloat support in printf... " >&6; }
15603 if ${gdb_cv_printf_has_decfloat+:} false; then :
15604 $as_echo_n "(cached) " >&6
15605 else
15606 if test "$cross_compiling" = yes; then :
15607 gdb_cv_printf_has_decfloat=no
15608 else
15609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15610 /* end confdefs.h. */
15611 $ac_includes_default
15612 int
15613 main ()
15614 {
15615 char buf[64];
15616 _Decimal32 d32 = 1.2345df;
15617 _Decimal64 d64 = 1.2345dd;
15618 _Decimal128 d128 = 1.2345dl;
15619 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15620 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15621 ;
15622 return 0;
15623 }
15624 _ACEOF
15625 if ac_fn_c_try_run "$LINENO"; then :
15626 gdb_cv_printf_has_decfloat=yes
15627 else
15628 gdb_cv_printf_has_decfloat=no
15629 fi
15630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15631 conftest.$ac_objext conftest.beam conftest.$ac_ext
15632 fi
15633
15634 fi
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15636 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
15637 if test "$gdb_cv_printf_has_decfloat" = yes; then
15638
15639 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
15640
15641 fi
15642
15643 # Check if the compiler supports the `long double' type. We can't use
15644 # AC_C_LONG_DOUBLE because that one does additional checks on the
15645 # constants defined in <float.h> that fail on some systems,
15646 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
15647
15648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15649 $as_echo_n "checking for long double support in compiler... " >&6; }
15650 if ${gdb_cv_c_long_double+:} false; then :
15651 $as_echo_n "(cached) " >&6
15652 else
15653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15654 /* end confdefs.h. */
15655 long double foo;
15656 _ACEOF
15657 if ac_fn_c_try_compile "$LINENO"; then :
15658 gdb_cv_c_long_double=yes
15659 else
15660 gdb_cv_c_long_double=no
15661 fi
15662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15663 fi
15664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15665 $as_echo "$gdb_cv_c_long_double" >&6; }
15666 if test "$gdb_cv_c_long_double" = yes; then
15667
15668 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
15669
15670 fi
15671
15672 # Check if the compiler and runtime support printing long doubles.
15673
15674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15675 $as_echo_n "checking for long double support in printf... " >&6; }
15676 if ${gdb_cv_printf_has_long_double+:} false; then :
15677 $as_echo_n "(cached) " >&6
15678 else
15679 if test "$cross_compiling" = yes; then :
15680 gdb_cv_printf_has_long_double=no
15681 else
15682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15683 /* end confdefs.h. */
15684 $ac_includes_default
15685 int
15686 main ()
15687 {
15688 char buf[16];
15689 long double f = 3.141592653;
15690 sprintf (buf, "%Lg", f);
15691 return (strncmp ("3.14159", buf, 7));
15692 ;
15693 return 0;
15694 }
15695 _ACEOF
15696 if ac_fn_c_try_run "$LINENO"; then :
15697 gdb_cv_printf_has_long_double=yes
15698 else
15699 gdb_cv_printf_has_long_double=no
15700 fi
15701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15702 conftest.$ac_objext conftest.beam conftest.$ac_ext
15703 fi
15704
15705 fi
15706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15707 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
15708 if test "$gdb_cv_printf_has_long_double" = yes; then
15709
15710 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
15711
15712 fi
15713
15714 # Check if the compiler and runtime support scanning long doubles.
15715
15716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15717 $as_echo_n "checking for long double support in scanf... " >&6; }
15718 if ${gdb_cv_scanf_has_long_double+:} false; then :
15719 $as_echo_n "(cached) " >&6
15720 else
15721 if test "$cross_compiling" = yes; then :
15722 gdb_cv_scanf_has_long_double=no
15723 else
15724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15725 /* end confdefs.h. */
15726 #include <stdio.h>
15727 int
15728 main ()
15729 {
15730 char *buf = "3.141592653";
15731 long double f = 0;
15732 sscanf (buf, "%Lg", &f);
15733 return !(f > 3.14159 && f < 3.14160);
15734 ;
15735 return 0;
15736 }
15737 _ACEOF
15738 if ac_fn_c_try_run "$LINENO"; then :
15739 gdb_cv_scanf_has_long_double=yes
15740 else
15741 gdb_cv_scanf_has_long_double=no
15742 fi
15743 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15744 conftest.$ac_objext conftest.beam conftest.$ac_ext
15745 fi
15746
15747 fi
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15749 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
15750 if test "$gdb_cv_scanf_has_long_double" = yes; then
15751
15752 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
15753
15754 fi
15755
15756 case ${host_os} in
15757 aix*)
15758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15759 $as_echo_n "checking for -bbigtoc option... " >&6; }
15760 if ${gdb_cv_bigtoc+:} false; then :
15761 $as_echo_n "(cached) " >&6
15762 else
15763
15764 SAVE_LDFLAGS=$LDFLAGS
15765
15766 case $GCC in
15767 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15768 *) gdb_cv_bigtoc=-bbigtoc ;;
15769 esac
15770
15771 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15773 /* end confdefs.h. */
15774
15775 int
15776 main ()
15777 {
15778 int i;
15779 ;
15780 return 0;
15781 }
15782 _ACEOF
15783 if ac_fn_c_try_link "$LINENO"; then :
15784
15785 else
15786 gdb_cv_bigtoc=
15787 fi
15788 rm -f core conftest.err conftest.$ac_objext \
15789 conftest$ac_exeext conftest.$ac_ext
15790 LDFLAGS="${SAVE_LDFLAGS}"
15791
15792 fi
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15794 $as_echo "$gdb_cv_bigtoc" >&6; }
15795 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15796 ;;
15797 esac
15798
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15800 $as_echo_n "checking for the dynamic export flag... " >&6; }
15801 dynamic_list=false
15802 if test "${gdb_native}" = yes; then
15803 # The dynamically loaded libthread_db needs access to symbols in the gdb
15804 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15805 # may not be supported there.
15806 old_LDFLAGS="$LDFLAGS"
15807 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15808 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15809 LDFLAGS="$LDFLAGS $RDYNAMIC"
15810 if test "${have_libpython}" = no; then
15811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15812 /* end confdefs.h. */
15813
15814 int
15815 main ()
15816 {
15817
15818 ;
15819 return 0;
15820 }
15821 _ACEOF
15822 if ac_fn_c_try_link "$LINENO"; then :
15823 dynamic_list=true
15824 fi
15825 rm -f core conftest.err conftest.$ac_objext \
15826 conftest$ac_exeext conftest.$ac_ext
15827 else
15828 # Workaround http://bugs.python.org/issue4434 where static
15829 # libpythonX.Y.a would get its symbols required for
15830 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15831 # Problem does not happen for the recommended libpythonX.Y.so linkage.
15832
15833 # Note the workaround for Python
15834 # http://bugs.python.org/issue10112 earlier has removed
15835 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15836 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15837 # always pass.
15838 old_CFLAGS="$CFLAGS"
15839 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15840 old_LIBS="$LIBS"
15841 LIBS="$LIBS $PYTHON_LIBS"
15842 old_CPPFLAGS="$CPPFLAGS"
15843 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15844 if test "$cross_compiling" = yes; then :
15845 true
15846 else
15847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15848 /* end confdefs.h. */
15849 #include "Python.h"
15850 int
15851 main ()
15852 {
15853 int err;
15854 Py_Initialize ();
15855 err = PyRun_SimpleString ("import itertools\n");
15856 Py_Finalize ();
15857 return err == 0 ? 0 : 1;
15858 ;
15859 return 0;
15860 }
15861 _ACEOF
15862 if ac_fn_c_try_run "$LINENO"; then :
15863 dynamic_list=true
15864 fi
15865 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15866 conftest.$ac_objext conftest.beam conftest.$ac_ext
15867 fi
15868
15869 LIBS="$old_LIBS"
15870 CFLAGS="$old_CFLAGS"
15871 CPPFLAGS="$old_CPPFLAGS"
15872 fi
15873 LDFLAGS="$old_LDFLAGS"
15874 fi
15875 if $dynamic_list; then
15876 found="-Wl,--dynamic-list"
15877 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15878 else
15879 found="-rdynamic"
15880 RDYNAMIC="-rdynamic"
15881 fi
15882
15883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15884 $as_echo "$found" >&6; }
15885
15886
15887 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
15888 case ${host_os} in
15889 aix*)
15890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15891 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15892 if ${gdb_cv_have_aix_thread_debug+:} false; then :
15893 $as_echo_n "(cached) " >&6
15894 else
15895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15896 /* end confdefs.h. */
15897 #include <sys/pthdebug.h>
15898 int
15899 main ()
15900 {
15901 #ifndef PTHDB_VERSION_3
15902 #error
15903 #endif
15904 ;
15905 return 0;
15906 }
15907 _ACEOF
15908 if ac_fn_c_try_compile "$LINENO"; then :
15909 gdb_cv_have_aix_thread_debug=yes
15910 else
15911 gdb_cv_have_aix_thread_debug=no
15912 fi
15913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15914 fi
15915
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15917 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15918 if test "$gdb_cv_have_aix_thread_debug" = yes; then
15919 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15920 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15921 LIBS="$LIBS -lpthdebug"
15922
15923 # Older versions of AIX do not provide the declaration for
15924 # the getthrds function (it appears that it was introduced
15925 # with AIX 6.x).
15926 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15927 "
15928 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15929 ac_have_decl=1
15930 else
15931 ac_have_decl=0
15932 fi
15933
15934 cat >>confdefs.h <<_ACEOF
15935 #define HAVE_DECL_GETTHRDS $ac_have_decl
15936 _ACEOF
15937
15938 fi
15939 ;;
15940 esac
15941
15942 fi
15943
15944 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15946 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15947 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15948 $as_echo_n "(cached) " >&6
15949 else
15950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951 /* end confdefs.h. */
15952 #include <thread_db.h>
15953 int
15954 main ()
15955 {
15956 int i = TD_NOTALLOC;
15957 ;
15958 return 0;
15959 }
15960 _ACEOF
15961 if ac_fn_c_try_compile "$LINENO"; then :
15962 gdb_cv_thread_db_h_has_td_notalloc=yes
15963 else
15964 gdb_cv_thread_db_h_has_td_notalloc=no
15965
15966 fi
15967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15968
15969 fi
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15971 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15973 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15974 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
15975 $as_echo_n "(cached) " >&6
15976 else
15977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15978 /* end confdefs.h. */
15979 #include <thread_db.h>
15980 int
15981 main ()
15982 {
15983 int i = TD_VERSION;
15984 ;
15985 return 0;
15986 }
15987 _ACEOF
15988 if ac_fn_c_try_compile "$LINENO"; then :
15989 gdb_cv_thread_db_h_has_td_version=yes
15990 else
15991 gdb_cv_thread_db_h_has_td_version=no
15992
15993 fi
15994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15995
15996 fi
15997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15998 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16000 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16001 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16002 $as_echo_n "(cached) " >&6
16003 else
16004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16005 /* end confdefs.h. */
16006 #include <thread_db.h>
16007 int
16008 main ()
16009 {
16010 int i = TD_NOTLS;
16011 ;
16012 return 0;
16013 }
16014 _ACEOF
16015 if ac_fn_c_try_compile "$LINENO"; then :
16016 gdb_cv_thread_db_h_has_td_notls=yes
16017 else
16018 gdb_cv_thread_db_h_has_td_notls=no
16019
16020 fi
16021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16022
16023 fi
16024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16025 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16026 fi
16027 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16028
16029 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16030
16031 fi
16032 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16033
16034 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16035
16036 fi
16037 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16038
16039 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16040
16041 fi
16042
16043 case $host_os in
16044 go32* | *djgpp*)
16045 gdbinit=gdb.ini
16046 ;;
16047 *)
16048 gdbinit=.gdbinit
16049 ;;
16050 esac
16051
16052 cat >>confdefs.h <<_ACEOF
16053 #define GDBINIT "$gdbinit"
16054 _ACEOF
16055
16056
16057
16058 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16059 # except that the argument to --with-sysroot is optional.
16060 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16061 if test "x$with_sysroot" = xyes; then
16062 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16063 fi
16064
16065 # Check whether --with-sysroot was given.
16066 if test "${with_sysroot+set}" = set; then :
16067 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16068 else
16069 TARGET_SYSTEM_ROOT=
16070 fi
16071
16072
16073 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16074 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16075 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16076 ac_define_dir=`eval echo $ac_define_dir`
16077
16078 cat >>confdefs.h <<_ACEOF
16079 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16080 _ACEOF
16081
16082
16083
16084
16085 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16086 if test "x$prefix" = xNONE; then
16087 test_prefix=/usr/local
16088 else
16089 test_prefix=$prefix
16090 fi
16091 else
16092 test_prefix=$exec_prefix
16093 fi
16094 value=0
16095 case ${ac_define_dir} in
16096 "${test_prefix}"|"${test_prefix}/"*|\
16097 '${exec_prefix}'|'${exec_prefix}/'*)
16098 value=1
16099 ;;
16100 esac
16101
16102 cat >>confdefs.h <<_ACEOF
16103 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16104 _ACEOF
16105
16106
16107
16108
16109
16110 # Check whether --with-system-gdbinit was given.
16111 if test "${with_system_gdbinit+set}" = set; then :
16112 withval=$with_system_gdbinit;
16113 SYSTEM_GDBINIT=$withval
16114 else
16115 SYSTEM_GDBINIT=
16116 fi
16117
16118
16119 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16120 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16121 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16122 ac_define_dir=`eval echo $ac_define_dir`
16123
16124 cat >>confdefs.h <<_ACEOF
16125 #define SYSTEM_GDBINIT "$ac_define_dir"
16126 _ACEOF
16127
16128
16129
16130
16131 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16132 if test "x$prefix" = xNONE; then
16133 test_prefix=/usr/local
16134 else
16135 test_prefix=$prefix
16136 fi
16137 else
16138 test_prefix=$exec_prefix
16139 fi
16140 value=0
16141 case ${ac_define_dir} in
16142 "${test_prefix}"|"${test_prefix}/"*|\
16143 '${exec_prefix}'|'${exec_prefix}/'*)
16144 value=1
16145 ;;
16146 esac
16147
16148 cat >>confdefs.h <<_ACEOF
16149 #define SYSTEM_GDBINIT_RELOCATABLE $value
16150 _ACEOF
16151
16152
16153
16154
16155
16156 # Check whether --with-system-gdbinit-dir was given.
16157 if test "${with_system_gdbinit_dir+set}" = set; then :
16158 withval=$with_system_gdbinit_dir;
16159 SYSTEM_GDBINIT_DIR=$withval
16160 else
16161 SYSTEM_GDBINIT_DIR=
16162 fi
16163
16164
16165 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16167 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16168 ac_define_dir=`eval echo $ac_define_dir`
16169
16170 cat >>confdefs.h <<_ACEOF
16171 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16172 _ACEOF
16173
16174
16175
16176
16177 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16178 if test "x$prefix" = xNONE; then
16179 test_prefix=/usr/local
16180 else
16181 test_prefix=$prefix
16182 fi
16183 else
16184 test_prefix=$exec_prefix
16185 fi
16186 value=0
16187 case ${ac_define_dir} in
16188 "${test_prefix}"|"${test_prefix}/"*|\
16189 '${exec_prefix}'|'${exec_prefix}/'*)
16190 value=1
16191 ;;
16192 esac
16193
16194 cat >>confdefs.h <<_ACEOF
16195 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16196 _ACEOF
16197
16198
16199
16200
16201
16202 # Check whether --enable-werror was given.
16203 if test "${enable_werror+set}" = set; then :
16204 enableval=$enable_werror; case "${enableval}" in
16205 yes | y) ERROR_ON_WARNING="yes" ;;
16206 no | n) ERROR_ON_WARNING="no" ;;
16207 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16208 esac
16209 fi
16210
16211
16212 # Enable -Werror by default when using gcc. Turn it off for releases.
16213 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16214 ERROR_ON_WARNING=yes
16215 fi
16216
16217 WERROR_CFLAGS=""
16218 if test "${ERROR_ON_WARNING}" = yes ; then
16219 WERROR_CFLAGS="-Werror"
16220 fi
16221
16222 # The options we'll try to enable.
16223 build_warnings="-Wall -Wpointer-arith \
16224 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16225 -Wno-switch -Wno-char-subscripts \
16226 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16227 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16228 -Wno-mismatched-tags \
16229 -Wno-error=deprecated-register \
16230 -Wsuggest-override \
16231 -Wimplicit-fallthrough=3 \
16232 -Wduplicated-cond \
16233 -Wshadow=local \
16234 -Wdeprecated-copy \
16235 -Wdeprecated-copy-dtor \
16236 -Wredundant-move \
16237 -Wmissing-declarations \
16238 -Wstrict-null-sentinel \
16239 "
16240
16241 case "${host}" in
16242 *-*-mingw32*)
16243 # Enable -Wno-format by default when using gcc on mingw since many
16244 # GCC versions complain about %I64.
16245 build_warnings="$build_warnings -Wno-format" ;;
16246 *-*-solaris*)
16247 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16248 # doesn't understand.
16249 build_warnings="$build_warnings -Wno-unknown-pragmas"
16250 # Solaris 11 <unistd.h> marks vfork deprecated.
16251 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16252 *)
16253 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16254 # but there's a special case for this below.
16255 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16256 esac
16257
16258 # Check whether --enable-build-warnings was given.
16259 if test "${enable_build_warnings+set}" = set; then :
16260 enableval=$enable_build_warnings; case "${enableval}" in
16261 yes) ;;
16262 no) build_warnings="-w";;
16263 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16264 build_warnings="${build_warnings} ${t}";;
16265 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16266 build_warnings="${t} ${build_warnings}";;
16267 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16268 esac
16269 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16270 echo "Setting compiler warning flags = $build_warnings" 6>&1
16271 fi
16272 fi
16273 # Check whether --enable-gdb-build-warnings was given.
16274 if test "${enable_gdb_build_warnings+set}" = set; then :
16275 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16276 yes) ;;
16277 no) build_warnings="-w";;
16278 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16279 build_warnings="${build_warnings} ${t}";;
16280 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16281 build_warnings="${t} ${build_warnings}";;
16282 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16283 esac
16284 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16285 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16286 fi
16287 fi
16288
16289 # The set of warnings supported by a C++ compiler is not the same as
16290 # of the C compiler.
16291 ac_ext=cpp
16292 ac_cpp='$CXXCPP $CPPFLAGS'
16293 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16294 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16295 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16296
16297
16298 WARN_CFLAGS=""
16299 if test "x${build_warnings}" != x -a "x$GCC" = xyes
16300 then
16301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16302 $as_echo_n "checking compiler warning flags... " >&6; }
16303 # Separate out the -Werror flag as some files just cannot be
16304 # compiled with it enabled.
16305 for w in ${build_warnings}; do
16306 # GCC does not complain about -Wno-unknown-warning. Invert
16307 # and test -Wunknown-warning instead.
16308 case $w in
16309 -Wno-*)
16310 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16311 -Wformat-nonliteral)
16312 # gcc requires -Wformat before -Wformat-nonliteral
16313 # will work, so stick them together.
16314 w="-Wformat $w"
16315 wtest="$w"
16316 ;;
16317 *)
16318 wtest=$w ;;
16319 esac
16320
16321 case $w in
16322 -Werr*) WERROR_CFLAGS=-Werror ;;
16323 *)
16324 # Check whether GCC accepts it.
16325 saved_CFLAGS="$CFLAGS"
16326 CFLAGS="$CFLAGS -Werror $wtest"
16327 saved_CXXFLAGS="$CXXFLAGS"
16328 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16329 if test "x$w" = "x-Wunused-variable"; then
16330 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16331 # fixed in GCC 4.9. This test is derived from the gdb
16332 # source code that triggered this bug in GCC.
16333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16334 /* end confdefs.h. */
16335 struct scoped_restore_base {};
16336 struct scoped_restore_tmpl : public scoped_restore_base {
16337 ~scoped_restore_tmpl() {}
16338 };
16339 int
16340 main ()
16341 {
16342 const scoped_restore_base &b = scoped_restore_tmpl();
16343 ;
16344 return 0;
16345 }
16346 _ACEOF
16347 if ac_fn_cxx_try_compile "$LINENO"; then :
16348 WARN_CFLAGS="${WARN_CFLAGS} $w"
16349 fi
16350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16351 else
16352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16353 /* end confdefs.h. */
16354
16355 int
16356 main ()
16357 {
16358
16359 ;
16360 return 0;
16361 }
16362 _ACEOF
16363 if ac_fn_cxx_try_compile "$LINENO"; then :
16364 WARN_CFLAGS="${WARN_CFLAGS} $w"
16365 fi
16366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16367 fi
16368 CFLAGS="$saved_CFLAGS"
16369 CXXFLAGS="$saved_CXXFLAGS"
16370 esac
16371 done
16372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16373 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16374 fi
16375
16376
16377
16378 ac_ext=c
16379 ac_cpp='$CPP $CPPFLAGS'
16380 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16381 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16382 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16383
16384
16385
16386 # Check whether --enable-ubsan was given.
16387 if test "${enable_ubsan+set}" = set; then :
16388 enableval=$enable_ubsan;
16389 else
16390 enable_ubsan=no
16391 fi
16392
16393 if test "x$enable_ubsan" = xauto; then
16394 if $development; then
16395 enable_ubsan=yes
16396 fi
16397 fi
16398 ac_ext=cpp
16399 ac_cpp='$CXXCPP $CPPFLAGS'
16400 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16401 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16402 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16403
16404 if test "x$enable_ubsan" = xyes; then
16405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16406 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16407 saved_CXXFLAGS="$CXXFLAGS"
16408 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16410 /* end confdefs.h. */
16411
16412 int
16413 main ()
16414 {
16415
16416 ;
16417 return 0;
16418 }
16419 _ACEOF
16420 if ac_fn_cxx_try_link "$LINENO"; then :
16421 enable_ubsan=yes
16422 else
16423 enable_ubsan=no
16424 fi
16425 rm -f core conftest.err conftest.$ac_objext \
16426 conftest$ac_exeext conftest.$ac_ext
16427 CXXFLAGS="$saved_CXXFLAGS"
16428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16429 $as_echo "$enable_ubsan" >&6; }
16430 if test "x$enable_ubsan" = xyes; then
16431 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16432 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16433 fi
16434 fi
16435 ac_ext=c
16436 ac_cpp='$CPP $CPPFLAGS'
16437 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16438 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16439 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16440
16441
16442
16443 # In the Cygwin environment, we need some additional flags.
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16445 $as_echo_n "checking for cygwin... " >&6; }
16446 if ${gdb_cv_os_cygwin+:} false; then :
16447 $as_echo_n "(cached) " >&6
16448 else
16449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16450 /* end confdefs.h. */
16451
16452 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
16453 lose
16454 #endif
16455 _ACEOF
16456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16457 $EGREP "^lose$" >/dev/null 2>&1; then :
16458 gdb_cv_os_cygwin=yes
16459 else
16460 gdb_cv_os_cygwin=no
16461 fi
16462 rm -f conftest*
16463
16464 fi
16465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16466 $as_echo "$gdb_cv_os_cygwin" >&6; }
16467
16468
16469 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
16470 case ${host} in
16471 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16472 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
16473 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
16474 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
16475 esac
16476
16477
16478 # libreadline needs libuser32.a in a cygwin environment
16479 WIN32LIBS=
16480 if test x"$gdb_cv_os_cygwin" = xyes; then
16481 WIN32LIBS="-luser32"
16482 case "${target}" in
16483 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16484 ;;
16485 esac
16486 fi
16487
16488 # The ser-tcp.c module requires sockets.
16489 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
16490 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
16491
16492 # Add ELF support to GDB, but only if BFD includes ELF support.
16493
16494 OLD_CFLAGS=$CFLAGS
16495 OLD_LDFLAGS=$LDFLAGS
16496 OLD_LIBS=$LIBS
16497 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16498 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16499 # always want our bfd.
16500 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16501 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16502 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16503 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16504 LIBS="-lbfd -liberty -lz $intl $LIBS"
16505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16506 $as_echo_n "checking for ELF support in BFD... " >&6; }
16507 if ${gdb_cv_var_elf+:} false; then :
16508 $as_echo_n "(cached) " >&6
16509 else
16510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16511 /* end confdefs.h. */
16512 #include <stdlib.h>
16513 #include "bfd.h"
16514 #include "elf-bfd.h"
16515
16516 int
16517 main ()
16518 {
16519 return bfd_get_elf_phdr_upper_bound (NULL);
16520 ;
16521 return 0;
16522 }
16523 _ACEOF
16524 if ac_fn_c_try_link "$LINENO"; then :
16525 gdb_cv_var_elf=yes
16526 else
16527 gdb_cv_var_elf=no
16528 fi
16529 rm -f core conftest.err conftest.$ac_objext \
16530 conftest$ac_exeext conftest.$ac_ext
16531 fi
16532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16533 $as_echo "$gdb_cv_var_elf" >&6; }
16534 CFLAGS=$OLD_CFLAGS
16535 LDFLAGS=$OLD_LDFLAGS
16536 LIBS=$OLD_LIBS
16537 if test "$gdb_cv_var_elf" = yes; then
16538 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
16539
16540 $as_echo "#define HAVE_ELF 1" >>confdefs.h
16541
16542 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16543 if test "$plugins" = "yes"; then
16544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16545 $as_echo_n "checking for library containing dlopen... " >&6; }
16546 if ${ac_cv_search_dlopen+:} false; then :
16547 $as_echo_n "(cached) " >&6
16548 else
16549 ac_func_search_save_LIBS=$LIBS
16550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16551 /* end confdefs.h. */
16552
16553 /* Override any GCC internal prototype to avoid an error.
16554 Use char because int might match the return type of a GCC
16555 builtin and then its argument prototype would still apply. */
16556 #ifdef __cplusplus
16557 extern "C"
16558 #endif
16559 char dlopen ();
16560 int
16561 main ()
16562 {
16563 return dlopen ();
16564 ;
16565 return 0;
16566 }
16567 _ACEOF
16568 for ac_lib in '' dl; do
16569 if test -z "$ac_lib"; then
16570 ac_res="none required"
16571 else
16572 ac_res=-l$ac_lib
16573 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16574 fi
16575 if ac_fn_c_try_link "$LINENO"; then :
16576 ac_cv_search_dlopen=$ac_res
16577 fi
16578 rm -f core conftest.err conftest.$ac_objext \
16579 conftest$ac_exeext
16580 if ${ac_cv_search_dlopen+:} false; then :
16581 break
16582 fi
16583 done
16584 if ${ac_cv_search_dlopen+:} false; then :
16585
16586 else
16587 ac_cv_search_dlopen=no
16588 fi
16589 rm conftest.$ac_ext
16590 LIBS=$ac_func_search_save_LIBS
16591 fi
16592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16593 $as_echo "$ac_cv_search_dlopen" >&6; }
16594 ac_res=$ac_cv_search_dlopen
16595 if test "$ac_res" != no; then :
16596 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16597
16598 fi
16599
16600 fi
16601 fi
16602
16603 # Add macho support to GDB, but only if BFD includes it.
16604
16605 OLD_CFLAGS=$CFLAGS
16606 OLD_LDFLAGS=$LDFLAGS
16607 OLD_LIBS=$LIBS
16608 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16609 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16610 # always want our bfd.
16611 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16612 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16613 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16614 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16615 LIBS="-lbfd -liberty -lz $intl $LIBS"
16616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16617 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
16618 if ${gdb_cv_var_macho+:} false; then :
16619 $as_echo_n "(cached) " >&6
16620 else
16621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16622 /* end confdefs.h. */
16623 #include <stdlib.h>
16624 #include "bfd.h"
16625 #include "mach-o.h"
16626
16627 int
16628 main ()
16629 {
16630 return bfd_mach_o_lookup_command (NULL, 0, NULL);
16631 ;
16632 return 0;
16633 }
16634 _ACEOF
16635 if ac_fn_c_try_link "$LINENO"; then :
16636 gdb_cv_var_macho=yes
16637 else
16638 gdb_cv_var_macho=no
16639 fi
16640 rm -f core conftest.err conftest.$ac_objext \
16641 conftest$ac_exeext conftest.$ac_ext
16642 fi
16643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16644 $as_echo "$gdb_cv_var_macho" >&6; }
16645 CFLAGS=$OLD_CFLAGS
16646 LDFLAGS=$OLD_LDFLAGS
16647 LIBS=$OLD_LIBS
16648 if test "$gdb_cv_var_macho" = yes; then
16649 CONFIG_OBS="$CONFIG_OBS machoread.o"
16650 fi
16651
16652 # Add any host-specific objects to GDB.
16653 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16654
16655 # If building on ELF, look for lzma support for embedded compressed debug info.
16656 if test "$gdb_cv_var_elf" = yes; then
16657
16658 # Check whether --with-lzma was given.
16659 if test "${with_lzma+set}" = set; then :
16660 withval=$with_lzma;
16661 else
16662 with_lzma=auto
16663 fi
16664
16665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16666 $as_echo_n "checking whether to use lzma... " >&6; }
16667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16668 $as_echo "$with_lzma" >&6; }
16669
16670 if test "${with_lzma}" != no; then
16671
16672
16673
16674
16675
16676
16677
16678
16679 use_additional=yes
16680
16681 acl_save_prefix="$prefix"
16682 prefix="$acl_final_prefix"
16683 acl_save_exec_prefix="$exec_prefix"
16684 exec_prefix="$acl_final_exec_prefix"
16685
16686 eval additional_includedir=\"$includedir\"
16687 eval additional_libdir=\"$libdir\"
16688
16689 exec_prefix="$acl_save_exec_prefix"
16690 prefix="$acl_save_prefix"
16691
16692
16693 # Check whether --with-liblzma-prefix was given.
16694 if test "${with_liblzma_prefix+set}" = set; then :
16695 withval=$with_liblzma_prefix;
16696 if test "X$withval" = "Xno"; then
16697 use_additional=no
16698 else
16699 if test "X$withval" = "X"; then
16700
16701 acl_save_prefix="$prefix"
16702 prefix="$acl_final_prefix"
16703 acl_save_exec_prefix="$exec_prefix"
16704 exec_prefix="$acl_final_exec_prefix"
16705
16706 eval additional_includedir=\"$includedir\"
16707 eval additional_libdir=\"$libdir\"
16708
16709 exec_prefix="$acl_save_exec_prefix"
16710 prefix="$acl_save_prefix"
16711
16712 else
16713 additional_includedir="$withval/include"
16714 additional_libdir="$withval/lib"
16715 fi
16716 fi
16717
16718 fi
16719
16720
16721 # Check whether --with-liblzma-type was given.
16722 if test "${with_liblzma_type+set}" = set; then :
16723 withval=$with_liblzma_type; with_liblzma_type=$withval
16724 else
16725 with_liblzma_type=auto
16726 fi
16727
16728 lib_type=`eval echo \$with_liblzma_type`
16729
16730 LIBLZMA=
16731 LTLIBLZMA=
16732 INCLZMA=
16733 rpathdirs=
16734 ltrpathdirs=
16735 names_already_handled=
16736 names_next_round='lzma '
16737 while test -n "$names_next_round"; do
16738 names_this_round="$names_next_round"
16739 names_next_round=
16740 for name in $names_this_round; do
16741 already_handled=
16742 for n in $names_already_handled; do
16743 if test "$n" = "$name"; then
16744 already_handled=yes
16745 break
16746 fi
16747 done
16748 if test -z "$already_handled"; then
16749 names_already_handled="$names_already_handled $name"
16750 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16751 eval value=\"\$HAVE_LIB$uppername\"
16752 if test -n "$value"; then
16753 if test "$value" = yes; then
16754 eval value=\"\$LIB$uppername\"
16755 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16756 eval value=\"\$LTLIB$uppername\"
16757 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16758 else
16759 :
16760 fi
16761 else
16762 found_dir=
16763 found_la=
16764 found_so=
16765 found_a=
16766 if test $use_additional = yes; then
16767 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
16768 found_dir="$additional_libdir"
16769 found_so="$additional_libdir/lib$name.$shlibext"
16770 if test -f "$additional_libdir/lib$name.la"; then
16771 found_la="$additional_libdir/lib$name.la"
16772 fi
16773 elif test x$lib_type != xshared; then
16774 if test -f "$additional_libdir/lib$name.$libext"; then
16775 found_dir="$additional_libdir"
16776 found_a="$additional_libdir/lib$name.$libext"
16777 if test -f "$additional_libdir/lib$name.la"; then
16778 found_la="$additional_libdir/lib$name.la"
16779 fi
16780 fi
16781 fi
16782 fi
16783 if test "X$found_dir" = "X"; then
16784 for x in $LDFLAGS $LTLIBLZMA; do
16785
16786 acl_save_prefix="$prefix"
16787 prefix="$acl_final_prefix"
16788 acl_save_exec_prefix="$exec_prefix"
16789 exec_prefix="$acl_final_exec_prefix"
16790 eval x=\"$x\"
16791 exec_prefix="$acl_save_exec_prefix"
16792 prefix="$acl_save_prefix"
16793
16794 case "$x" in
16795 -L*)
16796 dir=`echo "X$x" | sed -e 's/^X-L//'`
16797 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
16798 found_dir="$dir"
16799 found_so="$dir/lib$name.$shlibext"
16800 if test -f "$dir/lib$name.la"; then
16801 found_la="$dir/lib$name.la"
16802 fi
16803 elif test x$lib_type != xshared; then
16804 if test -f "$dir/lib$name.$libext"; then
16805 found_dir="$dir"
16806 found_a="$dir/lib$name.$libext"
16807 if test -f "$dir/lib$name.la"; then
16808 found_la="$dir/lib$name.la"
16809 fi
16810 fi
16811 fi
16812 ;;
16813 esac
16814 if test "X$found_dir" != "X"; then
16815 break
16816 fi
16817 done
16818 fi
16819 if test "X$found_dir" != "X"; then
16820 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16821 if test "X$found_so" != "X"; then
16822 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16823 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16824 else
16825 haveit=
16826 for x in $ltrpathdirs; do
16827 if test "X$x" = "X$found_dir"; then
16828 haveit=yes
16829 break
16830 fi
16831 done
16832 if test -z "$haveit"; then
16833 ltrpathdirs="$ltrpathdirs $found_dir"
16834 fi
16835 if test "$hardcode_direct" = yes; then
16836 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16837 else
16838 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16839 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16840 haveit=
16841 for x in $rpathdirs; do
16842 if test "X$x" = "X$found_dir"; then
16843 haveit=yes
16844 break
16845 fi
16846 done
16847 if test -z "$haveit"; then
16848 rpathdirs="$rpathdirs $found_dir"
16849 fi
16850 else
16851 haveit=
16852 for x in $LDFLAGS $LIBLZMA; do
16853
16854 acl_save_prefix="$prefix"
16855 prefix="$acl_final_prefix"
16856 acl_save_exec_prefix="$exec_prefix"
16857 exec_prefix="$acl_final_exec_prefix"
16858 eval x=\"$x\"
16859 exec_prefix="$acl_save_exec_prefix"
16860 prefix="$acl_save_prefix"
16861
16862 if test "X$x" = "X-L$found_dir"; then
16863 haveit=yes
16864 break
16865 fi
16866 done
16867 if test -z "$haveit"; then
16868 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16869 fi
16870 if test "$hardcode_minus_L" != no; then
16871 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16872 else
16873 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16874 fi
16875 fi
16876 fi
16877 fi
16878 else
16879 if test "X$found_a" != "X"; then
16880 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16881 else
16882 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16883 fi
16884 fi
16885 additional_includedir=
16886 case "$found_dir" in
16887 */lib | */lib/)
16888 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16889 additional_includedir="$basedir/include"
16890 ;;
16891 esac
16892 if test "X$additional_includedir" != "X"; then
16893 if test "X$additional_includedir" != "X/usr/include"; then
16894 haveit=
16895 if test "X$additional_includedir" = "X/usr/local/include"; then
16896 if test -n "$GCC"; then
16897 case $host_os in
16898 linux*) haveit=yes;;
16899 esac
16900 fi
16901 fi
16902 if test -z "$haveit"; then
16903 for x in $CPPFLAGS $INCLZMA; do
16904
16905 acl_save_prefix="$prefix"
16906 prefix="$acl_final_prefix"
16907 acl_save_exec_prefix="$exec_prefix"
16908 exec_prefix="$acl_final_exec_prefix"
16909 eval x=\"$x\"
16910 exec_prefix="$acl_save_exec_prefix"
16911 prefix="$acl_save_prefix"
16912
16913 if test "X$x" = "X-I$additional_includedir"; then
16914 haveit=yes
16915 break
16916 fi
16917 done
16918 if test -z "$haveit"; then
16919 if test -d "$additional_includedir"; then
16920 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16921 fi
16922 fi
16923 fi
16924 fi
16925 fi
16926 if test -n "$found_la"; then
16927 save_libdir="$libdir"
16928 case "$found_la" in
16929 */* | *\\*) . "$found_la" ;;
16930 *) . "./$found_la" ;;
16931 esac
16932 libdir="$save_libdir"
16933 for dep in $dependency_libs; do
16934 case "$dep" in
16935 -L*)
16936 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16937 if test "X$additional_libdir" != "X/usr/lib"; then
16938 haveit=
16939 if test "X$additional_libdir" = "X/usr/local/lib"; then
16940 if test -n "$GCC"; then
16941 case $host_os in
16942 linux*) haveit=yes;;
16943 esac
16944 fi
16945 fi
16946 if test -z "$haveit"; then
16947 haveit=
16948 for x in $LDFLAGS $LIBLZMA; do
16949
16950 acl_save_prefix="$prefix"
16951 prefix="$acl_final_prefix"
16952 acl_save_exec_prefix="$exec_prefix"
16953 exec_prefix="$acl_final_exec_prefix"
16954 eval x=\"$x\"
16955 exec_prefix="$acl_save_exec_prefix"
16956 prefix="$acl_save_prefix"
16957
16958 if test "X$x" = "X-L$additional_libdir"; then
16959 haveit=yes
16960 break
16961 fi
16962 done
16963 if test -z "$haveit"; then
16964 if test -d "$additional_libdir"; then
16965 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16966 fi
16967 fi
16968 haveit=
16969 for x in $LDFLAGS $LTLIBLZMA; do
16970
16971 acl_save_prefix="$prefix"
16972 prefix="$acl_final_prefix"
16973 acl_save_exec_prefix="$exec_prefix"
16974 exec_prefix="$acl_final_exec_prefix"
16975 eval x=\"$x\"
16976 exec_prefix="$acl_save_exec_prefix"
16977 prefix="$acl_save_prefix"
16978
16979 if test "X$x" = "X-L$additional_libdir"; then
16980 haveit=yes
16981 break
16982 fi
16983 done
16984 if test -z "$haveit"; then
16985 if test -d "$additional_libdir"; then
16986 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16987 fi
16988 fi
16989 fi
16990 fi
16991 ;;
16992 -R*)
16993 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16994 if test "$enable_rpath" != no; then
16995 haveit=
16996 for x in $rpathdirs; do
16997 if test "X$x" = "X$dir"; then
16998 haveit=yes
16999 break
17000 fi
17001 done
17002 if test -z "$haveit"; then
17003 rpathdirs="$rpathdirs $dir"
17004 fi
17005 haveit=
17006 for x in $ltrpathdirs; do
17007 if test "X$x" = "X$dir"; then
17008 haveit=yes
17009 break
17010 fi
17011 done
17012 if test -z "$haveit"; then
17013 ltrpathdirs="$ltrpathdirs $dir"
17014 fi
17015 fi
17016 ;;
17017 -l*)
17018 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17019 ;;
17020 *.la)
17021 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17022 ;;
17023 *)
17024 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17025 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17026 ;;
17027 esac
17028 done
17029 fi
17030 else
17031 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17032 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17033 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17034 else
17035 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17036 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17037 fi
17038 fi
17039 fi
17040 fi
17041 done
17042 done
17043 if test "X$rpathdirs" != "X"; then
17044 if test -n "$hardcode_libdir_separator"; then
17045 alldirs=
17046 for found_dir in $rpathdirs; do
17047 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17048 done
17049 acl_save_libdir="$libdir"
17050 libdir="$alldirs"
17051 eval flag=\"$hardcode_libdir_flag_spec\"
17052 libdir="$acl_save_libdir"
17053 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17054 else
17055 for found_dir in $rpathdirs; do
17056 acl_save_libdir="$libdir"
17057 libdir="$found_dir"
17058 eval flag=\"$hardcode_libdir_flag_spec\"
17059 libdir="$acl_save_libdir"
17060 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17061 done
17062 fi
17063 fi
17064 if test "X$ltrpathdirs" != "X"; then
17065 for found_dir in $ltrpathdirs; do
17066 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17067 done
17068 fi
17069
17070
17071 ac_save_CPPFLAGS="$CPPFLAGS"
17072
17073 for element in $INCLZMA; do
17074 haveit=
17075 for x in $CPPFLAGS; do
17076
17077 acl_save_prefix="$prefix"
17078 prefix="$acl_final_prefix"
17079 acl_save_exec_prefix="$exec_prefix"
17080 exec_prefix="$acl_final_exec_prefix"
17081 eval x=\"$x\"
17082 exec_prefix="$acl_save_exec_prefix"
17083 prefix="$acl_save_prefix"
17084
17085 if test "X$x" = "X$element"; then
17086 haveit=yes
17087 break
17088 fi
17089 done
17090 if test -z "$haveit"; then
17091 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17092 fi
17093 done
17094
17095
17096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17097 $as_echo_n "checking for liblzma... " >&6; }
17098 if ${ac_cv_liblzma+:} false; then :
17099 $as_echo_n "(cached) " >&6
17100 else
17101
17102 ac_save_LIBS="$LIBS"
17103 LIBS="$LIBS $LIBLZMA"
17104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17105 /* end confdefs.h. */
17106 #include "lzma.h"
17107 int
17108 main ()
17109 {
17110 lzma_index_iter iter;
17111 lzma_index_iter_init (&iter, 0);
17112 lzma_mf_is_supported (LZMA_MF_HC3);
17113 ;
17114 return 0;
17115 }
17116 _ACEOF
17117 if ac_fn_c_try_link "$LINENO"; then :
17118 ac_cv_liblzma=yes
17119 else
17120 ac_cv_liblzma=no
17121 fi
17122 rm -f core conftest.err conftest.$ac_objext \
17123 conftest$ac_exeext conftest.$ac_ext
17124 LIBS="$ac_save_LIBS"
17125
17126 fi
17127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17128 $as_echo "$ac_cv_liblzma" >&6; }
17129 if test "$ac_cv_liblzma" = yes; then
17130 HAVE_LIBLZMA=yes
17131
17132 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17133
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17135 $as_echo_n "checking how to link with liblzma... " >&6; }
17136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17137 $as_echo "$LIBLZMA" >&6; }
17138 else
17139 HAVE_LIBLZMA=no
17140 CPPFLAGS="$ac_save_CPPFLAGS"
17141 LIBLZMA=
17142 LTLIBLZMA=
17143 fi
17144
17145
17146
17147
17148
17149
17150 if test "$HAVE_LIBLZMA" != yes; then
17151 if test "$with_lzma" = yes; then
17152 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17153 fi
17154 fi
17155 fi
17156 fi
17157
17158 LIBGUI="../libgui/src/libgui.a"
17159 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17160
17161
17162
17163 WIN32LDAPP=
17164
17165
17166
17167 case "${host}" in
17168 *-*-cygwin* | *-*-mingw* )
17169 configdir="win"
17170 ;;
17171 *)
17172 configdir="unix"
17173 ;;
17174 esac
17175
17176 GDBTKLIBS=
17177 if test "${enable_gdbtk}" = "yes"; then
17178
17179 # Gdbtk must have an absolute path to srcdir in order to run
17180 # properly when not installed.
17181 here=`pwd`
17182 cd ${srcdir}
17183 GDBTK_SRC_DIR=`pwd`
17184 cd $here
17185
17186
17187 #
17188 # Ok, lets find the tcl configuration
17189 # First, look for one uninstalled.
17190 # the alternative search directory is invoked by --with-tcl
17191 #
17192
17193 if test x"${no_tcl}" = x ; then
17194 # we reset no_tcl in case something fails here
17195 no_tcl=true
17196
17197 # Check whether --with-tcl was given.
17198 if test "${with_tcl+set}" = set; then :
17199 withval=$with_tcl; with_tclconfig=${withval}
17200 fi
17201
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17203 $as_echo_n "checking for Tcl configuration... " >&6; }
17204 if ${ac_cv_c_tclconfig+:} false; then :
17205 $as_echo_n "(cached) " >&6
17206 else
17207
17208
17209 # First check to see if --with-tcl was specified.
17210 case "${host}" in
17211 *-*-cygwin*) platDir="win" ;;
17212 *) platDir="unix" ;;
17213 esac
17214 if test x"${with_tclconfig}" != x ; then
17215 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17216 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17217 else
17218 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17219 fi
17220 fi
17221
17222 # then check for a private Tcl installation
17223 if test x"${ac_cv_c_tclconfig}" = x ; then
17224 for i in \
17225 ../tcl \
17226 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17227 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17228 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17229 ../../tcl \
17230 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17231 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17232 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17233 ../../../tcl \
17234 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17235 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17236 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17237 if test -f "$i/$platDir/tclConfig.sh" ; then
17238 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17239 break
17240 fi
17241 done
17242 fi
17243
17244 # on Darwin, check in Framework installation locations
17245 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17246 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17247 `ls -d /Library/Frameworks 2>/dev/null` \
17248 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17249 `ls -d /System/Library/Frameworks 2>/dev/null` \
17250 ; do
17251 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17252 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17253 break
17254 fi
17255 done
17256 fi
17257
17258 # check in a few common install locations
17259 if test x"${ac_cv_c_tclconfig}" = x ; then
17260 for i in `ls -d ${libdir} 2>/dev/null` \
17261 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17262 `ls -d ${prefix}/lib 2>/dev/null` \
17263 `ls -d /usr/local/lib 2>/dev/null` \
17264 `ls -d /usr/contrib/lib 2>/dev/null` \
17265 `ls -d /usr/lib 2>/dev/null` \
17266 ; do
17267 if test -f "$i/tclConfig.sh" ; then
17268 ac_cv_c_tclconfig=`(cd $i; pwd)`
17269 break
17270 fi
17271 done
17272 fi
17273
17274 # check in a few other private locations
17275 if test x"${ac_cv_c_tclconfig}" = x ; then
17276 for i in \
17277 ${srcdir}/../tcl \
17278 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17279 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17280 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17281 if test -f "$i/$platDir/tclConfig.sh" ; then
17282 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17283 break
17284 fi
17285 done
17286 fi
17287
17288 fi
17289
17290
17291 if test x"${ac_cv_c_tclconfig}" = x ; then
17292 TCL_BIN_DIR="# no Tcl configs found"
17293 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17294 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17295 else
17296 no_tcl=
17297 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17299 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17300 fi
17301 fi
17302
17303
17304 # If $no_tk is nonempty, then we can't do Tk, and there is no
17305 # point to doing Tcl.
17306
17307 #
17308 # Ok, lets find the tk configuration
17309 # First, look for one uninstalled.
17310 # the alternative search directory is invoked by --with-tk
17311 #
17312
17313 if test x"${no_tk}" = x ; then
17314 # we reset no_tk in case something fails here
17315 no_tk=true
17316
17317 # Check whether --with-tk was given.
17318 if test "${with_tk+set}" = set; then :
17319 withval=$with_tk; with_tkconfig=${withval}
17320 fi
17321
17322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17323 $as_echo_n "checking for Tk configuration... " >&6; }
17324 if ${ac_cv_c_tkconfig+:} false; then :
17325 $as_echo_n "(cached) " >&6
17326 else
17327
17328
17329 # First check to see if --with-tkconfig was specified.
17330 if test x"${with_tkconfig}" != x ; then
17331 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17332 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17333 else
17334 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17335 fi
17336 fi
17337
17338 # then check for a private Tk library
17339 case "${host}" in
17340 *-*-cygwin*) platDir="win" ;;
17341 *) platDir="unix" ;;
17342 esac
17343 if test x"${ac_cv_c_tkconfig}" = x ; then
17344 for i in \
17345 ../tk \
17346 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17347 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17348 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17349 ../../tk \
17350 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17351 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17352 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17353 ../../../tk \
17354 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17355 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17356 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17357 if test -f "$i/$platDir/tkConfig.sh" ; then
17358 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17359 break
17360 fi
17361 done
17362 fi
17363
17364 # on Darwin, check in Framework installation locations
17365 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17366 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17367 `ls -d /Library/Frameworks 2>/dev/null` \
17368 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17369 `ls -d /System/Library/Frameworks 2>/dev/null` \
17370 ; do
17371 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17372 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17373 break
17374 fi
17375 done
17376 fi
17377
17378 # check in a few common install locations
17379 if test x"${ac_cv_c_tkconfig}" = x ; then
17380 for i in `ls -d ${libdir} 2>/dev/null` \
17381 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17382 `ls -d ${prefix}/lib 2>/dev/null` \
17383 `ls -d /usr/local/lib 2>/dev/null` \
17384 `ls -d /usr/contrib/lib 2>/dev/null` \
17385 `ls -d /usr/lib 2>/dev/null` \
17386 ; do
17387 if test -f "$i/tkConfig.sh" ; then
17388 ac_cv_c_tkconfig=`(cd $i; pwd)`
17389 break
17390 fi
17391 done
17392 fi
17393 # check in a few other private locations
17394 if test x"${ac_cv_c_tkconfig}" = x ; then
17395 for i in \
17396 ${srcdir}/../tk \
17397 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17398 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17399 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17400 if test -f "$i/$platDir/tkConfig.sh" ; then
17401 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17402 break
17403 fi
17404 done
17405 fi
17406
17407 fi
17408
17409
17410 if test x"${ac_cv_c_tkconfig}" = x ; then
17411 TK_BIN_DIR="# no Tk configs found"
17412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17413 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
17414 else
17415 no_tk=
17416 TK_BIN_DIR=${ac_cv_c_tkconfig}
17417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17418 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17419 fi
17420 fi
17421
17422
17423 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17424
17425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17426 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
17427
17428 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
17429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17430 $as_echo "loading" >&6; }
17431 . ${TCL_BIN_DIR}/tclConfig.sh
17432 else
17433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17434 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17435 fi
17436
17437 # eval is required to do the TCL_DBGX substitution
17438 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17439 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17440
17441 # If the TCL_BIN_DIR is the build directory (not the install directory),
17442 # then set the common variable name to the value of the build variables.
17443 # For example, the variable TCL_LIB_SPEC will be set to the value
17444 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17445 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17446 # installed and uninstalled version of Tcl.
17447 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17448 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17449 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17450 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17451 elif test "`uname -s`" = "Darwin"; then
17452 # If Tcl was built as a framework, attempt to use the libraries
17453 # from the framework at the given location so that linking works
17454 # against Tcl.framework installed in an arbitrary location.
17455 case ${TCL_DEFS} in
17456 *TCL_FRAMEWORK*)
17457 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17458 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17459 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17460 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17461 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17462 break
17463 fi
17464 done
17465 fi
17466 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17467 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17468 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17469 fi
17470 ;;
17471 esac
17472 fi
17473
17474 # eval is required to do the TCL_DBGX substitution
17475 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17476 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17477 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17478 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494 # Check for in-tree tcl
17495 here=`pwd`
17496 cd ${srcdir}/..
17497 topdir=`pwd`
17498 cd ${here}
17499
17500 intree="no"
17501 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17502 intree="yes"
17503 fi
17504
17505 # Find Tcl private headers
17506 if test x"${intree}" = xno; then
17507
17508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17509 $as_echo_n "checking for Tcl private headers... " >&6; }
17510 private_dir=""
17511 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17512 if test -f ${dir}/tclInt.h ; then
17513 private_dir=${dir}
17514 fi
17515
17516 if test x"${private_dir}" = x; then
17517 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
17518 else
17519 TCL_PRIVATE_INCLUDE="-I${private_dir}"
17520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17521 $as_echo "${private_dir}" >&6; }
17522 fi
17523
17524 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17525 TCL_LIBRARY="${TCL_LIB_SPEC}"
17526 TCL_DEPS=""
17527 else
17528 # If building tcl in the same src tree, private headers
17529 # are not needed, but we need to be sure to use the right
17530 # headers library
17531 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17532 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17533 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17534 fi
17535
17536
17537
17538
17539
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17541 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
17542
17543 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17545 $as_echo "loading" >&6; }
17546 . ${TK_BIN_DIR}/tkConfig.sh
17547 else
17548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17549 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17550 fi
17551
17552 # eval is required to do the TK_DBGX substitution
17553 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17554 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17555
17556 # If the TK_BIN_DIR is the build directory (not the install directory),
17557 # then set the common variable name to the value of the build variables.
17558 # For example, the variable TK_LIB_SPEC will be set to the value
17559 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17560 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17561 # installed and uninstalled version of Tcl.
17562 if test -f "${TK_BIN_DIR}/Makefile" ; then
17563 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17564 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17565 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17566 elif test "`uname -s`" = "Darwin"; then
17567 # If Tk was built as a framework, attempt to use the libraries
17568 # from the framework at the given location so that linking works
17569 # against Tk.framework installed in an arbitrary location.
17570 case ${TK_DEFS} in
17571 *TK_FRAMEWORK*)
17572 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
17573 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17574 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17575 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17576 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17577 break
17578 fi
17579 done
17580 fi
17581 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
17582 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17583 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17584 fi
17585 ;;
17586 esac
17587 fi
17588
17589 # eval is required to do the TK_DBGX substitution
17590 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17591 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17592 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17593 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608 # Check for in-tree Tk
17609 intree="no"
17610 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17611 intree="yes"
17612 fi
17613
17614 # Find Tk private headers
17615 if test x"${intree}" = xno; then
17616
17617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17618 $as_echo_n "checking for Tk private headers... " >&6; }
17619 private_dir=""
17620 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17621 if test -f ${dir}/tkInt.h; then
17622 private_dir=${dir}
17623 fi
17624
17625 if test x"${private_dir}" = x; then
17626 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
17627 else
17628 TK_PRIVATE_INCLUDE="-I${private_dir}"
17629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17630 $as_echo "${private_dir}" >&6; }
17631 fi
17632
17633 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17634 TK_LIBRARY=${TK_LIB_SPEC}
17635 TK_DEPS=""
17636 else
17637 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17638 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17639 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17640 fi
17641
17642
17643
17644
17645
17646 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
17647
17648 # Include some libraries that Tcl and Tk want.
17649 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17650 # Yes, the ordering seems wrong here. But it isn't.
17651 # TK_LIBS is the list of libraries that need to be linked
17652 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17653 # were in LIBS then any link tests after this point would
17654 # try to include things like `$(LIBGUI)', which wouldn't work.
17655 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
17656
17657 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17658 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17659 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17660 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17661 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17662 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17663 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
17664
17665 if test x"$gdb_cv_os_cygwin" = xyes; then
17666 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17667 WIN32LDAPP="-Wl,--subsystem,console"
17668 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
17669 fi
17670
17671 subdirs="$subdirs gdbtk"
17672
17673 fi
17674 fi
17675
17676
17677
17678
17679
17680
17681
17682
17683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17684 $as_echo_n "checking for X... " >&6; }
17685
17686
17687 # Check whether --with-x was given.
17688 if test "${with_x+set}" = set; then :
17689 withval=$with_x;
17690 fi
17691
17692 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17693 if test "x$with_x" = xno; then
17694 # The user explicitly disabled X.
17695 have_x=disabled
17696 else
17697 case $x_includes,$x_libraries in #(
17698 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17699 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
17700 $as_echo_n "(cached) " >&6
17701 else
17702 # One or both of the vars are not set, and there is no cached value.
17703 ac_x_includes=no ac_x_libraries=no
17704 rm -f -r conftest.dir
17705 if mkdir conftest.dir; then
17706 cd conftest.dir
17707 cat >Imakefile <<'_ACEOF'
17708 incroot:
17709 @echo incroot='${INCROOT}'
17710 usrlibdir:
17711 @echo usrlibdir='${USRLIBDIR}'
17712 libdir:
17713 @echo libdir='${LIBDIR}'
17714 _ACEOF
17715 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17716 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
17717 for ac_var in incroot usrlibdir libdir; do
17718 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17719 done
17720 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17721 for ac_extension in a so sl dylib la dll; do
17722 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17723 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17724 ac_im_usrlibdir=$ac_im_libdir; break
17725 fi
17726 done
17727 # Screen out bogus values from the imake configuration. They are
17728 # bogus both because they are the default anyway, and because
17729 # using them would break gcc on systems where it needs fixed includes.
17730 case $ac_im_incroot in
17731 /usr/include) ac_x_includes= ;;
17732 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17733 esac
17734 case $ac_im_usrlibdir in
17735 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17736 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17737 esac
17738 fi
17739 cd ..
17740 rm -f -r conftest.dir
17741 fi
17742
17743 # Standard set of common directories for X headers.
17744 # Check X11 before X11Rn because it is often a symlink to the current release.
17745 ac_x_header_dirs='
17746 /usr/X11/include
17747 /usr/X11R7/include
17748 /usr/X11R6/include
17749 /usr/X11R5/include
17750 /usr/X11R4/include
17751
17752 /usr/include/X11
17753 /usr/include/X11R7
17754 /usr/include/X11R6
17755 /usr/include/X11R5
17756 /usr/include/X11R4
17757
17758 /usr/local/X11/include
17759 /usr/local/X11R7/include
17760 /usr/local/X11R6/include
17761 /usr/local/X11R5/include
17762 /usr/local/X11R4/include
17763
17764 /usr/local/include/X11
17765 /usr/local/include/X11R7
17766 /usr/local/include/X11R6
17767 /usr/local/include/X11R5
17768 /usr/local/include/X11R4
17769
17770 /usr/X386/include
17771 /usr/x386/include
17772 /usr/XFree86/include/X11
17773
17774 /usr/include
17775 /usr/local/include
17776 /usr/unsupported/include
17777 /usr/athena/include
17778 /usr/local/x11r5/include
17779 /usr/lpp/Xamples/include
17780
17781 /usr/openwin/include
17782 /usr/openwin/share/include'
17783
17784 if test "$ac_x_includes" = no; then
17785 # Guess where to find include files, by looking for Xlib.h.
17786 # First, try using that file with no special directory specified.
17787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17788 /* end confdefs.h. */
17789 #include <X11/Xlib.h>
17790 _ACEOF
17791 if ac_fn_c_try_cpp "$LINENO"; then :
17792 # We can compile using X headers with no special include directory.
17793 ac_x_includes=
17794 else
17795 for ac_dir in $ac_x_header_dirs; do
17796 if test -r "$ac_dir/X11/Xlib.h"; then
17797 ac_x_includes=$ac_dir
17798 break
17799 fi
17800 done
17801 fi
17802 rm -f conftest.err conftest.i conftest.$ac_ext
17803 fi # $ac_x_includes = no
17804
17805 if test "$ac_x_libraries" = no; then
17806 # Check for the libraries.
17807 # See if we find them without any special options.
17808 # Don't add to $LIBS permanently.
17809 ac_save_LIBS=$LIBS
17810 LIBS="-lX11 $LIBS"
17811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17812 /* end confdefs.h. */
17813 #include <X11/Xlib.h>
17814 int
17815 main ()
17816 {
17817 XrmInitialize ()
17818 ;
17819 return 0;
17820 }
17821 _ACEOF
17822 if ac_fn_c_try_link "$LINENO"; then :
17823 LIBS=$ac_save_LIBS
17824 # We can link X programs with no special library path.
17825 ac_x_libraries=
17826 else
17827 LIBS=$ac_save_LIBS
17828 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17829 do
17830 # Don't even attempt the hair of trying to link an X program!
17831 for ac_extension in a so sl dylib la dll; do
17832 if test -r "$ac_dir/libX11.$ac_extension"; then
17833 ac_x_libraries=$ac_dir
17834 break 2
17835 fi
17836 done
17837 done
17838 fi
17839 rm -f core conftest.err conftest.$ac_objext \
17840 conftest$ac_exeext conftest.$ac_ext
17841 fi # $ac_x_libraries = no
17842
17843 case $ac_x_includes,$ac_x_libraries in #(
17844 no,* | *,no | *\'*)
17845 # Didn't find X, or a directory has "'" in its name.
17846 ac_cv_have_x="have_x=no";; #(
17847 *)
17848 # Record where we found X for the cache.
17849 ac_cv_have_x="have_x=yes\
17850 ac_x_includes='$ac_x_includes'\
17851 ac_x_libraries='$ac_x_libraries'"
17852 esac
17853 fi
17854 ;; #(
17855 *) have_x=yes;;
17856 esac
17857 eval "$ac_cv_have_x"
17858 fi # $with_x != no
17859
17860 if test "$have_x" != yes; then
17861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17862 $as_echo "$have_x" >&6; }
17863 no_x=yes
17864 else
17865 # If each of the values was on the command line, it overrides each guess.
17866 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17867 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17868 # Update the cache value to reflect the command line values.
17869 ac_cv_have_x="have_x=yes\
17870 ac_x_includes='$x_includes'\
17871 ac_x_libraries='$x_libraries'"
17872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17873 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17874 fi
17875
17876
17877 # Unlike the sim directory, whether a simulator is linked is controlled by
17878 # presence of a gdb_sim definition in the target configure.tgt entry.
17879 # This code just checks for a few cases where we'd like to ignore those
17880 # definitions, even when they're present in the '.mt' file. These cases
17881 # are when --disable-sim is specified, or if the simulator directory is
17882 # not part of the source tree.
17883 #
17884 # Check whether --enable-sim was given.
17885 if test "${enable_sim+set}" = set; then :
17886 enableval=$enable_sim; echo "enable_sim = $enable_sim";
17887 echo "enableval = ${enableval}";
17888 case "${enableval}" in
17889 yes) ignore_sim=false ;;
17890 no) ignore_sim=true ;;
17891 *) ignore_sim=false ;;
17892 esac
17893 else
17894 ignore_sim=false
17895 fi
17896
17897
17898 if test ! -d "${srcdir}/../sim"; then
17899 ignore_sim=true
17900 fi
17901
17902 SIM=
17903 SIM_OBS=
17904 if test "${ignore_sim}" = "false"; then
17905 if test x"${gdb_sim}" != x ; then
17906 SIM="${gdb_sim}"
17907 SIM_OBS="remote-sim.o"
17908
17909 $as_echo "#define WITH_SIM 1" >>confdefs.h
17910
17911
17912 # Some tdep code should only be compiled in when the ppc sim is
17913 # built. PR sim/13418.
17914 case $target in
17915 powerpc*-*-*)
17916
17917 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17918
17919 ;;
17920 esac
17921 fi
17922 fi
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937 # List of host floatformats.
17938
17939 cat >>confdefs.h <<_ACEOF
17940 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17941 _ACEOF
17942
17943
17944 cat >>confdefs.h <<_ACEOF
17945 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17946 _ACEOF
17947
17948
17949 cat >>confdefs.h <<_ACEOF
17950 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17951 _ACEOF
17952
17953
17954 # target_subdir is used by the testsuite to find the target libraries.
17955 target_subdir=
17956 if test "${host}" != "${target}"; then
17957 target_subdir="${target_alias}/"
17958 fi
17959
17960
17961 # Import nat definitions.
17962 nat_makefile_frag=/dev/null
17963 if test "${gdb_native}" = "yes"; then
17964 . ${srcdir}/configure.nat
17965 nativefile=$NAT_FILE
17966 fi
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978 if test x"${gdb_osabi}" != x ; then
17979
17980 cat >>confdefs.h <<_ACEOF
17981 #define GDB_OSABI_DEFAULT $gdb_osabi
17982 _ACEOF
17983
17984 fi
17985
17986 # Check for babeltrace and babeltrace-ctf
17987
17988 # Check whether --with-babeltrace was given.
17989 if test "${with_babeltrace+set}" = set; then :
17990 withval=$with_babeltrace;
17991 else
17992 with_babeltrace=auto
17993 fi
17994
17995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17996 $as_echo_n "checking whether to use babeltrace... " >&6; }
17997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17998 $as_echo "$with_babeltrace" >&6; }
17999
18000 if test "x$with_babeltrace" = "xno"; then
18001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18002 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18003 else
18004 # Append -Werror to CFLAGS so that configure can catch the warning
18005 # "assignment from incompatible pointer type", which is related to
18006 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18007 # in GDB, while babeltrace 1.0.3 is broken.
18008 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18009 # safe to save and restore CFLAGS here.
18010 saved_CFLAGS=$CFLAGS
18011 CFLAGS="$CFLAGS -Werror"
18012
18013
18014
18015
18016
18017
18018
18019
18020 use_additional=yes
18021
18022 acl_save_prefix="$prefix"
18023 prefix="$acl_final_prefix"
18024 acl_save_exec_prefix="$exec_prefix"
18025 exec_prefix="$acl_final_exec_prefix"
18026
18027 eval additional_includedir=\"$includedir\"
18028 eval additional_libdir=\"$libdir\"
18029
18030 exec_prefix="$acl_save_exec_prefix"
18031 prefix="$acl_save_prefix"
18032
18033
18034 # Check whether --with-libbabeltrace-prefix was given.
18035 if test "${with_libbabeltrace_prefix+set}" = set; then :
18036 withval=$with_libbabeltrace_prefix;
18037 if test "X$withval" = "Xno"; then
18038 use_additional=no
18039 else
18040 if test "X$withval" = "X"; then
18041
18042 acl_save_prefix="$prefix"
18043 prefix="$acl_final_prefix"
18044 acl_save_exec_prefix="$exec_prefix"
18045 exec_prefix="$acl_final_exec_prefix"
18046
18047 eval additional_includedir=\"$includedir\"
18048 eval additional_libdir=\"$libdir\"
18049
18050 exec_prefix="$acl_save_exec_prefix"
18051 prefix="$acl_save_prefix"
18052
18053 else
18054 additional_includedir="$withval/include"
18055 additional_libdir="$withval/lib"
18056 fi
18057 fi
18058
18059 fi
18060
18061
18062 # Check whether --with-libbabeltrace-type was given.
18063 if test "${with_libbabeltrace_type+set}" = set; then :
18064 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18065 else
18066 with_libbabeltrace_type=auto
18067 fi
18068
18069 lib_type=`eval echo \$with_libbabeltrace_type`
18070
18071 LIBBABELTRACE=
18072 LTLIBBABELTRACE=
18073 INCBABELTRACE=
18074 rpathdirs=
18075 ltrpathdirs=
18076 names_already_handled=
18077 names_next_round='babeltrace babeltrace-ctf'
18078 while test -n "$names_next_round"; do
18079 names_this_round="$names_next_round"
18080 names_next_round=
18081 for name in $names_this_round; do
18082 already_handled=
18083 for n in $names_already_handled; do
18084 if test "$n" = "$name"; then
18085 already_handled=yes
18086 break
18087 fi
18088 done
18089 if test -z "$already_handled"; then
18090 names_already_handled="$names_already_handled $name"
18091 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18092 eval value=\"\$HAVE_LIB$uppername\"
18093 if test -n "$value"; then
18094 if test "$value" = yes; then
18095 eval value=\"\$LIB$uppername\"
18096 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18097 eval value=\"\$LTLIB$uppername\"
18098 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18099 else
18100 :
18101 fi
18102 else
18103 found_dir=
18104 found_la=
18105 found_so=
18106 found_a=
18107 if test $use_additional = yes; then
18108 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18109 found_dir="$additional_libdir"
18110 found_so="$additional_libdir/lib$name.$shlibext"
18111 if test -f "$additional_libdir/lib$name.la"; then
18112 found_la="$additional_libdir/lib$name.la"
18113 fi
18114 elif test x$lib_type != xshared; then
18115 if test -f "$additional_libdir/lib$name.$libext"; then
18116 found_dir="$additional_libdir"
18117 found_a="$additional_libdir/lib$name.$libext"
18118 if test -f "$additional_libdir/lib$name.la"; then
18119 found_la="$additional_libdir/lib$name.la"
18120 fi
18121 fi
18122 fi
18123 fi
18124 if test "X$found_dir" = "X"; then
18125 for x in $LDFLAGS $LTLIBBABELTRACE; do
18126
18127 acl_save_prefix="$prefix"
18128 prefix="$acl_final_prefix"
18129 acl_save_exec_prefix="$exec_prefix"
18130 exec_prefix="$acl_final_exec_prefix"
18131 eval x=\"$x\"
18132 exec_prefix="$acl_save_exec_prefix"
18133 prefix="$acl_save_prefix"
18134
18135 case "$x" in
18136 -L*)
18137 dir=`echo "X$x" | sed -e 's/^X-L//'`
18138 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18139 found_dir="$dir"
18140 found_so="$dir/lib$name.$shlibext"
18141 if test -f "$dir/lib$name.la"; then
18142 found_la="$dir/lib$name.la"
18143 fi
18144 elif test x$lib_type != xshared; then
18145 if test -f "$dir/lib$name.$libext"; then
18146 found_dir="$dir"
18147 found_a="$dir/lib$name.$libext"
18148 if test -f "$dir/lib$name.la"; then
18149 found_la="$dir/lib$name.la"
18150 fi
18151 fi
18152 fi
18153 ;;
18154 esac
18155 if test "X$found_dir" != "X"; then
18156 break
18157 fi
18158 done
18159 fi
18160 if test "X$found_dir" != "X"; then
18161 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18162 if test "X$found_so" != "X"; then
18163 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18164 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18165 else
18166 haveit=
18167 for x in $ltrpathdirs; do
18168 if test "X$x" = "X$found_dir"; then
18169 haveit=yes
18170 break
18171 fi
18172 done
18173 if test -z "$haveit"; then
18174 ltrpathdirs="$ltrpathdirs $found_dir"
18175 fi
18176 if test "$hardcode_direct" = yes; then
18177 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18178 else
18179 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18180 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18181 haveit=
18182 for x in $rpathdirs; do
18183 if test "X$x" = "X$found_dir"; then
18184 haveit=yes
18185 break
18186 fi
18187 done
18188 if test -z "$haveit"; then
18189 rpathdirs="$rpathdirs $found_dir"
18190 fi
18191 else
18192 haveit=
18193 for x in $LDFLAGS $LIBBABELTRACE; do
18194
18195 acl_save_prefix="$prefix"
18196 prefix="$acl_final_prefix"
18197 acl_save_exec_prefix="$exec_prefix"
18198 exec_prefix="$acl_final_exec_prefix"
18199 eval x=\"$x\"
18200 exec_prefix="$acl_save_exec_prefix"
18201 prefix="$acl_save_prefix"
18202
18203 if test "X$x" = "X-L$found_dir"; then
18204 haveit=yes
18205 break
18206 fi
18207 done
18208 if test -z "$haveit"; then
18209 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18210 fi
18211 if test "$hardcode_minus_L" != no; then
18212 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18213 else
18214 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18215 fi
18216 fi
18217 fi
18218 fi
18219 else
18220 if test "X$found_a" != "X"; then
18221 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18222 else
18223 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18224 fi
18225 fi
18226 additional_includedir=
18227 case "$found_dir" in
18228 */lib | */lib/)
18229 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18230 additional_includedir="$basedir/include"
18231 ;;
18232 esac
18233 if test "X$additional_includedir" != "X"; then
18234 if test "X$additional_includedir" != "X/usr/include"; then
18235 haveit=
18236 if test "X$additional_includedir" = "X/usr/local/include"; then
18237 if test -n "$GCC"; then
18238 case $host_os in
18239 linux*) haveit=yes;;
18240 esac
18241 fi
18242 fi
18243 if test -z "$haveit"; then
18244 for x in $CPPFLAGS $INCBABELTRACE; do
18245
18246 acl_save_prefix="$prefix"
18247 prefix="$acl_final_prefix"
18248 acl_save_exec_prefix="$exec_prefix"
18249 exec_prefix="$acl_final_exec_prefix"
18250 eval x=\"$x\"
18251 exec_prefix="$acl_save_exec_prefix"
18252 prefix="$acl_save_prefix"
18253
18254 if test "X$x" = "X-I$additional_includedir"; then
18255 haveit=yes
18256 break
18257 fi
18258 done
18259 if test -z "$haveit"; then
18260 if test -d "$additional_includedir"; then
18261 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18262 fi
18263 fi
18264 fi
18265 fi
18266 fi
18267 if test -n "$found_la"; then
18268 save_libdir="$libdir"
18269 case "$found_la" in
18270 */* | *\\*) . "$found_la" ;;
18271 *) . "./$found_la" ;;
18272 esac
18273 libdir="$save_libdir"
18274 for dep in $dependency_libs; do
18275 case "$dep" in
18276 -L*)
18277 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18278 if test "X$additional_libdir" != "X/usr/lib"; then
18279 haveit=
18280 if test "X$additional_libdir" = "X/usr/local/lib"; then
18281 if test -n "$GCC"; then
18282 case $host_os in
18283 linux*) haveit=yes;;
18284 esac
18285 fi
18286 fi
18287 if test -z "$haveit"; then
18288 haveit=
18289 for x in $LDFLAGS $LIBBABELTRACE; do
18290
18291 acl_save_prefix="$prefix"
18292 prefix="$acl_final_prefix"
18293 acl_save_exec_prefix="$exec_prefix"
18294 exec_prefix="$acl_final_exec_prefix"
18295 eval x=\"$x\"
18296 exec_prefix="$acl_save_exec_prefix"
18297 prefix="$acl_save_prefix"
18298
18299 if test "X$x" = "X-L$additional_libdir"; then
18300 haveit=yes
18301 break
18302 fi
18303 done
18304 if test -z "$haveit"; then
18305 if test -d "$additional_libdir"; then
18306 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18307 fi
18308 fi
18309 haveit=
18310 for x in $LDFLAGS $LTLIBBABELTRACE; do
18311
18312 acl_save_prefix="$prefix"
18313 prefix="$acl_final_prefix"
18314 acl_save_exec_prefix="$exec_prefix"
18315 exec_prefix="$acl_final_exec_prefix"
18316 eval x=\"$x\"
18317 exec_prefix="$acl_save_exec_prefix"
18318 prefix="$acl_save_prefix"
18319
18320 if test "X$x" = "X-L$additional_libdir"; then
18321 haveit=yes
18322 break
18323 fi
18324 done
18325 if test -z "$haveit"; then
18326 if test -d "$additional_libdir"; then
18327 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18328 fi
18329 fi
18330 fi
18331 fi
18332 ;;
18333 -R*)
18334 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18335 if test "$enable_rpath" != no; then
18336 haveit=
18337 for x in $rpathdirs; do
18338 if test "X$x" = "X$dir"; then
18339 haveit=yes
18340 break
18341 fi
18342 done
18343 if test -z "$haveit"; then
18344 rpathdirs="$rpathdirs $dir"
18345 fi
18346 haveit=
18347 for x in $ltrpathdirs; do
18348 if test "X$x" = "X$dir"; then
18349 haveit=yes
18350 break
18351 fi
18352 done
18353 if test -z "$haveit"; then
18354 ltrpathdirs="$ltrpathdirs $dir"
18355 fi
18356 fi
18357 ;;
18358 -l*)
18359 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18360 ;;
18361 *.la)
18362 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18363 ;;
18364 *)
18365 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18366 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18367 ;;
18368 esac
18369 done
18370 fi
18371 else
18372 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18373 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18374 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18375 else
18376 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18377 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18378 fi
18379 fi
18380 fi
18381 fi
18382 done
18383 done
18384 if test "X$rpathdirs" != "X"; then
18385 if test -n "$hardcode_libdir_separator"; then
18386 alldirs=
18387 for found_dir in $rpathdirs; do
18388 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18389 done
18390 acl_save_libdir="$libdir"
18391 libdir="$alldirs"
18392 eval flag=\"$hardcode_libdir_flag_spec\"
18393 libdir="$acl_save_libdir"
18394 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18395 else
18396 for found_dir in $rpathdirs; do
18397 acl_save_libdir="$libdir"
18398 libdir="$found_dir"
18399 eval flag=\"$hardcode_libdir_flag_spec\"
18400 libdir="$acl_save_libdir"
18401 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18402 done
18403 fi
18404 fi
18405 if test "X$ltrpathdirs" != "X"; then
18406 for found_dir in $ltrpathdirs; do
18407 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18408 done
18409 fi
18410
18411
18412 ac_save_CPPFLAGS="$CPPFLAGS"
18413
18414 for element in $INCBABELTRACE; do
18415 haveit=
18416 for x in $CPPFLAGS; do
18417
18418 acl_save_prefix="$prefix"
18419 prefix="$acl_final_prefix"
18420 acl_save_exec_prefix="$exec_prefix"
18421 exec_prefix="$acl_final_exec_prefix"
18422 eval x=\"$x\"
18423 exec_prefix="$acl_save_exec_prefix"
18424 prefix="$acl_save_prefix"
18425
18426 if test "X$x" = "X$element"; then
18427 haveit=yes
18428 break
18429 fi
18430 done
18431 if test -z "$haveit"; then
18432 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18433 fi
18434 done
18435
18436
18437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18438 $as_echo_n "checking for libbabeltrace... " >&6; }
18439 if ${ac_cv_libbabeltrace+:} false; then :
18440 $as_echo_n "(cached) " >&6
18441 else
18442
18443 ac_save_LIBS="$LIBS"
18444 LIBS="$LIBS $LIBBABELTRACE"
18445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18446 /* end confdefs.h. */
18447 #include <babeltrace/babeltrace.h>
18448 #include <babeltrace/ctf/events.h>
18449 #include <babeltrace/ctf/iterator.h>
18450 int
18451 main ()
18452 {
18453 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18454 struct bt_ctf_event *event = NULL;
18455 const struct bt_definition *scope;
18456
18457 pos->type = BT_SEEK_BEGIN;
18458 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
18459 scope = bt_ctf_get_top_level_scope (event,
18460 BT_STREAM_EVENT_HEADER);
18461 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18462
18463 ;
18464 return 0;
18465 }
18466 _ACEOF
18467 if ac_fn_c_try_link "$LINENO"; then :
18468 ac_cv_libbabeltrace=yes
18469 else
18470 ac_cv_libbabeltrace=no
18471 fi
18472 rm -f core conftest.err conftest.$ac_objext \
18473 conftest$ac_exeext conftest.$ac_ext
18474 LIBS="$ac_save_LIBS"
18475
18476 fi
18477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18478 $as_echo "$ac_cv_libbabeltrace" >&6; }
18479 if test "$ac_cv_libbabeltrace" = yes; then
18480 HAVE_LIBBABELTRACE=yes
18481
18482 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18483
18484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18485 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18487 $as_echo "$LIBBABELTRACE" >&6; }
18488 else
18489 HAVE_LIBBABELTRACE=no
18490 CPPFLAGS="$ac_save_CPPFLAGS"
18491 LIBBABELTRACE=
18492 LTLIBBABELTRACE=
18493 fi
18494
18495
18496
18497
18498
18499
18500 CFLAGS=$saved_CFLAGS
18501
18502 if test "$HAVE_LIBBABELTRACE" != yes; then
18503 if test "$with_babeltrace" = yes; then
18504 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
18505 else
18506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18507 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18508 fi
18509 fi
18510 fi
18511
18512 # Check for xxhash
18513
18514 # Check whether --with-xxhash was given.
18515 if test "${with_xxhash+set}" = set; then :
18516 withval=$with_xxhash;
18517 else
18518 with_xxhash=auto
18519 fi
18520
18521
18522 if test "x$with_xxhash" != "xno"; then
18523
18524
18525
18526
18527
18528
18529
18530
18531 use_additional=yes
18532
18533 acl_save_prefix="$prefix"
18534 prefix="$acl_final_prefix"
18535 acl_save_exec_prefix="$exec_prefix"
18536 exec_prefix="$acl_final_exec_prefix"
18537
18538 eval additional_includedir=\"$includedir\"
18539 eval additional_libdir=\"$libdir\"
18540
18541 exec_prefix="$acl_save_exec_prefix"
18542 prefix="$acl_save_prefix"
18543
18544
18545 # Check whether --with-libxxhash-prefix was given.
18546 if test "${with_libxxhash_prefix+set}" = set; then :
18547 withval=$with_libxxhash_prefix;
18548 if test "X$withval" = "Xno"; then
18549 use_additional=no
18550 else
18551 if test "X$withval" = "X"; then
18552
18553 acl_save_prefix="$prefix"
18554 prefix="$acl_final_prefix"
18555 acl_save_exec_prefix="$exec_prefix"
18556 exec_prefix="$acl_final_exec_prefix"
18557
18558 eval additional_includedir=\"$includedir\"
18559 eval additional_libdir=\"$libdir\"
18560
18561 exec_prefix="$acl_save_exec_prefix"
18562 prefix="$acl_save_prefix"
18563
18564 else
18565 additional_includedir="$withval/include"
18566 additional_libdir="$withval/lib"
18567 fi
18568 fi
18569
18570 fi
18571
18572
18573 # Check whether --with-libxxhash-type was given.
18574 if test "${with_libxxhash_type+set}" = set; then :
18575 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18576 else
18577 with_libxxhash_type=auto
18578 fi
18579
18580 lib_type=`eval echo \$with_libxxhash_type`
18581
18582 LIBXXHASH=
18583 LTLIBXXHASH=
18584 INCXXHASH=
18585 rpathdirs=
18586 ltrpathdirs=
18587 names_already_handled=
18588 names_next_round='xxhash '
18589 while test -n "$names_next_round"; do
18590 names_this_round="$names_next_round"
18591 names_next_round=
18592 for name in $names_this_round; do
18593 already_handled=
18594 for n in $names_already_handled; do
18595 if test "$n" = "$name"; then
18596 already_handled=yes
18597 break
18598 fi
18599 done
18600 if test -z "$already_handled"; then
18601 names_already_handled="$names_already_handled $name"
18602 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18603 eval value=\"\$HAVE_LIB$uppername\"
18604 if test -n "$value"; then
18605 if test "$value" = yes; then
18606 eval value=\"\$LIB$uppername\"
18607 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18608 eval value=\"\$LTLIB$uppername\"
18609 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18610 else
18611 :
18612 fi
18613 else
18614 found_dir=
18615 found_la=
18616 found_so=
18617 found_a=
18618 if test $use_additional = yes; then
18619 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18620 found_dir="$additional_libdir"
18621 found_so="$additional_libdir/lib$name.$shlibext"
18622 if test -f "$additional_libdir/lib$name.la"; then
18623 found_la="$additional_libdir/lib$name.la"
18624 fi
18625 elif test x$lib_type != xshared; then
18626 if test -f "$additional_libdir/lib$name.$libext"; then
18627 found_dir="$additional_libdir"
18628 found_a="$additional_libdir/lib$name.$libext"
18629 if test -f "$additional_libdir/lib$name.la"; then
18630 found_la="$additional_libdir/lib$name.la"
18631 fi
18632 fi
18633 fi
18634 fi
18635 if test "X$found_dir" = "X"; then
18636 for x in $LDFLAGS $LTLIBXXHASH; do
18637
18638 acl_save_prefix="$prefix"
18639 prefix="$acl_final_prefix"
18640 acl_save_exec_prefix="$exec_prefix"
18641 exec_prefix="$acl_final_exec_prefix"
18642 eval x=\"$x\"
18643 exec_prefix="$acl_save_exec_prefix"
18644 prefix="$acl_save_prefix"
18645
18646 case "$x" in
18647 -L*)
18648 dir=`echo "X$x" | sed -e 's/^X-L//'`
18649 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18650 found_dir="$dir"
18651 found_so="$dir/lib$name.$shlibext"
18652 if test -f "$dir/lib$name.la"; then
18653 found_la="$dir/lib$name.la"
18654 fi
18655 elif test x$lib_type != xshared; then
18656 if test -f "$dir/lib$name.$libext"; then
18657 found_dir="$dir"
18658 found_a="$dir/lib$name.$libext"
18659 if test -f "$dir/lib$name.la"; then
18660 found_la="$dir/lib$name.la"
18661 fi
18662 fi
18663 fi
18664 ;;
18665 esac
18666 if test "X$found_dir" != "X"; then
18667 break
18668 fi
18669 done
18670 fi
18671 if test "X$found_dir" != "X"; then
18672 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18673 if test "X$found_so" != "X"; then
18674 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18675 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18676 else
18677 haveit=
18678 for x in $ltrpathdirs; do
18679 if test "X$x" = "X$found_dir"; then
18680 haveit=yes
18681 break
18682 fi
18683 done
18684 if test -z "$haveit"; then
18685 ltrpathdirs="$ltrpathdirs $found_dir"
18686 fi
18687 if test "$hardcode_direct" = yes; then
18688 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18689 else
18690 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18691 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18692 haveit=
18693 for x in $rpathdirs; do
18694 if test "X$x" = "X$found_dir"; then
18695 haveit=yes
18696 break
18697 fi
18698 done
18699 if test -z "$haveit"; then
18700 rpathdirs="$rpathdirs $found_dir"
18701 fi
18702 else
18703 haveit=
18704 for x in $LDFLAGS $LIBXXHASH; do
18705
18706 acl_save_prefix="$prefix"
18707 prefix="$acl_final_prefix"
18708 acl_save_exec_prefix="$exec_prefix"
18709 exec_prefix="$acl_final_exec_prefix"
18710 eval x=\"$x\"
18711 exec_prefix="$acl_save_exec_prefix"
18712 prefix="$acl_save_prefix"
18713
18714 if test "X$x" = "X-L$found_dir"; then
18715 haveit=yes
18716 break
18717 fi
18718 done
18719 if test -z "$haveit"; then
18720 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18721 fi
18722 if test "$hardcode_minus_L" != no; then
18723 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18724 else
18725 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18726 fi
18727 fi
18728 fi
18729 fi
18730 else
18731 if test "X$found_a" != "X"; then
18732 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18733 else
18734 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18735 fi
18736 fi
18737 additional_includedir=
18738 case "$found_dir" in
18739 */lib | */lib/)
18740 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18741 additional_includedir="$basedir/include"
18742 ;;
18743 esac
18744 if test "X$additional_includedir" != "X"; then
18745 if test "X$additional_includedir" != "X/usr/include"; then
18746 haveit=
18747 if test "X$additional_includedir" = "X/usr/local/include"; then
18748 if test -n "$GCC"; then
18749 case $host_os in
18750 linux*) haveit=yes;;
18751 esac
18752 fi
18753 fi
18754 if test -z "$haveit"; then
18755 for x in $CPPFLAGS $INCXXHASH; do
18756
18757 acl_save_prefix="$prefix"
18758 prefix="$acl_final_prefix"
18759 acl_save_exec_prefix="$exec_prefix"
18760 exec_prefix="$acl_final_exec_prefix"
18761 eval x=\"$x\"
18762 exec_prefix="$acl_save_exec_prefix"
18763 prefix="$acl_save_prefix"
18764
18765 if test "X$x" = "X-I$additional_includedir"; then
18766 haveit=yes
18767 break
18768 fi
18769 done
18770 if test -z "$haveit"; then
18771 if test -d "$additional_includedir"; then
18772 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18773 fi
18774 fi
18775 fi
18776 fi
18777 fi
18778 if test -n "$found_la"; then
18779 save_libdir="$libdir"
18780 case "$found_la" in
18781 */* | *\\*) . "$found_la" ;;
18782 *) . "./$found_la" ;;
18783 esac
18784 libdir="$save_libdir"
18785 for dep in $dependency_libs; do
18786 case "$dep" in
18787 -L*)
18788 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18789 if test "X$additional_libdir" != "X/usr/lib"; then
18790 haveit=
18791 if test "X$additional_libdir" = "X/usr/local/lib"; then
18792 if test -n "$GCC"; then
18793 case $host_os in
18794 linux*) haveit=yes;;
18795 esac
18796 fi
18797 fi
18798 if test -z "$haveit"; then
18799 haveit=
18800 for x in $LDFLAGS $LIBXXHASH; do
18801
18802 acl_save_prefix="$prefix"
18803 prefix="$acl_final_prefix"
18804 acl_save_exec_prefix="$exec_prefix"
18805 exec_prefix="$acl_final_exec_prefix"
18806 eval x=\"$x\"
18807 exec_prefix="$acl_save_exec_prefix"
18808 prefix="$acl_save_prefix"
18809
18810 if test "X$x" = "X-L$additional_libdir"; then
18811 haveit=yes
18812 break
18813 fi
18814 done
18815 if test -z "$haveit"; then
18816 if test -d "$additional_libdir"; then
18817 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18818 fi
18819 fi
18820 haveit=
18821 for x in $LDFLAGS $LTLIBXXHASH; do
18822
18823 acl_save_prefix="$prefix"
18824 prefix="$acl_final_prefix"
18825 acl_save_exec_prefix="$exec_prefix"
18826 exec_prefix="$acl_final_exec_prefix"
18827 eval x=\"$x\"
18828 exec_prefix="$acl_save_exec_prefix"
18829 prefix="$acl_save_prefix"
18830
18831 if test "X$x" = "X-L$additional_libdir"; then
18832 haveit=yes
18833 break
18834 fi
18835 done
18836 if test -z "$haveit"; then
18837 if test -d "$additional_libdir"; then
18838 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18839 fi
18840 fi
18841 fi
18842 fi
18843 ;;
18844 -R*)
18845 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18846 if test "$enable_rpath" != no; then
18847 haveit=
18848 for x in $rpathdirs; do
18849 if test "X$x" = "X$dir"; then
18850 haveit=yes
18851 break
18852 fi
18853 done
18854 if test -z "$haveit"; then
18855 rpathdirs="$rpathdirs $dir"
18856 fi
18857 haveit=
18858 for x in $ltrpathdirs; do
18859 if test "X$x" = "X$dir"; then
18860 haveit=yes
18861 break
18862 fi
18863 done
18864 if test -z "$haveit"; then
18865 ltrpathdirs="$ltrpathdirs $dir"
18866 fi
18867 fi
18868 ;;
18869 -l*)
18870 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18871 ;;
18872 *.la)
18873 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18874 ;;
18875 *)
18876 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18877 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18878 ;;
18879 esac
18880 done
18881 fi
18882 else
18883 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18884 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18885 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18886 else
18887 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
18888 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
18889 fi
18890 fi
18891 fi
18892 fi
18893 done
18894 done
18895 if test "X$rpathdirs" != "X"; then
18896 if test -n "$hardcode_libdir_separator"; then
18897 alldirs=
18898 for found_dir in $rpathdirs; do
18899 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18900 done
18901 acl_save_libdir="$libdir"
18902 libdir="$alldirs"
18903 eval flag=\"$hardcode_libdir_flag_spec\"
18904 libdir="$acl_save_libdir"
18905 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18906 else
18907 for found_dir in $rpathdirs; do
18908 acl_save_libdir="$libdir"
18909 libdir="$found_dir"
18910 eval flag=\"$hardcode_libdir_flag_spec\"
18911 libdir="$acl_save_libdir"
18912 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18913 done
18914 fi
18915 fi
18916 if test "X$ltrpathdirs" != "X"; then
18917 for found_dir in $ltrpathdirs; do
18918 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
18919 done
18920 fi
18921
18922
18923 ac_save_CPPFLAGS="$CPPFLAGS"
18924
18925 for element in $INCXXHASH; do
18926 haveit=
18927 for x in $CPPFLAGS; do
18928
18929 acl_save_prefix="$prefix"
18930 prefix="$acl_final_prefix"
18931 acl_save_exec_prefix="$exec_prefix"
18932 exec_prefix="$acl_final_exec_prefix"
18933 eval x=\"$x\"
18934 exec_prefix="$acl_save_exec_prefix"
18935 prefix="$acl_save_prefix"
18936
18937 if test "X$x" = "X$element"; then
18938 haveit=yes
18939 break
18940 fi
18941 done
18942 if test -z "$haveit"; then
18943 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18944 fi
18945 done
18946
18947
18948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
18949 $as_echo_n "checking for libxxhash... " >&6; }
18950 if ${ac_cv_libxxhash+:} false; then :
18951 $as_echo_n "(cached) " >&6
18952 else
18953
18954 ac_save_LIBS="$LIBS"
18955 LIBS="$LIBS $LIBXXHASH"
18956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18957 /* end confdefs.h. */
18958 #include <xxhash.h>
18959 int
18960 main ()
18961 {
18962 XXH32("foo", 3, 0);
18963
18964 ;
18965 return 0;
18966 }
18967 _ACEOF
18968 if ac_fn_c_try_link "$LINENO"; then :
18969 ac_cv_libxxhash=yes
18970 else
18971 ac_cv_libxxhash=no
18972 fi
18973 rm -f core conftest.err conftest.$ac_objext \
18974 conftest$ac_exeext conftest.$ac_ext
18975 LIBS="$ac_save_LIBS"
18976
18977 fi
18978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18979 $as_echo "$ac_cv_libxxhash" >&6; }
18980 if test "$ac_cv_libxxhash" = yes; then
18981 HAVE_LIBXXHASH=yes
18982
18983 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18984
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18986 $as_echo_n "checking how to link with libxxhash... " >&6; }
18987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18988 $as_echo "$LIBXXHASH" >&6; }
18989 else
18990 HAVE_LIBXXHASH=no
18991 CPPFLAGS="$ac_save_CPPFLAGS"
18992 LIBXXHASH=
18993 LTLIBXXHASH=
18994 fi
18995
18996
18997
18998
18999
19000
19001 if test "$HAVE_LIBXXHASH" != yes; then
19002 if test "$with_xxhash" = yes; then
19003 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19004 fi
19005 fi
19006 if test "x$with_xxhash" = "xauto"; then
19007 with_xxhash="$HAVE_LIBXXHASH"
19008 fi
19009 fi
19010
19011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19012 $as_echo_n "checking whether to use xxhash... " >&6; }
19013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19014 $as_echo "$with_xxhash" >&6; }
19015
19016 NM_H=
19017 rm -f nm.h
19018 if test "${nativefile}" != ""; then
19019 case "${nativefile}" in
19020 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19021 * ) GDB_NM_FILE="${nativefile}"
19022 esac
19023 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19024
19025
19026 cat >>confdefs.h <<_ACEOF
19027 #define GDB_NM_FILE "${GDB_NM_FILE}"
19028 _ACEOF
19029
19030 NM_H=nm.h
19031 fi
19032
19033
19034
19035 for ac_prog in xsltproc
19036 do
19037 # Extract the first word of "$ac_prog", so it can be a program name with args.
19038 set dummy $ac_prog; ac_word=$2
19039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19040 $as_echo_n "checking for $ac_word... " >&6; }
19041 if ${ac_cv_path_XSLTPROC+:} false; then :
19042 $as_echo_n "(cached) " >&6
19043 else
19044 case $XSLTPROC in
19045 [\\/]* | ?:[\\/]*)
19046 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19047 ;;
19048 *)
19049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19050 for as_dir in $PATH
19051 do
19052 IFS=$as_save_IFS
19053 test -z "$as_dir" && as_dir=.
19054 for ac_exec_ext in '' $ac_executable_extensions; do
19055 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19056 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19058 break 2
19059 fi
19060 done
19061 done
19062 IFS=$as_save_IFS
19063
19064 ;;
19065 esac
19066 fi
19067 XSLTPROC=$ac_cv_path_XSLTPROC
19068 if test -n "$XSLTPROC"; then
19069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19070 $as_echo "$XSLTPROC" >&6; }
19071 else
19072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19073 $as_echo "no" >&6; }
19074 fi
19075
19076
19077 test -n "$XSLTPROC" && break
19078 done
19079 test -n "$XSLTPROC" || XSLTPROC="missing"
19080
19081 if test "x$USE_MAINTAINER_MODE" = xyes; then
19082 if test "${XSLTPROC}" = missing; then
19083 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19084 fi
19085 fi
19086
19087
19088
19089
19090
19091 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19092
19093
19094
19095 # Check whether we will enable the inclusion of unit tests when
19096 # compiling GDB.
19097 #
19098 # The default value of this option changes depending whether we're on
19099 # development mode (in which case it's "true") or not (in which case
19100 # it's "false").
19101 # Check whether --enable-unit-tests was given.
19102 if test "${enable_unit_tests+set}" = set; then :
19103 enableval=$enable_unit_tests; case "${enableval}" in
19104 yes) enable_unittests=true ;;
19105 no) enable_unittests=false ;;
19106 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19107 esac
19108 else
19109 enable_unittests=$development
19110 fi
19111
19112
19113 if $enable_unittests; then
19114
19115 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19116
19117
19118 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o"
19119 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c"
19120
19121 fi
19122
19123
19124
19125 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19126 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19127 if test "x$GDB_TRANSFORM_NAME" = x; then
19128 GDB_TRANSFORM_NAME=gdb
19129 fi
19130
19131
19132
19133 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19134 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19135 if test "x$GCORE_TRANSFORM_NAME" = x; then
19136 GCORE_TRANSFORM_NAME=gcore
19137 fi
19138
19139
19140 ac_config_files="$ac_config_files gcore"
19141
19142 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19143
19144
19145 cat >confcache <<\_ACEOF
19146 # This file is a shell script that caches the results of configure
19147 # tests run on this system so they can be shared between configure
19148 # scripts and configure runs, see configure's option --config-cache.
19149 # It is not useful on other systems. If it contains results you don't
19150 # want to keep, you may remove or edit it.
19151 #
19152 # config.status only pays attention to the cache file if you give it
19153 # the --recheck option to rerun configure.
19154 #
19155 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19156 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19157 # following values.
19158
19159 _ACEOF
19160
19161 # The following way of writing the cache mishandles newlines in values,
19162 # but we know of no workaround that is simple, portable, and efficient.
19163 # So, we kill variables containing newlines.
19164 # Ultrix sh set writes to stderr and can't be redirected directly,
19165 # and sets the high bit in the cache file unless we assign to the vars.
19166 (
19167 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19168 eval ac_val=\$$ac_var
19169 case $ac_val in #(
19170 *${as_nl}*)
19171 case $ac_var in #(
19172 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19173 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19174 esac
19175 case $ac_var in #(
19176 _ | IFS | as_nl) ;; #(
19177 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19178 *) { eval $ac_var=; unset $ac_var;} ;;
19179 esac ;;
19180 esac
19181 done
19182
19183 (set) 2>&1 |
19184 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19185 *${as_nl}ac_space=\ *)
19186 # `set' does not quote correctly, so add quotes: double-quote
19187 # substitution turns \\\\ into \\, and sed turns \\ into \.
19188 sed -n \
19189 "s/'/'\\\\''/g;
19190 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19191 ;; #(
19192 *)
19193 # `set' quotes correctly as required by POSIX, so do not add quotes.
19194 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19195 ;;
19196 esac |
19197 sort
19198 ) |
19199 sed '
19200 /^ac_cv_env_/b end
19201 t clear
19202 :clear
19203 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19204 t end
19205 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19206 :end' >>confcache
19207 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19208 if test -w "$cache_file"; then
19209 if test "x$cache_file" != "x/dev/null"; then
19210 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19211 $as_echo "$as_me: updating cache $cache_file" >&6;}
19212 if test ! -f "$cache_file" || test -h "$cache_file"; then
19213 cat confcache >"$cache_file"
19214 else
19215 case $cache_file in #(
19216 */* | ?:*)
19217 mv -f confcache "$cache_file"$$ &&
19218 mv -f "$cache_file"$$ "$cache_file" ;; #(
19219 *)
19220 mv -f confcache "$cache_file" ;;
19221 esac
19222 fi
19223 fi
19224 else
19225 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19226 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19227 fi
19228 fi
19229 rm -f confcache
19230
19231 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19232 # Let make expand exec_prefix.
19233 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19234
19235 DEFS=-DHAVE_CONFIG_H
19236
19237 ac_libobjs=
19238 ac_ltlibobjs=
19239 U=
19240 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19241 # 1. Remove the extension, and $U if already installed.
19242 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19243 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19244 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19245 # will be set to the directory where LIBOBJS objects are built.
19246 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19247 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19248 done
19249 LIBOBJS=$ac_libobjs
19250
19251 LTLIBOBJS=$ac_ltlibobjs
19252
19253
19254 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19255 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19256 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19257 fi
19258 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19259 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19260 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19261 fi
19262 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19263 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19264 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19265 fi
19266
19267
19268 : "${CONFIG_STATUS=./config.status}"
19269 ac_write_fail=0
19270 ac_clean_files_save=$ac_clean_files
19271 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19273 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19274 as_write_fail=0
19275 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19276 #! $SHELL
19277 # Generated by $as_me.
19278 # Run this file to recreate the current configuration.
19279 # Compiler output produced by configure, useful for debugging
19280 # configure, is in config.log if it exists.
19281
19282 debug=false
19283 ac_cs_recheck=false
19284 ac_cs_silent=false
19285
19286 SHELL=\${CONFIG_SHELL-$SHELL}
19287 export SHELL
19288 _ASEOF
19289 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19290 ## -------------------- ##
19291 ## M4sh Initialization. ##
19292 ## -------------------- ##
19293
19294 # Be more Bourne compatible
19295 DUALCASE=1; export DUALCASE # for MKS sh
19296 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19297 emulate sh
19298 NULLCMD=:
19299 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19300 # is contrary to our usage. Disable this feature.
19301 alias -g '${1+"$@"}'='"$@"'
19302 setopt NO_GLOB_SUBST
19303 else
19304 case `(set -o) 2>/dev/null` in #(
19305 *posix*) :
19306 set -o posix ;; #(
19307 *) :
19308 ;;
19309 esac
19310 fi
19311
19312
19313 as_nl='
19314 '
19315 export as_nl
19316 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19317 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19318 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19319 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19320 # Prefer a ksh shell builtin over an external printf program on Solaris,
19321 # but without wasting forks for bash or zsh.
19322 if test -z "$BASH_VERSION$ZSH_VERSION" \
19323 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19324 as_echo='print -r --'
19325 as_echo_n='print -rn --'
19326 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19327 as_echo='printf %s\n'
19328 as_echo_n='printf %s'
19329 else
19330 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19331 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19332 as_echo_n='/usr/ucb/echo -n'
19333 else
19334 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19335 as_echo_n_body='eval
19336 arg=$1;
19337 case $arg in #(
19338 *"$as_nl"*)
19339 expr "X$arg" : "X\\(.*\\)$as_nl";
19340 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19341 esac;
19342 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19343 '
19344 export as_echo_n_body
19345 as_echo_n='sh -c $as_echo_n_body as_echo'
19346 fi
19347 export as_echo_body
19348 as_echo='sh -c $as_echo_body as_echo'
19349 fi
19350
19351 # The user is always right.
19352 if test "${PATH_SEPARATOR+set}" != set; then
19353 PATH_SEPARATOR=:
19354 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19355 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19356 PATH_SEPARATOR=';'
19357 }
19358 fi
19359
19360
19361 # IFS
19362 # We need space, tab and new line, in precisely that order. Quoting is
19363 # there to prevent editors from complaining about space-tab.
19364 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19365 # splitting by setting IFS to empty value.)
19366 IFS=" "" $as_nl"
19367
19368 # Find who we are. Look in the path if we contain no directory separator.
19369 as_myself=
19370 case $0 in #((
19371 *[\\/]* ) as_myself=$0 ;;
19372 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19373 for as_dir in $PATH
19374 do
19375 IFS=$as_save_IFS
19376 test -z "$as_dir" && as_dir=.
19377 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19378 done
19379 IFS=$as_save_IFS
19380
19381 ;;
19382 esac
19383 # We did not find ourselves, most probably we were run as `sh COMMAND'
19384 # in which case we are not to be found in the path.
19385 if test "x$as_myself" = x; then
19386 as_myself=$0
19387 fi
19388 if test ! -f "$as_myself"; then
19389 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19390 exit 1
19391 fi
19392
19393 # Unset variables that we do not need and which cause bugs (e.g. in
19394 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19395 # suppresses any "Segmentation fault" message there. '((' could
19396 # trigger a bug in pdksh 5.2.14.
19397 for as_var in BASH_ENV ENV MAIL MAILPATH
19398 do eval test x\${$as_var+set} = xset \
19399 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19400 done
19401 PS1='$ '
19402 PS2='> '
19403 PS4='+ '
19404
19405 # NLS nuisances.
19406 LC_ALL=C
19407 export LC_ALL
19408 LANGUAGE=C
19409 export LANGUAGE
19410
19411 # CDPATH.
19412 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19413
19414
19415 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19416 # ----------------------------------------
19417 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19418 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19419 # script with STATUS, using 1 if that was 0.
19420 as_fn_error ()
19421 {
19422 as_status=$1; test $as_status -eq 0 && as_status=1
19423 if test "$4"; then
19424 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19425 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19426 fi
19427 $as_echo "$as_me: error: $2" >&2
19428 as_fn_exit $as_status
19429 } # as_fn_error
19430
19431
19432 # as_fn_set_status STATUS
19433 # -----------------------
19434 # Set $? to STATUS, without forking.
19435 as_fn_set_status ()
19436 {
19437 return $1
19438 } # as_fn_set_status
19439
19440 # as_fn_exit STATUS
19441 # -----------------
19442 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19443 as_fn_exit ()
19444 {
19445 set +e
19446 as_fn_set_status $1
19447 exit $1
19448 } # as_fn_exit
19449
19450 # as_fn_unset VAR
19451 # ---------------
19452 # Portably unset VAR.
19453 as_fn_unset ()
19454 {
19455 { eval $1=; unset $1;}
19456 }
19457 as_unset=as_fn_unset
19458 # as_fn_append VAR VALUE
19459 # ----------------------
19460 # Append the text in VALUE to the end of the definition contained in VAR. Take
19461 # advantage of any shell optimizations that allow amortized linear growth over
19462 # repeated appends, instead of the typical quadratic growth present in naive
19463 # implementations.
19464 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19465 eval 'as_fn_append ()
19466 {
19467 eval $1+=\$2
19468 }'
19469 else
19470 as_fn_append ()
19471 {
19472 eval $1=\$$1\$2
19473 }
19474 fi # as_fn_append
19475
19476 # as_fn_arith ARG...
19477 # ------------------
19478 # Perform arithmetic evaluation on the ARGs, and store the result in the
19479 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19480 # must be portable across $(()) and expr.
19481 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19482 eval 'as_fn_arith ()
19483 {
19484 as_val=$(( $* ))
19485 }'
19486 else
19487 as_fn_arith ()
19488 {
19489 as_val=`expr "$@" || test $? -eq 1`
19490 }
19491 fi # as_fn_arith
19492
19493
19494 if expr a : '\(a\)' >/dev/null 2>&1 &&
19495 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19496 as_expr=expr
19497 else
19498 as_expr=false
19499 fi
19500
19501 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19502 as_basename=basename
19503 else
19504 as_basename=false
19505 fi
19506
19507 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19508 as_dirname=dirname
19509 else
19510 as_dirname=false
19511 fi
19512
19513 as_me=`$as_basename -- "$0" ||
19514 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19515 X"$0" : 'X\(//\)$' \| \
19516 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19517 $as_echo X/"$0" |
19518 sed '/^.*\/\([^/][^/]*\)\/*$/{
19519 s//\1/
19520 q
19521 }
19522 /^X\/\(\/\/\)$/{
19523 s//\1/
19524 q
19525 }
19526 /^X\/\(\/\).*/{
19527 s//\1/
19528 q
19529 }
19530 s/.*/./; q'`
19531
19532 # Avoid depending upon Character Ranges.
19533 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19534 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19535 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19536 as_cr_digits='0123456789'
19537 as_cr_alnum=$as_cr_Letters$as_cr_digits
19538
19539 ECHO_C= ECHO_N= ECHO_T=
19540 case `echo -n x` in #(((((
19541 -n*)
19542 case `echo 'xy\c'` in
19543 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19544 xy) ECHO_C='\c';;
19545 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19546 ECHO_T=' ';;
19547 esac;;
19548 *)
19549 ECHO_N='-n';;
19550 esac
19551
19552 rm -f conf$$ conf$$.exe conf$$.file
19553 if test -d conf$$.dir; then
19554 rm -f conf$$.dir/conf$$.file
19555 else
19556 rm -f conf$$.dir
19557 mkdir conf$$.dir 2>/dev/null
19558 fi
19559 if (echo >conf$$.file) 2>/dev/null; then
19560 if ln -s conf$$.file conf$$ 2>/dev/null; then
19561 as_ln_s='ln -s'
19562 # ... but there are two gotchas:
19563 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19564 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19565 # In both cases, we have to default to `cp -pR'.
19566 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19567 as_ln_s='cp -pR'
19568 elif ln conf$$.file conf$$ 2>/dev/null; then
19569 as_ln_s=ln
19570 else
19571 as_ln_s='cp -pR'
19572 fi
19573 else
19574 as_ln_s='cp -pR'
19575 fi
19576 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19577 rmdir conf$$.dir 2>/dev/null
19578
19579
19580 # as_fn_mkdir_p
19581 # -------------
19582 # Create "$as_dir" as a directory, including parents if necessary.
19583 as_fn_mkdir_p ()
19584 {
19585
19586 case $as_dir in #(
19587 -*) as_dir=./$as_dir;;
19588 esac
19589 test -d "$as_dir" || eval $as_mkdir_p || {
19590 as_dirs=
19591 while :; do
19592 case $as_dir in #(
19593 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19594 *) as_qdir=$as_dir;;
19595 esac
19596 as_dirs="'$as_qdir' $as_dirs"
19597 as_dir=`$as_dirname -- "$as_dir" ||
19598 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19599 X"$as_dir" : 'X\(//\)[^/]' \| \
19600 X"$as_dir" : 'X\(//\)$' \| \
19601 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19602 $as_echo X"$as_dir" |
19603 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19604 s//\1/
19605 q
19606 }
19607 /^X\(\/\/\)[^/].*/{
19608 s//\1/
19609 q
19610 }
19611 /^X\(\/\/\)$/{
19612 s//\1/
19613 q
19614 }
19615 /^X\(\/\).*/{
19616 s//\1/
19617 q
19618 }
19619 s/.*/./; q'`
19620 test -d "$as_dir" && break
19621 done
19622 test -z "$as_dirs" || eval "mkdir $as_dirs"
19623 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19624
19625
19626 } # as_fn_mkdir_p
19627 if mkdir -p . 2>/dev/null; then
19628 as_mkdir_p='mkdir -p "$as_dir"'
19629 else
19630 test -d ./-p && rmdir ./-p
19631 as_mkdir_p=false
19632 fi
19633
19634
19635 # as_fn_executable_p FILE
19636 # -----------------------
19637 # Test if FILE is an executable regular file.
19638 as_fn_executable_p ()
19639 {
19640 test -f "$1" && test -x "$1"
19641 } # as_fn_executable_p
19642 as_test_x='test -x'
19643 as_executable_p=as_fn_executable_p
19644
19645 # Sed expression to map a string onto a valid CPP name.
19646 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19647
19648 # Sed expression to map a string onto a valid variable name.
19649 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19650
19651
19652 exec 6>&1
19653 ## ----------------------------------- ##
19654 ## Main body of $CONFIG_STATUS script. ##
19655 ## ----------------------------------- ##
19656 _ASEOF
19657 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19658
19659 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19660 # Save the log message, to keep $0 and so on meaningful, and to
19661 # report actual input values of CONFIG_FILES etc. instead of their
19662 # values after options handling.
19663 ac_log="
19664 This file was extended by $as_me, which was
19665 generated by GNU Autoconf 2.69. Invocation command line was
19666
19667 CONFIG_FILES = $CONFIG_FILES
19668 CONFIG_HEADERS = $CONFIG_HEADERS
19669 CONFIG_LINKS = $CONFIG_LINKS
19670 CONFIG_COMMANDS = $CONFIG_COMMANDS
19671 $ $0 $@
19672
19673 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19674 "
19675
19676 _ACEOF
19677
19678 case $ac_config_files in *"
19679 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19680 esac
19681
19682 case $ac_config_headers in *"
19683 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19684 esac
19685
19686
19687 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19688 # Files that config.status was made for.
19689 config_files="$ac_config_files"
19690 config_headers="$ac_config_headers"
19691 config_links="$ac_config_links"
19692 config_commands="$ac_config_commands"
19693
19694 _ACEOF
19695
19696 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19697 ac_cs_usage="\
19698 \`$as_me' instantiates files and other configuration actions
19699 from templates according to the current configuration. Unless the files
19700 and actions are specified as TAGs, all are instantiated by default.
19701
19702 Usage: $0 [OPTION]... [TAG]...
19703
19704 -h, --help print this help, then exit
19705 -V, --version print version number and configuration settings, then exit
19706 --config print configuration, then exit
19707 -q, --quiet, --silent
19708 do not print progress messages
19709 -d, --debug don't remove temporary files
19710 --recheck update $as_me by reconfiguring in the same conditions
19711 --file=FILE[:TEMPLATE]
19712 instantiate the configuration file FILE
19713 --header=FILE[:TEMPLATE]
19714 instantiate the configuration header FILE
19715
19716 Configuration files:
19717 $config_files
19718
19719 Configuration headers:
19720 $config_headers
19721
19722 Configuration links:
19723 $config_links
19724
19725 Configuration commands:
19726 $config_commands
19727
19728 Report bugs to the package provider."
19729
19730 _ACEOF
19731 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19732 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19733 ac_cs_version="\\
19734 config.status
19735 configured by $0, generated by GNU Autoconf 2.69,
19736 with options \\"\$ac_cs_config\\"
19737
19738 Copyright (C) 2012 Free Software Foundation, Inc.
19739 This config.status script is free software; the Free Software Foundation
19740 gives unlimited permission to copy, distribute and modify it."
19741
19742 ac_pwd='$ac_pwd'
19743 srcdir='$srcdir'
19744 INSTALL='$INSTALL'
19745 AWK='$AWK'
19746 test -n "\$AWK" || AWK=awk
19747 _ACEOF
19748
19749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19750 # The default lists apply if the user does not specify any file.
19751 ac_need_defaults=:
19752 while test $# != 0
19753 do
19754 case $1 in
19755 --*=?*)
19756 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19757 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19758 ac_shift=:
19759 ;;
19760 --*=)
19761 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19762 ac_optarg=
19763 ac_shift=:
19764 ;;
19765 *)
19766 ac_option=$1
19767 ac_optarg=$2
19768 ac_shift=shift
19769 ;;
19770 esac
19771
19772 case $ac_option in
19773 # Handling of the options.
19774 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19775 ac_cs_recheck=: ;;
19776 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19777 $as_echo "$ac_cs_version"; exit ;;
19778 --config | --confi | --conf | --con | --co | --c )
19779 $as_echo "$ac_cs_config"; exit ;;
19780 --debug | --debu | --deb | --de | --d | -d )
19781 debug=: ;;
19782 --file | --fil | --fi | --f )
19783 $ac_shift
19784 case $ac_optarg in
19785 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19786 '') as_fn_error $? "missing file argument" ;;
19787 esac
19788 as_fn_append CONFIG_FILES " '$ac_optarg'"
19789 ac_need_defaults=false;;
19790 --header | --heade | --head | --hea )
19791 $ac_shift
19792 case $ac_optarg in
19793 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19794 esac
19795 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19796 ac_need_defaults=false;;
19797 --he | --h)
19798 # Conflict between --help and --header
19799 as_fn_error $? "ambiguous option: \`$1'
19800 Try \`$0 --help' for more information.";;
19801 --help | --hel | -h )
19802 $as_echo "$ac_cs_usage"; exit ;;
19803 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19804 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19805 ac_cs_silent=: ;;
19806
19807 # This is an error.
19808 -*) as_fn_error $? "unrecognized option: \`$1'
19809 Try \`$0 --help' for more information." ;;
19810
19811 *) as_fn_append ac_config_targets " $1"
19812 ac_need_defaults=false ;;
19813
19814 esac
19815 shift
19816 done
19817
19818 ac_configure_extra_args=
19819
19820 if $ac_cs_silent; then
19821 exec 6>/dev/null
19822 ac_configure_extra_args="$ac_configure_extra_args --silent"
19823 fi
19824
19825 _ACEOF
19826 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19827 if \$ac_cs_recheck; then
19828 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19829 shift
19830 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19831 CONFIG_SHELL='$SHELL'
19832 export CONFIG_SHELL
19833 exec "\$@"
19834 fi
19835
19836 _ACEOF
19837 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19838 exec 5>>config.log
19839 {
19840 echo
19841 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19842 ## Running $as_me. ##
19843 _ASBOX
19844 $as_echo "$ac_log"
19845 } >&5
19846
19847 _ACEOF
19848 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19849 #
19850 # INIT-COMMANDS
19851 #
19852 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
19853 GDB_NM_FILE=$GDB_NM_FILE
19854
19855 _ACEOF
19856
19857 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19858
19859 # Handling of arguments.
19860 for ac_config_target in $ac_config_targets
19861 do
19862 case $ac_config_target in
19863 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19864 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
19865 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
19866 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
19867 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
19868 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19869 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
19870 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
19871 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
19872 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
19873
19874 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19875 esac
19876 done
19877
19878
19879 # If the user did not use the arguments to specify the items to instantiate,
19880 # then the envvar interface is used. Set only those that are not.
19881 # We use the long form for the default assignment because of an extremely
19882 # bizarre bug on SunOS 4.1.3.
19883 if $ac_need_defaults; then
19884 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19885 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19886 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19887 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19888 fi
19889
19890 # Have a temporary directory for convenience. Make it in the build tree
19891 # simply because there is no reason against having it here, and in addition,
19892 # creating and moving files from /tmp can sometimes cause problems.
19893 # Hook for its removal unless debugging.
19894 # Note that there is a small window in which the directory will not be cleaned:
19895 # after its creation but before its name has been assigned to `$tmp'.
19896 $debug ||
19897 {
19898 tmp= ac_tmp=
19899 trap 'exit_status=$?
19900 : "${ac_tmp:=$tmp}"
19901 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19902 ' 0
19903 trap 'as_fn_exit 1' 1 2 13 15
19904 }
19905 # Create a (secure) tmp directory for tmp files.
19906
19907 {
19908 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19909 test -d "$tmp"
19910 } ||
19911 {
19912 tmp=./conf$$-$RANDOM
19913 (umask 077 && mkdir "$tmp")
19914 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19915 ac_tmp=$tmp
19916
19917 # Set up the scripts for CONFIG_FILES section.
19918 # No need to generate them if there are no CONFIG_FILES.
19919 # This happens for instance with `./config.status config.h'.
19920 if test -n "$CONFIG_FILES"; then
19921
19922 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19923 ac_cs_awk_getline=:
19924 ac_cs_awk_pipe_init=
19925 ac_cs_awk_read_file='
19926 while ((getline aline < (F[key])) > 0)
19927 print(aline)
19928 close(F[key])'
19929 ac_cs_awk_pipe_fini=
19930 else
19931 ac_cs_awk_getline=false
19932 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19933 ac_cs_awk_read_file='
19934 print "|#_!!_#|"
19935 print "cat " F[key] " &&"
19936 '$ac_cs_awk_pipe_init
19937 # The final `:' finishes the AND list.
19938 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19939 fi
19940 ac_cr=`echo X | tr X '\015'`
19941 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19942 # But we know of no other shell where ac_cr would be empty at this
19943 # point, so we can use a bashism as a fallback.
19944 if test "x$ac_cr" = x; then
19945 eval ac_cr=\$\'\\r\'
19946 fi
19947 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19948 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19949 ac_cs_awk_cr='\\r'
19950 else
19951 ac_cs_awk_cr=$ac_cr
19952 fi
19953
19954 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19955 _ACEOF
19956
19957 # Create commands to substitute file output variables.
19958 {
19959 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
19960 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
19961 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19962 echo "_ACAWK" &&
19963 echo "_ACEOF"
19964 } >conf$$files.sh &&
19965 . ./conf$$files.sh ||
19966 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19967 rm -f conf$$files.sh
19968
19969 {
19970 echo "cat >conf$$subs.awk <<_ACEOF" &&
19971 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19972 echo "_ACEOF"
19973 } >conf$$subs.sh ||
19974 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19975 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19976 ac_delim='%!_!# '
19977 for ac_last_try in false false false false false :; do
19978 . ./conf$$subs.sh ||
19979 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19980
19981 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19982 if test $ac_delim_n = $ac_delim_num; then
19983 break
19984 elif $ac_last_try; then
19985 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19986 else
19987 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19988 fi
19989 done
19990 rm -f conf$$subs.sh
19991
19992 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19993 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19994 _ACEOF
19995 sed -n '
19996 h
19997 s/^/S["/; s/!.*/"]=/
19998 p
19999 g
20000 s/^[^!]*!//
20001 :repl
20002 t repl
20003 s/'"$ac_delim"'$//
20004 t delim
20005 :nl
20006 h
20007 s/\(.\{148\}\)..*/\1/
20008 t more1
20009 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20010 p
20011 n
20012 b repl
20013 :more1
20014 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20015 p
20016 g
20017 s/.\{148\}//
20018 t nl
20019 :delim
20020 h
20021 s/\(.\{148\}\)..*/\1/
20022 t more2
20023 s/["\\]/\\&/g; s/^/"/; s/$/"/
20024 p
20025 b
20026 :more2
20027 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20028 p
20029 g
20030 s/.\{148\}//
20031 t delim
20032 ' <conf$$subs.awk | sed '
20033 /^[^""]/{
20034 N
20035 s/\n//
20036 }
20037 ' >>$CONFIG_STATUS || ac_write_fail=1
20038 rm -f conf$$subs.awk
20039 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20040 _ACAWK
20041 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20042 for (key in S) S_is_set[key] = 1
20043 FS = "\a"
20044 \$ac_cs_awk_pipe_init
20045 }
20046 {
20047 line = $ 0
20048 nfields = split(line, field, "@")
20049 substed = 0
20050 len = length(field[1])
20051 for (i = 2; i < nfields; i++) {
20052 key = field[i]
20053 keylen = length(key)
20054 if (S_is_set[key]) {
20055 value = S[key]
20056 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20057 len += length(value) + length(field[++i])
20058 substed = 1
20059 } else
20060 len += 1 + keylen
20061 }
20062 if (nfields == 3 && !substed) {
20063 key = field[2]
20064 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20065 \$ac_cs_awk_read_file
20066 next
20067 }
20068 }
20069 print line
20070 }
20071 \$ac_cs_awk_pipe_fini
20072 _ACAWK
20073 _ACEOF
20074 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20075 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20076 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20077 else
20078 cat
20079 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20080 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20081 _ACEOF
20082
20083 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20084 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20085 # trailing colons and then remove the whole line if VPATH becomes empty
20086 # (actually we leave an empty line to preserve line numbers).
20087 if test "x$srcdir" = x.; then
20088 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20089 h
20090 s///
20091 s/^/:/
20092 s/[ ]*$/:/
20093 s/:\$(srcdir):/:/g
20094 s/:\${srcdir}:/:/g
20095 s/:@srcdir@:/:/g
20096 s/^:*//
20097 s/:*$//
20098 x
20099 s/\(=[ ]*\).*/\1/
20100 G
20101 s/\n//
20102 s/^[^=]*=[ ]*$//
20103 }'
20104 fi
20105
20106 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20107 fi # test -n "$CONFIG_FILES"
20108
20109 # Set up the scripts for CONFIG_HEADERS section.
20110 # No need to generate them if there are no CONFIG_HEADERS.
20111 # This happens for instance with `./config.status Makefile'.
20112 if test -n "$CONFIG_HEADERS"; then
20113 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20114 BEGIN {
20115 _ACEOF
20116
20117 # Transform confdefs.h into an awk script `defines.awk', embedded as
20118 # here-document in config.status, that substitutes the proper values into
20119 # config.h.in to produce config.h.
20120
20121 # Create a delimiter string that does not exist in confdefs.h, to ease
20122 # handling of long lines.
20123 ac_delim='%!_!# '
20124 for ac_last_try in false false :; do
20125 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20126 if test -z "$ac_tt"; then
20127 break
20128 elif $ac_last_try; then
20129 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20130 else
20131 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20132 fi
20133 done
20134
20135 # For the awk script, D is an array of macro values keyed by name,
20136 # likewise P contains macro parameters if any. Preserve backslash
20137 # newline sequences.
20138
20139 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20140 sed -n '
20141 s/.\{148\}/&'"$ac_delim"'/g
20142 t rset
20143 :rset
20144 s/^[ ]*#[ ]*define[ ][ ]*/ /
20145 t def
20146 d
20147 :def
20148 s/\\$//
20149 t bsnl
20150 s/["\\]/\\&/g
20151 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20152 D["\1"]=" \3"/p
20153 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20154 d
20155 :bsnl
20156 s/["\\]/\\&/g
20157 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20158 D["\1"]=" \3\\\\\\n"\\/p
20159 t cont
20160 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20161 t cont
20162 d
20163 :cont
20164 n
20165 s/.\{148\}/&'"$ac_delim"'/g
20166 t clear
20167 :clear
20168 s/\\$//
20169 t bsnlc
20170 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20171 d
20172 :bsnlc
20173 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20174 b cont
20175 ' <confdefs.h | sed '
20176 s/'"$ac_delim"'/"\\\
20177 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20178
20179 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20180 for (key in D) D_is_set[key] = 1
20181 FS = "\a"
20182 }
20183 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20184 line = \$ 0
20185 split(line, arg, " ")
20186 if (arg[1] == "#") {
20187 defundef = arg[2]
20188 mac1 = arg[3]
20189 } else {
20190 defundef = substr(arg[1], 2)
20191 mac1 = arg[2]
20192 }
20193 split(mac1, mac2, "(") #)
20194 macro = mac2[1]
20195 prefix = substr(line, 1, index(line, defundef) - 1)
20196 if (D_is_set[macro]) {
20197 # Preserve the white space surrounding the "#".
20198 print prefix "define", macro P[macro] D[macro]
20199 next
20200 } else {
20201 # Replace #undef with comments. This is necessary, for example,
20202 # in the case of _POSIX_SOURCE, which is predefined and required
20203 # on some systems where configure will not decide to define it.
20204 if (defundef == "undef") {
20205 print "/*", prefix defundef, macro, "*/"
20206 next
20207 }
20208 }
20209 }
20210 { print }
20211 _ACAWK
20212 _ACEOF
20213 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20214 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20215 fi # test -n "$CONFIG_HEADERS"
20216
20217
20218 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20219 shift
20220 for ac_tag
20221 do
20222 case $ac_tag in
20223 :[FHLC]) ac_mode=$ac_tag; continue;;
20224 esac
20225 case $ac_mode$ac_tag in
20226 :[FHL]*:*);;
20227 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20228 :[FH]-) ac_tag=-:-;;
20229 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20230 esac
20231 ac_save_IFS=$IFS
20232 IFS=:
20233 set x $ac_tag
20234 IFS=$ac_save_IFS
20235 shift
20236 ac_file=$1
20237 shift
20238
20239 case $ac_mode in
20240 :L) ac_source=$1;;
20241 :[FH])
20242 ac_file_inputs=
20243 for ac_f
20244 do
20245 case $ac_f in
20246 -) ac_f="$ac_tmp/stdin";;
20247 *) # Look for the file first in the build tree, then in the source tree
20248 # (if the path is not absolute). The absolute path cannot be DOS-style,
20249 # because $ac_f cannot contain `:'.
20250 test -f "$ac_f" ||
20251 case $ac_f in
20252 [\\/$]*) false;;
20253 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20254 esac ||
20255 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20256 esac
20257 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20258 as_fn_append ac_file_inputs " '$ac_f'"
20259 done
20260
20261 # Let's still pretend it is `configure' which instantiates (i.e., don't
20262 # use $as_me), people would be surprised to read:
20263 # /* config.h. Generated by config.status. */
20264 configure_input='Generated from '`
20265 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20266 `' by configure.'
20267 if test x"$ac_file" != x-; then
20268 configure_input="$ac_file. $configure_input"
20269 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20270 $as_echo "$as_me: creating $ac_file" >&6;}
20271 fi
20272 # Neutralize special characters interpreted by sed in replacement strings.
20273 case $configure_input in #(
20274 *\&* | *\|* | *\\* )
20275 ac_sed_conf_input=`$as_echo "$configure_input" |
20276 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20277 *) ac_sed_conf_input=$configure_input;;
20278 esac
20279
20280 case $ac_tag in
20281 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20282 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20283 esac
20284 ;;
20285 esac
20286
20287 ac_dir=`$as_dirname -- "$ac_file" ||
20288 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20289 X"$ac_file" : 'X\(//\)[^/]' \| \
20290 X"$ac_file" : 'X\(//\)$' \| \
20291 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20292 $as_echo X"$ac_file" |
20293 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20294 s//\1/
20295 q
20296 }
20297 /^X\(\/\/\)[^/].*/{
20298 s//\1/
20299 q
20300 }
20301 /^X\(\/\/\)$/{
20302 s//\1/
20303 q
20304 }
20305 /^X\(\/\).*/{
20306 s//\1/
20307 q
20308 }
20309 s/.*/./; q'`
20310 as_dir="$ac_dir"; as_fn_mkdir_p
20311 ac_builddir=.
20312
20313 case "$ac_dir" in
20314 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20315 *)
20316 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20317 # A ".." for each directory in $ac_dir_suffix.
20318 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20319 case $ac_top_builddir_sub in
20320 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20321 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20322 esac ;;
20323 esac
20324 ac_abs_top_builddir=$ac_pwd
20325 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20326 # for backward compatibility:
20327 ac_top_builddir=$ac_top_build_prefix
20328
20329 case $srcdir in
20330 .) # We are building in place.
20331 ac_srcdir=.
20332 ac_top_srcdir=$ac_top_builddir_sub
20333 ac_abs_top_srcdir=$ac_pwd ;;
20334 [\\/]* | ?:[\\/]* ) # Absolute name.
20335 ac_srcdir=$srcdir$ac_dir_suffix;
20336 ac_top_srcdir=$srcdir
20337 ac_abs_top_srcdir=$srcdir ;;
20338 *) # Relative name.
20339 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20340 ac_top_srcdir=$ac_top_build_prefix$srcdir
20341 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20342 esac
20343 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20344
20345
20346 case $ac_mode in
20347 :F)
20348 #
20349 # CONFIG_FILE
20350 #
20351
20352 case $INSTALL in
20353 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20354 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20355 esac
20356 _ACEOF
20357
20358 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20359 # If the template does not know about datarootdir, expand it.
20360 # FIXME: This hack should be removed a few years after 2.60.
20361 ac_datarootdir_hack=; ac_datarootdir_seen=
20362 ac_sed_dataroot='
20363 /datarootdir/ {
20364 p
20365 q
20366 }
20367 /@datadir@/p
20368 /@docdir@/p
20369 /@infodir@/p
20370 /@localedir@/p
20371 /@mandir@/p'
20372 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20373 *datarootdir*) ac_datarootdir_seen=yes;;
20374 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20375 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20376 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20377 _ACEOF
20378 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20379 ac_datarootdir_hack='
20380 s&@datadir@&$datadir&g
20381 s&@docdir@&$docdir&g
20382 s&@infodir@&$infodir&g
20383 s&@localedir@&$localedir&g
20384 s&@mandir@&$mandir&g
20385 s&\\\${datarootdir}&$datarootdir&g' ;;
20386 esac
20387 _ACEOF
20388
20389 # Neutralize VPATH when `$srcdir' = `.'.
20390 # Shell code in configure.ac might set extrasub.
20391 # FIXME: do we really want to maintain this feature?
20392 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20393 ac_sed_extra="$ac_vpsub
20394 $extrasub
20395 _ACEOF
20396 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20397 :t
20398 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20399 s|@configure_input@|$ac_sed_conf_input|;t t
20400 s&@top_builddir@&$ac_top_builddir_sub&;t t
20401 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20402 s&@srcdir@&$ac_srcdir&;t t
20403 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20404 s&@top_srcdir@&$ac_top_srcdir&;t t
20405 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20406 s&@builddir@&$ac_builddir&;t t
20407 s&@abs_builddir@&$ac_abs_builddir&;t t
20408 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20409 s&@INSTALL@&$ac_INSTALL&;t t
20410 $ac_datarootdir_hack
20411 "
20412 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20413 if $ac_cs_awk_getline; then
20414 $AWK -f "$ac_tmp/subs.awk"
20415 else
20416 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20417 fi \
20418 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20419
20420 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20421 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20422 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20423 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20424 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20425 which seems to be undefined. Please make sure it is defined" >&5
20426 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20427 which seems to be undefined. Please make sure it is defined" >&2;}
20428
20429 rm -f "$ac_tmp/stdin"
20430 case $ac_file in
20431 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20432 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20433 esac \
20434 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20435 ;;
20436 :H)
20437 #
20438 # CONFIG_HEADER
20439 #
20440 if test x"$ac_file" != x-; then
20441 {
20442 $as_echo "/* $configure_input */" \
20443 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20444 } >"$ac_tmp/config.h" \
20445 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20446 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20447 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20448 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20449 else
20450 rm -f "$ac_file"
20451 mv "$ac_tmp/config.h" "$ac_file" \
20452 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20453 fi
20454 else
20455 $as_echo "/* $configure_input */" \
20456 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20457 || as_fn_error $? "could not create -" "$LINENO" 5
20458 fi
20459 ;;
20460 :L)
20461 #
20462 # CONFIG_LINK
20463 #
20464
20465 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20466 :
20467 else
20468 # Prefer the file from the source tree if names are identical.
20469 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20470 ac_source=$srcdir/$ac_source
20471 fi
20472
20473 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20474 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20475
20476 if test ! -r "$ac_source"; then
20477 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20478 fi
20479 rm -f "$ac_file"
20480
20481 # Try a relative symlink, then a hard link, then a copy.
20482 case $ac_source in
20483 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20484 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20485 esac
20486 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20487 ln "$ac_source" "$ac_file" 2>/dev/null ||
20488 cp -p "$ac_source" "$ac_file" ||
20489 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20490 fi
20491 ;;
20492 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20493 $as_echo "$as_me: executing $ac_file commands" >&6;}
20494 ;;
20495 esac
20496
20497
20498 case $ac_file$ac_mode in
20499 "config.h":H) echo > stamp-h ;;
20500 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
20501 "nm.h":L) echo > stamp-nmh ;;
20502 "gcore":F) chmod +x gcore ;;
20503
20504 esac
20505 done # for ac_tag
20506
20507
20508 as_fn_exit 0
20509 _ACEOF
20510 ac_clean_files=$ac_clean_files_save
20511
20512 test $ac_write_fail = 0 ||
20513 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20514
20515
20516 # configure is writing to config.log, and then calls config.status.
20517 # config.status does its own redirection, appending to config.log.
20518 # Unfortunately, on DOS this fails, as config.log is still kept open
20519 # by configure, so config.status won't be able to write to it; its
20520 # output is simply discarded. So we exec the FD to /dev/null,
20521 # effectively closing config.log, so it can be properly (re)opened and
20522 # appended to by config.status. When coming back to configure, we
20523 # need to make the FD available again.
20524 if test "$no_create" != yes; then
20525 ac_cs_success=:
20526 ac_config_status_args=
20527 test "$silent" = yes &&
20528 ac_config_status_args="$ac_config_status_args --quiet"
20529 exec 5>/dev/null
20530 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20531 exec 5>>config.log
20532 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20533 # would make configure fail if this is the last instruction.
20534 $ac_cs_success || as_fn_exit 1
20535 fi
20536
20537 #
20538 # CONFIG_SUBDIRS section.
20539 #
20540 if test "$no_recursion" != yes; then
20541
20542 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20543 # so they do not pile up.
20544 ac_sub_configure_args=
20545 ac_prev=
20546 eval "set x $ac_configure_args"
20547 shift
20548 for ac_arg
20549 do
20550 if test -n "$ac_prev"; then
20551 ac_prev=
20552 continue
20553 fi
20554 case $ac_arg in
20555 -cache-file | --cache-file | --cache-fil | --cache-fi \
20556 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20557 ac_prev=cache_file ;;
20558 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20559 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20560 | --c=*)
20561 ;;
20562 --config-cache | -C)
20563 ;;
20564 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20565 ac_prev=srcdir ;;
20566 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20567 ;;
20568 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20569 ac_prev=prefix ;;
20570 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20571 ;;
20572 --disable-option-checking)
20573 ;;
20574 *)
20575 case $ac_arg in
20576 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20577 esac
20578 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
20579 esac
20580 done
20581
20582 # Always prepend --prefix to ensure using the same prefix
20583 # in subdir configurations.
20584 ac_arg="--prefix=$prefix"
20585 case $ac_arg in
20586 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20587 esac
20588 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20589
20590 # Pass --silent
20591 if test "$silent" = yes; then
20592 ac_sub_configure_args="--silent $ac_sub_configure_args"
20593 fi
20594
20595 # Always prepend --disable-option-checking to silence warnings, since
20596 # different subdirs can have different --enable and --with options.
20597 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20598
20599 ac_popdir=`pwd`
20600 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20601
20602 # Do not complain, so a configure script can configure whichever
20603 # parts of a large source tree are present.
20604 test -d "$srcdir/$ac_dir" || continue
20605
20606 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20607 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20608 $as_echo "$ac_msg" >&6
20609 as_dir="$ac_dir"; as_fn_mkdir_p
20610 ac_builddir=.
20611
20612 case "$ac_dir" in
20613 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20614 *)
20615 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20616 # A ".." for each directory in $ac_dir_suffix.
20617 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20618 case $ac_top_builddir_sub in
20619 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20620 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20621 esac ;;
20622 esac
20623 ac_abs_top_builddir=$ac_pwd
20624 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20625 # for backward compatibility:
20626 ac_top_builddir=$ac_top_build_prefix
20627
20628 case $srcdir in
20629 .) # We are building in place.
20630 ac_srcdir=.
20631 ac_top_srcdir=$ac_top_builddir_sub
20632 ac_abs_top_srcdir=$ac_pwd ;;
20633 [\\/]* | ?:[\\/]* ) # Absolute name.
20634 ac_srcdir=$srcdir$ac_dir_suffix;
20635 ac_top_srcdir=$srcdir
20636 ac_abs_top_srcdir=$srcdir ;;
20637 *) # Relative name.
20638 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20639 ac_top_srcdir=$ac_top_build_prefix$srcdir
20640 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20641 esac
20642 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20643
20644
20645 cd "$ac_dir"
20646
20647 # Check for guested configure; otherwise get Cygnus style configure.
20648 if test -f "$ac_srcdir/configure.gnu"; then
20649 ac_sub_configure=$ac_srcdir/configure.gnu
20650 elif test -f "$ac_srcdir/configure"; then
20651 ac_sub_configure=$ac_srcdir/configure
20652 elif test -f "$ac_srcdir/configure.in"; then
20653 # This should be Cygnus configure.
20654 ac_sub_configure=$ac_aux_dir/configure
20655 else
20656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20657 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20658 ac_sub_configure=
20659 fi
20660
20661 # The recursion is here.
20662 if test -n "$ac_sub_configure"; then
20663 # Make the cache file name correct relative to the subdirectory.
20664 case $cache_file in
20665 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20666 *) # Relative name.
20667 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20668 esac
20669
20670 { $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
20671 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20672 # The eval makes quoting arguments work.
20673 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20674 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20675 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
20676 fi
20677
20678 cd "$ac_popdir"
20679 done
20680 fi
20681 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20682 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20683 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20684 fi
20685